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.
Files changed (85) hide show
  1. package/README.md +2 -2
  2. package/dist/cli/{config-doctor-489wej17.js → config-doctor-3rssa871.js} +2 -2
  3. package/dist/cli/{curation-policy-aaz0hap6.js → curation-policy-3914h3g9.js} +2 -2
  4. package/dist/cli/{curator-s2ynewsr.js → curator-1e77dq6x.js} +13 -13
  5. package/dist/cli/{curator-llm-factory-mxjcctn8.js → curator-llm-factory-41c17ybs.js} +13 -13
  6. package/dist/cli/{evidence-summary-service-hf7qq777.js → evidence-summary-service-jfagmvrh.js} +1 -1
  7. package/dist/cli/{guardrail-explain-s85kv81r.js → guardrail-explain-624brj1y.js} +14 -14
  8. package/dist/cli/{guardrail-log-2cejc33f.js → guardrail-log-vfka4tcn.js} +3 -3
  9. package/dist/cli/{hive-promoter-qdgxajht.js → hive-promoter-mw5prfy2.js} +13 -13
  10. package/dist/cli/{index-kzvwb2se.js → index-03zyn94g.js} +110 -85
  11. package/dist/cli/{index-xa29259t.js → index-2dtwjx39.js} +1 -1
  12. package/dist/cli/{index-5xxgeksy.js → index-5x3g1q91.js} +50 -2
  13. package/dist/cli/{index-zft4hp35.js → index-64z5dvam.js} +1 -1
  14. package/dist/cli/{index-ts9wh1ba.js → index-6mcx76j9.js} +60 -8
  15. package/dist/cli/{index-etdgtk3m.js → index-8w3sp149.js} +3502 -1947
  16. package/dist/cli/{index-6fqj8fcp.js → index-99tq1zd5.js} +2 -2
  17. package/dist/cli/{index-jvyn76xe.js → index-e630fw43.js} +3 -3
  18. package/dist/cli/{index-nr5pr54q.js → index-exs5bt14.js} +1 -1
  19. package/dist/cli/{index-hjar4crm.js → index-fegng5pv.js} +1 -1
  20. package/dist/cli/{index-jxha73tm.js → index-nsxchdx0.js} +1 -1
  21. package/dist/cli/{index-3rnkyb60.js → index-ppkp20fp.js} +5 -5
  22. package/dist/cli/{index-p6qgjkbt.js → index-q0ysv66x.js} +9 -1
  23. package/dist/cli/{index-jvwkxz8q.js → index-qg1cj1ev.js} +15 -15
  24. package/dist/cli/{index-s8h2cedv.js → index-sbq3gbjs.js} +1 -1
  25. package/dist/cli/{index-wy3q73j2.js → index-zah4qws8.js} +18 -14
  26. package/dist/cli/{index-agte9w1e.js → index-zrh07ykv.js} +2 -2
  27. package/dist/cli/index.js +13 -13
  28. package/dist/cli/{knowledge-escalator-1ypz0266.js → knowledge-escalator-5hv2dwhz.js} +3 -3
  29. package/dist/cli/{knowledge-events-yvcczmja.js → knowledge-events-434663dp.js} +1 -1
  30. package/dist/cli/{knowledge-store-h8bp9eje.js → knowledge-store-73ykq5j3.js} +3 -1
  31. package/dist/cli/{knowledge-validator-sz9v1fdq.js → knowledge-validator-tnadtt1h.js} +4 -4
  32. package/dist/cli/{scan-cursor-k9zyt374.js → scan-cursor-e33n9pej.js} +2 -2
  33. package/dist/cli/{schema-fkpn2r1s.js → schema-1kwmcayk.js} +5 -1
  34. package/dist/cli/{skill-generator-a6a9jxfd.js → skill-generator-k111qfdw.js} +5 -5
  35. package/dist/commands/consolidate.d.ts +14 -0
  36. package/dist/commands/curate.d.ts +2 -0
  37. package/dist/commands/promote.d.ts +25 -0
  38. package/dist/commands/registry.d.ts +2 -2
  39. package/dist/config/schema.d.ts +101 -0
  40. package/dist/consensus/contracts.d.ts +479 -0
  41. package/dist/consensus/corpus.d.ts +261 -0
  42. package/dist/consensus/miner.d.ts +200 -0
  43. package/dist/consensus/public-api.d.ts +42 -0
  44. package/dist/consensus/store.d.ts +119 -0
  45. package/dist/evidence/immutable-store.d.ts +86 -0
  46. package/dist/evidence/manager.d.ts +31 -1
  47. package/dist/hooks/actionability-predicate.d.ts +36 -0
  48. package/dist/hooks/curator.d.ts +3 -0
  49. package/dist/hooks/hive-policy.d.ts +11 -0
  50. package/dist/hooks/hive-promoter.d.ts +27 -1
  51. package/dist/hooks/knowledge-dedup-sweep.d.ts +145 -0
  52. package/dist/hooks/knowledge-injector.d.ts +4 -0
  53. package/dist/hooks/knowledge-store.d.ts +26 -0
  54. package/dist/hooks/knowledge-types.d.ts +6 -0
  55. package/dist/hooks/knowledge-validator.d.ts +10 -14
  56. package/dist/hooks/micro-reflector.d.ts +106 -2
  57. package/dist/hooks/realtime-learning-nudge.d.ts +19 -0
  58. package/dist/index.js +464 -456
  59. package/dist/knowledge/entry-merge.d.ts +112 -0
  60. package/dist/knowledge/family-migration.d.ts +6 -2
  61. package/dist/learning/admission.d.ts +154 -0
  62. package/dist/learning/candidate-queue.d.ts +178 -0
  63. package/dist/learning/fingerprint.d.ts +56 -0
  64. package/dist/learning/prm-pattern-support.d.ts +124 -0
  65. package/dist/learning/provenance.d.ts +86 -0
  66. package/dist/parallel/index.d.ts +0 -2
  67. package/dist/plan/parallel-verdict.d.ts +94 -0
  68. package/dist/prm/index.d.ts +46 -1
  69. package/dist/services/recommendation-ledger.d.ts +266 -0
  70. package/dist/services/skill-improver.d.ts +4 -0
  71. package/dist/services/status-service.d.ts +27 -0
  72. package/dist/services/trajectory-cluster.d.ts +65 -2
  73. package/dist/tools/consensus-mine.d.ts +172 -0
  74. package/dist/tools/index.d.ts +2 -0
  75. package/dist/tools/knowledge-add.d.ts +34 -0
  76. package/dist/tools/lean-turbo-run-phase.d.ts +7 -0
  77. package/dist/tools/manifest.d.ts +2 -0
  78. package/dist/tools/plan-conflict-check.d.ts +61 -0
  79. package/dist/tools/tool-metadata.d.ts +8 -0
  80. package/dist/turbo/lean/recovery.d.ts +90 -0
  81. package/dist/turbo/lean/runner.d.ts +16 -1
  82. package/dist/worktree/merge.d.ts +5 -0
  83. package/package.json +1 -1
  84. package/dist/parallel/dependency-graph.d.ts +0 -34
  85. 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-etdgtk3m.js";
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-hjar4crm.js";
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-wy3q73j2.js";
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-ts9wh1ba.js";
12
+ } from "./index-6mcx76j9.js";
13
13
  import {
14
14
  effectiveRetrievalOutcomes,
15
15
  readKnowledgeCounterRollups
16
- } from "./index-jxha73tm.js";
16
+ } from "./index-nsxchdx0.js";
17
17
  import {
18
18
  init_knowledge_types,
19
19
  isActiveStatus
@@ -8,7 +8,7 @@ import {
8
8
  init_constants,
9
9
  init_schema,
10
10
  resolveExternalSkillsConfig
11
- } from "./index-5xxgeksy.js";
11
+ } from "./index-5x3g1q91.js";
12
12
  import {
13
13
  advisoryWarn,
14
14
  init_warning_buffer
@@ -3,7 +3,7 @@ import {
3
3
  init_constants,
4
4
  init_schema,
5
5
  stripKnownSwarmPrefix
6
- } from "./index-5xxgeksy.js";
6
+ } from "./index-5x3g1q91.js";
7
7
  import {
8
8
  init_logger,
9
9
  warn
@@ -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-h8bp9eje.js");
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-ts9wh1ba.js";
9
+ } from "./index-6mcx76j9.js";
10
10
  import {
11
11
  countEntryContradictionsInWindow,
12
12
  countEntryViolationsInWindow,
13
13
  readKnowledgeEvents,
14
14
  recordKnowledgeEvent
15
- } from "./index-jxha73tm.js";
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-sz9v1fdq.js");
193
+ const { quarantineEntry } = await import("./knowledge-validator-tnadtt1h.js");
194
194
  let policyConfig;
195
195
  try {
196
- const { KnowledgeConfigSchema } = await import("./schema-fkpn2r1s.js");
197
- const { loadPluginConfigWithMeta } = await import("./index-agte9w1e.js");
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-5xxgeksy.js";
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-6fqj8fcp.js";
4
+ } from "./index-99tq1zd5.js";
5
5
  import {
6
6
  handleGuardrailLog
7
- } from "./index-zft4hp35.js";
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-etdgtk3m.js";
87
- import"./index-hjar4crm.js";
88
- import"./index-p6qgjkbt.js";
89
- import"./index-kzvwb2se.js";
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-jvyn76xe.js";
94
- import"./index-3rnkyb60.js";
95
- import"./index-s8h2cedv.js";
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-wy3q73j2.js";
101
- import"./index-xa29259t.js";
100
+ import"./index-zah4qws8.js";
101
+ import"./index-2dtwjx39.js";
102
102
  import"./index-rtry5xyf.js";
103
- import"./index-ts9wh1ba.js";
104
- import"./index-jxha73tm.js";
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-nr5pr54q.js";
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-5xxgeksy.js";
116
+ } from "./index-5x3g1q91.js";
117
117
  import"./index-bk5tah7q.js";
118
118
  import"./index-8fwhhayc.js";
119
119
  import"./index-q1exe2b3.js";
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  readKnowledge,
4
4
  transactKnowledge
5
- } from "./index-ts9wh1ba.js";
5
+ } from "./index-6mcx76j9.js";
6
6
  import {
7
7
  resolveKnowledgeStoreDir
8
8
  } from "./index-q27bajqb.js";
@@ -1,7 +1,7 @@
1
1
  // @bun
2
2
  import {
3
3
  authorizeCuration
4
- } from "./index-xa29259t.js";
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-ts9wh1ba.js";
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, validateActionability, resolveUnactionablePath, appendUnactionable, auditEntryHealth, quarantineEntry, restoreEntry, unarchiveEntry, _internals };
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-nr5pr54q.js";
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-5xxgeksy.js";
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-etdgtk3m.js";
11
- import"./index-hjar4crm.js";
12
- import"./index-p6qgjkbt.js";
13
- import"./index-kzvwb2se.js";
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-jvyn76xe.js";
18
- import"./index-3rnkyb60.js";
19
- import"./index-s8h2cedv.js";
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-wy3q73j2.js";
25
- import"./index-xa29259t.js";
24
+ import"./index-zah4qws8.js";
25
+ import"./index-2dtwjx39.js";
26
26
  import"./index-rtry5xyf.js";
27
- import"./index-ts9wh1ba.js";
28
- import"./index-jxha73tm.js";
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-nr5pr54q.js";
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-5xxgeksy.js";
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-3rnkyb60.js";
12
- import"./index-ts9wh1ba.js";
13
- import"./index-jxha73tm.js";
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-jxha73tm.js";
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-ts9wh1ba.js";
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-wy3q73j2.js";
27
- import"./index-xa29259t.js";
26
+ } from "./index-zah4qws8.js";
27
+ import"./index-2dtwjx39.js";
28
28
  import"./index-rtry5xyf.js";
29
- import"./index-ts9wh1ba.js";
30
- import"./index-jxha73tm.js";
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-s8h2cedv.js";
8
- import"./index-ts9wh1ba.js";
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-5xxgeksy.js";
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-jvyn76xe.js";
37
- import"./index-wy3q73j2.js";
38
- import"./index-xa29259t.js";
36
+ } from "./index-e630fw43.js";
37
+ import"./index-zah4qws8.js";
38
+ import"./index-2dtwjx39.js";
39
39
  import"./index-rtry5xyf.js";
40
- import"./index-ts9wh1ba.js";
41
- import"./index-jxha73tm.js";
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 directly to hive knowledge (--category flag sets category) or references an existing swarm lesson by ID (--from-swarm). Promotion runs the one policy evaluator inside a single cross-process transaction (#1847). A policy failure blocks promotion unless --force --reason \"<why>\" is supplied, which records a durable, audited override. An exact entry id alone is never authorization to bypass policy. Either direct text or --from-swarm ID is required.";
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
  };