opencode-swarm 7.107.0 → 7.107.1
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/dist/agents/explorer.d.ts +2 -2
- package/dist/cli/curator-drift-6ad8mxxb.js +211 -0
- package/dist/cli/curator-llm-factory-gdhtm1hh.js +31 -0
- package/dist/cli/curator-np2ky29t.js +51 -0
- package/dist/cli/{evidence-summary-service-zhw4rkjb.js → evidence-summary-service-dh44gevz.js} +4 -3
- package/dist/cli/{explorer-rwfvbbx5.js → explorer-ksr3xq7n.js} +1 -1
- package/dist/cli/{guardrail-explain-6xt0pb56.js → guardrail-explain-414smfg4.js} +13 -11
- package/dist/cli/hive-promoter-y9r8d315.js +39 -0
- package/dist/cli/{index-ydgy7vg5.js → index-09xpycan.js} +31 -5
- package/dist/cli/index-357p0baj.js +719 -0
- package/dist/cli/{index-wa6at603.js → index-7v734syt.js} +1 -1
- package/dist/cli/{index-v90bnn0f.js → index-87d4wsv9.js} +14 -12
- package/dist/cli/{index-vwyjkzgs.js → index-9wstcavp.js} +1 -1
- package/dist/cli/index-c8s9a3zh.js +73 -0
- package/dist/cli/{index-fhw0jm5c.js → index-gt514nt1.js} +23018 -21209
- package/dist/cli/{index-25pev4e7.js → index-jjp5qrjv.js} +122 -834
- package/dist/cli/{index-e9n3xsk0.js → index-t4hbye3v.js} +1 -1
- package/dist/cli/index.js +12 -10
- package/dist/cli/{pending-delegations-dvprsdfy.js → pending-delegations-46xf2n2e.js} +2 -2
- package/dist/cli/{pr-subscriptions-zfxjtyzw.js → pr-subscriptions-3c34rnm1.js} +3 -3
- package/dist/cli/{skill-generator-99rrfwae.js → skill-generator-y6mmq8n5.js} +1 -1
- package/dist/commands/curate.d.ts +38 -1
- package/dist/commands/registry.d.ts +2 -2
- package/dist/hooks/curator-postmortem.d.ts +52 -3
- package/dist/hooks/curator.d.ts +2 -1
- package/dist/index.js +349 -313
- package/package.json +1 -1
- package/dist/cli/{index-7ztmmqpt.js → index-mpe0yk9s.js} +3 -3
package/dist/cli/index.js
CHANGED
|
@@ -7,25 +7,27 @@ import {
|
|
|
7
7
|
getPluginLockFilePaths,
|
|
8
8
|
package_default,
|
|
9
9
|
resolveCommand
|
|
10
|
-
} from "./index-
|
|
11
|
-
import"./index-fxtrk7y8.js";
|
|
12
|
-
import"./index-ydgy7vg5.js";
|
|
13
|
-
import"./index-vwyjkzgs.js";
|
|
14
|
-
import"./index-f7nma02k.js";
|
|
10
|
+
} from "./index-gt514nt1.js";
|
|
15
11
|
import"./index-esg1554h.js";
|
|
12
|
+
import"./index-jjp5qrjv.js";
|
|
13
|
+
import"./index-8w4d325g.js";
|
|
14
|
+
import"./index-fxtrk7y8.js";
|
|
15
|
+
import"./index-09xpycan.js";
|
|
16
16
|
import {
|
|
17
17
|
DEFAULT_AGENT_CONFIGS
|
|
18
18
|
} from "./index-2560cctg.js";
|
|
19
|
-
import"./index-
|
|
20
|
-
import"./index-
|
|
19
|
+
import"./index-9wstcavp.js";
|
|
20
|
+
import"./index-f7nma02k.js";
|
|
21
|
+
import"./index-c8s9a3zh.js";
|
|
22
|
+
import"./index-357p0baj.js";
|
|
21
23
|
import"./index-v4fcn4tr.js";
|
|
22
24
|
import"./index-r8f89sm9.js";
|
|
23
25
|
import"./index-9b7qp18e.js";
|
|
24
|
-
import"./index-
|
|
25
|
-
import"./index-
|
|
26
|
-
import"./index-jtqkh8jf.js";
|
|
26
|
+
import"./index-t4hbye3v.js";
|
|
27
|
+
import"./index-mpe0yk9s.js";
|
|
27
28
|
import"./index-5e4e2hvv.js";
|
|
28
29
|
import"./index-p0arc26j.js";
|
|
30
|
+
import"./index-jtqkh8jf.js";
|
|
29
31
|
import"./index-zgwm4ryv.js";
|
|
30
32
|
import"./index-3naa2ajc.js";
|
|
31
33
|
import"./index-293f68mj.js";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
3
|
validateSwarmPath
|
|
4
|
-
} from "./index-
|
|
5
|
-
import"./index-jtqkh8jf.js";
|
|
4
|
+
} from "./index-mpe0yk9s.js";
|
|
6
5
|
import"./index-5e4e2hvv.js";
|
|
7
6
|
import"./index-p0arc26j.js";
|
|
7
|
+
import"./index-jtqkh8jf.js";
|
|
8
8
|
import {
|
|
9
9
|
init_logger,
|
|
10
10
|
warn
|
|
@@ -9,11 +9,11 @@ import {
|
|
|
9
9
|
sweepStale,
|
|
10
10
|
unsubscribe,
|
|
11
11
|
updateSnapshot
|
|
12
|
-
} from "./index-
|
|
13
|
-
import"./index-
|
|
14
|
-
import"./index-jtqkh8jf.js";
|
|
12
|
+
} from "./index-t4hbye3v.js";
|
|
13
|
+
import"./index-mpe0yk9s.js";
|
|
15
14
|
import"./index-5e4e2hvv.js";
|
|
16
15
|
import"./index-p0arc26j.js";
|
|
16
|
+
import"./index-jtqkh8jf.js";
|
|
17
17
|
import"./index-zgwm4ryv.js";
|
|
18
18
|
import"./index-3naa2ajc.js";
|
|
19
19
|
import"./index-293f68mj.js";
|
|
@@ -7,15 +7,52 @@
|
|
|
7
7
|
*
|
|
8
8
|
* Returns a summary with counts, or zero counts for empty-state.
|
|
9
9
|
*/
|
|
10
|
+
import { checkHivePromotions } from '../hooks/hive-promoter.js';
|
|
11
|
+
import { readKnowledge, resolveSwarmKnowledgePath } from '../hooks/knowledge-store.js';
|
|
12
|
+
import { readSwarmFileAsync } from '../hooks/utils.js';
|
|
13
|
+
export declare const _internals: {
|
|
14
|
+
checkHivePromotions: typeof checkHivePromotions;
|
|
15
|
+
readKnowledge: typeof readKnowledge;
|
|
16
|
+
resolveSwarmKnowledgePath: typeof resolveSwarmKnowledgePath;
|
|
17
|
+
readSwarmFileAsync: typeof readSwarmFileAsync;
|
|
18
|
+
loadCuratorDeps: () => Promise<{
|
|
19
|
+
CuratorConfigSchema: import("zod").ZodObject<{
|
|
20
|
+
enabled: import("zod").ZodDefault<import("zod").ZodBoolean>;
|
|
21
|
+
init_enabled: import("zod").ZodDefault<import("zod").ZodBoolean>;
|
|
22
|
+
phase_enabled: import("zod").ZodDefault<import("zod").ZodBoolean>;
|
|
23
|
+
postmortem_enabled: import("zod").ZodDefault<import("zod").ZodBoolean>;
|
|
24
|
+
max_summary_tokens: import("zod").ZodDefault<import("zod").ZodNumber>;
|
|
25
|
+
min_knowledge_confidence: import("zod").ZodDefault<import("zod").ZodNumber>;
|
|
26
|
+
compliance_report: import("zod").ZodDefault<import("zod").ZodBoolean>;
|
|
27
|
+
suppress_warnings: import("zod").ZodDefault<import("zod").ZodBoolean>;
|
|
28
|
+
drift_inject_max_chars: import("zod").ZodDefault<import("zod").ZodNumber>;
|
|
29
|
+
llm_timeout_ms: import("zod").ZodDefault<import("zod").ZodNumber>;
|
|
30
|
+
skill_generation_enabled: import("zod").ZodDefault<import("zod").ZodBoolean>;
|
|
31
|
+
skill_generation_mode: import("zod").ZodDefault<import("zod").ZodEnum<{
|
|
32
|
+
draft: "draft";
|
|
33
|
+
active: "active";
|
|
34
|
+
}>>;
|
|
35
|
+
min_skill_confidence: import("zod").ZodDefault<import("zod").ZodNumber>;
|
|
36
|
+
min_skill_confirmations: import("zod").ZodDefault<import("zod").ZodNumber>;
|
|
37
|
+
}, import("zod/v4/core").$strip>;
|
|
38
|
+
curator: typeof import("../hooks/curator.js");
|
|
39
|
+
createCuratorLLMDelegate: typeof import("../hooks/curator-llm-factory.js").createCuratorLLMDelegate;
|
|
40
|
+
}>;
|
|
41
|
+
};
|
|
10
42
|
export interface CurationSummary {
|
|
11
43
|
timestamp: string;
|
|
12
44
|
new_promotions: number;
|
|
13
45
|
encounters_incremented: number;
|
|
14
46
|
advancements: number;
|
|
15
47
|
total_hive_entries: number;
|
|
48
|
+
knowledge_applied?: number;
|
|
49
|
+
knowledge_skipped?: number;
|
|
50
|
+
curator_phase?: number;
|
|
16
51
|
}
|
|
17
52
|
/**
|
|
18
53
|
* Handles the /swarm curate command.
|
|
19
54
|
* Runs hive promotion review on existing swarm entries.
|
|
20
55
|
*/
|
|
21
|
-
export declare function handleCurateCommand(directory: string, _args: string[]
|
|
56
|
+
export declare function handleCurateCommand(directory: string, _args: string[], options?: {
|
|
57
|
+
sessionID?: string;
|
|
58
|
+
}): Promise<string>;
|
|
@@ -367,8 +367,8 @@ export declare const COMMAND_REGISTRY: {
|
|
|
367
367
|
readonly 'post-mortem': {
|
|
368
368
|
readonly handler: (ctx: CommandContext) => Promise<string>;
|
|
369
369
|
readonly description: "Run the post-mortem agent: project-end synthesis, queue triage, and final curation pass";
|
|
370
|
-
readonly details: "Reads .swarm/ evidence (knowledge entries, events, curator digests, proposals, retrospectives, drift reports) and produces a post-mortem report at .swarm/post-mortem-{planId}.md. Idempotent: re-runs skip if report exists unless --force is passed.";
|
|
371
|
-
readonly args: "--force";
|
|
370
|
+
readonly details: "Reads .swarm/ evidence (knowledge entries, events, curator digests, proposals, retrospectives, drift reports) and produces a post-mortem report at .swarm/post-mortem-{planId}.md. Idempotent: re-runs skip if report exists unless --force is passed. Use --scope session to limit knowledge event aggregation to the current session; project scope is the default.";
|
|
371
|
+
readonly args: "--force, --scope session|project";
|
|
372
372
|
readonly category: "core";
|
|
373
373
|
readonly toolPolicy: "agent";
|
|
374
374
|
};
|
|
@@ -12,16 +12,23 @@
|
|
|
12
12
|
* hive promotion) — no new ungated injection source.
|
|
13
13
|
*/
|
|
14
14
|
import type { CuratorLLMDelegate } from './curator.js';
|
|
15
|
+
import type { KnowledgeRecommendation } from './curator-types.js';
|
|
16
|
+
import type { KnowledgeConfig, SwarmKnowledgeEntry } from './knowledge-types.js';
|
|
15
17
|
export interface PostMortemResult {
|
|
16
18
|
success: boolean;
|
|
17
19
|
planId: string | null;
|
|
18
20
|
reportPath: string | null;
|
|
19
21
|
summary: string | null;
|
|
20
22
|
warnings: string[];
|
|
23
|
+
actions?: PostMortemActionResult;
|
|
21
24
|
}
|
|
22
25
|
export interface PostMortemOptions {
|
|
23
26
|
llmDelegate?: CuratorLLMDelegate;
|
|
24
27
|
force?: boolean;
|
|
28
|
+
scope?: 'session' | 'project';
|
|
29
|
+
sessionID?: string;
|
|
30
|
+
knowledgeConfig?: KnowledgeConfig;
|
|
31
|
+
llmTimeoutMs?: number;
|
|
25
32
|
}
|
|
26
33
|
interface KnowledgeEventSummary {
|
|
27
34
|
id: string;
|
|
@@ -32,10 +39,36 @@ interface KnowledgeEventSummary {
|
|
|
32
39
|
confidence: number;
|
|
33
40
|
status: string;
|
|
34
41
|
}
|
|
35
|
-
|
|
42
|
+
interface ParsedPostMortemActions {
|
|
43
|
+
summary: string | null;
|
|
44
|
+
recommendations: KnowledgeRecommendation[];
|
|
45
|
+
queueTriage: Array<{
|
|
46
|
+
proposal_id: string;
|
|
47
|
+
action: 'apply' | 'reject';
|
|
48
|
+
reason: string;
|
|
49
|
+
}>;
|
|
50
|
+
diagnostics: string[];
|
|
51
|
+
}
|
|
52
|
+
export interface PostMortemActionResult {
|
|
53
|
+
knowledge_applied: number;
|
|
54
|
+
knowledge_skipped: number;
|
|
55
|
+
hive_promotions: number;
|
|
56
|
+
hive_encounters_incremented: number;
|
|
57
|
+
hive_advancements: number;
|
|
58
|
+
proposals_approved: number;
|
|
59
|
+
proposals_rejected: number;
|
|
60
|
+
proposals_skipped: number;
|
|
61
|
+
}
|
|
62
|
+
declare function collectKnowledgeSummary(directory: string, scope?: 'session' | 'project', sessionID?: string): Promise<KnowledgeEventSummary[]>;
|
|
63
|
+
declare function parsePostMortemActions(llmOutput: string): ParsedPostMortemActions;
|
|
64
|
+
declare function executePostMortemActions(directory: string, parsed: ParsedPostMortemActions, options: PostMortemOptions): Promise<{
|
|
65
|
+
result: PostMortemActionResult;
|
|
66
|
+
warnings: string[];
|
|
67
|
+
}>;
|
|
68
|
+
declare function repairPostMortemActions(llmOutput: string, diagnostics: string[], options: PostMortemOptions): Promise<ParsedPostMortemActions | null>;
|
|
36
69
|
declare function readJsonlFile(filePath: string, maxLines?: number): unknown[];
|
|
37
70
|
declare function collectRetrospectives(directory: string): string[];
|
|
38
|
-
declare function collectDriftReports(directory: string): string[]
|
|
71
|
+
declare function collectDriftReports(directory: string): Promise<string[]>;
|
|
39
72
|
declare function collectPendingProposals(directory: string): Array<{
|
|
40
73
|
source: string;
|
|
41
74
|
content: string;
|
|
@@ -49,7 +82,7 @@ declare function buildDataOnlyReport(planId: string, planSummary: string, knowle
|
|
|
49
82
|
source: string;
|
|
50
83
|
content: string;
|
|
51
84
|
}>, unactionable: unknown[], retrospectives: string[], driftReports: string[]): string;
|
|
52
|
-
declare function assembleLLMInput(planId: string, planSummary: string, knowledgeSummary: KnowledgeEventSummary[], curatorDigest: string | null, proposals: Array<{
|
|
85
|
+
declare function assembleLLMInput(planId: string, scope: 'session' | 'project', sessionID: string | undefined, planSummary: string, knowledgeSummary: KnowledgeEventSummary[], curatorDigest: string | null, proposals: Array<{
|
|
53
86
|
source: string;
|
|
54
87
|
content: string;
|
|
55
88
|
}>, unactionable: unknown[], retrospectives: string[], driftReports: string[]): string;
|
|
@@ -64,5 +97,21 @@ export declare const _internals: {
|
|
|
64
97
|
buildDataOnlyReport: typeof buildDataOnlyReport;
|
|
65
98
|
assembleLLMInput: typeof assembleLLMInput;
|
|
66
99
|
isReportValid: typeof isReportValid;
|
|
100
|
+
parsePostMortemActions: typeof parsePostMortemActions;
|
|
101
|
+
executePostMortemActions: typeof executePostMortemActions;
|
|
102
|
+
repairPostMortemActions: typeof repairPostMortemActions;
|
|
103
|
+
loadDefaultKnowledgeConfig: () => Promise<KnowledgeConfig>;
|
|
104
|
+
applyCuratorKnowledgeUpdates: (directory: string, recommendations: KnowledgeRecommendation[], knowledgeConfig: KnowledgeConfig) => Promise<{
|
|
105
|
+
applied: number;
|
|
106
|
+
skipped: number;
|
|
107
|
+
}>;
|
|
108
|
+
checkHivePromotions: (entries: SwarmKnowledgeEntry[], knowledgeConfig: KnowledgeConfig) => Promise<import("./hive-promoter.js").HivePromotionSummary>;
|
|
109
|
+
applyProposalTriage: (directory: string, triage: ParsedPostMortemActions["queueTriage"]) => Promise<{
|
|
110
|
+
approved: string[];
|
|
111
|
+
rejected: string[];
|
|
112
|
+
skipped: string[];
|
|
113
|
+
}>;
|
|
114
|
+
readPriorDriftReports: (directory: string) => Promise<import("./curator-types.js").DriftReport[]>;
|
|
115
|
+
readSwarmKnowledge: (directory: string) => Promise<SwarmKnowledgeEntry[]>;
|
|
67
116
|
};
|
|
68
117
|
export {};
|
package/dist/hooks/curator.d.ts
CHANGED
|
@@ -55,9 +55,10 @@ export declare const _internals: {
|
|
|
55
55
|
readKnowledge: typeof readKnowledge;
|
|
56
56
|
reviseSkill: typeof reviseSkill;
|
|
57
57
|
getSkillVersion: typeof getSkillVersion;
|
|
58
|
+
readLatestPostMortemDigest: (directory: string) => string | null;
|
|
58
59
|
};
|
|
59
60
|
export interface RecommendationParseDiagnostic {
|
|
60
|
-
section: 'OBSERVATIONS'
|
|
61
|
+
section: 'OBSERVATIONS';
|
|
61
62
|
line: string;
|
|
62
63
|
reason: string;
|
|
63
64
|
}
|