opencode-swarm 6.22.18 → 6.22.20
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/README.md +12 -5
- package/dist/hooks/phase-monitor.d.ts +4 -2
- package/dist/index.js +7 -5
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -932,6 +932,16 @@ The following tools can be assigned to agents via overrides:
|
|
|
932
932
|
|
|
933
933
|
## Recent Changes
|
|
934
934
|
|
|
935
|
+
### v6.22 — Curator Background Analysis + Session State Persistence
|
|
936
|
+
|
|
937
|
+
This release adds the optional Curator system for phase-level intelligence and fixes session snapshot persistence for task workflow states.
|
|
938
|
+
|
|
939
|
+
- **Curator system**: New optional background analysis system (`curator.enabled = false` by default). After each phase, collects events, checks compliance, and writes drift reports to `.swarm/drift-report-phase-N.json`. Three integration points: init on first phase, phase analysis after each phase, and drift injection into architect context at phase start.
|
|
940
|
+
- **Drift reports**: `runCriticDriftCheck` compares planned vs. actual decisions and writes structured drift reports with alignment scores (`ALIGNED` / `MINOR_DRIFT` / `MAJOR_DRIFT` / `OFF_SPEC`). Latest drift summary is prepended to the architect's knowledge context each phase.
|
|
941
|
+
- **Issue #81 fix — taskWorkflowStates persistence**: Session snapshots now correctly serialize and restore the per-task state machine. Invalid state values are filtered to `idle` on deserialization. `reconcileTaskStatesFromPlan` seeds task states from `plan.json` on snapshot load (completed → `tests_run`, in-progress → `coder_delegated`).
|
|
942
|
+
|
|
943
|
+
See the [Curator section](#curator) above for configuration details and the [v6.22 release notes](docs/releases/v6.22.0.md) for the full change list.
|
|
944
|
+
|
|
935
945
|
### v6.21 — Gate Enforcement Hardening
|
|
936
946
|
|
|
937
947
|
This release replaces soft advisory warnings with hard runtime blocks and adds structural compliance tooling for all model tiers.
|
|
@@ -1103,8 +1113,6 @@ OpenCode Swarm v6.16+ ships with language profiles for 11 languages across three
|
|
|
1103
1113
|
|
|
1104
1114
|
---
|
|
1105
1115
|
|
|
1106
|
-
## Roadmap
|
|
1107
|
-
|
|
1108
1116
|
## Curator
|
|
1109
1117
|
|
|
1110
1118
|
The Curator is an optional background analysis system that runs after each phase. It is **disabled by default** (`curator.enabled = false`) and never blocks execution — all Curator operations are wrapped in try/catch.
|
|
@@ -1152,15 +1160,13 @@ Drift reports are written to `.swarm/drift-report-phase-N.json` after each phase
|
|
|
1152
1160
|
|
|
1153
1161
|
### Issue #81 Hotfix — taskWorkflowStates Persistence
|
|
1154
1162
|
|
|
1155
|
-
v6.
|
|
1163
|
+
v6.22 includes a fix for session snapshot persistence of per-task workflow states:
|
|
1156
1164
|
|
|
1157
1165
|
- **`SerializedAgentSession.taskWorkflowStates`**: Task workflow states are now serialized as `Record<string, string>` in session snapshots and deserialized back to a `Map` on load. Invalid state values are filtered out and default to `idle`.
|
|
1158
1166
|
- **`reconcileTaskStatesFromPlan`**: On snapshot load, task states are reconciled against the current plan — tasks marked `completed` in the plan are seeded to `tests_run` state, and `in_progress` tasks are seeded to `coder_delegated` if currently `idle`. This is best-effort and never throws.
|
|
1159
1167
|
|
|
1160
1168
|
See [CHANGELOG.md](CHANGELOG.md) for shipped features.
|
|
1161
1169
|
|
|
1162
|
-
Upcoming: v6.22 focuses on further context optimization and agent coordination improvements.
|
|
1163
|
-
|
|
1164
1170
|
---
|
|
1165
1171
|
|
|
1166
1172
|
## FAQ
|
|
@@ -1184,6 +1190,7 @@ Run `/swarm reset --confirm`.
|
|
|
1184
1190
|
|
|
1185
1191
|
## Documentation
|
|
1186
1192
|
|
|
1193
|
+
- [Documentation Index](docs/index.md)
|
|
1187
1194
|
- [Getting Started](docs/getting-started.md)
|
|
1188
1195
|
- [Architecture Deep Dive](docs/architecture.md)
|
|
1189
1196
|
- [Design Rationale](docs/design-rationale.md)
|
|
@@ -13,8 +13,10 @@ export type CuratorInitRunner = (directory: string, config: CuratorConfig) => Pr
|
|
|
13
13
|
* Creates a hook that monitors plan phase transitions and triggers preflight.
|
|
14
14
|
*
|
|
15
15
|
* @param directory - Project directory (where .swarm/ lives)
|
|
16
|
-
* @param preflightManager -
|
|
16
|
+
* @param preflightManager - Optional PreflightTriggerManager to call on phase change.
|
|
17
|
+
* When undefined, preflight checks are skipped but curator initialization still runs
|
|
18
|
+
* at session start (useful when knowledge.enabled but phase_preflight is disabled).
|
|
17
19
|
* @param curatorRunner - Optional curator init runner (defaults to runCuratorInit; injectable for tests)
|
|
18
20
|
* @returns A safeHook-wrapped system.transform handler
|
|
19
21
|
*/
|
|
20
|
-
export declare function createPhaseMonitorHook(directory: string, preflightManager
|
|
22
|
+
export declare function createPhaseMonitorHook(directory: string, preflightManager?: PreflightTriggerManager, curatorRunner?: CuratorInitRunner): (input: unknown, output: unknown) => Promise<void>;
|
package/dist/index.js
CHANGED
|
@@ -39880,8 +39880,8 @@ When writing output consumed by other agents, prefix with:
|
|
|
39880
39880
|
[FOR: agent1, agent2] \u2014 relevant to specific agents
|
|
39881
39881
|
[FOR: ALL] \u2014 relevant to all agents
|
|
39882
39882
|
Examples:
|
|
39883
|
-
[FOR:
|
|
39884
|
-
[FOR:
|
|
39883
|
+
[FOR: reviewer, test_engineer] "Added validation \u2014 needs safety check"
|
|
39884
|
+
[FOR: architect] "Research: Tree-sitter supports TypeScript AST"
|
|
39885
39885
|
[FOR: ALL] "Breaking change: StateManager renamed"
|
|
39886
39886
|
This tag is informational in v6.19; v6.20 will use for context filtering.
|
|
39887
39887
|
`;
|
|
@@ -49221,7 +49221,9 @@ function createPhaseMonitorHook(directory, preflightManager, curatorRunner = run
|
|
|
49221
49221
|
const phase = plan.phases.find((p) => p.id === previousPhase);
|
|
49222
49222
|
const completedTasks = phase?.tasks.filter((t) => t.status === "completed").length ?? 0;
|
|
49223
49223
|
const totalTasks = phase?.tasks.length ?? 0;
|
|
49224
|
-
|
|
49224
|
+
if (preflightManager) {
|
|
49225
|
+
await preflightManager.checkAndTrigger(currentPhase, completedTasks, totalTasks);
|
|
49226
|
+
}
|
|
49225
49227
|
}
|
|
49226
49228
|
};
|
|
49227
49229
|
return safeHook(handler);
|
|
@@ -61098,7 +61100,7 @@ var OpenCodeSwarm = async (ctx) => {
|
|
|
61098
61100
|
const activityHooks = createAgentActivityHooks(config3, ctx.directory);
|
|
61099
61101
|
const delegationGateHooks = createDelegationGateHook(config3);
|
|
61100
61102
|
const delegationSanitizerHook = createDelegationSanitizerHook(ctx.directory);
|
|
61101
|
-
const guardrailsFallback = config3.guardrails?.enabled === false ? { ...config3.guardrails, enabled: false } :
|
|
61103
|
+
const guardrailsFallback = config3.guardrails?.enabled === false ? { ...config3.guardrails, enabled: false } : config3.guardrails ?? {};
|
|
61102
61104
|
const guardrailsConfig = GuardrailsConfigSchema.parse(guardrailsFallback);
|
|
61103
61105
|
if (loadedFromFile && guardrailsConfig.enabled === false) {
|
|
61104
61106
|
console.warn("");
|
|
@@ -61379,7 +61381,7 @@ var OpenCodeSwarm = async (ctx) => {
|
|
|
61379
61381
|
].filter((fn) => Boolean(fn))),
|
|
61380
61382
|
"experimental.chat.system.transform": composeHandlers(...[
|
|
61381
61383
|
systemEnhancerHook["experimental.chat.system.transform"],
|
|
61382
|
-
automationConfig.capabilities?.phase_preflight === true && preflightTriggerManager ? createPhaseMonitorHook(ctx.directory, preflightTriggerManager) : undefined
|
|
61384
|
+
automationConfig.capabilities?.phase_preflight === true && preflightTriggerManager ? createPhaseMonitorHook(ctx.directory, preflightTriggerManager) : knowledgeConfig.enabled ? createPhaseMonitorHook(ctx.directory) : undefined
|
|
61383
61385
|
].filter(Boolean)),
|
|
61384
61386
|
"experimental.session.compacting": compactionHook["experimental.session.compacting"],
|
|
61385
61387
|
"command.execute.before": safeHook(commandHandler),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "opencode-swarm",
|
|
3
|
-
"version": "6.22.
|
|
3
|
+
"version": "6.22.20",
|
|
4
4
|
"description": "Architect-centric agentic swarm plugin for OpenCode - hub-and-spoke orchestration with SME consultation, code generation, and QA review",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|