opencode-swarm 7.130.2 → 7.132.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/README.md +2 -2
- package/dist/cli/{config-doctor-489wej17.js → config-doctor-3rssa871.js} +2 -2
- package/dist/cli/{curation-policy-aaz0hap6.js → curation-policy-3914h3g9.js} +2 -2
- package/dist/cli/{curator-s2ynewsr.js → curator-1e77dq6x.js} +13 -13
- package/dist/cli/{curator-llm-factory-mxjcctn8.js → curator-llm-factory-41c17ybs.js} +13 -13
- package/dist/cli/{evidence-summary-service-hf7qq777.js → evidence-summary-service-jfagmvrh.js} +1 -1
- package/dist/cli/{guardrail-explain-s85kv81r.js → guardrail-explain-624brj1y.js} +14 -14
- package/dist/cli/{guardrail-log-2cejc33f.js → guardrail-log-vfka4tcn.js} +3 -3
- package/dist/cli/{hive-promoter-qdgxajht.js → hive-promoter-mw5prfy2.js} +13 -13
- package/dist/cli/{index-kzvwb2se.js → index-03zyn94g.js} +110 -85
- package/dist/cli/{index-xa29259t.js → index-2dtwjx39.js} +1 -1
- package/dist/cli/{index-5xxgeksy.js → index-5x3g1q91.js} +50 -2
- package/dist/cli/{index-zft4hp35.js → index-64z5dvam.js} +1 -1
- package/dist/cli/{index-ts9wh1ba.js → index-6mcx76j9.js} +60 -8
- package/dist/cli/{index-etdgtk3m.js → index-8w3sp149.js} +3502 -1947
- package/dist/cli/{index-6fqj8fcp.js → index-99tq1zd5.js} +2 -2
- package/dist/cli/{index-jvyn76xe.js → index-e630fw43.js} +3 -3
- package/dist/cli/{index-nr5pr54q.js → index-exs5bt14.js} +1 -1
- package/dist/cli/{index-hjar4crm.js → index-fegng5pv.js} +1 -1
- package/dist/cli/{index-jxha73tm.js → index-nsxchdx0.js} +1 -1
- package/dist/cli/{index-3rnkyb60.js → index-ppkp20fp.js} +5 -5
- package/dist/cli/{index-p6qgjkbt.js → index-q0ysv66x.js} +9 -1
- package/dist/cli/{index-jvwkxz8q.js → index-qg1cj1ev.js} +15 -15
- package/dist/cli/{index-s8h2cedv.js → index-sbq3gbjs.js} +1 -1
- package/dist/cli/{index-wy3q73j2.js → index-zah4qws8.js} +18 -14
- package/dist/cli/{index-agte9w1e.js → index-zrh07ykv.js} +2 -2
- package/dist/cli/index.js +13 -13
- package/dist/cli/{knowledge-escalator-1ypz0266.js → knowledge-escalator-5hv2dwhz.js} +3 -3
- package/dist/cli/{knowledge-events-yvcczmja.js → knowledge-events-434663dp.js} +1 -1
- package/dist/cli/{knowledge-store-h8bp9eje.js → knowledge-store-73ykq5j3.js} +3 -1
- package/dist/cli/{knowledge-validator-sz9v1fdq.js → knowledge-validator-tnadtt1h.js} +4 -4
- package/dist/cli/{scan-cursor-k9zyt374.js → scan-cursor-e33n9pej.js} +2 -2
- package/dist/cli/{schema-fkpn2r1s.js → schema-1kwmcayk.js} +5 -1
- package/dist/cli/{skill-generator-a6a9jxfd.js → skill-generator-k111qfdw.js} +5 -5
- package/dist/commands/consolidate.d.ts +14 -0
- package/dist/commands/curate.d.ts +2 -0
- package/dist/commands/promote.d.ts +25 -0
- package/dist/commands/registry.d.ts +2 -2
- package/dist/config/schema.d.ts +101 -0
- package/dist/consensus/contracts.d.ts +479 -0
- package/dist/consensus/corpus.d.ts +261 -0
- package/dist/consensus/miner.d.ts +200 -0
- package/dist/consensus/public-api.d.ts +42 -0
- package/dist/consensus/store.d.ts +119 -0
- package/dist/evidence/immutable-store.d.ts +86 -0
- package/dist/evidence/manager.d.ts +31 -1
- package/dist/hooks/actionability-predicate.d.ts +36 -0
- package/dist/hooks/curator.d.ts +3 -0
- package/dist/hooks/hive-policy.d.ts +11 -0
- package/dist/hooks/hive-promoter.d.ts +27 -1
- package/dist/hooks/knowledge-dedup-sweep.d.ts +145 -0
- package/dist/hooks/knowledge-injector.d.ts +4 -0
- package/dist/hooks/knowledge-store.d.ts +26 -0
- package/dist/hooks/knowledge-types.d.ts +6 -0
- package/dist/hooks/knowledge-validator.d.ts +10 -14
- package/dist/hooks/micro-reflector.d.ts +106 -2
- package/dist/hooks/realtime-learning-nudge.d.ts +19 -0
- package/dist/index.js +464 -456
- package/dist/knowledge/entry-merge.d.ts +112 -0
- package/dist/knowledge/family-migration.d.ts +6 -2
- package/dist/learning/admission.d.ts +154 -0
- package/dist/learning/candidate-queue.d.ts +178 -0
- package/dist/learning/fingerprint.d.ts +56 -0
- package/dist/learning/prm-pattern-support.d.ts +124 -0
- package/dist/learning/provenance.d.ts +86 -0
- package/dist/parallel/index.d.ts +0 -2
- package/dist/plan/parallel-verdict.d.ts +94 -0
- package/dist/prm/index.d.ts +46 -1
- package/dist/services/recommendation-ledger.d.ts +266 -0
- package/dist/services/skill-improver.d.ts +4 -0
- package/dist/services/status-service.d.ts +27 -0
- package/dist/services/trajectory-cluster.d.ts +65 -2
- package/dist/tools/consensus-mine.d.ts +172 -0
- package/dist/tools/index.d.ts +2 -0
- package/dist/tools/knowledge-add.d.ts +34 -0
- package/dist/tools/lean-turbo-run-phase.d.ts +7 -0
- package/dist/tools/manifest.d.ts +2 -0
- package/dist/tools/plan-conflict-check.d.ts +61 -0
- package/dist/tools/tool-metadata.d.ts +8 -0
- package/dist/turbo/lean/recovery.d.ts +90 -0
- package/dist/turbo/lean/runner.d.ts +16 -1
- package/dist/worktree/merge.d.ts +5 -0
- package/package.json +1 -1
- package/dist/parallel/dependency-graph.d.ts +0 -34
- package/dist/parallel/meta-indexer.d.ts +0 -32
|
@@ -12,14 +12,14 @@ import {
|
|
|
12
12
|
detectPosixWrites,
|
|
13
13
|
detectWindowsWrites,
|
|
14
14
|
resolveWriteTargets
|
|
15
|
-
} from "./index-
|
|
15
|
+
} from "./index-8w3sp149.js";
|
|
16
16
|
import {
|
|
17
17
|
checkFileAuthority,
|
|
18
18
|
classifyFile,
|
|
19
19
|
isInDeclaredScope,
|
|
20
20
|
redactPath,
|
|
21
21
|
redactShellCommand
|
|
22
|
-
} from "./index-
|
|
22
|
+
} from "./index-fegng5pv.js";
|
|
23
23
|
|
|
24
24
|
// src/services/guardrail-explain-service.ts
|
|
25
25
|
import path from "path";
|
|
@@ -2,18 +2,18 @@
|
|
|
2
2
|
import {
|
|
3
3
|
ALLOWED_SKILL_PATH_PREFIXES,
|
|
4
4
|
validateSkillPath
|
|
5
|
-
} from "./index-
|
|
5
|
+
} from "./index-zah4qws8.js";
|
|
6
6
|
import {
|
|
7
7
|
computeOutcomeSignal,
|
|
8
8
|
readKnowledge,
|
|
9
9
|
resolveHiveKnowledgePath,
|
|
10
10
|
resolveSwarmKnowledgePath,
|
|
11
11
|
transactKnowledge
|
|
12
|
-
} from "./index-
|
|
12
|
+
} from "./index-6mcx76j9.js";
|
|
13
13
|
import {
|
|
14
14
|
effectiveRetrievalOutcomes,
|
|
15
15
|
readKnowledgeCounterRollups
|
|
16
|
-
} from "./index-
|
|
16
|
+
} from "./index-nsxchdx0.js";
|
|
17
17
|
import {
|
|
18
18
|
init_knowledge_types,
|
|
19
19
|
isActiveStatus
|
|
@@ -608,7 +608,7 @@ async function applyKnowledgeVerdictFeedback(directory, options) {
|
|
|
608
608
|
deltas.push({ id, delta });
|
|
609
609
|
}
|
|
610
610
|
if (deltas.length > 0) {
|
|
611
|
-
const { bumpKnowledgeConfidenceBatch } = await import("./knowledge-store-
|
|
611
|
+
const { bumpKnowledgeConfidenceBatch } = await import("./knowledge-store-73ykq5j3.js");
|
|
612
612
|
await bumpKnowledgeConfidenceBatch(directory, deltas, options?.floorOptions);
|
|
613
613
|
}
|
|
614
614
|
return {
|
|
@@ -6,13 +6,13 @@ import {
|
|
|
6
6
|
resolveSwarmKnowledgePath,
|
|
7
7
|
transactKnowledge,
|
|
8
8
|
wordBigrams
|
|
9
|
-
} from "./index-
|
|
9
|
+
} from "./index-6mcx76j9.js";
|
|
10
10
|
import {
|
|
11
11
|
countEntryContradictionsInWindow,
|
|
12
12
|
countEntryViolationsInWindow,
|
|
13
13
|
readKnowledgeEvents,
|
|
14
14
|
recordKnowledgeEvent
|
|
15
|
-
} from "./index-
|
|
15
|
+
} from "./index-nsxchdx0.js";
|
|
16
16
|
import {
|
|
17
17
|
init_knowledge_types,
|
|
18
18
|
isActiveStatus
|
|
@@ -190,11 +190,11 @@ async function maybeQuarantineOnContradiction(directory, entryId, threshold, win
|
|
|
190
190
|
alreadyInactive: true
|
|
191
191
|
};
|
|
192
192
|
}
|
|
193
|
-
const { quarantineEntry } = await import("./knowledge-validator-
|
|
193
|
+
const { quarantineEntry } = await import("./knowledge-validator-tnadtt1h.js");
|
|
194
194
|
let policyConfig;
|
|
195
195
|
try {
|
|
196
|
-
const { KnowledgeConfigSchema } = await import("./schema-
|
|
197
|
-
const { loadPluginConfigWithMeta } = await import("./index-
|
|
196
|
+
const { KnowledgeConfigSchema } = await import("./schema-1kwmcayk.js");
|
|
197
|
+
const { loadPluginConfigWithMeta } = await import("./index-zrh07ykv.js");
|
|
198
198
|
const { config: loadedConfig } = loadPluginConfigWithMeta(directory);
|
|
199
199
|
policyConfig = KnowledgeConfigSchema.parse(loadedConfig.knowledge ?? {});
|
|
200
200
|
} catch {
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
init_constants,
|
|
9
9
|
init_schema,
|
|
10
10
|
stripKnownSwarmPrefix
|
|
11
|
-
} from "./index-
|
|
11
|
+
} from "./index-5x3g1q91.js";
|
|
12
12
|
import {
|
|
13
13
|
log
|
|
14
14
|
} from "./index-zgwm4ryv.js";
|
|
@@ -926,6 +926,14 @@ function validateConfigKey(path2, value) {
|
|
|
926
926
|
emitObjectTypeMismatch("memory", value, findings);
|
|
927
927
|
break;
|
|
928
928
|
}
|
|
929
|
+
case "learning": {
|
|
930
|
+
emitObjectTypeMismatch("learning", value, findings);
|
|
931
|
+
break;
|
|
932
|
+
}
|
|
933
|
+
case "consensus": {
|
|
934
|
+
emitObjectTypeMismatch("consensus", value, findings);
|
|
935
|
+
break;
|
|
936
|
+
}
|
|
929
937
|
case "curator": {
|
|
930
938
|
emitObjectTypeMismatch("curator", value, findings);
|
|
931
939
|
break;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
3
|
handleGuardrailExplain
|
|
4
|
-
} from "./index-
|
|
4
|
+
} from "./index-99tq1zd5.js";
|
|
5
5
|
import {
|
|
6
6
|
handleGuardrailLog
|
|
7
|
-
} from "./index-
|
|
7
|
+
} from "./index-64z5dvam.js";
|
|
8
8
|
import {
|
|
9
9
|
COMMAND_REGISTRY,
|
|
10
10
|
SWARM_COMMAND_TOOL_ALLOWLIST,
|
|
@@ -83,28 +83,28 @@ import {
|
|
|
83
83
|
handleWriteRetroCommand,
|
|
84
84
|
normalizeSwarmCommandInput,
|
|
85
85
|
resolveCommand
|
|
86
|
-
} from "./index-
|
|
87
|
-
import"./index-
|
|
88
|
-
import"./index-
|
|
89
|
-
import"./index-
|
|
86
|
+
} from "./index-8w3sp149.js";
|
|
87
|
+
import"./index-fegng5pv.js";
|
|
88
|
+
import"./index-q0ysv66x.js";
|
|
89
|
+
import"./index-03zyn94g.js";
|
|
90
90
|
import"./index-4905hd2m.js";
|
|
91
91
|
import"./index-134d35c1.js";
|
|
92
92
|
import"./index-9f71ye47.js";
|
|
93
|
-
import"./index-
|
|
94
|
-
import"./index-
|
|
95
|
-
import"./index-
|
|
93
|
+
import"./index-e630fw43.js";
|
|
94
|
+
import"./index-ppkp20fp.js";
|
|
95
|
+
import"./index-sbq3gbjs.js";
|
|
96
96
|
import"./index-vxv732ex.js";
|
|
97
97
|
import"./index-c8s9a3zh.js";
|
|
98
98
|
import"./index-9ss2m4rs.js";
|
|
99
99
|
import"./index-g4mnf3p5.js";
|
|
100
|
-
import"./index-
|
|
101
|
-
import"./index-
|
|
100
|
+
import"./index-zah4qws8.js";
|
|
101
|
+
import"./index-2dtwjx39.js";
|
|
102
102
|
import"./index-rtry5xyf.js";
|
|
103
|
-
import"./index-
|
|
104
|
-
import"./index-
|
|
103
|
+
import"./index-6mcx76j9.js";
|
|
104
|
+
import"./index-nsxchdx0.js";
|
|
105
105
|
import"./index-ae75rja9.js";
|
|
106
106
|
import"./index-q27bajqb.js";
|
|
107
|
-
import"./index-
|
|
107
|
+
import"./index-exs5bt14.js";
|
|
108
108
|
import"./index-k5jrywpr.js";
|
|
109
109
|
import"./index-n832052r.js";
|
|
110
110
|
import {
|
|
@@ -113,7 +113,7 @@ import {
|
|
|
113
113
|
init_constants,
|
|
114
114
|
init_schema,
|
|
115
115
|
stripKnownSwarmPrefix
|
|
116
|
-
} from "./index-
|
|
116
|
+
} from "./index-5x3g1q91.js";
|
|
117
117
|
import"./index-bk5tah7q.js";
|
|
118
118
|
import"./index-8fwhhayc.js";
|
|
119
119
|
import"./index-q1exe2b3.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
3
|
authorizeCuration
|
|
4
|
-
} from "./index-
|
|
4
|
+
} from "./index-2dtwjx39.js";
|
|
5
5
|
import {
|
|
6
6
|
findNearDuplicate,
|
|
7
7
|
inferTags,
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
resolveSwarmKnowledgePath,
|
|
10
10
|
resolveSwarmRejectedPath,
|
|
11
11
|
transactKnowledge
|
|
12
|
-
} from "./index-
|
|
12
|
+
} from "./index-6mcx76j9.js";
|
|
13
13
|
import {
|
|
14
14
|
resolveKnowledgeStoreDir
|
|
15
15
|
} from "./index-q27bajqb.js";
|
|
@@ -32,6 +32,21 @@ var import_proper_lockfile = __toESM(require_proper_lockfile(), 1);
|
|
|
32
32
|
import { appendFile, mkdir } from "fs/promises";
|
|
33
33
|
import * as path from "path";
|
|
34
34
|
init_logger();
|
|
35
|
+
|
|
36
|
+
// src/hooks/actionability-predicate.ts
|
|
37
|
+
function hasNonEmptyList(v) {
|
|
38
|
+
return Array.isArray(v) && v.length > 0;
|
|
39
|
+
}
|
|
40
|
+
function validateActionability(entry) {
|
|
41
|
+
const hasPredicate = hasNonEmptyList(entry.forbidden_actions) || hasNonEmptyList(entry.required_actions) || hasNonEmptyList(entry.verification_checks) || typeof entry.verification_predicate === "string" && entry.verification_predicate.trim().length > 0;
|
|
42
|
+
const hasScope = hasNonEmptyList(entry.applies_to_tools) || hasNonEmptyList(entry.applies_to_agents);
|
|
43
|
+
if (hasPredicate && hasScope)
|
|
44
|
+
return { actionable: true };
|
|
45
|
+
const reason = !hasPredicate && !hasScope ? "missing_predicate_and_scope" : !hasPredicate ? "missing_predicate" : "missing_scope";
|
|
46
|
+
return { actionable: false, reason };
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
// src/hooks/knowledge-validator.ts
|
|
35
50
|
var DANGEROUS_COMMAND_ERROR_PATTERNS = [
|
|
36
51
|
/\brm\s+-rf\b/,
|
|
37
52
|
/\bsudo\s+rm\b/,
|
|
@@ -522,17 +537,6 @@ function validateActionableFields(fields) {
|
|
|
522
537
|
}
|
|
523
538
|
return { valid: errors.length === 0, errors };
|
|
524
539
|
}
|
|
525
|
-
function hasNonEmptyList(v) {
|
|
526
|
-
return Array.isArray(v) && v.length > 0;
|
|
527
|
-
}
|
|
528
|
-
function validateActionability(entry) {
|
|
529
|
-
const hasPredicate = hasNonEmptyList(entry.forbidden_actions) || hasNonEmptyList(entry.required_actions) || hasNonEmptyList(entry.verification_checks) || typeof entry.verification_predicate === "string" && entry.verification_predicate.trim().length > 0;
|
|
530
|
-
const hasScope = hasNonEmptyList(entry.applies_to_tools) || hasNonEmptyList(entry.applies_to_agents);
|
|
531
|
-
if (hasPredicate && hasScope)
|
|
532
|
-
return { actionable: true };
|
|
533
|
-
const reason = !hasPredicate && !hasScope ? "missing_predicate_and_scope" : !hasPredicate ? "missing_predicate" : "missing_scope";
|
|
534
|
-
return { actionable: false, reason };
|
|
535
|
-
}
|
|
536
540
|
function resolveUnactionablePath(directory) {
|
|
537
541
|
return path.join(resolveKnowledgeStoreDir(directory), "knowledge-unactionable.jsonl");
|
|
538
542
|
}
|
|
@@ -818,4 +822,4 @@ var _internals = {
|
|
|
818
822
|
hasSignificantOverlap
|
|
819
823
|
};
|
|
820
824
|
|
|
821
|
-
export { DANGEROUS_COMMAND_ERROR_PATTERNS, DANGEROUS_COMMAND_WARNING_PATTERNS, DANGEROUS_COMMAND_PATTERNS, SECURITY_DEGRADING_PATTERNS, INVISIBLE_FORMAT_CHARS, INJECTION_PATTERNS, scanContentSafety, validateLesson, ACTIONABLE_STRING_MAX, ACTIONABLE_LIST_MAX, RETIRED_SKILL_HISTORY_MAX, ALLOWED_SKILL_PATH_PREFIXES, validateSkillPath, validateSkillCandidatePath, validateActionableFields,
|
|
825
|
+
export { validateActionability, DANGEROUS_COMMAND_ERROR_PATTERNS, DANGEROUS_COMMAND_WARNING_PATTERNS, DANGEROUS_COMMAND_PATTERNS, SECURITY_DEGRADING_PATTERNS, INVISIBLE_FORMAT_CHARS, INJECTION_PATTERNS, scanContentSafety, validateLesson, ACTIONABLE_STRING_MAX, ACTIONABLE_LIST_MAX, RETIRED_SKILL_HISTORY_MAX, ALLOWED_SKILL_PATH_PREFIXES, validateSkillPath, validateSkillCandidatePath, validateActionableFields, resolveUnactionablePath, appendUnactionable, auditEntryHealth, quarantineEntry, restoreEntry, unarchiveEntry, _internals };
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
loadPluginConfigWithMeta,
|
|
8
8
|
loadPluginConfigWithMetaAsync,
|
|
9
9
|
resolveWorktreeIsolationConfig
|
|
10
|
-
} from "./index-
|
|
10
|
+
} from "./index-exs5bt14.js";
|
|
11
11
|
import {
|
|
12
12
|
ApprovalEvidenceSchema,
|
|
13
13
|
BaseEvidenceSchema,
|
|
@@ -59,7 +59,7 @@ import {
|
|
|
59
59
|
WorktreeIsolationConfigSchema,
|
|
60
60
|
isQAAgent,
|
|
61
61
|
isSubagent
|
|
62
|
-
} from "./index-
|
|
62
|
+
} from "./index-5x3g1q91.js";
|
|
63
63
|
import"./index-bk5tah7q.js";
|
|
64
64
|
import {
|
|
65
65
|
MigrationStatusSchema,
|
package/dist/cli/index.js
CHANGED
|
@@ -7,34 +7,34 @@ import {
|
|
|
7
7
|
getPluginLockFilePaths,
|
|
8
8
|
package_default,
|
|
9
9
|
resolveCommand
|
|
10
|
-
} from "./index-
|
|
11
|
-
import"./index-
|
|
12
|
-
import"./index-
|
|
13
|
-
import"./index-
|
|
10
|
+
} from "./index-8w3sp149.js";
|
|
11
|
+
import"./index-fegng5pv.js";
|
|
12
|
+
import"./index-q0ysv66x.js";
|
|
13
|
+
import"./index-03zyn94g.js";
|
|
14
14
|
import"./index-4905hd2m.js";
|
|
15
15
|
import"./index-134d35c1.js";
|
|
16
16
|
import"./index-9f71ye47.js";
|
|
17
|
-
import"./index-
|
|
18
|
-
import"./index-
|
|
19
|
-
import"./index-
|
|
17
|
+
import"./index-e630fw43.js";
|
|
18
|
+
import"./index-ppkp20fp.js";
|
|
19
|
+
import"./index-sbq3gbjs.js";
|
|
20
20
|
import"./index-vxv732ex.js";
|
|
21
21
|
import"./index-c8s9a3zh.js";
|
|
22
22
|
import"./index-9ss2m4rs.js";
|
|
23
23
|
import"./index-g4mnf3p5.js";
|
|
24
|
-
import"./index-
|
|
25
|
-
import"./index-
|
|
24
|
+
import"./index-zah4qws8.js";
|
|
25
|
+
import"./index-2dtwjx39.js";
|
|
26
26
|
import"./index-rtry5xyf.js";
|
|
27
|
-
import"./index-
|
|
28
|
-
import"./index-
|
|
27
|
+
import"./index-6mcx76j9.js";
|
|
28
|
+
import"./index-nsxchdx0.js";
|
|
29
29
|
import"./index-ae75rja9.js";
|
|
30
30
|
import"./index-q27bajqb.js";
|
|
31
|
-
import"./index-
|
|
31
|
+
import"./index-exs5bt14.js";
|
|
32
32
|
import"./index-k5jrywpr.js";
|
|
33
33
|
import"./index-n832052r.js";
|
|
34
34
|
import {
|
|
35
35
|
DEFAULT_AGENT_CONFIGS,
|
|
36
36
|
init_constants
|
|
37
|
-
} from "./index-
|
|
37
|
+
} from "./index-5x3g1q91.js";
|
|
38
38
|
import"./index-bk5tah7q.js";
|
|
39
39
|
import"./index-8fwhhayc.js";
|
|
40
40
|
import"./index-q1exe2b3.js";
|
|
@@ -8,9 +8,9 @@ import {
|
|
|
8
8
|
maybeEscalateOnViolation,
|
|
9
9
|
maybeQuarantineOnContradiction,
|
|
10
10
|
readRecentEscalations
|
|
11
|
-
} from "./index-
|
|
12
|
-
import"./index-
|
|
13
|
-
import"./index-
|
|
11
|
+
} from "./index-ppkp20fp.js";
|
|
12
|
+
import"./index-6mcx76j9.js";
|
|
13
|
+
import"./index-nsxchdx0.js";
|
|
14
14
|
import"./index-ae75rja9.js";
|
|
15
15
|
import"./index-q27bajqb.js";
|
|
16
16
|
import"./index-bk5tah7q.js";
|
|
@@ -26,7 +26,7 @@ import {
|
|
|
26
26
|
resolveKnowledgeCounterBaselinePath,
|
|
27
27
|
resolveKnowledgeEventsPath,
|
|
28
28
|
resolveLegacyApplicationLogPath
|
|
29
|
-
} from "./index-
|
|
29
|
+
} from "./index-nsxchdx0.js";
|
|
30
30
|
import"./index-ae75rja9.js";
|
|
31
31
|
import"./index-q27bajqb.js";
|
|
32
32
|
import"./index-zgwm4ryv.js";
|
|
@@ -13,6 +13,7 @@ import {
|
|
|
13
13
|
computeContentHash,
|
|
14
14
|
computeOutcomeSignal,
|
|
15
15
|
confirmEntriesPhase,
|
|
16
|
+
dedupeCapped,
|
|
16
17
|
enforceKnowledgeCap,
|
|
17
18
|
findNearDuplicate,
|
|
18
19
|
getArchivedKnowledgeIds,
|
|
@@ -40,7 +41,7 @@ import {
|
|
|
40
41
|
transactKnowledge,
|
|
41
42
|
transactKnowledgeWithCas,
|
|
42
43
|
wordBigrams
|
|
43
|
-
} from "./index-
|
|
44
|
+
} from "./index-6mcx76j9.js";
|
|
44
45
|
import {
|
|
45
46
|
resolveHiveDataDir
|
|
46
47
|
} from "./index-ae75rja9.js";
|
|
@@ -83,6 +84,7 @@ export {
|
|
|
83
84
|
getArchivedKnowledgeIds,
|
|
84
85
|
findNearDuplicate,
|
|
85
86
|
enforceKnowledgeCap,
|
|
87
|
+
dedupeCapped,
|
|
86
88
|
confirmEntriesPhase,
|
|
87
89
|
computeOutcomeSignal,
|
|
88
90
|
computeContentHash,
|
|
@@ -23,11 +23,11 @@ import {
|
|
|
23
23
|
validateLesson,
|
|
24
24
|
validateSkillCandidatePath,
|
|
25
25
|
validateSkillPath
|
|
26
|
-
} from "./index-
|
|
27
|
-
import"./index-
|
|
26
|
+
} from "./index-zah4qws8.js";
|
|
27
|
+
import"./index-2dtwjx39.js";
|
|
28
28
|
import"./index-rtry5xyf.js";
|
|
29
|
-
import"./index-
|
|
30
|
-
import"./index-
|
|
29
|
+
import"./index-6mcx76j9.js";
|
|
30
|
+
import"./index-nsxchdx0.js";
|
|
31
31
|
import"./index-ae75rja9.js";
|
|
32
32
|
import"./index-q27bajqb.js";
|
|
33
33
|
import"./index-bk5tah7q.js";
|
|
@@ -4,8 +4,8 @@ import {
|
|
|
4
4
|
alreadyCuratedThisGeneration,
|
|
5
5
|
claimNextScanBatch,
|
|
6
6
|
getScanStatus
|
|
7
|
-
} from "./index-
|
|
8
|
-
import"./index-
|
|
7
|
+
} from "./index-sbq3gbjs.js";
|
|
8
|
+
import"./index-6mcx76j9.js";
|
|
9
9
|
import"./index-ae75rja9.js";
|
|
10
10
|
import"./index-q27bajqb.js";
|
|
11
11
|
import"./index-bk5tah7q.js";
|
|
@@ -16,6 +16,7 @@ import {
|
|
|
16
16
|
CheckpointConfigSchema,
|
|
17
17
|
CompactionAdvisoryConfigSchema,
|
|
18
18
|
CompactionConfigSchema,
|
|
19
|
+
ConsensusConfigSchema,
|
|
19
20
|
ContextBudgetConfigSchema,
|
|
20
21
|
ContextMapConfigSchema,
|
|
21
22
|
CouncilConfigSchema,
|
|
@@ -48,6 +49,7 @@ import {
|
|
|
48
49
|
KnowledgeConfigSchema,
|
|
49
50
|
LeanTurboConfigSchema,
|
|
50
51
|
LeanTurboStrategyConfigSchema,
|
|
52
|
+
LearningConfigSchema,
|
|
51
53
|
LintConfigSchema,
|
|
52
54
|
MemoryConfigSchema,
|
|
53
55
|
ModelPricingConfigSchema,
|
|
@@ -89,7 +91,7 @@ import {
|
|
|
89
91
|
resolveGeneratedAgentRole,
|
|
90
92
|
resolveGuardrailsConfig,
|
|
91
93
|
stripKnownSwarmPrefix
|
|
92
|
-
} from "./index-
|
|
94
|
+
} from "./index-5x3g1q91.js";
|
|
93
95
|
import"./index-bk5tah7q.js";
|
|
94
96
|
import"./index-zjygnfay.js";
|
|
95
97
|
import"./index-bpmtbmy9.js";
|
|
@@ -137,6 +139,7 @@ export {
|
|
|
137
139
|
ModelPricingConfigSchema,
|
|
138
140
|
MemoryConfigSchema,
|
|
139
141
|
LintConfigSchema,
|
|
142
|
+
LearningConfigSchema,
|
|
140
143
|
LeanTurboStrategyConfigSchema,
|
|
141
144
|
LeanTurboConfigSchema,
|
|
142
145
|
KnowledgeConfigSchema,
|
|
@@ -169,6 +172,7 @@ export {
|
|
|
169
172
|
CouncilConfigSchema,
|
|
170
173
|
ContextMapConfigSchema,
|
|
171
174
|
ContextBudgetConfigSchema,
|
|
175
|
+
ConsensusConfigSchema,
|
|
172
176
|
CompactionConfigSchema,
|
|
173
177
|
CompactionAdvisoryConfigSchema,
|
|
174
178
|
CheckpointConfigSchema,
|
|
@@ -33,12 +33,12 @@ import {
|
|
|
33
33
|
sanitizeSlug,
|
|
34
34
|
selectCandidateEntries,
|
|
35
35
|
writeEvalStub
|
|
36
|
-
} from "./index-
|
|
37
|
-
import"./index-
|
|
38
|
-
import"./index-
|
|
36
|
+
} from "./index-e630fw43.js";
|
|
37
|
+
import"./index-zah4qws8.js";
|
|
38
|
+
import"./index-2dtwjx39.js";
|
|
39
39
|
import"./index-rtry5xyf.js";
|
|
40
|
-
import"./index-
|
|
41
|
-
import"./index-
|
|
40
|
+
import"./index-6mcx76j9.js";
|
|
41
|
+
import"./index-nsxchdx0.js";
|
|
42
42
|
import"./index-ae75rja9.js";
|
|
43
43
|
import"./index-q27bajqb.js";
|
|
44
44
|
import"./index-bk5tah7q.js";
|
|
@@ -1,6 +1,20 @@
|
|
|
1
|
+
import type { SkillImproveResult } from '../services/skill-improver.js';
|
|
2
|
+
/**
|
|
3
|
+
* Render the success summary for a completed consolidation run.
|
|
4
|
+
*
|
|
5
|
+
* Extracted as a pure function so the reporting surface — in particular the
|
|
6
|
+
* #1821 AC21 duplicate-suppression line, whose only production consumer is this
|
|
7
|
+
* command — is testable without mocking `runSkillConsolidation`.
|
|
8
|
+
*/
|
|
9
|
+
declare function buildConsolidateSummary(improver: SkillImproveResult | undefined, statePath: string, fallbackMaxCalls: number): string;
|
|
1
10
|
export declare function handleConsolidateCommand(directory: string, args: string[], options?: {
|
|
2
11
|
sessionID?: string;
|
|
3
12
|
}): Promise<string>;
|
|
4
13
|
export declare const _internals: {
|
|
5
14
|
handleConsolidateCommand: typeof handleConsolidateCommand;
|
|
6
15
|
};
|
|
16
|
+
/** Pure-function seam for tests (writing-tests SKILL.md, Tier 0). */
|
|
17
|
+
export declare const _test_exports: {
|
|
18
|
+
buildConsolidateSummary: typeof buildConsolidateSummary;
|
|
19
|
+
};
|
|
20
|
+
export {};
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
*
|
|
8
8
|
* Returns a summary with counts, or zero counts for empty-state.
|
|
9
9
|
*/
|
|
10
|
+
import { loadPluginConfigWithMeta } from '../config/index.js';
|
|
10
11
|
import { checkHivePromotions } from '../hooks/hive-promoter.js';
|
|
11
12
|
import { readKnowledge, resolveSwarmKnowledgePath } from '../hooks/knowledge-store.js';
|
|
12
13
|
import { readSwarmFileAsync } from '../hooks/utils.js';
|
|
@@ -15,6 +16,7 @@ export declare const _internals: {
|
|
|
15
16
|
readKnowledge: typeof readKnowledge;
|
|
16
17
|
resolveSwarmKnowledgePath: typeof resolveSwarmKnowledgePath;
|
|
17
18
|
readSwarmFileAsync: typeof readSwarmFileAsync;
|
|
19
|
+
loadPluginConfigWithMeta: typeof loadPluginConfigWithMeta;
|
|
18
20
|
loadCuratorDeps: () => Promise<{
|
|
19
21
|
CuratorConfigSchema: import("zod").ZodObject<{
|
|
20
22
|
enabled: import("zod").ZodDefault<import("zod").ZodBoolean>;
|
|
@@ -9,5 +9,30 @@
|
|
|
9
9
|
* - /swarm promote --force --reason "<why>" ... — Override failed policy gates
|
|
10
10
|
* with a durable, audited override record (issue #1847 §4). An exact entry id
|
|
11
11
|
* alone is NEVER authorization to bypass policy; an explicit override is.
|
|
12
|
+
* - /swarm promote --applies-to-tools <a,b> --required-actions <a,b> "<text>"
|
|
13
|
+
* — Supply the actionability fields the default-on `actionability_floor`
|
|
14
|
+
* policy gate requires (issue #1821 A3). Without these the direct-text path
|
|
15
|
+
* has no swarm entry to inherit a predicate/scope from and every promotion
|
|
16
|
+
* would be blocked, forcing operators into `--force` and poisoning the
|
|
17
|
+
* override-audit signal. Ignored on `--from-swarm`, which inherits the source
|
|
18
|
+
* entry's own actionable-directive fields.
|
|
12
19
|
*/
|
|
20
|
+
import { type ManualActionabilityFields } from '../hooks/hive-promoter';
|
|
21
|
+
/** Everything `/swarm promote`'s argument vector can express. */
|
|
22
|
+
export interface ParsedPromoteArgs {
|
|
23
|
+
category?: string;
|
|
24
|
+
lessonId?: string;
|
|
25
|
+
lessonText?: string;
|
|
26
|
+
force: boolean;
|
|
27
|
+
reason?: string;
|
|
28
|
+
actionable: ManualActionabilityFields;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Pure argument parser for `/swarm promote`.
|
|
32
|
+
*
|
|
33
|
+
* Exported so the token-classification rules can be tested directly — the
|
|
34
|
+
* command handler itself performs real knowledge-store I/O, which would force a
|
|
35
|
+
* mock around the one thing worth asserting here.
|
|
36
|
+
*/
|
|
37
|
+
export declare function parsePromoteArgs(args: string[]): ParsedPromoteArgs;
|
|
13
38
|
export declare function handlePromoteCommand(directory: string, args: string[]): Promise<string>;
|
|
@@ -698,8 +698,8 @@ export declare const COMMAND_REGISTRY: {
|
|
|
698
698
|
readonly promote: {
|
|
699
699
|
readonly handler: (ctx: CommandContext) => Promise<string>;
|
|
700
700
|
readonly description: "Manually promote lesson to hive knowledge (policy-gated; --force --reason overrides with audit)";
|
|
701
|
-
readonly details: "Promotes a lesson
|
|
702
|
-
readonly args: "--category <category>, --from-swarm <lesson-id>, <lesson-text>";
|
|
701
|
+
readonly details: "Promotes a lesson to hive knowledge directly (--category) or via an existing swarm lesson (--from-swarm), in one cross-process policy transaction (#1847). A policy failure blocks promotion unless --force --reason \"<why>\" is given (audited); an entry id alone is not authorization. Requires direct text or --from-swarm. An actionability floor (#1821) needs at least one predicate flag and one scope flag (see args), unless knowledge.promotion_require_actionable=false.";
|
|
702
|
+
readonly args: "--category <category>, --from-swarm <lesson-id>, --applies-to-tools <a,b>, --applies-to-agents <a,b>, --required-actions <a,b>, --forbidden-actions <a,b>, --verification-checks <a,b>, --force --reason <why>, <lesson-text>";
|
|
703
703
|
readonly category: "utility";
|
|
704
704
|
readonly toolPolicy: "none";
|
|
705
705
|
};
|