@agentchatme/agent-core 0.5.2 → 0.5.3

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/presets.js CHANGED
@@ -2,7 +2,7 @@ import {
2
2
  VERSION,
3
3
  hostedMcpUrl,
4
4
  runProbe
5
- } from "./chunk-WDHXWAWF.js";
5
+ } from "./chunk-JL2L4WRG.js";
6
6
  import {
7
7
  atomicWriteFile,
8
8
  clientHeadersOf,
@@ -12,7 +12,7 @@ import {
12
12
  spawnCommand,
13
13
  spawnRun,
14
14
  workdirExposesHome
15
- } from "./chunk-AFDD53DD.js";
15
+ } from "./chunk-3OUDKIQV.js";
16
16
 
17
17
  // src/presets/claude-code.ts
18
18
  import * as fs from "fs";
@@ -281,22 +281,30 @@ declare function statePath(home: string): string;
281
281
  /** Read the credential stored in `home`, or null when absent/malformed. */
282
282
  declare function readCredentials(home: string): Credentials | null;
283
283
  /**
284
- * The identity an integration should act as, for one specific home.
285
- * `AGENTCHAT_API_KEY` overrides the file; `AGENTCHAT_API_BASE` overrides the
286
- * base URL. Neither is host-specific, so both are read from the environment.
284
+ * The identity an integration should act as, for one specific home: the
285
+ * home's `credentials`, else `AGENTCHAT_API_KEY` when the home holds no key.
286
+ * `AGENTCHAT_API_BASE` overrides the base URL. Neither is host-specific, so
287
+ * both are read from the environment.
287
288
  */
288
289
  interface ResolveIdentityOptions {
289
290
  /**
290
- * Whether `AGENTCHAT_API_KEY` may override the home's credentials (default
291
- * true). A resident listener passes false: the agent it serves is the one
292
- * its home holds, whatever happens to be exported in the shell that
293
- * started it.
291
+ * Whether `AGENTCHAT_API_KEY` may stand in for a home that holds no key
292
+ * (default true). It never overrides a key the home holds. A resident
293
+ * listener passes false: the agent it serves is the one its home holds,
294
+ * whatever happens to be exported in the shell that started it.
294
295
  */
295
296
  readonly envKey?: boolean;
296
297
  }
297
298
  /** `AGENTCHAT_API_KEY` from the environment when it is set and well-formed, else null. */
298
299
  declare function envApiKey(env?: NodeJS.ProcessEnv): string | null;
299
300
  declare function resolveIdentity(home: string, options?: ResolveIdentityOptions): ResolvedIdentity | null;
301
+ /**
302
+ * One sentence when an exported `AGENTCHAT_API_KEY` is not the key `home`
303
+ * holds, else null (none exported, the same key, or a home with no key, where
304
+ * the exported one stands in). Never contains either key. The caller adds
305
+ * what to do in its own words.
306
+ */
307
+ declare function envKeyConflict(home: string, env?: NodeJS.ProcessEnv): string | null;
300
308
  declare function writeCredentials(home: string, creds: Credentials): void;
301
309
  /** Delete the credential and any half-finished registration in `home`.
302
310
  * Touches nothing outside `home` — that is the caller's whole agent. */
@@ -508,4 +516,4 @@ interface CheckManualOptions {
508
516
  /** Compare the skill file with the announced manual. Reads one file; no network. */
509
517
  declare function checkManual(options: CheckManualOptions): ManualCheck;
510
518
 
511
- export { describeManualSync as $, SOCKET_STATES as A, type ServedManual as B, type CheckManualOptions as C, DEFAULT_API_BASE as D, type StatusContext as E, FAILED_CYCLE_OUTCOMES as F, type SyncManualOptions as G, type HostProfile as H, type IntegrationClient as I, acquireLease as J, anchorLabelOf as K, type LeaseOptions as L, type ManualFetch as M, bootedAt as N, checkManual as O, type PendingRegistration as P, clearCredentials as Q, REPEATED_FAILED_CYCLES as R, type SocketState as S, type TextsStatus as T, clearIntegrationStatus as U, type Verdict as V, clearPending as W, clientHeadersOf as X, clientIdentityOf as Y, clientNameOf as Z, credentialsPath as _, type IntegrationStatus as a, envApiKey as a0, failedCyclesInARow as a1, formatIntegrationStatus as a2, fromKitResult as a3, holderLive as a4, integrationStatusAge as a5, integrationStatusPath as a6, leaseHolder as a7, parseLease as a8, pendingPath as a9, pidAlive as aa, readCredentials as ab, readIntegrationStatus as ac, readManualVersion as ad, readPending as ae, resetLeaseObservations as af, resolveIdentity as ag, statePath as ah, syncManual as ai, writeCredentials as aj, writeIntegrationStatus as ak, writePending as al, type IntegrationRunsFailing as b, type Lease as c, type LeaseAttempt as d, type LeaseHolder as e, type Credentials as f, type DoctorCheck as g, type DoctorContext as h, INTEGRATION_STATUS_FILE as i, type IntegrationCycle as j, type IntegrationLastRun as k, type IntegrationStandby as l, type IntegrationUnservable as m, LEASE_RENEW_MS as n, LEASE_STALE_MS as o, LEGACY_STATUS_FILE as p, MANUAL_FETCH_TIMEOUT_MS as q, MANUAL_MAX_BYTES as r, MANUAL_MAX_REDIRECTS as s, type ManualCheck as t, type ManualCheckState as u, type ManualSyncResult as v, type ManualSyncState as w, type PendingSignup as x, type ResolveIdentityOptions as y, type ResolvedIdentity as z };
519
+ export { describeManualSync as $, SOCKET_STATES as A, type ServedManual as B, type CheckManualOptions as C, DEFAULT_API_BASE as D, type StatusContext as E, FAILED_CYCLE_OUTCOMES as F, type SyncManualOptions as G, type HostProfile as H, type IntegrationClient as I, acquireLease as J, anchorLabelOf as K, type LeaseOptions as L, type ManualFetch as M, bootedAt as N, checkManual as O, type PendingRegistration as P, clearCredentials as Q, REPEATED_FAILED_CYCLES as R, type SocketState as S, type TextsStatus as T, clearIntegrationStatus as U, type Verdict as V, clearPending as W, clientHeadersOf as X, clientIdentityOf as Y, clientNameOf as Z, credentialsPath as _, type IntegrationStatus as a, envApiKey as a0, envKeyConflict as a1, failedCyclesInARow as a2, formatIntegrationStatus as a3, fromKitResult as a4, holderLive as a5, integrationStatusAge as a6, integrationStatusPath as a7, leaseHolder as a8, parseLease as a9, pendingPath as aa, pidAlive as ab, readCredentials as ac, readIntegrationStatus as ad, readManualVersion as ae, readPending as af, resetLeaseObservations as ag, resolveIdentity as ah, statePath as ai, syncManual as aj, writeCredentials as ak, writeIntegrationStatus as al, writePending as am, type IntegrationRunsFailing as b, type Lease as c, type LeaseAttempt as d, type LeaseHolder as e, type Credentials as f, type DoctorCheck as g, type DoctorContext as h, INTEGRATION_STATUS_FILE as i, type IntegrationCycle as j, type IntegrationLastRun as k, type IntegrationStandby as l, type IntegrationUnservable as m, LEASE_RENEW_MS as n, LEASE_STALE_MS as o, LEGACY_STATUS_FILE as p, MANUAL_FETCH_TIMEOUT_MS as q, MANUAL_MAX_BYTES as r, MANUAL_MAX_REDIRECTS as s, type ManualCheck as t, type ManualCheckState as u, type ManualSyncResult as v, type ManualSyncState as w, type PendingSignup as x, type ResolveIdentityOptions as y, type ResolvedIdentity as z };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agentchatme/agent-core",
3
- "version": "0.5.2",
3
+ "version": "0.5.3",
4
4
  "description": "Shared host-agnostic engine for AgentChat integrations — the resident supervisor on the AgentChat SDK's integration kit (single-run mode: the socket acking on receipt, wakes, the tray before every run), the runner seam and spawnRun, the presets for known coding agents' headless runs, identity storage and flows, service plumbing. Runtime code only; every function takes an identity home, none resolves one.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",