@fro.bot/systematic 3.33.0 → 3.33.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/HARNESSES.md +7 -4
- package/dist/ce-connect-helper.d.ts +3 -1
- package/dist/lib/connect-ci.d.ts +2 -2
- package/dist/lib/connect-config.d.ts +75 -21
- package/dist/lib/connect-helper-core.d.ts +5 -0
- package/package.json +6 -6
- package/skills/ce-connect/SKILL.md +7 -7
- package/skills/ce-connect/references/fetch-and-import.md +10 -4
- package/skills/ce-connect/references/headless-and-outcomes.md +5 -5
- package/skills/ce-connect/scripts/connect.mjs +114 -23
package/HARNESSES.md
CHANGED
|
@@ -75,7 +75,7 @@ Pi honors Systematic's disable settings. `src/pi.ts` loads the merged config onc
|
|
|
75
75
|
|
|
76
76
|
## Claude Code — Tier 1 shipped adapter
|
|
77
77
|
|
|
78
|
-
Claude Code's profile records name-based subagent dispatch, `AskUserQuestion`, task tracking through `TaskCreate`/`TaskGet`/`TaskList`/`TaskUpdate`, and native Skill/`SKILL.md` discovery [CC-P]. Systematic builds a self-contained plugin bundle in CI from `skills/` and `agents/` via `scripts/build-claude-code-plugin.ts`: it flattens agent personas, composes an output style from the using-systematic body plus the Claude Code profile, emits a declarative `SessionStart` hook, and translates every internal identifier (`ce:<name>`, `systematic:<category>:<name>`) into Claude Code's plugin-namespaced form (`systematic:<skill-dir>`, `systematic:<agent-stem>`), gated by an integrity check that fails the build on any leftover source-namespace or unresolved bare reference [CC-9]. The bundle is never committed to `main` — `claude-code/` is gitignored build staging — and CI publishes the built output to the orphan `claude-code-plugin` branch
|
|
78
|
+
Claude Code's profile records name-based subagent dispatch, `AskUserQuestion`, task tracking through `TaskCreate`/`TaskGet`/`TaskList`/`TaskUpdate`, and native Skill/`SKILL.md` discovery [CC-P]. Systematic builds a self-contained plugin bundle in CI from `skills/` and `agents/` via `scripts/build-claude-code-plugin.ts`: it flattens agent personas, composes an output style from the using-systematic body plus the Claude Code profile, emits a declarative `SessionStart` hook, and translates every internal identifier (`ce:<name>`, `systematic:<category>:<name>`) into Claude Code's plugin-namespaced form (`systematic:<skill-dir>`, `systematic:<agent-stem>`), gated by an integrity check that fails the build on any leftover source-namespace or unresolved bare reference [CC-9]. The bundle is never committed to `main` — `claude-code/` is gitignored build staging — and CI publishes the built output to the orphan `claude-code-plugin` branch when a release is published [CC-11]. Users install it through the marketplace catalog checked into `main` at `.claude-plugin/marketplace.json`, which points the `systematic` plugin entry at the `claude-code-plugin` branch ref [CC-12]: `claude plugin marketplace add marcusrbrown/systematic` then `claude plugin install systematic@systematic`. The plugin has no version field; it is versioned by the source commit SHA baked into each publish commit.
|
|
79
79
|
|
|
80
80
|
Delegation is name-based: a prompt invokes a subagent by name (for example, "Use the systematic-implementer subagent to …") and Claude Code resolves it against the plugin's `agents/` directory; skills may additionally run scoped subagent forks via `context: fork` [CC-1]. `AskUserQuestion` is the blocking-interaction tool [CC-2]. `TodoWrite` is deprecated and disabled by default; `TaskCreate`/`TaskGet`/`TaskList`/`TaskUpdate` are the current task-tracking tools [CC-3][CC-4]. Skills are discovered natively from `SKILL.md` under `~/.claude/skills/`, `.claude/skills/`, and the plugin's own `skills/` directory through the built-in Skill tool; Systematic registers no `systematic_skill` tool on Claude Code, unlike its OpenCode and Pi adapters [CC-5][CC-6][CC-9].
|
|
81
81
|
|
|
@@ -106,17 +106,19 @@ Evidence tiers differ by host, and this file does not claim more than the tests
|
|
|
106
106
|
|
|
107
107
|
## Cross-project connections — researcher tool limits
|
|
108
108
|
|
|
109
|
-
The `ce:connect` skill dispatches `connections-researcher`, an agent that must not run shell commands, write, edit or fetch. Each host enforces that differently, so a host
|
|
109
|
+
The `ce:connect` skill dispatches `connections-researcher`, an agent that must not run shell commands, write, edit or fetch. Each host enforces that differently, so a host counts as supported only from the lowest version where a deny was observed on it (newer releases of the same major version follow): the shipped researcher is dispatched, a scripted model calls shell, write, edit and web fetch, each is refused, a read succeeds and reaches the parent, and the planted marker file is never written. A negative control removes the limits and the proof fails under its own name. The floors are in `HOST_SUPPORT_TABLE` in `src/lib/connect-config.ts`; each row names the test that observed it in `observedBy`. A prerelease, a version below the floor, a higher major version and a pair on the known-bad list in the same file are refused. A definition test is a regression pin and is never counted as proof.
|
|
110
110
|
|
|
111
111
|
| Host | Mechanism | Support evidence |
|
|
112
112
|
|---|---|---|
|
|
113
113
|
| OpenCode v1 | `permission:` denies `bash`, `edit`, `webfetch`, `websearch` and `task`, plus `external_directory: allow` so a headless run can read allowed projects outside the working directory. Another config entry of the same agent name keeps only its `model` and `variant`; the denies and prompt are Systematic's. A string `tools:` is dropped by the host's converter and is not relied on. | Observed [CN-1] |
|
|
114
114
|
| OpenCode v2 | The same denies, plus Systematic's `execute.before` tool guard, which refuses every call from `connections-researcher` outside `read`, `grep`, `glob`, `skill`, `systematic_search` and `systematic_skill`, direct or from inside Code Mode. A session-level allow overrides an agent's own deny on v2, so the guard does the enforcing. Another plugin's definition of the same agent name is replaced by Systematic's, keeping only its `model`; a definition in the user's own config applies after the plugin transforms and is not replaced. | Observed [CN-2][CN-3] |
|
|
115
115
|
| Pi | The agent's `tools: Read, Grep, Glob` reach the delegate session as read, grep and find. The agent is not one of the curated pi-subagents personas, which carry no tool allowlist. | Observed [CN-4] |
|
|
116
|
-
| Claude Code | The agent declares `tools: Read, Grep, Glob` and `disallowedTools`. The positive `tools` allowlist is what the host enforced in the manual run: the session's tools were Read, Grep and Glob. Upstream reports describe `disallowedTools` not being enforced for plugin subagents, so the allowlist leads. | Observed once, by hand, with a live model [CN-5].
|
|
116
|
+
| Claude Code | The agent declares `tools: Read, Grep, Glob` and `disallowedTools`. The positive `tools` allowlist is what the host enforced in the manual run: the session's tools were Read, Grep and Glob. Upstream reports describe `disallowedTools` not being enforced for plugin subagents, so the allowlist leads. | Observed once, by hand, with a live model [CN-5]. A version below it, a prerelease or another major version is not supported: headless mode refuses it and interactive mode warns and asks consent. Newer releases rest on this one observation. |
|
|
117
117
|
|
|
118
118
|
What the evidence does not show: a scripted model makes the calls, so these proofs show enforcement plumbing, not live model choice. Read tools are not path-scoped on any host and session MCP tools are not denied; the guide documents both as limits. The v1 floor (1.18.29) has no row and is not run against this proof.
|
|
119
119
|
|
|
120
|
+
The scheduled workflow is a separate surface: it runs the skill headless on a CI runner and posts a report issue. Live runs of it, including the report author, the in-place edit on a second same-day run, a hand cancel and an agent-step timeout, are recorded in [CN-6]. That entry also lists what was not observed live.
|
|
121
|
+
|
|
120
122
|
## Worktree placement rule — bootstrap paths
|
|
121
123
|
|
|
122
124
|
One short rule ships in the shared bootstrap: create a worktree at `.worktrees/<branch>` under the main repository root with the `git-worktree` skill's script, and follow a different location or tool when the user or a project instruction names one. The script (`skills/git-worktree/scripts/worktree-manager.sh`) is small and non-interactive: `create`, `list`, `switch`, `copy-env` and `cleanup`, with exit codes 0 ok, 1 error, 2 usage and 3 refused, and no stdin reads. `create` places the worktree at `.worktrees/<branch>` under the main root, writes `.worktrees/.gitignore` and never edits the root `.gitignore`, and fails closed on a bare, separate-git-dir or submodule layout; `cleanup` reports and removes only named clean worktrees [WT-2]. The rule lives in `skills/using-systematic/references/worktree-placement.md` and holds no harness identifiers [WT-1]. Each adapter composes it differently:
|
|
@@ -268,7 +270,7 @@ Migrated-skill discipline is enforced by the [content-integrity gate](scripts/co
|
|
|
268
270
|
- **CC-6** — [Claude Code Agent SDK skills](https://code.claude.com/docs/en/agent-sdk/skills.md).
|
|
269
271
|
- **CC-9** — `scripts/build-claude-code-plugin.ts:5-28,256-368,374-418` (builder, identifier translation, integrity gate); `.gitignore` (`claude-code/` gitignored build staging).
|
|
270
272
|
- **CC-10** — `tests/integration/claude-code.test.ts`.
|
|
271
|
-
- **CC-11** — `.github/workflows/
|
|
273
|
+
- **CC-11** — `.github/workflows/publish-claude-code-plugin.yaml:28-223` (`build` and `push` jobs: on a published non-prerelease release, or a manual dispatch naming an existing tag, the read-only `build` job builds the bundle and guards its required artifacts, and the `push` job, which holds the only write credential and runs no repository code, publishes it to the orphan `claude-code-plugin` branch).
|
|
272
274
|
- **CC-12** — `.claude-plugin/marketplace.json:1-18` (marketplace catalog; `systematic` plugin entry sourced from the `claude-code-plugin` branch ref).
|
|
273
275
|
- **CC-13** — `scripts/build-claude-code-plugin.ts:129-157` (the rule file is read after the using-systematic and profile checks, fails the build when missing, and sits between the body and the profile); `tests/unit/build-claude-code-plugin.test.ts:491-514` and the byte-exact output-style fixture in the same file; `tests/integration/claude-code.test.ts:140-162` (real build: the rule appears exactly once between the body and the profile).
|
|
274
276
|
- **CX-1** — [Codex request_user_input definition](https://github.com/openai/codex/blob/35aaa5d9/codex-rs/tools/src/request_user_input_tool.rs).
|
|
@@ -301,3 +303,4 @@ Migrated-skill discipline is enforced by the [content-integrity gate](scripts/co
|
|
|
301
303
|
- **CN-3** — The v2 tool guard. Code: `src/lib/opencode-v2-tool-guard.ts` (`decideToolCall`, the `execute.before` registration, `READ_ONLY_AGENT_NAMES`, `READ_ONLY_TOOL_ALLOWLIST`). Tests: `tests/unit/opencode-v2-tool-guard.test.ts` (the allowlist is exactly read, grep, glob, skill and the two Systematic tools; exact-name matching; every other agent left alone; a refused call throws so the host fails that call alone; a failed hook registration rejects, so `setupOpenCodeV2` can catch it and withhold the guarded agents); `tests/integration/opencode-v2.test.ts` › "the execute.before hook sees each call with the session agent, including Code Mode calls, and a throw fails that call alone" (a plugin hook that throws fails the call without any Systematic guard in play). The reason for the guard, observed on 2.2.5: a session-level allow rule overrides an agent's own deny, and Code Mode `execute` reaches host-native `opencode_*` tools that no frontmatter key can name.
|
|
302
304
|
- **CN-4** — Pi 1.5.0: `tests/unit/pi-delegate-session.test.ts` › "the shipped researcher reaches createAgentSession with read, grep and find and none of bash, write, edit or systematic_delegate" (the `observedBy` for this row; the real session builder runs against a fake runtime and the test asserts the `tools` that reach `createAgentSession`, not the mock); `tests/integration/pi.test.ts` › "a family completes inside the delegate turn cap with read, search and find tools only, and its batch validates" and "a child that never answers stops at the turn cap and the family is degraded, not empty" (the real Pi runtime, run in the v2 host-contract profile). Scope limit: the delegate is capped at 20 turns, and a scripted model drives the integration tests.
|
|
303
305
|
- **CN-5** — Manual evidence, not a CI check. Recorded 2026-11-08 with Claude Code 2.1.319 (`claude --version` prints `2.1.319 (Claude Code)`), run by hand with the plugin bundle built from the rebased branch head and a live model. Verdict PASS. Run A dispatched `systematic:connections-researcher` through the `Agent` tool: the subagent reported its tools as Read, Grep and Glob, read a planted file and returned its marker, skipped Bash, Write, Edit and WebFetch as unavailable, and never called any of them (the checker found no call to Bash, Write, Edit, WebFetch, WebSearch or NotebookEdit). Run B started a session with `claude --agent systematic:connections-researcher`: the session's init message listed Read, Grep and Glob as its tools, none of Bash, Write, Edit, WebFetch, WebSearch or NotebookEdit, and no MCP tools; the read worked and its marker reached the answer. The `HOST_SUPPORT_TABLE` row names this entry as its `observedBy`. Limits: one live model on one Claude Code version; in run A the denial is the subagent's own report, because it never called the tools, and the host's own statement comes from run B's session tool list; the read tools are not path-scoped; whether a dispatched subagent can reach its parent session's MCP tools was not tested. `tests/unit/connect-host-isolation.test.ts` › "claude plugin validate accepts the definition and rejects one that does not parse" remains a parse check only, because an agent whose frontmatter fails to parse loads without its limits. Upstream issue reports 58645 and 94202 (cited from the research behind this feature, not re-checked) describe `disallowedTools` not being enforced for plugin and subagent Bash, so the agent leads with the positive `tools` allowlist.
|
|
306
|
+
- **CN-6** — Manual evidence from live runs of `.github/workflows/connect.yaml`, not a CI check. Pins: `fro-bot/agent` v0.140.2 at `1ffb6495501f12801f770fa0c0563d16450416e7`, which runs OpenCode v2 2.2.6, and Systematic 3.33.0. Run [43362146039](https://github.com/marcusrbrown/systematic/actions/runs/43362146039) (first dispatch) ended `Connect complete` and posted report issue #1389, authored by `github-actions[bot]`. The ledger cache was empty (a reset). The agent step had no model input, so the parent ran on the action's default model; the step now passes the Fro Bot model. Run [43365759373](https://github.com/marcusrbrown/systematic/actions/runs/43365759373) (second dispatch, the same UTC date): the action log shows `hasModelOverride: true`, and the run ended `Connect complete`. `prepare` logged `Ticks from report #1389: accepted 2, skipped 0, unresolved 0`, and the ledger cache restored (sweep 96 of 435). The `render` visibility recheck passed under `permissions: {}` with the job token. `post` edited #1389 in place and opened no second issue, and the two rejected candidates left the report. Run [43368318366](https://github.com/marcusrbrown/systematic/actions/runs/43368318366) was cancelled by hand about 2.5 minutes into the agent step: the steps after the agent were skipped, `render` and `post` were cancelled, nothing was posted, and the cache and the report were untouched. That is why the agent step has its own timeout below the job's: a cancelled job skips every step after the agent, while a timed-out step lets the record be read, handed on and posted. Run [43475406631](https://github.com/marcusrbrown/systematic/actions/runs/43475406631) (a dispatch with `FRO_BOT_CONNECT_STEP_TIMEOUT` set to 2) ran that path live: the log shows `The action 'Run ce:connect' has timed out after 2 minutes.`, the next step then read the record (`ce:connect ended: no-final-line (agent step: failure).`), `render` logged `Rendered 0 of 0 open candidates, 0 new; outcome no-final-line.`, `post` ran its `Write report` step, and the final `Settle result` step failed red, so the workflow ended `failure`. Not observed live: a busy run, which cannot happen in CI by construction (the lock is never cached or handed off, each run gets a fresh runner, and the concurrency group serializes runs). The workflow tests cover the timeout path against stubbed `gh`, `git` and `npm`.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type ConnectConfigOptions, type HostSupportRow } from './lib/connect-config.js';
|
|
1
|
+
import { type ConnectConfigOptions, type HostSupportRow, type KnownBadHostVersion } from './lib/connect-config.js';
|
|
2
2
|
import { type ConnectBounds } from './lib/connect-evidence.js';
|
|
3
3
|
import { type InvocationWriteOptions, type ProcessTable, type PublishOptions } from './lib/connect-state.js';
|
|
4
4
|
/**
|
|
@@ -29,6 +29,8 @@ export interface HelperDeps {
|
|
|
29
29
|
/** The pid recorded as the lock holder. Defaults to the nearest non-shell ancestor. */
|
|
30
30
|
readonly holderPid?: number;
|
|
31
31
|
readonly hostTable?: readonly HostSupportRow[];
|
|
32
|
+
/** Host and version pairs refused as known-bad. Defaults to the shipped list. */
|
|
33
|
+
readonly knownBadHosts?: readonly KnownBadHostVersion[];
|
|
32
34
|
readonly gitBinary?: string;
|
|
33
35
|
readonly bounds?: Partial<ConnectBounds>;
|
|
34
36
|
readonly inspector?: ProcessInspector;
|
package/dist/lib/connect-ci.d.ts
CHANGED
|
@@ -110,8 +110,8 @@ export type RenderResult = {
|
|
|
110
110
|
readonly hidden: number;
|
|
111
111
|
/** Candidates listed for the first time on this date. */
|
|
112
112
|
readonly fresh: number;
|
|
113
|
-
/** The
|
|
114
|
-
readonly
|
|
113
|
+
/** The `<run>.<attempt>` fetch words of the listed candidates, in the order they appear. */
|
|
114
|
+
readonly fetches: readonly string[];
|
|
115
115
|
readonly outcome: ReportOutcome;
|
|
116
116
|
/** The workflow job turns red after posting. */
|
|
117
117
|
readonly red: boolean;
|
|
@@ -178,13 +178,16 @@ export declare function resolveAllowList(entries: readonly string[], options?: A
|
|
|
178
178
|
export declare const CONNECT_HOSTS: readonly ['opencode-v1', 'opencode-v2', 'pi', 'claude-code'];
|
|
179
179
|
export type ConnectHost = (typeof CONNECT_HOSTS)[number];
|
|
180
180
|
/**
|
|
181
|
-
* One host and
|
|
182
|
-
*
|
|
183
|
-
*
|
|
184
|
-
* `observedBy` names it. A test is
|
|
185
|
-
*
|
|
186
|
-
* entry
|
|
187
|
-
*
|
|
181
|
+
* One host and the lowest version where the researcher's tool limits were
|
|
182
|
+
* observed to hold, with the host-specific evidence. The evidence is a
|
|
183
|
+
* real-host refusal test, a test showing the allowlist reaching the delegate
|
|
184
|
+
* session, or a recorded manual observation. `observedBy` names it. A test is
|
|
185
|
+
* named as `<file> > <test title>`. A manual observation is named as
|
|
186
|
+
* `HARNESSES.md > <entry id>`; a unit test requires that entry to exist and to
|
|
187
|
+
* be marked manual evidence. A row without `observedBy` supports nothing.
|
|
188
|
+
*
|
|
189
|
+
* `version` is a floor, not an exact match: it and every newer release in the
|
|
190
|
+
* same major version are supported (see `checkHostSupport`).
|
|
188
191
|
*/
|
|
189
192
|
export interface HostSupportRow {
|
|
190
193
|
readonly host: ConnectHost;
|
|
@@ -192,28 +195,79 @@ export interface HostSupportRow {
|
|
|
192
195
|
readonly observedBy: string;
|
|
193
196
|
}
|
|
194
197
|
/**
|
|
195
|
-
*
|
|
196
|
-
*
|
|
197
|
-
*
|
|
198
|
-
*
|
|
199
|
-
|
|
200
|
-
|
|
198
|
+
* A host and exact version where the proof failed: the researcher's tool limits
|
|
199
|
+
* were seen not to hold. It is refused even when a row's floor is below it.
|
|
200
|
+
* `evidence` records where the failure was seen. It is documentation: a
|
|
201
|
+
* listed pair is refused whatever the text says.
|
|
202
|
+
*/
|
|
203
|
+
export interface KnownBadHostVersion {
|
|
204
|
+
readonly host: ConnectHost;
|
|
205
|
+
readonly version: string;
|
|
206
|
+
readonly evidence: string;
|
|
207
|
+
}
|
|
208
|
+
/**
|
|
209
|
+
* The supported hosts, one floor per host. A row is added only for a host with
|
|
210
|
+
* host-specific evidence that the shipped agent's tool limits hold: a real-host
|
|
211
|
+
* refusal test, an allowlist reaching the delegate session, or a recorded
|
|
212
|
+
* manual observation marked as manual evidence. The `claude-code` row rests on
|
|
213
|
+
* a recorded manual tool-list observation, not a tested refusal, because that
|
|
214
|
+
* host cannot be driven by a scripted model here.
|
|
201
215
|
*
|
|
202
|
-
*
|
|
203
|
-
*
|
|
216
|
+
* Each `version` is the lowest version where the limits were observed. That
|
|
217
|
+
* version and any newer release of the same host and major version is
|
|
218
|
+
* supported, so a host update does not need a Systematic release. A row does
|
|
219
|
+
* not follow the host pins that the host contract tests run against: raise or
|
|
220
|
+
* add a row only when the limits are observed on a different release, and put a
|
|
221
|
+
* release that fails the proof in `KNOWN_BAD_HOST_VERSIONS`.
|
|
204
222
|
*/
|
|
205
223
|
export declare const HOST_SUPPORT_TABLE: readonly HostSupportRow[];
|
|
224
|
+
/**
|
|
225
|
+
* Host and version pairs where the proof failed. Each is refused with the
|
|
226
|
+
* reason `known-bad`, even above its host's floor, and in every mode: unlike
|
|
227
|
+
* the other refusals, no consent runs it. Empty until a release is seen to
|
|
228
|
+
* break the tool limits.
|
|
229
|
+
*/
|
|
230
|
+
export declare const KNOWN_BAD_HOST_VERSIONS: readonly KnownBadHostVersion[];
|
|
206
231
|
export type HostSupportVerdict = {
|
|
207
232
|
readonly supported: true;
|
|
208
233
|
readonly row: HostSupportRow;
|
|
209
234
|
} | {
|
|
210
235
|
readonly supported: false;
|
|
211
|
-
/**
|
|
212
|
-
|
|
236
|
+
/**
|
|
237
|
+
* `unobserved`: no usable version, or one that is not dotted numbers.
|
|
238
|
+
* `unlisted`: no row covers this host, or the version is a prerelease or
|
|
239
|
+
* in a major version no row names.
|
|
240
|
+
* `below-floor`: older than the lowest version observed for the host.
|
|
241
|
+
* `known-bad`: the pair is on the known-bad list.
|
|
242
|
+
*/
|
|
243
|
+
readonly reason: 'unobserved' | 'unlisted' | 'below-floor' | 'known-bad';
|
|
213
244
|
};
|
|
214
245
|
/**
|
|
215
|
-
*
|
|
216
|
-
*
|
|
217
|
-
*
|
|
246
|
+
* A version as the skill reports it: trimmed, one leading `v` dropped, and
|
|
247
|
+
* SemVer build metadata (everything from the first `+`) cut off, because build
|
|
248
|
+
* metadata does not change which release a build is. A prerelease tag stays,
|
|
249
|
+
* so `1.19.5-rc.1` is not `1.19.5`. `undefined` when no version is left.
|
|
250
|
+
*/
|
|
251
|
+
export declare function normalizeVersion(version: unknown): string | undefined;
|
|
252
|
+
/**
|
|
253
|
+
* Check an observed host and version against the table. The rule, in order:
|
|
254
|
+
*
|
|
255
|
+
* 1. A version that is missing or is not dotted numbers (`2.2.9`, optionally
|
|
256
|
+
* with a `-` prerelease tag after it) is `unobserved`.
|
|
257
|
+
* 2. A host and version on the known-bad list is refused as `known-bad`.
|
|
258
|
+
* 3. A version equal to a row's version is supported.
|
|
259
|
+
* 4. A prerelease (`2.2.8-rc.1`) is refused as `unlisted` unless it equals a
|
|
260
|
+
* row exactly: a prerelease is not a release the proof ran against.
|
|
261
|
+
* 5. Otherwise the row's version is a floor within its own major version. The
|
|
262
|
+
* version is supported when some row of the host has the same major and a
|
|
263
|
+
* version at or below it; the row with the highest such version is
|
|
264
|
+
* returned. A version below that floor is `below-floor`. A higher major
|
|
265
|
+
* version has no row of its own, so it is `unlisted`: OpenCode v1 and v2
|
|
266
|
+
* are already separate hosts, and a new major version is a new host to
|
|
267
|
+
* prove, not an update.
|
|
268
|
+
* 6. A host no row names is `unlisted`.
|
|
269
|
+
*
|
|
270
|
+
* Parts compare as numbers (`2.2.10` is newer than `2.2.9`) and build
|
|
271
|
+
* metadata is ignored, as `normalizeVersion` drops it.
|
|
218
272
|
*/
|
|
219
|
-
export declare function checkHostSupport(host: unknown, version: unknown, table?: readonly HostSupportRow[]): HostSupportVerdict;
|
|
273
|
+
export declare function checkHostSupport(host: unknown, version: unknown, table?: readonly HostSupportRow[], knownBad?: readonly KnownBadHostVersion[]): HostSupportVerdict;
|
|
@@ -343,6 +343,11 @@ export interface DigestModel {
|
|
|
343
343
|
readonly host?: string;
|
|
344
344
|
readonly version?: string;
|
|
345
345
|
readonly consented?: boolean;
|
|
346
|
+
/**
|
|
347
|
+
* The version the tool denies were observed on, set only when the run's
|
|
348
|
+
* version is a different, newer release that the host row supports.
|
|
349
|
+
*/
|
|
350
|
+
readonly observedOn?: string;
|
|
346
351
|
};
|
|
347
352
|
readonly degradeReasons: readonly string[];
|
|
348
353
|
/** What the run was narrowed to. */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fro.bot/systematic",
|
|
3
|
-
"version": "3.33.
|
|
3
|
+
"version": "3.33.2",
|
|
4
4
|
"description": "Compound-engineering loops for OpenCode, Pi, and Claude Code",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"homepage": "https://fro.bot/systematic",
|
|
@@ -119,12 +119,12 @@
|
|
|
119
119
|
},
|
|
120
120
|
"devDependencies": {
|
|
121
121
|
"@biomejs/biome": "2.6.6",
|
|
122
|
-
"@earendil-works/pi-coding-agent": "1.5.
|
|
122
|
+
"@earendil-works/pi-coding-agent": "1.5.2",
|
|
123
123
|
"@opencode-ai/plugin": "1.19.5",
|
|
124
124
|
"@opencode-ai/sdk": "1.19.5",
|
|
125
|
-
"@opencode/client": "2.2.
|
|
126
|
-
"@opencode/plugin": "2.2.
|
|
127
|
-
"@opencode/sdk": "2.2.
|
|
125
|
+
"@opencode/client": "2.2.7",
|
|
126
|
+
"@opencode/plugin": "2.2.7",
|
|
127
|
+
"@opencode/sdk": "2.2.7",
|
|
128
128
|
"@semantic-release/exec": "7.1.0",
|
|
129
129
|
"@tintinweb/pi-subagents": "0.22.1",
|
|
130
130
|
"@types/bun": "latest",
|
|
@@ -147,7 +147,7 @@
|
|
|
147
147
|
"zod": "4.6.7"
|
|
148
148
|
},
|
|
149
149
|
"overrides": {
|
|
150
|
-
"@earendil-works/pi-ai": "1.5.
|
|
150
|
+
"@earendil-works/pi-ai": "1.5.2",
|
|
151
151
|
"brace-expansion": "^5.0.8",
|
|
152
152
|
"conventional-changelog-writer": ">=9",
|
|
153
153
|
"devalue": "^5.9.3",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: ce:connect
|
|
3
3
|
description: "Use when searching the projects the user has allowed for contradictions between their learnings, or for a lesson that one project recorded and a sibling project still needs. Also use when the user asks what their other projects have learned about a failure."
|
|
4
|
-
argument-hint: "[mode:headless | mode:interactive] [group:<name> | projects:<a>,<b> | fetch:<run>]"
|
|
4
|
+
argument-hint: "[mode:headless | mode:interactive] [group:<name> | projects:<a>,<b> | fetch:<run>[.<attempt>]]"
|
|
5
5
|
metadata:
|
|
6
6
|
harness-portability: neutral-v1
|
|
7
7
|
---
|
|
@@ -57,11 +57,11 @@ In the same pass, list every word that starts with `group:` or `projects:`, from
|
|
|
57
57
|
|
|
58
58
|
### Fetch word
|
|
59
59
|
|
|
60
|
-
In the same pass, list every word that starts with `fetch:`. `fetch:<run>` brings the candidates of a scheduled CI run to this machine
|
|
60
|
+
In the same pass, list every word that starts with `fetch:`. `fetch:<run>.<attempt>` brings the candidates of a scheduled CI run to this machine from exactly that attempt of the run. A bare `fetch:<run>` means the newest attempt of that run. A scheduled report prints the `<run>.<attempt>` form. `<run>` is the GitHub run id and `<attempt>` the attempt number; each is a positive integer, digits only, with no sign, no space and no leading zero. A `<run>` has at most 20 digits and an `<attempt>` at most 10. The value must match `^[1-9][0-9]{0,19}(\.[1-9][0-9]{0,9})?$` and nothing else. The same `fetch:` word twice or more counts once. `fetch:<run>` and `fetch:<run>.<attempt>` are different words.
|
|
61
61
|
|
|
62
62
|
- A `fetch:` word together with a `group:` or `projects:` word: stop. The reason is `conflicting-selection: fetch: cannot be combined with group: or projects:`.
|
|
63
63
|
- Two different `fetch:` words: stop. The reason is `conflicting-selection: two different fetch: words`.
|
|
64
|
-
- A `fetch:` value that
|
|
64
|
+
- A `fetch:` value that does not match that pattern, such as an empty one, a zero attempt or a second dot: stop. The reason is `invalid-request: fetch: needs a numeric GitHub run id`. Check this before any value reaches a command.
|
|
65
65
|
- A stop here happens before any command, in the two-line form of Step 1.
|
|
66
66
|
- One valid `fetch:` word: skip Steps 2 to 7 and follow `references/fetch-and-import.md`. A fetch observes no host, dispatches no agent, asks nothing and takes no mode: `mode:` has no effect on it. It ends with the final line that reference names.
|
|
67
67
|
|
|
@@ -73,7 +73,7 @@ The helper needs node 18 or newer. Check `node --version` once. If node is missi
|
|
|
73
73
|
|
|
74
74
|
Shell state does not persist between tool calls. Start every block that calls the helper with the same two anchor lines, with `SKILL_DIR` set to the skill directory stated when this skill loads.
|
|
75
75
|
|
|
76
|
-
Observe the host and its version.
|
|
76
|
+
Observe the host and its version. For each host, the helper holds the lowest version where the researcher's tool limits were seen to work. It supports that version and any newer release of the same major version, and it checks the pair you report against that.
|
|
77
77
|
|
|
78
78
|
| Host you are running in | `host` | Run |
|
|
79
79
|
|---|---|---|
|
|
@@ -82,7 +82,7 @@ Observe the host and its version. The helper holds the list of host and version
|
|
|
82
82
|
| Pi | `pi` | `pi --version` |
|
|
83
83
|
| The `claude` command line tool | `claude-code` | `claude --version` |
|
|
84
84
|
|
|
85
|
-
Send `version` as the first token the command prints that starts with a digit (after an optional `v`), exactly as printed. Keep any `-` prerelease tag or `+` build suffix: the helper ignores build suffixes and
|
|
85
|
+
Send `version` as the first token the command prints that starts with a digit (after an optional `v`), exactly as printed. Keep any `-` prerelease tag or `+` build suffix: the helper ignores build suffixes and does not support a prerelease version, so you decide neither. Never trim, round or strip any part of it. `claude --version` prints the version and then a name in parentheses, such as `2.1.319 (...)`: send `2.1.319`, not the whole line. If you cannot tell which host this is, or the command fails or prints no version, leave `version` out or use the host id `unknown`. Never guess a host or a version: a pair the helper cannot check counts as unsupported.
|
|
86
86
|
|
|
87
87
|
Report what you observed, in one line, so the user can see it.
|
|
88
88
|
|
|
@@ -101,8 +101,8 @@ When Step 1 found selection words, add `"selection": ["<word>", "<word>"]` to th
|
|
|
101
101
|
The helper answers one line of JSON. Read `outcome` or `status`:
|
|
102
102
|
|
|
103
103
|
- `begun`: the lock is held. Note `runId`, `lock`, `workDir`, `rulesFile`, `rulesOverview`, `filesIndex`, `selection`, `projects`, `unmatched`, `ruleCount`, `offeredRuleIds`, `offeredCount`, `sweep`, `bounds`, `degradeReasons` and `unread`. Go on.
|
|
104
|
-
- `consent-required` (interactive mode): the host and version
|
|
105
|
-
- `unsupported-host` (headless mode, a `failed` outcome): print it with the helper's `hostSupport`, then `Connect failed`. Headless mode never asks for consent.
|
|
104
|
+
- `consent-required` (interactive mode): the host and version are not supported, so no deny was observed for them. The helper's `hostSupport` says why. Show the helper's `warning` as it is and ask the user whether to run anyway. Wait for the answer. On a clear yes, run `begin` again with `"consent": true` added. On anything else, print `consent-declined` as the reason, then `Connect failed`. No lock was taken.
|
|
105
|
+
- `unsupported-host` (headless mode, a `failed` outcome): print it with the helper's `hostSupport`, then `Connect failed`. Headless mode never asks for consent. In interactive mode the same answer with `hostSupport` `known-bad` means the version failed the check: print it, then `Connect failed`. Consent cannot run it, so do not offer to.
|
|
106
106
|
- `busy`: print the helper's `reason` and `hint`, then `Connect busy`. Nothing was written. Never run `ledger unlock` yourself on a `busy` answer. In interactive mode you may tell the user that it exists (see `references/headless-and-outcomes.md`).
|
|
107
107
|
- A selection refusal, a `failed` outcome with one of these reasons: `conflicting-selection` (with `detail`), `unknown-group` (`group`), `unknown-project` (`project`), `ambiguous-project` (`project` and `keys`; the user can name one of the keys instead), `group-member-not-allowed` (`group`, `member`, and `memberReason` when the member did not resolve) or `invalid-request` for a malformed word. Print the `reason` and the fields it names, then `Connect failed`. No lock was taken and nothing was written, so there is nothing to abort or unlock. Never retry with a different selection and never fall back to the whole allow list: the user asked for a narrower run.
|
|
108
108
|
- Any other `failed` outcome, including `no-allowed-projects` and `state-root-refused`: print the `reason`, add each `unmatched` entry with its reason when there are any, then `Connect failed`.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Fetch and import
|
|
2
2
|
|
|
3
|
-
`fetch:<run>` brings the candidates of a scheduled CI run to this machine, so a lesson the runner found can be promoted here after the runner is gone. The skill does the part that needs the network, with the user's own `gh`. The helper's `import` operation does the rest and never touches the network.
|
|
3
|
+
`fetch:<run>.<attempt>` brings the candidates of one attempt of a scheduled CI run to this machine, so a lesson the runner found can be promoted here after the runner is gone. A bare `fetch:<run>` does the same for the newest attempt of that run. In every command below, `<run>` and `<attempt>` are the numbers `SKILL.md` already checked: positive integers, nothing else. The skill does the part that needs the network, with the user's own `gh`. The helper's `import` operation does the rest and never touches the network.
|
|
4
4
|
|
|
5
5
|
A fetch dispatches no agent, asks nothing and takes no host observation. It uses neither `begin` nor `publish`. It ends with the `finalLine` that `import` answers, or with `Connect failed` for a stop before `import`.
|
|
6
6
|
|
|
@@ -36,10 +36,16 @@ It prints one JSON array of `{name, expired}` objects. Check the call before you
|
|
|
36
36
|
- The command fails because `gh` is not logged in: stop with `gh-not-authenticated`.
|
|
37
37
|
- The command fails for any other reason (a non-zero exit), or its output is not a JSON array: stop with `artifact-list-failed`. An empty array is an answer; a failed call is not. Never read a failed call as `artifact-not-found`.
|
|
38
38
|
|
|
39
|
-
The record is in an artifact named `connect-run-<run>-<attempt>`, where `<attempt>` is digits only. Take the names that match that pattern for this run id exactly
|
|
39
|
+
The record is in an artifact named `connect-run-<run>-<attempt>`, where `<attempt>` is digits only. Take the names that match that pattern for this run id exactly.
|
|
40
|
+
|
|
41
|
+
- With a bare `fetch:<run>`, pick the one with the highest attempt. A run with attempts 1 and 2 downloads `connect-run-<run>-2`.
|
|
42
|
+
- With `fetch:<run>.<attempt>`, download exactly `connect-run-<run>-<attempt>` with that attempt. Do not pick the highest attempt. A report names the attempt a candidate came from, and a later attempt may not hold it.
|
|
43
|
+
|
|
44
|
+
Then:
|
|
40
45
|
|
|
41
46
|
- The call succeeded and no name matches: stop with `artifact-not-found`.
|
|
42
47
|
- The chosen artifact is expired: stop with `artifact-expired`. The user can tick Rejected in the scheduled run's report, or wait for the candidate to be proposed again.
|
|
48
|
+
- If the named attempt has no artifact, stop with `artifact-not-found`, even when another attempt of the run has one. If the named attempt's artifact is expired, stop with `artifact-expired`. Print the fixed reason and its hint only. Never fall back to another attempt and do not suggest one.
|
|
43
49
|
|
|
44
50
|
### 3. Download into a fresh directory
|
|
45
51
|
|
|
@@ -69,7 +75,7 @@ node "$SKILL_DIR/scripts/connect.mjs" import <<'JSON'
|
|
|
69
75
|
JSON
|
|
70
76
|
```
|
|
71
77
|
|
|
72
|
-
`directory` is the absolute path `mktemp -d` printed. `runId` is the run id from the `fetch:` word. Leave `commit` out when step 1 gave none.
|
|
78
|
+
`directory` is the absolute path `mktemp -d` printed. `runId` is the run id from the `fetch:` word, without the attempt. Leave `commit` out when step 1 gave none. The record carries no attempt, so the request carries none either: the artifact name in step 2 is the only place the attempt is checked.
|
|
73
79
|
|
|
74
80
|
If `node` is missing, the helper file is gone, or `import` prints no JSON answer, the helper is unavailable. Remove `<DEST>`, print `helper-unavailable` and its hint, then `Connect failed`. Nothing was imported.
|
|
75
81
|
|
|
@@ -97,7 +103,7 @@ Print the reason as it is, then the hint.
|
|
|
97
103
|
| `run-not-found` | No run with that id in `marcusrbrown/systematic`. |
|
|
98
104
|
| `gh-not-authenticated` | `gh` is not logged in, or its token cannot read this repository's runs. Run `gh auth login` and try again. |
|
|
99
105
|
| `artifact-list-failed` | `gh` could not list the run's artifacts, or its answer was not a JSON array. Nothing was downloaded. Try again. |
|
|
100
|
-
| `artifact-not-found` | The run has no `connect-run-<run>-<attempt>` artifact. It stopped before it made a record. |
|
|
106
|
+
| `artifact-not-found` | The run has no `connect-run-<run>-<attempt>` artifact for the attempt asked for. It stopped before it made a record. |
|
|
101
107
|
| `artifact-expired` | The record was kept for a limited time and is gone. Tick Rejected in the report, or wait for the candidate to be proposed again. |
|
|
102
108
|
| `download-failed` | `gh run download` failed for another reason. Nothing was imported. |
|
|
103
109
|
| `record-missing`, `record-symlink`, `record-not-regular`, `record-unreadable`, `directory-unreadable` | The downloaded directory does not hold a plain `run.json`. |
|
|
@@ -36,14 +36,14 @@ The digest header and the run record name the selection: `all`, the group, or th
|
|
|
36
36
|
|
|
37
37
|
## Reading a fetch
|
|
38
38
|
|
|
39
|
-
A `fetch:<run>` word is read from the same place as the mode tokens and the selection words. It brings the candidates of a scheduled CI run to this machine and follows `fetch-and-import.md`.
|
|
39
|
+
A `fetch:<run>.<attempt>` word, or a bare `fetch:<run>` for the newest attempt, is read from the same place as the mode tokens and the selection words. It brings the candidates of a scheduled CI run to this machine and follows `fetch-and-import.md`.
|
|
40
40
|
|
|
41
41
|
| Words found | Result |
|
|
42
42
|
|---|---|
|
|
43
|
-
| One `fetch:<run>`, or the same word twice or more | A fetch of that run. It observes no host, dispatches no agent and asks nothing, so `mode:` has no effect. |
|
|
43
|
+
| One `fetch:<run>.<attempt>` or `fetch:<run>`, or the same word twice or more | A fetch of that attempt, or of the newest attempt of that run. It observes no host, dispatches no agent and asks nothing, so `mode:` has no effect. |
|
|
44
44
|
| `fetch:` with a `group:` or `projects:` word | Stop: `conflicting-selection`. |
|
|
45
45
|
| Two different `fetch:` words | Stop: `conflicting-selection`. |
|
|
46
|
-
| An empty value, or a value that is not
|
|
46
|
+
| An empty value, or a value that is not a positive run id, or a run id and a positive attempt | Stop: `invalid-request`. |
|
|
47
47
|
|
|
48
48
|
A stop here happens before any command. End as for a failed run: the reason on a line of its own, then `Connect failed`.
|
|
49
49
|
|
|
@@ -51,7 +51,7 @@ A stop here happens before any command. End as for a failed run: the reason on a
|
|
|
51
51
|
|
|
52
52
|
Headless mode asks no question and offers nothing after the digest. It does not wait for input of any kind.
|
|
53
53
|
|
|
54
|
-
- A host and version
|
|
54
|
+
- A host and version the helper does not support is refused: `begin` answers `unsupported-host`. Supported means the lowest version where the tool limits were observed, or any newer release of the same host and major version. A version below that, a prerelease, an unknown host, a version the helper cannot read and a release on its known-bad list are all refused. Interactive mode asks consent instead, except for a known-bad release: that is refused in every mode, and consent does not change it.
|
|
55
55
|
- A user decision (`decide`) is never taken. The digest is the only output.
|
|
56
56
|
- Anything unclear is a stop with a reason, not a question.
|
|
57
57
|
|
|
@@ -95,7 +95,7 @@ Print the helper's `reason` as it is, then add the hint when one fits.
|
|
|
95
95
|
| Reason | Hint |
|
|
96
96
|
|---|---|
|
|
97
97
|
| `helper-unavailable` | The skill could not start the helper (node is missing or the helper file is gone). Nothing was published. Not a data problem. |
|
|
98
|
-
| `unsupported-host` | The host and version
|
|
98
|
+
| `unsupported-host` | The host and version are not supported. The helper's `hostSupport` says why: `below-floor` (older than the lowest version with observed tool limits), `unlisted` (an unknown host, a prerelease, or a major version no row covers), `unobserved` (no readable version) or `known-bad` (a release where the limits were seen to fail). Run interactively and accept the warning, or use a supported host. A `known-bad` version cannot be run at all, in any mode, even with consent: use a different version of the host. |
|
|
99
99
|
| `no-allowed-projects` | The allow list is empty or no entry matched a project. List the entries that did not match, with the reason the helper gives for each. |
|
|
100
100
|
| `conflicting-selection` | The words name more than one selection. The helper's `detail` says which combination. Use one `group:` word, or one `projects:` word. A `fetch:` word stands alone. |
|
|
101
101
|
| `unknown-group` | No group of that name is in the user's config (`group`). |
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// biome-ignore-all assist/source/organizeImports: generated bundle
|
|
3
3
|
// Generated by scripts/generate-ce-connect-helper.ts; do not edit by hand.
|
|
4
4
|
// Run `bun run ce-connect-helper:build` to regenerate.
|
|
5
|
-
// source-digest:
|
|
5
|
+
// source-digest: 88c88308f918761b669816ad82892c1533d1f46c86b71eeab1433d2e9663f381
|
|
6
6
|
// src/ce-connect-helper.ts
|
|
7
7
|
import { spawnSync as spawnSync3 } from 'node:child_process'
|
|
8
8
|
import fs10 from 'node:fs'
|
|
@@ -1473,7 +1473,7 @@ var HOST_SUPPORT_TABLE = [
|
|
|
1473
1473
|
},
|
|
1474
1474
|
{
|
|
1475
1475
|
host: 'opencode-v2',
|
|
1476
|
-
version: '2.2.
|
|
1476
|
+
version: '2.2.5',
|
|
1477
1477
|
observedBy:
|
|
1478
1478
|
'tests/integration/opencode-v2.test.ts > a session-level allow does not lift the guarded researcher when a parent with that rule dispatches it',
|
|
1479
1479
|
},
|
|
@@ -1489,6 +1489,7 @@ var HOST_SUPPORT_TABLE = [
|
|
|
1489
1489
|
observedBy: 'HARNESSES.md > CN-5',
|
|
1490
1490
|
},
|
|
1491
1491
|
]
|
|
1492
|
+
var KNOWN_BAD_HOST_VERSIONS = []
|
|
1492
1493
|
function normalizeVersion(version) {
|
|
1493
1494
|
if (typeof version !== 'string') return
|
|
1494
1495
|
const withoutV = version.trim().replace(/^v/i, '')
|
|
@@ -1496,19 +1497,92 @@ function normalizeVersion(version) {
|
|
|
1496
1497
|
const core = (plus === -1 ? withoutV : withoutV.slice(0, plus)).trim()
|
|
1497
1498
|
return core === '' ? undefined : core
|
|
1498
1499
|
}
|
|
1499
|
-
|
|
1500
|
+
var VERSION_SHAPE = /^(\d+(?:\.\d+)*)(-[0-9A-Za-z.-]+)?$/
|
|
1501
|
+
function parseVersion(version) {
|
|
1502
|
+
if (version === undefined) return
|
|
1503
|
+
const match = VERSION_SHAPE.exec(version)
|
|
1504
|
+
const core = match?.[1]
|
|
1505
|
+
if (core === undefined) return
|
|
1506
|
+
return { parts: core.split('.'), prerelease: match?.[2] !== undefined }
|
|
1507
|
+
}
|
|
1508
|
+
function comparePart(a, b) {
|
|
1509
|
+
const left = a.replace(/^0+(?=\d)/, '')
|
|
1510
|
+
const right = b.replace(/^0+(?=\d)/, '')
|
|
1511
|
+
if (left.length !== right.length) return left.length < right.length ? -1 : 1
|
|
1512
|
+
if (left === right) return 0
|
|
1513
|
+
return left < right ? -1 : 1
|
|
1514
|
+
}
|
|
1515
|
+
function compareParts(a, b) {
|
|
1516
|
+
const length = Math.max(a.length, b.length)
|
|
1517
|
+
for (let index = 0; index < length; index += 1) {
|
|
1518
|
+
const order = comparePart(a[index] ?? '0', b[index] ?? '0')
|
|
1519
|
+
if (order !== 0) return order
|
|
1520
|
+
}
|
|
1521
|
+
return 0
|
|
1522
|
+
}
|
|
1523
|
+
function highestFloorBelow(floors, parts) {
|
|
1524
|
+
let best
|
|
1525
|
+
for (const floor of floors) {
|
|
1526
|
+
if (compareParts(floor.parts, parts) > 0) continue
|
|
1527
|
+
if (best === undefined || compareParts(floor.parts, best.parts) > 0) {
|
|
1528
|
+
best = floor
|
|
1529
|
+
}
|
|
1530
|
+
}
|
|
1531
|
+
return best
|
|
1532
|
+
}
|
|
1533
|
+
function checkFloors(floors, parts) {
|
|
1534
|
+
const sameMajor = floors.filter(
|
|
1535
|
+
(floor) => comparePart(floor.parts[0] ?? '0', parts[0] ?? '0') === 0,
|
|
1536
|
+
)
|
|
1537
|
+
if (sameMajor.length > 0) {
|
|
1538
|
+
const best = highestFloorBelow(sameMajor, parts)
|
|
1539
|
+
return best === undefined
|
|
1540
|
+
? { supported: false, reason: 'below-floor' }
|
|
1541
|
+
: { supported: true, row: best.row }
|
|
1542
|
+
}
|
|
1543
|
+
const belowEveryFloor =
|
|
1544
|
+
floors.length > 0 &&
|
|
1545
|
+
floors.every((floor) => compareParts(parts, floor.parts) < 0)
|
|
1546
|
+
return {
|
|
1547
|
+
supported: false,
|
|
1548
|
+
reason: belowEveryFloor ? 'below-floor' : 'unlisted',
|
|
1549
|
+
}
|
|
1550
|
+
}
|
|
1551
|
+
function checkHostSupport(
|
|
1552
|
+
host,
|
|
1553
|
+
version,
|
|
1554
|
+
table = HOST_SUPPORT_TABLE,
|
|
1555
|
+
knownBad = KNOWN_BAD_HOST_VERSIONS,
|
|
1556
|
+
) {
|
|
1500
1557
|
const observed = normalizeVersion(version)
|
|
1501
|
-
|
|
1502
|
-
|
|
1558
|
+
const parsed = parseVersion(observed)
|
|
1559
|
+
if (observed === undefined || parsed === undefined) {
|
|
1560
|
+
return { supported: false, reason: 'unobserved' }
|
|
1561
|
+
}
|
|
1562
|
+
if (
|
|
1563
|
+
knownBad.some(
|
|
1564
|
+
(entry) =>
|
|
1565
|
+
entry.host === host && normalizeVersion(entry.version) === observed,
|
|
1566
|
+
)
|
|
1567
|
+
) {
|
|
1568
|
+
return { supported: false, reason: 'known-bad' }
|
|
1569
|
+
}
|
|
1570
|
+
const rows = table.filter(
|
|
1503
1571
|
(candidate) =>
|
|
1504
1572
|
candidate.host === host &&
|
|
1505
1573
|
typeof candidate.observedBy === 'string' &&
|
|
1506
|
-
candidate.observedBy.trim() !== ''
|
|
1507
|
-
normalizeVersion(candidate.version) === observed,
|
|
1574
|
+
candidate.observedBy.trim() !== '',
|
|
1508
1575
|
)
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1576
|
+
const exact = rows.find(
|
|
1577
|
+
(candidate) => normalizeVersion(candidate.version) === observed,
|
|
1578
|
+
)
|
|
1579
|
+
if (exact !== undefined) return { supported: true, row: exact }
|
|
1580
|
+
if (parsed.prerelease) return { supported: false, reason: 'unlisted' }
|
|
1581
|
+
const floors = rows.flatMap((row) => {
|
|
1582
|
+
const floor = parseVersion(normalizeVersion(row.version))
|
|
1583
|
+
return floor === undefined ? [] : [{ row, parts: floor.parts }]
|
|
1584
|
+
})
|
|
1585
|
+
return checkFloors(floors, parsed.parts)
|
|
1512
1586
|
}
|
|
1513
1587
|
|
|
1514
1588
|
// src/lib/connect-evidence.ts
|
|
@@ -6748,7 +6822,11 @@ function renderCandidate(item, index) {
|
|
|
6748
6822
|
function hostLine(model) {
|
|
6749
6823
|
const host = model.hostSupport
|
|
6750
6824
|
const name = inline(`${host.host ?? 'unknown'} ${host.version ?? ''}`.trim())
|
|
6751
|
-
if (host.supported)
|
|
6825
|
+
if (host.supported) {
|
|
6826
|
+
return host.observedOn === undefined
|
|
6827
|
+
? `Host: ${name} (tool denies observed)`
|
|
6828
|
+
: `Host: ${name} (tool denies observed on ${inline(host.observedOn)}, not on this version)`
|
|
6829
|
+
}
|
|
6752
6830
|
const agreed =
|
|
6753
6831
|
host.consented === true ? '; the user agreed to run anyway' : ''
|
|
6754
6832
|
return `Host: ${name} (tool denies NOT verified on this host${agreed})`
|
|
@@ -9040,13 +9118,16 @@ function factsOf(id, payload) {
|
|
|
9040
9118
|
return lines.join(`
|
|
9041
9119
|
`)
|
|
9042
9120
|
}
|
|
9121
|
+
function fetchWord(payload) {
|
|
9122
|
+
return `${payload.runId}.${payload.attempt}`
|
|
9123
|
+
}
|
|
9043
9124
|
function blockOf(position, id, payload, isNew) {
|
|
9044
9125
|
const lines = [`### Candidate ${position}${isNew ? ' (new)' : ''}`, '']
|
|
9045
9126
|
if (payload === undefined) {
|
|
9046
9127
|
lines.push(`Details unavailable for \`${id}\`.`)
|
|
9047
9128
|
} else {
|
|
9048
9129
|
lines.push(
|
|
9049
|
-
`- Fetch: \`/ce:connect fetch:${payload
|
|
9130
|
+
`- Fetch: \`/ce:connect fetch:${fetchWord(payload)}\` (run ${payload.runId}, attempt ${payload.attempt})`,
|
|
9050
9131
|
'',
|
|
9051
9132
|
fenceText(factsOf(id, payload)),
|
|
9052
9133
|
)
|
|
@@ -9072,18 +9153,19 @@ function ranges(positions) {
|
|
|
9072
9153
|
.join(', ')
|
|
9073
9154
|
}
|
|
9074
9155
|
function fetchLines(rows) {
|
|
9075
|
-
const
|
|
9156
|
+
const byFetch = new Map()
|
|
9076
9157
|
rows.forEach((row, index) => {
|
|
9077
9158
|
if (row.payload === undefined) return
|
|
9078
|
-
const
|
|
9159
|
+
const word = fetchWord(row.payload)
|
|
9160
|
+
const list = byFetch.get(word) ?? []
|
|
9079
9161
|
list.push(index + 1)
|
|
9080
|
-
|
|
9162
|
+
byFetch.set(word, list)
|
|
9081
9163
|
})
|
|
9082
|
-
const lines = [...
|
|
9083
|
-
([
|
|
9084
|
-
`- \`/ce:connect fetch:${
|
|
9164
|
+
const lines = [...byFetch].map(
|
|
9165
|
+
([word, positions]) =>
|
|
9166
|
+
`- \`/ce:connect fetch:${word}\` for candidates ${ranges(positions)}`,
|
|
9085
9167
|
)
|
|
9086
|
-
return {
|
|
9168
|
+
return { fetches: [...byFetch.keys()], lines }
|
|
9087
9169
|
}
|
|
9088
9170
|
var RESET_NOTICE =
|
|
9089
9171
|
'> **Ledger reset.** No cache was restored for this run, so the ledger and the sweep started fresh. Earlier decisions are not remembered, and a tick for a candidate the ledger no longer knows is reported as unresolved.'
|
|
@@ -9144,7 +9226,7 @@ function assemble(input, shown) {
|
|
|
9144
9226
|
`),
|
|
9145
9227
|
ids,
|
|
9146
9228
|
hash,
|
|
9147
|
-
|
|
9229
|
+
fetches: fetch.fetches,
|
|
9148
9230
|
fresh,
|
|
9149
9231
|
}
|
|
9150
9232
|
}
|
|
@@ -9310,7 +9392,7 @@ function renderState(root, request, recordState) {
|
|
|
9310
9392
|
shown,
|
|
9311
9393
|
hidden: open.length - shown,
|
|
9312
9394
|
fresh: result.fresh,
|
|
9313
|
-
|
|
9395
|
+
fetches: result.fetches,
|
|
9314
9396
|
outcome,
|
|
9315
9397
|
red: isRed(outcome),
|
|
9316
9398
|
stateUpdated: recordState,
|
|
@@ -10821,14 +10903,22 @@ function releaseAndFail(op, lock, root, runId, reason, extra = {}) {
|
|
|
10821
10903
|
function hostPhrase(host, version) {
|
|
10822
10904
|
return version === undefined ? host : `${host} ${version}`
|
|
10823
10905
|
}
|
|
10906
|
+
function observedOnFor(verdict, version) {
|
|
10907
|
+
if (!verdict.supported) return {}
|
|
10908
|
+
const row = verdict.row.version
|
|
10909
|
+
return normalizeVersion(version) === normalizeVersion(row)
|
|
10910
|
+
? {}
|
|
10911
|
+
: { observedOn: row }
|
|
10912
|
+
}
|
|
10824
10913
|
function gateHost(parsed, deps) {
|
|
10825
10914
|
const verdict = checkHostSupport(
|
|
10826
10915
|
parsed.host,
|
|
10827
10916
|
parsed.version,
|
|
10828
10917
|
deps.hostTable ?? HOST_SUPPORT_TABLE,
|
|
10918
|
+
deps.knownBadHosts,
|
|
10829
10919
|
)
|
|
10830
10920
|
if (verdict.supported) return verdict
|
|
10831
|
-
if (parsed.mode === 'headless') {
|
|
10921
|
+
if (parsed.mode === 'headless' || verdict.reason === 'known-bad') {
|
|
10832
10922
|
return failure2('begin', 'unsupported-host', {
|
|
10833
10923
|
host: parsed.host,
|
|
10834
10924
|
version: parsed.version ?? null,
|
|
@@ -10993,6 +11083,7 @@ function indexRun(setup, deps) {
|
|
|
10993
11083
|
host: parsed.host,
|
|
10994
11084
|
...(parsed.version === undefined ? {} : { version: parsed.version }),
|
|
10995
11085
|
...(verdict.supported ? {} : { consented: true }),
|
|
11086
|
+
...observedOnFor(verdict, parsed.version),
|
|
10996
11087
|
},
|
|
10997
11088
|
lock: { nonce: lock.nonce, pid: lock.pid },
|
|
10998
11089
|
holder: setup.holder,
|
|
@@ -12618,7 +12709,7 @@ function renderReportOp(request, deps) {
|
|
|
12618
12709
|
shown: result.shown,
|
|
12619
12710
|
hidden: result.hidden,
|
|
12620
12711
|
fresh: result.fresh,
|
|
12621
|
-
|
|
12712
|
+
fetches: result.fetches,
|
|
12622
12713
|
outcome: result.outcome,
|
|
12623
12714
|
red: result.red,
|
|
12624
12715
|
stateUpdated: result.stateUpdated,
|