babylonjs-editor 5.5.1 → 5.5.2

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 (38) hide show
  1. package/build/src/index.js +1 -1
  2. package/declaration/src/editor/layout/assets-browser/events/gui.d.ts +7 -0
  3. package/declaration/src/editor/layout/assets-browser/events/material.d.ts +7 -0
  4. package/declaration/src/editor/layout/assets-browser/events/particles.d.ts +8 -0
  5. package/declaration/src/editor/layout/assets-browser/events/scene.d.ts +7 -0
  6. package/declaration/src/editor/layout/assets-browser.d.ts +1 -0
  7. package/declaration/src/editor/layout/assistant/agents.d.ts +47 -0
  8. package/declaration/src/editor/layout/assistant/antigravity.d.ts +107 -0
  9. package/declaration/src/editor/layout/assistant/claude.d.ts +30 -0
  10. package/declaration/src/editor/layout/assistant/codex.d.ts +84 -0
  11. package/declaration/src/editor/layout/assistant/config.d.ts +109 -0
  12. package/declaration/src/editor/layout/assistant/executable.d.ts +80 -0
  13. package/declaration/src/editor/layout/assistant/hooks.d.ts +105 -0
  14. package/declaration/src/editor/layout/assistant/icon.d.ts +21 -0
  15. package/declaration/src/editor/layout/assistant/skills.d.ts +33 -0
  16. package/declaration/src/editor/layout/assistant/watcher.d.ts +43 -0
  17. package/declaration/src/editor/layout/assistant.d.ts +142 -0
  18. package/declaration/src/editor/layout/console.d.ts +33 -0
  19. package/declaration/src/editor/layout/toolbar.d.ts +2 -0
  20. package/declaration/src/editor/layout.d.ts +22 -0
  21. package/declaration/src/editor/main.d.ts +19 -0
  22. package/declaration/src/editor/menu.d.ts +1 -0
  23. package/declaration/src/mcp/mcp.d.ts +46 -2
  24. package/declaration/src/mcp/meshes/decals.d.ts +28 -0
  25. package/declaration/src/mcp/play/keys.d.ts +26 -0
  26. package/declaration/src/mcp/play/play.d.ts +29 -0
  27. package/declaration/src/mcp/screenshot.d.ts +3 -2
  28. package/declaration/src/mcp/scripts/scripts.d.ts +3 -3
  29. package/declaration/src/mcp/scripts/values.d.ts +33 -0
  30. package/declaration/src/mcp/server.d.ts +49 -0
  31. package/declaration/src/mcp/tools/resolve.d.ts +1 -0
  32. package/declaration/src/project/agent-data.d.ts +21 -0
  33. package/declaration/src/project/save/save.d.ts +2 -0
  34. package/declaration/src/tools/local-storage.d.ts +20 -0
  35. package/declaration/src/tools/node-pty.d.ts +25 -5
  36. package/declaration/src/tools/scene/play/override.d.ts +6 -0
  37. package/declaration/src/ui/toolbar.d.ts +5 -1
  38. package/package.json +1 -1
@@ -0,0 +1,21 @@
1
+ /**
2
+ * Defines the name of the folder, at the root of the project, where the AI agents write the automation scripts they
3
+ * run in the editor (see the "write_agent_script" and "run_agent_script" MCP tools).
4
+ */
5
+ export declare const agentDataDirectoryName = "agentdata";
6
+ /**
7
+ * Returns the absolute path of the folder where the AI agents write their automation scripts.
8
+ * @param projectPath defines the absolute path of the project file (".bjseditor").
9
+ */
10
+ export declare function getAgentDataDirectory(projectPath: string): string;
11
+ /**
12
+ * Returns the absolute path of the folder where the automation scripts of the AI agents are compiled.
13
+ * @param projectPath defines the absolute path of the project file (".bjseditor").
14
+ */
15
+ export declare function getAgentScriptsBuildDirectory(projectPath: string): string;
16
+ /**
17
+ * Removes the automation scripts of the AI agents from the project, once an agent finished its work: they only help it
18
+ * build content, and what they create lives in the scene. Never throws: a folder in use is removed the next time.
19
+ * @param projectPath defines the absolute path of the project file (".bjseditor"), if a project is open.
20
+ */
21
+ export declare function removeAgentData(projectPath: string | null): Promise<void>;
@@ -2,3 +2,5 @@ import { Editor } from "../../editor/main";
2
2
  import { IEditorProject } from "../typings";
3
3
  export declare function saveProject(editor: Editor): Promise<void>;
4
4
  export declare function saveProjectConfiguration(editor: Editor): Promise<Partial<IEditorProject>>;
5
+ export declare function isSavingProject(): boolean;
6
+ export declare function getLastProjectSaveEndTime(): number;
@@ -36,3 +36,23 @@ export declare function tryGetTerminalFromLocalStorage(): string | null;
36
36
  * @param terminalPath defines the terminal path to set in the local storage.
37
37
  */
38
38
  export declare function trySetTerminalInLocalStorage(terminalPath: string): void;
39
+ /**
40
+ * Returns the identifier of the agent the user chose to run in the AI assistant, or null if none was chosen yet.
41
+ */
42
+ export declare function tryGetAssistantAgentFromLocalStorage(): string | null;
43
+ /**
44
+ * Sets the identifier of the agent the user chose to run in the AI assistant in the local storage.
45
+ * @param agent defines the identifier of the agent, like "claude", "codex" or "antigravity".
46
+ */
47
+ export declare function trySetAssistantAgentInLocalStorage(agent: string): void;
48
+ /**
49
+ * Returns the path of the executable of the given agent chosen by the user, or null to find it automatically.
50
+ * @param agent defines the identifier of the agent, like "claude", "codex" or "antigravity".
51
+ */
52
+ export declare function tryGetAssistantExecutablePathFromLocalStorage(agent: string): string | null;
53
+ /**
54
+ * Sets the path of the executable of the given agent chosen by the user in the local storage.
55
+ * @param agent defines the identifier of the agent, like "claude", "codex" or "antigravity".
56
+ * @param path defines the absolute path of the executable, or null to find it automatically.
57
+ */
58
+ export declare function trySetAssistantExecutablePathInLocalStorage(agent: string, path: string | null): void;
@@ -1,16 +1,28 @@
1
1
  import { IPtyForkOptions, IWindowsPtyForkOptions } from "node-pty";
2
2
  import { Observable } from "babylonjs";
3
+ export interface INodePtyExecutableOptions {
4
+ /**
5
+ * Defines wether or not the shell stays open for the user to type commands. The given command is then not run.
6
+ */
7
+ interactive?: boolean;
8
+ /**
9
+ * Defines the absolute path to an executable to spawn instead of the shell of the user. The process is then
10
+ * always interactive: the given command is ignored and the executable runs until it exits or is killed.
11
+ */
12
+ file?: string;
13
+ /**
14
+ * Defines the arguments given to the executable set in "file". On Windows, they can also be given as an already
15
+ * escaped command line.
16
+ */
17
+ args?: string[] | string;
18
+ }
3
19
  /**
4
20
  * Creates a new node-pty instance.
5
21
  * @param command The command to run in the pty process.
6
22
  * @param options The options to pass to the pty process.
7
23
  * @returns A promise that resolves with the node-pty instance.
8
24
  */
9
- export declare function execNodePty(command: string, options?: IPtyForkOptions | IWindowsPtyForkOptions | (IPtyForkOptions & {
10
- interactive?: boolean;
11
- }) | (IWindowsPtyForkOptions & {
12
- interactive?: boolean;
13
- })): Promise<NodePtyInstance>;
25
+ export declare function execNodePty(command: string, options?: (IPtyForkOptions | IWindowsPtyForkOptions) & INodePtyExecutableOptions): Promise<NodePtyInstance>;
14
26
  export declare class NodePtyInstance {
15
27
  /**
16
28
  * The id of the node-pty instance.
@@ -24,6 +36,10 @@ export declare class NodePtyInstance {
24
36
  * An observable that is triggered when data is received from the pty.
25
37
  */
26
38
  onGetDataObservable: Observable<string>;
39
+ /**
40
+ * An observable that is triggered when the pty process exited, with its exit code.
41
+ */
42
+ onExitObservable: Observable<number>;
27
43
  private _exited;
28
44
  private _exitCode;
29
45
  /**
@@ -31,6 +47,10 @@ export declare class NodePtyInstance {
31
47
  * @param id The id of the node-pty instance.
32
48
  */
33
49
  constructor(id: string);
50
+ /**
51
+ * Gets wether or not the pty process exited.
52
+ */
53
+ get exited(): boolean;
34
54
  /**
35
55
  * Writes data to the pty.
36
56
  * @param data The data to write.
@@ -5,3 +5,9 @@ import { Editor } from "../../../editor/main";
5
5
  */
6
6
  export declare function restorePlayOverrides(editor: Editor): void;
7
7
  export declare function applyOverrides(editor: Editor): void;
8
+ /**
9
+ * Waits for the given duration with the timers of the editor. While the game plays, "window.setTimeout" is the one of
10
+ * the game, whose timers are cleared when it stops: a wait started with it never ends if the game stops meanwhile.
11
+ * @param duration defines the duration to wait, in milliseconds.
12
+ */
13
+ export declare function waitWithEditorTimers(duration: number): Promise<void>;
@@ -1,4 +1,8 @@
1
- import { PropsWithChildren } from "react";
1
+ import { PropsWithChildren, ReactNode } from "react";
2
2
  export interface IToolbarComponentProps extends PropsWithChildren {
3
+ /**
4
+ * Defines the content displayed on the right of the toolbar, before the buttons of the window.
5
+ */
6
+ right?: ReactNode;
3
7
  }
4
8
  export declare function ToolbarComponent(props: IToolbarComponentProps): import("react/jsx-runtime").JSX.Element;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "babylonjs-editor",
3
- "version": "5.5.1",
3
+ "version": "5.5.2",
4
4
  "description": "Babylon.js Editor is a Web Application helping artists to work with Babylon.js",
5
5
  "productName": "Babylon.js Editor",
6
6
  "main": "build/src/index.js",