opencode-swarm 7.114.7 → 7.114.9
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/ci-fix-monitor/SKILL.md +8 -13
- package/.opencode/skills/commit-pr/SKILL.md +4 -0
- package/.opencode/skills/engineering-conventions/SKILL.md +33 -0
- package/.opencode/skills/execute/SKILL.md +2 -0
- package/.opencode/skills/swarm-ci-monitor/SKILL.md +5 -0
- package/.opencode/skills/swarm-pr-feedback/SKILL.md +2 -0
- package/.opencode/skills/writing-tests/SKILL.md +2 -0
- package/README.md +16 -14
- package/dist/agents/template.d.ts +40 -20
- package/dist/cli/{curator-qshyr2tc.js → curator-5xt89z05.js} +7 -7
- package/dist/cli/{curator-llm-factory-2xgznxyw.js → curator-llm-factory-pnhvf3s3.js} +7 -7
- package/dist/cli/{evidence-summary-service-8g594znj.js → evidence-summary-service-fehwj116.js} +1 -1
- package/dist/cli/{guardrail-explain-4t8fnysh.js → guardrail-explain-7aztgtyh.js} +8 -8
- package/dist/cli/{hive-promoter-5ngbmnrw.js → hive-promoter-q899q2m6.js} +7 -7
- package/dist/cli/{index-z01r5483.js → index-54sevh81.js} +8 -8
- package/dist/cli/{index-7stsmndb.js → index-6f6y2rbp.js} +3 -3
- package/dist/cli/{index-kjbfry6m.js → index-8f2270hc.js} +1 -1
- package/dist/cli/{index-gmjrwz34.js → index-m9m7p49w.js} +1 -1
- package/dist/cli/{index-qrnhvhmg.js → index-n18yy0z1.js} +26 -2
- package/dist/cli/{index-91qesget.js → index-rk6qhyng.js} +2 -2
- package/dist/cli/{index-6ctejje2.js → index-typ408f4.js} +710 -630
- package/dist/cli/{index-vjvdvjd3.js → index-x12hvfpf.js} +3 -3
- package/dist/cli/{index-f6y341yk.js → index-yrrqs4b0.js} +82 -21
- package/dist/cli/index.d.ts +34 -0
- package/dist/cli/index.js +105 -28
- package/dist/cli/{knowledge-escalator-qn7ew687.js → knowledge-escalator-5gwp1ar8.js} +3 -3
- package/dist/cli/{knowledge-events-k2xsz5bh.js → knowledge-events-m304swh6.js} +1 -1
- package/dist/cli/{knowledge-store-ksa1dr2z.js → knowledge-store-9babt8rd.js} +1 -1
- package/dist/cli/{knowledge-validator-2knz0d2t.js → knowledge-validator-t9sym59g.js} +4 -2
- package/dist/cli/{skill-generator-w6qd9mde.js → skill-generator-tav44xpm.js} +4 -4
- package/dist/commands/ci-monitor.d.ts +18 -0
- package/dist/commands/registry.d.ts +8 -0
- package/dist/config/skill-mirrors.d.ts +22 -1
- package/dist/hooks/adversarial-detector.d.ts +6 -0
- package/dist/hooks/delegation-gate.d.ts +19 -0
- package/dist/hooks/guardrails/index.d.ts +2 -2
- package/dist/hooks/knowledge-validator.d.ts +22 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.js +194 -169
- package/dist/plan/ledger.d.ts +83 -20
- package/dist/types/delegation.d.ts +24 -0
- package/package.json +1 -1
- package/dist/graph/graph-builder.d.ts +0 -39
- package/dist/graph/graph-query.d.ts +0 -42
- package/dist/graph/graph-store.d.ts +0 -27
- package/dist/graph/import-extractor.d.ts +0 -44
- package/dist/graph/index.d.ts +0 -16
- package/dist/graph/symbol-extractor.d.ts +0 -17
- package/dist/graph/types.d.ts +0 -84
- package/dist/sandbox/win32/restricted-token-executor.d.ts +0 -9
|
@@ -68,6 +68,25 @@ interface ValidationContext {
|
|
|
68
68
|
* Returns { valid: true } on success, or { valid: false; reason: string } on failure.
|
|
69
69
|
*/
|
|
70
70
|
export declare function validateDelegationEnvelope(envelope: unknown, context: ValidationContext): EnvelopeValidationResult;
|
|
71
|
+
/**
|
|
72
|
+
* M15 advisory-only delegation-envelope check. NON-BLOCKING by contract: it
|
|
73
|
+
* NEVER throws and NEVER rejects a delegation. It runs
|
|
74
|
+
* {@link validateDelegationEnvelope} (previously reachable only from tests) on a
|
|
75
|
+
* delegation prompt that ALREADY parses as a structured `DelegationEnvelope`,
|
|
76
|
+
* and on validation failure appends a concise advisory to
|
|
77
|
+
* `session.pendingAdvisoryMessages` — the existing non-blocking channel.
|
|
78
|
+
*
|
|
79
|
+
* A real, minimal free-text delegation (TASK:/FILE:/... with no structured
|
|
80
|
+
* envelope) is a no-op: {@link parseDelegationEnvelope} returns `null`, so no
|
|
81
|
+
* advisory is produced and nothing is rejected. The new optional `specCriteria`
|
|
82
|
+
* field is OPTIONAL in the validator — a missing field passes silently; only a
|
|
83
|
+
* populated-but-malformed field surfaces an advisory.
|
|
84
|
+
*
|
|
85
|
+
* @returns the validation result when an envelope was parsed, or `null` when the
|
|
86
|
+
* prompt was not a structured envelope. Return value is for tests/telemetry;
|
|
87
|
+
* the side effect (advisory push) is the production purpose.
|
|
88
|
+
*/
|
|
89
|
+
export declare function appendDelegationEnvelopeAdvisory(session: AgentSessionState, promptText: string, context: ValidationContext): EnvelopeValidationResult | null;
|
|
71
90
|
interface MessageInfo {
|
|
72
91
|
role: string;
|
|
73
92
|
agent?: string;
|
|
@@ -38,8 +38,9 @@ export declare function enforceSpecDriftGate(directory: string | undefined, tool
|
|
|
38
38
|
declare function extractErrorSignal(errorContent: unknown): string;
|
|
39
39
|
/**
|
|
40
40
|
* Redacts sensitive values from a shell command string before audit logging.
|
|
41
|
+
* Single-sourced from ./helpers (which additionally redacts home paths).
|
|
41
42
|
*/
|
|
42
|
-
export
|
|
43
|
+
export { redactShellCommand } from './helpers';
|
|
43
44
|
/**
|
|
44
45
|
* Creates guardrails hooks for circuit breaker protection
|
|
45
46
|
* @param directory Working directory from plugin init context (required)
|
|
@@ -80,4 +81,3 @@ export declare function createGuardrailsHooks(directory: string, directoryOrConf
|
|
|
80
81
|
}>;
|
|
81
82
|
}) => Promise<void>;
|
|
82
83
|
};
|
|
83
|
-
export {};
|
|
@@ -12,6 +12,28 @@ export declare const DANGEROUS_COMMAND_PATTERNS: RegExp[];
|
|
|
12
12
|
export declare const SECURITY_DEGRADING_PATTERNS: RegExp[];
|
|
13
13
|
export declare const INVISIBLE_FORMAT_CHARS: RegExp;
|
|
14
14
|
export declare const INJECTION_PATTERNS: RegExp[];
|
|
15
|
+
/**
|
|
16
|
+
* Layer-2 content-safety scan for a single string value. Runs the same
|
|
17
|
+
* *blocking* pattern sets {@link validateLesson}'s Layer-2 block uses —
|
|
18
|
+
* dangerous-command errors, security-degrading instructions, and
|
|
19
|
+
* prompt-injection patterns — over an arbitrary short string (e.g. a
|
|
20
|
+
* directive-action field value such as `triggers` / `required_actions` /
|
|
21
|
+
* `forbidden_actions` / `verification_checks`).
|
|
22
|
+
*
|
|
23
|
+
* Returns a blocking reason string on the first match, or `null` when the value
|
|
24
|
+
* is content-safe. Mirrors validateLesson's normalization exactly: NFKC +
|
|
25
|
+
* invisible-format-char stripping + whitespace collapse + lowercase for the
|
|
26
|
+
* dangerous/security scans, and tests the RAW string for the injection patterns
|
|
27
|
+
* (normalization would strip the very control/invisible characters those
|
|
28
|
+
* patterns are meant to detect).
|
|
29
|
+
*
|
|
30
|
+
* The warning-severity dangerous-command patterns are intentionally NOT applied
|
|
31
|
+
* here: validateLesson treats them as non-blocking warnings (they match benign
|
|
32
|
+
* shell snippets like backticks and `$(...)` that legitimately appear in
|
|
33
|
+
* actionable directives), so promoting them to hard rejections on field values
|
|
34
|
+
* would create false positives without a corresponding safety gain.
|
|
35
|
+
*/
|
|
36
|
+
export declare function scanContentSafety(text: string): string | null;
|
|
15
37
|
/**
|
|
16
38
|
* Extract context words around each occurrence of a target word (single tokens within a window).
|
|
17
39
|
* Context window is 3 words before and after, excluding the target word itself.
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,11 @@
|
|
|
1
1
|
import type { Plugin } from '@opencode-ai/plugin';
|
|
2
|
+
/**
|
|
3
|
+
* FIFO-cap a session-keyed Map to at most `max` entries, evicting oldest first.
|
|
4
|
+
* Values tracked by these maps are plain data (timestamps/usage snapshots), never
|
|
5
|
+
* timer handles, so eviction requires no clearInterval/clearTimeout. Exported for
|
|
6
|
+
* unit testing of the cap invariant; used by the heartbeat throttle path below.
|
|
7
|
+
*/
|
|
8
|
+
export declare function capSessionMap<K, V>(map: Map<K, V>, max: number): void;
|
|
2
9
|
declare const _default: {
|
|
3
10
|
id: "opencode-swarm";
|
|
4
11
|
server: Plugin;
|