@aiworkbench/vibe-ide 0.0.3 → 0.0.4

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 (55) hide show
  1. package/dist/core/boot.d.ts +3 -0
  2. package/dist/core/boot.d.ts.map +1 -1
  3. package/dist/core/bridge-shim.d.ts +1 -1
  4. package/dist/core/bridge-shim.d.ts.map +1 -1
  5. package/dist/core/filesystem.d.ts +72 -1
  6. package/dist/core/filesystem.d.ts.map +1 -1
  7. package/dist/core/local-snapshot-cache.d.ts +72 -0
  8. package/dist/core/local-snapshot-cache.d.ts.map +1 -0
  9. package/dist/core/path-policy.d.ts +77 -0
  10. package/dist/core/path-policy.d.ts.map +1 -0
  11. package/dist/core/preview-channel.d.ts +2 -2
  12. package/dist/core/process-registry.d.ts +71 -0
  13. package/dist/core/process-registry.d.ts.map +1 -0
  14. package/dist/core/process.d.ts +5 -0
  15. package/dist/core/process.d.ts.map +1 -1
  16. package/dist/core/write-skills.d.ts +18 -0
  17. package/dist/core/write-skills.d.ts.map +1 -0
  18. package/dist/ide-theme.css +46 -1
  19. package/dist/index.d.ts +8 -2
  20. package/dist/index.d.ts.map +1 -1
  21. package/dist/index.js +11368 -5115
  22. package/dist/mcp/mcp-adapter.d.ts +5 -6
  23. package/dist/mcp/mcp-adapter.d.ts.map +1 -1
  24. package/dist/power-user.d.ts +13 -0
  25. package/dist/power-user.d.ts.map +1 -0
  26. package/dist/power-user.js +4554 -0
  27. package/dist/prompts/core-rules.d.ts +20 -0
  28. package/dist/prompts/core-rules.d.ts.map +1 -0
  29. package/dist/prompts/skills.d.ts +36 -0
  30. package/dist/prompts/skills.d.ts.map +1 -0
  31. package/dist/prompts/skills.generated.d.ts +17 -0
  32. package/dist/prompts/skills.generated.d.ts.map +1 -0
  33. package/dist/react/code-editor.d.ts +18 -0
  34. package/dist/react/code-editor.d.ts.map +1 -0
  35. package/dist/react/file-explorer.d.ts +17 -0
  36. package/dist/react/file-explorer.d.ts.map +1 -0
  37. package/dist/react/provider.d.ts.map +1 -1
  38. package/dist/react/terminal-view.d.ts +19 -0
  39. package/dist/react/terminal-view.d.ts.map +1 -0
  40. package/dist/react/use-autosave.d.ts +46 -0
  41. package/dist/react/use-autosave.d.ts.map +1 -0
  42. package/dist/react/vibe-ide-bridge-relay.d.ts.map +1 -1
  43. package/dist/react/vibe-ide-layout.d.ts +4 -0
  44. package/dist/react/vibe-ide-layout.d.ts.map +1 -1
  45. package/dist/react/vibe-ide-preview-pane.d.ts.map +1 -1
  46. package/dist/react/vibe-ide-toolbar.d.ts +2 -1
  47. package/dist/react/vibe-ide-toolbar.d.ts.map +1 -1
  48. package/dist/server.js +7 -0
  49. package/dist/templates/generated.d.ts +16 -12
  50. package/dist/templates/generated.d.ts.map +1 -1
  51. package/dist/templates/react-template.generated.d.ts +12 -0
  52. package/dist/templates/react-template.generated.d.ts.map +1 -0
  53. package/dist/types.d.ts +80 -5
  54. package/dist/types.d.ts.map +1 -1
  55. package/package.json +15 -2
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Core rules generator — produces the essential rules that are ALWAYS present
3
+ * in the Direct LLM system prompt.
4
+ *
5
+ * Content is adapted from vibe-cli's write-agent-docs.ts but tailored for the
6
+ * WebContainer IDE context. It is intentionally concise (~250 lines) to leave
7
+ * room in the context window for user messages and tool results. Detailed
8
+ * reference material lives in on-demand skills at `.vibe/skills/`.
9
+ *
10
+ * @module
11
+ */
12
+ /**
13
+ * Generate the core rules for the Direct LLM system prompt.
14
+ *
15
+ * These rules cover architecture, bridge contract, forbidden patterns, and
16
+ * a skills reference table. They are intentionally concise — detailed
17
+ * material is deferred to on-demand skills in `.vibe/skills/`.
18
+ */
19
+ export declare function generateCoreRules(framework: string, permissions: string[]): string;
20
+ //# sourceMappingURL=core-rules.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"core-rules.d.ts","sourceRoot":"","sources":["../../src/prompts/core-rules.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAgMH;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAC/B,SAAS,EAAE,MAAM,EACjB,WAAW,EAAE,MAAM,EAAE,GACpB,MAAM,CA+ER"}
@@ -0,0 +1,36 @@
1
+ /**
2
+ * Skills accessor — provides skill file content for writing to the
3
+ * WebContainer and metadata for the skills reference table.
4
+ *
5
+ * Skills are pre-rendered at build time by scripts/sync-skills.ts from the
6
+ * canonical CLI skill generators. This module re-exports them in a format
7
+ * suitable for WebContainer filesystem operations.
8
+ *
9
+ * @module
10
+ */
11
+ import { type SkillEntry } from "./skills.generated";
12
+ export interface SkillFileEntry {
13
+ /** Path relative to project root, e.g. `.vibe/skills/bridge-usage.md` */
14
+ path: string;
15
+ /** Markdown content */
16
+ content: string;
17
+ }
18
+ export interface SkillMeta {
19
+ name: string;
20
+ description: string;
21
+ }
22
+ /**
23
+ * Returns an array of skill files ready to be written to the WebContainer.
24
+ * Each entry has a `path` (relative to project root) and `content`.
25
+ */
26
+ export declare function getSkillFiles(): SkillFileEntry[];
27
+ /**
28
+ * Returns metadata for all available skills (for the skills reference table).
29
+ */
30
+ export declare function getSkillsMeta(): SkillMeta[];
31
+ /**
32
+ * Returns the content of a single skill by name, or undefined if not found.
33
+ */
34
+ export declare function getSkillContent(name: string): string | undefined;
35
+ export type { SkillEntry };
36
+ //# sourceMappingURL=skills.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"skills.d.ts","sourceRoot":"","sources":["../../src/prompts/skills.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAc,KAAK,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAMjE,MAAM,WAAW,cAAc;IAC7B,yEAAyE;IACzE,IAAI,EAAE,MAAM,CAAC;IACb,uBAAuB;IACvB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;CACrB;AAMD;;;GAGG;AACH,wBAAgB,aAAa,IAAI,cAAc,EAAE,CAKhD;AAED;;GAEG;AACH,wBAAgB,aAAa,IAAI,SAAS,EAAE,CAK3C;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAEhE;AAED,YAAY,EAAE,UAAU,EAAE,CAAC"}
@@ -0,0 +1,17 @@
1
+ /**
2
+ * AUTO-GENERATED by scripts/sync-skills.ts — DO NOT EDIT MANUALLY.
3
+ *
4
+ * Source of truth: vibe-kit/packages/vibe-cli/src/skills/*.ts
5
+ * Generated for: React framework, all permissions enabled.
6
+ * Regenerate: bun scripts/sync-skills.ts (or bun run build)
7
+ *
8
+ * Each skill is a pre-rendered markdown document. The IDE writes these
9
+ * to .vibe/skills/<name>.md in the WebContainer so the agent can load
10
+ * them on demand via read_file.
11
+ */
12
+ export interface SkillEntry {
13
+ description: string;
14
+ content: string;
15
+ }
16
+ export declare const IDE_SKILLS: Record<string, SkillEntry>;
17
+ //# sourceMappingURL=skills.generated.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"skills.generated.d.ts","sourceRoot":"","sources":["../../src/prompts/skills.generated.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,MAAM,WAAW,UAAU;IACzB,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,eAAO,MAAM,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,UAAU,CA6DjD,CAAC"}
@@ -0,0 +1,18 @@
1
+ /**
2
+ * CodeEditor — Monaco editor wrapper with file tabs.
3
+ *
4
+ * - Tabs for open files with close/reorder support
5
+ * - Reads file content from WebContainer FS on open
6
+ * - Writes through WriteCoalescer (150ms debounce) to keep HMR stable
7
+ * - Large-file guard (500KB+ opens read-only)
8
+ * - Agent file writes update open models without stealing focus
9
+ * - Self-hosted Monaco workers for COEP compliance
10
+ */
11
+ export interface CodeEditorProps {
12
+ /** File to open. Set externally by file explorer. */
13
+ initialFile?: string | null;
14
+ /** Called when the active file changes (for syncing with explorer). */
15
+ onActiveFileChange?: (path: string | null) => void;
16
+ }
17
+ export declare function CodeEditor({ initialFile, onActiveFileChange, }: CodeEditorProps): import("react/jsx-runtime").JSX.Element;
18
+ //# sourceMappingURL=code-editor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"code-editor.d.ts","sourceRoot":"","sources":["../../src/react/code-editor.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAsFH,MAAM,WAAW,eAAe;IAC9B,qDAAqD;IACrD,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,uEAAuE;IACvE,kBAAkB,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;CACpD;AAED,wBAAgB,UAAU,CAAC,EACzB,WAAkB,EAClB,kBAAkB,GACnB,EAAE,eAAe,2CA6djB"}
@@ -0,0 +1,17 @@
1
+ /**
2
+ * FileExplorer — sidebar tree view backed by WebContainer FS.
3
+ *
4
+ * Reads the tree structure without file contents (structure-only walker).
5
+ * Supports: expand/collapse, file selection, context menu (create/rename/delete),
6
+ * and auto-refresh from known mutation points.
7
+ */
8
+ export interface FileExplorerProps {
9
+ /** Called when a file is selected for editing. */
10
+ onFileSelect?: (path: string) => void;
11
+ /** Currently selected file path. */
12
+ selectedFile?: string | null;
13
+ /** External refresh trigger (increment to force refresh). */
14
+ refreshNonce?: number;
15
+ }
16
+ export declare function FileExplorer({ onFileSelect, selectedFile: selectedFileProp, refreshNonce, }: FileExplorerProps): import("react/jsx-runtime").JSX.Element;
17
+ //# sourceMappingURL=file-explorer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"file-explorer.d.ts","sourceRoot":"","sources":["../../src/react/file-explorer.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAqNH,MAAM,WAAW,iBAAiB;IAChC,kDAAkD;IAClD,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACtC,oCAAoC;IACpC,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,6DAA6D;IAC7D,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,wBAAgB,YAAY,CAAC,EAC3B,YAAY,EACZ,YAAY,EAAE,gBAAuB,EACrC,YAAgB,GACjB,EAAE,iBAAiB,2CA6WnB"}
@@ -1 +1 @@
1
- {"version":3,"file":"provider.d.ts","sourceRoot":"","sources":["../../src/react/provider.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAON,MAAM,OAAO,CAAC;AAGf,OAAO,KAAK,EAGV,mBAAmB,EAGnB,oBAAoB,EACrB,MAAM,UAAU,CAAC;AAQlB,eAAO,MAAM,cAAc,2CAAkD,CAAC;AA8B9E,wBAAgB,eAAe,CAAC,EAC9B,OAAO,EACP,UAAU,EACV,MAAM,EACN,IAAI,EACJ,aAAa,EAAE,iBAAiB,EAChC,WAAW,EACX,QAAQ,EACR,YAAY,EACZ,WAAW,EACX,WAAW,EACX,QAAQ,GACT,EAAE,oBAAoB,2CA2MtB"}
1
+ {"version":3,"file":"provider.d.ts","sourceRoot":"","sources":["../../src/react/provider.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAON,MAAM,OAAO,CAAC;AAGf,OAAO,KAAK,EAGV,mBAAmB,EAGnB,oBAAoB,EACrB,MAAM,UAAU,CAAC;AAUlB,eAAO,MAAM,cAAc,2CAAkD,CAAC;AAuE9E,wBAAgB,eAAe,CAAC,EAC9B,OAAO,EACP,UAAU,EACV,MAAM,EACN,IAAI,EACJ,aAAa,EAAE,iBAAiB,EAChC,WAAW,EACX,QAAQ,EACR,YAAY,EACZ,WAAW,EACX,WAAW,EACX,QAAQ,GACT,EAAE,oBAAoB,2CAyTtB"}
@@ -0,0 +1,19 @@
1
+ /**
2
+ * TerminalView — xterm.js terminal component backed by ProcessRegistry.
3
+ *
4
+ * - GPU-accelerated rendering via @xterm/addon-webgl (graceful fallback)
5
+ * - Auto-fit to container via @xterm/addon-fit
6
+ * - Clickable URLs via @xterm/addon-web-links (safe open policy)
7
+ * - Subscribes to ProcessRegistry output for multiplexed process streams
8
+ * - Imperative buffer management (no stdout in React state)
9
+ * - Scrollback capped at 5000 lines
10
+ * - Output batched on requestAnimationFrame
11
+ */
12
+ import "@xterm/xterm/css/xterm.css";
13
+ import type { ProcessRegistry } from "../core/process-registry";
14
+ export interface TerminalViewProps {
15
+ /** The process registry to subscribe to for output. */
16
+ processRegistry: ProcessRegistry | null;
17
+ }
18
+ export declare function TerminalView({ processRegistry }: TerminalViewProps): import("react/jsx-runtime").JSX.Element;
19
+ //# sourceMappingURL=terminal-view.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"terminal-view.d.ts","sourceRoot":"","sources":["../../src/react/terminal-view.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAIH,OAAO,4BAA4B,CAAC;AAGpC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAsChE,MAAM,WAAW,iBAAiB;IAChC,uDAAuD;IACvD,eAAe,EAAE,eAAe,GAAG,IAAI,CAAC;CACzC;AAED,wBAAgB,YAAY,CAAC,EAAE,eAAe,EAAE,EAAE,iBAAiB,2CA8IlE"}
@@ -0,0 +1,46 @@
1
+ /**
2
+ * useAutosave — auto-saves the WebContainer filesystem to IndexedDB
3
+ * after a period of edit idle time, and optionally to a remote backend
4
+ * via the VibeIdePersistenceAdapter.
5
+ *
6
+ * Responsibilities:
7
+ * - Watches WriteCoalescer for file mutations (marks dirty)
8
+ * - After LOCAL_SAVE_IDLE_MS of idle, serializes and saves to IndexedDB
9
+ * - After REMOTE_SAVE_IDLE_MS of idle, calls persistence.saveDraft()
10
+ * - Flushes on visibilitychange/pagehide (best-effort before tab hide)
11
+ * - Registers beforeunload when dirty to warn the user
12
+ * - Exposes isDirty, isSaving, lastSavedAt, remoteSaveState for the toolbar UI
13
+ */
14
+ import type { WebContainer } from "@webcontainer/api";
15
+ import type { WriteCoalescer } from "../core/filesystem";
16
+ import type { VibeIdePersistenceAdapter, DraftSnapshotMeta } from "../types";
17
+ export type RemoteSaveStatus = "idle" | "saving" | "saved" | "error";
18
+ export interface AutosaveState {
19
+ /** True when there are unsaved changes since the last IndexedDB snapshot. */
20
+ isDirty: boolean;
21
+ /** True while a save to IndexedDB is in progress. */
22
+ isSaving: boolean;
23
+ /** Epoch ms of the last successful IndexedDB save, or null. */
24
+ lastSavedAt: number | null;
25
+ /** Error from the last failed save attempt, or null. */
26
+ lastError: Error | null;
27
+ /** Manually trigger a save now (local + remote if adapter present). */
28
+ saveNow: () => Promise<void>;
29
+ /** Current remote save status. */
30
+ remoteSaveStatus: RemoteSaveStatus;
31
+ /** Server revision ID from the last successful remote save. */
32
+ revisionId: string | null;
33
+ }
34
+ export interface UseAutosaveOptions {
35
+ draftId: string;
36
+ instance: WebContainer | null;
37
+ coalescer: WriteCoalescer | null;
38
+ /** Whether autosave is enabled (default: true). */
39
+ enabled?: boolean;
40
+ /** Optional persistence adapter for remote saves. */
41
+ persistence?: VibeIdePersistenceAdapter;
42
+ /** Optional metadata to include with remote saves (e.g. chatHistory). */
43
+ saveMeta?: Partial<DraftSnapshotMeta>;
44
+ }
45
+ export declare function useAutosave({ draftId, instance, coalescer, enabled, persistence, saveMeta, }: UseAutosaveOptions): AutosaveState;
46
+ //# sourceMappingURL=use-autosave.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-autosave.d.ts","sourceRoot":"","sources":["../../src/react/use-autosave.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAGH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,KAAK,EAAE,yBAAyB,EAAE,iBAA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AAK,CAAC,SAAS,CAAC,iBAAiB,GAAG,IAAI,CAAC,CAAC;CACtD,kDAweA"}
1
+ {"version":3,"file":"vibe-ide-bridge-relay.d.ts","sourceRoot":"","sources":["../../src/react/vibe-ide-bridge-relay.tsx"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAmD,MAAM,OAAO,CAAC;AAkGxE,wBAAgB,kBAAkB,CAAC,EACjC,SAAS,GACV,EAAE;IACD,SAAS,EAAE,KAAK,CAAC,SAAS,CAAC,iBAAiB,GAAG,IAAI,CAAC,CAAC;CACtD,kDAofA"}
@@ -4,6 +4,10 @@
4
4
  * Uses pure CSS resize (no `react-split` dependency) for the left/right split.
5
5
  * The host provides `leftPane` content; the right pane is managed internally
6
6
  * (Preview / Code / Terminal tabs).
7
+ *
8
+ * Code and Terminal views are lazy-loaded on first activation, then kept alive
9
+ * via CSS visibility so Monaco cursor/undo state, xterm scrollback, and file
10
+ * explorer expand state are preserved across tab switches.
7
11
  */
8
12
  import type { VibeIdeSplitLayoutProps } from "../types";
9
13
  export declare function VibeIdeSplitLayout({ leftPane, toolbar, }: VibeIdeSplitLayoutProps): import("react/jsx-runtime").JSX.Element;
@@ -1 +1 @@
1
- {"version":3,"file":"vibe-ide-layout.d.ts","sourceRoot":"","sources":["../../src/react/vibe-ide-layout.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,KAAK,EAAE,uBAAuB,EAAgB,MAAM,UAAU,CAAC;AA6FtE,wBAAgB,kBAAkB,CAAC,EACjC,QAAQ,EACR,OAAO,GACR,EAAE,uBAAuB,2CAqFzB"}
1
+ {"version":3,"file":"vibe-ide-layout.d.ts","sourceRoot":"","sources":["../../src/react/vibe-ide-layout.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAGH,OAAO,KAAK,EAAE,uBAAuB,EAAgB,MAAM,UAAU,CAAC;AA2KtE,wBAAgB,kBAAkB,CAAC,EACjC,QAAQ,EACR,OAAO,GACR,EAAE,uBAAuB,2CAqFzB"}
@@ -1 +1 @@
1
- {"version":3,"file":"vibe-ide-preview-pane.d.ts","sourceRoot":"","sources":["../../src/react/vibe-ide-preview-pane.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAMH,wBAAgB,kBAAkB,4CAwIjC"}
1
+ {"version":3,"file":"vibe-ide-preview-pane.d.ts","sourceRoot":"","sources":["../../src/react/vibe-ide-preview-pane.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAMH,wBAAgB,kBAAkB,4CAsJjC"}
@@ -1,5 +1,6 @@
1
1
  /**
2
- * VibeIdeToolbar — tab pills, URL bar, and restart button for the right pane.
2
+ * VibeIdeToolbar — tab pills, URL bar, save status, and restart button
3
+ * for the right pane.
3
4
  *
4
5
  * No Redux — reads/writes `activeRightPane` from the IDE context.
5
6
  */
@@ -1 +1 @@
1
- {"version":3,"file":"vibe-ide-toolbar.d.ts","sourceRoot":"","sources":["../../src/react/vibe-ide-toolbar.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAsC1B,UAAU,mBAAmB;IAC3B,0DAA0D;IAC1D,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB,+CAA+C;IAC/C,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;CACzB;AAED,wBAAgB,cAAc,CAAC,EAAE,KAAK,EAAE,UAAU,EAAE,EAAE,mBAAmB,2CAoHxE"}
1
+ {"version":3,"file":"vibe-ide-toolbar.d.ts","sourceRoot":"","sources":["../../src/react/vibe-ide-toolbar.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAiC,MAAM,OAAO,CAAC;AAsCtD,UAAU,mBAAmB;IAC3B,0DAA0D;IAC1D,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB,+CAA+C;IAC/C,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;CACzB;AAED,wBAAgB,cAAc,CAAC,EAAE,KAAK,EAAE,UAAU,EAAE,EAAE,mBAAmB,2CAwJxE"}
package/dist/server.js CHANGED
@@ -9,6 +9,13 @@ var __export = (target, all) => {
9
9
  });
10
10
  };
11
11
  var __esm = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
12
+ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
13
+ get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
14
+ }) : x)(function(x) {
15
+ if (typeof require !== "undefined")
16
+ return require.apply(this, arguments);
17
+ throw Error('Dynamic require of "' + x + '" is not supported');
18
+ });
12
19
 
13
20
  // ../../node_modules/.bun/zod@3.25.76/node_modules/zod/v3/external.js
14
21
  var exports_external = {};
@@ -1,22 +1,26 @@
1
1
  /**
2
- * IDE template generator — produces FileSystemTree objects from the official
3
- * vibe-kit/templates/* source of truth, with IDE-specific modifications:
2
+ * IDE template generator — produces FileSystemTree objects for the WebContainer.
4
3
  *
5
- * 1. Strips the dev toolbar from index.html
6
- * 2. Adds the `vibe-dev-bridge-injector` Vite plugin
7
- * 3. Resolves Eta placeholders (<%= it.xxx %>) with IDE defaults or user vars
8
- * 4. Adds `toast` to default manifest permissions
9
- * 5. Omits `.env.example`, `.gitignore`, `mock-bridge.ts` (not needed in IDE)
4
+ * **React** is sourced from the canonical CLI template (synced at build time
5
+ * by scripts/sync-templates.ts) with three IDE-specific overrides:
6
+ *
7
+ * 1. index.html — strips dev toolbar, uses #root mount for bridge injector
8
+ * 2. vite.config.ts injects the `vibe-dev-bridge-injector` Vite plugin
9
+ * 3. manifest.json — defaults permissions to ["toast"]
10
+ *
11
+ * All other React files (package.json, tsconfig.json, src/App.tsx, src/main.tsx)
12
+ * are sourced verbatim from the CLI template — only Eta placeholders resolved.
13
+ *
14
+ * **Vue / Vanilla** use inline fallbacks until CLI template sync is extended.
10
15
  */
11
16
  import type { FileSystemTree } from "@webcontainer/api";
12
17
  import type { TemplateId, TemplateVars } from "../types";
13
18
  /**
14
- * Generate a `FileSystemTree` for the IDE, derived from the official
15
- * vibe-kit templates with IDE-specific modifications applied.
19
+ * Generate a `FileSystemTree` for the IDE.
16
20
  *
17
- * @param templateId - Which framework template to generate
18
- * @param templateVars - Optional overrides for project name, permissions, etc.
19
- * @returns A `FileSystemTree` ready to mount into a WebContainer
21
+ * - **React**: derived from the canonical CLI template (synced at build time)
22
+ * with IDE-specific overrides for index.html, vite.config.ts, and manifest.json.
23
+ * - **Vue / Vanilla**: inline fallbacks until CLI template sync is extended.
20
24
  */
21
25
  export declare function getVibeIdeTemplateTree(templateId: TemplateId, templateVars?: TemplateVars): FileSystemTree;
22
26
  //# sourceMappingURL=generated.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"generated.d.ts","sourceRoot":"","sources":["../../src/templates/generated.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,KAAK,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAggBzD;;;;;;;GAOG;AACH,wBAAgB,sBAAsB,CACpC,UAAU,EAAE,UAAU,EACtB,YAAY,CAAC,EAAE,YAAY,GAC1B,cAAc,CAkBhB"}
1
+ {"version":3,"file":"generated.d.ts","sourceRoot":"","sources":["../../src/templates/generated.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,KAAK,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAqdzD;;;;;;GAMG;AACH,wBAAgB,sBAAsB,CACpC,UAAU,EAAE,UAAU,EACtB,YAAY,CAAC,EAAE,YAAY,GAC1B,cAAc,CAWhB"}
@@ -0,0 +1,12 @@
1
+ /**
2
+ * AUTO-GENERATED by scripts/sync-templates.ts — DO NOT EDIT MANUALLY.
3
+ *
4
+ * Source of truth: vibe-kit/templates/react/*
5
+ * Regenerate: bun scripts/sync-templates.ts (or bun run build)
6
+ *
7
+ * Raw Eta template contents from the CLI scaffolding template.
8
+ * The IDE applies runtime transforms (Eta rendering + IDE-specific overrides)
9
+ * in generated.ts before mounting into the WebContainer.
10
+ */
11
+ export declare const REACT_TEMPLATE: Record<string, string>;
12
+ //# sourceMappingURL=react-template.generated.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"react-template.generated.d.ts","sourceRoot":"","sources":["../../src/templates/react-template.generated.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,eAAO,MAAM,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAQjD,CAAC"}
package/dist/types.d.ts CHANGED
@@ -39,15 +39,23 @@ export interface UnifiedToolInvocation {
39
39
  result?: string;
40
40
  state: "pending" | "running" | "completed" | "error";
41
41
  }
42
+ export interface UnifiedAttachment {
43
+ name: string;
44
+ mimeType: string;
45
+ dataUri: string;
46
+ size?: number;
47
+ }
42
48
  export interface UnifiedMessage {
43
49
  id: string;
44
50
  content: string;
45
51
  sender: "user" | "agent";
46
52
  sentAt: string;
47
53
  status: UnifiedMessageStatus;
54
+ thinking?: string;
48
55
  artifacts?: UnifiedArtifact[];
49
56
  statusUpdates?: UnifiedStatusUpdate[];
50
57
  toolInvocations?: UnifiedToolInvocation[];
58
+ attachments?: UnifiedAttachment[];
51
59
  }
52
60
  /**
53
61
  * Chat adapter provided by the host. The IDE package does not own any AI
@@ -58,7 +66,7 @@ export interface VibeIdeChatAdapter {
58
66
  messages: UnifiedMessage[];
59
67
  isProcessing: boolean;
60
68
  error: Error | null;
61
- sendMessage: (text: string) => void | Promise<void>;
69
+ sendMessage: (text: string, attachments?: UnifiedAttachment[]) => void | Promise<void>;
62
70
  restart?: () => void;
63
71
  }
64
72
  /**
@@ -68,7 +76,7 @@ export interface VibeIdeChatAdapter {
68
76
  export interface VibeIdePreviewPolicy {
69
77
  /**
70
78
  * Capabilities that are always allowed without prompting the user.
71
- * Defaults to `["toast", "storage", "navigation", "events", "theme"]`.
79
+ * Defaults to `["toast", "theme"]`.
72
80
  */
73
81
  autoApproved?: BridgeCapability[];
74
82
  /**
@@ -91,13 +99,57 @@ export interface VibeIdePreviewPolicy {
91
99
  options?: unknown;
92
100
  }) => Promise<boolean> | boolean;
93
101
  }
102
+ /**
103
+ * Metadata returned alongside a loaded draft snapshot.
104
+ */
105
+ export interface DraftSnapshotMeta {
106
+ /** Server-issued revision identifier for optimistic concurrency. */
107
+ revisionId?: string;
108
+ /** SHA-256 of the canonical snapshot for dedup. */
109
+ treeHash?: string;
110
+ /** Install fingerprint: SHA-256(lockfile + node/npm version + install mode + template). */
111
+ installFingerprint?: string;
112
+ /** Timestamp of the last successful save (ISO 8601 or epoch ms). */
113
+ savedAt?: string | number;
114
+ /** Sanitized/capped chat history for recovery. */
115
+ chatHistory?: unknown[];
116
+ }
94
117
  /**
95
118
  * Optional persistence adapter. When provided, the IDE can save and restore
96
119
  * draft snapshots through the host's storage backend.
120
+ *
121
+ * Phase 2 extension: carries metadata (revisionId, treeHash, installFingerprint)
122
+ * alongside the raw FileSystemTree so consumers can implement optimistic
123
+ * concurrency, dedup, and install-skip logic.
97
124
  */
98
125
  export interface VibeIdePersistenceAdapter {
99
- loadDraft?: (draftId: string) => Promise<FileSystemTree | null>;
100
- saveDraft?: (draftId: string, snapshot: FileSystemTree) => Promise<void>;
126
+ /**
127
+ * Load a draft snapshot. Returns the file tree and metadata, or null if
128
+ * no draft exists. The adapter may source from IndexedDB, remote API, or both.
129
+ */
130
+ loadDraft?: (draftId: string) => Promise<{
131
+ tree: FileSystemTree;
132
+ meta: DraftSnapshotMeta;
133
+ } | null>;
134
+ /**
135
+ * Save a draft snapshot. The adapter decides whether to persist locally
136
+ * (IndexedDB), remotely (API + blob storage), or both.
137
+ */
138
+ saveDraft?: (draftId: string, snapshot: {
139
+ tree: FileSystemTree;
140
+ meta: DraftSnapshotMeta;
141
+ }) => Promise<{
142
+ revisionId?: string;
143
+ }>;
144
+ /**
145
+ * Delete a draft and its local cache. Called on explicit user delete.
146
+ */
147
+ deleteDraft?: (draftId: string) => Promise<void>;
148
+ /**
149
+ * Check if there is a local (IndexedDB) snapshot newer than the given
150
+ * timestamp. Used during hydration to prompt "Restore local changes?"
151
+ */
152
+ hasNewerLocalSnapshot?: (draftId: string, remoteSavedAt: string | number) => Promise<boolean>;
101
153
  }
102
154
  /**
103
155
  * Callback for gating sensitive MCP tool calls (e.g. writing package.json,
@@ -126,8 +178,13 @@ export interface WebContainerMcpAdapterOptions {
126
178
  export interface VibeIdeBootOptions {
127
179
  /** Force-claim the session from another tab. */
128
180
  takeover?: boolean;
129
- /** Custom BroadcastChannel name. Default: "vibe-ide-instance". */
181
+ /** Custom BroadcastChannel name. Defaults to a pathname-scoped channel. */
130
182
  channelName?: string;
183
+ /**
184
+ * Optional shared token for BroadcastChannel coordination. When provided,
185
+ * only tabs with the same token can participate in ping/pong/takeover.
186
+ */
187
+ channelToken?: string;
131
188
  }
132
189
  /** Props for `<VibeIdeProvider>`. */
133
190
  export interface VibeIdeProviderProps {
@@ -176,8 +233,26 @@ export interface VibeIdeContextValue {
176
233
  restart: (options?: {
177
234
  takeover?: boolean;
178
235
  }) => void;
236
+ /** Refresh the preview iframe without restarting the WebContainer. */
237
+ refresh: () => void;
238
+ /** Monotonically increasing nonce to trigger iframe reloads. */
239
+ refreshNonce: number;
240
+ /** Monotonically increasing nonce for preview capability session resets. */
241
+ previewSessionNonce: number;
179
242
  coalescer: import("./core/filesystem").WriteCoalescer | null;
180
243
  };
244
+ /** Process lifecycle manager — null until the WebContainer is ready. */
245
+ processRegistry: import("./core/process-registry").ProcessRegistry | null;
246
+ /** Autosave state for local IndexedDB + optional remote persistence. */
247
+ autosave: {
248
+ isDirty: boolean;
249
+ isSaving: boolean;
250
+ lastSavedAt: number | null;
251
+ lastError: Error | null;
252
+ saveNow: () => Promise<void>;
253
+ remoteSaveStatus: "idle" | "saving" | "saved" | "error";
254
+ revisionId: string | null;
255
+ };
181
256
  manifestPermissions: BridgeCapability[];
182
257
  activeRightPane: RightPaneTab;
183
258
  setActiveRightPane: (tab: RightPaneTab) => void;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AACxE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAMxD,2DAA2D;AAC3D,MAAM,MAAM,UAAU,GAAG,OAAO,GAAG,KAAK,GAAG,SAAS,CAAC;AAErD,oEAAoE;AACpE,MAAM,WAAW,YAAY;IAC3B,mFAAmF;IACnF,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,+EAA+E;IAC/E,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,yCAAyC;IACzC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,oDAAoD;IACpD,WAAW,CAAC,EAAE,gBAAgB,EAAE,CAAC;CAClC;AAMD,4CAA4C;AAC5C,MAAM,MAAM,YAAY,GAAG,SAAS,GAAG,MAAM,GAAG,UAAU,CAAC;AAM3D,MAAM,MAAM,oBAAoB,GAAG,SAAS,GAAG,SAAS,GAAG,MAAM,GAAG,OAAO,CAAC;AAE5E,MAAM,MAAM,uBAAuB,GAC/B,cAAc,GACd,WAAW,GACX,cAAc,GACd,OAAO,CAAC;AAEZ,MAAM,WAAW,eAAe;IAC9B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,mBAAmB;IAClC,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,qBAAqB;IACpC,QAAQ,EAAE,MAAM,CAAC;IACjB,IAA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,11 @@
13
13
  "import": "./dist/index.js",
14
14
  "default": "./dist/index.js"
15
15
  },
16
+ "./power-user": {
17
+ "types": "./dist/power-user.d.ts",
18
+ "import": "./dist/power-user.js",
19
+ "default": "./dist/power-user.js"
20
+ },
16
21
  "./server": {
17
22
  "types": "./dist/server.d.ts",
18
23
  "import": "./dist/server.js",
@@ -21,7 +26,9 @@
21
26
  "./styles": "./dist/ide-theme.css"
22
27
  },
23
28
  "scripts": {
24
- "build": "bun build ./src/index.ts ./src/server.ts --outdir ./dist --target=browser --external react --external react-dom --external react/jsx-runtime --external react-dom/client && tsc --emitDeclarationOnly && cp src/react/ide-theme.css dist/ide-theme.css",
29
+ "sync-templates": "bun scripts/sync-templates.ts",
30
+ "sync-skills": "bun scripts/sync-skills.ts",
31
+ "build": "bun run sync-templates && bun run sync-skills && bun build ./src/index.ts ./src/server.ts ./src/power-user.ts --outdir ./dist --target=browser --external react --external react-dom --external react/jsx-runtime --external react-dom/client --external @monaco-editor/react --external monaco-editor --external @xterm/xterm --external @xterm/addon-fit --external @xterm/addon-web-links --external @xterm/addon-webgl && tsc --emitDeclarationOnly && cp src/react/ide-theme.css dist/ide-theme.css",
25
32
  "dev": "tsc --watch --emitDeclarationOnly",
26
33
  "type-check": "tsc --noEmit",
27
34
  "clean": "rm -rf dist",
@@ -32,7 +39,13 @@
32
39
  ],
33
40
  "dependencies": {
34
41
  "@aiworkbench/vibe-types": "^0.0.4",
42
+ "@monaco-editor/react": "^4.7.0",
35
43
  "@webcontainer/api": "^1.6.1",
44
+ "@xterm/addon-fit": "^0.11.0",
45
+ "@xterm/addon-web-links": "^0.12.0",
46
+ "@xterm/addon-webgl": "^0.19.0",
47
+ "@xterm/xterm": "^6.0.0",
48
+ "monaco-editor": "^0.55.1",
36
49
  "zod": "^3.25.0"
37
50
  },
38
51
  "peerDependencies": {