@noetic-tools/core 5.22.0-next.2 → 5.22.0-next.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.
Files changed (42) hide show
  1. package/dist/adapters/in-memory-subprocess-adapter.js +4 -2
  2. package/dist/builders/custom-item.d.ts +1 -1
  3. package/dist/builders/custom-item.js +14 -3
  4. package/dist/connections/pool.d.ts +18 -0
  5. package/dist/connections/pool.js +54 -9
  6. package/dist/connections/registry.js +11 -0
  7. package/dist/harness/agent-harness.d.ts +76 -3
  8. package/dist/harness/agent-harness.js +229 -21
  9. package/dist/harness/deps/types.d.ts +1 -1
  10. package/dist/harness/forget.d.ts +57 -0
  11. package/dist/harness/forget.js +496 -0
  12. package/dist/harness/harness-options.d.ts +15 -1
  13. package/dist/harness/model-rounds.d.ts +6 -0
  14. package/dist/harness/model-rounds.js +7 -3
  15. package/dist/harness/model-tool-round.js +19 -5
  16. package/dist/harness/recorded-tool-calls.d.ts +16 -0
  17. package/dist/harness/recorded-tool-calls.js +106 -0
  18. package/dist/harness/spend.d.ts +13 -1
  19. package/dist/harness/spend.js +82 -1
  20. package/dist/harness/steer-inbox.js +9 -5
  21. package/dist/harness/thread-record.d.ts +12 -1
  22. package/dist/harness/thread-record.js +63 -19
  23. package/dist/index.d.ts +4 -5
  24. package/dist/index.js +2 -3
  25. package/dist/interpreter/acp-tools.js +21 -4
  26. package/dist/interpreter/execute-action.js +7 -1
  27. package/dist/interpreter/execute.js +55 -3
  28. package/dist/interpreter/step-dispatcher.js +17 -1
  29. package/dist/interpreter/step-kind-dispatch.js +9 -1
  30. package/dist/runtime/durable/child-links.d.ts +61 -0
  31. package/dist/runtime/durable/child-links.js +127 -0
  32. package/dist/runtime/durable/session-store.d.ts +6 -0
  33. package/dist/runtime/durable/session-store.js +16 -2
  34. package/dist/runtime/durable/turn-lease.d.ts +10 -0
  35. package/dist/runtime/durable/turn-lease.js +10 -2
  36. package/dist/runtime/held-calls.d.ts +65 -6
  37. package/dist/runtime/held-calls.js +257 -5
  38. package/dist/runtime/output-store.d.ts +2 -0
  39. package/dist/runtime/output-store.js +3 -1
  40. package/dist/runtime/tool-approval.d.ts +1 -3
  41. package/dist/runtime/tool-approval.js +1 -1
  42. package/package.json +2 -2
@@ -1,3 +1,4 @@
1
+ import { ChildAdapterSource, spawnLinked } from '../runtime/durable/child-links.js';
1
2
  import { DetachedHandleImpl } from '../util/detached-handle.js';
2
3
  import { executeNoAdapter } from './execute.js';
3
4
  //#region Adapter resolution
@@ -20,6 +21,16 @@ export function resolveStepAdapter(step, callOverride, fallback) {
20
21
  }
21
22
  return fallback;
22
23
  }
24
+ /** Where `resolveStepAdapter` took the adapter from, for the child's link. */
25
+ function adapterSourceOf(step, callOverride) {
26
+ if (callOverride) {
27
+ return ChildAdapterSource.Call;
28
+ }
29
+ if ((step.kind === 'runCode' || step.kind === 'spawn') && step.subprocess) {
30
+ return ChildAdapterSource.Step;
31
+ }
32
+ return ChildAdapterSource.Harness;
33
+ }
23
34
  //#endregion
24
35
  //#region Dispatcher
25
36
  /**
@@ -60,7 +71,12 @@ export function dispatchStepThroughAdapter(h, s, input, parentCtx, overrides) {
60
71
  return new DetachedHandleImpl({
61
72
  id: childCtx.id,
62
73
  stepId: s.id,
63
- spawned: adapter.spawn(request),
74
+ spawned: spawnLinked(parentCtx, adapter, {
75
+ childId: childCtx.id,
76
+ stepId: s.id,
77
+ from: adapterSourceOf(s, overrides?.subprocess),
78
+ spawn: () => adapter.spawn(request),
79
+ }),
64
80
  });
65
81
  }
66
82
  //#endregion
@@ -4,6 +4,7 @@
4
4
  * the step lifecycle around this (depth/abort guards, events, ledger, checkpoint).
5
5
  */
6
6
  import { frameworkCast, NoeticErrorImpl } from '@noetic-tools/types';
7
+ import { ChildAdapterSource, spawnLinked } from '../runtime/durable/child-links.js';
7
8
  import { DetachedHandleImpl } from '../util/detached-handle.js';
8
9
  import { executeAcpAgent } from './execute-acp-agent.js';
9
10
  import { executeCallModel, executeRunCode, executeSpawn, executeWithContext, } from './execute-action.js';
@@ -65,7 +66,14 @@ async function dispatchViaAdapter(step, input, ctx, executionId, executor) {
65
66
  const handle = new DetachedHandleImpl({
66
67
  id: executionId,
67
68
  stepId: step.id,
68
- spawned: adapter.spawn(request),
69
+ spawned: executionId === ctx.id
70
+ ? adapter.spawn(request)
71
+ : spawnLinked(ctx, adapter, {
72
+ childId: executionId,
73
+ stepId: step.id,
74
+ from: step.subprocess === undefined ? ChildAdapterSource.Harness : ChildAdapterSource.Step,
75
+ spawn: () => adapter.spawn(request),
76
+ }),
69
77
  });
70
78
  return handle.await();
71
79
  }
@@ -0,0 +1,61 @@
1
+ /**
2
+ * Child links: how a run remembers the executions it had a subprocess adapter run
3
+ * out of process, so a forget of the run finds them and stops one still running
4
+ * (spec 23 § Forgetting).
5
+ *
6
+ * A spawn run in process records its steps under its run's root, so it needs no
7
+ * link. One an adapter runs elsewhere becomes an execution of its own, under its
8
+ * own id: the parent run writes `execution:<rootId>:child:<childId>` before
9
+ * dispatching it, naming the step and where its adapter came from, and marks the
10
+ * link `settled` once the child has finished.
11
+ */
12
+ import type { Context, SpawnedSubprocess, SubprocessAdapter } from '@noetic-tools/types';
13
+ import { z } from 'zod';
14
+ /** @internal Mark `adapter` as one that runs steps in the calling process. */
15
+ export declare function markInProcess<T extends SubprocessAdapter>(adapter: T): T;
16
+ /** @internal True when `adapter` runs steps in the calling process: its children need no link. */
17
+ export declare function runsInProcess(adapter: SubprocessAdapter): boolean;
18
+ /** @internal The out-of-process adapters `harness` has dispatched a child through. */
19
+ export declare function adaptersUsedBy(harness: object): ReadonlyArray<SubprocessAdapter>;
20
+ /** @internal The adapter `harness` dispatched the child `childId` through, when it did. */
21
+ export declare function adapterOfChild(harness: object, childId: string): SubprocessAdapter | undefined;
22
+ /** @internal Where the adapter that ran a child came from. */
23
+ export declare const ChildAdapterSource: {
24
+ /** The harness's `environment.subprocess`. */
25
+ readonly Harness: "harness";
26
+ /** The step's own `subprocess`. */
27
+ readonly Step: "step";
28
+ /** The `subprocess` a `detachedSpawn` call passed. */
29
+ readonly Call: "call";
30
+ };
31
+ /** @internal */
32
+ export type ChildAdapterSource = (typeof ChildAdapterSource)[keyof typeof ChildAdapterSource];
33
+ /** @internal A child link as stored. */
34
+ export declare const ChildLinkSchema: z.ZodObject<{
35
+ stepId: z.ZodString;
36
+ at: z.ZodString;
37
+ from: z.ZodEnum<{
38
+ step: "step";
39
+ call: "call";
40
+ harness: "harness";
41
+ }>;
42
+ settled: z.ZodOptional<z.ZodBoolean>;
43
+ }, z.core.$strip>;
44
+ /** @internal */
45
+ export type ChildLink = z.infer<typeof ChildLinkSchema>;
46
+ /** @internal The key of the link from the run rooted at `rootId` to `childId`. */
47
+ export declare function childLinkKey(rootId: string, childId: string): string;
48
+ /**
49
+ * Dispatch a step to `adapter` for `parent`. A step the adapter runs out of process
50
+ * is an execution of its own: on a durable run it is linked to the run's root before
51
+ * it is dispatched, and the link is marked settled once the child finished (spec 23
52
+ * § Forgetting).
53
+ *
54
+ * @internal
55
+ */
56
+ export declare function spawnLinked<TContext>(parent: Context<TContext>, adapter: SubprocessAdapter, child: {
57
+ childId: string;
58
+ stepId: string;
59
+ from: ChildAdapterSource;
60
+ spawn: () => Promise<SpawnedSubprocess>;
61
+ }): Promise<SpawnedSubprocess>;
@@ -0,0 +1,127 @@
1
+ /**
2
+ * Child links: how a run remembers the executions it had a subprocess adapter run
3
+ * out of process, so a forget of the run finds them and stops one still running
4
+ * (spec 23 § Forgetting).
5
+ *
6
+ * A spawn run in process records its steps under its run's root, so it needs no
7
+ * link. One an adapter runs elsewhere becomes an execution of its own, under its
8
+ * own id: the parent run writes `execution:<rootId>:child:<childId>` before
9
+ * dispatching it, naming the step and where its adapter came from, and marks the
10
+ * link `settled` once the child has finished.
11
+ */
12
+ import { frameworkCast } from '@noetic-tools/types';
13
+ import { z } from 'zod';
14
+ import { ContextImpl, rootIdOf } from '../context-impl.js';
15
+ //#region In-process adapters
16
+ /** Adapters that run a step in the calling process, through its local executor. */
17
+ const inProcess = new WeakSet();
18
+ /** @internal Mark `adapter` as one that runs steps in the calling process. */
19
+ export function markInProcess(adapter) {
20
+ inProcess.add(adapter);
21
+ return adapter;
22
+ }
23
+ /** @internal True when `adapter` runs steps in the calling process: its children need no link. */
24
+ export function runsInProcess(adapter) {
25
+ return inProcess.has(adapter);
26
+ }
27
+ //#endregion
28
+ //#region Adapters used
29
+ /** The adapter each child a harness dispatched out of process ran on, by child id. */
30
+ const ranBy = new WeakMap();
31
+ function noteAdapter(harness, childId, adapter) {
32
+ const children = ranBy.get(harness) ?? new Map();
33
+ children.set(childId, adapter);
34
+ ranBy.set(harness, children);
35
+ }
36
+ /** @internal The out-of-process adapters `harness` has dispatched a child through. */
37
+ export function adaptersUsedBy(harness) {
38
+ return [
39
+ ...new Set(ranBy.get(harness)?.values()),
40
+ ];
41
+ }
42
+ /** @internal The adapter `harness` dispatched the child `childId` through, when it did. */
43
+ export function adapterOfChild(harness, childId) {
44
+ return ranBy.get(harness)?.get(childId);
45
+ }
46
+ //#endregion
47
+ //#region Links
48
+ /** @internal Where the adapter that ran a child came from. */
49
+ export const ChildAdapterSource = {
50
+ /** The harness's `environment.subprocess`. */
51
+ Harness: 'harness',
52
+ /** The step's own `subprocess`. */
53
+ Step: 'step',
54
+ /** The `subprocess` a `detachedSpawn` call passed. */
55
+ Call: 'call',
56
+ };
57
+ /** @internal A child link as stored. */
58
+ export const ChildLinkSchema = z.object({
59
+ stepId: z.string(),
60
+ at: z.string(),
61
+ from: z.enum([
62
+ ChildAdapterSource.Harness,
63
+ ChildAdapterSource.Step,
64
+ ChildAdapterSource.Call,
65
+ ]),
66
+ /** Set once the child finished, however it ended. */
67
+ settled: z.boolean().optional(),
68
+ });
69
+ /** @internal The key of the link from the run rooted at `rootId` to `childId`. */
70
+ export function childLinkKey(rootId, childId) {
71
+ return `execution:${rootId}:child:${childId}`;
72
+ }
73
+ /** Mark a link settled, unless a forget deleted it meanwhile: nothing brings it back. */
74
+ async function markSettled(storage, key) {
75
+ const raw = await storage.get(key);
76
+ const link = ChildLinkSchema.safeParse(raw);
77
+ if (!link.success || link.data.settled) {
78
+ return;
79
+ }
80
+ const next = {
81
+ ...link.data,
82
+ settled: true,
83
+ };
84
+ if (storage.swap) {
85
+ await storage.swap(key, raw, next);
86
+ return;
87
+ }
88
+ await storage.set(key, next);
89
+ }
90
+ //#endregion
91
+ //#region Dispatch
92
+ /** The durable storage of `parent`'s run, when it has a ledger: only then is a child linked. */
93
+ function durableStorageOf(parent) {
94
+ if (!(parent instanceof ContextImpl) || parent.ledger === undefined) {
95
+ return undefined;
96
+ }
97
+ return frameworkCast(parent.harness).config?.storage;
98
+ }
99
+ /**
100
+ * Dispatch a step to `adapter` for `parent`. A step the adapter runs out of process
101
+ * is an execution of its own: on a durable run it is linked to the run's root before
102
+ * it is dispatched, and the link is marked settled once the child finished (spec 23
103
+ * § Forgetting).
104
+ *
105
+ * @internal
106
+ */
107
+ export async function spawnLinked(parent, adapter, child) {
108
+ const storage = runsInProcess(adapter) ? undefined : durableStorageOf(parent);
109
+ if (!storage) {
110
+ return child.spawn();
111
+ }
112
+ noteAdapter(parent.harness, child.childId, adapter);
113
+ const key = childLinkKey(rootIdOf(frameworkCast(parent)), child.childId);
114
+ const link = {
115
+ stepId: child.stepId,
116
+ at: new Date().toISOString(),
117
+ from: child.from,
118
+ };
119
+ await storage.set(key, link);
120
+ const spawned = await child.spawn();
121
+ void spawned.settled
122
+ .catch(() => undefined)
123
+ .then(() => markSettled(storage, key))
124
+ .catch(() => undefined);
125
+ return spawned;
126
+ }
127
+ //#endregion
@@ -46,6 +46,8 @@ declare const SessionRecordSchema: z.ZodObject<{
46
46
  text: z.ZodString;
47
47
  executionId: z.ZodOptional<z.ZodString>;
48
48
  }, z.core.$strip>>>;
49
+ executions: z.ZodOptional<z.ZodArray<z.ZodString>>;
50
+ layers: z.ZodOptional<z.ZodArray<z.ZodString>>;
49
51
  steers: z.ZodOptional<z.ZodArray<z.ZodObject<{
50
52
  id: z.ZodString;
51
53
  input: z.ZodUnknown;
@@ -84,4 +86,8 @@ export interface SessionStore {
84
86
  }
85
87
  /** @internal */
86
88
  export declare function createSessionStore(storage: StorageAdapter): SessionStore;
89
+ /** @internal The prefix every thread's record key starts with. */
90
+ export declare const SESSION_PREFIX = "session:";
91
+ /** @internal The key a thread's record is stored under. */
92
+ export declare function sessionKey(threadId: string): string;
87
93
  export {};
@@ -92,6 +92,18 @@ const SessionRecordSchema = z.object({
92
92
  executionId: z.string().optional(),
93
93
  }))
94
94
  .optional(),
95
+ /**
96
+ * Every execution the thread began a turn on, oldest first. `done` keeps only the
97
+ * last few turns; this is how a forget (spec 23 § Forgetting) and the thread's trail
98
+ * find the older ones. Absent in records written before it was kept.
99
+ */
100
+ executions: z.array(z.string()).optional(),
101
+ /**
102
+ * Ids of the context layers whose state may be kept at the thread's scope key, so a
103
+ * forget on a harness that never ran the thread still finds it. Absent in records
104
+ * written before it was kept.
105
+ */
106
+ layers: z.array(z.string()).optional(),
95
107
  /** Steers sent into the turn in flight, in arrival order. */
96
108
  steers: z
97
109
  .array(z.object({
@@ -145,8 +157,10 @@ export function createSessionStore(storage) {
145
157
  threads: async () => (await storage.list(SESSION_PREFIX)).map((key) => key.slice(SESSION_PREFIX.length)),
146
158
  };
147
159
  }
148
- const SESSION_PREFIX = 'session:';
149
- function sessionKey(threadId) {
160
+ /** @internal The prefix every thread's record key starts with. */
161
+ export const SESSION_PREFIX = 'session:';
162
+ /** @internal The key a thread's record is stored under. */
163
+ export function sessionKey(threadId) {
150
164
  return `${SESSION_PREFIX}${threadId}`;
151
165
  }
152
166
  //#endregion
@@ -58,6 +58,14 @@ export interface LedgerFence {
58
58
  }
59
59
  /** @internal True when `storage` can compare-and-set. */
60
60
  export declare function canSwap(storage: StorageAdapter | undefined): storage is SwapStorage;
61
+ /**
62
+ * @internal
63
+ * A prefix of its own. Under `session:`, the lease of thread `a` and the session
64
+ * of a thread named `a:lease` would be one key.
65
+ */
66
+ export declare function leaseKey(threadId: string): string;
67
+ /** @internal The prefix every thread's lease key starts with. */
68
+ export declare const LEASE_PREFIX = "turn-lease:";
61
69
  /** @internal True when a harness other than `opts.holder` holds the thread's lease now. */
62
70
  /**
63
71
  * @internal
@@ -119,6 +127,8 @@ export declare class TurnLease implements LedgerFence {
119
127
  renew(): Promise<void>;
120
128
  private renewOnce;
121
129
  verify(): Promise<void>;
130
+ /** Stop renewing, and wait for a renewal in flight, keeping the lease as it stands. */
131
+ stop(): Promise<void>;
122
132
  /** Hand the lease back so the next turn need not wait for it to run out. */
123
133
  release(): Promise<void>;
124
134
  private markLost;
@@ -52,12 +52,15 @@ function isHeldBy(record, holder, now) {
52
52
  return record !== null && record.holder !== holder && record.heldUntil > now;
53
53
  }
54
54
  /**
55
+ * @internal
55
56
  * A prefix of its own. Under `session:`, the lease of thread `a` and the session
56
57
  * of a thread named `a:lease` would be one key.
57
58
  */
58
- function leaseKey(threadId) {
59
- return `turn-lease:${threadId}`;
59
+ export function leaseKey(threadId) {
60
+ return `${LEASE_PREFIX}${threadId}`;
60
61
  }
62
+ /** @internal The prefix every thread's lease key starts with. */
63
+ export const LEASE_PREFIX = 'turn-lease:';
61
64
  /**
62
65
  * The term to take the lease at. It only ever goes up: a lease that went back to
63
66
  * term 1 would lose every write to the entries a higher term left in the ledger,
@@ -261,6 +264,11 @@ export class TurnLease {
261
264
  }
262
265
  this.assert();
263
266
  }
267
+ /** Stop renewing, and wait for a renewal in flight, keeping the lease as it stands. */
268
+ async stop() {
269
+ this.stopTimer();
270
+ await this.renewing;
271
+ }
264
272
  /** Hand the lease back so the next turn need not wait for it to run out. */
265
273
  async release() {
266
274
  this.stopTimer();
@@ -11,7 +11,7 @@
11
11
  * turn resumed on another harness finds the same record and the same answer.
12
12
  */
13
13
  import type { StorageAdapter } from '@noetic-tools/context';
14
- import type { Context, HeldCall, HeldResolution, ToolApprover } from '@noetic-tools/types';
14
+ import type { Context, HeldCall, HeldCallHandler, HeldCallSettled, HeldResolution, ToolApprover } from '@noetic-tools/types';
15
15
  import { z } from 'zod';
16
16
  declare const HeldRecordSchema: z.ZodObject<{
17
17
  callId: z.ZodString;
@@ -49,7 +49,24 @@ export interface HoldHost {
49
49
  readonly storage?: StorageAdapter;
50
50
  readonly now?: () => number;
51
51
  readonly approveToolCall?: ToolApprover;
52
+ readonly onHeld?: HeldCallHandler;
52
53
  };
54
+ /** The thread a context's held calls belong to, when it is a thread's turn. */
55
+ heldThreadOf?(ctx: Context): string | undefined;
56
+ /**
57
+ * Answer a call held under `executionId`, as a decision item does, and wake its
58
+ * thread's turn when that turn is this execution and parked.
59
+ */
60
+ answerHeld?(answer: HeldAnswerRequest): Promise<void>;
61
+ }
62
+ /** @internal An answer to a held call, for the execution that holds it. */
63
+ export interface HeldAnswerRequest {
64
+ readonly executionId: string;
65
+ /** The thread whose turn held the call, when it was a thread's turn. */
66
+ readonly threadId?: string;
67
+ readonly callId: string;
68
+ readonly argsHash: string;
69
+ readonly resolution: HeldResolution;
53
70
  }
54
71
  /** @internal How long a hold lasts and what happens when that runs out. */
55
72
  export interface HoldDue {
@@ -74,6 +91,12 @@ export declare class HeldCalls {
74
91
  private readonly storage;
75
92
  private readonly clock;
76
93
  private readonly waiters;
94
+ /** Calls announced held in this process, by execution and call. */
95
+ private readonly watches;
96
+ /** Watched calls this process is closing: a sweep leaves them to `close`. */
97
+ private readonly closing;
98
+ /** Re-reads watched calls on shared storage, which another harness may settle. */
99
+ private sweeper;
77
100
  constructor(storage: StorageAdapter, clock: () => number);
78
101
  now(): number;
79
102
  /** The record of `callId`, when the call is held. */
@@ -100,8 +123,32 @@ export declare class HeldCalls {
100
123
  wasStarted(executionId: string, callId: string, argsHash: string): Promise<boolean>;
101
124
  /** The call finished and its result is on record. */
102
125
  disarm(executionId: string, callId: string): Promise<void>;
103
- /** The call was settled and its result recorded: drop its record. */
104
- close(executionId: string, callId: string): Promise<void>;
126
+ /**
127
+ * The call was settled and its result recorded, or it is being dropped: drop its
128
+ * record. `by` says why, for a call this process announced; without it the record
129
+ * says: answered, overdue, or else cancelled.
130
+ */
131
+ close(executionId: string, callId: string, by?: HeldCallSettled['by']): Promise<void>;
132
+ /**
133
+ * Note that this process announced `held`. Resolves the signal a handler waits on,
134
+ * or `undefined` when the same question is already being watched here. A different
135
+ * question under the same id replaces the old one: a call held for a new reason
136
+ * moved on because the old question was answered; one held for other arguments
137
+ * voided it.
138
+ */
139
+ watch(executionId: string, held: HeldCall, emit: (settled: HeldCallSettled) => void): AbortSignal | undefined;
140
+ /**
141
+ * On shared storage another harness may answer, skip or drop a call this process
142
+ * announced, and finish its turn, so nothing here would ever close it. Watched
143
+ * calls are read again every so often while any are watched.
144
+ */
145
+ private armSweep;
146
+ private stopSweep;
147
+ /** Settle every watched call whose record says it is no longer the question shown. */
148
+ sweep(): Promise<void>;
149
+ /** The harness is closing: every handler still waiting is let go, with no event. */
150
+ releaseWatches(): void;
151
+ private settleWatch;
105
152
  /**
106
153
  * Answer a held call. The first answer wins: the same answer again is a no-op, a
107
154
  * different one is refused.
@@ -178,15 +225,27 @@ export declare function holdAndWait(opts: {
178
225
  harness: HoldHost;
179
226
  ctx: Context;
180
227
  record: HeldRecord;
181
- /** Called once per process, when the call is first seen held. */
182
- onHeld?: (held: HeldCall) => void;
183
228
  }): Promise<HeldAnswer>;
184
229
  /**
185
230
  * @internal
186
231
  * Says on the stream that a call is held: `{name}:tool_call_held`, with the fields
187
- * `harness.pending()` returns. What a hold does when its caller gives no `onHeld`.
232
+ * `harness.pending()` returns, and puts it to the harness's `onHeld` handler.
188
233
  */
189
234
  export declare function announcerOf(harness: HoldHost, ctx: Context): (held: HeldCall) => void;
235
+ /**
236
+ * @internal
237
+ * A call was announced held in this process (spec 08 § Held tool calls): watch it, so
238
+ * `tool_call_settled` follows when it stops being held, and put it to the harness's
239
+ * `onHeld` handler, once per question. Never waits on the handler.
240
+ *
241
+ * @param emit - How the settling is said, when not on `ctx`'s stream as is.
242
+ */
243
+ export declare function noticeHeld(opts: {
244
+ harness: HoldHost;
245
+ ctx: Context;
246
+ held: HeldCall;
247
+ emit?: (settled: HeldCallSettled) => void;
248
+ }): void;
190
249
  /** True once a hold with a `deny` deadline has run out. */
191
250
  export declare function isOverdue(record: HeldRecord, now: number): boolean;
192
251
  export {};