@cotal-ai/connector-claude-code 0.70.0 → 0.71.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/hook.cjs +724 -15412
- package/dist/index.js +12 -4
- package/dist/mcp.cjs +96 -85
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -18,10 +18,13 @@ import {
|
|
|
18
18
|
} from "@cotal-ai/core";
|
|
19
19
|
|
|
20
20
|
// ../connector-core/dist/config.js
|
|
21
|
-
import { DEFAULT_SERVER, DEV_OWNER, LAUNCH_MATERIAL_ENV, discardLaunchMaterial, assertLifecycleToken, assertValidChannel, channelInAllow, credsClaims, eventChannel, idFromCreds, isConcreteChannel, loadAgentFile, parseJoinLink,
|
|
21
|
+
import { DEFAULT_SERVER, DEV_OWNER, LAUNCH_MATERIAL_ENV as LAUNCH_MATERIAL_ENV2, discardLaunchMaterial, assertLifecycleToken, assertValidChannel, channelInAllow, credsClaims, eventChannel, idFromCreds, isConcreteChannel, loadAgentFile, parseJoinLink, resolveReadAcl } from "@cotal-ai/core";
|
|
22
|
+
|
|
23
|
+
// ../connector-core/dist/session-env.js
|
|
24
|
+
import { LAUNCH_MATERIAL_ENV, readLaunchMaterial } from "@cotal-ai/core/launch-material";
|
|
22
25
|
|
|
23
26
|
// ../connector-core/dist/agent.js
|
|
24
|
-
import { normalizeMentions, RUN_LAUNCH_DEADLINE_MS, subjectMatches, isConcreteChannel as isConcreteChannel2, assertValidChannel as assertValidChannel2, channelInAllow as channelInAllow2, resolvePeer as resolvePeerInRoster, peerLabel as peerLabel2, CotalEndpoint, BASELINE_LIFECYCLE_ENDPOINT as BASELINE_LIFECYCLE_ENDPOINT2, BIND_SPLIT_REISSUES, assertLifecycleToken as assertLifecycleToken3, EpEnvelopeError, isPublishPermissionDenied, unansweredRequest, renderLifecycleBlocked, controlReplyFrom,
|
|
27
|
+
import { normalizeMentions, RUN_LAUNCH_DEADLINE_MS, subjectMatches, isConcreteChannel as isConcreteChannel2, assertValidChannel as assertValidChannel2, channelInAllow as channelInAllow2, resolvePeer as resolvePeerInRoster, peerLabel as peerLabel2, CotalEndpoint, BASELINE_LIFECYCLE_ENDPOINT as BASELINE_LIFECYCLE_ENDPOINT2, BIND_SPLIT_REISSUES, assertLifecycleToken as assertLifecycleToken3, EpEnvelopeError, isPublishPermissionDenied, unansweredRequest, renderLifecycleBlocked, controlReplyFrom, runAgentBearer, partsToText, assertValidRole } from "@cotal-ai/core";
|
|
25
28
|
|
|
26
29
|
// ../connector-core/dist/framing.js
|
|
27
30
|
import { peerLabel } from "@cotal-ai/core";
|
|
@@ -46,7 +49,7 @@ function controlEndpoint(space, name, token = randomBytes(32).toString("base64ur
|
|
|
46
49
|
}
|
|
47
50
|
|
|
48
51
|
// ../connector-core/dist/launch.js
|
|
49
|
-
import { eventChannel as eventChannel2, LAUNCH_MATERIAL_ENV as
|
|
52
|
+
import { eventChannel as eventChannel2, LAUNCH_MATERIAL_ENV as LAUNCH_MATERIAL_ENV3, parsePrincipalKey, principalKey, writeLaunchMaterial } from "@cotal-ai/core";
|
|
50
53
|
import { EVENT_CHANNEL_PREFIX, eventChannel as eventChannel3, eventChannelPrincipal, isEventChannel } from "@cotal-ai/core";
|
|
51
54
|
var OS_ENV_ALLOW = [
|
|
52
55
|
"PATH",
|
|
@@ -115,6 +118,11 @@ var OPERATOR_ENV_KEEP = [
|
|
|
115
118
|
"COTAL_ORCA_BIN"
|
|
116
119
|
];
|
|
117
120
|
function launchEnv(opts = {}) {
|
|
121
|
+
for (const k of opts.envAllow ?? []) {
|
|
122
|
+
const name = k.toUpperCase();
|
|
123
|
+
if (name.startsWith("COTAL_") && !OPERATOR_ENV_KEEP.some((keep) => keep === name))
|
|
124
|
+
throw new Error(`spawn.env cannot list "${k}": the launcher sets COTAL_ names for each seat, and only the machine-wide ones such as COTAL_HOME cross from the spawning process`);
|
|
125
|
+
}
|
|
118
126
|
const env = {};
|
|
119
127
|
const sourceKey = /* @__PURE__ */ new Map();
|
|
120
128
|
for (const k of Object.keys(process.env))
|
|
@@ -175,7 +183,7 @@ function materialEnv(opts) {
|
|
|
175
183
|
material.userAuth = opts.userAuth;
|
|
176
184
|
if (Object.keys(material).length === 0)
|
|
177
185
|
return {};
|
|
178
|
-
return { [
|
|
186
|
+
return { [LAUNCH_MATERIAL_ENV3]: writeLaunchMaterial(material) };
|
|
179
187
|
}
|
|
180
188
|
var ENV_REFERENCE = /\$\{([A-Za-z_][A-Za-z0-9_]*)(?::-[^}]*)?\}/g;
|
|
181
189
|
function mcpServerEnvKeys(servers) {
|