@fro.bot/systematic 3.36.0 → 3.38.0

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 CHANGED
@@ -117,7 +117,7 @@ The `ce:connect` skill dispatches `connections-researcher`, an agent that must n
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.
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. Calling the workflow from another repository, and the named `fetch:` that follows from it, rest on the probe runs in [CN-7], which also lists what was not observed.
121
121
 
122
122
  ## Worktree placement rule — bootstrap paths
123
123
 
@@ -308,3 +308,4 @@ Migrated-skill discipline is enforced by the [content-integrity gate](scripts/co
308
308
  - **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.
309
309
  - **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.
310
310
  - **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`.
311
+ - **CN-7** — Manual evidence from live probe runs of a reusable workflow called from a local wrapper and from a wrapper in another owner, not a CI check. Recorded 2026-11-20. Pins: the probe callee was a temporary commit based on Systematic `30b57460` (a first probe commit `3c00cc70`, then a cache-path fix `585df268`, both on a probe branch since deleted); the caller in another owner was `fro-bot/agent` (a probe branch based on `e70df737`, since deleted) calling it by full 40-hex SHA; action pins copied from `connect.yaml` (`actions/checkout` v7.0.1, `actions/cache` v6.1.0, `actions/upload-artifact` v7.0.2). The probe ran no agent, used no provider secret (a literal stand-in secret was passed) and created no issue, pull request, release or tag. **Observed.** (1) Self-checkout: on the local call, [run 44700906722](https://github.com/marcusrbrown/systematic/actions/runs/44700906722), and on the cross-owner call, [run 44701027408](https://github.com/fro-bot/agent/actions/runs/44701027408), `job.workflow_repository`, `job.workflow_sha` and `job.workflow_file_path` name the callee, while `github.repository`, `github.ref` and `github.event.repository.default_branch` name the caller and `github.event_name` is the caller's event, never `workflow_call`. `job.workflow_ref` differs by call type (a branch ref on the local call, the 40-hex SHA on the cross-owner one), so the SHA is the field to read. A sparse checkout of `/.github/actions/` at `job.workflow_sha` (cone mode off, no persisted credential) succeeded on both with the caller's default job token, even for a public repository in another owner, and the action file was present (runs [44701974289](https://github.com/marcusrbrown/systematic/actions/runs/44701974289) and [44702043679](https://github.com/fro-bot/agent/actions/runs/44702043679)). (2) `referenced_workflows` is present on `/runs/{id}`, `/attempts/1` and `/attempts/2` for both call types and identical on both attempts after a failed-jobs rerun. It is a list; each entry has a `path` of `owner/repo/.github/workflows/x.yaml@<sha>` and a 40-hex `sha`, and the `ref` key appears only on the local call. The run's own `path` is the caller's wrapper. (3) Compare direction: `compare/<default branch>...<sha>` answers `ahead` for a commit on an unmerged branch, `behind` for one in the history of `main`, `identical` for its tip, and a 404 for an unknown or malformed SHA, the same shape as no access. An unauthenticated request to the public repository answered; a job-scoped token was not tried. (4) The cache is saved in the caller's repository, scoped to its ref, and a second run restored an earlier entry by prefix once save and restore used the same `path` (the cache version includes it); `cache-hit` was `false` on a prefix match and `cache-matched-key` showed the hit. `concurrency: { cancel-in-progress: false, queue: max }` is accepted in a called workflow: runs queued in push order, two runs were pending at once, cancelling the newest pending run left the older one intact (runs [44701421105](https://github.com/fro-bot/agent/actions/runs/44701421105), [44701505528](https://github.com/fro-bot/agent/actions/runs/44701505528), [44701582882](https://github.com/fro-bot/agent/actions/runs/44701582882) and [44701627675](https://github.com/fro-bot/agent/actions/runs/44701627675)), and a group of the same name in two owners did not collide. (5) `vars` resolve against the caller: Systematic's variable was empty in the cross-owner call, and a secret the caller passed by name reached the callee in both calls. (6) A failed-jobs rerun reran only the failed job, kept the callee SHA, and left only the attempt-1 artifacts, so a later job must not rebuild an artifact name from `github.run_attempt`. (7) The job token's logged grant on a callee job with `contents: read` under a caller grant of `contents: read` was `Contents: read` and `Metadata: read`, and a top-level `permissions: {}` in the callee widened nothing. (8) A caller in another organization called a public, SHA-pinned workflow in `marcusrbrown/systematic` at a commit not on `main` without a policy error; that organization's Actions policy itself was unreadable (HTTP 403). **Read from source, not run.** A read of `fro-bot/agent` v0.146.0 (`65239fc5`) with OpenCode v2.3.2 shows that `repo-skills: "false"` stages no skills, that the repository's skills are never read in place (when the setting is on, the base repository's default branch is copied), and that the action sets `OPENCODE_DISABLE_PROJECT_CONFIG` for every spawn, which turns project config and project instruction discovery off, so `.agents/skills`, `AGENTS.md`, `CLAUDE.md`, `opencode.json` and repository plugins should not load. **Not observed.** The report issue's author and an Issues write under the narrowed ceiling in a caller; a callee asking for more than its caller grants; a live agent run with repository skills off (and `.claude/skills` and `.opencode/` plugin directories, which were not traced to a line); a tag-pinned cross-owner call, whose `referenced_workflows` suffix may differ, so the skill reads the `sha` and never the suffix or `ref`; a job-scoped token for the compare request; the organization's Actions policy. The probe workflow files no longer exist on any branch, so the run pages may show no workflow definition, and the logs expire on the normal schedule. The code that relies on these facts is the self-checkout step and the guards in `.github/workflows/connect.yaml`, and the named-fetch steps in `skills/ce-connect/references/fetch-and-import.md`, which `tests/unit/connect-workflow.test.ts`, `tests/unit/connect-scheduled-workflow.test.ts` and `tests/unit/connect-skill-contract.test.ts` pin against stubs.
@@ -1,5 +1,6 @@
1
1
  import { type ConnectConfigOptions, type HostSupportRow, type KnownBadHostVersion } from './lib/connect-config.js';
2
2
  import { type ConnectBounds } from './lib/connect-evidence.js';
3
+ import { type PinReaders } from './lib/connect-pins.js';
3
4
  import { type InvocationWriteOptions, type ProcessTable, type PublishOptions } from './lib/connect-state.js';
4
5
  /**
5
6
  * Entry point for the generated, self-contained `ce:connect` helper
@@ -17,7 +18,7 @@ import { type InvocationWriteOptions, type ProcessTable, type PublishOptions } f
17
18
  * file the skill writes in the run's work directory, read here through the
18
19
  * bounded reader as a regular file.
19
20
  */
20
- export declare const CE_CONNECT_USAGE = "Usage: node connect.mjs <begin|validate|publish|decide|import|apply-ticks|render-report|ledger show [--offset N]|ledger clear|ledger unlock>";
21
+ export declare const CE_CONNECT_USAGE = "Usage: node connect.mjs <begin|validate|publish|decide|import|apply-ticks|render-report|allowed-origins|verify-provenance|ledger show [--offset N]|ledger clear|ledger unlock>";
21
22
  export interface HelperDeps {
22
23
  /** Environment for `XDG_STATE_HOME`. Defaults to `process.env`. */
23
24
  readonly env?: Readonly<Record<string, string | undefined>>;
@@ -38,6 +39,8 @@ export interface HelperDeps {
38
39
  readonly publishHooks?: NonNullable<PublishOptions['hooks']>;
39
40
  /** Seams in the write of the invocation record, for tests of a failed write. */
40
41
  readonly invocationHooks?: InvocationWriteOptions;
42
+ /** Replaces the pin value and tag readers, for tests that count what `begin` opens. */
43
+ readonly pinReaders?: Partial<PinReaders>;
41
44
  }
42
45
  export interface HelperResult {
43
46
  readonly ok: boolean;
package/dist/cli.js CHANGED
@@ -24,6 +24,7 @@ import {
24
24
  discriminatedUnion,
25
25
  _enum,
26
26
  literal,
27
+ opencodeUserConfigDir,
27
28
  displaySafe,
28
29
  configEntryExists,
29
30
  MAX_PROJECT_CONFIG_BYTES,
@@ -48,7 +49,7 @@ import {
48
49
  SEARCH_NOTICES,
49
50
  SEARCH_CONFIG_UNREADABLE_NOTE,
50
51
  runSearch
51
- } from "./index-1cj1mrpb.js";
52
+ } from "./index-ahm7y9zh.js";
52
53
  var __defProp = Object.defineProperty;
53
54
  var __returnValue = (v) => v;
54
55
  function __exportSetter(name, newValue) {
@@ -3482,12 +3483,13 @@ Scope:
3482
3483
  global $PI_CODING_AGENT_DIR/agents or ~/.pi/agent/agents
3483
3484
  `;
3484
3485
  function defaultCapabilityRoots() {
3485
- const configDir = process.env.XDG_CONFIG_HOME ? path6.join(process.env.XDG_CONFIG_HOME, "opencode") : path6.join(os2.homedir(), ".config/opencode");
3486
+ const homeDir = os2.homedir();
3487
+ const configDir = opencodeUserConfigDir(homeDir);
3486
3488
  return {
3487
3489
  agentsRoot: path6.join(PACKAGE_ROOT, "agents"),
3488
3490
  configDir,
3489
3491
  cwd: process.cwd(),
3490
- homeDir: os2.homedir(),
3492
+ homeDir,
3491
3493
  opencodeConfigDirOverride: process.env.OPENCODE_CONFIG_DIR?.trim() || undefined,
3492
3494
  packageRoot: PACKAGE_ROOT
3493
3495
  };