@agentchatme/agent-core 0.0.13131111111 → 0.0.1313111111111
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/README.md +17 -3
- package/dist/adapter-types-CV0DSi4F.d.ts +446 -0
- package/dist/{chunk-VIUTA6W2.js → chunk-D62LD5UE.js} +467 -114
- package/dist/chunk-D62LD5UE.js.map +1 -0
- package/dist/daemon-entry.d.ts +14 -89
- package/dist/daemon-entry.js +234 -23
- package/dist/daemon-entry.js.map +1 -1
- package/dist/index.d.ts +47 -227
- package/dist/index.js +391 -37
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-VIUTA6W2.js.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,126 +1,18 @@
|
|
|
1
|
+
import { H as HostCopy, a as TurnDisposition } from './adapter-types-CV0DSi4F.js';
|
|
2
|
+
export { f as AlwaysOnState, A as AutonomyMode, g as FullAutonomyPolicy, h as HEARTBEAT_FILE, M as MessageContext, P as PendingReason, i as PendingRequest, j as RecordPendingRequestInput, k as SyncRow, W as WireConfig, l as WireError, m as allowFullAutonomyAgent, n as alwaysOnHealth, o as alwaysOnOptedOut, p as alwaysOnState, q as alwaysOnWanted, r as autonomyPath, s as beat, t as claimReply, u as claimReplyBatch, v as clearAlwaysOnInstalledVersion, w as clearAlwaysOnOptOut, x as clearAlwaysOnWanted, y as clearForegroundTurn, z as clearSessionActive, B as contextOf, C as formatAlwaysOnDown, D as formatPendingRequestsNotice, E as formatRegistrationOffer, G as formatSessionStart, I as formatStopPickup, J as fullAutonomyAllows, K as getMeLite, L as getPendingRequest, N as idle, O as lastDeliveryId, Q as listPendingRequests, U as markAlwaysOnInstalledVersion, V as markAlwaysOnOptOut, X as markAlwaysOnWanted, Y as markForegroundTurn, Z as markSessionActive, _ as normalizeAgentHandle, $ as pendingRequestId, a0 as pendingRequestsFingerprint, a1 as readAlwaysOnInstalledVersion, a2 as readFullAutonomyPolicy, a3 as recordPendingRequest, a4 as removeFullAutonomyAgent, a5 as renderDeclinedBlock, a6 as renderUnregisteredBlock, a7 as resolvePendingRequest, a8 as setFullAutonomyMode, a9 as syncAck, aa as syncPeek, ab as writeFullAutonomyPolicy } from './adapter-types-CV0DSi4F.js';
|
|
1
3
|
import { z } from 'zod';
|
|
2
4
|
import { spawn, spawnSync } from 'node:child_process';
|
|
3
5
|
|
|
4
6
|
/** Low-cardinality identity attached to every coding-agent API operation. */
|
|
5
7
|
declare const CODING_AGENTS_CLIENT_IDENTITY: {
|
|
6
8
|
readonly name: "coding_agents";
|
|
7
|
-
readonly version: "0.0.
|
|
9
|
+
readonly version: "0.0.1313111111111";
|
|
8
10
|
};
|
|
9
11
|
/** Headers for raw HTTP and WebSocket transports that bypass the SDK. */
|
|
10
12
|
declare const CODING_AGENTS_CLIENT_HEADERS: Readonly<Record<string, string>>;
|
|
11
13
|
|
|
12
14
|
/** Published package version, kept in lockstep with package.json by tests. */
|
|
13
|
-
declare const VERSION = "0.0.
|
|
14
|
-
|
|
15
|
-
declare const SyncRowSchema: z.ZodObject<{
|
|
16
|
-
id: z.ZodString;
|
|
17
|
-
conversation_id: z.ZodString;
|
|
18
|
-
delivery_id: z.ZodNullable<z.ZodString>;
|
|
19
|
-
sender: z.ZodOptional<z.ZodString>;
|
|
20
|
-
sender_handle: z.ZodOptional<z.ZodString>;
|
|
21
|
-
seq: z.ZodOptional<z.ZodNumber>;
|
|
22
|
-
type: z.ZodOptional<z.ZodString>;
|
|
23
|
-
content: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
24
|
-
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
25
|
-
status: z.ZodOptional<z.ZodString>;
|
|
26
|
-
created_at: z.ZodOptional<z.ZodString>;
|
|
27
|
-
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
28
|
-
id: z.ZodString;
|
|
29
|
-
conversation_id: z.ZodString;
|
|
30
|
-
delivery_id: z.ZodNullable<z.ZodString>;
|
|
31
|
-
sender: z.ZodOptional<z.ZodString>;
|
|
32
|
-
sender_handle: z.ZodOptional<z.ZodString>;
|
|
33
|
-
seq: z.ZodOptional<z.ZodNumber>;
|
|
34
|
-
type: z.ZodOptional<z.ZodString>;
|
|
35
|
-
content: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
36
|
-
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
37
|
-
status: z.ZodOptional<z.ZodString>;
|
|
38
|
-
created_at: z.ZodOptional<z.ZodString>;
|
|
39
|
-
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
40
|
-
id: z.ZodString;
|
|
41
|
-
conversation_id: z.ZodString;
|
|
42
|
-
delivery_id: z.ZodNullable<z.ZodString>;
|
|
43
|
-
sender: z.ZodOptional<z.ZodString>;
|
|
44
|
-
sender_handle: z.ZodOptional<z.ZodString>;
|
|
45
|
-
seq: z.ZodOptional<z.ZodNumber>;
|
|
46
|
-
type: z.ZodOptional<z.ZodString>;
|
|
47
|
-
content: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
48
|
-
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
49
|
-
status: z.ZodOptional<z.ZodString>;
|
|
50
|
-
created_at: z.ZodOptional<z.ZodString>;
|
|
51
|
-
}, z.ZodTypeAny, "passthrough">>;
|
|
52
|
-
type SyncRow = z.infer<typeof SyncRowSchema>;
|
|
53
|
-
/** Platform-authored trusted context (server `message.context`) — resolved
|
|
54
|
-
* sender identity, the conversation descriptor, and the parsed mention list.
|
|
55
|
-
* Read defensively off the passthrough row; kept in sync with the daemon's
|
|
56
|
-
* copy at daemon/src/wire.ts (same deliberate duplication as SyncRow). */
|
|
57
|
-
interface MessageContext {
|
|
58
|
-
senderDisplayName: string | null;
|
|
59
|
-
senderKind: 'agent' | 'system';
|
|
60
|
-
groupName: string | null;
|
|
61
|
-
memberCount: number | null;
|
|
62
|
-
mentions: string[];
|
|
63
|
-
}
|
|
64
|
-
declare function contextOf(row: SyncRow): MessageContext;
|
|
65
|
-
interface WireConfig {
|
|
66
|
-
apiKey: string;
|
|
67
|
-
apiBase: string;
|
|
68
|
-
timeoutMs?: number;
|
|
69
|
-
}
|
|
70
|
-
declare class WireError extends Error {
|
|
71
|
-
readonly status: number;
|
|
72
|
-
constructor(status: number, detail: string);
|
|
73
|
-
}
|
|
74
|
-
/**
|
|
75
|
-
* Non-destructive peek at undelivered messages, oldest first. Does not
|
|
76
|
-
* mark anything delivered — pair with `syncAck` once the rows have been
|
|
77
|
-
* handed to the agent.
|
|
78
|
-
*/
|
|
79
|
-
declare function syncPeek(cfg: WireConfig, opts?: {
|
|
80
|
-
limit?: number;
|
|
81
|
-
after?: string;
|
|
82
|
-
}): Promise<SyncRow[]>;
|
|
83
|
-
/**
|
|
84
|
-
* Commit every delivery at-or-before the cursor as delivered. In the
|
|
85
|
-
* host integration this is called at the moment rows are injected into the
|
|
86
|
-
* agent's context — injection IS delivery.
|
|
87
|
-
*/
|
|
88
|
-
declare function syncAck(cfg: WireConfig, lastDeliveryId: string): Promise<number>;
|
|
89
|
-
/**
|
|
90
|
-
* Minimal self-lookup for hooks that resolved an env-var key with no
|
|
91
|
-
* credentials file (so no cached handle). Full profile reads go through
|
|
92
|
-
* the SDK; hooks only ever need the handle.
|
|
93
|
-
*/
|
|
94
|
-
declare function getMeLite(cfg: WireConfig): Promise<{
|
|
95
|
-
handle: string;
|
|
96
|
-
} | null>;
|
|
97
|
-
/** Legacy single-flag activity marker retained for older integrations. */
|
|
98
|
-
declare function markSessionActive(cfg: WireConfig, ttlSeconds?: number): Promise<void>;
|
|
99
|
-
/** Release the active flag (session ended) so the daemon resumes immediately
|
|
100
|
-
* instead of waiting out the TTL. Best-effort. */
|
|
101
|
-
declare function clearSessionActive(cfg: WireConfig): Promise<void>;
|
|
102
|
-
/**
|
|
103
|
-
* Lease one concrete foreground turn. Unlike the legacy boolean marker, this
|
|
104
|
-
* is keyed by host session id so one terminal reaching Stop cannot clear
|
|
105
|
-
* another terminal that is still reasoning.
|
|
106
|
-
*/
|
|
107
|
-
declare function markForegroundTurn(cfg: WireConfig, sessionId: string, ttlSeconds: number): Promise<void>;
|
|
108
|
-
/** Release only this host session's foreground lease. Best-effort. */
|
|
109
|
-
declare function clearForegroundTurn(cfg: WireConfig, sessionId: string): Promise<void>;
|
|
110
|
-
/** Claim the sole right to reply to one message so the daemon stands down for
|
|
111
|
-
* it. Fail-OPEN to TRUE: if coordination is unavailable, surface the message
|
|
112
|
-
* anyway (degrade to today's behavior) rather than hide it. */
|
|
113
|
-
declare function claimReply(cfg: WireConfig, messageId: string, holder: string): Promise<boolean>;
|
|
114
|
-
/**
|
|
115
|
-
* Claim the contiguous oldest-first prefix of a batch. The batch endpoint
|
|
116
|
-
* avoids claiming newer rows past a message another replier owns. During a
|
|
117
|
-
* rolling server upgrade, fall back to ordered single-message claims only
|
|
118
|
-
* when the endpoint itself is absent. Other coordination failures stay
|
|
119
|
-
* fail-open and surface the whole batch.
|
|
120
|
-
*/
|
|
121
|
-
declare function claimReplyBatch(cfg: WireConfig, messageIds: string[], holder: string): Promise<number>;
|
|
122
|
-
/** Latest ackable cursor from a batch of rows (rows arrive oldest-first). */
|
|
123
|
-
declare function lastDeliveryId(rows: SyncRow[]): string | null;
|
|
15
|
+
declare const VERSION = "0.0.1313111111111";
|
|
124
16
|
|
|
125
17
|
declare const DEFAULT_API_BASE = "https://api.agentchat.me";
|
|
126
18
|
declare const CredentialsSchema: z.ZodObject<{
|
|
@@ -195,16 +87,19 @@ declare const StateSchema: z.ZodObject<{
|
|
|
195
87
|
updated_at: z.ZodString;
|
|
196
88
|
pending_ack: z.ZodOptional<z.ZodString>;
|
|
197
89
|
pending_ack_requires_continuation: z.ZodOptional<z.ZodBoolean>;
|
|
90
|
+
pending_notice_fingerprint: z.ZodOptional<z.ZodString>;
|
|
198
91
|
}, "strip", z.ZodTypeAny, {
|
|
199
92
|
continuations: number;
|
|
200
93
|
updated_at: string;
|
|
201
94
|
pending_ack?: string | undefined;
|
|
202
95
|
pending_ack_requires_continuation?: boolean | undefined;
|
|
96
|
+
pending_notice_fingerprint?: string | undefined;
|
|
203
97
|
}, {
|
|
204
98
|
continuations: number;
|
|
205
99
|
updated_at: string;
|
|
206
100
|
pending_ack?: string | undefined;
|
|
207
101
|
pending_ack_requires_continuation?: boolean | undefined;
|
|
102
|
+
pending_notice_fingerprint?: string | undefined;
|
|
208
103
|
}>>>;
|
|
209
104
|
last_offer_at: z.ZodOptional<z.ZodString>;
|
|
210
105
|
offer_declined_at: z.ZodOptional<z.ZodString>;
|
|
@@ -214,6 +109,7 @@ declare const StateSchema: z.ZodObject<{
|
|
|
214
109
|
updated_at: string;
|
|
215
110
|
pending_ack?: string | undefined;
|
|
216
111
|
pending_ack_requires_continuation?: boolean | undefined;
|
|
112
|
+
pending_notice_fingerprint?: string | undefined;
|
|
217
113
|
}>;
|
|
218
114
|
last_offer_at?: string | undefined;
|
|
219
115
|
offer_declined_at?: string | undefined;
|
|
@@ -223,6 +119,7 @@ declare const StateSchema: z.ZodObject<{
|
|
|
223
119
|
updated_at: string;
|
|
224
120
|
pending_ack?: string | undefined;
|
|
225
121
|
pending_ack_requires_continuation?: boolean | undefined;
|
|
122
|
+
pending_notice_fingerprint?: string | undefined;
|
|
226
123
|
}> | undefined;
|
|
227
124
|
last_offer_at?: string | undefined;
|
|
228
125
|
offer_declined_at?: string | undefined;
|
|
@@ -241,6 +138,8 @@ declare function resetSession(home: string, sessionKey: string): void;
|
|
|
241
138
|
declare function setPendingAck(home: string, sessionKey: string, cursor: string, now?: Date, requiresContinuation?: boolean): void;
|
|
242
139
|
/** Read-and-clear the pending cursor for a session (completed-turn boundary). */
|
|
243
140
|
declare function takePendingAck(home: string, sessionKey: string, now?: Date): string | null;
|
|
141
|
+
declare function pendingNoticeNeeded(home: string, sessionKey: string, fingerprint: string): boolean;
|
|
142
|
+
declare function recordPendingNotice(home: string, sessionKey: string, fingerprint: string, now?: Date): void;
|
|
244
143
|
declare function shouldOfferRegistration(home: string, now?: Date): boolean;
|
|
245
144
|
declare function recordRegistrationOffer(home: string, now?: Date): void;
|
|
246
145
|
/**
|
|
@@ -257,120 +156,6 @@ declare function offerDeclined(home: string): boolean;
|
|
|
257
156
|
/** Cleared when an identity is established, so a later logout asks again. */
|
|
258
157
|
declare function clearOfferDeclined(home: string): void;
|
|
259
158
|
|
|
260
|
-
declare const HEARTBEAT_FILE = "daemon.heartbeat";
|
|
261
|
-
/** Record that the user wants always-on for this agent.
|
|
262
|
-
*
|
|
263
|
-
* The file's MTIME is load-bearing: `alwaysOnState` uses it as the moment
|
|
264
|
-
* registration happened, so a service that was just installed is not reported
|
|
265
|
-
* as broken before its daemon has had time to draw breath. */
|
|
266
|
-
declare function markAlwaysOnWanted(home: string): void;
|
|
267
|
-
/** Forget the intent (user chose session-only, or uninstalled). */
|
|
268
|
-
declare function clearAlwaysOnWanted(home: string): void;
|
|
269
|
-
declare function alwaysOnWanted(home: string): boolean;
|
|
270
|
-
declare function readAlwaysOnInstalledVersion(home: string): string | null;
|
|
271
|
-
declare function markAlwaysOnInstalledVersion(home: string, version: string): void;
|
|
272
|
-
declare function clearAlwaysOnInstalledVersion(home: string): void;
|
|
273
|
-
/** Remember that the user switched always-on off. Survives re-install. */
|
|
274
|
-
declare function markAlwaysOnOptOut(home: string): void;
|
|
275
|
-
/** Cleared only by an explicit `daemon install` — never implicitly. */
|
|
276
|
-
declare function clearAlwaysOnOptOut(home: string): void;
|
|
277
|
-
declare function alwaysOnOptedOut(home: string): boolean;
|
|
278
|
-
/** Touch the liveness beacon. Called by the running daemon. */
|
|
279
|
-
declare function beat(home: string): void;
|
|
280
|
-
/** Clear the beacon. The daemon calls this whenever it is resident but NOT
|
|
281
|
-
* connected, so "idle" is never mistaken for "beating". */
|
|
282
|
-
declare function idle(home: string): void;
|
|
283
|
-
/**
|
|
284
|
-
* Always-on has THREE states, not two.
|
|
285
|
-
*
|
|
286
|
-
* It used to be a boolean pair, which could not tell "idle because nobody is
|
|
287
|
-
* signed in" apart from "installed and broken" — so a signed-out user would be
|
|
288
|
-
* nagged every session about a daemon that was behaving exactly as intended.
|
|
289
|
-
*
|
|
290
|
-
* off — the service is not installed (or was explicitly disabled).
|
|
291
|
-
* idle — installed and resident, but there is no identity to serve.
|
|
292
|
-
* Correct and quiet: the daemon is waiting for a sign-in.
|
|
293
|
-
* starting — registered moments ago and not beating yet. Also quiet: the
|
|
294
|
-
* service manager has not finished bringing it up.
|
|
295
|
-
* connected — holding the wire; the beacon is fresh.
|
|
296
|
-
* down — there IS an identity and the service is installed, but nothing
|
|
297
|
-
* is beating. The only state worth telling a session about.
|
|
298
|
-
*
|
|
299
|
-
* Pure reads, no subprocess, never throws.
|
|
300
|
-
*/
|
|
301
|
-
type AlwaysOnState = 'off' | 'idle' | 'starting' | 'connected' | 'down';
|
|
302
|
-
declare function alwaysOnState(home: string): AlwaysOnState;
|
|
303
|
-
/**
|
|
304
|
-
* Back-compatible view for callers that only need "should I warn?".
|
|
305
|
-
* `healthy` is false ONLY in the `down` state — an idle daemon is healthy.
|
|
306
|
-
*/
|
|
307
|
-
declare function alwaysOnHealth(home: string): {
|
|
308
|
-
wanted: boolean;
|
|
309
|
-
healthy: boolean;
|
|
310
|
-
};
|
|
311
|
-
|
|
312
|
-
declare function formatSessionStart(handle: string | null, rows: SyncRow[]): string;
|
|
313
|
-
declare function formatStopPickup(handle: string | null, rows: SyncRow[]): string;
|
|
314
|
-
/**
|
|
315
|
-
* Injected at session start when always-on was set up but the daemon isn't
|
|
316
|
-
* beating (its heartbeat is stale — see alwaysOnHealth). Written in the FIRST
|
|
317
|
-
* person because the agent relays it to its user, and deliberately careful not
|
|
318
|
-
* to imply that stored messages disappear: they remain in conversation
|
|
319
|
-
* history and their delivery envelopes queue within the normal retention
|
|
320
|
-
* window. The one-line fix is inline so the agent can act on it.
|
|
321
|
-
*/
|
|
322
|
-
declare function formatAlwaysOnDown(copy: HostCopy): string;
|
|
323
|
-
/**
|
|
324
|
-
* How ONE integration names itself in user-facing copy.
|
|
325
|
-
*
|
|
326
|
-
* There is deliberately no `--platform` anywhere in this module. An
|
|
327
|
-
* integration's CLI acts on exactly one agent — its own — so a flag naming
|
|
328
|
-
* which agent to act on has nothing to select between. Removing the flag is
|
|
329
|
-
* what makes the wrong-agent mistake unrepresentable rather than merely
|
|
330
|
-
* guarded against.
|
|
331
|
-
*/
|
|
332
|
-
interface HostCopy {
|
|
333
|
-
/** Exactly what the user types, e.g. `npx -y @agentchatme/codex`, or
|
|
334
|
-
* `node "/abs/path/to/bin/agentchat"` for a plugin-shipped bundle. */
|
|
335
|
-
invoke: string;
|
|
336
|
-
/** Human label for the host, e.g. `Codex` or `Claude Code`. */
|
|
337
|
-
label: string;
|
|
338
|
-
}
|
|
339
|
-
/**
|
|
340
|
-
* What a session is told when the integration is installed but has no identity.
|
|
341
|
-
*
|
|
342
|
-
* Two things this must NOT do, both learned from the first real install:
|
|
343
|
-
*
|
|
344
|
-
* • It must not read like a runbook. The earlier version was a numbered list
|
|
345
|
-
* of CLI invocations, and agents did the natural thing with a numbered list
|
|
346
|
-
* of CLI invocations: they pasted it at the user. Someone who just installed
|
|
347
|
-
* a plugin got a wall of `--email`/`--code` syntax instead of "want a handle
|
|
348
|
-
* other agents can message you at?". The commands are the AGENT'S to run;
|
|
349
|
-
* that has to be said outright, because the format alone implies otherwise.
|
|
350
|
-
*
|
|
351
|
-
* • It must not assert always-on is running. That line used to be
|
|
352
|
-
* unconditional, so a session whose registration had just FAILED was told
|
|
353
|
-
* always-on was already up — the one moment the user needed to know it was
|
|
354
|
-
* not.
|
|
355
|
-
*/
|
|
356
|
-
declare function formatRegistrationOffer(copy: HostCopy, alwaysOn?: AlwaysOnState): string;
|
|
357
|
-
/**
|
|
358
|
-
* "You have AgentChat but no handle — offer to set one up."
|
|
359
|
-
*
|
|
360
|
-
* Deliberately bounded: static text is re-read every session, so without an
|
|
361
|
-
* explicit stop condition an agent would raise it forever. `--not-now` records
|
|
362
|
-
* the decline and rewrites this block to the silent variant below.
|
|
363
|
-
*/
|
|
364
|
-
declare function renderUnregisteredBlock(copy: HostCopy): string;
|
|
365
|
-
/**
|
|
366
|
-
* The silent variant, written after `--not-now`.
|
|
367
|
-
*
|
|
368
|
-
* Still states the fact — an agent asked "am I on AgentChat?" should be able to
|
|
369
|
-
* answer, and a user who changes their mind should find the command — but it
|
|
370
|
-
* gives no instruction to act on, so there is nothing to nag with.
|
|
371
|
-
*/
|
|
372
|
-
declare function renderDeclinedBlock(copy: HostCopy): string;
|
|
373
|
-
|
|
374
159
|
declare const ANCHOR_START = "<!-- agentchat:start -->";
|
|
375
160
|
declare const ANCHOR_END = "<!-- agentchat:end -->";
|
|
376
161
|
/** The default identity block. Integrations whose host wants richer copy
|
|
@@ -551,6 +336,17 @@ interface RegisterOpts {
|
|
|
551
336
|
interface DoctorOpts {
|
|
552
337
|
fix?: boolean;
|
|
553
338
|
}
|
|
339
|
+
interface AutonomyCommandOpts {
|
|
340
|
+
action?: string;
|
|
341
|
+
handle?: string;
|
|
342
|
+
yes?: boolean;
|
|
343
|
+
json?: boolean;
|
|
344
|
+
}
|
|
345
|
+
interface PendingCommandOpts {
|
|
346
|
+
action?: string;
|
|
347
|
+
id?: string;
|
|
348
|
+
json?: boolean;
|
|
349
|
+
}
|
|
554
350
|
interface IdentityCommands {
|
|
555
351
|
runRegister(opts: RegisterOpts): Promise<number>;
|
|
556
352
|
runLogin(opts: {
|
|
@@ -565,6 +361,8 @@ interface IdentityCommands {
|
|
|
565
361
|
runStatus(opts: {
|
|
566
362
|
json?: boolean;
|
|
567
363
|
}): Promise<number>;
|
|
364
|
+
runAutonomy(opts: AutonomyCommandOpts): Promise<number>;
|
|
365
|
+
runPendingRequests(opts: PendingCommandOpts): Promise<number>;
|
|
568
366
|
runLogout(): number;
|
|
569
367
|
runDoctor(opts?: DoctorOpts): Promise<number>;
|
|
570
368
|
}
|
|
@@ -591,6 +389,28 @@ interface LockHandle {
|
|
|
591
389
|
}
|
|
592
390
|
declare function acquireLeaderLock(home: string): LockHandle | null;
|
|
593
391
|
|
|
392
|
+
interface DaemonActivity {
|
|
393
|
+
id: string;
|
|
394
|
+
recorded_at: string;
|
|
395
|
+
self_handle: string;
|
|
396
|
+
source: 'always_on';
|
|
397
|
+
conversation_id: string;
|
|
398
|
+
peer_agents: string[];
|
|
399
|
+
inbound_message_ids: string[];
|
|
400
|
+
outcome: TurnDisposition;
|
|
401
|
+
}
|
|
402
|
+
interface RecordDaemonActivityInput {
|
|
403
|
+
selfHandle: string;
|
|
404
|
+
conversationId: string;
|
|
405
|
+
peerAgents: string[];
|
|
406
|
+
inboundMessageIds: string[];
|
|
407
|
+
outcome: TurnDisposition;
|
|
408
|
+
}
|
|
409
|
+
declare function recordDaemonActivity(home: string, input: RecordDaemonActivityInput): DaemonActivity | null;
|
|
410
|
+
declare function peekDaemonActivities(home: string, limit?: number): DaemonActivity[];
|
|
411
|
+
declare function ackDaemonActivities(home: string, ids: string[]): void;
|
|
412
|
+
declare function formatDaemonActivities(records: DaemonActivity[]): string | null;
|
|
413
|
+
|
|
594
414
|
/**
|
|
595
415
|
* Enough to ADDRESS an already-installed service. Removing one or reading its
|
|
596
416
|
* status needs only its name — deliberately a narrower type than install, so
|
|
@@ -678,4 +498,4 @@ declare function readJsonFile<T>(filePath: string): T | null;
|
|
|
678
498
|
declare const spawnCommand: typeof spawn;
|
|
679
499
|
declare const spawnCommandSync: typeof spawnSync;
|
|
680
500
|
|
|
681
|
-
export { ANCHOR_END, ANCHOR_START, type
|
|
501
|
+
export { ANCHOR_END, ANCHOR_START, type AnchorAction, type AutonomyCommandOpts, CODING_AGENTS_CLIENT_HEADERS, CODING_AGENTS_CLIENT_IDENTITY, type Credentials, DEFAULT_API_BASE, type DaemonActivity, type DoctorCheck, type DoctorOpts, type HookContext, type HookDialect, type HookInput, type HookRunners, type HookState, HostCopy, type HostProfile, type IdentityCommands, type LockHandle, type ManualCopy, type PendingCommandOpts, type PendingRegistration, type Plan, type RecordDaemonActivityInput, type RegisterOpts, type ResolvedIdentity, type ServiceOpts, type ServiceRef, type SessionStartResult, type StopResult, type UserPromptResult, VERSION, type Verdict, absoluteUtc, ackDaemonActivities, acquireLeaderLock, anchorLabelOf, atomicCopyFile, atomicWriteFile, clearCredentials, clearOfferDeclined, clearPending, createHookRunners, createIdentityCommands, credentialsPath, formatDaemonActivities, formatWhen, getContinuations, hasAnchorAt, hooksDisabled, installService, launchdPlist, log, offerDeclined, peekDaemonActivities, pendingNoticeNeeded, pendingPath, planForTest, readAnchorHandleAt, readAnchorHandleFrom, readCredentials, readHookInput, readJsonFile, readPending, readState, recordContinuation, recordDaemonActivity, recordOfferDeclined, recordPendingNotice, recordRegistrationOffer, relativeAge, relativeWhen, removeAnchorAt, renderAnchorBlock, renderManual, resetSession, resolveIdentity, serviceDefinitionCurrent, serviceInstalled, serviceStatus, sessionEnd, sessionStart, setPendingAck, shouldOfferRegistration, spawnCommand, spawnCommandSync, statePath, stop, stripAnchorBlock, systemdQuote, systemdUnit, takePendingAck, uninstallService, upsertAnchorBlock, userPrompt, writeAnchor, writeCredentials, writePending, writeState, xmlEscape };
|