@evref-bl/plexus 0.15.2 → 0.16.0
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 +8 -12
- package/dist/cli.js +8 -183
- package/dist/cli.js.map +1 -1
- package/dist/commandLine.d.ts +13 -0
- package/dist/commandLine.d.ts.map +1 -0
- package/dist/commandLine.js +247 -0
- package/dist/commandLine.js.map +1 -0
- package/dist/config/pharoMcpVersion.d.ts +6 -7
- package/dist/config/pharoMcpVersion.d.ts.map +1 -1
- package/dist/config/pharoMcpVersion.js +6 -7
- package/dist/config/pharoMcpVersion.js.map +1 -1
- package/dist/errors.d.ts +11 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/errors.js +17 -0
- package/dist/errors.js.map +1 -0
- package/dist/forward/endpointHandoffFormat.d.ts +23 -0
- package/dist/forward/endpointHandoffFormat.d.ts.map +1 -0
- package/dist/forward/endpointHandoffFormat.js.map +1 -0
- package/dist/forward/index.d.ts +20 -0
- package/dist/forward/index.d.ts.map +1 -0
- package/dist/forward/index.js +77 -0
- package/dist/forward/index.js.map +1 -0
- package/dist/forward/jsonRpc.d.ts +20 -0
- package/dist/forward/jsonRpc.d.ts.map +1 -0
- package/dist/forward/jsonRpc.js +141 -0
- package/dist/forward/jsonRpc.js.map +1 -0
- package/dist/home.d.ts +15 -0
- package/dist/home.d.ts.map +1 -0
- package/dist/home.js +30 -0
- package/dist/home.js.map +1 -0
- package/dist/images/bases.d.ts +40 -0
- package/dist/images/bases.d.ts.map +1 -0
- package/dist/images/bases.js +190 -0
- package/dist/images/bases.js.map +1 -0
- package/dist/images/claims.d.ts +34 -0
- package/dist/images/claims.d.ts.map +1 -0
- package/dist/images/claims.js +119 -0
- package/dist/images/claims.js.map +1 -0
- package/dist/images/context.d.ts +22 -0
- package/dist/images/context.d.ts.map +1 -0
- package/dist/images/context.js +26 -0
- package/dist/images/context.js.map +1 -0
- package/dist/images/create.d.ts +19 -0
- package/dist/images/create.d.ts.map +1 -0
- package/dist/images/create.js +121 -0
- package/dist/images/create.js.map +1 -0
- package/dist/images/delete.d.ts +10 -0
- package/dist/images/delete.d.ts.map +1 -0
- package/dist/images/delete.js +31 -0
- package/dist/images/delete.js.map +1 -0
- package/dist/images/endpoint.d.ts +17 -0
- package/dist/images/endpoint.d.ts.map +1 -0
- package/dist/images/endpoint.js +58 -0
- package/dist/images/endpoint.js.map +1 -0
- package/dist/images/index.d.ts +28 -0
- package/dist/images/index.d.ts.map +1 -0
- package/dist/images/index.js +51 -0
- package/dist/images/index.js.map +1 -0
- package/dist/images/leftovers.d.ts +9 -0
- package/dist/images/leftovers.d.ts.map +1 -0
- package/dist/images/leftovers.js +38 -0
- package/dist/images/leftovers.js.map +1 -0
- package/dist/images/list.d.ts +12 -0
- package/dist/images/list.d.ts.map +1 -0
- package/dist/images/list.js +74 -0
- package/dist/images/list.js.map +1 -0
- package/dist/images/names.d.ts +15 -0
- package/dist/images/names.d.ts.map +1 -0
- package/dist/images/names.js +53 -0
- package/dist/images/names.js.map +1 -0
- package/dist/images/prepare.d.ts +18 -0
- package/dist/images/prepare.d.ts.map +1 -0
- package/dist/images/prepare.js +58 -0
- package/dist/images/prepare.js.map +1 -0
- package/dist/images/processes.d.ts +21 -0
- package/dist/images/processes.d.ts.map +1 -0
- package/dist/images/processes.js +83 -0
- package/dist/images/processes.js.map +1 -0
- package/dist/images/scripts.d.ts +39 -0
- package/dist/images/scripts.d.ts.map +1 -0
- package/dist/images/scripts.js +127 -0
- package/dist/images/scripts.js.map +1 -0
- package/dist/images/start.d.ts +23 -0
- package/dist/images/start.d.ts.map +1 -0
- package/dist/images/start.js +173 -0
- package/dist/images/start.js.map +1 -0
- package/dist/images/stop.d.ts +11 -0
- package/dist/images/stop.d.ts.map +1 -0
- package/dist/images/stop.js +42 -0
- package/dist/images/stop.js.map +1 -0
- package/dist/images/store.d.ts +62 -0
- package/dist/images/store.d.ts.map +1 -0
- package/dist/images/store.js +180 -0
- package/dist/images/store.js.map +1 -0
- package/dist/images/templates.d.ts +14 -0
- package/dist/images/templates.d.ts.map +1 -0
- package/dist/images/templates.js +84 -0
- package/dist/images/templates.js.map +1 -0
- package/dist/index.d.ts +12 -22
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +8 -22
- package/dist/index.js.map +1 -1
- package/dist/launcher/pharoLauncherMcpClient.d.ts +22 -59
- package/dist/launcher/pharoLauncherMcpClient.d.ts.map +1 -1
- package/dist/launcher/pharoLauncherMcpClient.js +121 -98
- package/dist/launcher/pharoLauncherMcpClient.js.map +1 -1
- package/dist/launcher/pharoLauncherProfile.d.ts +5 -32
- package/dist/launcher/pharoLauncherProfile.d.ts.map +1 -1
- package/dist/launcher/pharoLauncherProfile.js +17 -115
- package/dist/launcher/pharoLauncherProfile.js.map +1 -1
- package/dist/mcp/server.d.ts +18 -0
- package/dist/mcp/server.d.ts.map +1 -0
- package/dist/mcp/server.js +206 -0
- package/dist/mcp/server.js.map +1 -0
- package/dist/types.d.ts +68 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +2 -0
- package/dist/types.js.map +1 -0
- package/dist/version.d.ts +2 -0
- package/dist/version.d.ts.map +1 -0
- package/dist/version.js +5 -0
- package/dist/version.js.map +1 -0
- package/package.json +3 -12
- package/dist/config/config.d.ts +0 -15
- package/dist/config/config.d.ts.map +0 -1
- package/dist/config/config.js +0 -74
- package/dist/config/config.js.map +0 -1
- package/dist/config/plexusHome.d.ts +0 -17
- package/dist/config/plexusHome.d.ts.map +0 -1
- package/dist/config/plexusHome.js +0 -30
- package/dist/config/plexusHome.js.map +0 -1
- package/dist/config/projectConfig.d.ts +0 -141
- package/dist/config/projectConfig.d.ts.map +0 -1
- package/dist/config/projectConfig.js +0 -722
- package/dist/config/projectConfig.js.map +0 -1
- package/dist/config/projectConfigAuthoring.d.ts +0 -53
- package/dist/config/projectConfigAuthoring.d.ts.map +0 -1
- package/dist/config/projectConfigAuthoring.js +0 -159
- package/dist/config/projectConfigAuthoring.js.map +0 -1
- package/dist/gateway/projectImageMcpEndpoint.d.ts +0 -23
- package/dist/gateway/projectImageMcpEndpoint.d.ts.map +0 -1
- package/dist/gateway/projectImageMcpEndpoint.js +0 -40
- package/dist/gateway/projectImageMcpEndpoint.js.map +0 -1
- package/dist/gateway/server/index.d.ts +0 -8
- package/dist/gateway/server/index.d.ts.map +0 -1
- package/dist/gateway/server/index.js +0 -34
- package/dist/gateway/server/index.js.map +0 -1
- package/dist/gateway/server/mcp/server.d.ts +0 -66
- package/dist/gateway/server/mcp/server.d.ts.map +0 -1
- package/dist/gateway/server/mcp/server.js +0 -458
- package/dist/gateway/server/mcp/server.js.map +0 -1
- package/dist/gateway/server/routing/endpointHandoffFormat.d.ts +0 -26
- package/dist/gateway/server/routing/endpointHandoffFormat.d.ts.map +0 -1
- package/dist/gateway/server/routing/endpointHandoffFormat.js.map +0 -1
- package/dist/gateway/server/routing/gateway.d.ts +0 -167
- package/dist/gateway/server/routing/gateway.d.ts.map +0 -1
- package/dist/gateway/server/routing/gateway.js +0 -863
- package/dist/gateway/server/routing/gateway.js.map +0 -1
- package/dist/gateway/server/routing/imageMcpRouter.d.ts +0 -59
- package/dist/gateway/server/routing/imageMcpRouter.d.ts.map +0 -1
- package/dist/gateway/server/routing/imageMcpRouter.js +0 -253
- package/dist/gateway/server/routing/imageMcpRouter.js.map +0 -1
- package/dist/gateway/server/routing/pharoFacade.d.ts +0 -12
- package/dist/gateway/server/routing/pharoFacade.d.ts.map +0 -1
- package/dist/gateway/server/routing/pharoFacade.js +0 -67
- package/dist/gateway/server/routing/pharoFacade.js.map +0 -1
- package/dist/gateway/server/routing/routeDiscovery.d.ts +0 -26
- package/dist/gateway/server/routing/routeDiscovery.d.ts.map +0 -1
- package/dist/gateway/server/routing/routeDiscovery.js +0 -46
- package/dist/gateway/server/routing/routeDiscovery.js.map +0 -1
- package/dist/gateway/server/routing/routingTable.d.ts +0 -120
- package/dist/gateway/server/routing/routingTable.d.ts.map +0 -1
- package/dist/gateway/server/routing/routingTable.js +0 -215
- package/dist/gateway/server/routing/routingTable.js.map +0 -1
- package/dist/gateway/server/support/processLiveness.d.ts +0 -10
- package/dist/gateway/server/support/processLiveness.d.ts.map +0 -1
- package/dist/gateway/server/support/processLiveness.js +0 -25
- package/dist/gateway/server/support/processLiveness.js.map +0 -1
- package/dist/gateway/server/support/sourceBuildPreflight.d.ts +0 -15
- package/dist/gateway/server/support/sourceBuildPreflight.d.ts.map +0 -1
- package/dist/gateway/server/support/sourceBuildPreflight.js +0 -88
- package/dist/gateway/server/support/sourceBuildPreflight.js.map +0 -1
- package/dist/gateway/server/support/toolResultFormatting.d.ts +0 -8
- package/dist/gateway/server/support/toolResultFormatting.d.ts.map +0 -1
- package/dist/gateway/server/support/toolResultFormatting.js +0 -74
- package/dist/gateway/server/support/toolResultFormatting.js.map +0 -1
- package/dist/images/homeImageCache.d.ts +0 -302
- package/dist/images/homeImageCache.d.ts.map +0 -1
- package/dist/images/homeImageCache.js +0 -1031
- package/dist/images/homeImageCache.js.map +0 -1
- package/dist/images/imageRescue.d.ts +0 -151
- package/dist/images/imageRescue.d.ts.map +0 -1
- package/dist/images/imageRescue.js +0 -748
- package/dist/images/imageRescue.js.map +0 -1
- package/dist/images/imageRuntime.d.ts +0 -60
- package/dist/images/imageRuntime.d.ts.map +0 -1
- package/dist/images/imageRuntime.js +0 -90
- package/dist/images/imageRuntime.js.map +0 -1
- package/dist/images/preparedImageCache.d.ts +0 -86
- package/dist/images/preparedImageCache.d.ts.map +0 -1
- package/dist/images/preparedImageCache.js +0 -229
- package/dist/images/preparedImageCache.js.map +0 -1
- package/dist/images/scopedTemplateCatalog.d.ts +0 -33
- package/dist/images/scopedTemplateCatalog.d.ts.map +0 -1
- package/dist/images/scopedTemplateCatalog.js +0 -363
- package/dist/images/scopedTemplateCatalog.js.map +0 -1
- package/dist/internal.d.ts +0 -20
- package/dist/internal.d.ts.map +0 -1
- package/dist/internal.js +0 -20
- package/dist/internal.js.map +0 -1
- package/dist/launcher/scopedPharoLauncherServer.d.ts +0 -349
- package/dist/launcher/scopedPharoLauncherServer.d.ts.map +0 -1
- package/dist/launcher/scopedPharoLauncherServer.js +0 -1307
- package/dist/launcher/scopedPharoLauncherServer.js.map +0 -1
- package/dist/lifecycle/startProjectImage.d.ts +0 -94
- package/dist/lifecycle/startProjectImage.d.ts.map +0 -1
- package/dist/lifecycle/startProjectImage.js +0 -1054
- package/dist/lifecycle/startProjectImage.js.map +0 -1
- package/dist/lifecycle/stopProjectImage.d.ts +0 -31
- package/dist/lifecycle/stopProjectImage.d.ts.map +0 -1
- package/dist/lifecycle/stopProjectImage.js +0 -201
- package/dist/lifecycle/stopProjectImage.js.map +0 -1
- package/dist/mcp/agentServer.d.ts +0 -15
- package/dist/mcp/agentServer.d.ts.map +0 -1
- package/dist/mcp/agentServer.js +0 -67
- package/dist/mcp/agentServer.js.map +0 -1
- package/dist/mcp/imageOperations.d.ts +0 -54
- package/dist/mcp/imageOperations.d.ts.map +0 -1
- package/dist/mcp/imageOperations.js +0 -223
- package/dist/mcp/imageOperations.js.map +0 -1
- package/dist/mcp/pharoMcpHealth.d.ts +0 -26
- package/dist/mcp/pharoMcpHealth.d.ts.map +0 -1
- package/dist/mcp/pharoMcpHealth.js +0 -97
- package/dist/mcp/pharoMcpHealth.js.map +0 -1
- package/dist/support/pathStyle.d.ts +0 -11
- package/dist/support/pathStyle.d.ts.map +0 -1
- package/dist/support/pathStyle.js +0 -61
- package/dist/support/pathStyle.js.map +0 -1
- package/dist/support/toolResultFormatting.d.ts +0 -8
- package/dist/support/toolResultFormatting.d.ts.map +0 -1
- package/dist/support/toolResultFormatting.js +0 -74
- package/dist/support/toolResultFormatting.js.map +0 -1
- package/dist/workspace/projectStartupScript.d.ts +0 -73
- package/dist/workspace/projectStartupScript.d.ts.map +0 -1
- package/dist/workspace/projectStartupScript.js +0 -607
- package/dist/workspace/projectStartupScript.js.map +0 -1
- package/dist/workspace/projectState.d.ts +0 -216
- package/dist/workspace/projectState.d.ts.map +0 -1
- package/dist/workspace/projectState.js +0 -172
- package/dist/workspace/projectState.js.map +0 -1
- /package/dist/{gateway/server/routing → forward}/endpointHandoffFormat.js +0 -0
package/dist/index.d.ts
CHANGED
|
@@ -1,25 +1,15 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* What PLexus promises
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
* moves under semver. Everything else is behind `@evref-bl/plexus/internal`,
|
|
6
|
-
* which promises nothing and may change in any release — it is there for this
|
|
7
|
-
* repository's own scripts, and for a consumer that knowingly reaches past the
|
|
8
|
-
* contract.
|
|
9
|
-
*
|
|
10
|
-
* The split is by module rather than by name, because a function is only
|
|
11
|
-
* usable when the types in its signature can be named too. Narrowing further
|
|
12
|
-
* means splitting those modules, not hiding names out of them.
|
|
13
|
-
*
|
|
14
|
-
* `packageExports.test.ts` holds the list. Adding a name to this surface is a
|
|
15
|
-
* decision, so it fails until the list says so.
|
|
2
|
+
* What PLexus promises: everything reachable from here is API and moves under
|
|
3
|
+
* semver. `packageExports.test.ts` holds the list, so a name added here is a
|
|
4
|
+
* decision written down there.
|
|
16
5
|
*/
|
|
17
|
-
export
|
|
18
|
-
export
|
|
19
|
-
export
|
|
20
|
-
export
|
|
21
|
-
export
|
|
22
|
-
export
|
|
23
|
-
export
|
|
24
|
-
export
|
|
6
|
+
export { defaultPharoMcpVersion } from "./config/pharoMcpVersion.js";
|
|
7
|
+
export { PlexusError, type PlexusErrorCode } from "./errors.js";
|
|
8
|
+
export { callTool, listTools } from "./forward/index.js";
|
|
9
|
+
export { plexusHome } from "./home.js";
|
|
10
|
+
export { Images } from "./images/index.js";
|
|
11
|
+
export type { CreateResult } from "./images/create.js";
|
|
12
|
+
export type { StartResult } from "./images/start.js";
|
|
13
|
+
export type { LauncherPort } from "./launcher/pharoLauncherMcpClient.js";
|
|
14
|
+
export type { CreateOptions, Display, Endpoint, ImageInfo, ImagesOptions, StartOptions, Template, } from "./types.js";
|
|
25
15
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AACrE,OAAO,EAAE,WAAW,EAAE,KAAK,eAAe,EAAE,MAAM,aAAa,CAAC;AAChE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AACvC,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC3C,YAAY,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AACvD,YAAY,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AACrD,YAAY,EAAE,YAAY,EAAE,MAAM,sCAAsC,CAAC;AACzE,YAAY,EACV,aAAa,EACb,OAAO,EACP,QAAQ,EACR,SAAS,EACT,aAAa,EACb,YAAY,EACZ,QAAQ,GACT,MAAM,YAAY,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,25 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* What PLexus promises
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
* moves under semver. Everything else is behind `@evref-bl/plexus/internal`,
|
|
6
|
-
* which promises nothing and may change in any release — it is there for this
|
|
7
|
-
* repository's own scripts, and for a consumer that knowingly reaches past the
|
|
8
|
-
* contract.
|
|
9
|
-
*
|
|
10
|
-
* The split is by module rather than by name, because a function is only
|
|
11
|
-
* usable when the types in its signature can be named too. Narrowing further
|
|
12
|
-
* means splitting those modules, not hiding names out of them.
|
|
13
|
-
*
|
|
14
|
-
* `packageExports.test.ts` holds the list. Adding a name to this surface is a
|
|
15
|
-
* decision, so it fails until the list says so.
|
|
2
|
+
* What PLexus promises: everything reachable from here is API and moves under
|
|
3
|
+
* semver. `packageExports.test.ts` holds the list, so a name added here is a
|
|
4
|
+
* decision written down there.
|
|
16
5
|
*/
|
|
17
|
-
export
|
|
18
|
-
export
|
|
19
|
-
export
|
|
20
|
-
export
|
|
21
|
-
export
|
|
22
|
-
export * from "./lifecycle/stopProjectImage.js";
|
|
23
|
-
export * from "./lifecycle/startProjectImage.js";
|
|
24
|
-
export * from "./workspace/projectState.js";
|
|
6
|
+
export { defaultPharoMcpVersion } from "./config/pharoMcpVersion.js";
|
|
7
|
+
export { PlexusError } from "./errors.js";
|
|
8
|
+
export { callTool, listTools } from "./forward/index.js";
|
|
9
|
+
export { plexusHome } from "./home.js";
|
|
10
|
+
export { Images } from "./images/index.js";
|
|
25
11
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AACrE,OAAO,EAAE,WAAW,EAAwB,MAAM,aAAa,CAAC;AAChE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AACvC,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC"}
|
|
@@ -1,66 +1,29 @@
|
|
|
1
|
+
import { type PharoLauncher } from "@evref-bl/pharo-launcher-mcp/launcher";
|
|
2
|
+
export type { LauncherCommandResult, LauncherProcess, } from "@evref-bl/pharo-launcher-mcp/launcher";
|
|
3
|
+
/** What PLexus asks of the launcher. Tests give a fake one. */
|
|
4
|
+
export type LauncherPort = Pick<PharoLauncher, "createImage" | "startImage" | "listProcesses" | "killProcess" | "listTemplateCategories" | "listTemplates" | "updateTemplates">;
|
|
5
|
+
export declare const longCommandTimeoutMs: number;
|
|
6
|
+
export declare function openLauncherPort(home: string): LauncherPort;
|
|
1
7
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
* package answers those names as functions now, so the call is a call: no
|
|
6
|
-
* process, no handshake, and no object stringified into a text block for the
|
|
7
|
-
* other side to parse back. Asking the host what it is running went from
|
|
8
|
-
* 175ms to the 46ms the question itself costs.
|
|
9
|
-
*
|
|
10
|
-
* The names stay because PLexus uses them: an operation that needs approval is
|
|
11
|
-
* described before it is performed, and what it names is a tool.
|
|
8
|
+
* What the launcher said went wrong, trimmed: a diagnostic built from
|
|
9
|
+
* launcher output can run to pages. A launch whose VM stopped with its own
|
|
10
|
+
* fatal-error report also says how to renew that VM.
|
|
12
11
|
*/
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
export declare class PharoLauncherMcpToolError extends Error {
|
|
19
|
-
readonly toolName: string;
|
|
20
|
-
readonly result: unknown;
|
|
21
|
-
constructor(message: string, toolName: string, result: unknown);
|
|
22
|
-
}
|
|
23
|
-
export interface OpenPharoLauncherClientOptions {
|
|
24
|
-
/** The profile this caller works in, as the launcher's own variables. */
|
|
25
|
-
profileEnvironment?: Record<string, string> | undefined;
|
|
26
|
-
}
|
|
27
|
-
export declare function launcherToolFailureMessage(toolName: string, payload: unknown): string;
|
|
12
|
+
export declare function launcherFailureMessage(operation: keyof LauncherPort, payload: unknown): string;
|
|
13
|
+
/** The launcher's report of a launch: which VM, which pid, which logs. */
|
|
14
|
+
export declare function launchReport(result: unknown): string;
|
|
15
|
+
/** The VM a detached launch started, as the launcher reports its pid. */
|
|
16
|
+
export declare function launchedPid(result: unknown): number | undefined;
|
|
28
17
|
/**
|
|
29
|
-
* The
|
|
30
|
-
*
|
|
31
|
-
* The launcher's own test keeps its thirteen tools and thirteen functions
|
|
32
|
-
* level with each other. This table is the third list, and it is here rather
|
|
33
|
-
* than there because the names are PLexus's vocabulary: they appear in the
|
|
34
|
-
* plans it shows for approval and in what it reports when one fails.
|
|
18
|
+
* The end of what a waited launch's VM wrote, where it says why it stopped:
|
|
19
|
+
* its errors first, then its output, each trimmed like a diagnostic.
|
|
35
20
|
*/
|
|
36
|
-
export declare
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
readonly pharo_launcher_image_copy_between_profiles: "copyImageBetweenProfiles";
|
|
40
|
-
readonly pharo_launcher_image_create: "createImage";
|
|
41
|
-
readonly pharo_launcher_image_delete: "deleteImage";
|
|
42
|
-
readonly pharo_launcher_image_info: "imageInfo";
|
|
43
|
-
readonly pharo_launcher_image_list: "listImages";
|
|
44
|
-
readonly pharo_launcher_image_start: "startImage";
|
|
45
|
-
readonly pharo_launcher_process_kill: "killProcess";
|
|
46
|
-
readonly pharo_launcher_process_list: "listProcesses";
|
|
47
|
-
readonly pharo_launcher_template_category_list: "listTemplateCategories";
|
|
48
|
-
readonly pharo_launcher_template_list: "listTemplates";
|
|
49
|
-
readonly pharo_launcher_template_update: "updateTemplates";
|
|
50
|
-
};
|
|
51
|
-
export type LauncherToolName = keyof typeof launcherMethodForTool;
|
|
52
|
-
type LauncherMethodFor<K extends LauncherToolName> = PharoLauncher[(typeof launcherMethodForTool)[K]];
|
|
53
|
-
/** What that tool takes, read off the function it calls. */
|
|
54
|
-
export type LauncherToolInput<K extends LauncherToolName> = Parameters<LauncherMethodFor<K>>[0];
|
|
55
|
-
/** What that tool answers, read off the function it calls. */
|
|
56
|
-
export type LauncherToolResult<K extends LauncherToolName> = Awaited<ReturnType<LauncherMethodFor<K>>>;
|
|
21
|
+
export declare function launchOutputTail(result: unknown): string[];
|
|
22
|
+
/** The log files a detached launch writes the VM's output to. */
|
|
23
|
+
export declare function launchLogPaths(result: unknown): string[];
|
|
57
24
|
/**
|
|
58
|
-
*
|
|
59
|
-
*
|
|
60
|
-
* answers with an `ok`, which is what the caller checks afterwards.
|
|
25
|
+
* What a detached launch's logs say about a VM that stopped: the renewal hint
|
|
26
|
+
* when it stopped with its own fatal-error report, or nothing.
|
|
61
27
|
*/
|
|
62
|
-
export
|
|
63
|
-
export declare const launcherToolNames: LauncherToolName[];
|
|
64
|
-
export declare function openPharoLauncherClient(options?: OpenPharoLauncherClientOptions): PharoLauncherMcpToolClient;
|
|
65
|
-
export {};
|
|
28
|
+
export declare function exitedLaunchHint(result: unknown, logPaths: readonly string[]): string | undefined;
|
|
66
29
|
//# sourceMappingURL=pharoLauncherMcpClient.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pharoLauncherMcpClient.d.ts","sourceRoot":"","sources":["../../src/launcher/pharoLauncherMcpClient.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"pharoLauncherMcpClient.d.ts","sourceRoot":"","sources":["../../src/launcher/pharoLauncherMcpClient.ts"],"names":[],"mappings":"AAKA,OAAO,EAEL,KAAK,aAAa,EACnB,MAAM,uCAAuC,CAAC;AAI/C,YAAY,EACV,qBAAqB,EACrB,eAAe,GAChB,MAAM,uCAAuC,CAAC;AAE/C,+DAA+D;AAC/D,MAAM,MAAM,YAAY,GAAG,IAAI,CAC7B,aAAa,EACX,aAAa,GACb,YAAY,GACZ,eAAe,GACf,aAAa,GACb,wBAAwB,GACxB,eAAe,GACf,iBAAiB,CACpB,CAAC;AAIF,eAAO,MAAM,oBAAoB,QAAc,CAAC;AAEhD,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,YAAY,CAkB3D;AAkBD;;;;GAIG;AACH,wBAAgB,sBAAsB,CACpC,SAAS,EAAE,MAAM,YAAY,EAC7B,OAAO,EAAE,OAAO,GACf,MAAM,CAYR;AAaD,0EAA0E;AAC1E,wBAAgB,YAAY,CAAC,MAAM,EAAE,OAAO,GAAG,MAAM,CAUpD;AAED,yEAAyE;AACzE,wBAAgB,WAAW,CAAC,MAAM,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS,CAG/D;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,OAAO,GAAG,MAAM,EAAE,CAkB1D;AAED,iEAAiE;AACjE,wBAAgB,cAAc,CAAC,MAAM,EAAE,OAAO,GAAG,MAAM,EAAE,CAMxD;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,MAAM,EAAE,GAAG,MAAM,GAAG,SAAS,CAGjG"}
|
|
@@ -1,125 +1,148 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* How PLexus reaches the launcher
|
|
3
|
-
*
|
|
4
|
-
* It used to spawn `pharo-launcher-mcp` and send tool names over stdio. The
|
|
5
|
-
* package answers those names as functions now, so the call is a call: no
|
|
6
|
-
* process, no handshake, and no object stringified into a text block for the
|
|
7
|
-
* other side to parse back. Asking the host what it is running went from
|
|
8
|
-
* 175ms to the 46ms the question itself costs.
|
|
9
|
-
*
|
|
10
|
-
* The names stay because PLexus uses them: an operation that needs approval is
|
|
11
|
-
* described before it is performed, and what it names is a tool.
|
|
2
|
+
* How PLexus reaches the launcher: pharo-launcher-mcp's functions, called in
|
|
3
|
+
* this process on PLexus's one profile.
|
|
12
4
|
*/
|
|
5
|
+
import fs from "node:fs";
|
|
13
6
|
import { openPharoLauncher, } from "@evref-bl/pharo-launcher-mcp/launcher";
|
|
7
|
+
import { homeProfileEnvironment } from "./pharoLauncherProfile.js";
|
|
14
8
|
import { vmRenewalHint } from "./vmRenewal.js";
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
}
|
|
9
|
+
// The launcher gives a command 30 s. Downloading a template, or a launch that
|
|
10
|
+
// waits while an image loads MCP and saves, takes minutes.
|
|
11
|
+
export const longCommandTimeoutMs = 60 * 60_000;
|
|
12
|
+
export function openLauncherPort(home) {
|
|
13
|
+
const env = homeProfileEnvironment(home);
|
|
14
|
+
let quick;
|
|
15
|
+
let long;
|
|
16
|
+
const quickLauncher = () => (quick ??= openPharoLauncher({ env }));
|
|
17
|
+
const longLauncher = () => (long ??= openPharoLauncher({ env, timeoutMs: longCommandTimeoutMs }));
|
|
18
|
+
return {
|
|
19
|
+
createImage: (input) => longLauncher().createImage(input),
|
|
20
|
+
startImage: (input) => (input.detached ? quickLauncher() : longLauncher()).startImage(input),
|
|
21
|
+
listProcesses: (input) => quickLauncher().listProcesses(input),
|
|
22
|
+
killProcess: (input) => quickLauncher().killProcess(input),
|
|
23
|
+
listTemplateCategories: (input) => quickLauncher().listTemplateCategories(input),
|
|
24
|
+
listTemplates: (input) => quickLauncher().listTemplates(input),
|
|
25
|
+
updateTemplates: (input) => quickLauncher().updateTemplates(input),
|
|
26
|
+
};
|
|
24
27
|
}
|
|
25
|
-
const
|
|
26
|
-
function
|
|
27
|
-
if (!payload
|
|
28
|
+
const failureDetailLength = 500;
|
|
29
|
+
function detailField(payload, key) {
|
|
30
|
+
if (!isRecord(payload)) {
|
|
28
31
|
return undefined;
|
|
29
32
|
}
|
|
30
33
|
const value = payload[key];
|
|
31
|
-
if (typeof value !== "string") {
|
|
34
|
+
if (typeof value !== "string" || !value.trim()) {
|
|
32
35
|
return undefined;
|
|
33
36
|
}
|
|
34
37
|
const detail = value.trim();
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
}
|
|
38
|
-
return detail.length > launcherFailureDetailLength
|
|
39
|
-
? `${detail.slice(0, launcherFailureDetailLength)}…`
|
|
38
|
+
return detail.length > failureDetailLength
|
|
39
|
+
? `${detail.slice(0, failureDetailLength)}…`
|
|
40
40
|
: detail;
|
|
41
41
|
}
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
failureDetailField(payload, "action"),
|
|
51
|
-
]
|
|
42
|
+
/**
|
|
43
|
+
* What the launcher said went wrong, trimmed: a diagnostic built from
|
|
44
|
+
* launcher output can run to pages. A launch whose VM stopped with its own
|
|
45
|
+
* fatal-error report also says how to renew that VM.
|
|
46
|
+
*/
|
|
47
|
+
export function launcherFailureMessage(operation, payload) {
|
|
48
|
+
const detail = detailField(payload, "message") ??
|
|
49
|
+
[detailField(payload, "diagnostic"), detailField(payload, "action")]
|
|
52
50
|
.filter(Boolean)
|
|
53
51
|
.join(" ");
|
|
54
52
|
const message = detail
|
|
55
|
-
? `
|
|
56
|
-
: `
|
|
57
|
-
const renewal =
|
|
53
|
+
? `Pharo Launcher ${operation} failed: ${detail}`
|
|
54
|
+
: `Pharo Launcher ${operation} failed`;
|
|
55
|
+
const renewal = operation === "startImage" ? waitedLaunchRenewalHint(payload) : undefined;
|
|
58
56
|
return renewal ? `${message}\n${renewal}` : message;
|
|
59
57
|
}
|
|
60
|
-
// A launch that waited for its VM has the VM's output in the
|
|
61
|
-
//
|
|
62
|
-
function
|
|
63
|
-
if (
|
|
64
|
-
return undefined;
|
|
65
|
-
}
|
|
66
|
-
const raw = payload.raw;
|
|
67
|
-
if (!raw || typeof raw !== "object") {
|
|
58
|
+
// A launch that waited for its VM has the VM's output in the raw result,
|
|
59
|
+
// after the launcher's own report of which VM it ran.
|
|
60
|
+
function waitedLaunchRenewalHint(payload) {
|
|
61
|
+
if (!isRecord(payload) || !isRecord(payload.raw)) {
|
|
68
62
|
return undefined;
|
|
69
63
|
}
|
|
70
|
-
const { stdout, stderr } = raw;
|
|
64
|
+
const { stdout, stderr } = payload.raw;
|
|
71
65
|
const report = typeof stdout === "string" ? stdout : "";
|
|
72
|
-
|
|
73
|
-
|
|
66
|
+
return vmRenewalHint(`${report}\n${typeof stderr === "string" ? stderr : ""}`, report);
|
|
67
|
+
}
|
|
68
|
+
/** The launcher's report of a launch: which VM, which pid, which logs. */
|
|
69
|
+
export function launchReport(result) {
|
|
70
|
+
if (!isRecord(result)) {
|
|
71
|
+
return "";
|
|
72
|
+
}
|
|
73
|
+
if (isRecord(result.raw) && typeof result.raw.stdout === "string") {
|
|
74
|
+
return result.raw.stdout;
|
|
75
|
+
}
|
|
76
|
+
return isRecord(result.data) && typeof result.data.message === "string"
|
|
77
|
+
? result.data.message
|
|
78
|
+
: "";
|
|
79
|
+
}
|
|
80
|
+
/** The VM a detached launch started, as the launcher reports its pid. */
|
|
81
|
+
export function launchedPid(result) {
|
|
82
|
+
const pid = /^Detached profile-scoped Pharo image pid (\d+)\./m.exec(launchReport(result))?.[1];
|
|
83
|
+
return pid === undefined ? undefined : Number(pid);
|
|
74
84
|
}
|
|
75
85
|
/**
|
|
76
|
-
* The
|
|
77
|
-
*
|
|
78
|
-
* The launcher's own test keeps its thirteen tools and thirteen functions
|
|
79
|
-
* level with each other. This table is the third list, and it is here rather
|
|
80
|
-
* than there because the names are PLexus's vocabulary: they appear in the
|
|
81
|
-
* plans it shows for approval and in what it reports when one fails.
|
|
86
|
+
* The end of what a waited launch's VM wrote, where it says why it stopped:
|
|
87
|
+
* its errors first, then its output, each trimmed like a diagnostic.
|
|
82
88
|
*/
|
|
83
|
-
export
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
typeof result === "object" &&
|
|
102
|
-
result.ok === false);
|
|
89
|
+
export function launchOutputTail(result) {
|
|
90
|
+
if (!isRecord(result) || !isRecord(result.raw)) {
|
|
91
|
+
return [];
|
|
92
|
+
}
|
|
93
|
+
const streams = [
|
|
94
|
+
["Its error output ends with:", result.raw.stderr],
|
|
95
|
+
["Its output ends with:", result.raw.stdout],
|
|
96
|
+
];
|
|
97
|
+
return streams.flatMap(([label, text]) => {
|
|
98
|
+
const trimmed = typeof text === "string" ? text.trim() : "";
|
|
99
|
+
if (!trimmed) {
|
|
100
|
+
return [];
|
|
101
|
+
}
|
|
102
|
+
const tail = trimmed.length > failureDetailLength
|
|
103
|
+
? `…${trimmed.slice(-failureDetailLength)}`
|
|
104
|
+
: trimmed;
|
|
105
|
+
return [`${label}\n${tail}`];
|
|
106
|
+
});
|
|
103
107
|
}
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
108
|
+
/** The log files a detached launch writes the VM's output to. */
|
|
109
|
+
export function launchLogPaths(result) {
|
|
110
|
+
const paths = launchReport(result)
|
|
111
|
+
.split(/\r?\n/)
|
|
112
|
+
.map((line) => /^(?:stdout|stderr):\s*(\S.*)$/.exec(line.trim())?.[1])
|
|
113
|
+
.filter((value) => value !== undefined);
|
|
114
|
+
return [...new Set(paths)];
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* What a detached launch's logs say about a VM that stopped: the renewal hint
|
|
118
|
+
* when it stopped with its own fatal-error report, or nothing.
|
|
119
|
+
*/
|
|
120
|
+
export function exitedLaunchHint(result, logPaths) {
|
|
121
|
+
const report = launchReport(result);
|
|
122
|
+
return report ? vmRenewalHint(logPaths.map(logTail).join("\n"), report) : undefined;
|
|
123
|
+
}
|
|
124
|
+
// The end of a log, where a VM that stopped wrote why. A log that is gone says
|
|
125
|
+
// nothing.
|
|
126
|
+
function logTail(logPath) {
|
|
127
|
+
const tailLength = 64 * 1024;
|
|
128
|
+
try {
|
|
129
|
+
const size = fs.statSync(logPath).size;
|
|
130
|
+
const descriptor = fs.openSync(logPath, "r");
|
|
131
|
+
try {
|
|
132
|
+
const length = Math.min(size, tailLength);
|
|
133
|
+
const buffer = Buffer.alloc(length);
|
|
134
|
+
fs.readSync(descriptor, buffer, 0, length, size - length);
|
|
135
|
+
return buffer.toString("utf8");
|
|
136
|
+
}
|
|
137
|
+
finally {
|
|
138
|
+
fs.closeSync(descriptor);
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
catch {
|
|
142
|
+
return "";
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
function isRecord(value) {
|
|
146
|
+
return Boolean(value) && typeof value === "object" && !Array.isArray(value);
|
|
124
147
|
}
|
|
125
148
|
//# sourceMappingURL=pharoLauncherMcpClient.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pharoLauncherMcpClient.js","sourceRoot":"","sources":["../../src/launcher/pharoLauncherMcpClient.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"pharoLauncherMcpClient.js","sourceRoot":"","sources":["../../src/launcher/pharoLauncherMcpClient.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,EACL,iBAAiB,GAElB,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AACnE,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAmB/C,8EAA8E;AAC9E,2DAA2D;AAC3D,MAAM,CAAC,MAAM,oBAAoB,GAAG,EAAE,GAAG,MAAM,CAAC;AAEhD,MAAM,UAAU,gBAAgB,CAAC,IAAY;IAC3C,MAAM,GAAG,GAAG,sBAAsB,CAAC,IAAI,CAAC,CAAC;IACzC,IAAI,KAAgC,CAAC;IACrC,IAAI,IAA+B,CAAC;IACpC,MAAM,aAAa,GAAG,GAAkB,EAAE,CAAC,CAAC,KAAK,KAAK,iBAAiB,CAAC,EAAE,GAAG,EAAE,CAAC,CAAC,CAAC;IAClF,MAAM,YAAY,GAAG,GAAkB,EAAE,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IAAI,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;AACtF,CAAC;AAED,+EAA+E;AAC/E,WAAW;AACX,SAAS,OAAO,CAAC,OAAe;IAC9B,MAAM,UAAU,GAAG,EAAE,GAAG,IAAI,CAAC;IAC7B,IAAI,CAAC;QACH,MAAM,IAAI,GAAG,EAAE,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC;QACvC,MAAM,UAAU,GAAG,EAAE,CAAC,QAAQ,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC;QAC7C,IAAI,CAAC;YACH,MAAM,MAAM,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,UAAU,CAAC,CAAC;YAC1C,MAAM,MAAM,GAAG,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;YACpC,EAAE,CAAC,QAAQ,CAAC,UAAU,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,IAAI,GAAG,MAAM,CAAC,CAAC;YAC1D,OAAO,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;QACjC,CAAC;gBAAS,CAAC;YACT,EAAE,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;QAC3B,CAAC;IACH,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,EAAE,CAAC;IACZ,CAAC;AACH,CAAC;AAED,SAAS,QAAQ,CAAC,KAAc;IAC9B,OAAO,OAAO,CAAC,KAAK,CAAC,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;AAC9E,CAAC"}
|
|
@@ -1,35 +1,8 @@
|
|
|
1
|
-
import { type ProjectConfig } from "../config/projectConfig.js";
|
|
2
|
-
export type PharoLauncherMcpProfileOwnership = "plexus-owned" | "external" | "unknown";
|
|
3
|
-
export interface PharoLauncherMcpProfilePaths {
|
|
4
|
-
profileName?: string;
|
|
5
|
-
stateRoot?: string;
|
|
6
|
-
launcherImage?: string;
|
|
7
|
-
imagesDir?: string;
|
|
8
|
-
vmsDir?: string;
|
|
9
|
-
templateSourcesDir?: string;
|
|
10
|
-
initScriptsDir?: string;
|
|
11
|
-
logsDir?: string;
|
|
12
|
-
launcherConfiguration?: string;
|
|
13
|
-
}
|
|
14
|
-
export interface PharoLauncherMcpProfileDiagnostic extends PharoLauncherMcpProfilePaths {
|
|
15
|
-
ownership: PharoLauncherMcpProfileOwnership;
|
|
16
|
-
mode: "project-owned" | "external";
|
|
17
|
-
profileScope: "project" | "explicit-override" | "external" | "unknown";
|
|
18
|
-
environmentKeys: string[];
|
|
19
|
-
reason: string;
|
|
20
|
-
}
|
|
21
|
-
export interface ResolvePharoLauncherMcpProfileOptions {
|
|
22
|
-
projectRoot: string;
|
|
23
|
-
config: ProjectConfig;
|
|
24
|
-
workspaceId: string;
|
|
25
|
-
stateRoot?: string;
|
|
26
|
-
env?: NodeJS.ProcessEnv;
|
|
27
|
-
}
|
|
28
1
|
/**
|
|
29
|
-
*
|
|
30
|
-
*
|
|
2
|
+
* PLexus's one launcher profile, as the launcher's own variables.
|
|
3
|
+
*
|
|
4
|
+
* One profile, so the launcher image, the VMs and the templates, which are
|
|
5
|
+
* large and the same for every image, exist once per home.
|
|
31
6
|
*/
|
|
32
|
-
export declare function
|
|
33
|
-
export declare function pharoLauncherMcpProfileEnvironment(options: ResolvePharoLauncherMcpProfileOptions): Record<string, string> | undefined;
|
|
34
|
-
export declare function describePharoLauncherMcpProfile(options: ResolvePharoLauncherMcpProfileOptions): PharoLauncherMcpProfileDiagnostic;
|
|
7
|
+
export declare function homeProfileEnvironment(home: string): Record<string, string>;
|
|
35
8
|
//# sourceMappingURL=pharoLauncherProfile.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pharoLauncherProfile.d.ts","sourceRoot":"","sources":["../../src/launcher/pharoLauncherProfile.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"pharoLauncherProfile.d.ts","sourceRoot":"","sources":["../../src/launcher/pharoLauncherProfile.ts"],"names":[],"mappings":"AAGA;;;;;GAKG;AACH,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAiB3E"}
|