opencode-swarm 7.38.0 → 7.40.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.
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Handles the /swarm concurrency command.
3
+ * Supports setting, resetting, and checking concurrency override values.
4
+ *
5
+ * @param directory - Project directory (used to load plan execution_profile)
6
+ * @param args - Optional arguments: "set" | "status" | "reset" with optional value
7
+ * @param sessionID - Session ID for accessing active session state
8
+ * @returns Feedback message about concurrency state
9
+ */
10
+ export declare function handleConcurrencyCommand(directory: string, args: string[], sessionID: string): Promise<string>;
@@ -11,6 +11,7 @@ export { handleCloseCommand } from './close';
11
11
  export { executeSwarmCommand, formatCommandNotFound, normalizeSwarmCommandInput, } from './command-dispatch.js';
12
12
  export type { CommandName } from './command-names.js';
13
13
  export { COMMAND_NAME_SET, COMMAND_NAMES } from './command-names.js';
14
+ export { handleConcurrencyCommand } from './concurrency';
14
15
  export { handleConfigCommand } from './config';
15
16
  export { handleCouncilCommand } from './council';
16
17
  export { handleCurateCommand } from './curate';
@@ -24,7 +25,7 @@ export { handleFullAutoCommand } from './full-auto';
24
25
  export { handleHandoffCommand } from './handoff';
25
26
  export { handleHistoryCommand } from './history';
26
27
  export { handleKnowledgeListCommand, handleKnowledgeMigrateCommand, handleKnowledgeQuarantineCommand, handleKnowledgeRestoreCommand, } from './knowledge';
27
- export { handleMemoryCommand, handleMemoryEvaluateCommand, handleMemoryExportCommand, handleMemoryImportCommand, handleMemoryMigrateCommand, handleMemoryStatusCommand, } from './memory';
28
+ export { handleMemoryCommand, handleMemoryExportCommand, handleMemoryImportCommand, handleMemoryMigrateCommand, handleMemoryStatusCommand, } from './memory';
28
29
  export { handlePlanCommand } from './plan';
29
30
  export { handlePreflightCommand } from './preflight';
30
31
  export { handlePromoteCommand } from './promote';
@@ -1,5 +1,9 @@
1
1
  export declare function handleMemoryCommand(_directory: string, _args: string[]): Promise<string>;
2
2
  export declare function handleMemoryStatusCommand(directory: string, _args: string[]): Promise<string>;
3
+ export declare function handleMemoryPendingCommand(directory: string, args: string[]): Promise<string>;
4
+ export declare function handleMemoryRecallLogCommand(directory: string, args: string[]): Promise<string>;
5
+ export declare function handleMemoryStaleCommand(directory: string, args: string[]): Promise<string>;
6
+ export declare function handleMemoryCompactCommand(directory: string, args: string[]): Promise<string>;
3
7
  export declare function handleMemoryMigrateCommand(directory: string, _args: string[]): Promise<string>;
4
8
  export declare function handleMemoryImportCommand(directory: string, _args: string[]): Promise<string>;
5
9
  export declare function handleMemoryExportCommand(directory: string, _args: string[]): Promise<string>;
@@ -256,6 +256,13 @@ export declare const COMMAND_REGISTRY: {
256
256
  readonly aliasOf: "finalize";
257
257
  readonly deprecated: true;
258
258
  };
259
+ readonly concurrency: {
260
+ readonly handler: (ctx: CommandContext) => Promise<string>;
261
+ readonly description: "Manage runtime concurrency override for plan execution [set|status|reset]";
262
+ readonly args: "set <N|preset>, status, reset";
263
+ readonly details: string;
264
+ readonly category: "utility";
265
+ };
259
266
  readonly simulate: {
260
267
  readonly handler: (ctx: CommandContext) => Promise<string>;
261
268
  readonly description: "Dry-run hidden coupling analysis with configurable thresholds";
@@ -434,6 +441,34 @@ export declare const COMMAND_REGISTRY: {
434
441
  readonly args: "";
435
442
  readonly category: "diagnostics";
436
443
  };
444
+ readonly 'memory pending': {
445
+ readonly handler: (ctx: CommandContext) => Promise<string>;
446
+ readonly description: "Show pending Swarm memory proposals and rejection reasons";
447
+ readonly subcommandOf: "memory";
448
+ readonly args: "--limit <n>";
449
+ readonly category: "diagnostics";
450
+ };
451
+ readonly 'memory recall-log': {
452
+ readonly handler: (ctx: CommandContext) => Promise<string>;
453
+ readonly description: "Summarize Swarm memory recall usage";
454
+ readonly subcommandOf: "memory";
455
+ readonly args: "--limit <n>";
456
+ readonly category: "diagnostics";
457
+ };
458
+ readonly 'memory compact': {
459
+ readonly handler: (ctx: CommandContext) => Promise<string>;
460
+ readonly description: "Compact deleted, superseded, and expired scratch memories";
461
+ readonly subcommandOf: "memory";
462
+ readonly args: "--confirm";
463
+ readonly category: "utility";
464
+ };
465
+ readonly 'memory stale': {
466
+ readonly handler: (ctx: CommandContext) => Promise<string>;
467
+ readonly description: "List stale and low-utility Swarm memories";
468
+ readonly subcommandOf: "memory";
469
+ readonly args: "--limit <n>";
470
+ readonly category: "diagnostics";
471
+ };
437
472
  readonly 'memory export': {
438
473
  readonly handler: (ctx: CommandContext) => Promise<string>;
439
474
  readonly description: "Export current Swarm memory to JSONL files";
@@ -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", "config-doctor", "doctor", "doctor tools", "status", "show-plan", "plan", "help", "history", "evidence", "evidence summary", "evidence-summary", "retrieve", "diagnose", "preflight", "benchmark", "knowledge", "memory", "memory status", "memory export", "memory evaluate", "memory import", "memory migrate", "sync-plan", "export", "list-agents"];
2
+ export declare const SWARM_COMMAND_TOOL_COMMANDS: readonly ["agents", "config", "config doctor", "config-doctor", "doctor", "doctor tools", "status", "show-plan", "plan", "help", "history", "evidence", "evidence summary", "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", "list-agents"];
3
3
  export type SwarmCommandToolInputCommand = (typeof SWARM_COMMAND_TOOL_COMMANDS)[number];
4
4
  export declare const SWARM_COMMAND_TOOL_ALLOWLIST: Set<string>;
5
5
  /**
@@ -531,6 +531,10 @@ export declare const MemoryConfigSchema: z.ZodObject<{
531
531
  redaction: z.ZodDefault<z.ZodObject<{
532
532
  rejectDurableSecrets: z.ZodDefault<z.ZodBoolean>;
533
533
  }, z.core.$strip>>;
534
+ maintenance: z.ZodDefault<z.ZodObject<{
535
+ lowUtilityMaxConfidence: z.ZodDefault<z.ZodNumber>;
536
+ lowUtilityMinAgeDays: z.ZodDefault<z.ZodNumber>;
537
+ }, z.core.$strip>>;
534
538
  hardDelete: z.ZodDefault<z.ZodBoolean>;
535
539
  }, z.core.$strip>;
536
540
  export type MemoryConfig = z.infer<typeof MemoryConfigSchema>;
@@ -1196,6 +1200,10 @@ export declare const PluginConfigSchema: z.ZodObject<{
1196
1200
  redaction: z.ZodDefault<z.ZodObject<{
1197
1201
  rejectDurableSecrets: z.ZodDefault<z.ZodBoolean>;
1198
1202
  }, z.core.$strip>>;
1203
+ maintenance: z.ZodDefault<z.ZodObject<{
1204
+ lowUtilityMaxConfidence: z.ZodDefault<z.ZodNumber>;
1205
+ lowUtilityMinAgeDays: z.ZodDefault<z.ZodNumber>;
1206
+ }, z.core.$strip>>;
1199
1207
  hardDelete: z.ZodDefault<z.ZodBoolean>;
1200
1208
  }, z.core.$strip>>;
1201
1209
  curator: z.ZodOptional<z.ZodObject<{
@@ -55,6 +55,7 @@ interface MessageWithParts {
55
55
  parts: MessagePart[];
56
56
  }
57
57
  declare function resolveDelegatedPlanTaskId(args: Record<string, unknown>, knownPlanTaskIds?: ReadonlySet<string>): string | null;
58
+ declare function buildParallelExecutionGuidance(directory: string | undefined, sessionID: string, session: AgentSessionState): Promise<string | null>;
58
59
  /**
59
60
  * Resolves the correct task ID for evidence recording by chaining:
60
61
  * 1. Explicit task_id in direct args (structured field)
@@ -68,11 +69,13 @@ declare function resolveDelegatedPlanTaskId(args: Record<string, unknown>, known
68
69
  declare function resolveEvidenceTaskId(args: Record<string, unknown> | undefined, session: AgentSessionState, directory: string): Promise<string | null>;
69
70
  /**
70
71
  * _internals export for testing — do not use in production code.
71
- * Exposes resolveEvidenceTaskId and resolveDelegatedPlanTaskId for unit testing.
72
+ * Exposes resolveEvidenceTaskId, resolveDelegatedPlanTaskId, and
73
+ * buildParallelExecutionGuidance for unit testing.
72
74
  */
73
75
  export declare const _internals: {
74
76
  resolveEvidenceTaskId: typeof resolveEvidenceTaskId;
75
77
  resolveDelegatedPlanTaskId: typeof resolveDelegatedPlanTaskId;
78
+ buildParallelExecutionGuidance: typeof buildParallelExecutionGuidance;
76
79
  };
77
80
  /**
78
81
  * Creates the experimental.chat.messages.transform hook for delegation gating.