@cotal-ai/connector-codex 0.92.2 → 0.94.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.
Files changed (3) hide show
  1. package/dist/host.js +313 -183
  2. package/dist/index.js +37 -7
  3. package/package.json +3 -3
package/dist/index.js CHANGED
@@ -6901,7 +6901,7 @@ import { DEFAULT_SERVER, DEV_OWNER, LAUNCH_MATERIAL_ENV as LAUNCH_MATERIAL_ENV2,
6901
6901
  import { LAUNCH_MATERIAL_ENV, readLaunchMaterial } from "@cotal-ai/core/launch-material";
6902
6902
 
6903
6903
  // ../connector-core/dist/agent.js
6904
- import { normalizeMentions, RUN_LAUNCH_DEADLINE_MS, subjectMatches, isConcreteChannel as isConcreteChannel2, assertValidChannel as assertValidChannel2, channelInAllow as channelInAllow2, resolvePeer as resolvePeerInRoster, peerLabel as peerLabel2, CotalEndpoint, acquireLocalConsumer, BASELINE_LIFECYCLE_ENDPOINT as BASELINE_LIFECYCLE_ENDPOINT2, BIND_SPLIT_REISSUES, assertLifecycleToken as assertLifecycleToken2, EpEnvelopeError as EpEnvelopeError2, isPublishPermissionDenied, unansweredRequest, controlReplyFrom, controlReplyFromThrown, runAgentBearer, partsToText, assertValidRole } from "@cotal-ai/core";
6904
+ import { normalizeMentions, RUN_LAUNCH_DEADLINE_MS, subjectMatches, isConcreteChannel as isConcreteChannel2, assertValidChannel as assertValidChannel2, channelInAllow as channelInAllow2, eventChannelPrincipal, resolvePeer as resolvePeerInRoster, peerLabel as peerLabel2, CotalEndpoint, acquireLocalConsumer, BASELINE_LIFECYCLE_ENDPOINT as BASELINE_LIFECYCLE_ENDPOINT2, BIND_SPLIT_REISSUES, assertLifecycleToken as assertLifecycleToken2, EpEnvelopeError as EpEnvelopeError2, isPublishPermissionDenied, unansweredRequest, controlReplyFrom, controlReplyFromThrown, runAgentBearer, partsToText, assertValidRole } from "@cotal-ai/core";
6905
6905
 
6906
6906
  // ../connector-core/dist/framing.js
6907
6907
  import { peerLabel } from "@cotal-ai/core/peer-label";
@@ -6932,7 +6932,7 @@ function controlEndpoint(space, name, token = randomBytes(32).toString("base64ur
6932
6932
  // ../connector-core/dist/launch.js
6933
6933
  import { eventChannel as eventChannel2, LAUNCH_MATERIAL_ENV as LAUNCH_MATERIAL_ENV3, parsePrincipalKey, principalKey, writeLaunchMaterial } from "@cotal-ai/core";
6934
6934
  import { dirname } from "node:path";
6935
- import { EVENT_CHANNEL_PREFIX, eventChannel as eventChannel3, eventChannelPrincipal, isEventChannel } from "@cotal-ai/core";
6935
+ import { EVENT_CHANNEL_PREFIX, eventChannel as eventChannel3, eventChannelPrincipal as eventChannelPrincipal2, isEventChannel } from "@cotal-ai/core";
6936
6936
  var OS_ENV_ALLOW = [
6937
6937
  "PATH",
6938
6938
  "HOME",
@@ -7237,6 +7237,9 @@ function registerAguiFramePartRenderer() {
7237
7237
  }
7238
7238
  registerAguiFramePartRenderer();
7239
7239
 
7240
+ // ../connector-core/dist/control.js
7241
+ var MAX_FRAME_BYTES = 1 << 20;
7242
+
7240
7243
  // ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/classic/external.js
7241
7244
  var external_exports = {};
7242
7245
  __export(external_exports, {
@@ -23497,15 +23500,42 @@ if (typeof global.crypto === "undefined") {
23497
23500
  var MAX_DRAIN_BYTES = 64 * 1024 * 1024;
23498
23501
 
23499
23502
  // ../connector-core/dist/gateway.js
23500
- import { assertValidName } from "@cotal-ai/core";
23503
+ import { assertValidName, conversationSelection, SELECTION_MAX_ITEMS } from "@cotal-ai/core";
23504
+ var GATEWAY_TOOLS = /* @__PURE__ */ new Set([
23505
+ "cotal_orientation",
23506
+ "cotal_connection_status",
23507
+ "cotal_roster",
23508
+ "cotal_docs",
23509
+ "cotal_inbox",
23510
+ "cotal_send",
23511
+ "cotal_dm",
23512
+ "cotal_anycast",
23513
+ "cotal_status",
23514
+ "cotal_channel_info",
23515
+ "cotal_channels",
23516
+ "cotal_channel_mode",
23517
+ "cotal_join",
23518
+ "cotal_leave"
23519
+ ]);
23520
+ var NATIVE_GATEWAY_TOOLS = /* @__PURE__ */ new Set([
23521
+ ...GATEWAY_TOOLS,
23522
+ "cotal_spawn",
23523
+ "cotal_persona",
23524
+ "cotal_personas",
23525
+ "cotal_despawn",
23526
+ "cotal_run",
23527
+ "cotal_reconnect"
23528
+ ]);
23529
+ var SELECTION_SHAPE = {
23530
+ channels: external_exports.array(external_exports.strictObject({ channel: external_exports.string().min(1), access: external_exports.enum(["read", "read-post"]) })).max(SELECTION_MAX_ITEMS).optional().describe("Channels this connection may join and read, or read and post to. No wildcards."),
23531
+ role: external_exports.string().min(1).optional().describe("A role to hold, so role requests (cotal_anycast) reach this connection."),
23532
+ capabilities: external_exports.array(external_exports.enum(["spawn", "run"])).optional().describe("spawn: start and stop agents through a manager. run: start and manage workflow runs.")
23533
+ };
23501
23534
  var CONNECTION_ID = external_exports.string().min(1).describe("The connection_id cotal_connect returned in THIS conversation. Never reuse another conversation's.");
23502
23535
  var GATEWAY_LISTENING = "Messages reach you only when you call a tool: to listen, call cotal_wait, which returns as soon as a message arrives. When the person asks you to stay on Cotal or keep listening, call cotal_wait again each time it returns and handle each message as it arrives, until they ask you to stop.";
23503
- var GATEWAY_CONNECTING = "Cotal connects this conversation to the person's Cotal space. Call cotal_connect once with a short name for this conversation, then pass the returned connection_id on every other cotal tool call. Each conversation needs its own connection. Never reuse another conversation's connection_id.";
23536
+ var GATEWAY_CONNECTING = "Cotal connects this conversation to the person's Cotal space after they approve its permissions. Call cotal_connect with a short name. If approval is pending, show the person its link and wait for their decision; do not approve for them or poll. Then resume the same request as directed. Only a successful connection returns connection_id, required on every other cotal tool call. Each conversation needs its own connection. Never reuse another conversation's connection_id or approval_id.";
23504
23537
  var GATEWAY_INSTRUCTIONS = `${GATEWAY_CONNECTING} ${GATEWAY_LISTENING}`;
23505
23538
 
23506
- // ../connector-core/dist/control.js
23507
- var MAX_FRAME_BYTES = 1 << 20;
23508
-
23509
23539
  // src/extension.ts
23510
23540
  var FROM_BUILD = import.meta.url.includes("/dist/");
23511
23541
  var HOST_ENTRY = fileURLToPath(new URL(`./${FROM_BUILD ? "host.js" : "host-main.ts"}`, import.meta.url));
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cotal-ai/connector-codex",
3
3
  "description": "Cotal connector for OpenAI Codex: a host-mode peer driving codex app-server, with Codex's own TUI attached and the cotal_* tools served over a loopback MCP endpoint.",
4
- "version": "0.92.2",
4
+ "version": "0.94.0",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
7
7
  "type": "git",
@@ -21,8 +21,8 @@
21
21
  "@cotal-ai/core": ">=0.1.0"
22
22
  },
23
23
  "devDependencies": {
24
- "@cotal-ai/connector-core": "0.92.2",
25
- "@cotal-ai/core": "0.92.2",
24
+ "@cotal-ai/connector-core": "0.94.0",
25
+ "@cotal-ai/core": "0.94.0",
26
26
  "@cotal-ai/smoke-kit": "0.0.0",
27
27
  "@modelcontextprotocol/sdk": "^1.29.0",
28
28
  "@nats-io/transport-node": "^3.4.0",