Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
0eb3819
docs: define Task 3C mobile-first provider contracts (#317)
adrianwebb Oct 25, 2026
0951d6a
docs: map human command results to reusable UI models (#317)
adrianwebb Oct 25, 2026
70d8a06
test: require reusable structured human output from built executable …
adrianwebb Oct 25, 2026
20a813f
feat: render human CLI results through reusable Cordis UI providers (…
adrianwebb Oct 25, 2026
6dc619d
docs: require positive built extensible plan gate on qualified CI (#317)
adrianwebb Oct 25, 2026
a79e4bc
test: require real extensible planning in qualified built CLI gate (#…
adrianwebb Oct 25, 2026
222211b
chore: inherit generic CLI program gate candidate (#317)
adrianwebb Oct 25, 2026
b89bfa0
docs: qualify CLI with current public owner archives (#317)
adrianwebb Oct 25, 2026
a503347
test: select current standalone CLI candidate version (#317)
adrianwebb Oct 25, 2026
9a273eb
chore: qualify CLI with current public owner archives (#317)
adrianwebb Oct 25, 2026
4cfba9e
docs(cli): specify built format3 installed-operation qualification (#…
adrianwebb Oct 25, 2026
923ab97
test(cli): exercise compiled format3 installed operations (#317)
adrianwebb Oct 25, 2026
672f76b
test(cli): keep worker cleanup bound to the observed executable (#317)
adrianwebb Oct 25, 2026
ff5ee5b
docs: define installed plugin commands and restart scopes (#317)
adrianwebb Oct 26, 2026
335035c
test: require safe built plugin command envelopes (#317)
adrianwebb Oct 26, 2026
8064a0e
test: require safe provider JSON and explicit restart parsing (#317)
adrianwebb Oct 26, 2026
c44773a
test: exercise real plugin installation through the built CLI (#317)
adrianwebb Oct 26, 2026
1a04c4c
feat: route plugin commands through the installed manager (#317)
adrianwebb Oct 26, 2026
7ae6dcc
fix: consume race-safe installed transport for plugin commands (#317)
adrianwebb Oct 26, 2026
39fe16d
docs: define final source and live CLI qualification (#317)
adrianwebb Oct 26, 2026
aec3478
test: exercise built Git plugin commands through public fixtures (#317)
adrianwebb Oct 26, 2026
9ffee6c
test: require live probe command activation and offline replay (#317)
adrianwebb Oct 26, 2026
4320a84
build: consume qualified source and live deployment archive (#317)
adrianwebb Oct 26, 2026
058555f
docs: qualify source-free built provider selection and ambiguity refu…
adrianwebb Oct 26, 2026
40ed4b2
test: exercise offline registered selections through the built comman…
adrianwebb Oct 26, 2026
653faf6
build: pin qualified final runtime for standalone CLI9 (#317)
adrianwebb Oct 26, 2026
7d94437
docs: bound source acquisition and registered command qualification (…
adrianwebb Oct 27, 2026
7b773b7
test: split registered source-off command scenes within existing budg…
adrianwebb Oct 27, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 34 additions & 4 deletions .github/workflows/verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,29 @@ on:
permissions:
contents: read
jobs:
verify:
runs-on: ubuntu-24.04
programs:
strategy:
fail-fast: false
matrix:
include:
- group: foundation
pattern: "^(unit:|integration:|smoke: (?!built CLI (installs|selects registered)))"
- group: npm
pattern: "^smoke: built CLI installs two typed"
- group: git
pattern: "^smoke: built CLI installs packaged"
- group: git-build
pattern: "^smoke: built CLI installs approved"
- group: git-registered
pattern: "^smoke: built CLI selects registered packaged"
- group: build-registered
pattern: "^smoke: built CLI selects registered built"
- group: live
pattern: "^smoke: built CLI installs and selects"
runs-on: ubuntu-26.04
timeout-minutes: 10
env:
CORDIS_REQUIRE_PLAN: '1'
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262
- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6
Expand All @@ -18,5 +38,15 @@ jobs:
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020
with:
node-version: 24.19.0
- run: bun install --frozen-lockfile
- run: bun run verify
- run: bun install --frozen-lockfile --ignore-scripts
- run: bun run check && bun run build
- run: bun test ./tests --timeout 60000 --test-name-pattern "${{ matrix.pattern }}"

verify:
if: always()
needs: programs
runs-on: ubuntu-26.04
steps:
- env:
RESULT: ${{ needs.programs.result }}
run: test "$RESULT" = success
19 changes: 19 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,27 @@

## [Unreleased]

### Changed
- Qualify built plugin commands against exact packaged Git, approved Git build and native live probe installation artifacts (#317).

### Added
- Expose native installed plugin management and explicit plan restart scopes using reusable UI presentation (#317).

### Added

- Qualify compiled format-3 installed operations through the public durable host (#317).

- Qualify extensible built CLI planning on Ubuntu 26.04 without runtime effects (#317).

### Changed
- Qualify CLI with exact current SDK UI and Deployment archives (#317).

- Render human command results through reusable UI providers and accept extensible plans (#317).

### Added

- Cli: deliver Task 3C typed providers and mobile-first UI integration (#317).

- Submit and observe durable installed applications (#315).
- Compose standalone CLI with native Cordis provider selection (#313).
- Expose non-activating platform plans (#311).
Expand Down
124 changes: 118 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
# Cordis diagnostic and planning executable
# Cordis executable

`trsd-linux-x64` is a standalone diagnostic and non-activating planning front door. Run it without Node/Bun or a
`trsd-linux-x64` is the standalone diagnostic, planning and installed-operation front door. Run it without Node/Bun or a
project checkout. Supported commands:

```text
trsd --help
trsd --version
trsd doctor [--json] [--context NAME] [--installation ABSOLUTE_PATH] [--port INTEGER]
trsd platform plan --file CONFIG [--json]
trsd platform apply --installation DIR --plan ID --digest SHA --idempotency-key KEY [--json]
trsd platform status --installation DIR [--json]
trsd platform application --installation DIR --id ID [--json]
```

`CliApplication` parses arguments and calls the public packaged `DeploymentHost` contract;
Expand All @@ -20,8 +23,18 @@ JSON stdout is exactly one envelope: command, success, result, problem, blockers
Doctor result follows the SDK DiagnosticReport schema. Human output uses concise checks;
human errors go to stderr. Errors never echo unknown argument values or raw Docker stderr.
Exit0 means success;1 runtime failure;2 invalid command/flag/value (with actionable help);
3 unmet prerequisites or explicitly unsupported lifecycle commands. `platform plan` is the only implemented platform binding; `apply`, `status`, `install`, `open`, `recover` and other lifecycle verbs remain unsupported. Remote SDK bindings remain contract-only.
Duplicate/missing flags and positional arguments fail validation. JSON is supported on doctor and platform plan, including validation failures. Version is `trsd 0.0.0-cordis.2`.
3 unmet prerequisites or explicitly unsupported lifecycle commands. Implemented platform bindings
are `plan`, `apply`, `status` and `application` read-back. Apply acknowledges durable acceptance;
application/status determine readiness. `plugin install`, `open` and `recover` remain unsupported
in this candidate. Remote SDK bindings remain contract-only.
Duplicate/missing flags and positional arguments fail validation. JSON is supported on doctor and
implemented platform commands, including validation failures. Version is `trsd 0.0.0-cordis.6`.

This candidate consumes exact SDK `.16`, UI `.16` and Deployment `.73` archives. Source/byte
receipts are recorded in `package.json.cordisCandidate`, the lockfile and vendor archives.
Human presentation stays UI-owned and machine envelopes/exit codes stay CLI-owned. Default
Deployment selects the saved installation format; format-3 application and readonly observations
use its native standalone host without an ambient Node/Bun/package manager during apply.

`CliProgramFixture.run(args)` spawns the compiled artifact with closed stdin, captures output
and exit status, and supports fixture cwd/environment. Acceptance covers another directory,
Expand Down Expand Up @@ -57,7 +70,7 @@ release. Migration PRs target `cordis`; issues remain open until authorized rele

## Task 2: non-activating plans

`trsd platform plan --file CONFIG [--json]` validates an explicitly prepared local release bundle. It never downloads, installs packages, imports plugin code, runs scripts, binds ports, loads images, creates credentials or starts containers. Apply remains unsupported. Successful plans describe future effects, not an active or healthy installation.
`trsd platform plan --file CONFIG [--json]` validates an explicitly prepared local release bundle. It never downloads, installs packages, imports plugin code, runs scripts, binds ports, loads images, creates credentials or starts containers. Planning reports future effects; explicit saved-plan apply is a separate installed operation.

Configuration retains installationId, engineContext, installationDirectory (absolute), origin (loopback), runtimeState, plugins (exact id/package/version/archive SHA-256) and credentialReferences (unique `secret://<slot>` values). Add `release: {directory: ABSOLUTE_PATH, manifestDigest: SHA256}`. The installation and bundle must be disjoint. JSON object keys and semantic sets normalize deterministically; artifact byte identities remain exact.

Expand All @@ -71,7 +84,7 @@ Plans bind normalized configuration, configuration/release/lock/recipe digests,

CLI exits: 0 verified saved plan; 1 sanitized runtime/I/O failure; 2 invalid arguments/JSON/schema; 3 prerequisites/artifact/authority/state blockers. Blocked responses have result null, structured blockers and no saved reference. Never echo invalid input, archive content, credentials or engine stderr. SDK PlanningBlockedError carries only validated safe blockers. Seven remote operation IDs remain unchanged; platform.plan stays a write operation because saving a plan needs local ownership.

Verification: documentation first; outside-in built-program failure before implementation; exact read-back/modes/determinism; immutable/architecture/graph/recipe/secret/path/journal negative cases; no-runtime snapshots; actual default construction; all owner check/build/unit/integration/smoke gates plus assembled acceptance. Test fixtures are not a production application composition. CI must run a positive plan on ubuntu-26.04 and fail visibly if prerequisites are absent. No container starts, even in tests.
Verification: documentation first; outside-in built-program failure before implementation; exact read-back/modes/determinism; immutable/architecture/graph/recipe/secret/path/journal negative cases; no-runtime snapshots; actual default construction; all owner check/build/unit/integration/smoke gates plus assembled acceptance. Test fixtures are not a production application composition. CI must run a positive plan on ubuntu-26.04 and fail visibly if prerequisites are absent. These Task 2 planning scenes start no containers. Task 3C installed-operation acceptance below uses isolated, disposable fixture services.

Tracked in #311; parent integration treeseed-ai/platform#697. Issues remain open until authorized release.

Expand Down Expand Up @@ -126,3 +139,102 @@ Task 3B is authorized after the maintainer reviewed the isolated setup. Tracking
Development: Bun 1.4.4, Node 24.19.0, TypeScript 5.9.3, native Cordis 4.0.0-rc.12. Run bun run verify (semantic class/source check, strict compiler, build and nonempty unit/integration/program smoke). Installed acceptance uses genuine exact package/OCI bytes, real identity/database/API/HTTPS and explicit isolated certificate trust. No global trust mutation or legacy service changes. All handwritten source, tools and tests are strict TypeScript classes.

All capabilities that can be plugins, including container services, are native Cordis class plugins with typed swappable contracts. No parallel DI graph. Keep independent repository/public package boundaries, exact archive pins and original licenses. Migration PRs target cordis with Part of issue references. All issues remain open until authorized release; installer/Agent/generalized recovery are later tasks.

## Task 3C contract

Owner issue: https://github.com/treeseed-ai/cli/issues/317. Follow the approved Platform Task 3C service/provider/UI plan through exact public archives. Preserve independent repository ownership, strict TypeScript classes, native Cordis lifecycle, historical formats and all seven SDK operations. Expected-generation/idempotency, resource/credential/TLS retention and explicit unsafe restart/migration gates are mandatory. All issues remain open until release.

Every visual component must be mobile-first from 320 CSS pixels to widescreen monitors; test 320/375/768/1024/1440/1920/2560 widths, long content, keyboard/touch and 200% text resizing. Keep authored controls at least 44×44 CSS pixels, required actions visible, logical/fluid dimensions and no page overflow (labeled local semantic-table overflow is permitted). UI owns components/styles/renderers; consumers retain domain behavior and Identity retains Keycloak authority.

### Reusable terminal presentation

Human output maps diagnostics, plans, installation state, applications and safe errors into
UI-owned text/status/table/feedback/stack view models. The native CLI output plugin consumes
UI's public terminal renderer; formatting and reusable presentation live in UI. Human plan
output contains explicit service, volume, port and future-effect tables. JSON envelope bytes,
exit meanings and stdout/stderr ownership stay with CLI; machine JSON does not create a UI
scope. Built-program tests use an empty or Docker-only PATH and retain Task 1 checks.

Configuration and output accept the new format-3 service contracts through exact public
SDK/Deployment archives, preserving historical format-1/2 input/readers. This presentation
slice adds no installer commands or activation policy; those follow under this same Task 3C.

### Built format-3 acceptance gate

Owner CI runs on Ubuntu 26.04 with `CORDIS_REQUIRE_PLAN=1`: missing prerequisites fail visibly.
The built standalone CLI plans a genuine prepared five-instance bundle through Deployment's
public fixture/export, saves and repeats identical format-3 bytes, renders reusable human
service tables and runs with Docker-only PATH. It leaves Docker resources, listeners,
credentials and the import/script canary unchanged. Tampered input returns a blocked envelope
without a saved reference. These are planning checks, not installed activation evidence.


## Built format-3 installed-operation qualification

The real `trsd` executable must plan a genuine prepared format-3 fixture bundle, submit its exact
saved plan, recover the same application after the submitting CLI process exits, and read status
and application through the durable standalone Deployment worker. The bundle contains a worker
produced before planning through Deployment's public `ServiceWorkerBuild`; CLI neither builds a
worker during apply nor implements a second coordinator. Apply/status/application run from a
foreign directory with only Docker on PATH, closed stdin and the executable reached by symlink.

Exit zero from apply remains durable acceptance. Only subsequent verified application/status
read-back establishes readiness. Repeated submission with the same idempotency key returns the
same application, including after the source bundle is removed. JSON continues through SDK
schemas; human output continues through UI terminal providers. Qualification creates and cleans
only uniquely labelled fixture containers/volumes/networks and its exact selected worker process.
Graceful worker disposal preserves installed resources; a later apply must report repair rather
than silently restart that worker. Original services remain outside this fixture.

## Installed plugin management

`trsd plugin install <NPM package|HTTPS Git repository> --installation DIR` requests installation
and activation when the selected target is qualified. Use `--target deployment --service ID` for a
private container instance, `--provider ID` for an explicit provider and `--binding PORT=ID` for
explicit typed bindings. `--configuration FILE` loads a strict JSON object. `--idempotency-key KEY`
replays the exact accepted request; omission creates and reports a new key. `--scope installation`
is the default; client scope remains action-required until qualified. Ambiguous targets never
activate implicitly. Approved exact helpers and source/build policy belong to the installation.

`trsd plugin select CAPABILITY PROVIDER --installation DIR --target TARGET [--service ID]`
selects an already registered provider through the same Deployment authority.
`trsd plugin list --installation DIR [--target TARGET]` and
`trsd plugin inspect REQUEST --installation DIR` read the current owner or verified cold records.
Cold records cannot establish active health. None of these commands invents a remote API endpoint.
Human output is rendered entirely by the reusable UI terminal providers; JSON emits the SDK
plugin envelope. Exit 0 for install/select requires active or already-active; pending/prepared or
blocked/action-required returns 3, invalid arguments/configuration returns 2 and unexpected I/O
returns 1. Read-only list/inspect success uses exit 0 without upgrading record health claims.

`platform apply ... --restart SERVICE` explicitly authorizes each required restart scope from
the reviewed plan. Repeat the flag for multiple service IDs; duplicate or unrelated scopes fail.
No restart is inferred from install, readiness or an arbitrary configuration change. Keycloak
issuer, identities, sessions and grants remain under their existing owner/provider authority.

## Final source and live-provider command gate

The built command gate consumes Deployment's exact public NPM, packaged HTTPS Git, approved
source-only Git and live-probe fixtures. It runs installation, read-back and source-free retry
with only Docker on caller PATH. Registered selection uses retained archive bytes. An explicit
probe installation names an existing service and provider; only the accepted previous/next
qualification may activate it. The independent worker keeps its PID and physical resources;
unqualified reverse selection remains prepared for explicit restart review. CLI supplies no
source transport, lifecycle scheduler or container implementation.

CI partitions built-program scenes into independent required jobs to preserve the existing
time budget; every test file/scene remains included. JSON exits and Keycloak authority remain
unchanged. This candidate is an unpublished Cordis review artifact.

The final built source gate also selects two new registered instances after the packaged and
approved-build Git source is shut down. Selection rebases the complete retained closure without
reacquisition and preserves earlier endpoints/private resources. NPM's deliberately registered
stateful second version makes that provider ID ambiguous; source-free selection must refuse it
without changing the active composition. Explicit source/version installation remains distinct
from selecting an unambiguous registered provider ID.

The built Git acquisition and registered-selection qualifications run as separate required
program cases. Each retains the 420-second case limit and the existing CI job budget.
Registered selection starts from a genuine accepted installed archive, stops the source,
then activates two further instances and verifies exact replay, direct protocols and retained
resources/private bytes. Acquisition still independently installs two named instances and
checks cold/source-free read-back. Splitting bounds verification; it does not weaken admission.
Loading
Loading