@fro.bot/systematic 3.32.2 → 3.32.3
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 +4 -4
- package/dist/index.js +111 -40
- package/dist/lib/config-handler.d.ts +6 -1
- package/dist/lib/opencode-v2.d.ts +5 -3
- package/package.json +4 -4
- package/skills/ce-connect/scripts/connect.mjs +2 -2
package/HARNESSES.md
CHANGED
|
@@ -37,7 +37,7 @@ Each v2 mechanism was chosen by a probe against OpenCode 2.2.0 on 2026-10-27. Th
|
|
|
37
37
|
|
|
38
38
|
| Probe | Outcome | Mechanism the adapter uses | Evidence |
|
|
39
39
|
|---|---|---|---|
|
|
40
|
-
| Agent creation | Passed | `ctx.agent.transform` with `editor.update(id, fn)` creates a missing agent from a default skeleton. Unknown fields are stripped, so there is no ownership marker; user config applies after every plugin transform and overlays a same-named agent | [OC2-AGENT] |
|
|
40
|
+
| Agent creation | Passed | `ctx.agent.transform` with `editor.update(id, fn)` creates a missing agent from a default skeleton. Unknown fields are stripped, so there is no ownership marker; user config applies after every plugin transform and overlays a same-named agent. `editor.get` returns the live record of an agent an earlier transform defined, `update` mutates it in place and `remove` deletes it; a transform replay starts from an empty state, so a transform never sees its own earlier output. For a read-only agent another plugin defined, the adapter removes the entry and creates it again from the plan, keeping only that entry's `model` | [OC2-AGENT] |
|
|
41
41
|
| Instruction entries | Passed, with a different trigger | One keyed entry (`systematic.bootstrap`) per session, put from `ctx.session.hook('prompt')`. `session.created` is not used, because the first session after a service start never sees it | [OC2-INSTR] |
|
|
42
42
|
| Per-kind request hooks | Not needed | The `context` hook is used only to restore truncated skill output; the bootstrap does not use it | [OC2-CTX] |
|
|
43
43
|
| Permissions | Passed | Ordered `{action, resource, effect}` lists, last match wins; `bash` becomes `shell`, `task` becomes `subagent`, `doom_loop` and `lsp` have no v2 action; a session-level allow overrides an agent's own deny, so see the CN-2 and CN-3 entries for the tool guard | [OC2-PERM] |
|
|
@@ -110,8 +110,8 @@ The `ce:connect` skill dispatches `connections-researcher`, an agent that must n
|
|
|
110
110
|
|
|
111
111
|
| Host | Version | Mechanism | Support evidence |
|
|
112
112
|
|---|---|---|---|
|
|
113
|
-
| OpenCode v1 | 1.19.5 | `permission:` denies `bash`, `edit`, `webfetch`, `websearch` and `task`, plus `external_directory: allow` so a headless run can read allowed projects outside the working directory. A string `tools:` is dropped by the host's converter and is not relied on. | Observed [CN-1] |
|
|
114
|
-
| OpenCode v2 | 2.2.5 | 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. | Observed [CN-2][CN-3] |
|
|
113
|
+
| OpenCode v1 | 1.19.5 | `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
|
+
| OpenCode v2 | 2.2.5 | 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 | 1.5.0 | 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
116
|
| Claude Code | 2.1.319 | 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]. Any other version is unlisted: headless mode refuses it and interactive mode warns and asks consent. |
|
|
117
117
|
|
|
@@ -238,7 +238,7 @@ Migrated-skill discipline is enforced by the [content-integrity gate](scripts/co
|
|
|
238
238
|
- **OC2-PROFILE** — [OpenCode v2 profile](skills/using-systematic/references/opencode-v2-profile.md#L5-L11). Tool names and arguments: Local probe, OpenCode 2.2.0, 2026-10-27, from the tool list of a real request (`edit`, `glob`, `grep`, `question`, `read`, `shell`, `skill`, `subagent`, `webfetch`, `websearch`, `write`, `execute`): `subagent` takes `agent`, `description`, `prompt`, `model`, `sessionID` and `background`; `question` takes `questions` with `question`, `header`, `options` and `multiple`. CI covers the `subagent` call: CI job `Host Contract v2 shard N/4` (the pinned v2 CLI), `tests/integration/opencode-v2.test.ts` › "a subagent request carries the bootstrap once, and so does the parent request that follows it". `question` has no CI test.
|
|
239
239
|
- **OC2-LOADER** — OpenCode v1 1.18.28, 1.18.29, 1.19.4 and v2 2.1.4, 2.2.0, 2026-10-27. The object default `{id, setup, server}` loads on all five. A v1 host calls `server(input)` and then `setup(ctx)` in the same process, with a reduced context of 9 keys and no `location` or `session`; a v2 host never calls `server`. v2 2.1.4 drops a function default with no log line, and 2.2.0 logs a warning. Tarball config forms fail on v1, so installs go through `npm install <tarball>` and load the installed directory. Local probe for the version comparison. CI covers the load: CI job `Host Contract v2 shard N/4` (the pinned v2 CLI), `tests/integration/opencode-v2.test.ts` › "the packed plugin loads, setup runs once and stderr carries nothing unexpected"; the v1 loads: CI jobs `Host Contract v1 floor` and `Host Contract v1 current`, `tests/integration/opencode-v1.test.ts` › "packaged plugin loads, warns on a removed disabled_skills name, and exposes a compliant catalog"; the bridge no-op: `tests/unit/opencode-v2.test.ts` › "default export wiring" › "setup does nothing for the reduced context a v1 host passes".
|
|
240
240
|
- **OC2-HOST** — Local probe, OpenCode 2.2.0, 2026-10-27. Isolation takes `HOME`, the four `XDG_*` variables, `OPENCODE_CONFIG_DIR` and `TMPDIR`; a managed config under `/Library` on macOS is read and cannot be isolated. One-shot runs use `run --standalone`; the default `run` starts a detached shared service on port 49374. The remote client is `@opencode/client` (`OpenCode.make`), not `@opencode/sdk`, which has only the embedded `create`. The plugin runs in the service process under a compiled Bun 1.4.4, with the home directory as its working directory. The CLI install needs `npm install --dangerously-allow-all-scripts` on npm 12. CI uses this recipe: the host install step and `tests/integration/fixtures/opencode-host.ts` in CI job `Host Contract v2 shard N/4` (the pinned v2 CLI).
|
|
241
|
-
- **OC2-AGENT** — CI job `Host Contract v2 shard N/4` (the pinned v2 CLI): `tests/integration/opencode-v2.test.ts` › "the bundled agents appear in the agent list with their v1 description and prompt" and "a user agent with the same id in config keeps the user system prompt"; `tests/unit/opencode-v2.test.ts` › "agents installer" › "replaying the transform on a fresh editor yields the same single agent set". Local probe, OpenCode 2.2.0, 2026-10-27: an extra property set in a transform is visible to later plugins in the same replay and gone from `agent.list`, so no ownership marker survives; an agent's `model` applies only when the session names no model; a session whose agent is later unregistered fails its next turn with `Session.AgentNotFoundError`.
|
|
241
|
+
- **OC2-AGENT** — CI job `Host Contract v2 shard N/4` (the pinned v2 CLI): `tests/integration/opencode-v2.test.ts` › "the bundled agents appear in the agent list with their v1 description and prompt" and "a user agent with the same id in config keeps the user system prompt"; `tests/unit/opencode-v2.test.ts` › "agents installer" › "replaying the transform on a fresh editor yields the same single agent set"; `tests/unit/opencode-v2.test.ts` › "a read-only agent another plugin already defined" and `tests/integration/opencode-v2.test.ts` › "a researcher an earlier plugin defined with no denies is replaced by the shipped one: Systematic prompt, shell and write refused". Local probe, OpenCode 2.2.0, 2026-10-27: an extra property set in a transform is visible to later plugins in the same replay and gone from `agent.list`, so no ownership marker survives; an agent's `model` applies only when the session names no model; a session whose agent is later unregistered fails its next turn with `Session.AgentNotFoundError`.
|
|
242
242
|
- **OC2-INSTR** — CI job `Host Contract v2 shard N/4` (the pinned v2 CLI): `tests/integration/opencode-v2.test.ts` › "the first request of a new session carries the bootstrap with the v2 profile, once", "the title request does not carry the bootstrap", "a subagent request carries the bootstrap once, and so does the parent request that follows it", "a second turn does not duplicate the bootstrap or announce a change", "git-worktree in disabled_skills leaves the worktree rule out of the bootstrap" and "bootstrap.enabled false puts no entry and nothing reaches the model". Local probe, OpenCode 2.2.0, 2026-10-27: the entry lands in the first system message as `<context key="...">`; compaction and later requests carry it once; entries persist across a host restart, even with the plugin removed; a changed value freezes the system block at the old text and adds a `<system-update>` message; a value is capped at 256 KiB; a `session.created` subscription misses the first session after a service start, so the `prompt` hook is the trigger. The composed bootstrap is about 9.2 KB.
|
|
243
243
|
- **OC2-CTX** — Local probe, OpenCode 2.2.0, 2026-10-27. Per-kind hooks `prompt`, `title`, `context`, `compaction` and `generate`; pushing to `event.system` in a hook reaches the model once per request. Not used for the bootstrap. The `context` hook is used for skill output restoration, which CI job `Host Contract v2 shard N/4` (the pinned v2 CLI), `tests/integration/opencode-v2.test.ts` › "a skill above the host output limit reaches the model in full on the continuation request and later turns" covers.
|
|
244
244
|
- **OC2-PERM** — CI job `Host Contract v2 shard N/4` (the pinned v2 CLI): `tests/integration/opencode-v2.test.ts` › "an agent with a managed skills list is refused a skill outside it, and an unmanaged agent is not" and "systematic_skill refuses a skill a managed agent may not load while a sibling agent loads it"; `tests/unit/opencode-v2-permissions.test.ts` (the v1 golden corpus replayed through the translator, including the integer-like skill names that v1 hoists and v2 keeps in order). Local probe, OpenCode 2.2.0, 2026-10-27: last match wins, `*` and `?` match whole values, `deny *` then one allow per skill works, any deny blocks a compound shell command, and the action names are `shell` and `subagent`. The tool asserts the bare skill id, so a rule written for `systematic:<id>` (the v1 spelling) is translated to the bare id; CI: `tests/integration/opencode-v2.test.ts` › "a skill deny written with the systematic: prefix refuses the skill, as it does on v1".
|
package/dist/index.js
CHANGED
|
@@ -748,16 +748,53 @@ function buildAssetPlan(input) {
|
|
|
748
748
|
};
|
|
749
749
|
}
|
|
750
750
|
|
|
751
|
+
// src/lib/opencode-v2-tool-guard.ts
|
|
752
|
+
var READ_ONLY_AGENT_NAMES = [
|
|
753
|
+
"connections-researcher"
|
|
754
|
+
];
|
|
755
|
+
var READ_ONLY_TOOL_ALLOWLIST = [
|
|
756
|
+
"read",
|
|
757
|
+
"grep",
|
|
758
|
+
"glob",
|
|
759
|
+
"skill",
|
|
760
|
+
"systematic_search",
|
|
761
|
+
"systematic_skill"
|
|
762
|
+
];
|
|
763
|
+
var ALLOWED = { allowed: true };
|
|
764
|
+
function decideToolCall(agent, tool) {
|
|
765
|
+
if (typeof agent !== "string" || !READ_ONLY_AGENT_NAMES.includes(agent)) {
|
|
766
|
+
return ALLOWED;
|
|
767
|
+
}
|
|
768
|
+
if (typeof tool === "string" && READ_ONLY_TOOL_ALLOWLIST.includes(tool)) {
|
|
769
|
+
return ALLOWED;
|
|
770
|
+
}
|
|
771
|
+
const name = typeof tool === "string" ? tool : "unknown";
|
|
772
|
+
return {
|
|
773
|
+
allowed: false,
|
|
774
|
+
message: `The tool "${name}" is not available to the read-only ${agent} agent. It may call only: ${READ_ONLY_TOOL_ALLOWLIST.join(", ")}.`
|
|
775
|
+
};
|
|
776
|
+
}
|
|
777
|
+
function refuseOutsideAllowlist(event) {
|
|
778
|
+
const verdict = decideToolCall(event.agent, event.tool);
|
|
779
|
+
if (!verdict.allowed)
|
|
780
|
+
throw new Error(verdict.message);
|
|
781
|
+
}
|
|
782
|
+
var installToolGuard = async ({ ctx }) => {
|
|
783
|
+
await ctx.tool.hook("execute.before", refuseOutsideAllowlist);
|
|
784
|
+
};
|
|
785
|
+
|
|
751
786
|
// src/lib/config-handler.ts
|
|
752
787
|
function isSystematicAgentConfig(agent) {
|
|
753
788
|
const description = agent?.description;
|
|
754
789
|
return typeof description === "string" && /\(.* - Systematic\)$/.test(description);
|
|
755
790
|
}
|
|
791
|
+
var reportedSecuritySensitiveAgents = new Set;
|
|
792
|
+
var foreignRoutingByConfig = new WeakMap;
|
|
756
793
|
function isSystematicCommandConfig(command) {
|
|
757
794
|
const description = command?.description;
|
|
758
795
|
return typeof description === "string" && description.startsWith("(Systematic) ");
|
|
759
796
|
}
|
|
760
|
-
function mergeSystematicEntries(existing, emitted, shouldDropExisting) {
|
|
797
|
+
function mergeSystematicEntries(existing, emitted, shouldDropExisting, enforceOver) {
|
|
761
798
|
const merged = { ...existing ?? {} };
|
|
762
799
|
for (const [key, value] of Object.entries(existing ?? {})) {
|
|
763
800
|
if (shouldDropExisting(key, value)) {
|
|
@@ -765,12 +802,54 @@ function mergeSystematicEntries(existing, emitted, shouldDropExisting) {
|
|
|
765
802
|
}
|
|
766
803
|
}
|
|
767
804
|
for (const [key, value] of Object.entries(emitted)) {
|
|
768
|
-
if (Object.hasOwn(merged, key))
|
|
805
|
+
if (Object.hasOwn(merged, key)) {
|
|
806
|
+
if (enforceOver !== undefined) {
|
|
807
|
+
merged[key] = enforceOver(key, merged[key], value);
|
|
808
|
+
}
|
|
769
809
|
continue;
|
|
810
|
+
}
|
|
770
811
|
merged[key] = value;
|
|
771
812
|
}
|
|
772
813
|
return merged;
|
|
773
814
|
}
|
|
815
|
+
function isSecuritySensitiveAgent(name) {
|
|
816
|
+
return READ_ONLY_AGENT_NAMES.includes(name);
|
|
817
|
+
}
|
|
818
|
+
function readForeignRouting(entry) {
|
|
819
|
+
if (!isRecord(entry))
|
|
820
|
+
return {};
|
|
821
|
+
const { model, variant } = entry;
|
|
822
|
+
return {
|
|
823
|
+
...typeof model === "string" ? { model } : {},
|
|
824
|
+
...typeof variant === "string" ? { variant } : {}
|
|
825
|
+
};
|
|
826
|
+
}
|
|
827
|
+
function reportForeignDefinition(name) {
|
|
828
|
+
if (reportedSecuritySensitiveAgents.has(name))
|
|
829
|
+
return;
|
|
830
|
+
reportedSecuritySensitiveAgents.add(name);
|
|
831
|
+
console.warn(`[systematic] agent "${name}" is also defined by another config entry; applied Systematic's read-only definition and kept only that entry's model and variant.`);
|
|
832
|
+
}
|
|
833
|
+
function enforceSecuritySensitiveAgent(config, name, present, emitted) {
|
|
834
|
+
if (!isSecuritySensitiveAgent(name))
|
|
835
|
+
return present ?? emitted;
|
|
836
|
+
const captured = foreignRoutingByConfig.get(config) ?? new Map;
|
|
837
|
+
foreignRoutingByConfig.set(config, captured);
|
|
838
|
+
let foreign;
|
|
839
|
+
if (isSystematicAgentConfig(present)) {
|
|
840
|
+
foreign = captured.get(name);
|
|
841
|
+
} else {
|
|
842
|
+
foreign = readForeignRouting(present);
|
|
843
|
+
captured.set(name, foreign);
|
|
844
|
+
reportForeignDefinition(name);
|
|
845
|
+
}
|
|
846
|
+
const result = { ...emitted };
|
|
847
|
+
if (foreign?.model !== undefined)
|
|
848
|
+
result.model = foreign.model;
|
|
849
|
+
if (foreign?.variant !== undefined)
|
|
850
|
+
result.variant = foreign.variant;
|
|
851
|
+
return result;
|
|
852
|
+
}
|
|
774
853
|
function foldPermissionRulesToV1Map(rules) {
|
|
775
854
|
const explicitSkillSettings = new Map;
|
|
776
855
|
for (const rule of rules) {
|
|
@@ -884,7 +963,7 @@ function createConfigHandler(deps) {
|
|
|
884
963
|
const { config: systematicConfig, overlays } = loadConfigWithSources(directory);
|
|
885
964
|
const existingAgents = { ...config.agent ?? {} };
|
|
886
965
|
const existingCommands = { ...config.command ?? {} };
|
|
887
|
-
const nativeAgentNames = Object.entries(existingAgents).filter(([, agent]) => !isSystematicAgentConfig(agent)).map(([name]) => name);
|
|
966
|
+
const nativeAgentNames = Object.entries(existingAgents).filter(([name, agent]) => !isSystematicAgentConfig(agent) && !isSecuritySensitiveAgent(name)).map(([name]) => name);
|
|
888
967
|
const plan = buildAssetPlan({
|
|
889
968
|
config: systematicConfig,
|
|
890
969
|
overlays,
|
|
@@ -902,7 +981,7 @@ function createConfigHandler(deps) {
|
|
|
902
981
|
toV1AgentConfig(planned)
|
|
903
982
|
]));
|
|
904
983
|
const bundledAgentKeys = new Set(Object.keys(bundledAgents));
|
|
905
|
-
config.agent = mergeSystematicEntries(existingAgents, bundledAgents, (key, agent) => bundledAgentKeys.has(key) && isSystematicAgentConfig(agent));
|
|
984
|
+
config.agent = mergeSystematicEntries(existingAgents, bundledAgents, (key, agent) => bundledAgentKeys.has(key) && isSystematicAgentConfig(agent) && !isSecuritySensitiveAgent(key), (key, present, emitted) => enforceSecuritySensitiveAgent(config, key, present, emitted));
|
|
906
985
|
config.command = mergeSystematicEntries(existingCommands, plan.commands, (_key, command) => isSystematicCommandConfig(command));
|
|
907
986
|
applyDiscoveredRouting(config, plan, reportedRouting);
|
|
908
987
|
registerSkillsPaths(config, plan.skillsDir);
|
|
@@ -1863,41 +1942,6 @@ var installSkills = async ({
|
|
|
1863
1942
|
await guard.async("skill output restore registration", () => ctx.session.hook("context", restore))();
|
|
1864
1943
|
};
|
|
1865
1944
|
|
|
1866
|
-
// src/lib/opencode-v2-tool-guard.ts
|
|
1867
|
-
var READ_ONLY_AGENT_NAMES = [
|
|
1868
|
-
"connections-researcher"
|
|
1869
|
-
];
|
|
1870
|
-
var READ_ONLY_TOOL_ALLOWLIST = [
|
|
1871
|
-
"read",
|
|
1872
|
-
"grep",
|
|
1873
|
-
"glob",
|
|
1874
|
-
"skill",
|
|
1875
|
-
"systematic_search",
|
|
1876
|
-
"systematic_skill"
|
|
1877
|
-
];
|
|
1878
|
-
var ALLOWED = { allowed: true };
|
|
1879
|
-
function decideToolCall(agent, tool) {
|
|
1880
|
-
if (typeof agent !== "string" || !READ_ONLY_AGENT_NAMES.includes(agent)) {
|
|
1881
|
-
return ALLOWED;
|
|
1882
|
-
}
|
|
1883
|
-
if (typeof tool === "string" && READ_ONLY_TOOL_ALLOWLIST.includes(tool)) {
|
|
1884
|
-
return ALLOWED;
|
|
1885
|
-
}
|
|
1886
|
-
const name = typeof tool === "string" ? tool : "unknown";
|
|
1887
|
-
return {
|
|
1888
|
-
allowed: false,
|
|
1889
|
-
message: `The tool "${name}" is not available to the read-only ${agent} agent. It may call only: ${READ_ONLY_TOOL_ALLOWLIST.join(", ")}.`
|
|
1890
|
-
};
|
|
1891
|
-
}
|
|
1892
|
-
function refuseOutsideAllowlist(event) {
|
|
1893
|
-
const verdict = decideToolCall(event.agent, event.tool);
|
|
1894
|
-
if (!verdict.allowed)
|
|
1895
|
-
throw new Error(verdict.message);
|
|
1896
|
-
}
|
|
1897
|
-
var installToolGuard = async ({ ctx }) => {
|
|
1898
|
-
await ctx.tool.hook("execute.before", refuseOutsideAllowlist);
|
|
1899
|
-
};
|
|
1900
|
-
|
|
1901
1945
|
// src/lib/opencode-v2.ts
|
|
1902
1946
|
var DIAGNOSTIC_PREFIX = "systematic:";
|
|
1903
1947
|
function describeFailure(error) {
|
|
@@ -1979,10 +2023,37 @@ function writeAgentFields(agent, planned, reported) {
|
|
|
1979
2023
|
writeAgentModel(agent, planned, reported);
|
|
1980
2024
|
agent.permissions.push(...agentPermissionRules(planned));
|
|
1981
2025
|
}
|
|
2026
|
+
function readForeignModel(entry) {
|
|
2027
|
+
if (!isRecord(entry) || !isRecord(entry.model))
|
|
2028
|
+
return;
|
|
2029
|
+
const { providerID, id, variant } = entry.model;
|
|
2030
|
+
if (typeof providerID !== "string" || typeof id !== "string")
|
|
2031
|
+
return;
|
|
2032
|
+
return typeof variant === "string" ? { providerID, id, variant } : { providerID, id };
|
|
2033
|
+
}
|
|
2034
|
+
function replaceReadOnlyAgent(editor, planned, existing, reported) {
|
|
2035
|
+
const foreignModel = readForeignModel(existing);
|
|
2036
|
+
const key = `replaced:${planned.name}`;
|
|
2037
|
+
if (!reported.has(key)) {
|
|
2038
|
+
reported.add(key);
|
|
2039
|
+
console.error(`${DIAGNOSTIC_PREFIX} agent "${planned.name}" is also defined by the host or another plugin; applied Systematic's read-only definition and kept only that entry's model`);
|
|
2040
|
+
}
|
|
2041
|
+
editor.remove(planned.name);
|
|
2042
|
+
editor.update(planned.name, (agent) => {
|
|
2043
|
+
writeAgentFields(agent, planned, reported);
|
|
2044
|
+
if (foreignModel !== undefined)
|
|
2045
|
+
agent.model = foreignModel;
|
|
2046
|
+
});
|
|
2047
|
+
}
|
|
1982
2048
|
function applyPlannedAgent(editor, planned, reported = new Set) {
|
|
1983
2049
|
if (planned.config.disable === true)
|
|
1984
2050
|
return;
|
|
1985
|
-
|
|
2051
|
+
const existing = editor.get(planned.name);
|
|
2052
|
+
if (existing !== undefined) {
|
|
2053
|
+
if (READ_ONLY_AGENT_NAMES.includes(planned.name)) {
|
|
2054
|
+
replaceReadOnlyAgent(editor, planned, existing, reported);
|
|
2055
|
+
return;
|
|
2056
|
+
}
|
|
1986
2057
|
const key = `clash:${planned.name}`;
|
|
1987
2058
|
if (reported.has(key))
|
|
1988
2059
|
return;
|
|
@@ -13,6 +13,8 @@ export interface ConfigHandlerDeps {
|
|
|
13
13
|
/** OpenCode global config directory override for discovered-skill lookups. Defaults to `<homeDir>/.config/opencode`. */
|
|
14
14
|
opencodeConfigDir?: string;
|
|
15
15
|
}
|
|
16
|
+
/** Clear the once-per-process notice record and captured routing. For tests. */
|
|
17
|
+
export declare function resetSecuritySensitiveAgentNotices(): void;
|
|
16
18
|
/**
|
|
17
19
|
* Per-tool permission rule map as actually emitted by {@link foldPermissionRulesToV1Map}:
|
|
18
20
|
* each key is a match pattern (`'*'` or an exact name) mapped to a setting.
|
|
@@ -86,7 +88,10 @@ export declare function toV1AgentConfig(planned: PlannedAgent): AgentConfig;
|
|
|
86
88
|
*
|
|
87
89
|
* Bundled content is loaded and then tuned with Systematic agent overlays.
|
|
88
90
|
* Existing native OpenCode agents with the same emitted key are preserved as
|
|
89
|
-
* replacements for bundled agents.
|
|
91
|
+
* replacements for bundled agents. The exception is a security-sensitive agent
|
|
92
|
+
* (see {@link isSecuritySensitiveAgent}): its Systematic definition is applied
|
|
93
|
+
* over any other entry of the same name, keeping only that entry's model and
|
|
94
|
+
* variant.
|
|
90
95
|
*/
|
|
91
96
|
export declare function createConfigHandler(deps: ConfigHandlerDeps): (config: Config) => Promise<void>;
|
|
92
97
|
/** Register a directory for OpenCode's native skill discovery (`skill` tool). */
|
|
@@ -61,12 +61,14 @@ export interface V2AgentRecord {
|
|
|
61
61
|
export interface V2AgentEditor {
|
|
62
62
|
get(id: string): unknown;
|
|
63
63
|
update(id: string, update: (agent: V2AgentRecord) => void): void;
|
|
64
|
+
remove(id: string): void;
|
|
64
65
|
}
|
|
65
66
|
/**
|
|
66
67
|
* Create one planned agent on a transform editor. An id that already exists
|
|
67
|
-
* belongs to the host or another plugin and is left alone
|
|
68
|
-
*
|
|
69
|
-
*
|
|
68
|
+
* belongs to the host or another plugin and is left alone, except for an agent
|
|
69
|
+
* in `READ_ONLY_AGENT_NAMES`: that definition is replaced by ours. A same-named
|
|
70
|
+
* user agent needs no check for an ordinary agent: user config applies after
|
|
71
|
+
* every plugin transform and overlays what is created here.
|
|
70
72
|
*/
|
|
71
73
|
export declare function applyPlannedAgent(editor: V2AgentEditor, planned: PlannedAgent, reported?: Set<string>): void;
|
|
72
74
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fro.bot/systematic",
|
|
3
|
-
"version": "3.32.
|
|
3
|
+
"version": "3.32.3",
|
|
4
4
|
"description": "Compound-engineering loops for OpenCode, Pi, and Claude Code",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"homepage": "https://fro.bot/systematic",
|
|
@@ -122,9 +122,9 @@
|
|
|
122
122
|
"@earendil-works/pi-coding-agent": "1.5.0",
|
|
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.6",
|
|
126
|
+
"@opencode/plugin": "2.2.6",
|
|
127
|
+
"@opencode/sdk": "2.2.6",
|
|
128
128
|
"@semantic-release/exec": "7.1.0",
|
|
129
129
|
"@tintinweb/pi-subagents": "0.22.1",
|
|
130
130
|
"@types/bun": "latest",
|
|
@@ -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: 9b652bc13739937297f63e9284e288f7e230df862d2c573fa399e9f69e3cae21
|
|
6
6
|
// src/ce-connect-helper.ts
|
|
7
7
|
import { spawnSync as spawnSync3 } from 'node:child_process'
|
|
8
8
|
import fs8 from 'node:fs'
|
|
@@ -1410,7 +1410,7 @@ var HOST_SUPPORT_TABLE = [
|
|
|
1410
1410
|
},
|
|
1411
1411
|
{
|
|
1412
1412
|
host: 'opencode-v2',
|
|
1413
|
-
version: '2.2.
|
|
1413
|
+
version: '2.2.6',
|
|
1414
1414
|
observedBy:
|
|
1415
1415
|
'tests/integration/opencode-v2.test.ts > a session-level allow does not lift the guarded researcher when a parent with that rule dispatches it',
|
|
1416
1416
|
},
|