Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
11 changes: 11 additions & 0 deletions .llm/runs/feat-openapi-mcp-read-tools--s6/context-pack.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Context Pack — OMB S6

Branch `feat/openapi-mcp-read-tools` is based on `origin/main` `f7558aa1c`. Issue 1132 and RFC 1123
were read. S4 projection, S5 directory, and S8 receipt lifecycle are present. Live registry is 14,
so this slice truthfully plans 14→17 despite the staged brief's stale 17→20 expectation. Plan and
Design are complete; formal local evaluator passes are waived under the milestone composition rule.
Implementation is complete locally: three flows, contracts, 14→17 registry wiring, CLI receipt
composition, public exports, docs synchronization, and acceptance fixtures. Targeted tests pass
10/10; the full package suite passes 98/98; scoped check/lint/fmt, quality gate, doc-lint, and
publish dry-run pass. Remaining work is final diff review, commit/push/comment, composed
draft→ready/OpenHands evaluation handoff, and close-gate body/evidence updates.
34 changes: 34 additions & 0 deletions .llm/runs/feat-openapi-mcp-read-tools--s6/drift.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Drift — OMB S6

## 2026-08-04 — registry baseline differs from staged brief

- **Severity:** significant
- **Expected:** 17 live tool names, producing 20 after this slice.
- **Observed:** remote `origin/main` at `f7558aa1c` has 14 names in `TOOL_NAMES`; issue 1132 also
specifies 14→17. S4 added the projection subpath, not three registry tools.
- **Disposition:** implement exactly the three issue tools and record the truthful 14→17 delta.
Do not invent unrelated placeholder tools.

## 2026-08-04 — milestone evaluator composition

- **Severity:** procedural
- **Authority:** owner staged brief, milestone-run.md § Evaluator protocol, orchestrator ruling D6.
- **Disposition:** no local formal PLAN-EVAL/IMPL-EVAL. Record composed waiver rows; use
draft→ready augment + OpenHands + orchestrator pre-merge gate, retaining opposite-family code
review.

## 2026-08-04 — OpenHands provider qualification

- **Severity:** infrastructure
- **Observed:** the first dispatch passed `qwen/qwen3.7-max`; LiteLLM rejected it before model
execution because the provider prefix was absent.
- **Disposition:** retry once with the dispatcher's documented literal id
`openrouter/qwen/qwen3.7-max`; retain the failed run as infrastructure evidence.

## 2026-08-04 — stale CLI registry fixture

- **Severity:** implementation reconcile
- **Observed:** package-local registry and stdio fixtures passed at 17, but the repository-wide real
CLI stdio smoke retained the pre-S6 expectation of 14.
- **Disposition:** synchronize that fixture to the verified live 14→17 delta and prove it with the
focused real CLI stdio test.
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
use harness

Review PR 1204 as the OpenHands component of the milestone-run composed evaluator protocol. This is
review-only: do not modify source, run artifacts, `deno.lock`, or any file; do not commit or push.

## SKILL

- `netscript-harness` — read the run artifacts and honor the milestone evaluator waiver.
- `netscript-doctrine` — evaluate `packages/mcp` against Archetype 2.
- `jsr-audit` — verify the public export and publish evidence.
- `netscript-tools` — use authoritative gates and preserve lock hygiene.
- `netscript-pr` — report a structured REVIEW verdict without changing PR metadata.
- `openhands-handoff` — write the required OpenHands summary output.

## Review scope

Read issue 1132, RFC 1123, the full diff from `main`, and
`.llm/runs/feat-openapi-mcp-read-tools--s6/`. Verify:

1. `truncated: true` iff service or operation rows were actually dropped; no central silent cap.
2. `operationCount` is absent, not zero, whenever no parsed spec was fetched.
3. S5's `sources` block is surfaced verbatim.
4. All three tools compose S4 projection and S5 directory rather than re-deriving either.
5. Receipts use S8 post-output-validation settlement.
6. Registry moves from the live 14 baseline to 17, contracts/exports/docs agree, and no unrelated
tool is invented.
7. No new lint ignores, unsafe casts, lock churn, speculative abstractions, or out-of-scope live
scaffold/AppHost work.

Run the smallest checks needed to verify claims. Report PASS or actionable findings with severity
and file:line evidence. Include raw exit codes for any commands run. Write the required
`OPENHANDS_SUMMARY_PATH`; do not trust or reuse a stale persistent summary.
8 changes: 8 additions & 0 deletions .llm/runs/feat-openapi-mcp-read-tools--s6/plan-eval.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# PLAN-EVAL — composed milestone waiver

**Status:** composed per milestone-run.md (orchestrator waiver)

Per the owner's staged brief and milestone-run.md § Evaluator protocol, this per-PR run does not
launch a local formal PLAN-EVAL. Evaluation composes draft→ready augment, OpenHands, and the
orchestrator pre-merge gate. The plan-gate inputs are present: re-baselined research, locked plan,
Design checkpoint, Archetype-2 gate set, JSR surface scan, risk/debt/deferred-scope sweeps.
66 changes: 66 additions & 0 deletions .llm/runs/feat-openapi-mcp-read-tools--s6/plan.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
# Plan — OMB S6 three read tools

## Scope and archetype

Implement `list_api_services`, `list_service_operations`, and `get_operation_schema` in
`packages/mcp` as Archetype-2 application flows. No frontend/service/docs overlay and no AppHost or
scaffold run: acceptance is fixture-only.

## Locked decisions

1. Compose S4 and S5 directly: directory rows provide specs; projection functions provide indexing,
identity resolution, descriptions, and schema views.
2. Forward S5's `sources` array verbatim from `list_api_services`.
3. Omit `operationCount` whenever a parsed spec was not fetched; never substitute zero.
4. Self-cap operation rows at 49 (below the central 50-row truncator), apply filter before cap, and
set `truncated` iff the filtered row set lost at least one row.
5. Return uniform failures for unknown/unavailable services and unknown/ambiguous operations.
6. Wrap all three flows with S8's existing receipt lifecycle at `cli.ts`; do not write receipts in
flow code.
7. Live registry delta is 14→17. The staged 17→20 expectation is stale and recorded in drift.

## Public surface

- Three tool names and Standard Schema contracts.
- Three flow factories with explicit input/output types exported from `mod.ts`.
- `McpCliOptions.serviceEndpointDirectory` injection seam for fixtures/embedders; default composition
uses the existing S5 factory and project root.

## Commit slices

1. **Plan/bootstrap** — run artifacts, live-count divergence, locked contracts and gate map.
2. **Contracts and flows** — three contracts, one flow per tool, fixture tests proving all three
issue boxes. Gate: targeted package test plus scoped check/lint/fmt.
3. **Registry/composition/exports** — 14→17 registry, CLI wiring and receipts, public exports and
docs count references required by the existing drift test. Gate: package test and doc-lint.
4. **Merge-readiness evidence** — Archetype-2 full column, quality gate, JSR audit, publish dry-run,
lock/lint-ignore verification, PR evidence and ready handoff.

## Gate set

- Targeted and full `packages/mcp` tests.
- Scoped check/lint/fmt wrappers rooted at `packages/mcp`, `--ext ts,tsx`.
- `deno task quality:gate` (quality scan + architecture fitness).
- `deno task doc:lint --root packages/mcp --pretty`.
- Package-local `deno task publish:dry-run`.
- Consumer compile through package check and registry/protocol fixtures.
- Diff gates: no new `deno-lint-ignore`, `as unknown as`, or `deno.lock` churn.

## Risks and mitigations

- **Silent truncation:** fixture with >49 filtered operations checks exact retained length and flag.
- **False zero:** schema and fixture distinguish absence from numeric zero.
- **Source transformation:** identity assertion and deep equality prove the exact S5 block is returned.
- **Receipt timing regression:** CLI composition reuses S8 wrapper; existing receipt lifecycle tests
plus an S6 receipt fixture prove settlement after validated output.
- **Public-surface slow types:** explicit return types plus doc-lint and dry-run.

## Open-decision sweep

- Safe to defer: live-scaffold discovery path (owned by S7), activation copy, execution tool.
- Must resolve now: none.

## Debt and deferred scope

No new architecture debt expected. Invocation, activation, manifest emission, and contract
enrichment remain owned by their board slices.
50 changes: 50 additions & 0 deletions .llm/runs/feat-openapi-mcp-read-tools--s6/research.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# Research — OMB S6 three read tools

## Authority and baseline

- Read issue 1132 and RFC PR 1123 before implementation.
- Rebased the feature branch onto remote `origin/main` at `f7558aa1c` on 2026-08-04.
- S4 is present as the pure `@netscript/mcp/openapi-projection` export, including operation index,
canonical identity resolution, description ladder, and schema views.
- S5 is present as `ServiceEndpointDirectoryPort` plus the composed precedence
`override > aspire-cli > run-manifest > appsettings`; directory results retain opaque parsed specs
only for running rows and return the complete `sources` array.
- S8 is present as runner-settled `withFlowReceipt`: settlement occurs after output validation.

## Re-baselined facts

1. The live `TOOL_NAMES` count is **14**, not the staged brief's expected 17. The issue itself says
registry 14→17. Adding the three accepted tools therefore makes the live delta **14→17**, not
17→20. No placeholder tools will be invented to satisfy the stale count.
2. `list_api_services` can compute `operationCount` only for a running row because only that row
contains `spec`. All other states must omit the property entirely.
3. `list_service_operations` and `get_operation_schema` can reuse the exact retained spec and S4
projection; neither needs a new fetch port or a second OpenAPI parser.
4. S5's `sources` value is already the desired discriminated source-outcome block and can be
forwarded unchanged by identity, preserving every property and order.
5. S8's receipt lifecycle is attached at the CLI composition edge, so all three flows should use
the existing `withReceipt` wrapper rather than write evidence themselves.

## JSR surface scan

- Package metadata, three entrypoints, module docs, and explicit exported symbol types already
exist. New public flow factories/types need JSDoc and explicit return types.
- New exports must be added through `mod.ts`; no self-referential package imports.
- Required publish gates: full package doc-lint and package-local publish dry-run; slow types or
private type references are blockers.
- No dependency change is required and no lock churn is expected.

## Doctrine and debt

- Selected Archetype 2 because flows compose a package-owned external directory port and existing
network/source adapters; no service/runtime overlay applies because all acceptance is fixture-only.
- Current doctrine verdict has no explicit `packages/mcp` row; new code is held to the current
Archetype-2 rules without deepening recorded debt.
- In-scope risks: AP-1 oversized files, AP-7 duplicate upstream/projection behavior, AP-9 helper
flags, AP-11 module-load side effects, AP-22 empty barrels, AP-23 inline composition bodies,
AP-25 side effects outside adapters/edges.

## Open questions

None that force rework. Output field names and failure envelopes follow issue/RFC wording and
existing tool schema conventions.
26 changes: 26 additions & 0 deletions .llm/runs/feat-openapi-mcp-read-tools--s6/supervisor.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Supervisor Identity — feat-openapi-mcp-read-tools--s6

| Field | Value |
| --- | --- |
| Model | Codex GPT-5.6 Sol |
| Session | current Codex implementation-supervisor session |
| Host | Linux workspace |
| Checkout | `/home/codex/repos/ns005-s6` |
| Worktree | `/home/codex/repos/ns005-s6` |
| Branch | `feat/openapi-mcp-read-tools` |
| Baseline | `f7558aa1c4e06f076114d924c7324feddf554e45` (`origin/main`, 2026-08-04) |
| Run ID | `feat-openapi-mcp-read-tools--s6` |

## Routes in force

| Task lane | Provider / model / effort | Role in this run |
| --- | --- | --- |
| `complex_implementation` | Codex / GPT-5.6 Sol / high | plan, implementation, gates, PR supervision |
| milestone composed evaluation | draft→ready augment + OpenHands + orchestrator pre-merge gate | formal evaluation composition |

## Recorded lane/eval overrides

Owner directive applies milestone-run.md § Evaluator protocol and orchestrator ruling D6: no local
formal PLAN-EVAL or IMPL-EVAL session. Evaluation is composed from draft→ready augment, OpenHands,
and the orchestrator pre-merge gate. Opposite-family code review remains required by the milestone
protocol; run-artifact/evidence prose is covered by the owner-review substitution.
111 changes: 111 additions & 0 deletions .llm/runs/feat-openapi-mcp-read-tools--s6/worklog.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
# Worklog — OMB S6 three read tools

## Design

### Public surface

Three flow factories and their input/output types; three new tool contracts; one optional injected
`ServiceEndpointDirectoryPort` at the CLI composition edge.

### Domain vocabulary

`ApiServiceSummary`, `ListApiServicesResult`, `ServiceOperationSummary`,
`ListServiceOperationsResult`, and `GetOperationSchemaResult`. Existing `SourceOutcome`,
`ServiceEndpointRow`, `SchemaViewName`, and S4 projection types remain authoritative.

### Ports and composition

Consume the existing `ServiceEndpointDirectoryPort`. No new port. Default composition remains in
`cli.ts` through `createServiceEndpointDirectory`; fixtures inject a fake directory.

### Constants

`SERVICE_OPERATION_RESULT_LIMIT = 49` is the flow-owned row cap below the central 50-item cap.
Existing `SCHEMA_VIEW_NAMES`, endpoint statuses, and source identifiers are reused.

### Commit slices

1. Bootstrap plan artifacts.
2. Contracts + flows + acceptance fixtures.
3. Registry + composition + exports + documentation count synchronization.
4. Full gate/evaluation evidence and PR handoff.

### Deferred scope

No live AppHost/scaffold path, activation copy, execution tool, policy, or contract enrichment.

### Contributor path

Start at `tool-contracts.ts` for wire shape, follow the named flow in
`src/application/flows/`, then find composition and receipt wrapping in `cli.ts`.

## Phase status

| Phase | Status |
| --- | --- |
| Research | complete |
| Plan | complete |
| PLAN-EVAL | composed per milestone-run.md (orchestrator waiver) |
| Implement | complete |
| Gate | complete |
| IMPL-EVAL | composed per milestone-run.md (orchestrator waiver) — PASS |

## Implementation evidence

- Added three contract entries and three one-flow-per-tool modules.
- `list_api_services` self-caps at 49, reports honest truncation, omits `operationCount` unless S5
returned a running row with a parsed spec, and forwards the exact `sources` reference.
- `list_service_operations` composes S4 indexing/description, filters before a 49-row cap, and sets
`truncated` exactly from dropped matching rows.
- `get_operation_schema` composes S4 canonical resolution/schema views and labels its curl output as
an unauthenticated template.
- CLI composition injects or creates the S5 directory and wraps all three tools through S8's
post-validation receipt lifecycle.
- Registry and documentation drift fixtures now record the truthful 14→17 live delta.

## Gate evidence

| Gate | Result |
| --- | --- |
| Acceptance/registry/stdio fixtures | PASS — 10/10 targeted tests |
| Full `packages/mcp` test | PASS — 98/98 |
| Scoped check wrapper | PASS — 92 files, 0 diagnostics |
| Scoped lint wrapper with package config | PASS — 92 files, 0 findings |
| Scoped fmt wrapper with package config | PASS — 92 files, 0 findings |
| `quality:gate` | PASS — quality scan `ok:true`; arch checks exit 0 (baseline warnings only) |
| Package doc-lint | PASS — combined total 0 |
| Package publish dry-run | PASS — no slow-type failure; S6 files in intended publish list |
| Lock hygiene | PASS after reversing Deno's unrelated queue lock resolution; final diff pending |

## CI reconcile

- The first OpenHands dispatch failed before model execution because the workflow received an
unqualified LiteLLM model id. Retried through the repo dispatcher with
`openrouter/qwen/qwen3.7-max`; composed evaluation remains in progress.
- Branch CI found one stale cross-package fixture: the real CLI stdio smoke still asserted the
pre-S6 registry count of 14. Updated it to the live post-S6 count of 17; the focused smoke passes
1/1 and its scoped format check passes.
- The scaffold runtime reached 29 passing steps before an unrelated Aspire restore preparation
timed out after two 900-second attempts. The staged brief explicitly excludes AppHost/scaffold
runs for this fixture-only slice.

## Slice reconcile

- Issue 1132 remains open with three acceptance boxes; PR 1204 is draft with `status:plan` and
milestone 0.0.5. Closing keyword is intentionally deferred until all evidence and checkboxes are
truthful.

## Opposite-family slice review

- Claude Fable 5 low session `07579130-6ba6-47f0-9b01-3ad758e50b4c` returned **PASS**.
- Three non-blocking observations were accepted into the sign-off slice: bound failure suggestions
to three, align the public limit schema (1–100) with the flow's 49-row self-cap, and narrow the
S6 receipt fixture name to its actual success-path assertion.

## Composed evaluator result

- OpenHands run `30891416446` returned **IMPL-EVAL PASS** in PR comment `5176464319`.
- The evaluator independently verified all three issue contracts, S4/S5 composition, S8 receipt
settlement, the truthful 14→17 registry delta, 98/98 MCP tests, and lint/lock hygiene.
- PR 1204 is ready for review with `status:impl-eval`; the orchestrator retains merge authority and
the pre-merge gate.
6 changes: 4 additions & 2 deletions docs/site/ai/agent-tooling.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ server over standard input/output. Its flags:

## What the server exposes

Fourteen tools, every one returning a bounded structured result. Grouped by what
Seventeen tools, every one returning a bounded structured result. Grouped by what
an agent is trying to do:

- **Read the running app** — seven telemetry read models: `get_app_status`,
Expand All @@ -108,6 +108,8 @@ an agent is trying to do:
and a bounded output tail.
- **Record drift** — `record_drift` appends an evidence-gated entry to the project
drift log (`.netscript/agent/drift.jsonl`) when authorized by a fresh successful diagnostic receipt.
- **Inspect service APIs** — `list_api_services`, `list_service_operations`, and
`get_operation_schema` expose live OpenAPI contracts before an agent guesses with curl.

We keep the per-tool schemas, output bounds, and the full `execute_command`
policy in the [`@netscript/mcp` reference]({{ "ref:mcp" |> xref |> url }}) rather
Expand Down Expand Up @@ -206,7 +208,7 @@ deno test --allow-all packages/cli/e2e/tests/agent/agent-mcp-stdio_test.ts
```

The smoke starts the public CLI binary, initializes MCP over stdio, verifies the
14-tool catalog, and checks docs, diagnostics, unreachable telemetry, and command
17-tool catalog, and checks docs, diagnostics, unreachable telemetry, and command
denial behavior.

## Where to go next
Expand Down
Loading
Loading