@cotal-ai/connector-opencode 0.92.2 → 0.93.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/index.js +37 -7
- package/dist/plugin/index.js +313 -183
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -6897,7 +6897,7 @@ import { DEFAULT_SERVER, DEV_OWNER, LAUNCH_MATERIAL_ENV as LAUNCH_MATERIAL_ENV2,
|
|
|
6897
6897
|
import { LAUNCH_MATERIAL_ENV, readLaunchMaterial } from "@cotal-ai/core/launch-material";
|
|
6898
6898
|
|
|
6899
6899
|
// ../connector-core/dist/agent.js
|
|
6900
|
-
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";
|
|
6900
|
+
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";
|
|
6901
6901
|
|
|
6902
6902
|
// ../connector-core/dist/framing.js
|
|
6903
6903
|
import { peerLabel } from "@cotal-ai/core/peer-label";
|
|
@@ -6928,7 +6928,7 @@ function controlEndpoint(space, name, token = randomBytes(32).toString("base64ur
|
|
|
6928
6928
|
// ../connector-core/dist/launch.js
|
|
6929
6929
|
import { eventChannel as eventChannel2, LAUNCH_MATERIAL_ENV as LAUNCH_MATERIAL_ENV3, parsePrincipalKey, principalKey, writeLaunchMaterial } from "@cotal-ai/core";
|
|
6930
6930
|
import { dirname } from "node:path";
|
|
6931
|
-
import { EVENT_CHANNEL_PREFIX, eventChannel as eventChannel3, eventChannelPrincipal, isEventChannel } from "@cotal-ai/core";
|
|
6931
|
+
import { EVENT_CHANNEL_PREFIX, eventChannel as eventChannel3, eventChannelPrincipal as eventChannelPrincipal2, isEventChannel } from "@cotal-ai/core";
|
|
6932
6932
|
var OS_ENV_ALLOW = [
|
|
6933
6933
|
"PATH",
|
|
6934
6934
|
"HOME",
|
|
@@ -7240,6 +7240,9 @@ function registerAguiFramePartRenderer() {
|
|
|
7240
7240
|
}
|
|
7241
7241
|
registerAguiFramePartRenderer();
|
|
7242
7242
|
|
|
7243
|
+
// ../connector-core/dist/control.js
|
|
7244
|
+
var MAX_FRAME_BYTES = 1 << 20;
|
|
7245
|
+
|
|
7243
7246
|
// ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/classic/external.js
|
|
7244
7247
|
var external_exports = {};
|
|
7245
7248
|
__export(external_exports, {
|
|
@@ -23500,15 +23503,42 @@ if (typeof global.crypto === "undefined") {
|
|
|
23500
23503
|
var MAX_DRAIN_BYTES = 64 * 1024 * 1024;
|
|
23501
23504
|
|
|
23502
23505
|
// ../connector-core/dist/gateway.js
|
|
23503
|
-
import { assertValidName } from "@cotal-ai/core";
|
|
23506
|
+
import { assertValidName, conversationSelection, SELECTION_MAX_ITEMS } from "@cotal-ai/core";
|
|
23507
|
+
var GATEWAY_TOOLS = /* @__PURE__ */ new Set([
|
|
23508
|
+
"cotal_orientation",
|
|
23509
|
+
"cotal_connection_status",
|
|
23510
|
+
"cotal_roster",
|
|
23511
|
+
"cotal_docs",
|
|
23512
|
+
"cotal_inbox",
|
|
23513
|
+
"cotal_send",
|
|
23514
|
+
"cotal_dm",
|
|
23515
|
+
"cotal_anycast",
|
|
23516
|
+
"cotal_status",
|
|
23517
|
+
"cotal_channel_info",
|
|
23518
|
+
"cotal_channels",
|
|
23519
|
+
"cotal_channel_mode",
|
|
23520
|
+
"cotal_join",
|
|
23521
|
+
"cotal_leave"
|
|
23522
|
+
]);
|
|
23523
|
+
var NATIVE_GATEWAY_TOOLS = /* @__PURE__ */ new Set([
|
|
23524
|
+
...GATEWAY_TOOLS,
|
|
23525
|
+
"cotal_spawn",
|
|
23526
|
+
"cotal_persona",
|
|
23527
|
+
"cotal_personas",
|
|
23528
|
+
"cotal_despawn",
|
|
23529
|
+
"cotal_run",
|
|
23530
|
+
"cotal_reconnect"
|
|
23531
|
+
]);
|
|
23532
|
+
var SELECTION_SHAPE = {
|
|
23533
|
+
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."),
|
|
23534
|
+
role: external_exports.string().min(1).optional().describe("A role to hold, so role requests (cotal_anycast) reach this connection."),
|
|
23535
|
+
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.")
|
|
23536
|
+
};
|
|
23504
23537
|
var CONNECTION_ID = external_exports.string().min(1).describe("The connection_id cotal_connect returned in THIS conversation. Never reuse another conversation's.");
|
|
23505
23538
|
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.";
|
|
23506
|
-
var GATEWAY_CONNECTING = "Cotal connects this conversation to the person's Cotal space. Call cotal_connect
|
|
23539
|
+
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.";
|
|
23507
23540
|
var GATEWAY_INSTRUCTIONS = `${GATEWAY_CONNECTING} ${GATEWAY_LISTENING}`;
|
|
23508
23541
|
|
|
23509
|
-
// ../connector-core/dist/control.js
|
|
23510
|
-
var MAX_FRAME_BYTES = 1 << 20;
|
|
23511
|
-
|
|
23512
23542
|
// src/opencode-line.ts
|
|
23513
23543
|
function opencodeLine(raw, bin) {
|
|
23514
23544
|
const m = raw.match(/(?:^|v)(\d+)\.\d+/);
|