opencode-swarm 7.62.1 → 7.64.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/.opencode/skills/swarm-pr-review/SKILL.md +124 -0
- package/README.md +57 -0
- package/dist/agents/architect.d.ts +1 -1
- package/dist/agents/explorer.d.ts +1 -1
- package/dist/agents/reviewer-directive-compliance.d.ts +43 -0
- package/dist/cli/index.js +3418 -1029
- package/dist/config/constants.d.ts +2 -0
- package/dist/config/evidence-schema.d.ts +44 -44
- package/dist/config/schema.d.ts +201 -0
- package/dist/hooks/delegate-ack-collector.d.ts +51 -0
- package/dist/hooks/delegate-directive-injection.d.ts +33 -0
- package/dist/hooks/knowledge-application.d.ts +4 -3
- package/dist/hooks/knowledge-curator.d.ts +73 -1
- package/dist/hooks/knowledge-escalator.d.ts +50 -0
- package/dist/hooks/knowledge-events.d.ts +63 -3
- package/dist/hooks/knowledge-injector.d.ts +69 -1
- package/dist/hooks/knowledge-types.d.ts +41 -1
- package/dist/hooks/knowledge-validator.d.ts +43 -0
- package/dist/hooks/micro-reflector.d.ts +91 -0
- package/dist/hooks/phase-complete-directive-gate.d.ts +44 -0
- package/dist/hooks/phase-directives.d.ts +29 -0
- package/dist/hooks/reviewer-verdict-parser.d.ts +64 -0
- package/dist/hooks/search-knowledge.d.ts +33 -0
- package/dist/index.js +8600 -3951
- package/dist/memory/schema.d.ts +2 -2
- package/dist/services/directive-predicate-runner.d.ts +72 -0
- package/dist/services/external-skill-store.d.ts +96 -0
- package/dist/services/external-skill-validator.d.ts +160 -0
- package/dist/services/knowledge-diagnostics.d.ts +19 -0
- package/dist/services/skill-improver.d.ts +11 -0
- package/dist/services/status-service.d.ts +3 -0
- package/dist/services/synonym-map.d.ts +136 -0
- package/dist/services/trajectory-cluster.d.ts +49 -0
- package/dist/services/unactionable-hardening.d.ts +47 -0
- package/dist/tools/external-skill-delete.d.ts +16 -0
- package/dist/tools/external-skill-discover.d.ts +21 -0
- package/dist/tools/external-skill-inspect.d.ts +15 -0
- package/dist/tools/external-skill-list.d.ts +15 -0
- package/dist/tools/external-skill-promote.d.ts +20 -0
- package/dist/tools/external-skill-reject.d.ts +15 -0
- package/dist/tools/external-skill-revoke.d.ts +17 -0
- package/dist/tools/index.d.ts +7 -0
- package/dist/tools/manifest.d.ts +7 -0
- package/dist/tools/phase-complete.d.ts +10 -0
- package/dist/tools/tool-metadata.d.ts +28 -0
- package/package.json +1 -1
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* external_skill_discover — Discover external skill candidates from configured sources.
|
|
3
|
+
*
|
|
4
|
+
* Fetches skill content from URLs or accepts manual imports, validates them
|
|
5
|
+
* through the security gates (prompt-injection, unsafe-instructions,
|
|
6
|
+
* provenance-integrity), and stores them as quarantined candidates in the
|
|
7
|
+
* external skill store.
|
|
8
|
+
*
|
|
9
|
+
* Uses an `_internals` DI seam for testability — no `mock.module` leakage.
|
|
10
|
+
*/
|
|
11
|
+
import { createSwarmTool } from './create-tool.js';
|
|
12
|
+
export declare const _internals: {
|
|
13
|
+
fetchContent: (_url: string, _timeoutMs: number) => Promise<{
|
|
14
|
+
content: string;
|
|
15
|
+
finalUrl: string;
|
|
16
|
+
}>;
|
|
17
|
+
getTimestamp: () => string;
|
|
18
|
+
computeSha256: (content: string) => string;
|
|
19
|
+
uuid: () => string;
|
|
20
|
+
};
|
|
21
|
+
export declare const external_skill_discover: ReturnType<typeof createSwarmTool>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* external_skill_inspect — Inspect a specific external skill candidate by ID.
|
|
3
|
+
*
|
|
4
|
+
* Read-only tool that returns the full candidate record including provenance,
|
|
5
|
+
* skill_body, and evaluation_history. Returns a disabled message when
|
|
6
|
+
* external_skills.curation_enabled is false.
|
|
7
|
+
*
|
|
8
|
+
* Uses an `_internals` DI seam for testability — no `mock.module` leakage.
|
|
9
|
+
*/
|
|
10
|
+
import type { ExternalSkillsConfig } from '../config/schema.js';
|
|
11
|
+
import { createSwarmTool } from './create-tool.js';
|
|
12
|
+
export declare const _internals: {
|
|
13
|
+
loadConfig: (directory: string) => ExternalSkillsConfig | undefined;
|
|
14
|
+
};
|
|
15
|
+
export declare const external_skill_inspect: ReturnType<typeof createSwarmTool>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* external_skill_list — List external skill candidates in the quarantine store.
|
|
3
|
+
*
|
|
4
|
+
* Read-only tool that returns candidate summaries filtered by evaluation verdict,
|
|
5
|
+
* source type, or date range. Returns a disabled message when
|
|
6
|
+
* external_skills.curation_enabled is false.
|
|
7
|
+
*
|
|
8
|
+
* Uses an `_internals` DI seam for testability — no `mock.module` leakage.
|
|
9
|
+
*/
|
|
10
|
+
import type { ExternalSkillsConfig } from '../config/schema.js';
|
|
11
|
+
import { createSwarmTool } from './create-tool.js';
|
|
12
|
+
export declare const _internals: {
|
|
13
|
+
loadConfig: (directory: string) => ExternalSkillsConfig | undefined;
|
|
14
|
+
};
|
|
15
|
+
export declare const external_skill_list: ReturnType<typeof createSwarmTool>;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* external_skill_promote — Promote a validated external skill candidate to an
|
|
3
|
+
* active generated skill.
|
|
4
|
+
*
|
|
5
|
+
* Re-runs all three validation gates (TOCTOU re-validation). Requires explicit
|
|
6
|
+
* user approval (`approver='user'`). Writes SKILL.md to
|
|
7
|
+
* `.opencode/skills/generated/<slug>/` with provenance frontmatter. Stamps the
|
|
8
|
+
* candidate as promoted and creates an audit record.
|
|
9
|
+
*
|
|
10
|
+
* Uses an `_internals` DI seam for testability — no `mock.module` leakage.
|
|
11
|
+
*/
|
|
12
|
+
import type { ExternalSkillsConfig } from '../config/schema.js';
|
|
13
|
+
import { createSwarmTool } from './create-tool.js';
|
|
14
|
+
export declare const _internals: {
|
|
15
|
+
loadConfig: (directory: string) => ExternalSkillsConfig | undefined;
|
|
16
|
+
getTimestamp: () => string;
|
|
17
|
+
fileExists: (filePath: string) => Promise<boolean>;
|
|
18
|
+
writeSkillFile: (filePath: string, content: string) => Promise<void>;
|
|
19
|
+
};
|
|
20
|
+
export declare const external_skill_promote: ReturnType<typeof createSwarmTool>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* external_skill_reject — Reject an external skill candidate after evaluation.
|
|
3
|
+
*
|
|
4
|
+
* Marks a candidate as rejected with a user-provided reason. Records the
|
|
5
|
+
* state transition in evaluation_history with timestamp, actor, and reason.
|
|
6
|
+
* Returns a disabled message when external_skills.curation_enabled is false.
|
|
7
|
+
*
|
|
8
|
+
* Uses an `_internals` DI seam for testability — no `mock.module` leakage.
|
|
9
|
+
*/
|
|
10
|
+
import type { ExternalSkillsConfig } from '../config/schema.js';
|
|
11
|
+
import { createSwarmTool } from './create-tool.js';
|
|
12
|
+
export declare const _internals: {
|
|
13
|
+
loadConfig: (directory: string) => ExternalSkillsConfig | undefined;
|
|
14
|
+
};
|
|
15
|
+
export declare const external_skill_reject: ReturnType<typeof createSwarmTool>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* external_skill_revoke — Revoke a previously promoted external skill.
|
|
3
|
+
*
|
|
4
|
+
* Atomically retires the SKILL.md from `.opencode/skills/generated/<slug>/`
|
|
5
|
+
* and stamps the candidate with evaluation_verdict: 'revoked'. The candidate
|
|
6
|
+
* stays in quarantine for forensic audit.
|
|
7
|
+
*
|
|
8
|
+
* Uses an `_internals` DI seam for testability — no `mock.module` leakage.
|
|
9
|
+
*/
|
|
10
|
+
import type { ExternalSkillsConfig } from '../config/schema.js';
|
|
11
|
+
import { createSwarmTool } from './create-tool.js';
|
|
12
|
+
export declare const _internals: {
|
|
13
|
+
loadConfig: (directory: string) => ExternalSkillsConfig | undefined;
|
|
14
|
+
getTimestamp: () => string;
|
|
15
|
+
retireSkillFile: (filePath: string) => Promise<boolean>;
|
|
16
|
+
};
|
|
17
|
+
export declare const external_skill_revoke: ReturnType<typeof createSwarmTool>;
|
package/dist/tools/index.d.ts
CHANGED
|
@@ -18,6 +18,13 @@ export { diff_summary } from './diff-summary';
|
|
|
18
18
|
export { doc_extract, doc_scan } from './doc-scan';
|
|
19
19
|
export { detect_domains } from './domain-detector';
|
|
20
20
|
export { evidence_check } from './evidence-check';
|
|
21
|
+
export { external_skill_delete } from './external-skill-delete';
|
|
22
|
+
export { external_skill_discover } from './external-skill-discover';
|
|
23
|
+
export { external_skill_inspect } from './external-skill-inspect';
|
|
24
|
+
export { external_skill_list } from './external-skill-list';
|
|
25
|
+
export { external_skill_promote } from './external-skill-promote';
|
|
26
|
+
export { external_skill_reject } from './external-skill-reject';
|
|
27
|
+
export { external_skill_revoke } from './external-skill-revoke';
|
|
21
28
|
export { extract_code_blocks } from './file-extractor';
|
|
22
29
|
export { get_approved_plan } from './get-approved-plan';
|
|
23
30
|
export { get_qa_gate_profile } from './get-qa-gate-profile';
|
package/dist/tools/manifest.d.ts
CHANGED
|
@@ -108,4 +108,11 @@ export declare const TOOL_MANIFEST: {
|
|
|
108
108
|
lean_turbo_run_phase: () => ToolDefinition;
|
|
109
109
|
lean_turbo_status: () => ToolDefinition;
|
|
110
110
|
apply_patch: () => ToolDefinition;
|
|
111
|
+
external_skill_discover: () => ToolDefinition;
|
|
112
|
+
external_skill_list: () => ToolDefinition;
|
|
113
|
+
external_skill_inspect: () => ToolDefinition;
|
|
114
|
+
external_skill_promote: () => ToolDefinition;
|
|
115
|
+
external_skill_reject: () => ToolDefinition;
|
|
116
|
+
external_skill_delete: () => ToolDefinition;
|
|
117
|
+
external_skill_revoke: () => ToolDefinition;
|
|
111
118
|
};
|
|
@@ -13,6 +13,16 @@ export interface PhaseCompleteArgs {
|
|
|
13
13
|
summary?: string;
|
|
14
14
|
/** Session ID to track state (optional, defaults to current session context) */
|
|
15
15
|
sessionID?: string;
|
|
16
|
+
/**
|
|
17
|
+
* Architect-only (Change 2, Task 2.4): explicitly accept these unresolved
|
|
18
|
+
* critical directive IDs. Requires acceptViolationsJustification. Each
|
|
19
|
+
* accepted id is logged as an `override` knowledge event.
|
|
20
|
+
*/
|
|
21
|
+
acceptViolations?: string[];
|
|
22
|
+
/** Written justification required to use acceptViolations. */
|
|
23
|
+
acceptViolationsJustification?: string;
|
|
24
|
+
/** Calling agent identity (from tool ctx) — gates the override to the architect. */
|
|
25
|
+
callerAgent?: string;
|
|
16
26
|
}
|
|
17
27
|
export declare const MAX_OUTPUT_BYTES = 512000;
|
|
18
28
|
/**
|
|
@@ -363,6 +363,34 @@ export declare const TOOL_METADATA: {
|
|
|
363
363
|
description: string;
|
|
364
364
|
agents: "coder"[];
|
|
365
365
|
};
|
|
366
|
+
external_skill_discover: {
|
|
367
|
+
description: string;
|
|
368
|
+
agents: never[];
|
|
369
|
+
};
|
|
370
|
+
external_skill_list: {
|
|
371
|
+
description: string;
|
|
372
|
+
agents: never[];
|
|
373
|
+
};
|
|
374
|
+
external_skill_inspect: {
|
|
375
|
+
description: string;
|
|
376
|
+
agents: never[];
|
|
377
|
+
};
|
|
378
|
+
external_skill_promote: {
|
|
379
|
+
description: string;
|
|
380
|
+
agents: never[];
|
|
381
|
+
};
|
|
382
|
+
external_skill_reject: {
|
|
383
|
+
description: string;
|
|
384
|
+
agents: never[];
|
|
385
|
+
};
|
|
386
|
+
external_skill_delete: {
|
|
387
|
+
description: string;
|
|
388
|
+
agents: never[];
|
|
389
|
+
};
|
|
390
|
+
external_skill_revoke: {
|
|
391
|
+
description: string;
|
|
392
|
+
agents: never[];
|
|
393
|
+
};
|
|
366
394
|
};
|
|
367
395
|
/** Union type of all valid tool names (the metadata keys). */
|
|
368
396
|
export type ToolName = keyof typeof TOOL_METADATA;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "opencode-swarm",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.64.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",
|