opencode-swarm 6.5.0 → 6.8.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/README.md +52 -6
- package/dist/__tests__/security-adversarial.test.d.ts +1 -0
- package/dist/background/circuit-breaker.d.ts +149 -0
- package/dist/background/event-bus.d.ts +60 -0
- package/dist/background/evidence-summary-integration.d.ts +73 -0
- package/dist/background/index.d.ts +22 -0
- package/dist/background/manager.d.ts +122 -0
- package/dist/background/plan-sync-worker.d.ts +117 -0
- package/dist/background/queue.d.ts +116 -0
- package/dist/background/status-artifact.d.ts +115 -0
- package/dist/background/trigger.d.ts +175 -0
- package/dist/background/trigger.vulnerability.test.d.ts +1 -0
- package/dist/background/worker.d.ts +92 -0
- package/dist/commands/command-adapters.security.test.d.ts +14 -0
- package/dist/commands/commands.test.d.ts +1 -0
- package/dist/commands/diagnose.d.ts +1 -5
- package/dist/commands/doctor.d.ts +5 -0
- package/dist/commands/evidence.d.ts +1 -5
- package/dist/commands/export.d.ts +1 -5
- package/dist/commands/history.d.ts +1 -5
- package/dist/commands/index.d.ts +3 -0
- package/dist/commands/plan.d.ts +1 -1
- package/dist/commands/preflight.d.ts +1 -0
- package/dist/commands/status.d.ts +1 -2
- package/dist/commands/sync-plan.d.ts +8 -0
- package/dist/config/index.d.ts +2 -2
- package/dist/config/plan-schema.d.ts +4 -4
- package/dist/config/schema.d.ts +53 -0
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/phase-monitor.d.ts +16 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +27786 -22900
- package/dist/plan/manager.d.ts +13 -6
- package/dist/services/config-doctor.d.ts +125 -0
- package/dist/services/config-doctor.security.test.d.ts +1 -0
- package/dist/services/config-doctor.test.d.ts +1 -0
- package/dist/services/decision-drift-analyzer.d.ts +96 -0
- package/dist/services/diagnose-service.d.ts +31 -0
- package/dist/services/evidence-service.d.ts +65 -0
- package/dist/services/evidence-summary-service.d.ts +75 -0
- package/dist/services/export-service.d.ts +23 -0
- package/dist/services/history-service.d.ts +35 -0
- package/dist/services/index.d.ts +11 -0
- package/dist/services/plan-service.d.ts +25 -0
- package/dist/services/preflight-integration.d.ts +38 -0
- package/dist/services/preflight-service.d.ts +62 -0
- package/dist/services/status-service.d.ts +28 -0
- package/dist/tools/secretscan.d.ts +4 -0
- package/package.json +1 -1
package/dist/config/schema.d.ts
CHANGED
|
@@ -245,6 +245,38 @@ export declare const CheckpointConfigSchema: z.ZodObject<{
|
|
|
245
245
|
auto_checkpoint_threshold: z.ZodDefault<z.ZodNumber>;
|
|
246
246
|
}, z.core.$strip>;
|
|
247
247
|
export type CheckpointConfig = z.infer<typeof CheckpointConfigSchema>;
|
|
248
|
+
export declare const AutomationModeSchema: z.ZodEnum<{
|
|
249
|
+
auto: "auto";
|
|
250
|
+
manual: "manual";
|
|
251
|
+
hybrid: "hybrid";
|
|
252
|
+
}>;
|
|
253
|
+
export type AutomationMode = z.infer<typeof AutomationModeSchema>;
|
|
254
|
+
export declare const AutomationCapabilitiesSchema: z.ZodObject<{
|
|
255
|
+
plan_sync: z.ZodDefault<z.ZodBoolean>;
|
|
256
|
+
phase_preflight: z.ZodDefault<z.ZodBoolean>;
|
|
257
|
+
config_doctor_on_startup: z.ZodDefault<z.ZodBoolean>;
|
|
258
|
+
config_doctor_autofix: z.ZodDefault<z.ZodBoolean>;
|
|
259
|
+
evidence_auto_summaries: z.ZodDefault<z.ZodBoolean>;
|
|
260
|
+
decision_drift_detection: z.ZodDefault<z.ZodBoolean>;
|
|
261
|
+
}, z.core.$strip>;
|
|
262
|
+
export type AutomationCapabilities = z.infer<typeof AutomationCapabilitiesSchema>;
|
|
263
|
+
declare const AutomationConfigSchemaBase: z.ZodObject<{
|
|
264
|
+
mode: z.ZodDefault<z.ZodEnum<{
|
|
265
|
+
auto: "auto";
|
|
266
|
+
manual: "manual";
|
|
267
|
+
hybrid: "hybrid";
|
|
268
|
+
}>>;
|
|
269
|
+
capabilities: z.ZodDefault<z.ZodObject<{
|
|
270
|
+
plan_sync: z.ZodDefault<z.ZodBoolean>;
|
|
271
|
+
phase_preflight: z.ZodDefault<z.ZodBoolean>;
|
|
272
|
+
config_doctor_on_startup: z.ZodDefault<z.ZodBoolean>;
|
|
273
|
+
config_doctor_autofix: z.ZodDefault<z.ZodBoolean>;
|
|
274
|
+
evidence_auto_summaries: z.ZodDefault<z.ZodBoolean>;
|
|
275
|
+
decision_drift_detection: z.ZodDefault<z.ZodBoolean>;
|
|
276
|
+
}, z.core.$strip>>;
|
|
277
|
+
}, z.core.$strip>;
|
|
278
|
+
export type AutomationConfig = z.infer<typeof AutomationConfigSchemaBase>;
|
|
279
|
+
export declare const AutomationConfigSchema: z.ZodType<AutomationConfig>;
|
|
248
280
|
export declare const PluginConfigSchema: z.ZodObject<{
|
|
249
281
|
agents: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
250
282
|
model: z.ZodOptional<z.ZodString>;
|
|
@@ -380,6 +412,27 @@ export declare const PluginConfigSchema: z.ZodObject<{
|
|
|
380
412
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
381
413
|
auto_checkpoint_threshold: z.ZodDefault<z.ZodNumber>;
|
|
382
414
|
}, z.core.$strip>>;
|
|
415
|
+
automation: z.ZodOptional<z.ZodType<{
|
|
416
|
+
mode: "auto" | "manual" | "hybrid";
|
|
417
|
+
capabilities: {
|
|
418
|
+
plan_sync: boolean;
|
|
419
|
+
phase_preflight: boolean;
|
|
420
|
+
config_doctor_on_startup: boolean;
|
|
421
|
+
config_doctor_autofix: boolean;
|
|
422
|
+
evidence_auto_summaries: boolean;
|
|
423
|
+
decision_drift_detection: boolean;
|
|
424
|
+
};
|
|
425
|
+
}, unknown, z.core.$ZodTypeInternals<{
|
|
426
|
+
mode: "auto" | "manual" | "hybrid";
|
|
427
|
+
capabilities: {
|
|
428
|
+
plan_sync: boolean;
|
|
429
|
+
phase_preflight: boolean;
|
|
430
|
+
config_doctor_on_startup: boolean;
|
|
431
|
+
config_doctor_autofix: boolean;
|
|
432
|
+
evidence_auto_summaries: boolean;
|
|
433
|
+
decision_drift_detection: boolean;
|
|
434
|
+
};
|
|
435
|
+
}, unknown>>>;
|
|
383
436
|
}, z.core.$strip>;
|
|
384
437
|
export type PluginConfig = z.infer<typeof PluginConfigSchema>;
|
|
385
438
|
export type { AgentName, PipelineAgentName, QAAgentName, } from './constants';
|
package/dist/hooks/index.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ export { createDelegationGateHook } from './delegation-gate';
|
|
|
5
5
|
export { createDelegationTrackerHook } from './delegation-tracker';
|
|
6
6
|
export { extractCurrentPhase, extractCurrentPhaseFromPlan, extractCurrentTask, extractCurrentTaskFromPlan, extractDecisions, extractIncompleteTasks, extractIncompleteTasksFromPlan, extractPatterns, } from './extractors';
|
|
7
7
|
export { createGuardrailsHooks } from './guardrails';
|
|
8
|
+
export { createPhaseMonitorHook } from './phase-monitor';
|
|
8
9
|
export { createPipelineTrackerHook } from './pipeline-tracker';
|
|
9
10
|
export { createSystemEnhancerHook } from './system-enhancer';
|
|
10
11
|
export { createToolSummarizerHook, resetSummaryIdCounter, } from './tool-summarizer';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Phase Monitor Hook
|
|
3
|
+
*
|
|
4
|
+
* Detects phase transitions by reading plan state on each system prompt transform.
|
|
5
|
+
* When a phase change is detected, triggers preflight via PreflightTriggerManager.
|
|
6
|
+
* Wrapped in safeHook — errors must never propagate.
|
|
7
|
+
*/
|
|
8
|
+
import type { PreflightTriggerManager } from '../background/trigger';
|
|
9
|
+
/**
|
|
10
|
+
* Creates a hook that monitors plan phase transitions and triggers preflight.
|
|
11
|
+
*
|
|
12
|
+
* @param directory - Project directory (where .swarm/ lives)
|
|
13
|
+
* @param preflightManager - The PreflightTriggerManager to call on phase change
|
|
14
|
+
* @returns A safeHook-wrapped system.transform handler
|
|
15
|
+
*/
|
|
16
|
+
export declare function createPhaseMonitorHook(directory: string, preflightManager: PreflightTriggerManager): (input: unknown, output: unknown) => Promise<void>;
|
package/dist/index.d.ts
CHANGED
|
@@ -12,4 +12,4 @@ import type { Plugin } from '@opencode-ai/plugin';
|
|
|
12
12
|
declare const OpenCodeSwarm: Plugin;
|
|
13
13
|
export default OpenCodeSwarm;
|
|
14
14
|
export type { AgentDefinition } from './agents';
|
|
15
|
-
export type { AgentName, PipelineAgentName, PluginConfig, QAAgentName, } from './config';
|
|
15
|
+
export type { AgentName, AutomationCapabilities, AutomationConfig, AutomationMode, PipelineAgentName, PluginConfig, QAAgentName, } from './config';
|