8000 Write the "tool contract": a standard interface for layering any tool onto any agent, derived from real-world usage · Issue #184 · simon-inkie/inkie-deck · GitHub
[go: up one dir, main page]

Skip to content

Write the "tool contract": a standard interface for layering any tool onto any agent, derived from real-world usage #184

Open

Description

@simon-inkie

Original-derived Linear description

the maintainer, dictated, 2026-08-20, reacting to planner's composability audit (see full report at ~/brain/projects/2026-08-20-deepseek-harness-mc-integration.md, "FOLLOW-UP" section).

His words

"I like the idea of us being able to define our own tools, [have] a standard contract which we can just layer tools onto any of our agents. That would be epic. It'd be great if we could look at layering that interface over the ones we have already, and how we use the ones we have already and how they're used, and design in our interfaces based off of these, which are in real world use right now. This could come later, but let's create a ticket for this, I think this is quite exciting."

What planner already found (don't rediscover)

The estate already converged on two consistent patterns without ever naming either:

  • Pattern A (standalone CLI): identity via AGENT_NAME, config as a dotfile in ~/agents/<name>/, operator-provided secrets, stdin/stdout JSON interface, exit codes mirror the verdict, fail-closed. pgr, the inbox CLI, activity, gen all conform already.
  • Pattern B (runtime-agnostic core + adapters): for anything that must hook into a runtime's own extension surface. io-auto-mode and the-brain memory both independently grew adapters/<runtime>/ directories for the same runtime set (claude-code, codex, cursor, antigravity, openclaw). io-auto-mode's OpenClaw adapter already has a literal plugin manifest (openclaw.plugin.json) with a config schema, live today.

Every existing tool already conforms to one of these two patterns. Nothing needs re-architecting.

The actual work (per the maintainer's framing: derive the contract FROM existing tools, don't design it in the abstract)

  1. Write the one-page "tool contract" doc: identity, config location, env, interface, failure mode, and (for Pattern B) the adapter-isolation rule.
  2. Layer/validate it against every existing tool (pgr, io-auto-mode, inbox CLI, the-brain memory, activity, gen, 9Router, model-catalog.json) to confirm each genuinely conforms as-is, and fix anything that's a near-miss.
  3. Natural home: ~/oss/inkie-deck/packages/base/docs/, next to protocol.md/conformance.md, which already made this exact move for the message substrate.

What NOT to build (planner's explicit verdict)

No loader, no dependency manager, no daemon registry, no machine-readable manifest yet. Three of the remaining examples are already standalone shippable repos (~/oss/inkie-the-brain, ~/oss/inkie-agents-base, ~/git-repos/inkie-pgr); a framework would be ceremony at this scale. A real manifest/registry is a separate, deferred piece with its own trigger: build it when a new runtime (e.g. a future DeepSeek Harness agent, see [INK integration doc]) needs to self-discover its toolset, or when Deck OSS wants third-party tools visible in the UI.

Status

Not urgent, the maintainer's own framing: "this could come later," but he wants it ticketed and tracked rather than left in the vault only.

Follow-up connection, same day

the maintainer, dictated immediately after filing: "if we could add an LLM/harness as a plugin, that would be very cool because that means it opens it up to pretty much anything then if we use a standard interface."

This connects to the primary DeepSeek Harness integration work (same vault doc, primary section): planner's dsh MVP proposal already names a "pane contract" as the runtime-side counterpart to this ticket's tool-side contract (launch / resume / deliver / idle-probe / transcript-read / model-catalog). Worth scoping this ticket's contract doc alongside that one rather than in isolation, so a new runtime (dsh, or any future LLM/harness) and a new tool both onboard through the same documented pattern rather than two unrelated efforts. Tools and runtimes are structurally different (a tool is called OUT to; a runtime HOSTS agent execution), so this is not literally one shared interface, but the two contracts should be designed together and cross-reference each other.

Reference: DeepSeek's actual plugin config shape

the maintainer shared https://deepseek-harness.github.io/deepseek-harness/en/reference/config-catalog directly, worth reading when scoping this. Their shape, for comparison against our own conventions above:

  • Each plugin entry: an identifier (e.g. @deepseek-ai/dsh-agent-loop), a "Requires:" list of service dependencies (e.g. agents, sessions, llm), a TypeScript interface defining its config shape with JSDoc, and a source-location pointer.
  • Categorised functionally: core orchestration (agent-loop, sessions, persistence), LLM integration (llm-deepseek, llm-replay, llm-retry), execution (bash-local, pwsh-local), tools & skills (tool-bash, skill-filesystem, mcp-client), storage & state (session-persistence-jsonl, session-query-sqlite), UI/access (host-apiproxy, frontend-static), policy (sandbox-policy, permission-presets, approval), context (agent-instructions, file-reference-local).
  • Layered config: presets (bundles) -> profiles (inherit from defaults) -> home directory (overrides deployment values) -> CLI overlays (runtime adjustments). Their own principle worth noting: "a field the runtime schema deliberately excludes is a runtime-only seam... not settable from cordis.yml" - i.e. they deliberately don't expose every internal knob, only genuinely deployable concerns.

Useful as a comparison point, not a template to copy: their scale (dependency-injected kernel, TypeScript-typed plugin interfaces) is heavier than our ~10-tool, one-operator estate needs, per planner's verdict above. But the categorisation scheme and the deliberate internal-vs-deployable-surface distinction are worth stealing even if the mechanism isn't.

Origin

Migrated from Linear: INK-808. Original detail is retained apart from the disclosed privacy and rendering edits.

Current scope and qualifications

The account above is historical, not a fresh claim that every described defect still exists. Current Linear state: Backlog. Prior source review: uncertain; remaining checks or work:

  • Obtain full accepted derived-tool contract and per-tool validation before calling complete.

Publication transfers tracking only. Original implementation/approval/freeze and acceptance gates remain; no live deployment, configuration, external messaging or provider spending is authorised.

Transfer edits

  • Historical people/fleet prose is aliased; permitted source links and code/path references remain.
  • Linear rich embeds and public punctuation are normalised where present.
  • Omit the excluded tool example.
  • Omit the excluded tool validation leg.
  • Omit its source reference and adjust the example count.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    deck-uiDeck web UIenhancementNew feature or requestmajor-featureA substantial feature or new capability

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      0