assistant-ui 0.0.116 → 0.0.117

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.
Files changed (66) hide show
  1. package/dist/codemods/utils/createTransformer.d.ts +3 -4
  2. package/dist/codemods/utils/createTransformer.d.ts.map +1 -1
  3. package/dist/commands/add.d.ts +3 -4
  4. package/dist/commands/add.d.ts.map +1 -1
  5. package/dist/commands/agent.d.ts +1 -2
  6. package/dist/commands/agent.d.ts.map +1 -1
  7. package/dist/commands/create.d.ts +10 -11
  8. package/dist/commands/create.d.ts.map +1 -1
  9. package/dist/commands/create.js +21 -11
  10. package/dist/commands/create.js.map +1 -1
  11. package/dist/commands/doctor.d.ts +9 -10
  12. package/dist/commands/doctor.d.ts.map +1 -1
  13. package/dist/commands/info.d.ts +3 -3
  14. package/dist/commands/info.d.ts.map +1 -1
  15. package/dist/commands/init.d.ts +3 -4
  16. package/dist/commands/init.d.ts.map +1 -1
  17. package/dist/commands/init.js +1 -2
  18. package/dist/commands/init.js.map +1 -1
  19. package/dist/commands/mcp.d.ts +1 -2
  20. package/dist/commands/mcp.d.ts.map +1 -1
  21. package/dist/commands/update.d.ts +1 -2
  22. package/dist/commands/update.d.ts.map +1 -1
  23. package/dist/commands/upgrade.d.ts +3 -4
  24. package/dist/commands/upgrade.d.ts.map +1 -1
  25. package/dist/lib/agent-skill.d.ts +3 -4
  26. package/dist/lib/agent-skill.d.ts.map +1 -1
  27. package/dist/lib/create-project.d.ts +11 -12
  28. package/dist/lib/create-project.d.ts.map +1 -1
  29. package/dist/lib/handle-cli-error.d.ts +1 -2
  30. package/dist/lib/handle-cli-error.d.ts.map +1 -1
  31. package/dist/lib/install-ai-sdk-lib.d.ts +1 -2
  32. package/dist/lib/install-ai-sdk-lib.d.ts.map +1 -1
  33. package/dist/lib/install-edge-lib.d.ts +1 -2
  34. package/dist/lib/install-edge-lib.d.ts.map +1 -1
  35. package/dist/lib/run-spawn.d.ts +6 -7
  36. package/dist/lib/run-spawn.d.ts.map +1 -1
  37. package/dist/lib/transform-options.d.ts +1 -2
  38. package/dist/lib/transform-options.d.ts.map +1 -1
  39. package/dist/lib/transform.d.ts +4 -5
  40. package/dist/lib/transform.d.ts.map +1 -1
  41. package/dist/lib/upgrade.d.ts +1 -2
  42. package/dist/lib/upgrade.d.ts.map +1 -1
  43. package/dist/lib/utils/config.d.ts +4 -5
  44. package/dist/lib/utils/config.d.ts.map +1 -1
  45. package/dist/lib/utils/file-scanner.d.ts +4 -5
  46. package/dist/lib/utils/file-scanner.d.ts.map +1 -1
  47. package/dist/lib/utils/logger.d.ts +1 -2
  48. package/dist/lib/utils/logger.d.ts.map +1 -1
  49. package/dist/lib/utils/package-installer.d.ts +2 -3
  50. package/dist/lib/utils/package-installer.d.ts.map +1 -1
  51. package/dist/lib/utils/package-json.d.ts +1 -2
  52. package/dist/lib/utils/package-json.d.ts.map +1 -1
  53. package/dist/lib/utils/package-manager.d.ts +7 -8
  54. package/dist/lib/utils/package-manager.d.ts.map +1 -1
  55. package/dist/lib/utils/registry.d.ts +5 -6
  56. package/dist/lib/utils/registry.d.ts.map +1 -1
  57. package/dist/lib/utils/workspace.d.ts +2 -3
  58. package/dist/lib/utils/workspace.d.ts.map +1 -1
  59. package/dist/program.d.ts +1 -2
  60. package/dist/program.d.ts.map +1 -1
  61. package/dist/run.d.ts +1 -2
  62. package/dist/run.d.ts.map +1 -1
  63. package/package.json +8 -7
  64. package/plugin/skills/assistant-ui/SKILL.md +3 -3
  65. package/src/commands/create.ts +29 -5
  66. package/src/commands/init.ts +1 -2
@@ -1,34 +1,34 @@
1
1
  import { PackageManagerName } from "./utils/package-manager.js";
2
2
  //#region src/lib/create-project.d.ts
3
- declare function dlxCommand(pm: PackageManagerName): [string, string[]];
4
- interface TransformOptions {
3
+ export declare function dlxCommand(pm: PackageManagerName): [string, string[]];
4
+ export interface TransformOptions {
5
5
  hasLocalComponents: boolean;
6
6
  skipInstall?: boolean;
7
7
  packageManager: PackageManagerName;
8
8
  }
9
- type ProjectSource = {
9
+ export type ProjectSource = {
10
10
  kind: "github";
11
11
  ref: string | undefined;
12
12
  } | {
13
13
  kind: "local";
14
14
  rootDir: string;
15
15
  };
16
- declare function resolvePackageManager(opts: {
16
+ export declare function resolvePackageManager(opts: {
17
17
  useNpm?: boolean;
18
18
  usePnpm?: boolean;
19
19
  useYarn?: boolean;
20
20
  useBun?: boolean;
21
21
  }): PackageManagerName | undefined;
22
- declare function resolveLatestReleaseRef(): Promise<string | undefined>;
23
- declare function downloadProject(repoPath: string, destDir: string, ref?: string): Promise<void>;
24
- declare function scaffoldProject(repoPath: string, destDir: string, source: ProjectSource): Promise<void>;
25
- interface TransformResult {
22
+ export declare function resolveLatestReleaseRef(): Promise<string | undefined>;
23
+ export declare function downloadProject(repoPath: string, destDir: string, ref?: string): Promise<void>;
24
+ export declare function scaffoldProject(repoPath: string, destDir: string, source: ProjectSource): Promise<void>;
25
+ export interface TransformResult {
26
26
  registryInstallFailure?: {
27
27
  retryCommand: string;
28
28
  };
29
29
  registryInstallCommand?: string;
30
30
  }
31
- declare function transformProject(projectDir: string, opts: TransformOptions): Promise<TransformResult>;
31
+ export declare function transformProject(projectDir: string, opts: TransformOptions): Promise<TransformResult>;
32
32
  interface RequiredComponents {
33
33
  assistantUI: string[];
34
34
  shadcnUI: string[];
@@ -41,8 +41,7 @@ interface RequiredComponents {
41
41
  * specifier against the files the registry actually installed and rewrite it
42
42
  * only when the legacy path is absent and the elements layout has it.
43
43
  */
44
- declare function reconcileAssistantUIImportLayout(projectDir: string): Promise<void>;
45
- declare function scanRequiredComponents(projectDir: string): RequiredComponents;
44
+ export declare function reconcileAssistantUIImportLayout(projectDir: string): Promise<void>;
45
+ export declare function scanRequiredComponents(projectDir: string): RequiredComponents;
46
46
  //#endregion
47
- export { ProjectSource, TransformOptions, TransformResult, dlxCommand, downloadProject, reconcileAssistantUIImportLayout, resolveLatestReleaseRef, resolvePackageManager, scaffoldProject, scanRequiredComponents, transformProject };
48
47
  //# sourceMappingURL=create-project.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"create-project.d.ts","names":[],"sources":["../../src/lib/create-project.ts"],"mappings":";;iBAiBgB,WAAW,IAAI;UAad;EACf;EACA;EACA,gBAAgB;;KAGN;EAEN;EACA;;EAGA;EACA;;iBAcU,sBAAsB;EACpC;EACA;EACA;EACA;IACE;iBAmBkB,2BAA2B;iBAmB3B,gBACpB,kBACA,iBACA,eACC;iBAuDmB,gBACpB,kBACA,iBACA,QAAQ,gBACP;UA2Bc;EACf;IAA2B;;EAC3B;;iBAGoB,iBACpB,oBACA,MAAM,mBACL,QAAQ;UAiMD;EACR;EACA;;;;;;;;;;iBAqDoB,iCACpB,qBACC;iBAgHa,uBAAuB,qBAAqB"}
1
+ {"version":3,"file":"create-project.d.ts","names":[],"sources":["../../src/lib/create-project.ts"],"mappings":";;wBAiBgB,WAAW,IAAI;iBAad;EACf;EACA;EACA,gBAAgB;;YAGN;EAEN;EACA;;EAGA;EACA;;wBAcU,sBAAsB;EACpC;EACA;EACA;EACA;IACE;wBAmBkB,2BAA2B;wBAmB3B,gBACpB,kBACA,iBACA,eACC;wBAuDmB,gBACpB,kBACA,iBACA,QAAQ,gBACP;iBA2Bc;EACf;IAA2B;;EAC3B;;wBAGoB,iBACpB,oBACA,MAAM,mBACL,QAAQ;UAiMD;EACR;EACA;;;;;;;;;;wBAqDoB,iCACpB,qBACC;wBAgHa,uBAAuB,qBAAqB"}
@@ -1,5 +1,4 @@
1
1
  //#region src/lib/handle-cli-error.d.ts
2
- declare function handleCliError(error: unknown): void;
2
+ export declare function handleCliError(error: unknown): void;
3
3
  //#endregion
4
- export { handleCliError };
5
4
  //# sourceMappingURL=handle-cli-error.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"handle-cli-error.d.ts","names":[],"sources":["../../src/lib/handle-cli-error.ts"],"mappings":";iBAGgB,eAAe"}
1
+ {"version":3,"file":"handle-cli-error.d.ts","names":[],"sources":["../../src/lib/handle-cli-error.ts"],"mappings":";wBAGgB,eAAe"}
@@ -1,5 +1,4 @@
1
1
  //#region src/lib/install-ai-sdk-lib.d.ts
2
- declare function installAiSdkLib(): Promise<void>;
2
+ export default function installAiSdkLib(): Promise<void>;
3
3
  //#endregion
4
- export { installAiSdkLib as default };
5
4
  //# sourceMappingURL=install-ai-sdk-lib.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"install-ai-sdk-lib.d.ts","names":[],"sources":["../../src/lib/install-ai-sdk-lib.ts"],"mappings":";iBAE8B,mBAAmB"}
1
+ {"version":3,"file":"install-ai-sdk-lib.d.ts","names":[],"sources":["../../src/lib/install-ai-sdk-lib.ts"],"mappings":";wBAE8B,mBAAmB"}
@@ -1,5 +1,4 @@
1
1
  //#region src/lib/install-edge-lib.d.ts
2
- declare function installEdgeLib(): Promise<void>;
2
+ export default function installEdgeLib(): Promise<void>;
3
3
  //#endregion
4
- export { installEdgeLib as default };
5
4
  //# sourceMappingURL=install-edge-lib.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"install-edge-lib.d.ts","names":[],"sources":["../../src/lib/install-edge-lib.ts"],"mappings":";iBAE8B,kBAAkB"}
1
+ {"version":3,"file":"install-edge-lib.d.ts","names":[],"sources":["../../src/lib/install-edge-lib.ts"],"mappings":";wBAE8B,kBAAkB"}
@@ -1,23 +1,22 @@
1
1
  //#region src/lib/run-spawn.d.ts
2
- declare class SpawnExitError extends Error {
2
+ export declare class SpawnExitError extends Error {
3
3
  code: number;
4
4
  stderr: string;
5
5
  constructor(code: number, stderr?: string);
6
6
  }
7
- declare class SpawnSignalError extends Error {
7
+ export declare class SpawnSignalError extends Error {
8
8
  signal: NodeJS.Signals;
9
9
  forwarded: boolean;
10
10
  constructor(signal: NodeJS.Signals, forwarded: boolean);
11
11
  }
12
- interface SpawnResult {
12
+ export interface SpawnResult {
13
13
  code: number | null;
14
14
  signal: NodeJS.Signals | null;
15
15
  stdout: string;
16
16
  stderr: string;
17
17
  }
18
- declare const hasActiveSpawn: () => boolean;
19
- declare function runSpawn(command: string, args: string[], cwd?: string): Promise<void>;
20
- declare function runSpawnCapture(command: string, args: string[], cwd?: string): Promise<SpawnResult>;
18
+ export declare const hasActiveSpawn: () => boolean;
19
+ export declare function runSpawn(command: string, args: string[], cwd?: string): Promise<void>;
20
+ export declare function runSpawnCapture(command: string, args: string[], cwd?: string): Promise<SpawnResult>;
21
21
  //#endregion
22
- export { SpawnExitError, SpawnResult, SpawnSignalError, hasActiveSpawn, runSpawn, runSpawnCapture };
23
22
  //# sourceMappingURL=run-spawn.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"run-spawn.d.ts","names":[],"sources":["../../src/lib/run-spawn.ts"],"mappings":";cAEa,uBAAuB;EAClC;EACA;EAEY,YAAA,cAAc;;cAWf,yBAAyB;EACpC,QAAQ,OAAO;EACf;EAEY,YAAA,QAAQ,OAAO,SAAS;;UAOrB;EACf;EACA,QAAQ,OAAO;EACf;EACA;;cAOW;iBAiFG,SACd,iBACA,gBACA,eACC;iBAWa,gBACd,iBACA,gBACA,eACC,QAAQ"}
1
+ {"version":3,"file":"run-spawn.d.ts","names":[],"sources":["../../src/lib/run-spawn.ts"],"mappings":";qBAEa,uBAAuB;EAClC;EACA;EAEY,YAAA,cAAc;;qBAWf,yBAAyB;EACpC,QAAQ,OAAO;EACf;EAEY,YAAA,QAAQ,OAAO,SAAS;;iBAOrB;EACf;EACA,QAAQ,OAAO;EACf;EACA;;qBAOW;wBAiFG,SACd,iBACA,gBACA,eACC;wBAWa,gBACd,iBACA,gBACA,eACC,QAAQ"}
@@ -1,10 +1,9 @@
1
1
  //#region src/lib/transform-options.d.ts
2
- interface TransformOptions {
2
+ export interface TransformOptions {
3
3
  dry?: boolean;
4
4
  print?: boolean;
5
5
  verbose?: boolean;
6
6
  jscodeshift?: string;
7
7
  }
8
8
  //#endregion
9
- export { TransformOptions };
10
9
  //# sourceMappingURL=transform-options.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"transform-options.d.ts","names":[],"sources":["../../src/lib/transform-options.ts"],"mappings":";UAAiB;EACf;EACA;EACA;EACA"}
1
+ {"version":3,"file":"transform-options.d.ts","names":[],"sources":["../../src/lib/transform-options.ts"],"mappings":";iBAAiB;EACf;EACA;EACA;EACA"}
@@ -4,21 +4,20 @@ import { TransformOptions } from "./transform-options.js";
4
4
  * Gets the list of files that need to be processed in the codebase
5
5
  * Only includes files that contain "assistant-ui" to optimize performance
6
6
  */
7
- declare function getRelevantFiles(cwd: string): string[];
7
+ export declare function getRelevantFiles(cwd: string): string[];
8
8
  /**
9
9
  * Counts the number of files that need to be processed
10
10
  */
11
- declare function countFilesToProcess(cwd: string): number;
12
- type TransformErrors = {
11
+ export declare function countFilesToProcess(cwd: string): number;
12
+ export type TransformErrors = {
13
13
  transform: string;
14
14
  filename: string;
15
15
  summary: string;
16
16
  }[];
17
- declare function transform(codemod: string, source: string, transformOptions: TransformOptions, options?: {
17
+ export declare function transform(codemod: string, source: string, transformOptions: TransformOptions, options?: {
18
18
  logStatus: boolean;
19
19
  onProgress?: (processedFiles: number) => void;
20
20
  relevantFiles?: string[];
21
21
  }): Promise<TransformErrors>;
22
22
  //#endregion
23
- export { TransformErrors, countFilesToProcess, getRelevantFiles, transform };
24
23
  //# sourceMappingURL=transform.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"transform.d.ts","names":[],"sources":["../../src/lib/transform.ts"],"mappings":";;;;;;iBAkBgB,iBAAiB;;;;iBA6BjB,oBAAoB;KAsCxB;EACV;EACA;EACA;;iBAoBoB,UACpB,iBACA,gBACA,kBAAkB,kBAClB;EACE;EACA,cAAc;EACd;IAED,QAAQ"}
1
+ {"version":3,"file":"transform.d.ts","names":[],"sources":["../../src/lib/transform.ts"],"mappings":";;;;;;wBAkBgB,iBAAiB;;;;wBA6BjB,oBAAoB;YAsCxB;EACV;EACA;EACA;;wBAoBoB,UACpB,iBACA,gBACA,kBAAkB,kBAClB;EACE;EACA,cAAc;EACd;IAED,QAAQ"}
@@ -6,7 +6,6 @@ import { TransformOptions } from "./transform-options.js";
6
6
  * - Displays progress using cli-progress.
7
7
  * - After codemods run, checks if any file now imports from the new packages and prompts for install.
8
8
  */
9
- declare function upgrade(options: TransformOptions): Promise<void>;
9
+ export declare function upgrade(options: TransformOptions): Promise<void>;
10
10
  //#endregion
11
- export { upgrade };
12
11
  //# sourceMappingURL=upgrade.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"upgrade.d.ts","names":[],"sources":["../../src/lib/upgrade.ts"],"mappings":";;;;;;;;iBA0BsB,QAAQ,SAAS,mBAAgB"}
1
+ {"version":3,"file":"upgrade.d.ts","names":[],"sources":["../../src/lib/upgrade.ts"],"mappings":";;;;;;;;wBA0BsB,QAAQ,SAAS,mBAAgB"}
@@ -1,5 +1,5 @@
1
1
  //#region src/lib/utils/config.d.ts
2
- interface AssistantUIConfig {
2
+ export interface AssistantUIConfig {
3
3
  $schema?: string;
4
4
  style?: string;
5
5
  tailwind?: {
@@ -15,9 +15,8 @@ interface AssistantUIConfig {
15
15
  lib?: string;
16
16
  };
17
17
  }
18
- declare function getConfig(cwd?: string): AssistantUIConfig | null;
19
- declare function saveConfig(config: AssistantUIConfig, cwd?: string): void;
20
- declare function hasConfig(cwd?: string): boolean;
18
+ export declare function getConfig(cwd?: string): AssistantUIConfig | null;
19
+ export declare function saveConfig(config: AssistantUIConfig, cwd?: string): void;
20
+ export declare function hasConfig(cwd?: string): boolean;
21
21
  //#endregion
22
- export { AssistantUIConfig, getConfig, hasConfig, saveConfig };
23
22
  //# sourceMappingURL=config.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"config.d.ts","names":[],"sources":["../../../src/lib/utils/config.ts"],"mappings":";UAIiB;EACf;EACA;EACA;IACE;IACA;IACA;IACA;;EAEF;IACE;IACA;IACA;IACA;;;iBASY,UACd,eACC;iBAmBa,WACd,QAAQ,mBACR;iBAMc,UAAU"}
1
+ {"version":3,"file":"config.d.ts","names":[],"sources":["../../../src/lib/utils/config.ts"],"mappings":";iBAIiB;EACf;EACA;EACA;IACE;IACA;IACA;IACA;;EAEF;IACE;IACA;IACA;IACA;;;wBASY,UACd,eACC;wBAmBa,WACd,QAAQ,mBACR;wBAMc,UAAU"}
@@ -1,10 +1,10 @@
1
1
  //#region src/lib/utils/file-scanner.d.ts
2
- interface ScanOptions {
2
+ export interface ScanOptions {
3
3
  cwd?: string;
4
4
  pattern?: string;
5
5
  ignore?: string[];
6
6
  }
7
- declare function readProjectFiles(pattern: string, options: {
7
+ export declare function readProjectFiles(pattern: string, options: {
8
8
  cwd: string;
9
9
  ignore?: string[];
10
10
  }): Generator<{
@@ -12,8 +12,7 @@ declare function readProjectFiles(pattern: string, options: {
12
12
  fullPath: string;
13
13
  content: string;
14
14
  }>;
15
- declare function scanForImport(importPattern: string | string[], options?: ScanOptions): boolean;
16
- declare function getFilesContaining(searchString: string, options?: ScanOptions): string[];
15
+ export declare function scanForImport(importPattern: string | string[], options?: ScanOptions): boolean;
16
+ export declare function getFilesContaining(searchString: string, options?: ScanOptions): string[];
17
17
  //#endregion
18
- export { ScanOptions, getFilesContaining, readProjectFiles, scanForImport };
19
18
  //# sourceMappingURL=file-scanner.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"file-scanner.d.ts","names":[],"sources":["../../../src/lib/utils/file-scanner.ts"],"mappings":";UAIiB;EACf;EACA;EACA;;iBAGe,iBACf,iBACA;EAAW;EAAa;IACvB;EAAY;EAAc;EAAkB;;iBAc/B,cACd,kCACA,UAAS;iBAuBK,mBACd,sBACA,UAAS"}
1
+ {"version":3,"file":"file-scanner.d.ts","names":[],"sources":["../../../src/lib/utils/file-scanner.ts"],"mappings":";iBAIiB;EACf;EACA;EACA;;wBAGe,iBACf,iBACA;EAAW;EAAa;IACvB;EAAY;EAAc;EAAkB;;wBAc/B,cACd,kCACA,UAAS;wBAuBK,mBACd,sBACA,UAAS"}
@@ -1,5 +1,5 @@
1
1
  //#region src/lib/utils/logger.d.ts
2
- declare const logger: {
2
+ export declare const logger: {
3
3
  info: (message: string) => void;
4
4
  success: (message: string) => void;
5
5
  error: (message: string) => void;
@@ -8,5 +8,4 @@ declare const logger: {
8
8
  break: () => void;
9
9
  };
10
10
  //#endregion
11
- export { logger };
12
11
  //# sourceMappingURL=logger.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"logger.d.ts","names":[],"sources":["../../../src/lib/utils/logger.ts"],"mappings":";cAEa;EACK,OAAA;EAGG,UAAA;EAGF,QAAA;EAGD,OAAA;EAGA,OAAA"}
1
+ {"version":3,"file":"logger.d.ts","names":[],"sources":["../../../src/lib/utils/logger.ts"],"mappings":";qBAEa;EACK,OAAA;EAGG,UAAA;EAGF,QAAA;EAGD,OAAA;EAGA,OAAA"}
@@ -1,12 +1,11 @@
1
1
  //#region src/lib/utils/package-installer.d.ts
2
- interface PackageInstallConfig {
2
+ export interface PackageInstallConfig {
3
3
  packageName: string;
4
4
  importPatterns: string[];
5
5
  promptMessage: string;
6
6
  skipMessage: string;
7
7
  notFoundMessage: string;
8
8
  }
9
- declare function installPackageIfNeeded(config: PackageInstallConfig): Promise<void>;
9
+ export declare function installPackageIfNeeded(config: PackageInstallConfig): Promise<void>;
10
10
  //#endregion
11
- export { PackageInstallConfig, installPackageIfNeeded };
12
11
  //# sourceMappingURL=package-installer.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"package-installer.d.ts","names":[],"sources":["../../../src/lib/utils/package-installer.ts"],"mappings":";UAQiB;EACf;EACA;EACA;EACA;EACA;;iBAGoB,uBACpB,QAAQ,uBACP"}
1
+ {"version":3,"file":"package-installer.d.ts","names":[],"sources":["../../../src/lib/utils/package-installer.ts"],"mappings":";iBAQiB;EACf;EACA;EACA;EACA;EACA;;wBAGoB,uBACpB,QAAQ,uBACP"}
@@ -1,5 +1,4 @@
1
1
  //#region src/lib/utils/package-json.d.ts
2
- declare function logPackageJsonParseError(packageJsonPath: string, commandName: string): void;
2
+ export declare function logPackageJsonParseError(packageJsonPath: string, commandName: string): void;
3
3
  //#endregion
4
- export { logPackageJsonParseError };
5
4
  //# sourceMappingURL=package-json.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"package-json.d.ts","names":[],"sources":["../../../src/lib/utils/package-json.ts"],"mappings":";iBAEgB,yBACd,yBACA"}
1
+ {"version":3,"file":"package-json.d.ts","names":[],"sources":["../../../src/lib/utils/package-json.ts"],"mappings":";wBAEgB,yBACd,yBACA"}
@@ -1,14 +1,13 @@
1
1
  //#region src/lib/utils/package-manager.d.ts
2
- type PackageManagerName = "npm" | "pnpm" | "yarn" | "bun";
3
- declare function askQuestion(query: string): Promise<string>;
4
- declare function isPackageInstalled(pkg: string, cwd?: string): boolean;
5
- interface InstallCommand {
2
+ export type PackageManagerName = "npm" | "pnpm" | "yarn" | "bun";
3
+ export declare function askQuestion(query: string): Promise<string>;
4
+ export declare function isPackageInstalled(pkg: string, cwd?: string): boolean;
5
+ export interface InstallCommand {
6
6
  command: string;
7
7
  args: string[];
8
8
  }
9
- declare function getInstallCommand(packageName: string | string[], cwd?: string): Promise<InstallCommand>;
10
- declare function resolvePackageManagerForCwd(cwd: string, packageManager?: PackageManagerName): Promise<PackageManagerName>;
11
- declare function installPackage(packageName: string, cwd?: string): Promise<boolean>;
9
+ export declare function getInstallCommand(packageName: string | string[], cwd?: string): Promise<InstallCommand>;
10
+ export declare function resolvePackageManagerForCwd(cwd: string, packageManager?: PackageManagerName): Promise<PackageManagerName>;
11
+ export declare function installPackage(packageName: string, cwd?: string): Promise<boolean>;
12
12
  //#endregion
13
- export { InstallCommand, PackageManagerName, askQuestion, getInstallCommand, installPackage, isPackageInstalled, resolvePackageManagerForCwd };
14
13
  //# sourceMappingURL=package-manager.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"package-manager.d.ts","names":[],"sources":["../../../src/lib/utils/package-manager.ts"],"mappings":";KAOY;iBAEI,YAAY,gBAAgB;iBAa5B,mBACd,aACA;UAmBe;EACf;EACA;;iBAGoB,kBACpB,gCACA,eACC,QAAQ;iBAyBW,4BACpB,aACA,iBAAiB,qBAChB,QAAQ;iBAWW,eACpB,qBACA,eACC"}
1
+ {"version":3,"file":"package-manager.d.ts","names":[],"sources":["../../../src/lib/utils/package-manager.ts"],"mappings":";YAOY;wBAEI,YAAY,gBAAgB;wBAa5B,mBACd,aACA;iBAmBe;EACf;EACA;;wBAGoB,kBACpB,gCACA,eACC,QAAQ;wBAyBW,4BACpB,aACA,iBAAiB,qBAChB,QAAQ;wBAWW,eACpB,qBACA,eACC"}
@@ -1,9 +1,8 @@
1
1
  //#region src/lib/utils/registry.d.ts
2
- declare const SHARED_REGISTRY_ITEMS: Set<string>;
3
- declare function detectRegistryPlatform(cwd: string): "web" | "native";
4
- declare function getComponentsJsonStyle(cwd: string): string | undefined;
5
- declare function resolveQuickStartRegistryUrl(style?: string): string;
6
- declare function resolveRegistryItemUrl(component: string, style?: string, platform?: "web" | "native"): string;
2
+ export declare const SHARED_REGISTRY_ITEMS: Set<string>;
3
+ export declare function detectRegistryPlatform(cwd: string): "web" | "native";
4
+ export declare function getComponentsJsonStyle(cwd: string): string | undefined;
5
+ export declare function resolveQuickStartRegistryUrl(style?: string): string;
6
+ export declare function resolveRegistryItemUrl(component: string, style?: string, platform?: "web" | "native"): string;
7
7
  //#endregion
8
- export { SHARED_REGISTRY_ITEMS, detectRegistryPlatform, getComponentsJsonStyle, resolveQuickStartRegistryUrl, resolveRegistryItemUrl };
9
8
  //# sourceMappingURL=registry.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"registry.d.ts","names":[],"sources":["../../../src/lib/utils/registry.ts"],"mappings":";cAIa,uBAAqB;iBAElB,uBAAuB;iBA2BvB,uBAAuB;iBAavB,6BAA6B;iBAW7B,uBACd,mBACA,gBACA"}
1
+ {"version":3,"file":"registry.d.ts","names":[],"sources":["../../../src/lib/utils/registry.ts"],"mappings":";qBAIa,uBAAqB;wBAElB,uBAAuB;wBA2BvB,uBAAuB;wBAavB,6BAA6B;wBAW7B,uBACd,mBACA,gBACA"}
@@ -1,6 +1,5 @@
1
1
  //#region src/lib/utils/workspace.d.ts
2
- declare function resolveRealPath(inputPath: string): string;
3
- declare function findWorkspaceRoot(cwd: string): string | null;
2
+ export declare function resolveRealPath(inputPath: string): string;
3
+ export declare function findWorkspaceRoot(cwd: string): string | null;
4
4
  //#endregion
5
- export { findWorkspaceRoot, resolveRealPath };
6
5
  //# sourceMappingURL=workspace.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"workspace.d.ts","names":[],"sources":["../../../src/lib/utils/workspace.ts"],"mappings":";iBAGgB,gBAAgB;iBAUhB,kBAAkB"}
1
+ {"version":3,"file":"workspace.d.ts","names":[],"sources":["../../../src/lib/utils/workspace.ts"],"mappings":";wBAGgB,gBAAgB;wBAUhB,kBAAkB"}
package/dist/program.d.ts CHANGED
@@ -1,6 +1,5 @@
1
1
  import { Command } from "commander";
2
2
  //#region src/program.d.ts
3
- declare function buildProgram(): Command;
3
+ export declare function buildProgram(): Command;
4
4
  //#endregion
5
- export { buildProgram };
6
5
  //# sourceMappingURL=program.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"program.d.ts","names":[],"sources":["../src/program.ts"],"mappings":";;iBAWgB,gBAAY"}
1
+ {"version":3,"file":"program.d.ts","names":[],"sources":["../src/program.ts"],"mappings":";;wBAWgB,gBAAY"}
package/dist/run.d.ts CHANGED
@@ -1,5 +1,4 @@
1
1
  //#region src/run.d.ts
2
- declare function runCli(): Promise<void>;
2
+ export declare function runCli(): Promise<void>;
3
3
  //#endregion
4
- export { runCli };
5
4
  //# sourceMappingURL=run.d.ts.map
package/dist/run.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"run.d.ts","names":[],"sources":["../src/run.ts"],"mappings":";iBAEsB,UAAU"}
1
+ {"version":3,"file":"run.d.ts","names":[],"sources":["../src/run.ts"],"mappings":";wBAEsB,UAAU"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "assistant-ui",
3
- "version": "0.0.116",
3
+ "version": "0.0.117",
4
4
  "description": "CLI for assistant-ui",
5
5
  "keywords": [
6
6
  "cli",
@@ -26,8 +26,8 @@
26
26
  ],
27
27
  "sideEffects": false,
28
28
  "dependencies": {
29
- "@assistant-ui/agent-launcher": "^0.1.15",
30
- "@clack/prompts": "^1.7.0",
29
+ "@assistant-ui/agent-launcher": "^0.1.16",
30
+ "@clack/prompts": "^1.8.1",
31
31
  "chalk": "^6.0.0",
32
32
  "cli-progress": "^3.12.0",
33
33
  "commander": "^15.0.0",
@@ -41,15 +41,15 @@
41
41
  "semver": "^7.8.5"
42
42
  },
43
43
  "devDependencies": {
44
- "@assistant-ui/x-buildutils": "0.0.27",
44
+ "@assistant-ui/x-buildutils": "0.0.28",
45
45
  "@types/cli-progress": "^3.11.6",
46
46
  "@types/cross-spawn": "^6.0.6",
47
47
  "@types/debug": "^4.1.13",
48
48
  "@types/jscodeshift": "^17.3.0",
49
- "@types/node": "^26.4.1",
49
+ "@types/node": "^26.5.1",
50
50
  "@types/semver": "^7.8.0",
51
- "@vitest/coverage-v8": "^5.0.0",
52
- "vitest": "^5.0.0"
51
+ "@vitest/coverage-v8": "^5.0.1",
52
+ "vitest": "^5.0.1"
53
53
  },
54
54
  "publishConfig": {
55
55
  "access": "public",
@@ -67,6 +67,7 @@
67
67
  "scripts": {
68
68
  "build": "aui-build",
69
69
  "test": "vitest run",
70
+ "typecheck": "tsc --noEmit && tsc --noEmit -p tsconfig.test.json",
70
71
  "test:watch": "vitest",
71
72
  "test:coverage": "vitest run --coverage"
72
73
  }
@@ -169,14 +169,14 @@ export default defineToolkit({
169
169
  Register the toolkit in your assistant component:
170
170
 
171
171
  ```tsx
172
- import { AssistantRuntimeProvider, Tools, useAui } from "@assistant-ui/react";
172
+ import { AssistantRuntimeProvider, AuiConfig, Tools } from "@assistant-ui/react";
173
173
  import toolkit from "@/app/toolkit";
174
174
 
175
- const aui = useAui({
175
+ const config = AuiConfig({
176
176
  tools: Tools({ toolkit }),
177
177
  });
178
178
 
179
- <AssistantRuntimeProvider aui={aui} runtime={runtime}>
179
+ <AssistantRuntimeProvider runtime={runtime} config={config}>
180
180
  <Thread />
181
181
  </AssistantRuntimeProvider>
182
182
  ```
@@ -520,6 +520,12 @@ export const create = new Command()
520
520
  .option("--skip-install", "skip installing packages")
521
521
  .option("--skills", "add assistant-ui agent skills for AI coding assistants")
522
522
  .option("--no-skills", "skip adding assistant-ui agent skills")
523
+ .addOption(
524
+ new Option(
525
+ "--cwd <cwd>",
526
+ "the working directory. defaults to the current directory.",
527
+ ).hideHelp(),
528
+ )
523
529
  .addOption(
524
530
  new Option(
525
531
  "--debug-source-root <path>",
@@ -575,9 +581,13 @@ export const create = new Command()
575
581
  }
576
582
 
577
583
  // Check directory
578
- const absoluteProjectDir = path.resolve(resolvedProjectDirectory);
584
+ const absoluteProjectDir = path.resolve(
585
+ opts.cwd ?? process.cwd(),
586
+ resolvedProjectDirectory,
587
+ );
579
588
  const { display: displayProjectDir, cdCommand } =
580
589
  resolveProjectDirectoryGuidance({ absoluteProjectDir });
590
+ let projectDirExisted = true;
581
591
  try {
582
592
  const files = fs.readdirSync(absoluteProjectDir);
583
593
  if (files.length > 0) {
@@ -591,6 +601,7 @@ export const create = new Command()
591
601
  err instanceof Error ? (err as NodeJS.ErrnoException).code : undefined;
592
602
  if (code === "ENOENT") {
593
603
  // Directory doesn't exist — good, proceed
604
+ projectDirExisted = false;
594
605
  } else if (code === "ENOTDIR") {
595
606
  logger.error(
596
607
  `${displayProjectDir} already exists and is not a directory`,
@@ -638,11 +649,24 @@ export const create = new Command()
638
649
  );
639
650
 
640
651
  // Clean up partial project directory on unexpected exit (e.g. Ctrl+C)
652
+ const resetProjectDir = () => {
653
+ if (!projectDirExisted) {
654
+ fs.rmSync(absoluteProjectDir, { recursive: true, force: true });
655
+ return;
656
+ }
657
+ if (!fs.existsSync(absoluteProjectDir)) return;
658
+ for (const entry of fs.readdirSync(absoluteProjectDir)) {
659
+ fs.rmSync(path.join(absoluteProjectDir, entry), {
660
+ recursive: true,
661
+ force: true,
662
+ });
663
+ }
664
+ };
641
665
  let cleanupArmed = true;
642
666
  const cleanupOnExit = () => {
643
667
  if (!cleanupArmed) return;
644
668
  cleanupArmed = false;
645
- fs.rmSync(absoluteProjectDir, { recursive: true, force: true });
669
+ resetProjectDir();
646
670
  };
647
671
  const disarmCleanup = () => {
648
672
  cleanupArmed = false;
@@ -651,8 +675,8 @@ export const create = new Command()
651
675
  process.removeListener("SIGTERM", cleanupOnSignal);
652
676
  };
653
677
  // Node emits no "exit" when a signal kills the process. An in-flight
654
- // runSpawn forwards the signal itself, so the directory is removed on the
655
- // error path once the child is reaped rather than while it is still writing.
678
+ // runSpawn forwards the signal itself, so cleanup runs on the error path
679
+ // once the child is reaped rather than while it is still writing.
656
680
  const cleanupOnSignal = (signal: NodeJS.Signals) => {
657
681
  if (hasActiveSpawn()) return;
658
682
  cleanupOnExit();
@@ -696,7 +720,7 @@ export const create = new Command()
696
720
  ref &&
697
721
  !fs.existsSync(path.join(absoluteProjectDir, "package.json"))
698
722
  ) {
699
- fs.rmSync(absoluteProjectDir, { recursive: true, force: true });
723
+ resetProjectDir();
700
724
  logger.warn(
701
725
  "Template not found at release tag, downloading from HEAD",
702
726
  );
@@ -83,8 +83,7 @@ export const init = new Command()
83
83
  logger.break();
84
84
  }
85
85
 
86
- const createArgs: string[] = [];
87
- if (projectDirectory) createArgs.push(targetDir);
86
+ const createArgs = projectDirectory ? [targetDir] : ["--cwd", cwd];
88
87
  if (presetUrl) createArgs.push("--preset", presetUrl);
89
88
  if (opts.useNpm) createArgs.push("--use-npm");
90
89
  if (opts.usePnpm) createArgs.push("--use-pnpm");