opencode-swarm 6.55.0 → 6.56.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.
@@ -17,4 +17,10 @@ export type ToolDoctorResult = ConfigDoctorResult;
17
17
  * Verifies that every entry in TOOL_NAMES has a corresponding key
18
18
  * in the plugin's tool: {} block in src/index.ts.
19
19
  */
20
+ /**
21
+ * Returns a structured advisory string for any missing Class 3 binaries.
22
+ * Intended for injection into the architect's first system prompt.
23
+ * Returns null if all binaries are available.
24
+ */
25
+ export declare function getBinaryReadinessAdvisory(): string | null;
20
26
  export declare function runToolDoctor(_directory: string, pluginRoot?: string): ToolDoctorResult;
package/dist/state.d.ts CHANGED
@@ -7,6 +7,7 @@
7
7
  * and delegation chains.
8
8
  */
9
9
  import type { OpencodeClient } from '@opencode-ai/sdk';
10
+ import { type EnvironmentProfile } from './environment/profile.js';
10
11
  /**
11
12
  * Represents a single tool call entry for tracking purposes
12
13
  */
@@ -220,6 +221,8 @@ export declare const swarmState: {
220
221
  pendingRehydrations: Set<Promise<void>>;
221
222
  /** Whether full-auto mode is enabled in config */
222
223
  fullAutoEnabledInConfig: boolean;
224
+ /** Per-session environment profiles — keyed by sessionID */
225
+ environmentProfiles: Map<string, EnvironmentProfile>;
223
226
  };
224
227
  /**
225
228
  * Reset all state to initial values - useful for testing
@@ -373,3 +376,6 @@ export declare function hasActiveTurboMode(sessionID?: string): boolean;
373
376
  * @returns true if the specified session has fullAutoMode: true (model validation is advisory-only).
374
377
  */
375
378
  export declare function hasActiveFullAuto(sessionID?: string): boolean;
379
+ export declare function setSessionEnvironment(sessionId: string, profile: EnvironmentProfile): void;
380
+ export declare function getSessionEnvironment(sessionId: string): EnvironmentProfile | undefined;
381
+ export declare function ensureSessionEnvironment(sessionId: string): EnvironmentProfile;
@@ -1,4 +1,4 @@
1
- export type TelemetryEvent = 'session_started' | 'session_ended' | 'agent_activated' | 'delegation_begin' | 'delegation_end' | 'task_state_changed' | 'gate_passed' | 'gate_failed' | 'phase_changed' | 'budget_updated' | 'model_fallback' | 'hard_limit_hit' | 'revision_limit_hit' | 'loop_detected' | 'scope_violation' | 'qa_skip_violation' | 'heartbeat' | 'turbo_mode_changed' | 'auto_oversight_escalation';
1
+ export type TelemetryEvent = 'session_started' | 'session_ended' | 'agent_activated' | 'delegation_begin' | 'delegation_end' | 'task_state_changed' | 'gate_passed' | 'gate_failed' | 'phase_changed' | 'budget_updated' | 'model_fallback' | 'hard_limit_hit' | 'revision_limit_hit' | 'loop_detected' | 'scope_violation' | 'qa_skip_violation' | 'heartbeat' | 'turbo_mode_changed' | 'auto_oversight_escalation' | 'environment_detected';
2
2
  export type TelemetryListener = (event: TelemetryEvent, data: Record<string, unknown>) => void;
3
3
  /** @internal - For testing only */
4
4
  export declare function resetTelemetryForTesting(): void;
@@ -51,4 +51,5 @@ export declare const telemetry: {
51
51
  heartbeat(sessionId: string): void;
52
52
  turboModeChanged(sessionId: string, enabled: boolean, agentName: string): void;
53
53
  autoOversightEscalation(sessionId: string, reason: string, interactionCount: number, deadlockCount: number, phase?: number): void;
54
+ environmentDetected(sessionId: string, hostOS: string, shellFamily: string, executionMode: string): void;
54
55
  };
@@ -2,6 +2,10 @@ import { type ToolContext, tool } from '@opencode-ai/plugin';
2
2
  /**
3
3
  * Options for creating a swarm tool.
4
4
  * The args type is inferred from what you pass to the tool() call.
5
+ *
6
+ * Note: The session-level EnvironmentProfile is available to any tool that has
7
+ * a sessionID via `getSessionEnvironment(ctx?.sessionID)` from '../state.js'.
8
+ * ToolContext is defined externally in @opencode-ai/plugin and is not modified here.
5
9
  */
6
10
  export interface SwarmToolOptions<Args extends Record<string, unknown>> {
7
11
  description: string;
@@ -14,10 +14,10 @@ export { evidence_check } from './evidence-check';
14
14
  export { extract_code_blocks } from './file-extractor';
15
15
  export { fetchGitingest, type GitingestArgs, gitingest } from './gitingest';
16
16
  export { imports } from './imports';
17
- export { knowledgeAdd } from './knowledge-add';
17
+ export { knowledge_add } from './knowledge-add';
18
18
  export { knowledge_query } from './knowledge-query';
19
- export { knowledgeRecall } from './knowledge-recall';
20
- export { knowledgeRemove } from './knowledge-remove';
19
+ export { knowledge_recall } from './knowledge-recall';
20
+ export { knowledge_remove } from './knowledge-remove';
21
21
  export { lint } from './lint';
22
22
  export { phase_complete } from './phase-complete';
23
23
  export { pkg_audit } from './pkg-audit';
@@ -1,2 +1,2 @@
1
1
  import { createSwarmTool } from './create-tool.js';
2
- export declare const knowledgeAdd: ReturnType<typeof createSwarmTool>;
2
+ export declare const knowledge_add: ReturnType<typeof createSwarmTool>;
@@ -1,2 +1,2 @@
1
1
  import { createSwarmTool } from './create-tool.js';
2
- export declare const knowledgeRecall: ReturnType<typeof createSwarmTool>;
2
+ export declare const knowledge_recall: ReturnType<typeof createSwarmTool>;
@@ -1,2 +1,2 @@
1
1
  import { createSwarmTool } from './create-tool.js';
2
- export declare const knowledgeRemove: ReturnType<typeof createSwarmTool>;
2
+ export declare const knowledge_remove: ReturnType<typeof createSwarmTool>;
@@ -3,7 +3,7 @@
3
3
  * Used for constants and agent setup references.
4
4
  */
5
5
  /** Union type of all valid tool names */
6
- export type ToolName = 'diff' | 'syntax_check' | 'placeholder_scan' | 'imports' | 'lint' | 'secretscan' | 'sast_scan' | 'build_check' | 'pre_check_batch' | 'quality_budget' | 'symbols' | 'complexity_hotspots' | 'schema_drift' | 'todo_extract' | 'evidence_check' | 'check_gate_status' | 'completion_verify' | 'sbom_generate' | 'checkpoint' | 'pkg_audit' | 'test_runner' | 'detect_domains' | 'gitingest' | 'retrieve_summary' | 'extract_code_blocks' | 'phase_complete' | 'save_plan' | 'update_task_status' | 'write_retro' | 'write_drift_evidence' | 'declare_scope' | 'knowledge_query' | 'doc_scan' | 'doc_extract' | 'curator_analyze' | 'knowledgeAdd' | 'knowledgeRecall' | 'knowledgeRemove' | 'co_change_analyzer' | 'search' | 'batch_symbols' | 'suggest_patch';
6
+ export type ToolName = 'diff' | 'syntax_check' | 'placeholder_scan' | 'imports' | 'lint' | 'secretscan' | 'sast_scan' | 'build_check' | 'pre_check_batch' | 'quality_budget' | 'symbols' | 'complexity_hotspots' | 'schema_drift' | 'todo_extract' | 'evidence_check' | 'check_gate_status' | 'completion_verify' | 'sbom_generate' | 'checkpoint' | 'pkg_audit' | 'test_runner' | 'detect_domains' | 'gitingest' | 'retrieve_summary' | 'extract_code_blocks' | 'phase_complete' | 'save_plan' | 'update_task_status' | 'write_retro' | 'write_drift_evidence' | 'declare_scope' | 'knowledge_query' | 'doc_scan' | 'doc_extract' | 'curator_analyze' | 'knowledge_add' | 'knowledge_recall' | 'knowledge_remove' | 'co_change_analyzer' | 'search' | 'batch_symbols' | 'suggest_patch';
7
7
  /** Readonly array of all tool names */
8
8
  export declare const TOOL_NAMES: readonly ToolName[];
9
9
  /** Set for O(1) tool name validation */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-swarm",
3
- "version": "6.55.0",
3
+ "version": "6.56.0",
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",