glas-harness/docs/channel-contract.md
tegwick 1cd890d871
All checks were successful
CI Smoke / host-smoke (push) Successful in 0s
CI Smoke / container-smoke (push) Successful in 1s
feat: add versioned execution profiles
2026-08-21 00:21:53 +02:00

1.2 KiB

Channel contract

A channel translates an external invocation into profile-driven gateway input; it does not select a rein class or execute a provider itself.

@dataclass
class GatewayInvocation:
    harness_profile: str
    repo: str
    title: str
    description: str
    actor: str = "agt"
    project: str = "glas-harness"
    report_to_hub: bool = True

CLIChannel is the current implementation. The CLI requires --harness-profile <id[@version]>; the old sandbox-only input is removed because it could not identify the rein, model route, tool policy, or contract revision. Channels may obtain a profile choice from their own approved configuration, but must pass it explicitly and must surface resolution refusal to their caller.

The channel renders the full direct GatewayResult. State Hub receives only the compact ExecutionEvidence subset.

Adding a channel

Implement parse_invocation and render_result, then call run_execution with an ExecutionRequest. Carry any assignment/role/duty/goal/resource references supplied by the upstream workforce system. Do not duplicate profile resolution, sandbox coordination, leadership decisions, or rein construction in the channel.