@cotal-ai/connector-hermes 0.85.0 → 0.87.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.
@@ -1 +1 @@
1
- {"version":3,"file":"extension.d.ts","sourceRoot":"","sources":["../src/extension.ts"],"names":[],"mappings":"AAGA,OAAO,EAAY,KAAK,SAAS,EAAoC,MAAM,gBAAgB,CAAC;AAkB5F,eAAO,MAAM,oBAAoB,EAAE,SAAS,MAAM,EAQjD,CAAC;AAEF;;;;;;;;;GASG;AACH,eAAO,MAAM,eAAe,EAAE,SA8E7B,CAAC"}
1
+ {"version":3,"file":"extension.d.ts","sourceRoot":"","sources":["../src/extension.ts"],"names":[],"mappings":"AAGA,OAAO,EAAY,KAAK,SAAS,EAAoC,MAAM,gBAAgB,CAAC;AAkB5F,eAAO,MAAM,oBAAoB,EAAE,SAAS,MAAM,EAQjD,CAAC;AAEF;;;;;;;;;GASG;AACH,eAAO,MAAM,eAAe,EAAE,SAuF7B,CAAC"}
package/dist/index.js CHANGED
@@ -6900,7 +6900,7 @@ import { LAUNCH_MATERIAL_ENV, readLaunchMaterial } from "@cotal-ai/core/launch-m
6900
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";
6901
6901
 
6902
6902
  // ../connector-core/dist/framing.js
6903
- import { peerLabel } from "@cotal-ai/core";
6903
+ import { peerLabel } from "@cotal-ai/core/peer-label";
6904
6904
 
6905
6905
  // ../connector-core/dist/manager-call.js
6906
6906
  import { BASELINE_LIFECYCLE_ENDPOINT, EpEnvelopeError, dialerFor, goalFollowRefusal, invokeCommand, isPermissionDenied, issuedUserCaller, managerCallerBinding, replyRefusedBeforeEffect, resolveService, standaloneConnectOpts } from "@cotal-ai/core";
@@ -6914,6 +6914,7 @@ var SUN_PATH_MAX_BYTES = process.platform === "darwin" ? 104 : 108;
6914
6914
 
6915
6915
  // ../connector-core/dist/launch.js
6916
6916
  import { eventChannel as eventChannel2, LAUNCH_MATERIAL_ENV as LAUNCH_MATERIAL_ENV3, parsePrincipalKey, principalKey, writeLaunchMaterial } from "@cotal-ai/core";
6917
+ import { dirname } from "node:path";
6917
6918
  import { EVENT_CHANNEL_PREFIX, eventChannel as eventChannel3, eventChannelPrincipal, isEventChannel } from "@cotal-ai/core";
6918
6919
  var OS_ENV_ALLOW = [
6919
6920
  "PATH",
@@ -7026,7 +7027,7 @@ function aclEnv(opts) {
7026
7027
  env.COTAL_CAPABILITIES = opts.capabilities.join(",");
7027
7028
  return env;
7028
7029
  }
7029
- function materialEnv(opts) {
7030
+ function materialEnv(opts, artifacts) {
7030
7031
  if (opts.userAuth && opts.creds)
7031
7032
  throw new Error("launch: creds (static auth) and userAuth (user-mode auth) are mutually exclusive \u2014 one launch carries one identity plane");
7032
7033
  const material = {};
@@ -7044,7 +7045,9 @@ function materialEnv(opts) {
7044
7045
  material.userAuth = opts.userAuth;
7045
7046
  if (Object.keys(material).length === 0)
7046
7047
  return {};
7047
- return { [LAUNCH_MATERIAL_ENV3]: writeLaunchMaterial(material) };
7048
+ const path = writeLaunchMaterial(material);
7049
+ artifacts.push(dirname(path));
7050
+ return { [LAUNCH_MATERIAL_ENV3]: path };
7048
7051
  }
7049
7052
 
7050
7053
  // ../connector-core/dist/agui.js
@@ -21726,7 +21729,7 @@ function date4(params) {
21726
21729
  config(en_default());
21727
21730
 
21728
21731
  // ../connector-core/dist/tool-specs.js
21729
- import { isConcreteChannel as isConcreteChannel3, channelInAllow as channelInAllow3, AmbiguousPeerError, peerLabel as peerLabel4, assertLifecycleToken as assertLifecycleToken3, isPermissionDenied as isPermissionDenied2, renderLifecycleBlocked, EpEnvelopeError as EpEnvelopeError3, LANG_PROBLEM_DETAIL_KIND, formatAge, presenceAges } from "@cotal-ai/core";
21732
+ import { isConcreteChannel as isConcreteChannel3, channelInAllow as channelInAllow3, AmbiguousPeerError, peerLabel as peerLabel4, assertLifecycleToken as assertLifecycleToken3, isPermissionDenied as isPermissionDenied2, renderLifecycleBlocked, EpEnvelopeError as EpEnvelopeError3, LANG_PROBLEM_DETAIL_KIND, formatAge, presenceAges, presenceText } from "@cotal-ai/core";
21730
21733
 
21731
21734
  // ../connector-core/dist/orientation.js
21732
21735
  import { peerLabel as peerLabel3 } from "@cotal-ai/core";
@@ -21736,6 +21739,14 @@ var STOP = new Set("a an and are as at be by do for from has how in is it of on
21736
21739
 
21737
21740
  // ../connector-core/dist/tool-specs.js
21738
21741
  var NO_TOOL_ARGS = external_exports.strictObject({});
21742
+ var managerInstanceArg = external_exports.string().refine((value) => {
21743
+ try {
21744
+ assertLifecycleToken3(value, "instance");
21745
+ return true;
21746
+ } catch {
21747
+ return false;
21748
+ }
21749
+ }, "instance must be a lifecycle token ([a-z0-9]{26,32})").optional().describe("Optional manager instance id for a multi-manager space. When omitted, a seat a manager launched uses that manager and any other caller lets the mesh select one; on a user-auth mesh with several of your managers live, that selection refuses and lists their ids. A pin that cannot be resolved is refused without falling back to another manager.");
21739
21750
 
21740
21751
  // ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.29.0_zod@4.4.3/node_modules/@modelcontextprotocol/sdk/dist/esm/types.js
21741
21752
  var RELATED_TASK_META_KEY = "io.modelcontextprotocol/related-task";
@@ -23465,6 +23476,9 @@ var MAX_DRAIN_BYTES = 64 * 1024 * 1024;
23465
23476
  // ../connector-core/dist/gateway.js
23466
23477
  import { assertValidName } from "@cotal-ai/core";
23467
23478
  var CONNECTION_ID = external_exports.string().min(1).describe("The connection_id cotal_connect returned in THIS conversation. Never reuse another conversation's.");
23479
+ 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.";
23480
+ 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.";
23481
+ var GATEWAY_INSTRUCTIONS = `${GATEWAY_CONNECTING} ${GATEWAY_LISTENING}`;
23468
23482
 
23469
23483
  // ../connector-core/dist/control.js
23470
23484
  var MAX_FRAME_BYTES = 1 << 20;
@@ -23472,7 +23486,7 @@ var MAX_FRAME_BYTES = 1 << 20;
23472
23486
  // src/seat-home.ts
23473
23487
  import { createHash } from "node:crypto";
23474
23488
  import { tmpdir } from "node:os";
23475
- import { dirname, join } from "node:path";
23489
+ import { dirname as dirname2, join } from "node:path";
23476
23490
  var seatId = (space, name) => createHash("sha256").update(`${space}\0${name}`).digest("hex").slice(0, 12);
23477
23491
  function hermesSeatHome(space, name) {
23478
23492
  const id = seatId(space, name);
@@ -23540,9 +23554,6 @@ var hermesConnector = {
23540
23554
  const env = {
23541
23555
  ...launchEnv({ providerKeys: HERMES_PROVIDER_KEYS, envAllow: opts.envAllow }),
23542
23556
  ...aclEnv(opts),
23543
- // Creds and broker URL ride a 0600 file; only its path is exported. This connector's launcher
23544
- // mints the control endpoint itself and merges the token into the same file (see launch.ts).
23545
- ...materialEnv({ creds: opts.creds, servers: opts.servers, eventsRequired: opts.eventsRequired, userAuth: opts.userAuth }),
23546
23557
  COTAL_SPACE: opts.space,
23547
23558
  COTAL_NAME: opts.name
23548
23559
  };
@@ -23566,7 +23577,15 @@ var hermesConnector = {
23566
23577
  env.HERMES_MODEL = opts.model;
23567
23578
  env.COTAL_MODEL = opts.model;
23568
23579
  }
23569
- return { command: LAUNCH_COMMAND, args: [LAUNCH_ENTRY], env, ...resumeRecordPath ? { resumeRecordPath } : {} };
23580
+ const artifacts = [];
23581
+ Object.assign(env, materialEnv({ creds: opts.creds, servers: opts.servers, eventsRequired: opts.eventsRequired, userAuth: opts.userAuth }, artifacts));
23582
+ return {
23583
+ command: LAUNCH_COMMAND,
23584
+ args: [LAUNCH_ENTRY],
23585
+ env,
23586
+ ...resumeRecordPath ? { resumeRecordPath } : {},
23587
+ ...artifacts.length > 0 ? { artifacts } : {}
23588
+ };
23570
23589
  }
23571
23590
  };
23572
23591
  registry3.register(hermesConnector);