opencode-swarm 7.76.2 → 7.77.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.
@@ -0,0 +1,6 @@
1
+ export declare function handleConsolidateCommand(directory: string, args: string[], options?: {
2
+ sessionID?: string;
3
+ }): Promise<string>;
4
+ export declare const _internals: {
5
+ handleConsolidateCommand: typeof handleConsolidateCommand;
6
+ };
@@ -15,6 +15,7 @@ export type { CommandName } from './command-names.js';
15
15
  export { COMMAND_NAME_SET, COMMAND_NAMES } from './command-names.js';
16
16
  export { handleConcurrencyCommand } from './concurrency';
17
17
  export { handleConfigCommand } from './config';
18
+ export { handleConsolidateCommand } from './consolidate';
18
19
  export { handleCouncilCommand } from './council';
19
20
  export { handleCurateCommand } from './curate';
20
21
  export { handleDarkMatterCommand } from './dark-matter';
@@ -249,6 +249,13 @@ export declare const COMMAND_REGISTRY: {
249
249
  readonly args: "";
250
250
  readonly category: "utility";
251
251
  };
252
+ readonly consolidate: {
253
+ readonly handler: (ctx: CommandContext) => Promise<string>;
254
+ readonly description: "Run quota-bounded skill-improver consolidation and stage skill proposals";
255
+ readonly details: "Runs the same consolidation pass used by scheduled skill_improver trigger points: queue hardening, skill-improver proposal writing, and optional draft-skill generation. It never auto-activates skills. Use --respect-interval to obey the configured cadence instead of forcing a run.";
256
+ readonly args: "--force, --respect-interval, --evaluate";
257
+ readonly category: "utility";
258
+ };
252
259
  readonly 'dark-matter': {
253
260
  readonly handler: (ctx: CommandContext) => Promise<string>;
254
261
  readonly description: "Detect hidden file couplings via co-change NPMI analysis";
@@ -702,6 +702,8 @@ export declare const SkillImproverConfigSchema: z.ZodObject<{
702
702
  manual: "manual";
703
703
  scheduled: "scheduled";
704
704
  }>>;
705
+ consolidation_interval_hours: z.ZodDefault<z.ZodNumber>;
706
+ consolidation_max_calls_per_run: z.ZodDefault<z.ZodNumber>;
705
707
  targets: z.ZodDefault<z.ZodArray<z.ZodEnum<{
706
708
  skills: "skills";
707
709
  spec: "spec";
@@ -1691,6 +1693,8 @@ export declare const PluginConfigSchema: z.ZodObject<{
1691
1693
  manual: "manual";
1692
1694
  scheduled: "scheduled";
1693
1695
  }>>;
1696
+ consolidation_interval_hours: z.ZodDefault<z.ZodNumber>;
1697
+ consolidation_max_calls_per_run: z.ZodDefault<z.ZodNumber>;
1694
1698
  targets: z.ZodDefault<z.ZodArray<z.ZodEnum<{
1695
1699
  skills: "skills";
1696
1700
  spec: "spec";
@@ -18,7 +18,7 @@
18
18
  */
19
19
  import * as fs from 'node:fs';
20
20
  import type { MessageWithParts } from './knowledge-types.js';
21
- import { computeSkillRelevanceScore, formatSkillIndexWithContext } from './skill-scoring.js';
21
+ import { computeSkillRelevanceScore, formatSkillIndexWithContext, readSkillMetadata } from './skill-scoring.js';
22
22
  import { appendSkillUsageEntry, readSkillUsageEntries, readSkillUsageEntriesTail } from './skill-usage-log.js';
23
23
  /**
24
24
  * Load routing skills from .opencode/skill-routing.yaml for a target agent.
@@ -66,6 +66,7 @@ export declare const _internals: {
66
66
  extractTaskIdFromPrompt: typeof extractTaskIdFromPrompt;
67
67
  extractSkillsFieldFromPrompt: typeof extractSkillsFieldFromPrompt;
68
68
  computeSkillRelevanceScore: typeof computeSkillRelevanceScore;
69
+ readSkillMetadata: typeof readSkillMetadata;
69
70
  formatSkillIndexWithContext: typeof formatSkillIndexWithContext;
70
71
  loadRoutingSkills: typeof loadRoutingSkills;
71
72
  };
@@ -43,6 +43,8 @@ export interface SkillMetadata {
43
43
  description: string;
44
44
  /** Skill type from frontmatter (directive or workflow). */
45
45
  skillType?: 'directive' | 'workflow';
46
+ /** Literal trigger phrases from frontmatter. */
47
+ triggers?: string[];
46
48
  }
47
49
  export declare const _internals: {
48
50
  computeSkillRelevanceScore: typeof computeSkillRelevanceScore;
@@ -54,6 +56,7 @@ export declare const _internals: {
54
56
  extractSkillName: typeof extractSkillName;
55
57
  computeRecencyScore: typeof computeRecencyScore;
56
58
  computeContextMatchScore: typeof computeContextMatchScore;
59
+ computeTriggerMatchBoost: typeof computeTriggerMatchBoost;
57
60
  };
58
61
  /**
59
62
  * Extracts a human-readable skill name from its file path.
@@ -89,6 +92,7 @@ declare function computeRecencyScore(lastUsedTimestamp: string): number;
89
92
  * @returns Context match score in [0, 1].
90
93
  */
91
94
  declare function computeContextMatchScore(taskDescription: string, skillPath: string, metadata?: SkillMetadata): number;
95
+ declare function computeTriggerMatchBoost(taskDescription: string, triggers?: string[]): number;
92
96
  /**
93
97
  * Compute a composite relevance score for a skill based on its usage history
94
98
  * and keyword overlap with the task description.