feat(cli): introduce CNC Agent Protocol v1 - #1483
Draft
yyyyaaa wants to merge 20 commits into
Draft
Conversation
Introduce registry-backed command contracts, schema validation, bindings, redaction, structured rendering, discovery, documentation projections, cancellation, and stable execution outcomes for reusable CLI operations.
Give embedded cache, schema, bucket, and presigned-upload services explicit instance ownership so concurrent CLI operations do not share or evict one another's state. Add ownership and configuration coverage for the new factories.
Thread explicit environment, cache, diagnostic, and lifecycle ownership through embedded GraphQL and Graphile services. Scope logger suppression to the current async operation and keep public-key signature authentication fail-closed.
Make source resolution cancellable and explicit, enforce declarative config safety, plan generated ownership before writes, preserve sensitive-value boundaries, and return structured artifacts suitable for registry-backed CLI execution.
Route context, authentication, GraphQL execution, codegen, server, explorer, and jobs through typed operations. Add deterministic discovery, strict agent-mode bindings, atomic state handling, service adapters, structured output, and compatibility-preserving human rendering.
Describe the command registry as the implementation authority, publish the structured invocation contract, and update human and agent guidance for discovery, state, GraphQL, codegen, and service operations.
Pack the complete CNC release set once and exercise engine-strict installations, CJS and ESM exports, both binaries, structured output, exit semantics, cancellation, lifecycle events, and signal cleanup across supported Node versions.
yyyyaaa
force-pushed
the
yyyyaaa/agentic-cnc-cli-audit
branch
from
August 20, 2026 10:24
17c29bb to
b2b298a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Important
This remains a draft while CI validates the port-forwarded release boundary. The previous 30-path conflict set is resolved: this branch is now based directly on
origin/mainatf9611d3a1.Summary
This PR introduces CNC Agent Protocol v1 (
constructive.dev/cli/v1) and moves the current CNC command surface onto a Constructive-owned, registry-backed runtime:The protocol provides validated JSON/JSONL output, stable exits (
0,1,2,70,130), cancellation, recursive redaction, explicit execution context, and noninteractive agent behavior. Structured stdout contains protocol data only and structured stderr remains empty.Port-forward decisions
The branch was rebased and reconciled onto current main instead of resolving the old merge mechanically.
constructive-db; this PR does not revive deleted code or publish a falsejobs upcapability.jobs upis unavailable through the registry.graphql/server.Protocol and safety guarantees
operation.started, validated domain events, and exactly one terminal event.process.exit/process.chdir, or read ambient state.Thermonuclear maintainability review
The post-port review covered every new agentic CNC surface and led to concrete decomposition before this update:
No reviewed new production file remains above 700 lines, and targeted ESLint is clean.
Compatibility and release boundary
@constructive-io/cli-runtime@0.1.0@constructive-io/cli@8.16.3@constructive-io/graphql-codegen@5.18.3CAPABILITY_UNAVAILABLEwhen absent.lru-cachev10 because v11 requires Node 20 and would violate the CLI's declared Node 18.17 floor.Verification
git diff --check, targeted ESLint, and signed-commit verificationThe MinIO-backed presigned integration suite could not run locally because no MinIO service was listening; its 54 service-independent tests pass. GitHub's main CI jobs are draft-gated and were skipped, so the PR remains draft pending review and the decision to trigger the full remote matrix.
Review order
packages/cli-runtime/src: protocol contracts, validation, execution, redaction, and discovery.packages/cli/src/runtimeandpackages/cli/src/config: registry adapters, state/auth boundaries, and services.graphql/codegen/src/core: planning, ownership, locking, transaction, and rollback..github/workflows/run-tests.yamland packed acceptance scripts.Explicit non-goals
csdkmigration