assistant-ui 0.0.81 → 0.0.83
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 +1 -1
- package/bin/assistant-ui.js +2 -0
- package/dist/commands/agent.d.ts +3 -0
- package/dist/commands/agent.d.ts.map +1 -0
- package/dist/commands/agent.js +34 -0
- package/dist/commands/agent.js.map +1 -0
- package/dist/commands/create.d.ts +13 -45
- package/dist/commands/create.d.ts.map +1 -1
- package/dist/commands/create.js +389 -101
- package/dist/commands/create.js.map +1 -1
- package/dist/commands/init.js +1 -1
- package/dist/commands/init.js.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/lib/create-project.d.ts +12 -0
- package/dist/lib/create-project.d.ts.map +1 -0
- package/dist/lib/create-project.js +273 -0
- package/dist/lib/create-project.js.map +1 -0
- package/package.json +8 -4
- package/plugin/.claude-plugin/plugin.json +8 -0
- package/plugin/skills/assistant-ui/SKILL.md +167 -0
- package/src/commands/agent.ts +36 -0
- package/src/commands/create.ts +452 -129
- package/src/commands/init.ts +2 -2
- package/src/index.ts +2 -0
- package/src/lib/create-project.ts +367 -0
- package/dist/lib/create-from-example.d.ts +0 -9
- package/dist/lib/create-from-example.d.ts.map +0 -1
- package/dist/lib/create-from-example.js +0 -325
- package/dist/lib/create-from-example.js.map +0 -1
- package/src/lib/create-from-example.ts +0 -426
package/README.md
CHANGED
|
@@ -20,7 +20,7 @@ Passing `--preset` to `init` also forwards to `create` for compatibility.
|
|
|
20
20
|
|
|
21
21
|
Use the `create` command to scaffold a new Next.js project with assistant-ui.
|
|
22
22
|
|
|
23
|
-
The `create` command
|
|
23
|
+
The `create` command scaffolds a project from assistant-ui starter templates or examples.
|
|
24
24
|
|
|
25
25
|
```bash
|
|
26
26
|
npx assistant-ui@latest create my-app
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agent.d.ts","sourceRoot":"","sources":["../../src/commands/agent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAqBpC,eAAO,MAAM,KAAK,SAcd,CAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { Command } from "commander";
|
|
2
|
+
import { resolve, dirname } from "node:path";
|
|
3
|
+
import { existsSync } from "node:fs";
|
|
4
|
+
import { fileURLToPath } from "node:url";
|
|
5
|
+
import { launch } from "@assistant-ui/agent-launcher";
|
|
6
|
+
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
7
|
+
function getPluginPath() {
|
|
8
|
+
// In dist/, plugin is at ../../plugin relative to dist/commands/agent.js
|
|
9
|
+
// In dev (src/), plugin is at ../../plugin relative to src/commands/
|
|
10
|
+
const candidates = [
|
|
11
|
+
resolve(__dirname, "..", "..", "plugin"),
|
|
12
|
+
resolve(__dirname, "..", "plugin"),
|
|
13
|
+
];
|
|
14
|
+
for (const candidate of candidates) {
|
|
15
|
+
if (existsSync(candidate))
|
|
16
|
+
return candidate;
|
|
17
|
+
}
|
|
18
|
+
return candidates[0];
|
|
19
|
+
}
|
|
20
|
+
export const agent = new Command()
|
|
21
|
+
.name("agent")
|
|
22
|
+
.description("launch Claude Code with assistant-ui skills")
|
|
23
|
+
.argument("<prompt...>", "prompt for the agent")
|
|
24
|
+
.option("--dry", "print the command instead of running it")
|
|
25
|
+
.action((promptParts, opts) => {
|
|
26
|
+
const prompt = promptParts.join(" ");
|
|
27
|
+
launch({
|
|
28
|
+
pluginDir: getPluginPath(),
|
|
29
|
+
skillName: "assistant-ui",
|
|
30
|
+
prompt,
|
|
31
|
+
dry: opts.dry,
|
|
32
|
+
});
|
|
33
|
+
});
|
|
34
|
+
//# sourceMappingURL=agent.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agent.js","sourceRoot":"","sources":["../../src/commands/agent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAA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import * as p from "@clack/prompts";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
};
|
|
14
|
-
readonly cloud: {
|
|
15
|
-
readonly url: "https://github.com/assistant-ui/assistant-ui-starter-cloud";
|
|
16
|
-
readonly label: "Cloud";
|
|
17
|
-
readonly hint: "Cloud-backed persistence starter";
|
|
18
|
-
};
|
|
19
|
-
readonly "cloud-clerk": {
|
|
20
|
-
readonly url: "https://github.com/assistant-ui/assistant-ui-starter-cloud-clerk";
|
|
21
|
-
readonly label: "Cloud + Clerk";
|
|
22
|
-
readonly hint: "Cloud-backed starter with Clerk auth";
|
|
23
|
-
};
|
|
24
|
-
readonly langgraph: {
|
|
25
|
-
readonly url: "https://github.com/assistant-ui/assistant-ui-starter-langgraph";
|
|
26
|
-
readonly label: "LangGraph";
|
|
27
|
-
readonly hint: "LangGraph starter template";
|
|
28
|
-
};
|
|
29
|
-
readonly mcp: {
|
|
30
|
-
readonly url: "https://github.com/assistant-ui/assistant-ui-starter-mcp";
|
|
31
|
-
readonly label: "MCP";
|
|
32
|
-
readonly hint: "MCP starter template";
|
|
33
|
-
};
|
|
34
|
-
};
|
|
35
|
-
type TemplateName = keyof typeof templates;
|
|
36
|
-
export declare function resolveCreateTemplateName(params: {
|
|
3
|
+
export interface ProjectMetadata {
|
|
4
|
+
name: string;
|
|
5
|
+
label: string;
|
|
6
|
+
description?: string;
|
|
7
|
+
category: "template" | "example";
|
|
8
|
+
path: string;
|
|
9
|
+
hasLocalComponents: boolean;
|
|
10
|
+
}
|
|
11
|
+
export declare const PROJECT_METADATA: ProjectMetadata[];
|
|
12
|
+
export declare function resolveProject(params: {
|
|
37
13
|
template?: string;
|
|
14
|
+
example?: string;
|
|
38
15
|
stdinIsTTY?: boolean;
|
|
39
16
|
select?: typeof p.select;
|
|
40
17
|
isCancel?: typeof p.isCancel;
|
|
41
|
-
}): Promise<
|
|
42
|
-
export declare function buildCreateNextAppArgs(params: {
|
|
43
|
-
projectDirectory?: string;
|
|
44
|
-
useNpm?: boolean;
|
|
45
|
-
usePnpm?: boolean;
|
|
46
|
-
useYarn?: boolean;
|
|
47
|
-
useBun?: boolean;
|
|
48
|
-
skipInstall?: boolean;
|
|
49
|
-
templateUrl: string;
|
|
50
|
-
}): string[];
|
|
18
|
+
}): Promise<ProjectMetadata | null>;
|
|
51
19
|
export declare function resolveCreateProjectDirectory(params: {
|
|
52
20
|
projectDirectory?: string;
|
|
53
21
|
stdinIsTTY?: boolean;
|
|
54
22
|
}): string | undefined;
|
|
23
|
+
export declare function resolvePresetUrl(preset: string): string;
|
|
55
24
|
export declare const create: Command;
|
|
56
|
-
export {};
|
|
57
25
|
//# sourceMappingURL=create.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create.d.ts","sourceRoot":"","sources":["../../src/commands/create.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"create.d.ts","sourceRoot":"","sources":["../../src/commands/create.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAKpC,OAAO,KAAK,CAAC,MAAM,gBAAgB,CAAC;AAWpC,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,UAAU,GAAG,SAAS,CAAC;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,kBAAkB,EAAE,OAAO,CAAC;CAC7B;AAED,eAAO,MAAM,gBAAgB,EAAE,eAAe,EA2L7C,CAAC;AAmBF,wBAAsB,cAAc,CAAC,MAAM,EAAE;IAC3C,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,MAAM,CAAC,EAAE,OAAO,CAAC,CAAC,MAAM,CAAC;IACzB,QAAQ,CAAC,EAAE,OAAO,CAAC,CAAC,QAAQ,CAAC;CAC9B,GAAG,OAAO,CAAC,eAAe,GAAG,IAAI,CAAC,CAyElC;AAiCD,wBAAgB,6BAA6B,CAAC,MAAM,EAAE;IACpD,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB,GAAG,MAAM,GAAG,SAAS,CAMrB;AAkBD,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAKvD;AAED,eAAO,MAAM,MAAM,SAgOf,CAAC"}
|