@owlmeans/agent-skills 0.1.15 → 0.1.16
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 +46 -18
- package/agent-meta/manifest.json +15 -99
- package/agent-meta/skills/agent-memory/SKILL.md +8 -7
- package/agent-meta/skills/getting-started/SKILL.md +2 -1
- package/agent-meta/skills/git/SKILL.md +2 -1
- package/agent-meta/skills/memory-promotion/SKILL.md +5 -4
- package/agent-meta/skills/memory-recompact/SKILL.md +3 -3
- package/agent-meta/skills/reuse-code/SKILL.md +4 -3
- package/agent-meta/skills/router-plugins/SKILL.md +2 -1
- package/agent-meta/skills/scaffolding/SKILL.md +15 -13
- package/agent-meta/skills/self-education/SKILL.md +10 -10
- package/agent-meta/skills/shadcn-versions/SKILL.md +3 -2
- package/agent-meta/skills/shadcn-web/SKILL.md +2 -1
- package/agent-meta/skills/skill-authoring/SKILL.md +44 -39
- package/build/apply.d.ts +2 -1
- package/build/apply.d.ts.map +1 -1
- package/build/apply.js +40 -4
- package/build/apply.js.map +1 -1
- package/build/args.d.ts +4 -2
- package/build/args.d.ts.map +1 -1
- package/build/args.js +6 -7
- package/build/args.js.map +1 -1
- package/build/discover.d.ts +8 -5
- package/build/discover.d.ts.map +1 -1
- package/build/discover.js +13 -11
- package/build/discover.js.map +1 -1
- package/build/llm/index.d.ts +13 -0
- package/build/llm/index.d.ts.map +1 -0
- package/build/llm/index.js +13 -0
- package/build/llm/index.js.map +1 -0
- package/build/llm/manifest.d.ts +30 -0
- package/build/llm/manifest.d.ts.map +1 -0
- package/build/llm/manifest.js +59 -0
- package/build/llm/manifest.js.map +1 -0
- package/build/llm/plugin.d.ts +17 -0
- package/build/llm/plugin.d.ts.map +1 -0
- package/build/llm/plugin.js +115 -0
- package/build/llm/plugin.js.map +1 -0
- package/build/llm/resolve.d.ts +4 -0
- package/build/llm/resolve.d.ts.map +1 -0
- package/build/llm/resolve.js +145 -0
- package/build/llm/resolve.js.map +1 -0
- package/build/llm/types.d.ts +59 -0
- package/build/llm/types.d.ts.map +1 -0
- package/build/llm/types.js +3 -0
- package/build/llm/types.js.map +1 -0
- package/build/plan.d.ts.map +1 -1
- package/build/plan.js +7 -6
- package/build/plan.js.map +1 -1
- package/build/run.d.ts.map +1 -1
- package/build/run.js +9 -12
- package/build/run.js.map +1 -1
- package/package.json +23 -1
- package/src/apply.ts +41 -4
- package/src/args.ts +12 -9
- package/src/discover.ts +13 -14
- package/src/llm/index.ts +13 -0
- package/src/llm/manifest.ts +75 -0
- package/src/llm/plugin.ts +133 -0
- package/src/llm/resolve.ts +180 -0
- package/src/llm/types.ts +71 -0
- package/src/plan.ts +8 -6
- package/src/run.ts +8 -11
- package/tests/installer.test.ts +61 -45
- package/tests/llm-plugin.test.ts +158 -0
- package/agent-meta/instructions/agent-memory.instructions.md +0 -143
- package/agent-meta/instructions/getting-started.instructions.md +0 -62
- package/agent-meta/instructions/git.instructions.md +0 -52
- package/agent-meta/instructions/memory-promotion.instructions.md +0 -111
- package/agent-meta/instructions/memory-recompact.instructions.md +0 -73
- package/agent-meta/instructions/reuse-code.instructions.md +0 -50
- package/agent-meta/instructions/router-plugins.instructions.md +0 -46
- package/agent-meta/instructions/scaffolding.instructions.md +0 -68
- package/agent-meta/instructions/self-education.instructions.md +0 -85
- package/agent-meta/instructions/shadcn-versions.instructions.md +0 -47
- package/agent-meta/instructions/shadcn-web.instructions.md +0 -95
- package/agent-meta/instructions/skill-authoring.instructions.md +0 -66
|
@@ -1,72 +1,77 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: skill-authoring
|
|
3
|
-
description: How to add agent guidance to an OwlMeans project — author
|
|
3
|
+
description: How to add agent guidance to an OwlMeans project — author one skill at .agents/skills/<name>/SKILL.md that every agent reads, choose frontmatter that validates across Claude Code, Copilot and Codex, refresh the Claude Code symlinks, and decide skill vs memory. Use when asked to capture knowledge as a skill, add a slash command, or document a repeatable procedure.
|
|
4
4
|
user-invocable: true
|
|
5
|
-
|
|
5
|
+
metadata:
|
|
6
|
+
scope: general
|
|
6
7
|
---
|
|
7
8
|
<!-- AUTO-GENERATED — do not edit. Regenerate via sync-agent-meta. -->
|
|
8
9
|
|
|
9
|
-
# Authoring agent guidance (skills
|
|
10
|
+
# Authoring agent guidance (skills)
|
|
10
11
|
|
|
11
|
-
OwlMeans projects carry agent guidance in two
|
|
12
|
-
Copilot can use it:
|
|
12
|
+
OwlMeans projects carry agent guidance in two places, and only two:
|
|
13
13
|
|
|
14
|
-
|
|
|
14
|
+
| What | Where | Loaded |
|
|
15
15
|
|---|---|---|
|
|
16
|
-
|
|
|
17
|
-
|
|
|
16
|
+
| Always-on project context | `AGENTS.md` at the repo root | every session |
|
|
17
|
+
| Topic guidance | `.agents/skills/<name>/SKILL.md` | on demand, by topic or `/<name>` |
|
|
18
18
|
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
`.agents/skills/` is the [Agent Skills](https://agentskills.io) standard location: GitHub Copilot
|
|
20
|
+
and Codex discover it natively. Claude Code reads skills only from `.claude/skills/`, so each skill
|
|
21
|
+
is bridged there by a generated symlink — see "Refresh the Claude Code links" below. **Write a skill
|
|
22
|
+
once; never author a per-agent copy** (`.github/instructions/*.instructions.md`,
|
|
23
|
+
`.github/copilot-instructions.md`, or a real file under `.claude/skills/`).
|
|
21
24
|
|
|
22
|
-
##
|
|
25
|
+
## Skill layout
|
|
23
26
|
|
|
24
27
|
```
|
|
25
|
-
.
|
|
28
|
+
.agents/skills/<name>/
|
|
26
29
|
├── SKILL.md # required — frontmatter + body
|
|
27
30
|
├── reference.md # optional — deeper detail loaded on demand
|
|
28
31
|
└── scripts/ # optional — shell scripts the skill runs
|
|
29
32
|
```
|
|
30
33
|
|
|
31
|
-
Frontmatter
|
|
34
|
+
## Frontmatter
|
|
32
35
|
|
|
33
36
|
```yaml
|
|
34
37
|
---
|
|
35
|
-
name: my-skill # the
|
|
36
|
-
description: What it does and WHEN to use it.
|
|
38
|
+
name: my-skill # REQUIRED, must equal the directory name (lowercase, hyphens, ≤64 chars)
|
|
39
|
+
description: What it does and WHEN to use it. # REQUIRED, ≤1024 chars — the auto-invocation signal
|
|
37
40
|
user-invocable: true # false = background knowledge only, hidden from the / menu
|
|
38
|
-
allowed-tools: Bash(bun *) Read # optional — tools usable without per-call approval
|
|
41
|
+
allowed-tools: Bash(bun *) Read # optional — space-separated; tools usable without per-call approval
|
|
42
|
+
metadata: # optional — anything non-standard goes here
|
|
43
|
+
scope: general
|
|
39
44
|
---
|
|
40
45
|
```
|
|
41
46
|
|
|
42
|
-
The `description` is the most important field:
|
|
43
|
-
skill, so
|
|
47
|
+
The `description` is the most important field: every agent uses it to decide when to load the
|
|
48
|
+
skill, so state both the topic and the trigger ("Use when …"). Keep it under 1024 characters —
|
|
49
|
+
Copilot rejects longer ones.
|
|
44
50
|
|
|
45
|
-
|
|
51
|
+
Only the fields above (plus `license` and `compatibility`) are portable. Anything else — including
|
|
52
|
+
this monorepo's `scope: general` routing marker — belongs under `metadata:`, so a skill stays valid
|
|
53
|
+
in every agent that reads it. Claude Code additionally understands `disable-model-invocation`,
|
|
54
|
+
`argument-hint` and `context: fork`; use them only when the skill genuinely needs them.
|
|
46
55
|
|
|
47
|
-
|
|
48
|
-
---
|
|
49
|
-
description: "Short summary — apply when …"
|
|
50
|
-
applyTo: "**/*.ts, **/relevant/**" # globs that auto-attach this instruction
|
|
51
|
-
---
|
|
52
|
-
```
|
|
56
|
+
## Refresh the Claude Code links
|
|
53
57
|
|
|
54
|
-
|
|
55
|
-
actually about; fall back to `**/*.ts, **/*.tsx` if it is broadly relevant.
|
|
58
|
+
After creating, renaming, or deleting a skill, run:
|
|
56
59
|
|
|
57
|
-
|
|
60
|
+
```sh
|
|
61
|
+
sh .agents/scripts/link-skills.sh
|
|
62
|
+
```
|
|
58
63
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
64
|
+
It creates `.claude/skills/<name>` → `../../.agents/skills/<name>` for every skill and prunes links
|
|
65
|
+
whose skill is gone. The links are gitignored and are recreated at session start, but a skill added
|
|
66
|
+
mid-session is invisible to Claude Code until the script runs.
|
|
62
67
|
|
|
63
68
|
## Skill vs memory
|
|
64
69
|
|
|
65
|
-
- **Skill
|
|
66
|
-
|
|
67
|
-
- **Memory** — a fact, decision, or gotcha specific to this project's history/state. Lives in
|
|
68
|
-
|
|
69
|
-
|
|
70
|
+
- **Skill** — a reusable procedure or reference you (or the agents) will want again, worth loading
|
|
71
|
+
automatically. Lives in `.agents/skills/`.
|
|
72
|
+
- **Memory** — a fact, decision, or gotcha specific to this project's history/state. Lives in the
|
|
73
|
+
shared `.agents/memory/` graph store. See the `agent-memory` skill; promotion triggers and the
|
|
74
|
+
update-vs-create rule live in `memory-promotion`.
|
|
70
75
|
|
|
71
76
|
If you find yourself writing "last time we…", that is memory. If you are writing "to do X, do Y",
|
|
72
77
|
that is a skill.
|
|
@@ -77,8 +82,8 @@ incident narrative stripped (`memory-promotion` → Distillation).
|
|
|
77
82
|
|
|
78
83
|
## After adding a skill
|
|
79
84
|
|
|
80
|
-
1. If it replaces an ad-hoc `.
|
|
85
|
+
1. If it replaces an ad-hoc `.agents/<topic>.md`, remove that file.
|
|
81
86
|
2. If it distilled memory content into rules, shrink the source `.agents/memory/` node to a
|
|
82
87
|
pointer line (`memory-promotion`) — the memory index does not list skills.
|
|
83
|
-
3. Reference it from `
|
|
84
|
-
|
|
88
|
+
3. Reference it from `AGENTS.md` if it should be discoverable every session.
|
|
89
|
+
4. Run `sh .agents/scripts/link-skills.sh`.
|
package/build/apply.d.ts
CHANGED
|
@@ -4,10 +4,11 @@ export interface ApplyResult {
|
|
|
4
4
|
updated: number;
|
|
5
5
|
skipped: number;
|
|
6
6
|
conflicts: number;
|
|
7
|
+
linked: number;
|
|
7
8
|
}
|
|
8
9
|
/**
|
|
9
10
|
* Execute an install plan. Items with action 'conflict' or 'skip-uptodate'
|
|
10
11
|
* are not written. Only 'install' and 'update' items are written.
|
|
11
12
|
*/
|
|
12
|
-
export declare const applyInstall: (items: InstallItem[]) => ApplyResult;
|
|
13
|
+
export declare const applyInstall: (items: InstallItem[], targetDir?: string) => ApplyResult;
|
|
13
14
|
//# sourceMappingURL=apply.d.ts.map
|
package/build/apply.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"apply.d.ts","sourceRoot":"","sources":["../src/apply.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,WAAW,CAAA;AAE5C,MAAM,WAAW,WAAW;IAC1B,SAAS,EAAE,MAAM,CAAA;IACjB,OAAO,EAAE,MAAM,CAAA;IACf,OAAO,EAAE,MAAM,CAAA;IACf,SAAS,EAAE,MAAM,CAAA;
|
|
1
|
+
{"version":3,"file":"apply.d.ts","sourceRoot":"","sources":["../src/apply.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,WAAW,CAAA;AAE5C,MAAM,WAAW,WAAW;IAC1B,SAAS,EAAE,MAAM,CAAA;IACjB,OAAO,EAAE,MAAM,CAAA;IACf,OAAO,EAAE,MAAM,CAAA;IACf,SAAS,EAAE,MAAM,CAAA;IACjB,MAAM,EAAE,MAAM,CAAA;CACf;AA+BD;;;GAGG;AACH,eAAO,MAAM,YAAY,GAAI,OAAO,WAAW,EAAE,EAAE,YAAY,MAAM,KAAG,WA6BvE,CAAA"}
|
package/build/apply.js
CHANGED
|
@@ -1,14 +1,46 @@
|
|
|
1
|
-
import { mkdirSync, readFileSync, writeFileSync } from 'node:fs';
|
|
2
|
-
import { dirname } from 'node:path';
|
|
1
|
+
import { existsSync, lstatSync, mkdirSync, readFileSync, rmSync, symlinkSync, writeFileSync } from 'node:fs';
|
|
2
|
+
import { dirname, join } from 'node:path';
|
|
3
|
+
/**
|
|
4
|
+
* Claude Code discovers skills only under `.claude/skills/`, so every installed skill
|
|
5
|
+
* gets a per-skill symlink into the canonical `.agents/skills/` store. Copilot and
|
|
6
|
+
* Codex read `.agents/skills/` directly and need nothing here.
|
|
7
|
+
*
|
|
8
|
+
* Only projects that already carry a `.claude/` directory are bridged — a
|
|
9
|
+
* Copilot/Codex-only project stays free of Claude Code scaffolding. Real files are
|
|
10
|
+
* never replaced, and failures (Windows without symlink rights) are non-fatal.
|
|
11
|
+
*/
|
|
12
|
+
const linkForClaude = (targetDir, names) => {
|
|
13
|
+
if (!existsSync(join(targetDir, '.claude')))
|
|
14
|
+
return 0;
|
|
15
|
+
const skillsDir = join(targetDir, '.claude', 'skills');
|
|
16
|
+
mkdirSync(skillsDir, { recursive: true });
|
|
17
|
+
let linked = 0;
|
|
18
|
+
for (const name of names) {
|
|
19
|
+
const link = join(skillsDir, name);
|
|
20
|
+
try {
|
|
21
|
+
if (existsSync(link) || lstatSync(link, { throwIfNoEntry: false }) != null) {
|
|
22
|
+
if (!lstatSync(link).isSymbolicLink())
|
|
23
|
+
continue;
|
|
24
|
+
rmSync(link);
|
|
25
|
+
}
|
|
26
|
+
symlinkSync(join('..', '..', '.agents', 'skills', name), link);
|
|
27
|
+
linked++;
|
|
28
|
+
}
|
|
29
|
+
catch { /* non-fatal: the repo's link-skills.sh can retry */ }
|
|
30
|
+
}
|
|
31
|
+
return linked;
|
|
32
|
+
};
|
|
3
33
|
/**
|
|
4
34
|
* Execute an install plan. Items with action 'conflict' or 'skip-uptodate'
|
|
5
35
|
* are not written. Only 'install' and 'update' items are written.
|
|
6
36
|
*/
|
|
7
|
-
export const applyInstall = (items) => {
|
|
8
|
-
const result = { installed: 0, updated: 0, skipped: 0, conflicts: 0 };
|
|
37
|
+
export const applyInstall = (items, targetDir) => {
|
|
38
|
+
const result = { installed: 0, updated: 0, skipped: 0, conflicts: 0, linked: 0 };
|
|
39
|
+
const written = [];
|
|
9
40
|
for (const item of items) {
|
|
10
41
|
if (item.action === 'skip-uptodate') {
|
|
11
42
|
result.skipped++;
|
|
43
|
+
written.push(item.entry.name);
|
|
12
44
|
continue;
|
|
13
45
|
}
|
|
14
46
|
if (item.action === 'conflict') {
|
|
@@ -18,11 +50,15 @@ export const applyInstall = (items) => {
|
|
|
18
50
|
const content = readFileSync(item.entry.sourcePath, 'utf8');
|
|
19
51
|
mkdirSync(dirname(item.targetPath), { recursive: true });
|
|
20
52
|
writeFileSync(item.targetPath, content, 'utf8');
|
|
53
|
+
written.push(item.entry.name);
|
|
21
54
|
if (item.action === 'install')
|
|
22
55
|
result.installed++;
|
|
23
56
|
else
|
|
24
57
|
result.updated++;
|
|
25
58
|
}
|
|
59
|
+
if (targetDir != null && written.length > 0) {
|
|
60
|
+
result.linked = linkForClaude(targetDir, written);
|
|
61
|
+
}
|
|
26
62
|
return result;
|
|
27
63
|
};
|
|
28
64
|
//# sourceMappingURL=apply.js.map
|
package/build/apply.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"apply.js","sourceRoot":"","sources":["../src/apply.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;
|
|
1
|
+
{"version":3,"file":"apply.js","sourceRoot":"","sources":["../src/apply.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AAC5G,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAWzC;;;;;;;;GAQG;AACH,MAAM,aAAa,GAAG,CAAC,SAAiB,EAAE,KAAe,EAAU,EAAE;IACnE,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC;QAAE,OAAO,CAAC,CAAA;IACrD,MAAM,SAAS,GAAG,IAAI,CAAC,SAAS,EAAE,SAAS,EAAE,QAAQ,CAAC,CAAA;IACtD,SAAS,CAAC,SAAS,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAA;IAEzC,IA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/B,MAAM,CAAC,SAAS,EAAE,CAAA;YAClB,SAAQ;QACV,CAAC;QAED,MAAM,OAAO,GAAG,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC,UAAU,EAAE,MAAM,CAAC,CAAA;QAC3D,SAAS,CAAC,OAAO,CAAC,IAAI,CAAC,UAAU,CAAC,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAA;QACxD,aAAa,CAAC,IAAI,CAAC,UAAU,EAAE,OAAO,EAAE,MAAM,CAAC,CAAA;QAC/C,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;QAE7B,IAAI,IAAI,CAAC,MAAM,KAAK,SAAS;YAAE,MAAM,CAAC,SAAS,EAAE,CAAA;;YAC5C,MAAM,CAAC,OAAO,EAAE,CAAA;IACvB,CAAC;IAED,IAAI,SAAS,IAAI,IAAI,IAAI,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAC5C,MAAM,CAAC,MAAM,GAAG,aAAa,CAAC,SAAS,EAAE,OAAO,CAAC,CAAA;IACnD,CAAC;IAED,OAAO,MAAM,CAAA;AACf,CAAC,CAAA"}
|
package/build/args.d.ts
CHANGED
|
@@ -2,8 +2,10 @@ export interface CliArgs {
|
|
|
2
2
|
dir: string;
|
|
3
3
|
yes: boolean;
|
|
4
4
|
only: string[];
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
/** @deprecated no-op — skills install to `.agents/skills/` for every agent. */
|
|
6
|
+
claudeOnly?: boolean;
|
|
7
|
+
/** @deprecated no-op — skills install to `.agents/skills/` for every agent. */
|
|
8
|
+
copilotOnly?: boolean;
|
|
7
9
|
extras: boolean;
|
|
8
10
|
force: boolean;
|
|
9
11
|
dryRun: boolean;
|
package/build/args.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"args.d.ts","sourceRoot":"","sources":["../src/args.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,OAAO;IACtB,GAAG,EAAE,MAAM,CAAA;IACX,GAAG,EAAE,OAAO,CAAA;IACZ,IAAI,EAAE,MAAM,EAAE,CAAA;IACd,UAAU,EAAE,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"args.d.ts","sourceRoot":"","sources":["../src/args.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,OAAO;IACtB,GAAG,EAAE,MAAM,CAAA;IACX,GAAG,EAAE,OAAO,CAAA;IACZ,IAAI,EAAE,MAAM,EAAE,CAAA;IACd,+EAA+E;IAC/E,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,+EAA+E;IAC/E,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,MAAM,EAAE,OAAO,CAAA;IACf,KAAK,EAAE,OAAO,CAAA;IACd,MAAM,EAAE,OAAO,CAAA;IACf,IAAI,EAAE,OAAO,CAAA;CACd;AAwBD,eAAO,MAAM,SAAS,GAAI,MAAM,MAAM,EAAE,KAAG,OAAO,GAAG,IAsEpD,CAAA;AAED,eAAO,MAAM,SAAS,QAAO,IAE5B,CAAA"}
|
package/build/args.js
CHANGED
|
@@ -1,27 +1,28 @@
|
|
|
1
1
|
const HELP = `owlmeans-agent-skills — install embedded @owlmeans/* agent guidance
|
|
2
2
|
|
|
3
|
+
Skills are written to .agents/skills/<name>/SKILL.md — the Agent Skills standard
|
|
4
|
+
location read by Copilot, Codex and other agents. Projects with a .claude/
|
|
5
|
+
directory also get the per-skill symlinks Claude Code needs.
|
|
6
|
+
|
|
3
7
|
Usage: npx @owlmeans/agent-skills [options]
|
|
4
8
|
|
|
5
9
|
Options:
|
|
6
10
|
--dir <path> target project directory (default: cwd)
|
|
7
11
|
--yes, -y skip interactive confirmation
|
|
8
12
|
--only <pkg,...> comma-separated @owlmeans/* package names to install from
|
|
9
|
-
--claude-only install only Claude Code skills
|
|
10
|
-
--copilot-only install only Copilot instructions
|
|
11
13
|
--extras include extras bundled with the installer (default: on)
|
|
12
14
|
--no-extras skip installer-bundled extras
|
|
13
15
|
--force overwrite locally-edited files (no AUTO-GENERATED banner)
|
|
14
16
|
--dry-run print plan without writing files
|
|
15
17
|
--help, -h show this help
|
|
16
18
|
`;
|
|
19
|
+
const OBSOLETE_TOOL_FLAG = 'note: %s is obsolete — skills install to .agents/skills/ for every agent.\n';
|
|
17
20
|
export const parseArgs = (argv) => {
|
|
18
21
|
const args = argv.slice(2); // strip node + script
|
|
19
22
|
const result = {
|
|
20
23
|
dir: process.cwd(),
|
|
21
24
|
yes: false,
|
|
22
25
|
only: [],
|
|
23
|
-
claudeOnly: false,
|
|
24
|
-
copilotOnly: false,
|
|
25
26
|
extras: true,
|
|
26
27
|
force: false,
|
|
27
28
|
dryRun: false,
|
|
@@ -46,10 +47,8 @@ export const parseArgs = (argv) => {
|
|
|
46
47
|
result.dryRun = true;
|
|
47
48
|
break;
|
|
48
49
|
case '--claude-only':
|
|
49
|
-
result.claudeOnly = true;
|
|
50
|
-
break;
|
|
51
50
|
case '--copilot-only':
|
|
52
|
-
|
|
51
|
+
process.stderr.write(OBSOLETE_TOOL_FLAG.replace('%s', a));
|
|
53
52
|
break;
|
|
54
53
|
case '--extras':
|
|
55
54
|
result.extras = true;
|
package/build/args.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"args.js","sourceRoot":"","sources":["../src/args.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"args.js","sourceRoot":"","sources":["../src/args.ts"],"names":[],"mappings":"AAcA,MAAM,IAAI,GAAG;;;;;;;;;;;;;;;;;CAiBZ,CAAA;AAED,MAAM,kBAAkB,GACtB,6EAA6E,CAAA;AAE/E,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,IAAc,EAAkB,EAAE;IAC1D,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAA,CAAC,sBAAsB;IACjD,MAAM,MAAM,GAAY;QACtB,GAAG,EAAE,OAAO,CAAC,GAAG,EAAE;QAClB,GAA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CAAA;gBACb,CAAC;gBACD,MAAM,CAAC,GAAG,GAAG,CAAC,CAAA;gBACd,CAAC,EAAE,CAAA;gBACH,MAAK;YACP,CAAC;YACD,KAAK,QAAQ,CAAC,CAAC,CAAC;gBACd,MAAM,CAAC,GAAG,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,CAAA;gBACrB,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE,CAAC;oBACnC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,yDAAyD,CAAC,CAAA;oBAC/E,OAAO,IAAI,CAAA;gBACb,CAAC;gBACD,MAAM,CAAC,IAAI,GAAG,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAA;gBAC7D,CAAC,EAAE,CAAA;gBACH,MAAK;YACP,CAAC;YACD;gBACE,IAAI,CAAC,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE,CAAC;oBACvB,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,uBAAuB,CAAC,IAAI,CAAC,CAAA;oBAClD,OAAO,IAAI,CAAA;gBACb,CAAC;QACL,CAAC;QACD,CAAC,EAAE,CAAA;IACL,CAAC;IAED,OAAO,MAAM,CAAA;AACf,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,SAAS,GAAG,GAAS,EAAE;IAClC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;AAC5B,CAAC,CAAA"}
|
package/build/discover.d.ts
CHANGED
|
@@ -31,11 +31,14 @@ export interface DiscoverOptions {
|
|
|
31
31
|
extras?: boolean;
|
|
32
32
|
/** Restrict to entries from these package names. */
|
|
33
33
|
only?: string[];
|
|
34
|
-
/** Install only skills. */
|
|
35
|
-
claudeOnly?: boolean;
|
|
36
|
-
/** Install only instructions. */
|
|
37
|
-
copilotOnly?: boolean;
|
|
38
34
|
}
|
|
39
|
-
/**
|
|
35
|
+
/**
|
|
36
|
+
* Collect all DiscoveredEntries, deduplicated by name.
|
|
37
|
+
*
|
|
38
|
+
* Only `kind: 'skill'` entries are installed. Packages published before schema v2
|
|
39
|
+
* also carry `kind: 'instruction'` twins of the same knowledge (the Copilot format
|
|
40
|
+
* that predates the Agent Skills standard); they are dropped here so a mixed
|
|
41
|
+
* node_modules never installs both halves.
|
|
42
|
+
*/
|
|
40
43
|
export declare const discover: (targetDir: string, opts?: DiscoverOptions) => DiscoveredEntry[];
|
|
41
44
|
//# sourceMappingURL=discover.d.ts.map
|
package/build/discover.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"discover.d.ts","sourceRoot":"","sources":["../src/discover.ts"],"names":[],"mappings":"AAIA,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,OAAO,GAAG,aAAa,CAAA;IAC7B,IAAI,EAAE,MAAM,CAAA;IACZ,QAAQ,EAAE,kBAAkB,GAAG,eAAe,GAAG,SAAS,CAAA;IAC1D,IAAI,EAAE,MAAM,CAAA;IACZ,aAAa,EAAE,MAAM,CAAA;CACtB;AAED,MAAM,WAAW,QAAQ;IACvB,aAAa,EAAE,MAAM,CAAA;IACrB,OAAO,EAAE,MAAM,CAAA;IACf,OAAO,EAAE,MAAM,CAAA;IACf,WAAW,EAAE,MAAM,CAAA;IACnB,aAAa,EAAE,MAAM,CAAA;IACrB,OAAO,EAAE,aAAa,EAAE,CAAA;CACzB;AAED,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,OAAO,GAAG,aAAa,CAAA;IAC7B,IAAI,EAAE,MAAM,CAAA;IACZ,QAAQ,EAAE,kBAAkB,GAAG,eAAe,GAAG,SAAS,CAAA;IAC1D,iDAAiD;IACjD,UAAU,EAAE,MAAM,CAAA;IAClB,aAAa,EAAE,MAAM,CAAA;IACrB,8BAA8B;IAC9B,WAAW,EAAE,MA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AAED;;;;;;;GAOG;AACH,eAAO,MAAM,QAAQ,GAAI,WAAW,MAAM,EAAE,OAAM,eAAoB,KAAG,eAAe,EAwCvF,CAAA"}
|
package/build/discover.js
CHANGED
|
@@ -167,10 +167,17 @@ const scanSelfExtras = (packageName, version) => {
|
|
|
167
167
|
}
|
|
168
168
|
return entries;
|
|
169
169
|
};
|
|
170
|
-
/**
|
|
170
|
+
/**
|
|
171
|
+
* Collect all DiscoveredEntries, deduplicated by name.
|
|
172
|
+
*
|
|
173
|
+
* Only `kind: 'skill'` entries are installed. Packages published before schema v2
|
|
174
|
+
* also carry `kind: 'instruction'` twins of the same knowledge (the Copilot format
|
|
175
|
+
* that predates the Agent Skills standard); they are dropped here so a mixed
|
|
176
|
+
* node_modules never installs both halves.
|
|
177
|
+
*/
|
|
171
178
|
export const discover = (targetDir, opts = {}) => {
|
|
172
|
-
const { extras = true, only
|
|
173
|
-
const allEntries = scanNodeModules(targetDir);
|
|
179
|
+
const { extras = true, only } = opts;
|
|
180
|
+
const allEntries = scanNodeModules(targetDir).filter(e => e.kind === 'skill');
|
|
174
181
|
if (extras) {
|
|
175
182
|
// Get installer's own package name+version from its package.json
|
|
176
183
|
let selfName = '@owlmeans/agent-skills';
|
|
@@ -186,12 +193,12 @@ export const discover = (targetDir, opts = {}) => {
|
|
|
186
193
|
}
|
|
187
194
|
}
|
|
188
195
|
catch { /* use defaults */ }
|
|
189
|
-
allEntries.push(...scanSelfExtras(selfName, selfVersion));
|
|
196
|
+
allEntries.push(...scanSelfExtras(selfName, selfVersion).filter(e => e.kind === 'skill'));
|
|
190
197
|
}
|
|
191
|
-
// Deduplicate by
|
|
198
|
+
// Deduplicate by name: prefer highest semver version
|
|
192
199
|
const byKey = new Map();
|
|
193
200
|
for (const e of allEntries) {
|
|
194
|
-
const key =
|
|
201
|
+
const key = e.name;
|
|
195
202
|
const existing = byKey.get(key);
|
|
196
203
|
if (existing == null) {
|
|
197
204
|
byKey.set(key, e);
|
|
@@ -205,11 +212,6 @@ export const discover = (targetDir, opts = {}) => {
|
|
|
205
212
|
if (only != null && only.length > 0) {
|
|
206
213
|
result = result.filter(e => only.some(n => matchPkgName(n, e.packageName)));
|
|
207
214
|
}
|
|
208
|
-
// Apply tool filters
|
|
209
|
-
if (claudeOnly)
|
|
210
|
-
result = result.filter(e => e.kind === 'skill');
|
|
211
|
-
if (copilotOnly)
|
|
212
|
-
result = result.filter(e => e.kind === 'instruction');
|
|
213
215
|
return result;
|
|
214
216
|
};
|
|
215
217
|
/** Compare two semver strings. Returns >0 if a > b, <0 if a < b, 0 if equal. */
|
package/build/discover.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"discover.js","sourceRoot":"","sources":["../src/discover.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAC7E,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AACzC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AAiCxC,iEAAiE;AACjE,MAAM,aAAa,GAAG,CAAC,YAAoB,EAAmB,EAAE;IAC9D,IAAI,CAAC;QACH,MAAM,GAAG,GAAG,YAAY,CAAC,YAAY,EAAE,MAAM,CAAC,CAAA;QAC9C,MAAM,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAa,CAAA;QACrC,IAAI,OAAO,CAAC,CAAC,aAAa,KAAK,QAAQ,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC;YAAE,OAAO,IAAI,CAAA;QACjF,OAAO,CAAC,CAAA;IACV,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,IAAI,CAAA;IACb,CAAC;AACH,CAAC,CAAA;AAED,MAAM,cAAc,GAAG,WAAW,CAAA;AAElC;;;;;;;;;;GAUG;AACH,MAAM,gBAAgB,GAAG,CAAC,SAAiB,EAAY,EA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CAAC,OAAO,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,CAAC,CAAA;IACrE,MAAM,EAAE,GAAG,KAAK,CAAC,CAAC,CAAC,CAAA;IACnB,MAAM,EAAE,GAAG,KAAK,CAAC,CAAC,CAAC,CAAA;IACnB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;QAC3B,MAAM,IAAI,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAA;QACxC,IAAI,IAAI,KAAK,CAAC;YAAE,OAAO,IAAI,CAAA;IAC7B,CAAC;IACD,OAAO,CAAC,CAAA;AACV,CAAC,CAAA;AAED,wFAAwF;AACxF,MAAM,YAAY,GAAG,CAAC,MAAc,EAAE,OAAe,EAAW,EAAE;IAChE,IAAI,MAAM,KAAK,OAAO;QAAE,OAAO,IAAI,CAAA;IACnC,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,OAAO,KAAK,aAAa,MAAM,EAAE;QAAE,OAAO,IAAI,CAAA;IAC7E,OAAO,KAAK,CAAA;AACd,CAAC,CAAA"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The LLM-facing half of this package: a prompt plugin that turns a mention of an
|
|
3
|
+
* `@owlmeans/*` package in a prompt into that package's published skills.
|
|
4
|
+
*
|
|
5
|
+
* Deliberately NOT re-exported from the package index. The installer CLI has no runtime
|
|
6
|
+
* dependencies and must keep it that way; this entry point resolves `@owlmeans/llm` and
|
|
7
|
+
* `@owlmeans/llm-common`, which only a consumer already using the LLM layer will have.
|
|
8
|
+
*/
|
|
9
|
+
export * from './types.js';
|
|
10
|
+
export * from './manifest.js';
|
|
11
|
+
export * from './resolve.js';
|
|
12
|
+
export * from './plugin.js';
|
|
13
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/llm/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,cAAc,YAAY,CAAA;AAC1B,cAAc,eAAe,CAAA;AAC7B,cAAc,cAAc,CAAA;AAC5B,cAAc,aAAa,CAAA"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The LLM-facing half of this package: a prompt plugin that turns a mention of an
|
|
3
|
+
* `@owlmeans/*` package in a prompt into that package's published skills.
|
|
4
|
+
*
|
|
5
|
+
* Deliberately NOT re-exported from the package index. The installer CLI has no runtime
|
|
6
|
+
* dependencies and must keep it that way; this entry point resolves `@owlmeans/llm` and
|
|
7
|
+
* `@owlmeans/llm-common`, which only a consumer already using the LLM layer will have.
|
|
8
|
+
*/
|
|
9
|
+
export * from './types.js';
|
|
10
|
+
export * from './manifest.js';
|
|
11
|
+
export * from './resolve.js';
|
|
12
|
+
export * from './plugin.js';
|
|
13
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/llm/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,cAAc,YAAY,CAAA;AAC1B,cAAc,eAAe,CAAA;AAC7B,cAAc,cAAc,CAAA;AAC5B,cAAc,aAAa,CAAA"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { SkillDefinition } from '@owlmeans/llm-common';
|
|
2
|
+
import type { Manifest, ManifestEntry } from '../discover.js';
|
|
3
|
+
/** `@owlmeans/foo` → `foo`; the repo lays packages out under their unscoped name. */
|
|
4
|
+
export declare const unscoped: (packageName: string) => string;
|
|
5
|
+
export declare const parseManifest: (raw: string) => Manifest | null;
|
|
6
|
+
/**
|
|
7
|
+
* Strip the YAML frontmatter and the generated-file banner from an embedded SKILL.md.
|
|
8
|
+
*
|
|
9
|
+
* Both are installer bookkeeping — `name`, `description`, `applyTo`, "do not edit". Sent
|
|
10
|
+
* to a model they are pure noise in the most expensive part of the prompt, and the
|
|
11
|
+
* "do not edit" line actively misleads it about what it is being shown.
|
|
12
|
+
*/
|
|
13
|
+
export declare const stripMeta: (content: string) => string;
|
|
14
|
+
/**
|
|
15
|
+
* Skill entries worth loading, in a deterministic order.
|
|
16
|
+
*
|
|
17
|
+
* Instruction entries appear only in manifests published before schema v2 and are
|
|
18
|
+
* dropped: they are the Copilot twin of the same knowledge, so including both would
|
|
19
|
+
* double the token cost of every package for no added information.
|
|
20
|
+
*/
|
|
21
|
+
export declare const skillEntries: (manifest: Manifest, categories: readonly string[]) => ManifestEntry[];
|
|
22
|
+
/**
|
|
23
|
+
* Turn one embedded skill file into a definition bound to the `Packages` block.
|
|
24
|
+
*
|
|
25
|
+
* The alias is namespaced by package so two packages documenting the same concept cannot
|
|
26
|
+
* collide in the registry, and the order weight is pushed past the default so package
|
|
27
|
+
* knowledge always renders after whatever the host declared itself.
|
|
28
|
+
*/
|
|
29
|
+
export declare const toSkill: (packageName: string, entry: ManifestEntry, body: string) => SkillDefinition;
|
|
30
|
+
//# sourceMappingURL=manifest.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"manifest.d.ts","sourceRoot":"","sources":["../../src/llm/manifest.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAA;AAC3D,OAAO,KAAK,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAA;AAE7D,qFAAqF;AACrF,eAAO,MAAM,QAAQ,GAAI,aAAa,MAAM,KAAG,MACE,CAAA;AAEjD,eAAO,MAAM,aAAa,GAAI,KAAK,MAAM,KAAG,QAAQ,GAAG,IAUtD,CAAA;AAID;;;;;;GAMG;AACH,eAAO,MAAM,SAAS,GAAI,SAAS,MAAM,KAAG,MAW3C,CAAA;AAED;;;;;;GAMG;AACH,eAAO,MAAM,YAAY,GACvB,UAAU,QAAQ,EAClB,YAAY,SAAS,MAAM,EAAE,KAC5B,aAAa,EAGmD,CAAA;AAEnE;;;;;;GAMG;AACH,eAAO,MAAM,OAAO,GAClB,aAAa,MAAM,EACnB,OAAO,aAAa,EACpB,MAAM,MAAM,KACX,eAMD,CAAA"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { DEFAULT_SKILL_ORDER, PromptBlock } from '@owlmeans/llm-common';
|
|
2
|
+
/** `@owlmeans/foo` → `foo`; the repo lays packages out under their unscoped name. */
|
|
3
|
+
export const unscoped = (packageName) => packageName.slice(packageName.indexOf('/') + 1);
|
|
4
|
+
export const parseManifest = (raw) => {
|
|
5
|
+
try {
|
|
6
|
+
const manifest = JSON.parse(raw);
|
|
7
|
+
if (typeof manifest.schemaVersion !== 'number' || !Array.isArray(manifest.entries)) {
|
|
8
|
+
return null;
|
|
9
|
+
}
|
|
10
|
+
return manifest;
|
|
11
|
+
}
|
|
12
|
+
catch {
|
|
13
|
+
return null;
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
const BANNER = /^<!--\s*AUTO-GENERATED[^>]*-->\s*/;
|
|
17
|
+
/**
|
|
18
|
+
* Strip the YAML frontmatter and the generated-file banner from an embedded SKILL.md.
|
|
19
|
+
*
|
|
20
|
+
* Both are installer bookkeeping — `name`, `description`, `applyTo`, "do not edit". Sent
|
|
21
|
+
* to a model they are pure noise in the most expensive part of the prompt, and the
|
|
22
|
+
* "do not edit" line actively misleads it about what it is being shown.
|
|
23
|
+
*/
|
|
24
|
+
export const stripMeta = (content) => {
|
|
25
|
+
let body = content.replace(/^/, '');
|
|
26
|
+
if (body.startsWith('---')) {
|
|
27
|
+
const end = body.indexOf('\n---', 3);
|
|
28
|
+
if (end >= 0) {
|
|
29
|
+
const after = body.indexOf('\n', end + 1);
|
|
30
|
+
body = after >= 0 ? body.slice(after + 1) : '';
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
return body.replace(BANNER, '').trim();
|
|
34
|
+
};
|
|
35
|
+
/**
|
|
36
|
+
* Skill entries worth loading, in a deterministic order.
|
|
37
|
+
*
|
|
38
|
+
* Instruction entries appear only in manifests published before schema v2 and are
|
|
39
|
+
* dropped: they are the Copilot twin of the same knowledge, so including both would
|
|
40
|
+
* double the token cost of every package for no added information.
|
|
41
|
+
*/
|
|
42
|
+
export const skillEntries = (manifest, categories) => manifest.entries
|
|
43
|
+
.filter(entry => entry.kind === 'skill' && categories.includes(entry.category))
|
|
44
|
+
.sort((a, b) => a.name < b.name ? -1 : a.name > b.name ? 1 : 0);
|
|
45
|
+
/**
|
|
46
|
+
* Turn one embedded skill file into a definition bound to the `Packages` block.
|
|
47
|
+
*
|
|
48
|
+
* The alias is namespaced by package so two packages documenting the same concept cannot
|
|
49
|
+
* collide in the registry, and the order weight is pushed past the default so package
|
|
50
|
+
* knowledge always renders after whatever the host declared itself.
|
|
51
|
+
*/
|
|
52
|
+
export const toSkill = (packageName, entry, body) => ({
|
|
53
|
+
alias: `${packageName}#${entry.name}`,
|
|
54
|
+
title: `${packageName} — ${entry.name}`,
|
|
55
|
+
body,
|
|
56
|
+
block: PromptBlock.Packages,
|
|
57
|
+
order: DEFAULT_SKILL_ORDER + 1,
|
|
58
|
+
});
|
|
59
|
+
//# sourceMappingURL=manifest.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"manifest.js","sourceRoot":"","sources":["../../src/llm/manifest.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAA;AAIvE,qFAAqF;AACrF,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,WAAmB,EAAU,EAAE,CACtD,WAAW,CAAC,KAAK,CAAC,WAAW,CAAC,O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AC1B,QAAkB,EAClB,UAA6B,EACZ,EAAE,CACnB,QAAQ,CAAC,OAAO;KACb,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,IAAI,KAAK,OAAO,IAAI,UAAU,CAAC,QAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;KAC9E,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;AAEnE;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,OAAO,GAAG,CACrB,WAAmB,EACnB,KAAoB,EACpB,IAAY,EACK,EAAE,CAAC,CAAC;IACrB,KAAK,EAAE,GAAG,WAAW,IAAI,KAAK,CAAC,IAAI,EAAE;IACrC,KAAK,EAAE,GAAG,WAAW,MAAM,KAAK,CAAC,IAAI,EAAE;IACvC,IAAI;IACJ,KAAK,EAAE,WAAW,CAAC,QAAQ;IAC3B,KAAK,EAAE,mBAAmB,GAAG,CAAC;CAC/B,CAAC,CAAA"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { LlmPromptPlugin } from '@owlmeans/llm';
|
|
2
|
+
import type { PackageSkillsOptions } from './types.js';
|
|
3
|
+
export declare const PACKAGE_SKILLS_PLUGIN = "owlmeans-packages";
|
|
4
|
+
/**
|
|
5
|
+
* A prompt plugin that notices which `@owlmeans/*` packages a request talks about and
|
|
6
|
+
* loads their published skills into the system prompt.
|
|
7
|
+
*
|
|
8
|
+
* Everything the package documents is loaded — there is no relevance filtering, by
|
|
9
|
+
* design: choosing a subset would need a judgement the model is better placed to make
|
|
10
|
+
* than a regex, and a partial answer about an API is worse than none.
|
|
11
|
+
*
|
|
12
|
+
* The result lands in the `Packages` block, which sits behind its own cache breakpoint.
|
|
13
|
+
* That is the whole reason the block exists: what a request mentions changes call to
|
|
14
|
+
* call, and it must not shift a single byte of the role and skills every call shares.
|
|
15
|
+
*/
|
|
16
|
+
export declare const owlmeansPackagesPlugin: (options?: PackageSkillsOptions) => LlmPromptPlugin;
|
|
17
|
+
//# sourceMappingURL=plugin.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../src/llm/plugin.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAiB,MAAM,eAAe,CAAA;AAGnE,OAAO,KAAK,EAAiB,oBAAoB,EAAE,MAAM,YAAY,CAAA;AAErE,eAAO,MAAM,qBAAqB,sBAAsB,CAAA;AAuBxD;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,sBAAsB,GAAI,UAAS,oBAAyB,KAAG,eA0F3E,CAAA"}
|