@cotal-ai/connector-jcode 0.86.0 → 0.88.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/dist/extension.d.ts.map +1 -1
- package/dist/host.js +1661 -1276
- package/dist/index.js +15 -4
- package/dist/mcp.js +608 -497
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -6950,6 +6950,7 @@ function controlEndpoint(space, name, token = randomBytes(32).toString("base64ur
|
|
|
6950
6950
|
|
|
6951
6951
|
// ../connector-core/dist/launch.js
|
|
6952
6952
|
import { eventChannel as eventChannel2, LAUNCH_MATERIAL_ENV as LAUNCH_MATERIAL_ENV3, parsePrincipalKey, principalKey, writeLaunchMaterial } from "@cotal-ai/core";
|
|
6953
|
+
import { dirname } from "node:path";
|
|
6953
6954
|
import { EVENT_CHANNEL_PREFIX, eventChannel as eventChannel3, eventChannelPrincipal, isEventChannel } from "@cotal-ai/core";
|
|
6954
6955
|
var OS_ENV_ALLOW = [
|
|
6955
6956
|
"PATH",
|
|
@@ -7065,7 +7066,7 @@ function connectorLaunchOptions(connector, launchOptions) {
|
|
|
7065
7066
|
throw new Error(`${connector} connector: launch option key ${JSON.stringify(k)} is not a valid flag name`);
|
|
7066
7067
|
return Object.entries(launchOptions);
|
|
7067
7068
|
}
|
|
7068
|
-
function materialEnv(opts) {
|
|
7069
|
+
function materialEnv(opts, artifacts) {
|
|
7069
7070
|
if (opts.userAuth && opts.creds)
|
|
7070
7071
|
throw new Error("launch: creds (static auth) and userAuth (user-mode auth) are mutually exclusive \u2014 one launch carries one identity plane");
|
|
7071
7072
|
const material = {};
|
|
@@ -7083,7 +7084,9 @@ function materialEnv(opts) {
|
|
|
7083
7084
|
material.userAuth = opts.userAuth;
|
|
7084
7085
|
if (Object.keys(material).length === 0)
|
|
7085
7086
|
return {};
|
|
7086
|
-
|
|
7087
|
+
const path2 = writeLaunchMaterial(material);
|
|
7088
|
+
artifacts.push(dirname(path2));
|
|
7089
|
+
return { [LAUNCH_MATERIAL_ENV3]: path2 };
|
|
7087
7090
|
}
|
|
7088
7091
|
function launchArmsEvents(opts) {
|
|
7089
7092
|
return opts.events !== false || opts.eventsRequired === true;
|
|
@@ -24467,7 +24470,6 @@ var jcodeConnector = {
|
|
|
24467
24470
|
const env = {
|
|
24468
24471
|
...launchEnv({ envAllow: opts.envAllow }),
|
|
24469
24472
|
...aclEnv(opts),
|
|
24470
|
-
...materialEnv({ creds: opts.creds, servers: opts.servers, controlToken: control.token, eventsRequired: opts.eventsRequired, userAuth: opts.userAuth }),
|
|
24471
24473
|
COTAL_SPACE: opts.space,
|
|
24472
24474
|
COTAL_NAME: opts.name,
|
|
24473
24475
|
COTAL_CONTROL_SOCKET: control.path,
|
|
@@ -24505,7 +24507,16 @@ var jcodeConnector = {
|
|
|
24505
24507
|
throw new Error(
|
|
24506
24508
|
`jcode connector: launch options are not supported by the Harness API host (first option: ${launchOptions[0][0]})`
|
|
24507
24509
|
);
|
|
24508
|
-
|
|
24510
|
+
const artifacts = [];
|
|
24511
|
+
Object.assign(env, materialEnv({ creds: opts.creds, servers: opts.servers, controlToken: control.token, eventsRequired: opts.eventsRequired, userAuth: opts.userAuth }, artifacts));
|
|
24512
|
+
return {
|
|
24513
|
+
command: HOST_COMMAND,
|
|
24514
|
+
args: [HOST_ENTRY],
|
|
24515
|
+
env,
|
|
24516
|
+
control,
|
|
24517
|
+
...opts.resume ? { resumeRecordPath: jcodeForkRecordPath(seatHome) } : {},
|
|
24518
|
+
...artifacts.length > 0 ? { artifacts } : {}
|
|
24519
|
+
};
|
|
24509
24520
|
}
|
|
24510
24521
|
};
|
|
24511
24522
|
registry3.register(jcodeConnector);
|