opencode-swarm 7.3.1 → 7.3.3

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.
@@ -42,6 +42,7 @@ export { schema_drift } from './schema-drift';
42
42
  export { search } from './search';
43
43
  export { type SecretFinding, type SecretscanResult, secretscan, } from './secretscan';
44
44
  export { set_qa_gates } from './set-qa-gates';
45
+ export { submit_phase_council_verdicts } from './submit-phase-council-verdicts';
45
46
  import { suggestPatch } from './suggest-patch';
46
47
  export { suggestPatch };
47
48
  export type { SuggestPatchArgs } from './suggest-patch';
@@ -0,0 +1,39 @@
1
+ import type { tool } from '@opencode-ai/plugin';
2
+ import { z } from 'zod';
3
+ export declare const ArgsSchema: z.ZodObject<{
4
+ phaseNumber: z.ZodNumber;
5
+ swarmId: z.ZodString;
6
+ phaseSummary: z.ZodString;
7
+ roundNumber: z.ZodOptional<z.ZodNumber>;
8
+ verdicts: z.ZodArray<z.ZodObject<{
9
+ agent: z.ZodEnum<{
10
+ sme: "sme";
11
+ reviewer: "reviewer";
12
+ critic: "critic";
13
+ explorer: "explorer";
14
+ test_engineer: "test_engineer";
15
+ }>;
16
+ verdict: z.ZodEnum<{
17
+ APPROVE: "APPROVE";
18
+ REJECT: "REJECT";
19
+ CONCERNS: "CONCERNS";
20
+ }>;
21
+ confidence: z.ZodNumber;
22
+ findings: z.ZodArray<z.ZodObject<{
23
+ severity: z.ZodEnum<{
24
+ HIGH: "HIGH";
25
+ MEDIUM: "MEDIUM";
26
+ LOW: "LOW";
27
+ }>;
28
+ category: z.ZodString;
29
+ location: z.ZodString;
30
+ detail: z.ZodString;
31
+ evidence: z.ZodString;
32
+ }, z.core.$strip>>;
33
+ criteriaAssessed: z.ZodArray<z.ZodString>;
34
+ criteriaUnmet: z.ZodArray<z.ZodString>;
35
+ durationMs: z.ZodNumber;
36
+ }, z.core.$strip>>;
37
+ working_directory: z.ZodOptional<z.ZodString>;
38
+ }, z.core.$strip>;
39
+ export declare const submit_phase_council_verdicts: ReturnType<typeof tool>;
@@ -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' | 'diff_summary' | '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' | 'submit_council_verdicts' | 'declare_council_criteria' | 'sbom_generate' | 'checkpoint' | 'pkg_audit' | 'test_runner' | 'test_impact' | 'mutation_test' | 'generate_mutants' | 'detect_domains' | 'gitingest' | 'retrieve_summary' | 'extract_code_blocks' | 'phase_complete' | 'save_plan' | 'update_task_status' | 'lint_spec' | 'write_retro' | 'write_drift_evidence' | 'write_hallucination_evidence' | 'write_mutation_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' | 'req_coverage' | 'get_approved_plan' | 'repo_map' | 'get_qa_gate_profile' | 'set_qa_gates' | 'web_search' | 'convene_general_council';
6
+ export type ToolName = 'diff' | 'diff_summary' | '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' | 'submit_council_verdicts' | 'submit_phase_council_verdicts' | 'declare_council_criteria' | 'sbom_generate' | 'checkpoint' | 'pkg_audit' | 'test_runner' | 'test_impact' | 'mutation_test' | 'generate_mutants' | 'detect_domains' | 'gitingest' | 'retrieve_summary' | 'extract_code_blocks' | 'phase_complete' | 'save_plan' | 'update_task_status' | 'lint_spec' | 'write_retro' | 'write_drift_evidence' | 'write_hallucination_evidence' | 'write_mutation_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' | 'req_coverage' | 'get_approved_plan' | 'repo_map' | 'get_qa_gate_profile' | 'set_qa_gates' | 'web_search' | 'convene_general_council';
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 */
@@ -7,11 +7,46 @@ export declare let _gitignoreWarningEmitted: boolean;
7
7
  * Reset the deduplication flag. Exposed for test isolation only.
8
8
  */
9
9
  export declare function resetGitignoreWarningState(): void;
10
+ /**
11
+ * Module-level flag for ensureSwarmGitExcluded deduplication.
12
+ * Exported for test reset purposes only.
13
+ */
14
+ export declare let _swarmGitExcludedChecked: boolean;
15
+ /**
16
+ * Reset the ensureSwarmGitExcluded deduplication flag. Exposed for test isolation only.
17
+ */
18
+ export declare function resetSwarmGitExcludedState(): void;
10
19
  /**
11
20
  * Checks whether `.swarm/` is covered by `.gitignore` or `.git/info/exclude`
12
21
  * in the git repo rooted at or above `directory`. If not covered, emits a
13
22
  * single `console.warn` (unless `quiet` is true). Fires at most once per process.
14
23
  *
15
24
  * Never throws — any file-system error silently skips the check.
25
+ *
26
+ * @deprecated Use `ensureSwarmGitExcluded` instead. This function only recognises
27
+ * `.git` as a directory and does NOT handle Git worktrees or submodules.
16
28
  */
17
29
  export declare function warnIfSwarmNotGitignored(directory: string, quiet?: boolean): void;
30
+ export interface EnsureSwarmGitExcludedOptions {
31
+ quiet?: boolean;
32
+ }
33
+ /**
34
+ * Automatically protect `.swarm/` from Git pollution before any `.swarm/` write.
35
+ *
36
+ * Uses git CLI (not filesystem walks) so it correctly handles Git worktrees
37
+ * and submodules where `.git` is a file rather than a directory.
38
+ *
39
+ * Steps:
40
+ * 1. Resolve git root via `git rev-parse --show-toplevel`
41
+ * 2. Resolve local exclude path via `git rev-parse --git-path info/exclude`
42
+ * 3. Check if `.swarm/` is already ignored via `git check-ignore -q`
43
+ * 4. If not ignored: append `.swarm/` to the local exclude file (idempotent)
44
+ * 5. Detect tracked `.swarm/` files via `git ls-files -- .swarm`
45
+ * 6. If tracked: emit an unsuppressed remediation warning
46
+ *
47
+ * Never throws. Fires at most once per process.
48
+ *
49
+ * quiet option: only suppresses cosmetic logs. The exclude write and tracked-file
50
+ * warning are never suppressed regardless of quiet mode.
51
+ */
52
+ export declare function ensureSwarmGitExcluded(directory: string, options?: EnsureSwarmGitExcludedOptions): Promise<void>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-swarm",
3
- "version": "7.3.1",
3
+ "version": "7.3.3",
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",