इस guide के अंत तक Codex CLI आपके किसी osFoundry project के "Bugs" record channel को एक-एक करके निपटाएगा। वह channel का schema पढ़ता है, उन items के pages से गुज़रता है जो अभी भी New पर हैं, हर item खोलता है और Status, Owner और Severity भरता है। ये बदलाव channel के Data tab में किसी भी teammate के edits की तरह दिखते हैं, और हर call connection के Recent activity (हाल की गतिविधि) में दर्ज होती है। जब कोई value किसी field में फ़िट नहीं होती, तो osFoundry उस edit को reject कर देता है, और Codex अंदाज़ा लगाने के बजाय वह field किसी इंसान के लिए छोड़ देता है।
कौन क्या करता है
| Codex की तरफ़ | osFoundry की तरफ़ | |
|---|---|---|
| Login | आपका Codex sign-in, बिना बदलाव। osFoundry का OAuth token Codex रखता है | एक workspace के लिए एक approved connection |
| कौन सा channel | Codex उसे list_project_resources से ढूंढता है |
सिर्फ़ उन projects के record channels जिनमें connection जोड़ा गया है |
| Field के नियम | Codex उन्हें list_record_items से लौटे schema से पढ़ता है |
Channel का Schema tab: field types, Required, select options |
| Writes |
edit_record_item, Codex के अपने approval prompt के बाद |
Values को fields के हिसाब से validate किया जाता है। गलत type या अनजाना option reject होता है |
| Conflicts | Codex item को दोबारा पढ़कर फिर से फ़ैसला करता है |
expected_version का item के मौजूदा version से मेल खाना ज़रूरी है |
| Rows और fields | Codex मौजूदा items की values बदल सकता है | Items जोड़ना या हटाना और schema बदलना app में ही होता है |
Setup
यहां माना गया है कि Codex पहले से connected है: [mcp_servers.osfoundry] table ~/.codex/config.toml में है, और codex mcp login osfoundry पूरा हो चुका है। नीचे के steps वह हैं जो record channel के लिए इसके ऊपर जोड़ने होते हैं।
1. Record channel को connected project में डालें
Sidebar में Records खोलें और channel चुनें। नया tracker Create Record Channel, Record Type Custom से बनता है, जो एक नाम मांगता है। Channel में Settings tab खोलें। जब तक channel किसी project में नहीं है, Project field में "Add to project" दिखता है। वह project चुनें जिससे Codex connection जुड़ा है।
Connection किसी record channel तक उसके project के ज़रिए पहुंचता है। अगर आप channel को किसी दूसरे project में ले जाते हैं, तो Codex की अगली call reject हो जाती है।
2. वह schema जांचें जिसके दायरे में Codex को रहना है
Schema tab ("Define the fields for this record channel.") ही contract है। हर field का एक type होता है, एक optional Required flag, और Select व Multi-Select के लिए options की list। हर option की एक stored value और एक label होता है। Grid label दिखाता है। Codex को value भेजनी होती है।
Example: the Bugs channel
ticket Text Required
title Text Required
status Select Required new · triaged · in_progress · fixed · wont_fix
owner Select aiko · mika · ren
severity Select s1 · s2 · s3 · s4
points Number min 0, max 13
area Multi-Select billing · auth · api · ui
due Date
age_days Formula computed
उदाहरण: Bugs record channel का Schema tab
Formula field अपने expression से compute होता है। उसे कोई नहीं लिखता, Codex भी नहीं।
3. Connection को project में जोड़ें और उसके tools जांचें
Header में key icon पर click करें और Connected खोलें। Codex connection चुनें। Projects के नीचे project चुनें और Add to project (project में जोड़ें) पर click करें। इससे project का synced content, record channels समेत, इस connection के लिए खुल जाता है।
थोड़ा नीचे Tools खोलें। Checklist में tool names spaces के साथ दिखते हैं, इसलिए "list record items", "read record item", "edit record item" और "poll resource events" ढूंढें। सभी supported tools default रूप से on रहते हैं। अगर फ़िलहाल Codex को सिर्फ़ पढ़ना है, तो "edit record item" को untick करें और Save tools (tools save करें) पर click करें।
उदाहरण: "Product" project जोड़ा हुआ Codex CLI connection
4. Codex को offer होने वाले tools कम करें
Codex अपनी तरफ़ भी tools filter करता है। Triage के लिए छह काफ़ी हैं:
[mcp_servers.osfoundry]
url = "https://api.osfoundry.io/api/v1/external-mcp"
scopes = ["osfoundry:read", "osfoundry:write"]
default_tools_approval_mode = "writes"
enabled_tools = [
"list_granted_resources",
"list_project_resources",
"list_record_items",
"read_record_item",
"edit_record_item",
"poll_resource_events",
]
list_record_items, read_record_item और poll_resource_events server पर read-only marked हैं, इसलिए "writes" के साथ ये बिना prompt के चलते हैं। हर edit_record_item से पहले Codex पूछता है। 40 items के एक pass में यह 40 prompts हैं। साथ ही यह उसे रोकने के 40 मौके भी हैं।
5. नियम साफ़-साफ़ लिखकर कहें
In osFoundry, open the "Bugs" record channel in the Product project.
Go through every item with status "new", newest first.
For each one: read it, then set status to triaged, pick an owner by area
(billing → aiko, auth → mika, everything else → ren) and a severity.
Use the option values from the schema, not the labels.
If osFoundry rejects a value, don't guess. Leave that field and list the
item at the end.
एक असली run
जिस machine पर यह लिखा गया, उस पर Codex installed नहीं है, इसलिए नीचे का session एक simulated उदाहरण है। Tool names और arguments वही हैं जो live server tools/list में list करता है। Codex model को MCP tools mcp__<server>__<tool> के रूप में दिखाता है। Channel, items और जवाब demo content हैं।
Example (simulated)
• mcp__osfoundry__list_project_resources {"project_id": "…", "resource_type": "record_channel",
"search": "Bugs"}
← record channel "Bugs", id 4127
• mcp__osfoundry__list_record_items {"record_channel_id": "4127", "limit": 50}
← schema: 11 fields · 50 item previews · more before item 9811
• mcp__osfoundry__list_record_items {"record_channel_id": "4127", "before_id": "9811", "limit": 50}
← schema · 23 item previews · no more pages
(38 of the 73 items have status "new")
• mcp__osfoundry__read_record_item {"record_channel_id": "4127", "item_id": "9874"}
← BUG-1873 "Invoice PDF shows last month's total", area ["billing"], version "…14.208311Z"
• mcp__osfoundry__edit_record_item {"record_channel_id": "4127", "item_id": "9874",
"values": {"status": "triaged", "owner": "aiko", "severity": "s2"},
"expected_version": "…14.208311Z", "idempotency_key": "triage-9874"}
[Codex asks: allow this tool call? → yes]
← saved
… 36 more items …
• mcp__osfoundry__edit_record_item {… "item_id": "9790",
"values": {"status": "triaged", "owner": "ren", "severity": "s3", "points": 20}, …}
← rejected: points must be between 0 and 13
• mcp__osfoundry__read_record_item {… "item_id": "9790"}
• mcp__osfoundry__edit_record_item {… "values": {"status": "triaged", "owner": "ren", "severity": "s3"}, …}
← saved
• mcp__osfoundry__edit_record_item {… "item_id": "9802", …, "expected_version": "…02.551904Z"}
← rejected: the item changed after that version
• mcp__osfoundry__read_record_item {… "item_id": "9802"}
← status "in_progress", owner "mika" (set by Mika in osFoundry a minute ago)
Triaged 37 of 38 new items. BUG-1791's description says "about 20 points",
but Points only goes to 13, so I left it empty. BUG-1805 was already
in progress with Mika, so I didn't touch it.
यहां असली काम दो rejections ने किया। इस उदाहरण में Points field की limit 13 है, इसलिए 20 वाला edit पूरा का पूरा लौटा दिया गया। Codex ने वह एक field हटाया और बाकी save कर दिया। उसने 20 को 13 पर clamp नहीं किया, क्योंकि clamp किया हुआ estimate असली estimate जैसा दिखता है। दूसरा rejection version check का है। Codex के read और write के बीच Mika ने वह item उठा लिया था। Codex ने उसे दोबारा पढ़ा, नया status और owner देखा, और अपनी योजना से उनके काम को overwrite करने के बजाय उन्हें वैसे ही छोड़ दिया।
Paging before_id से हुई। हर page उसमें मौजूद सबसे पुराने item पर खत्म होता है, और अगला page उससे पहले के items मांगता है। Codex के पढ़ते समय report होने वाले bugs पुराने items को अगले page पर नहीं धकेलते, इसलिए कुछ भी दो बार नहीं पढ़ा जाता।
उदाहरण: Pass के बाद Data tab, Status और Owner भरे हुए
Data tab नतीजा वैसे ही दिखाता है जैसे grid हमेशा दिखाता है। Status option के label "Triaged" के रूप में दिखता है, अगर option का कोई colour है तो उसी colour में, stored triaged के रूप में नहीं। जिस item को किसी और ने बदला है, उसमें उसी व्यक्ति की values बनी रहती हैं।
सीमा कहां है
Values के लिए schema ही सीमा है। Codex किसी field में सिर्फ़ वही डाल सकता है जो वह field accept करता है, और select fields अपने options की values accept करते हैं। "In progress" या "Aiko Tanaka" जैसे labels reject होते हैं, convert नहीं होते। Convert करने के लिए अंदाज़ा लगाना पड़ता। "major" का मतलब S2 हो सकता है, और "Won't fix" और wont_fix सिर्फ़ इंसान को एक जैसे लगते हैं। अगर आप चाहते हैं कि Codex किसी field के बारे में पूछना बंद करे, तो उस field को Schema tab में बदलें। Codex उसे बाहर से ढीला नहीं कर सकता।
Codex सिर्फ़ values edit करता है, और कुछ नहीं। MCP पर item जोड़ने, हटाने या field जोड़ने का कोई tool नहीं है। Duplicates बंद करना और tracker का ढांचा बदलना app में होता है, जहां Versions और channel की अपनी history दिखाती है कि यह किसने किया।
हर call पहुंचते ही जांची जाती है। Connection का status, channel अभी जिस project में है वह, और उस पर आपके अपने अधिकार हर call पर evaluate होते हैं। Project हटाने या Revoke connection (connection रद्द करें) पर click करने के बाद, पहले जारी हुआ token access खुला नहीं रखता। सिर्फ़ synced, hosted channels तक पहुंचा जा सकता है। Server का initialize reply कहता है "Local-only data is unavailable to cloud clients."
osFoundry calls देखता है, session नहीं। Recent activity में tool name, access decision और समय दर्ज होता है। Codex की reasoning और आपकी repository आपकी machine पर ही रहती हैं।
आगे क्या
अगली सुबह वही prompt फिर चलाएं, लेकिन शुरुआत record channel पर poll_resource_events से करें, उस sequence से जो Codex ने पिछले pass के अंत में नोट किया था। यह उस sequence के बाद के channel events लौटाता है, इसलिए Codex पूरे tracker के बजाय सिर्फ़ उन गिने-चुने items को दोबारा पढ़ता है जो बदले हैं। osFoundry की तरफ़ एक item कैसा दिखता है, उसके form view और history के साथ, यह Record detail page पर है।



Top comments (0)