glove-foundry 0.11.0 → 0.12.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,6 +1,6 @@
1
1
  import {
2
2
  resolveResolvable
3
- } from "./chunk-NWFOY3L7.js";
3
+ } from "./chunk-WK2O4GIB.js";
4
4
 
5
5
  // src/guidance.ts
6
6
  import { createHash } from "node:crypto";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  assertEventReceipt,
3
3
  matchesReceiptFilter
4
- } from "./chunk-2JCISE2U.js";
4
+ } from "./chunk-WRGSTYBW.js";
5
5
  import {
6
6
  DURABLE_SEGMENT,
7
7
  EMPTY_CAPABILITY_REGISTRY,
@@ -25,7 +25,7 @@ import {
25
25
  installationKey,
26
26
  internalAgentName,
27
27
  waitForFoundryCoreCommandResult
28
- } from "./chunk-NWFOY3L7.js";
28
+ } from "./chunk-WK2O4GIB.js";
29
29
 
30
30
  // src/application.ts
31
31
  var FOUNDRY_APPLICATION_BRAND = /* @__PURE__ */ Symbol.for(
@@ -2114,6 +2114,98 @@ function createFoundryCoreTools(context, desiredSchedules = [], outbound = {}) {
2114
2114
  ];
2115
2115
  }
2116
2116
 
2117
+ // src/builtins.ts
2118
+ var FOUNDRY_BUILTIN_TOOLS = Object.freeze([
2119
+ { name: "glove_foundry_spawn", group: "spawning", workspaceWide: true },
2120
+ { name: "glove_foundry_background", group: "spawning", workspaceWide: false },
2121
+ { name: "glove_foundry_schedule", group: "scheduling", workspaceWide: false },
2122
+ { name: "glove_foundry_schedules", group: "scheduling", workspaceWide: false },
2123
+ { name: "glove_foundry_sleep", group: "scheduling", workspaceWide: false },
2124
+ { name: "glove_foundry_transmit", group: "transmission", workspaceWide: false },
2125
+ { name: "glove_foundry_conversations", group: "conversations", workspaceWide: true },
2126
+ { name: "glove_foundry_workspace", group: "workspace", workspaceWide: true },
2127
+ { name: "glove_foundry_shared_inbox", group: "workspace", workspaceWide: true },
2128
+ { name: "glove_foundry_tasks", group: "workspace", workspaceWide: true },
2129
+ { name: "glove_foundry_environment", group: "environment", workspaceWide: false },
2130
+ { name: "glove_foundry_delegate", group: "delegation", workspaceWide: false },
2131
+ { name: "glove_foundry_reply", group: "delegation", workspaceWide: false },
2132
+ { name: "glove_foundry_ask", group: "delegation", workspaceWide: false },
2133
+ { name: "glove_foundry_message", group: "messaging", workspaceWide: false },
2134
+ { name: "glove_mesh_list_agents", group: "mesh", workspaceWide: false },
2135
+ { name: "glove_mesh_send_message", group: "mesh", workspaceWide: false },
2136
+ { name: "glove_mesh_broadcast", group: "mesh", workspaceWide: false },
2137
+ { name: "glove_mesh_acknowledge", group: "mesh", workspaceWide: false }
2138
+ ].map((tool) => Object.freeze(tool)));
2139
+ var BY_NAME = new Map(FOUNDRY_BUILTIN_TOOLS.map((tool) => [tool.name, tool]));
2140
+ function isFoundryBuiltin(name) {
2141
+ return BY_NAME.has(name);
2142
+ }
2143
+ function matcher(patterns) {
2144
+ const exact = new Set(patterns.filter((pattern) => !pattern.endsWith("*")));
2145
+ const prefixes = patterns.filter((pattern) => pattern.endsWith("*")).map((pattern) => pattern.slice(0, -1));
2146
+ return (name) => exact.has(name) || prefixes.some((prefix) => name.startsWith(prefix));
2147
+ }
2148
+ function builtinAllowed(policy) {
2149
+ if (policy === void 0) return () => true;
2150
+ let decide;
2151
+ const form = policy;
2152
+ if (Array.isArray(policy)) {
2153
+ const allowed = matcher(policy);
2154
+ decide = (tool) => allowed(tool.name);
2155
+ } else if (Array.isArray(form.allow)) {
2156
+ const allowed = matcher(form.allow);
2157
+ decide = (tool) => allowed(tool.name);
2158
+ } else if (Array.isArray(form.block)) {
2159
+ const blocked = matcher(form.block);
2160
+ decide = (tool) => !blocked(tool.name);
2161
+ } else if (typeof form.filter === "function") {
2162
+ decide = form.filter;
2163
+ } else {
2164
+ throw new Error("builtins must be a list of names, { allow }, { block } or { filter }.");
2165
+ }
2166
+ return (name) => {
2167
+ const tool = BY_NAME.get(name);
2168
+ return tool ? Boolean(decide(tool)) : true;
2169
+ };
2170
+ }
2171
+ function builtinsForCommand(type) {
2172
+ switch (type) {
2173
+ case "spawn":
2174
+ return ["glove_foundry_spawn"];
2175
+ case "background":
2176
+ return ["glove_foundry_background"];
2177
+ case "schedule":
2178
+ return ["glove_foundry_schedule"];
2179
+ case "schedule.update":
2180
+ case "schedule.pause":
2181
+ case "schedule.resume":
2182
+ case "schedule.cancel":
2183
+ return ["glove_foundry_schedules"];
2184
+ case "sleep":
2185
+ return ["glove_foundry_sleep"];
2186
+ case "delegate":
2187
+ return ["glove_foundry_delegate"];
2188
+ case "delegate.reply":
2189
+ return ["glove_foundry_reply"];
2190
+ case "delegate.ask":
2191
+ return ["glove_foundry_ask"];
2192
+ case "agent.message":
2193
+ return ["glove_foundry_message"];
2194
+ case "mesh.list":
2195
+ return ["glove_mesh_list_agents", "glove_mesh_broadcast"];
2196
+ case "mesh.send":
2197
+ return ["glove_mesh_send_message", "glove_mesh_broadcast"];
2198
+ case "mesh.ack":
2199
+ return ["glove_mesh_acknowledge"];
2200
+ // Installed apps' own transmission tools send it too; see the runtime.
2201
+ case "transmit":
2202
+ return ["glove_foundry_transmit"];
2203
+ default:
2204
+ return null;
2205
+ }
2206
+ }
2207
+ var FOUNDRY_BUILTINS_MOUNTED_EVENT = "foundry.builtins.mounted";
2208
+
2117
2209
  // src/approval.ts
2118
2210
  import { randomUUID as randomUUID3 } from "node:crypto";
2119
2211
  import { mkdir, readFile, readdir as readdir2, writeFile } from "node:fs/promises";
@@ -2141,6 +2233,9 @@ function readApprovalPolicy(value) {
2141
2233
  }
2142
2234
  }
2143
2235
  var APPROVAL_ID = /^approval_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;
2236
+ function isFoundryApprovalId(value) {
2237
+ return APPROVAL_ID.test(value);
2238
+ }
2144
2239
  function approvalPath(directory, id2, suffix) {
2145
2240
  if (!APPROVAL_ID.test(id2)) throw new Error("Invalid Foundry approval id.");
2146
2241
  return join(directory, `${id2}${suffix}`);
@@ -2649,11 +2744,17 @@ export {
2649
2744
  installedApplicationTransmissionToolName,
2650
2745
  createInstalledApplicationTransmissionTools,
2651
2746
  createFoundryCoreTools,
2747
+ FOUNDRY_BUILTIN_TOOLS,
2748
+ isFoundryBuiltin,
2749
+ builtinAllowed,
2750
+ builtinsForCommand,
2751
+ FOUNDRY_BUILTINS_MOUNTED_EVENT,
2652
2752
  FOUNDRY_APPROVAL_DIRECTORY_ENV,
2653
2753
  FOUNDRY_APPROVAL_POLICY_ENV,
2654
2754
  DEFAULT_APPROVAL_WAIT_MS,
2655
2755
  DEFAULT_APPROVAL_EXPIRES_AFTER_MS,
2656
2756
  readApprovalPolicy,
2757
+ isFoundryApprovalId,
2657
2758
  createFoundryApproval,
2658
2759
  listFoundryApprovals,
2659
2760
  resolveFoundryApproval,
@@ -1155,6 +1155,7 @@ var CONVENTION_EXPORTS = [
1155
1155
  "durableSubagents",
1156
1156
  "eventDelivery",
1157
1157
  "prepareEvent",
1158
+ "builtins",
1158
1159
  "answerWaitMs",
1159
1160
  "memory",
1160
1161
  "goals",
@@ -33,6 +33,9 @@ function startedThreadIds(context) {
33
33
  function isOpenThread(thread) {
34
34
  return thread.status === "working" || thread.status === "waiting";
35
35
  }
36
+ function isTakenOverBy(thread, agentId) {
37
+ return Boolean(thread.takenOver?.agentIds.includes(agentId));
38
+ }
36
39
  function clip(text, max) {
37
40
  const flat = text.replace(/\s+/g, " ").trim();
38
41
  return flat.length > max ? `${flat.slice(0, max - 1)}\u2026` : flat;
@@ -43,13 +46,16 @@ function threadSubject(content) {
43
46
  function escapeAttribute(value) {
44
47
  return value.replaceAll("&", "&amp;").replaceAll('"', "&quot;").replaceAll("<", "&lt;");
45
48
  }
46
- function renderMeshMessage(message, side) {
49
+ function renderMeshMessage(message, side, peer) {
47
50
  const who = `${message.from.name} (${message.from.agentId})`;
48
51
  const status = message.kind === "message" ? "" : ` status="${message.kind === "reply" ? "replied" : message.kind}"`;
49
- const open = `<mesh-message id="${escapeAttribute(message.id)}" thread="${escapeAttribute(message.threadId)}" from="${escapeAttribute(message.from.agentId)}" name="${escapeAttribute(message.from.name)}"${status}>`;
52
+ const human = message.from.kind === "human";
53
+ const open = `<mesh-message id="${escapeAttribute(message.id)}" thread="${escapeAttribute(message.threadId)}" from="${escapeAttribute(message.from.agentId)}" name="${escapeAttribute(message.from.name)}"${human ? ' party="human"' : ""}${status}>`;
50
54
  const body = message.kind === "failed" ? `It stopped: ${message.content}` : message.content;
51
55
  const lines = [open, body, "</mesh-message>"];
52
- if (side === "recipient") {
56
+ if (human) {
57
+ lines.push(side === "recipient" ? `${message.from.name} is a person in this thread, not an agent. Your final reply goes to the thread on its own.` : `${message.from.name} is a person in your thread${peer ? ` with ${peer}` : ""}. To answer in the thread, use glove_mesh_send_message${peer ? ` to "${peer}"` : ""} with in_reply_to "${message.id}".`);
58
+ } else if (side === "recipient") {
53
59
  lines.push(
54
60
  `${who} is another agent, not the user. Your final reply goes back to them on its own, so make it the answer itself.`,
55
61
  `If you cannot go on without something only they or their user know, ask with glove_mesh_send_message to "${message.from.agentId}".`
@@ -212,6 +218,11 @@ function createMeshTools(context) {
212
218
  }
213
219
  ];
214
220
  }
221
+ var DEFAULT_MESH_REFUSAL = "Your message could not be sent.";
222
+ var RECORD_ID = /^[A-Za-z0-9][A-Za-z0-9_.:-]{0,199}$/;
223
+ function isBindableThreadId(value) {
224
+ return RECORD_ID.test(value) && !value.includes("..");
225
+ }
215
226
 
216
227
  // src/delegation.ts
217
228
  import { createHash, randomUUID as randomUUID2 } from "node:crypto";
@@ -289,7 +300,7 @@ function renderDelegatedTask(input) {
289
300
  }
290
301
  function renderDelivery(delivery) {
291
302
  if (delivery.kind === "transmission" || delivery.kind === "agent-message") return delivery.message;
292
- if (delivery.kind === "mesh") return renderMeshMessage(delivery.message, delivery.side);
303
+ if (delivery.kind === "mesh") return renderMeshMessage(delivery.message, delivery.side, delivery.peer);
293
304
  if (delivery.kind === "reply") {
294
305
  return [
295
306
  `<delegation-reply id="${escapeAttribute2(delivery.delegationId)}" from="${escapeAttribute2(delivery.from)}">`,
@@ -887,12 +898,15 @@ export {
887
898
  threadFromContext,
888
899
  startedThreadIds,
889
900
  isOpenThread,
901
+ isTakenOverBy,
890
902
  threadSubject,
891
903
  renderMeshMessages,
892
904
  renderOpenThreads,
893
905
  renderOwnThread,
894
906
  isMeshCommand,
895
907
  createMeshTools,
908
+ DEFAULT_MESH_REFUSAL,
909
+ isBindableThreadId,
896
910
  FOUNDRY_MAILBOX_DIRECTORY_ENV,
897
911
  FOUNDRY_CONVERSATION_LISTEN_EVENT,
898
912
  FOUNDRY_CONVERSATION_LEASE_EVENT,
package/dist/cli.js CHANGED
@@ -3,7 +3,7 @@ import {
3
3
  FoundryRuntime,
4
4
  FoundryServer,
5
5
  writeGeneratedTypes
6
- } from "./chunk-YCW66WKQ.js";
6
+ } from "./chunk-DAYYZPVE.js";
7
7
  import {
8
8
  DEFAULT_FOUNDRY_CONFIG
9
9
  } from "./chunk-ZFNMFE3T.js";
@@ -11,9 +11,9 @@ import "./chunk-J7ZBJM54.js";
11
11
  import {
12
12
  EMPTY_FOUNDRY_APPLICATION,
13
13
  isFoundryApplication
14
- } from "./chunk-4WBQ7XVF.js";
15
- import "./chunk-2JCISE2U.js";
16
- import "./chunk-NWFOY3L7.js";
14
+ } from "./chunk-UGYXSWPE.js";
15
+ import "./chunk-WRGSTYBW.js";
16
+ import "./chunk-WK2O4GIB.js";
17
17
 
18
18
  // src/cli.ts
19
19
  import { watch } from "node:fs";
@@ -1,5 +1,5 @@
1
1
  import { StoreAdapter, AgentEvent, Message, TokenConsumptionCounter } from 'glove-core';
2
- import { B as AccountId, r as AccountReference, D as AccountNotFound, d8 as TransmissionId, d0 as RouteId, c$ as Route, d1 as RouteNotFound, d5 as TopologyConflict, a6 as BindingId, t as AgentBinding, a7 as BindingNotFound, U as AgentId, aB as EventReference, ay as EventId, az as EventNotFound, d3 as RunId, G as AccountSessionUnavailable, d as FoundryDataAdapter, bI as FoundryInstanceProvisioner, m as FoundryApproval, b3 as FoundryAgentDefinition, d2 as RunGrant, cE as GrantResolutionError, q as AnyFoundryTransmission, bk as FoundryCapabilityRegistry, c4 as FoundryNativeRegistry, cc as FoundryRequest, ac as CreateAgentInstanceOptions, e as AgentInstance, c0 as FoundryMessageOptions, Z as AgentMessageReceipt, bx as FoundryEventTarget, bu as FoundryEventPolicy, C as Conversation, h as FoundryEventRecord, f as FoundryActivationRecord, l as FoundryPendingInbound, o as FoundryTask, S as SharedInboxItem, ad as CreateConversationOptions, p as AgentPlaybook, P as PlaybookSubscription, ao as DefinePlaybookSubscriptionOptions, a4 as ApplicationConnectionState, dc as UpdateAgentInstanceOptions, dd as UpdateConversationOptions, W as WorkspaceEntry, E as EnvironmentValue, b$ as FoundryMessageInput, cf as FoundryResult, bd as FoundryApprovalStatus, ba as FoundryApprovalDecision, bi as FoundryCapabilityManifest, c2 as FoundryNativeManifest, X as AgentInstallation, bs as FoundryDelegationStatus, bq as FoundryDelegation, b_ as FoundryMeshThreadStatus, bZ as FoundryMeshThread, k as FoundryScheduleOccurrenceFilter, j as FoundryScheduleOccurrence, cg as FoundryRouteMap, H as AccountSummary, a1 as AnyFoundryAgent } from './event-delivery-BfSL9sGo.js';
2
+ import { B as AccountId, r as AccountReference, D as AccountNotFound, dm as TransmissionId, de as RouteId, dd as Route, df as RouteNotFound, dj as TopologyConflict, a6 as BindingId, t as AgentBinding, a7 as BindingNotFound, U as AgentId, aC as EventReference, az as EventId, aA as EventNotFound, dh as RunId, G as AccountSessionUnavailable, d as FoundryDataAdapter, bO as FoundryInstanceProvisioner, m as FoundryApproval, bc as FoundryApplicationMesh, b5 as FoundryAgentDefinition, dg as RunGrant, cS as GrantResolutionError, q as AnyFoundryTransmission, bq as FoundryCapabilityRegistry, ci as FoundryNativeRegistry, cq as FoundryRequest, ac as CreateAgentInstanceOptions, e as AgentInstance, ce as FoundryMessageOptions, Z as AgentMessageReceipt, bD as FoundryEventTarget, bA as FoundryEventPolicy, C as Conversation, h as FoundryEventRecord, f as FoundryActivationRecord, l as FoundryPendingInbound, o as FoundryTask, S as SharedInboxItem, ad as CreateConversationOptions, p as AgentPlaybook, P as PlaybookSubscription, ap as DefinePlaybookSubscriptionOptions, a4 as ApplicationConnectionState, dr as UpdateAgentInstanceOptions, ds as UpdateConversationOptions, W as WorkspaceEntry, E as EnvironmentValue, cd as FoundryMessageInput, ct as FoundryResult, bg as FoundryApprovalStatus, bd as FoundryApprovalDecision, bo as FoundryCapabilityManifest, cg as FoundryNativeManifest, X as AgentInstallation, by as FoundryDelegationStatus, bw as FoundryDelegation, cc as FoundryMeshThreadStatus, ca as FoundryMeshThread, c as FoundryMeshMessage, k as FoundryScheduleOccurrenceFilter, j as FoundryScheduleOccurrence, cu as FoundryRouteMap, H as AccountSummary, a1 as AnyFoundryAgent } from './event-delivery-CWxarW6L.js';
3
3
  import * as effect_Brand from 'effect/Brand';
4
4
  import { Context, Effect, Layer, Schema } from 'effect';
5
5
  import { FoundryStationDaemonAdapter } from './station.js';
@@ -133,6 +133,12 @@ interface FoundryApplicationOptions {
133
133
  */
134
134
  readonly url?: (approval: FoundryApproval) => string | undefined;
135
135
  };
136
+ /**
137
+ * The hosted mesh under your rules: peers across workspaces, a gate on
138
+ * every message, and threads bound and committed to your own record.
139
+ * Omitted, agents on the mesh see their own workspace, ungated.
140
+ */
141
+ readonly mesh?: FoundryApplicationMesh;
136
142
  readonly services?: Layer.Layer<AccountDirectory | TopologyStore | EventStore, unknown>;
137
143
  }
138
144
  type FoundryApplication = Readonly<FoundryApplicationOptions> & {
@@ -462,6 +468,8 @@ declare class FoundryRuntime {
462
468
  private readonly pendingInboundByRun;
463
469
  /** Recently settled runs, for a record assigned to a run that already finished. */
464
470
  private readonly settledRuns;
471
+ /** The built-ins each restricted run mounted, as it reported them. Runs without a policy are absent. */
472
+ private readonly runBuiltins;
465
473
  /** How runs treat approvals; durable when the data adapter can keep them. */
466
474
  private readonly approvalPolicy;
467
475
  /** Approval records change one at a time. */
@@ -623,10 +631,10 @@ declare class FoundryRuntime {
623
631
  installCapability(agentId: string, installation: AgentInstallation): Promise<AgentInstance>;
624
632
  uninstallCapability(agentId: string, installation: AgentInstallation): Promise<AgentInstance>;
625
633
  listAccounts(): Promise<{
634
+ label?: string | undefined;
626
635
  id: string & effect_Brand.Brand<"FoundryAccountId">;
627
636
  transmissionId: string & effect_Brand.Brand<"FoundryTransmissionId">;
628
637
  externalAccountId: string;
629
- label?: string | undefined;
630
638
  metadata: {
631
639
  readonly [x: string]: unknown;
632
640
  };
@@ -774,9 +782,11 @@ declare class FoundryRuntime {
774
782
  readonly status?: FoundryMeshThreadStatus;
775
783
  }): Promise<ReadonlyArray<FoundryMeshThread>>;
776
784
  /**
777
- * Older thread records kept their own lists of messages not handed over yet.
778
- * Move them to the event journal once; message ids keep a retry from
779
- * delivering twice.
785
+ * At start: older thread records kept their own lists of messages not
786
+ * handed over yet; move them to the event journal once. Then finish what a
787
+ * stop cut short: messages committed (or being committed) to the
788
+ * application's record and not handed over, and drafts decided but not
789
+ * delivered or dropped. Message ids keep a retry from delivering twice.
780
790
  */
781
791
  private redeliverThreads;
782
792
  /** The open threads a conversation started, oldest first. */
@@ -785,19 +795,88 @@ declare class FoundryRuntime {
785
795
  private updateThread;
786
796
  private starterTarget;
787
797
  private recipientTarget;
798
+ private sideTarget;
788
799
  /**
789
800
  * Hand mesh messages to one side of a thread. Messages, replies and
790
801
  * failures go through durable delivery. A read receipt only ever reaches a
791
802
  * run that is listening, and is dropped otherwise.
792
803
  */
793
804
  private deliverMesh;
805
+ /**
806
+ * Send messages to one side of a thread. Under the application's mesh they
807
+ * go through the thread's outbox: committed to the application's record
808
+ * first, then handed over, so the record and the journal agree. A side
809
+ * that was taken over gets nothing; the record still does.
810
+ */
811
+ private sendToSide;
812
+ /** Commit each outbox message to the application's record, then deliver it. */
813
+ private flushOutbox;
814
+ private retryOutbox;
815
+ private reportMeshFailure;
816
+ private meshHookContext;
817
+ private meshRefusal;
818
+ /** The application's gate. Without one, everything is delivered. */
819
+ private gateMesh;
820
+ /**
821
+ * Act on the gate's decision for one message to one side. Held and drafted
822
+ * messages are stored on the thread, not delivered; `onDeliver` is what
823
+ * delivery changes on the thread, applied only when it happens, because
824
+ * the side waiting for it must not see a message it has not been given.
825
+ */
826
+ private dispatchMesh;
827
+ /** A drafted message waits on an approval nobody resumes a run for. */
828
+ private draftApproval;
829
+ /** A drafted message's approval was decided: deliver it, or drop it. */
830
+ private settleMeshDraft;
831
+ /**
832
+ * Release a message the application's gate held: deliver it (committed to
833
+ * your record first) or discard it. The sender is not told either way.
834
+ * Drafts are decided through their approval instead.
835
+ */
836
+ releaseMeshMessage(threadId: string, messageId: string, decision: "deliver" | "discard"): Promise<FoundryMeshThread>;
837
+ private releaseHeld;
838
+ /**
839
+ * A person's message in a thread, entered by the application from its own
840
+ * record (so it is not committed again). It reaches each agent still in
841
+ * the thread as a message from a person, and starts the recipient working
842
+ * again. Pass `id` (your record's message id) to make a retry a no-op.
843
+ */
844
+ meshHumanMessage(threadId: string, input: {
845
+ readonly authorId: string;
846
+ readonly name?: string;
847
+ readonly text: string;
848
+ readonly id?: string;
849
+ }): Promise<FoundryMeshMessage>;
850
+ /**
851
+ * A person takes a thread over. The agents named (default: both) leave it:
852
+ * nothing more is delivered to them in this thread, what they send to it
853
+ * is refused, and a recipient run working on it is cancelled without a
854
+ * reply. Messages to a side that left still reach your record.
855
+ */
856
+ meshTakeOver(threadId: string, options: {
857
+ readonly by: string;
858
+ readonly agentId?: string;
859
+ }): Promise<FoundryMeshThread>;
794
860
  /** A run's mesh call: answered through its request, so the tool hears the outcome. */
795
861
  private runMeshCommand;
796
- /** The agents an agent may see and message: its workspace, narrowed by its definition's rule. */
862
+ /**
863
+ * The agents an agent may see and message: its workspace, or whoever the
864
+ * application's `mesh.peers` names; then narrowed by its definition's rule.
865
+ */
797
866
  private meshPeers;
798
867
  private executeMeshCommand;
868
+ /** Remember on the starter's conversation that it started a thread. */
869
+ private noteStartedThread;
799
870
  /** When the recipient's run on a thread ends, its reply (or its failure) goes back. */
800
871
  private settleThread;
872
+ /** The gate for a recipient's final answer, when the application has one. */
873
+ private gateReply;
874
+ /**
875
+ * A run whose definition restricts built-ins may only send the commands its
876
+ * mounted tools send. Anything else is refused, however it was emitted.
877
+ */
878
+ private withheldBuiltinRefusal;
879
+ private refuseCoreCommand;
801
880
  private handleRunSettled;
802
881
  private enqueueCoreRequest;
803
882
  /**
package/dist/client.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import 'glove-core';
2
- import './event-delivery-BfSL9sGo.js';
3
- export { k as FoundryClient, l as FoundryClientAuthorizationAdapter, m as FoundryClientOptions, q as FoundryHealth, y as FoundryRunHandle, G as FoundrySteerHandleResult, W as WaitOptions, N as createFoundryClient } from './client-B4Emyeek.js';
2
+ import './event-delivery-CWxarW6L.js';
3
+ export { k as FoundryClient, l as FoundryClientAuthorizationAdapter, m as FoundryClientOptions, q as FoundryHealth, y as FoundryRunHandle, G as FoundrySteerHandleResult, W as WaitOptions, N as createFoundryClient } from './client-Dy6_aqsi.js';
4
4
  import 'effect';
5
5
  import 'zod';
6
6
  import 'glove-mesh';