opencode-swarm 7.61.0 → 7.62.1

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.
@@ -1,3 +1,17 @@
1
+ interface PlanPhase {
2
+ id: number;
3
+ name: string;
4
+ status: string;
5
+ tasks: Array<{
6
+ id: string;
7
+ status: string;
8
+ close_reason?: string;
9
+ }>;
10
+ }
11
+ interface PlanData {
12
+ title: string;
13
+ phases: PlanPhase[];
14
+ }
1
15
  interface CloseCommandOptions {
2
16
  sessionID?: string;
3
17
  skillReviewTimeoutMs?: number;
@@ -6,6 +20,16 @@ interface CloseKnowledgeEntry {
6
20
  created_at?: string;
7
21
  }
8
22
  declare function countSessionKnowledgeEntries(entries: CloseKnowledgeEntry[], sessionStart: string | undefined, fallbackCount: number): number;
23
+ declare function copyDirRecursive(src: string, dest: string): Promise<number>;
24
+ /**
25
+ * Guarantee all phases and tasks in a plan are marked complete/closed.
26
+ * Mutates planData in place. Returns actual IDs of newly closed phases and
27
+ * tasks so the caller can track only genuinely new closures (idempotent).
28
+ */
29
+ declare function guaranteeAllPlansComplete(planData: PlanData): {
30
+ closedPhaseIds: number[];
31
+ closedTaskIds: string[];
32
+ };
9
33
  /**
10
34
  * Handles /swarm close command - performs full terminal session finalization:
11
35
  * 0. Guarantee: mark all incomplete phases/tasks as closed
@@ -20,5 +44,7 @@ export declare function handleCloseCommand(directory: string, args: string[], op
20
44
  export declare const _internals: {
21
45
  countSessionKnowledgeEntries: typeof countSessionKnowledgeEntries;
22
46
  CLOSE_SKILL_REVIEW_TIMEOUT_MS: number;
47
+ guaranteeAllPlansComplete: typeof guaranteeAllPlansComplete;
48
+ copyDirRecursive: typeof copyDirRecursive;
23
49
  };
24
50
  export {};
@@ -38,6 +38,7 @@ export { handleResetCommand } from './reset';
38
38
  export { handleResetSessionCommand } from './reset-session';
39
39
  export { handleRetrieveCommand } from './retrieve';
40
40
  export { handleRollbackCommand } from './rollback';
41
+ export { handleSddCommand, handleSddProjectCommand, handleSddStatusCommand, handleSddValidateCommand, } from './sdd';
41
42
  export { handleSimulateCommand } from './simulate';
42
43
  export { handleSpecifyCommand } from './specify';
43
44
  export { handleStatusCommand } from './status';
@@ -270,6 +270,34 @@ export declare const COMMAND_REGISTRY: {
270
270
  readonly args: "--threshold <number>, --min-commits <number>";
271
271
  readonly category: "diagnostics";
272
272
  };
273
+ readonly sdd: {
274
+ readonly handler: (ctx: CommandContext) => Promise<string>;
275
+ readonly description: "Manage OpenSpec-compatible SDD artifacts and effective spec projection";
276
+ readonly args: "status|validate|project [--json] [--change <id>] [--dry-run]";
277
+ readonly details: "Parent command for spec-driven development artifacts. Use sdd status to inspect .swarm/spec.md plus openspec/ artifacts, sdd validate to validate OpenSpec-compatible deltas, and sdd project to materialize the effective spec into .swarm/spec.md for planning.";
278
+ readonly category: "utility";
279
+ };
280
+ readonly 'sdd status': {
281
+ readonly handler: (ctx: CommandContext) => Promise<string>;
282
+ readonly description: "Show OpenSpec-compatible SDD status and effective spec source";
283
+ readonly subcommandOf: "sdd";
284
+ readonly args: "[--json]";
285
+ readonly category: "utility";
286
+ };
287
+ readonly 'sdd validate': {
288
+ readonly handler: (ctx: CommandContext) => Promise<string>;
289
+ readonly description: "Validate OpenSpec-compatible artifacts and effective spec projection";
290
+ readonly subcommandOf: "sdd";
291
+ readonly args: "[--json] [--change <id>]";
292
+ readonly category: "utility";
293
+ };
294
+ readonly 'sdd project': {
295
+ readonly handler: (ctx: CommandContext) => Promise<string>;
296
+ readonly description: "Materialize the OpenSpec-compatible effective spec into .swarm/spec.md";
297
+ readonly subcommandOf: "sdd";
298
+ readonly args: "[--dry-run] [--json] [--change <id>]";
299
+ readonly category: "utility";
300
+ };
273
301
  readonly analyze: {
274
302
  readonly handler: (ctx: CommandContext) => Promise<string>;
275
303
  readonly description: "Analyze spec.md vs plan.md for requirement coverage gaps";
@@ -0,0 +1,15 @@
1
+ interface ParsedSddArgs {
2
+ json: boolean;
3
+ dryRun: boolean;
4
+ changeId?: string;
5
+ error?: string;
6
+ }
7
+ declare function parseArgs(args: string[]): ParsedSddArgs;
8
+ export declare function handleSddStatusCommand(directory: string, args: string[]): Promise<string>;
9
+ export declare function handleSddValidateCommand(directory: string, args: string[]): Promise<string>;
10
+ export declare function handleSddProjectCommand(directory: string, args: string[]): Promise<string>;
11
+ export declare function handleSddCommand(_directory: string, _args: string[]): Promise<string>;
12
+ export declare const _test_exports: {
13
+ parseArgs: typeof parseArgs;
14
+ };
15
+ export {};
@@ -1,5 +1,5 @@
1
1
  import type { ResolvedSwarmCommand, SwarmCommandPolicyResult } from './command-dispatch.js';
2
- export declare const SWARM_COMMAND_TOOL_COMMANDS: readonly ["agents", "config", "config doctor", "doctor tools", "status", "show-plan", "help", "history", "evidence", "evidence summary", "retrieve", "diagnose", "preflight", "benchmark", "knowledge", "memory", "memory status", "memory pending", "memory recall-log", "memory compact", "memory stale", "memory export", "memory evaluate", "memory import", "memory migrate", "sync-plan", "export"];
2
+ export declare const SWARM_COMMAND_TOOL_COMMANDS: readonly ["agents", "config", "config doctor", "doctor tools", "status", "show-plan", "help", "history", "evidence", "evidence summary", "retrieve", "diagnose", "preflight", "benchmark", "knowledge", "memory", "memory status", "memory pending", "memory recall-log", "memory compact", "memory stale", "memory export", "memory evaluate", "memory import", "memory migrate", "sdd", "sdd status", "sdd validate", "sdd project", "sync-plan", "export"];
3
3
  export type SwarmCommandToolInputCommand = (typeof SWARM_COMMAND_TOOL_COMMANDS)[number];
4
4
  export declare const SWARM_COMMAND_TOOL_ALLOWLIST: Set<string>;
5
5
  /**