opencode-swarm 7.28.0 → 7.28.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/cli/index.js +1 -1
- package/dist/hooks/skill-propagation-gate.d.ts +10 -0
- package/dist/hooks/skill-scoring.d.ts +23 -0
- package/dist/index.js +521 -391
- package/package.json +1 -1
package/dist/cli/index.js
CHANGED
|
@@ -34,7 +34,7 @@ var package_default;
|
|
|
34
34
|
var init_package = __esm(() => {
|
|
35
35
|
package_default = {
|
|
36
36
|
name: "opencode-swarm",
|
|
37
|
-
version: "7.28.
|
|
37
|
+
version: "7.28.1",
|
|
38
38
|
description: "Architect-centric agentic swarm plugin for OpenCode - hub-and-spoke orchestration with SME consultation, code generation, and QA review",
|
|
39
39
|
main: "dist/index.js",
|
|
40
40
|
types: "dist/index.d.ts",
|
|
@@ -58,6 +58,7 @@ export declare const _internals: {
|
|
|
58
58
|
appendSkillUsageEntry: typeof appendSkillUsageEntry;
|
|
59
59
|
readSkillUsageEntries: typeof readSkillUsageEntries;
|
|
60
60
|
readSkillUsageEntriesTail: typeof readSkillUsageEntriesTail;
|
|
61
|
+
extractSkillsFieldFromPrompt: typeof extractSkillsFieldFromPrompt;
|
|
61
62
|
parseSkillPaths: typeof parseSkillPaths;
|
|
62
63
|
extractTaskIdFromPrompt: typeof extractTaskIdFromPrompt;
|
|
63
64
|
computeSkillRelevanceScore: typeof computeSkillRelevanceScore;
|
|
@@ -82,6 +83,15 @@ export declare function parseDelegationArgs(args: unknown): {
|
|
|
82
83
|
targetAgent: string;
|
|
83
84
|
skillsField: string;
|
|
84
85
|
} | null;
|
|
86
|
+
/**
|
|
87
|
+
* Extracts the value of a SKILLS field from a delegation prompt. Supports both
|
|
88
|
+
* legacy one-line fields (`SKILLS: file:...`) and description-rich blocks:
|
|
89
|
+
*
|
|
90
|
+
* SKILLS:
|
|
91
|
+
* - file:.claude/skills/writing-tests/SKILL.md - test conventions
|
|
92
|
+
* - file:.claude/skills/react/SKILL.md - React UI patterns
|
|
93
|
+
*/
|
|
94
|
+
export declare function extractSkillsFieldFromPrompt(prompt: string): string;
|
|
85
95
|
/** Write a warning event to .swarm/events.jsonl (sync, best-effort). */
|
|
86
96
|
export declare function writeWarnEvent(directory: string, record: Record<string, unknown>): void;
|
|
87
97
|
/**
|
|
@@ -33,11 +33,22 @@ export interface SkillStats {
|
|
|
33
33
|
count: number;
|
|
34
34
|
}>;
|
|
35
35
|
}
|
|
36
|
+
/** Metadata extracted from a SKILL.md frontmatter block. */
|
|
37
|
+
export interface SkillMetadata {
|
|
38
|
+
/** Repo-relative path to the skill file. */
|
|
39
|
+
path: string;
|
|
40
|
+
/** Human-readable skill name. */
|
|
41
|
+
name: string;
|
|
42
|
+
/** Short description from frontmatter, or a fallback when absent. */
|
|
43
|
+
description: string;
|
|
44
|
+
}
|
|
36
45
|
export declare const _internals: {
|
|
37
46
|
computeSkillRelevanceScore: typeof computeSkillRelevanceScore;
|
|
38
47
|
rankSkillsForContext: typeof rankSkillsForContext;
|
|
39
48
|
getSkillStats: typeof getSkillStats;
|
|
40
49
|
formatSkillIndexWithContext: typeof formatSkillIndexWithContext;
|
|
50
|
+
parseSkillFrontmatter: typeof parseSkillFrontmatter;
|
|
51
|
+
readSkillMetadata: typeof readSkillMetadata;
|
|
41
52
|
extractSkillName: typeof extractSkillName;
|
|
42
53
|
computeRecencyScore: typeof computeRecencyScore;
|
|
43
54
|
computeContextMatchScore: typeof computeContextMatchScore;
|
|
@@ -47,6 +58,18 @@ export declare const _internals: {
|
|
|
47
58
|
* E.g. `.claude/skills/writing-tests/SKILL.md` → `writing-tests`
|
|
48
59
|
*/
|
|
49
60
|
declare function extractSkillName(skillPath: string): string;
|
|
61
|
+
/**
|
|
62
|
+
* Parse the YAML-like frontmatter from a SKILL.md file. This intentionally
|
|
63
|
+
* supports only the small subset skills use today: scalar `name` and scalar,
|
|
64
|
+
* folded (`>`), or literal (`|`) `description`.
|
|
65
|
+
*/
|
|
66
|
+
export declare function parseSkillFrontmatter(content: string, skillPath: string): SkillMetadata;
|
|
67
|
+
/**
|
|
68
|
+
* Extract skill metadata from a repo-relative SKILL.md path. Fails open to
|
|
69
|
+
* path-derived metadata when the file is missing, outside the project, or has
|
|
70
|
+
* malformed frontmatter.
|
|
71
|
+
*/
|
|
72
|
+
export declare function readSkillMetadata(skillPath: string, directory: string): SkillMetadata;
|
|
50
73
|
/**
|
|
51
74
|
* Computes a recency score in [0, 1] based on how recently the skill was used.
|
|
52
75
|
* Full score (1.0) for usage within 24 hours, linearly decaying to 0 over 30 days.
|