Skip to content

v0.33.0

Choose a tag to compare

@MarkKropf MarkKropf released this 07 Jun 05:15
0edd0d1

One-shot / structured-completion lane (P4a)

Adds the schema-constrained, non-interactive completion primitive (agent/oneshot.go) — the shared lane behind KG-extraction and arch-intel drift (re-homed in a later phase).

  • OneShotProvider interface (Complete(ctx, OneShotRequest) (OneShotResult, error)).
  • SpawnComplete(ctx, HarnessProvider, req) — the free SOFT-JSON lane any harness gets: spawn → drive to terminal → accumulate complete-message text → extract + validate. A failure/error/no-terminal session is an error; a successful-but-unparseable result is the SchemaOK=false validate-repair-drop signal.
  • Prose/fence-tolerant balanced-JSON extraction (string/escape aware, retries past false-start openers); jsonschema/v6 validation (fail-closed).
  • ctx-aware drain so a hung harness can't pin Complete.

Purely additive — no existing contract changed; the capability matrix is unchanged. Keyed cells will override Complete with endpoint-native strict structured in a follow-up. New dep: github.com/santhosh-tekuri/jsonschema/v6 (pure-Go).

Built/tested with GOWORK=off (go test -race ./..., golangci-lint clean).