OIP system: FILE
FILE
A generated article for one OIP shelf. It lists every operation in this API/CLI/MCP/device/model/core subsystem, links each leaf article, and gives the ledger path for proof.
This page is the operating article for one build subsystem. It is generated from live directory rows. If a task belongs to this subsystem, scan the operations below, open the matching capability article, run only the exact object named there, and verify by receipt.
Kind: core. Capabilities: 5. Machine system map: /api/dispatch?map=FILE&format=markdown. Root: /a/oip.
Operations
FILE_GET
Read a repo file by path via GitHub Contents API. Returns {path,sha,size,content} Use when: you need to file get Arguments: path. Human article: /a/oip-capability-file-get. Machine doc: ?key=FILE_GET&format=markdown. Invocation history: /api/invocations?object_id=FILE_GET.
FILE_PUT
Write a repo file via GitHub Contents API. Creates or overwrites. Use when: you need to file put Arguments: $1 = path (e.g. functions/api/dispatch.js), $2 = file content (raw text), $3 = commit message (optional), $4 = sha (optional, auto-resolved if omitted), $5 = ref (optional, default main). Human article: /a/oip-capability-file-put. Machine doc: ?key=FILE_PUT&format=markdown. Invocation history: /api/invocations?object_id=FILE_PUT.
FILE_LIST
List every file in the repo tree Use when: you need to file list Arguments: see content. Human article: /a/oip-capability-file-list. Machine doc: ?key=FILE_LIST&format=markdown. Invocation history: /api/invocations?object_id=FILE_LIST.
FILE_PATCH
Patch a repo file — replace one string with another. Safer than FILE_PUT for small edits Use when: you need to file patch Arguments: $1 = path (e.g. functions/api/dispatch.js), $2 = old_string, $3 = new_string, $4 = commit message (optional), $5 = ref (optional, default main). Human article: /a/oip-capability-file-patch. Machine doc: ?key=FILE_PATCH&format=markdown. Invocation history: /api/invocations?object_id=FILE_PATCH.
FILE_CLAIM
Advisory write-locks so coding agents stop double-editing the same file. KV-backed, TTL auto-expires. Use when: BEFORE editing any repo file: claim it. AFTER finishing: release it. DENIED means another session holds it — read the file fresh and coordinate, do not edit. See AGENTS.md "WRITE LAW". Arguments: op(claim|release|check|list) | file path | holder as agent:session | ttl minutes (default 90). Human article: /a/oip-capability-file-claim. Machine doc: ?key=FILE_CLAIM&format=markdown. Invocation history: /api/invocations?object_id=FILE_CLAIM.