@vellumai/assistant 0.11.4-dev.202608201321.78202a0 → 0.11.4-dev.202608201416.18031d9
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/package.json
CHANGED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Memory injection indexes CLI help via {@link buildCliCommandHelpContent}.
|
|
3
|
+
* Setup prompts like "Setup <app> for me" should retrieve `plugins search` /
|
|
4
|
+
* `skills search` before the model falls back to web search.
|
|
5
|
+
*
|
|
6
|
+
* These assertions lock the retrieval phrases in the indexed blob so a later
|
|
7
|
+
* wording change cannot silently drop them.
|
|
8
|
+
*/
|
|
9
|
+
import { describe, expect, test } from "bun:test";
|
|
10
|
+
|
|
11
|
+
import { buildCliCommandHelpContent } from "../../plugins/defaults/memory/substrate/cli-command-content.js";
|
|
12
|
+
import { pluginsHelp } from "../commands/plugins.help.js";
|
|
13
|
+
import { skillsHelp } from "../commands/skills.help.js";
|
|
14
|
+
|
|
15
|
+
function searchHelp(
|
|
16
|
+
help: { subcommands?: Array<{ name: string; helpText?: string }> },
|
|
17
|
+
): { name: string; helpText?: string } {
|
|
18
|
+
const search = help.subcommands?.find((sub) => sub.name === "search");
|
|
19
|
+
if (!search) {
|
|
20
|
+
throw new Error("expected a search subcommand");
|
|
21
|
+
}
|
|
22
|
+
return search;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
describe("catalog search help for setup-intent retrieval", () => {
|
|
26
|
+
test("plugins help indexes setup, superpowers, and web-search fallback", () => {
|
|
27
|
+
const indexed = buildCliCommandHelpContent(pluginsHelp);
|
|
28
|
+
const search = searchHelp(pluginsHelp);
|
|
29
|
+
|
|
30
|
+
expect(search.helpText).toBeDefined();
|
|
31
|
+
expect(indexed.toLowerCase()).toContain("superpowers");
|
|
32
|
+
expect(indexed).toContain("Setup <app> for me");
|
|
33
|
+
expect(indexed.toLowerCase()).toContain("before searching the web");
|
|
34
|
+
expect(indexed).toContain("assistant plugins search");
|
|
35
|
+
expect(indexed).toContain("assistant skills search");
|
|
36
|
+
expect(indexed.toLowerCase()).not.toContain("empty query");
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
test("skills help indexes setup as the second stop before web search", () => {
|
|
40
|
+
const indexed = buildCliCommandHelpContent(skillsHelp);
|
|
41
|
+
const search = searchHelp(skillsHelp);
|
|
42
|
+
|
|
43
|
+
expect(search.helpText).toBeDefined();
|
|
44
|
+
expect(indexed).toContain("Second stop after plugin search");
|
|
45
|
+
expect(indexed).toContain("Setup <app> for me");
|
|
46
|
+
expect(indexed.toLowerCase()).toContain("before searching the web");
|
|
47
|
+
expect(indexed).toContain("assistant skills search");
|
|
48
|
+
expect(indexed).toContain("try web search");
|
|
49
|
+
});
|
|
50
|
+
});
|
|
@@ -10,37 +10,12 @@ import {
|
|
|
10
10
|
|
|
11
11
|
export const pluginsHelp: CliCommandHelp = {
|
|
12
12
|
name: "plugins",
|
|
13
|
-
description:
|
|
14
|
-
"List, search, install, and manage external plugins (`list` shows what is installed, `search` queries the marketplace)",
|
|
13
|
+
description: "List, search, install, and manage plugins.",
|
|
15
14
|
helpText: `
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
$ assistant plugins install https://github.com/owner/repo/tree/main/sub/path --name my-plugin
|
|
21
|
-
$ assistant plugins install example --ref my-feature-branch
|
|
22
|
-
$ assistant plugins versions example
|
|
23
|
-
$ assistant plugins versions example --json
|
|
24
|
-
$ assistant plugins install example --pin <sha> --force
|
|
25
|
-
$ assistant plugins list
|
|
26
|
-
$ assistant plugins list --json
|
|
27
|
-
$ assistant plugins list --all
|
|
28
|
-
$ assistant plugins list --all --json
|
|
29
|
-
$ assistant plugins inspect example
|
|
30
|
-
$ assistant plugins inspect example --json
|
|
31
|
-
$ assistant plugins diff example
|
|
32
|
-
$ assistant plugins diff example --json
|
|
33
|
-
$ assistant plugins upgrade example
|
|
34
|
-
$ assistant plugins upgrade example --dry-run
|
|
35
|
-
$ assistant plugins upgrade example --strategy ours
|
|
36
|
-
$ assistant plugins upgrade example --strategy theirs
|
|
37
|
-
$ assistant plugins upgrade example --strategy assistant
|
|
38
|
-
$ assistant plugins search example
|
|
39
|
-
$ assistant plugins search "^example"
|
|
40
|
-
$ assistant plugins search example --json
|
|
41
|
-
$ assistant plugins uninstall example
|
|
42
|
-
$ assistant plugins enable example
|
|
43
|
-
$ assistant plugins disable example`,
|
|
15
|
+
Plugins are superpowers: installable extensions that add skills, tools, integrations,
|
|
16
|
+
and so much more from the Vellum Community. When the user asks to set up,
|
|
17
|
+
install, connect, or integrate a product, service, or app, run
|
|
18
|
+
'assistant plugins search <name>' first before searching the web.`,
|
|
44
19
|
subcommands: [
|
|
45
20
|
{
|
|
46
21
|
name: "install",
|
|
@@ -168,13 +143,31 @@ Examples:
|
|
|
168
143
|
name: "search",
|
|
169
144
|
args: "<query>",
|
|
170
145
|
description:
|
|
171
|
-
"Search the
|
|
146
|
+
"Search the plugin marketplace. Query is a case-insensitive regex against plugin names",
|
|
172
147
|
options: [
|
|
173
148
|
{
|
|
174
149
|
flags: "--json",
|
|
175
150
|
description: "Emit machine-readable JSON instead of a table",
|
|
176
151
|
},
|
|
177
152
|
],
|
|
153
|
+
helpText: `
|
|
154
|
+
When to use:
|
|
155
|
+
First stop when the user asks to set up, install, connect, or integrate a
|
|
156
|
+
product, service, or app (for example "Setup <app> for me",
|
|
157
|
+
"connect this service"). Search here before searching the web.
|
|
158
|
+
|
|
159
|
+
Arguments:
|
|
160
|
+
query Case-insensitive regex matched against plugin names, not the full
|
|
161
|
+
user sentence. Use the product or plugin name. Anchors like
|
|
162
|
+
^example work.
|
|
163
|
+
|
|
164
|
+
If a match is found, install it with 'assistant plugins install <name>'.
|
|
165
|
+
If nothing matches, try 'assistant skills search <query>', then web search.
|
|
166
|
+
|
|
167
|
+
Examples:
|
|
168
|
+
$ assistant plugins search example
|
|
169
|
+
$ assistant plugins search "^example"
|
|
170
|
+
$ assistant plugins search example --json`,
|
|
178
171
|
},
|
|
179
172
|
{
|
|
180
173
|
name: "publish",
|
|
@@ -6,21 +6,8 @@ export const skillsHelp: CliCommandHelp = {
|
|
|
6
6
|
name: "skills",
|
|
7
7
|
description: "Browse and install skills from the Vellum catalog",
|
|
8
8
|
helpText: `
|
|
9
|
-
Manage skills from the Vellum catalog. Skills
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
Examples:
|
|
13
|
-
$ assistant skills list
|
|
14
|
-
$ assistant skills list --json
|
|
15
|
-
$ assistant skills inspect slack
|
|
16
|
-
$ assistant skills inspect resend-setup --json
|
|
17
|
-
$ assistant skills search react
|
|
18
|
-
$ assistant skills search react --limit 5 --json
|
|
19
|
-
$ assistant skills install weather
|
|
20
|
-
$ assistant skills install weather --overwrite
|
|
21
|
-
$ assistant skills uninstall weather
|
|
22
|
-
$ assistant skills add vercel-labs/skills@find-skills
|
|
23
|
-
$ assistant skills add vercel-labs/skills/find-skills --overwrite`,
|
|
9
|
+
Manage skills from the Vellum catalog. Skills are instructions of
|
|
10
|
+
workflows and tools that teach the assistant when dynamically relevant.`,
|
|
24
11
|
subcommands: [
|
|
25
12
|
{
|
|
26
13
|
name: "list",
|
|
@@ -70,15 +57,25 @@ Examples:
|
|
|
70
57
|
{ flags: "--json", description: "Machine-readable JSON output" },
|
|
71
58
|
],
|
|
72
59
|
helpText: `
|
|
60
|
+
When to use:
|
|
61
|
+
Second stop after plugin search when the user asks to set up, install, or
|
|
62
|
+
add a capability (for example "Setup <app> for me", "add a skill for file management").
|
|
63
|
+
Search here before searching the web.
|
|
64
|
+
|
|
73
65
|
Arguments:
|
|
74
66
|
query Free-text search term matched against skill names, descriptions,
|
|
75
|
-
and tags.
|
|
67
|
+
and tags. Use the product or capability name, not the full user
|
|
68
|
+
sentence. Searches the Vellum catalog, the skills.sh community
|
|
76
69
|
registry, and the clawhub registry.
|
|
77
70
|
|
|
78
71
|
Displays results from all sources with clear labels. When a skill ID
|
|
79
72
|
exists in both the Vellum catalog and a community registry, a conflict
|
|
80
73
|
note is shown with guidance on which install command to use.
|
|
81
74
|
|
|
75
|
+
If a catalog match is found, install it with 'assistant skills install <id>'.
|
|
76
|
+
If a community match is found, add it with 'assistant skills add <source>'.
|
|
77
|
+
If nothing matches, try web search.
|
|
78
|
+
|
|
82
79
|
Examples:
|
|
83
80
|
$ assistant skills search react
|
|
84
81
|
$ assistant skills search "file management" --limit 3
|