Skip to content

feat(dispatch): /dispatch structured-output handler + kata first-party plugin (kata-ai/v1) - #10

Merged
DojoGenesis merged 4 commits into
mainfrom
feat/dgs-149-dispatch
Oct 2, 2026
Merged

DojoGenesis merged 4 commits into
mainfrom
feat/dgs-149-dispatch

Conversation

@DojoGenesis

Copy link
Copy Markdown
Owner

Implements DGS-149 (scout Route B via D).

What's added

  • POST /dispatch and POST /v1/dispatch, behind AuthMiddleware.
  • A dispatch registry. Structured ops load from plugins/kata/skills/*/SKILL.md (kind: structured).
  • Execution:
    • calls the provider directly with system = SKILL body and user = input JSON
    • one forced emit_result tool (tool_choice: required)
    • no system/RAG injection (X-Dojo-Injected: none)
    • validates against the output schema plus the contract shame-lint
    • returns {output, provenance{skill, skill_version, contract, model, request_id, generated_at}, usage}
  • Error contract: 400 invalid_request/invalid_input/subject_mismatch, 404 unknown_skill, 422 unsupported_contract, 502 invalid_model_output (all with X-No-Retry), and 503 provider_unavailable (retriable).
  • plugins/kata/: 13 prompts (bilingual, user input treated as data, memory off in v1). Names are added to reserved-names.txt.
  • plugins/kata/contracts/kata-ai/v1 is vendored from DojoGenesis/kata (bde2add) with SOURCE and MANIFEST.sha256.
  • Schema loader: pre-registers on-disk schemas by $id so local $ref resolves. No network fetch.
  • New dependency: github.com/santhosh-tekuri/jsonschema/v6 v6.0.3.

Blocked: kata-memory-write and kata-account-delete are registered but return 501, because the memory store has no per-user scoping (DGS-163).

Tests: green across the root, server and integration modules. Includes a fixture eval (13 ops / 26 fixtures / 107 invalid cases), all-ops-load, a manifest check, no-injection assertions, and the 401/400/404/422/502/503 paths.

Not done:

  • Never run against a real model.
  • Not deployed. Merging to main does not deploy the prod gateway.
  • Set KATA_DEFAULT_MODEL before deploying; otherwise resolveProvider falls back to the first provider.

Refs DGS-149, DGS-150

🤖 Generated with Claude Code

TresPies-source and others added 4 commits October 2, 2026 15:03
…dlers (DGS-149, DGS-150)

Structured ops (kind: structured SKILL.md under KATA_PLUGIN_DIR) dispatched via the provider layer directly with a forced emit_result tool; input/output JSON Schema (draft 2020-12) + contract shame-lint. kata-memory-write / kata-account-delete are registered but answer 501: the memory store has no per-user scoping (DGS-150 blocked pending operator ruling). subject_mismatch is 400 per integrator amendment.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…uard op loading (DGS-149)

- plugins/kata/contracts/kata-ai/v1 vendored from DojoGenesis/kata
  feat/dgs-149-kata-ai-v1-contracts (bde2add) with SOURCE + MANIFEST.sha256.
- Schema loader pre-registers *.schema.json from the schema's directory up to
  the plugin root, keyed by $id, so input schemas that $ref _defs by absolute
  $id resolve. Nothing is fetched; a $ref not on disk still fails.
  Before this, kata-ai-task-chain and kata-ai-optimize-project were logged
  and silently skipped at boot (11/13 ops loaded).
- TestKataPluginLoadsAllOps: every skills/ dir must register (the skip-on-
  malformed boot path is otherwise invisible).
- TestKataContractManifest: vendored files must match MANIFEST.sha256.
- TestCompileSchemaFile_LocalRefsOnly: local $id resolves, remote does not.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@DojoGenesis
DojoGenesis merged commit 23f5745 into main Oct 2, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants