@vellumai/assistant 0.11.4-dev.202608201321.78202a0 → 0.11.4-dev.202608201513.9b3b830
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,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The app tools that mutate the stored app set, and what each one leaves
|
|
3
|
+
* behind. Mirrors `document-tools.ts`: a single declaration both the daemon and
|
|
4
|
+
* the web client derive their tool sets from, so a new mutating app tool is
|
|
5
|
+
* added here once and every consumer picks it up.
|
|
6
|
+
*
|
|
7
|
+
* Tool names are the ones the runner sees. Calls arriving through the bundled
|
|
8
|
+
* `app-builder` skill reach the daemon already unwrapped to the inner tool
|
|
9
|
+
* name, and the web client unwraps the `skill_execute` envelope itself.
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
export interface AppMutationTool {
|
|
13
|
+
/** The executed tool name. */
|
|
14
|
+
readonly name: string;
|
|
15
|
+
/**
|
|
16
|
+
* Whether the app is still openable once the tool has run. A deleted app has
|
|
17
|
+
* nothing to open, so it cannot anchor a card back to itself.
|
|
18
|
+
*/
|
|
19
|
+
readonly reopenable: boolean;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export const APP_MUTATION_TOOLS: readonly AppMutationTool[] = [
|
|
23
|
+
{ name: "app_create", reopenable: true },
|
|
24
|
+
{ name: "app_update", reopenable: true },
|
|
25
|
+
{ name: "app_delete", reopenable: false },
|
|
26
|
+
];
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* The mutating app tools that leave the app openable. The web transcript
|
|
30
|
+
* anchors its end-of-response app cards on these, so a delete never produces a
|
|
31
|
+
* card pointing at an app that is gone.
|
|
32
|
+
*/
|
|
33
|
+
export const APP_MUTATION_TOOL_NAMES: readonly string[] =
|
|
34
|
+
APP_MUTATION_TOOLS.filter((tool) => tool.reopenable).map((tool) => tool.name);
|
package/src/api/index.ts
CHANGED
|
@@ -135,6 +135,11 @@ import { WorkflowLeafStartedEventSchema } from "./events/workflow-leaf-started.j
|
|
|
135
135
|
import { WorkflowProgressEventSchema } from "./events/workflow-progress.js";
|
|
136
136
|
import { WorkflowStartedEventSchema } from "./events/workflow-started.js";
|
|
137
137
|
|
|
138
|
+
export {
|
|
139
|
+
APP_MUTATION_TOOL_NAMES,
|
|
140
|
+
APP_MUTATION_TOOLS,
|
|
141
|
+
type AppMutationTool,
|
|
142
|
+
} from "./constants/app-tools.js";
|
|
138
143
|
export {
|
|
139
144
|
CALL_SITE_COMPACTION_AGENT,
|
|
140
145
|
CALL_SITE_SYNTHETIC_AGENT_ERROR_MESSAGE,
|
|
@@ -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
|