skip to content
$worker

iii-directory

v1.2.5-rc.1

Engine introspection, workers registry proxy, filesystem-backed skills, system prompts, and agent profiles, plus lexical function search with a conditional pre-generate hint.

iiiverified
2,916 installs25 in 7d1 today
install
$iii trigger compose::add worker=iii-directory@1.2.5-rc.1

exact versions are immutable; binary and bundle artifacts are digest-pinned.

functions

29

directory::__on_worker_added

function

Internal: auto-download skills on worker add event.

request
  • workerstring
response
  • okbooleanrequired

directory::agents::create

function

Create a NEW agent profile at <agents_folder>/<id>.md from full-file markdown content (frontmatter block included; a non-empty `name` is required, `logo` is emoji-only, and the body — the system prompt — must be non-empty). Rejects ids that already exist in the configured agents folder, or a target path that already exists on disk. The write is atomic and fans out directory::agents::on-change with { op: "create" }.

request
  • contentstringrequired

    FULL file content, frontmatter block included. Frontmatter must carry a non-empty `name`; the body is the system prompt and must be non-empty.

  • idstringrequired

    New agent profile id — becomes the file stem (`<agents_folder>/<id>.md`). Lowercase ASCII, digits, `-` and `_` only. Must not collide with an existing agent profile or an on-disk file at the target path.

response
  • bytesinteger· uintrequiredmin 0

    Bytes written.

  • descriptionstringrequired
  • idstringrequired
  • logostring
  • modified_atstringrequired

    File mtime after the write, RFC 3339.

  • namestringrequired

    Display name parsed from the (new) frontmatter.

directory::agents::delete

function

Permanently delete one EXISTING agent profile by id. Resolves against the same merged scan as directory::agents::list, removes only that profile's markdown file, and fans out directory::agents::on-change with { op: "delete" }. Sessions already using this profile are not affected; the id just stops resolving for new sends.

request
  • idstringrequired

    Existing agent profile id, as returned by `directory::agents::list`.

response
  • idstringrequired

directory::agents::get

function

Fetch one agent profile by id. Returns the system prompt (the file body, frontmatter stripped), display name, description, emoji logo, the skill filter plus unknown_skills (filter entries matching no visible skill — warnings, the profile still loads), model, reasoning_effort, icon, color, and modified_at. Pass raw: true to also get the exact on-disk file for editing with directory::agents::update.

request
  • idstringrequired
  • rawboolean

    When `true`, the response includes the FULL on-disk file content (frontmatter block included) as `raw` — the exact string to hand back to `directory::agents::update`.

response
  • colorstring

    Harness subagent color token (closed set, validated at write time); `null` = neutral.

  • descriptionstringrequired
  • iconstring

    Harness subagent icon token (closed set, validated at write time); `null` = caller picks.

  • idstringrequired
  • logostring
  • modelstring

    Model id for sessions using this profile; `null` = the send decides. Served verbatim — resolution against the live model catalog happens where it is used.

  • modified_atstringrequired

    File mtime as RFC 3339.

  • namestringrequired
  • rawstring

    FULL on-disk file content. Present only when the request set `raw: true`.

  • reasoning_effortstring

    Provider-native reasoning effort paired with `model`; `null` = the model/provider default. Served verbatim and validated at use time.

  • skillsstring[]required

    The frontmatter skill filter. Empty = every skill.

  • system_promptstringrequired

    The file body, frontmatter stripped — the identity, verbatim.

  • unknown_skillsstring[]required

    Filter entries that resolve to no currently visible skill. Warnings — the agent profile still loads.

directory::agents::list

function

List filesystem-backed agent profiles (id, display name, description, emoji logo, icon, color, model, reasoning_effort, skill_count, modified_at) from the configured agents folder. An agent profile is a reusable session identity: its file body is the system prompt. skill_count null = sessions using the profile can use every skill.

request
empty object
response
  • agentsobject[]required
    • colorstring

      Harness subagent color token for display identities; `null` = neutral.

    • descriptionstringrequired
    • iconstring

      Harness subagent icon token for spawn display identities; `null` = caller picks.

    • idstringrequired

      Flat agent profile id (the file stem) — what `harness::send { options: { agent } }` will take.

    • logostring

      Emoji logo, `null` when the agent profile has none.

    • modelstring

      Model id for sessions using this profile; `null` = the send decides.

    • modified_atstringrequired

      File mtime as RFC 3339.

    • namestringrequired

      Display name from frontmatter (`name:`).

    • reasoning_effortstring

      Provider-native reasoning effort paired with `model`; `null` = the model/provider default.

    • skill_countinteger· uintmin 0

      Length of the agent profile's skill filter; `null` = no filter (every skill).

directory::agents::update

function

Overwrite one EXISTING agent profile with new full-file markdown content — the same rules the scanner enforces (required frontmatter with a non-empty `name`, emoji-only `logo`, non-empty body), so an update can never produce a file the next directory::agents::list would skip. The agent profile id stays the file stem; frontmatter `name` is only the display name. The write is atomic and fans out directory::agents::on-change with { op: "update" }.

request
  • contentstringrequired

    FULL new file content, frontmatter block included — the string `directory::agents::get { raw: true }` returns, edited.

  • idstringrequired

    Existing agent profile id, as returned by `directory::agents::list`.

response
  • bytesinteger· uintrequiredmin 0

    Bytes written.

  • descriptionstringrequired
  • idstringrequired
  • logostring
  • modified_atstringrequired

    File mtime after the write, RFC 3339.

  • namestringrequired

    Display name parsed from the (new) frontmatter.

directory::engine::functions::info

function

Full detail for one engine function: schemas, owning worker, and registered triggers that target it. Proxies to the engine's native engine::functions::info for the core data.

request
  • function_idstringrequired

    Fully-qualified function id on the bus (e.g. `sandbox::create`).

response
  • descriptionstring
  • function_idstringrequired
  • metadataunknown
  • registered_triggersobject[]required
    • configunknownrequired
    • idstringrequired
    • trigger_typestringrequired
  • request_schemaunknown
  • response_schemaunknown
  • worker_namestring

directory::hint-preview

function

Internal: the exact search-hint text per exposure mode, for the configuration UI.

request
empty object
response
  • agent_triggerstringrequired
  • nativestringrequired

directory::on-config-change

function

Internal: reload tunable iii-directory settings from the authoritative configuration when it changes.

request
empty object
response
  • okbooleanrequired

directory::on-functions-change

function

Internal: refresh the search catalog after the engine function set changes.

request
  • eventstring
response
  • okbooleanrequired

directory::pre-generate

function

Internal: inject the conditional search hint into one harness generation.

request
  • depthinteger· uint32requiredmin 0
  • generateobjectrequired
    • exposeall of

      How the harness exposes functions to the model for this generation. Absent on harnesses that predate the field, which only ever exposed through agent_trigger by default.

      all of (1)
      variant 1
      one of (2)
      variant 1
      valuestringenum: agent_trigger, native
      variant 2
      valuestringenum: other
    • functions_generationinteger· uint64requiredmin 0
    • messagesunknown[]required
    • system_promptstringrequired
    • toolsobject[]required
      • descriptionstringrequired
      • namestringrequired
      • parametersunknownrequired
  • session_idstringrequired
  • stepinteger· uint64requiredmin 0
  • turn_idstringrequired
response
  • annotationsobjectrequired
    • directoryobjectrequired
      • dataobjectrequired

        The durable transcript row for one hook pass. Coarse by design: outcome, reason, and counts only — no prompts, messages, tool contracts, session ids, or timings ever leave the hook.

        … expand 4 nested
        • allowed_functionsinteger· uint64requiredmin 0
        • functions_generationinteger· uint64requiredmin 0
        • outcomestringrequiredenum: hint_injected, skipped
        • reasonany of
          … expand 2 nested
          any of (2)
          variant 1
          valuestringenum: search_unavailable, already_searched, narrow_surface, already_operating, task_guided, hint_already_sent
          variant 2
          valuenull
      • summarystringrequired
      • typestringrequired
      • versioninteger· uint8requiredmin 0
  • decisionstringrequired
  • mutationsany of
    any of (2)
    variant 1
    • append_messagesunknown[]required

      Ephemeral tail messages for this generation only. The hint rides here rather than as a system-prompt mutation: the system prompt is the provider's first input item, and a once-per-turn append there invalidated the entire prompt-cache prefix twice per turn.

    variant 2
    valuenull

directory::registry::workers::info

function

Fetch full registry metadata for one worker: worker envelope (same core fields as the engine's `engine::workers::list` row shape, plus registry-only `type` / `config` / `supported_targets` / `total_downloads` / `dependencies` / `image`), readme, full API reference (functions + triggers schemas), and the tree of skill file paths fetched from the registry's /w/{slug}/skills endpoint. Pass either `version` or `tag` (defaults to tag="latest"). Results are cached for `registry_cache_ttl_ms`.

request
  • namestringrequired

    Worker name in the registry (e.g. `"resend"`).

  • tagstring
  • versionstring

    Mutually exclusive with `tag`. If neither is provided we fall back to `tag: "latest"`.

response
  • api_referenceobjectrequired
    • functionsobject[]
      • descriptionstring
      • metadataunknown
      • namestringrequired
      • request_schemaunknown
      • response_schemaunknown
    • triggersobject[]
      • descriptionstring
      • invocation_schemaunknown
      • metadataunknown
      • namestringrequired
      • return_schemaunknown
  • readmestring
  • skills_treeobjectrequired
    • skillsobject[]
      • pathstringrequired
  • workerall ofrequired

    Same shape as `directory::registry::workers::list` rows (and the engine's `engine::workers::list` rows for the shared core fields).

    all of (1)
    variant 1
    • authorany of
      … expand 2 nested
      any of (2)
      variant 1
      • namestring
      • pfpstring

        Profile picture URL. `null` when the author hasn't uploaded one.

      • verifiedboolean
      variant 2
      valuenull
    • configunknown

      Free-form runtime configuration block from the publish payload.

    • dependenciesobject[]
      … expand 2 nested
      • namestringrequired
      • versionstringrequired
    • descriptionstring
    • imagestring

      Container image tag, populated only for `type=image` workers.

    • namestringrequired
    • repostring
    • supported_targetsstring[]
    • total_downloadsinteger· uint64min 0
    • typestring

      Worker kind — `binary`, `image`, or `engine`.

    • versionstring

      Latest published version (worker-list) or the resolved version (worker-info, when called with `version` / `tag`).

directory::registry::workers::list

function

List workers from the public registry (api.workers.iii.dev). Optional free-text `search` is matched fuzzily by the registry; omit it to browse by `total_downloads DESC`. Pagination is cursor-based with a server-authored page size — pass back `pagination.next_cursor` as `cursor` to fetch the next page. Shares the core `name` / `description` / `version` fields with the engine's `engine::workers::list`. Results are cached for `registry_cache_ttl_ms` (default 60s).

request
  • cursorstring

    Opaque cursor returned by a previous call's `pagination.next_cursor`. Pass back verbatim to fetch the next page; omit (or pass `null`) to fetch the first page.

  • searchstring

    Optional free-text query. Forwarded to the registry as `?search=…`; the registry ranks results by `pg_trgm` similarity against `lower(name)` and `lower(description)`. When omitted, results are ordered by `total_downloads DESC`.

response
  • paginationobjectrequired

    Pagination envelope returned alongside a worker-list page. Mirrors the OpenAPI `Pagination` schema.

    • has_moreboolean
    • next_cursorstring

      Opaque cursor for the next page. `null` on the last page.

    • page_sizeinteger· uint32min 0

      Server-authored page size. The client cannot override this.

  • workersobject[]required
    • authorany of
      any of (2)
      variant 1
      • namestring
      • pfpstring

        Profile picture URL. `null` when the author hasn't uploaded one.

      • verifiedboolean
      variant 2
      valuenull
    • configunknown

      Free-form runtime configuration block from the publish payload.

    • dependenciesobject[]
      • namestringrequired
      • versionstringrequired
    • descriptionstring
    • imagestring

      Container image tag, populated only for `type=image` workers.

    • namestringrequired
    • repostring
    • supported_targetsstring[]
    • total_downloadsinteger· uint64min 0
    • typestring

      Worker kind — `binary`, `image`, or `engine`.

    • versionstring

      Latest published version (worker-list) or the resolved version (worker-info, when called with `version` / `tag`).

directory::search_functions

function

Search available functions for one to six external capabilities; returns compact function-id candidates grouped by worker.

request
  • capabilitiesstring[]requiredmin 1 chars · 1…6 items

    One to six non-empty capability searches derived from the goal and current execution state. For one search at each decision point, include all unmet external capabilities once. Exclude intrinsic reasoning, summarization, planning, or formatting, and do not repeat needs already represented or satisfied. Requests to summarize provided text or content are ignored. Write every entry in English, translating non-English user requests while preserving proper names, URLs, and function IDs.

response
  • guidancestringrequired
  • installableobject[]required

    Matching registry workers from verified authors. Their functions are NOT callable until the worker is installed.

    • descriptionstringrequired
    • functionsobject[]required

      Compact candidates only. After installation, search again and fetch selected contracts through `engine::functions::info`.

      • descriptionstringrequired

        First description sentence, capped at 160 bytes.

      • function_idstringrequired
    • installall ofrequired

      The `compose::add` target and payload; agent-trigger callers add `description`.

      all of (1)
      variant 1
      • functionstringrequired
      • payloadunknownrequired
    • namestringrequired
    • versionstringrequired
  • latency_msnumber· doublerequired
  • workersobject[]required
    • functionsobject[]required
      • descriptionstringrequired

        First description sentence, capped at 160 bytes.

      • function_idstringrequired
    • namespacestringrequired

directory::skills::create

function

Create a NEW filesystem-backed skill at <skills_folder>/<id>.md from full-file markdown content (frontmatter optional; only the size cap and a non-empty body are enforced, same as directory::skills::update). Rejects ids that already exist anywhere in the visible skill set (including system-installed agents skills), a target path that already exists on disk (even one the scanner would skip), ids in a namespace reserved by a system-installed agents skill, and — when filter_unregistered is on — ids the visibility filter would immediately hide. The write is atomic and fans out directory::skills::on-change with { op: "create" }. Use directory::skills::update to edit existing skills.

request
  • contentstringrequired

    FULL file content, frontmatter block included — the same form `directory::skills::update` takes. Frontmatter is optional for skills; only the size cap and a non-empty body are enforced.

  • idstringrequired

    New skill id — becomes the file path (`<skills_folder>/<id>.md`), so it may contain `/`-separated segments (`[a-z0-9_-]` each). Must not collide with an existing visible skill (including system-installed agents skills) or an on-disk file at the target path.

response
  • bytesinteger· uintrequiredmin 0

    Bytes written.

  • function_idstring

    Frontmatter `function_id:` of the content, `null` when absent.

  • idstringrequired

    The created skill's id (normalized form of the input id).

  • modified_atstringrequired

    File mtime after the write, RFC 3339.

  • titlestringrequired

    Title resolved from the content (frontmatter `title:`, then `name:`, then body H1, then the id) — what `list` rows will show.

  • typestring

    Frontmatter `type:` of the content, `null` when absent.

directory::skills::delete

function

Permanently delete one EXISTING filesystem-backed skill by id. Accepts the same id forms as directory::skills::get, resolves against the same visible set as directory::skills::list, refuses read-only system-installed skills under agents_skills_folder, removes only that skill's markdown file (plus any parent directories the removal left empty), and fans out directory::skills::on-change with { op: "delete" }.

request
  • idstringrequired

    Existing skill id — the same forms `directory::skills::get` accepts (bare id, `<id>.md`, `SKILL(S).md`, `iii://<id>`).

response
  • idstringrequired

    Id of the skill whose file was removed — the RESOLVED on-disk id (e.g. `ns/index` for input `ns`), not the input form.

directory::skills::download

function

Download skills into skills_folder from EITHER source. Prefer the explicit directory::skills::download_from_registry / directory::skills::download_from_repo, whose schemas can't be mixed up. Pass {repo, skill, branch?} to clone one skill folder from a GitHub repo (branch defaults to "main"), or {worker, version?|tag?} to pull from the workers registry (tag defaults to "latest"). Specify exactly ONE source set. Files in the destination namespace are overwritten file-by-file.

request
  • branchstring

    Source A: branch to clone. Defaults to `"main"`. Pass `"master"` (or any other branch name) for repos whose default branch is not `main`.

  • repostring

    Source A: GitHub repo URL. Pair with `skill`.

  • skillstring

    Source A: subfolder under `skills/` inside the repo. Doubles as the destination namespace inside `skills_folder`.

  • tagstring

    Source B: registry tag to pull (e.g. `latest`). Mutually exclusive with `version`. Defaults to `"latest"` when neither `version` nor `tag` is provided.

  • versionstring

    Source B: explicit semver to pull. Mutually exclusive with `tag`.

  • workerstring

    Source B: workers registry name. Pair with exactly one of `version` / `tag`.

response
  • agents_writtenstring[]required
  • namespacestringrequired
  • skills_writtenstring[]required
  • sourceunknownrequired
  • system_prompts_writtenstring[]required

directory::skills::download_from_registry

function

Download one worker's directory bundle from the workers registry into skills_folder. `worker` is required; pass either `version` (exact semver) OR `tag` (e.g. "latest", the default when both are omitted), not both. Files in the destination namespace are overwritten file-by-file. A missing worker returns a `D310 not_found` naming the next function to call. To pull from a GitHub repo instead, use directory::skills::download_from_repo.

request
  • tagstring

    Registry tag to pull (e.g. `"latest"`). Mutually exclusive with `version`. Defaults to `"latest"` when neither is provided.

  • versionstring

    Explicit semver to pull. Mutually exclusive with `tag`.

  • workerstringrequired

    Worker name in the registry (e.g. `"shell"`).

response
  • agents_writtenstring[]required
  • namespacestringrequired
  • skills_writtenstring[]required
  • sourceunknownrequired
  • system_prompts_writtenstring[]required

directory::skills::download_from_repo

function

Download one skill folder from a GitHub repo into skills_folder. `repo` (the repo URL) and `skill` (the subfolder under `skills/`, which also names the destination namespace) are required; `branch` defaults to "main". The repo URL is validated (https / ssh / git@ only). To pull a published worker instead, use directory::skills::download_from_registry.

request
  • branchstring

    Branch to clone. Defaults to `"main"`.

  • repostringrequired

    GitHub repo URL (validated: https / ssh / git@ only).

  • skillstringrequired

    Subfolder under `skills/` inside the repo. Doubles as the destination namespace inside `skills_folder`.

response
  • agents_writtenstring[]required
  • namespacestringrequired
  • skills_writtenstring[]required
  • sourceunknownrequired
  • system_prompts_writtenstring[]required

directory::skills::get

function

Fetch one filesystem-backed skill by id and return its raw markdown body plus id, title, type, function_id, and modified_at. A worker overview is addressed by the bare worker name (e.g. "iii-sandbox") — that is the id `list`/`index` hand back. Input is forgiving: "iii-sandbox/index", "iii-sandbox/SKILL.md", a trailing ".md", and an iii:// prefix all resolve to the same overview; and if the exact id misses, the worker name is matched case-insensitively as a substring ("sandbox" finds "iii-sandbox"). `title` prefers frontmatter `title:` over the body H1; `type` is the frontmatter `type:`. There is no `description` field here (the body already opens with that paragraph) — use directory::skills::list for the teaser-only view. On a miss you get a `D110 not_found` message naming the closest ids and the next function to call.

request
  • idstringrequired

    Skill id (the same string returned by `directory::skills::list`, e.g. `"directory/skills/list"`). Two ergonomic variants are also accepted: the file-path form `<id>.md` (the trailing `.md` is stripped) and the legacy `iii://{id}` URI form. Other URI schemes are rejected. The filename `SKILLS.md` is aliased to `index.md` to match the filesystem scanner.

  • rawboolean

    When `true`, the response includes the FULL on-disk file content (frontmatter block included) as `raw`. For editors that need to round-trip the exact file (`directory::skills::update` takes the same full-file form); agent readers should leave this unset and use `body`.

response
  • bodystringrequired

    Raw markdown body (post-frontmatter) from disk. Note: there is no `description` field. `description` is the body's first paragraph, which is already inside `body` — every caller asking for the body would otherwise pay for the prefix twice. Use `directory::skills::list` rows when you want the teaser without the full body.

  • disable_model_invocationbooleanrequired

    Whether model-facing indexes should omit this skill from invocation candidates.

  • function_idstring

    Frontmatter `function_id:` when present — the canonical bus function id this skill documents (e.g. `sandbox::create`). The response's `id` field is the SKILL path on disk; `function_id` is what the agent should pass to `agent_trigger`. `null` when the skill isn't 1:1 with a single function.

  • idstringrequired
  • modified_atstringrequired

    File mtime as RFC 3339.

  • pathstringrequired

    Absolute on-disk path of the skill file. Its parent directory is the skill's base directory — where payload the body references by relative path (`scripts/`, `reference/`, agent-skills convention) lives. Only meaningful to callers sharing this worker's filesystem (shell/file tools on the same machine).

  • rawstring

    FULL on-disk file content (frontmatter block included). Present only when the request set `raw: true`. This is the exact string to hand back to `directory::skills::update`; fallback notes that `get` may prepend to `body` are never added here.

  • titlestringrequired

    Frontmatter `title:` when present and non-empty, otherwise the first `# H1` line in the body, otherwise the bare `id`.

  • typestring

    Frontmatter `type:` (e.g. `index`, `how-to`, `reference`). `null` when the file has no frontmatter or omits the key.

directory::skills::index

function

Render a per-WORKER overview: one short markdown block per installed worker (each worker's root overview doc `<ns>/index`, whether or not it declares frontmatter `type: index`). Each block is a `## <worker title>` heading, the first paragraph of that worker's overview, and a `directory::skills::get` call to read the full reference. Token-light by design and intended for system-prompt injection; for individual per-SKILL rows call directory::skills::list.

request
empty object
response
  • bodystringrequired

    Rendered markdown document — one short `## <title>` block per installed worker (each worker's root overview doc, whether or not it declares frontmatter `type: index`), carrying the worker's first-paragraph overview and a `directory::skills::get` call to read the full reference. Sorted lex by id.

  • workers_countinteger· uintrequiredmin 0

    Number of worker entries rendered (i.e. the count of worker overview rows that survived the filter). Cheap sanity check that doesn't require re-parsing the body.

directory::skills::list

function

List skills as one row PER SKILL (id, title, type, function_id, disable_model_invocation, description, bytes, modified_at) from skills_folder — use this when you need individual skill ids. A worker overview row's `id` is the bare worker name (e.g. `iii-sandbox`); pass it straight to directory::skills::get. For a per-WORKER overview instead, call directory::skills::index. Filters: `search` (case-insens. substring vs id+title+description), `prefix` (worker-namespace prefix; matches the overview row and its sub-skills), `type` (exact frontmatter type match). Pass `include_description: false` for token-light id+title+type rows (default: descriptions included). `title` prefers frontmatter `title:` over the body H1. Each row's `function_id` is the callable bus id (e.g. `sandbox::create`) — pass THAT to agent_trigger, not the row's `id` (which is a documentation address).

request
  • include_descriptionboolean

    When `false`, the response omits the first-paragraph `description` field on every row. Useful for token-light pickers that only need `id` + `title` + `type`. Default `true`.

  • prefixstring

    Exact prefix match against `id`. Combine with `search` to scope a fuzzy match to one worker namespace, e.g. `prefix: "sandbox/"`.

  • searchstring

    Case-insensitive substring match against `id`, `title`, and (when `include_description` is true) the first body paragraph. Omitted rows are filtered out cheaply on the FsSkill { id } pass before the per-file frontmatter read, so a narrowed list is dramatically cheaper for the caller than the unfiltered one.

  • typestring

    Exact match against the frontmatter `type:` field (`index`, `how-to`, `reference`, ...). `null` for entries with no frontmatter `type:`.

response
  • skillsobject[]required
    • bytesinteger· uintrequiredmin 0
    • descriptionstringrequired

      First paragraph of the body, empty when the file has only headings. Also empty when the caller passed `list { include_description: false }` for a token-light row.

    • disable_model_invocationbooleanrequired

      Whether model-facing indexes should omit this skill from invocation candidates.

    • function_idstring

      Frontmatter `function_id:` when present — the canonical bus function id this skill documents (e.g. `sandbox::create`). The row's `id` field is the SKILL path on disk (e.g. `sandbox/skills/sandbox/create`); `function_id` is what an agent should pass to `agent_trigger`. `null` for skills that aren't 1:1 with a single function (index/reference).

    • idstringrequired
    • modified_atstringrequired

      File mtime as RFC 3339 (best effort; empty if unavailable).

    • titlestringrequired

      Frontmatter `title:` when present and non-empty, otherwise the first `# H1` line in the body, otherwise the bare `id`.

    • typestring

      Frontmatter `type:` (e.g. `index`, `how-to`, `reference`). `null` when the file has no frontmatter or omits the key.

directory::skills::update

function

Overwrite one EXISTING filesystem-backed skill with new full-file markdown content (frontmatter block included — pass back the `raw` field from directory::skills::get { raw: true }, edited). Accepts the same id forms as `get`. Never creates files (use directory::skills::create to author one, or directory::skills::download to materialize a bundle). Refuses read-only system-installed skills under agents_skills_folder. Content is validated against the read invariants (size cap, non-empty body after frontmatter); the write is atomic and fans out directory::skills::on-change with { op: "update" }.

request
  • contentstringrequired

    FULL new file content, frontmatter block included — the string `directory::skills::get { raw: true }` returns, edited.

  • idstringrequired

    Skill id to overwrite — the same forms `directory::skills::get` accepts (bare id, `<id>.md`, `SKILL(S).md`, `iii://<id>`). The target file must already exist; update never creates skills.

response
  • bytesinteger· uintrequiredmin 0

    Bytes written.

  • function_idstring

    Frontmatter `function_id:` of the new content, `null` when absent.

  • idstringrequired

    The id that was updated (normalized form of the input id).

  • modified_atstringrequired

    File mtime after the write, RFC 3339.

  • titlestringrequired

    Title resolved from the NEW content (frontmatter `title:`, then body H1, then the id) — what `list` rows will now show.

  • typestring

    Frontmatter `type:` of the new content, `null` when absent.

directory::system-prompts::create

function

Create a NEW system prompt at <skills_folder>/system-prompts/<name>.md from full-file markdown content (frontmatter block included; a non-empty `description` is required, and a declared frontmatter `name` must match the requested name). Rejects names that already exist anywhere in the merged system-prompt scan, or a target path that already exists on disk (even one the scanner would skip). The write is atomic and fans out directory::system-prompts::on-change with { op: "create" }. Use directory::system-prompts::update to edit existing system prompts.

request
  • contentstringrequired

    FULL file content, frontmatter block included — the same form `directory::system-prompts::update` takes. Frontmatter must carry a non-empty `description`; a declared `name` must match the requested name.

  • namestringrequired

    New system prompt name — becomes the file stem `<skills_folder>/system-prompts/<name>.md`. Same charset rules as list/get names; must not collide with an existing system prompt.

response
  • bytesinteger· uintrequiredmin 0

    Bytes written.

  • descriptionstringrequired

    Description parsed from the frontmatter.

  • modified_atstringrequired

    File mtime after the write, RFC 3339.

  • namestringrequired

    The created system prompt's name (as requested).

directory::system-prompts::delete

function

Permanently delete one EXISTING filesystem-backed system prompt by name. Resolves against the same merged scan as directory::system-prompts::list, removes only that prompt's markdown file, and fans out directory::system-prompts::on-change with { op: "delete" }.

request
  • namestringrequired

    Existing system prompt name, as returned by `directory::system-prompts::list`.

response
  • namestringrequired

    Name of the system prompt whose file was removed.

directory::system-prompts::get

function

Fetch one system prompt by name — a filesystem-backed entry, or a worker-bundled one (`builtin: true`) when no local file shadows it. Returns the raw markdown body plus name, description, and modified_at — no envelope, no templating.

request
  • namestringrequired
  • rawboolean

    When `true`, the response includes the full on-disk file content (frontmatter included) as `raw`, ready for `directory::system-prompts::update`.

response
  • bodystringrequired
  • builtinbooleanrequired

    Served from the copy bundled with the worker (no local file yet): an update creates the local file.

  • descriptionstringrequired
  • modified_atstringrequired
  • namestringrequired
  • rawstring

directory::system-prompts::list

function

List system prompts (name, description, modified_at): filesystem-backed entries from skills_folder (`system-prompts/` path segment) plus the prompts bundled with this worker. A bundled prompt with no local file carries `builtin: true` — editing it via directory::system-prompts::update creates the local file, which then shadows the bundled copy.

request
empty object
response
  • promptsobject[]required
    • builtinbooleanrequired

      Bundled with the worker, no file behind it: editing it creates the local file (which then shadows this entry); there is nothing to delete.

    • descriptionstringrequired
    • modified_atstringrequired
    • namestringrequired

directory::system-prompts::update

function

Overwrite one EXISTING filesystem-backed system prompt with new full-file markdown content. Updating a worker-bundled prompt (`builtin: true` in the list) that has no local file yet copy-on-writes that file, which then shadows the bundled copy. The frontmatter must keep a non-empty `description` (and a valid `name` when it declares one) — the same rules the scanner enforces, so an update can never produce a file the next directory::system-prompts::list would skip. The write is atomic and fans out directory::system-prompts::on-change with { op: "update" }. Returns the system prompt's effective name after the write (frontmatter `name:` wins over the file stem).

request
  • contentstringrequired

    FULL new file content, frontmatter block included. The frontmatter must keep a non-empty `description` — a system prompt without one would be skipped by the next scan.

  • namestringrequired

    System prompt name to overwrite, as returned by `directory::system-prompts::list`. The target file must already exist — except for a worker-bundled prompt (`builtin: true` in the list), where the update copy-on-writes the local file that then shadows the bundled copy.

response
  • bytesinteger· uintrequiredmin 0

    Bytes written.

  • descriptionstringrequired

    Description parsed from the new frontmatter.

  • modified_atstringrequired

    File mtime after the write, RFC 3339.

  • namestringrequired

    The system prompt's EFFECTIVE name after the write: the new frontmatter `name:` when declared, otherwise the file stem. Differs from the input name when the update renames the system prompt.

iii-directory::ui-content

function

Serve the iii-directory worker's injected console UI assets (content function for its console:script / console:style triggers).

request
  • pathstringrequired

    The asset path from the trigger config (e.g. `state/page.js`).

response
  • contentstringrequired

    The asset source, verbatim.

  • content_typestringrequired

    MIME type the console should serve the asset with.

triggers

3

directory::agents::on-change

trigger

Fires after a directory::skills::download that wrote at least one agent profile, or a directory::agents::update, create, or delete. Also fires with { op: "external" } when a watched agents file changes on disk outside this worker.

invocation
valueunknown
return
valueunknown

directory::skills::on-change

trigger

Fires after a directory::skills::download that wrote at least one skill markdown file, or a directory::skills::update, create, or delete. Also fires with { op: "external" } when a watched skills root changes on disk outside this worker — including the read-only agents skills root, when that root exists at startup.

invocation
valueunknown
return
valueunknown

directory::system-prompts::on-change

trigger

Fires after a directory::skills::download that wrote at least one system prompt, or a directory::system-prompts::update, create, or delete. Also fires with { op: "external" } when a watched system-prompts root changes on disk outside this worker.

invocation
valueunknown
return
valueunknown