@wowyuarm/dsh-agent-team 0.1.8 → 0.1.10
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 +4 -11
- package/README.zh.md +4 -11
- package/package.json +54 -44
- package/packages/agent-team/README.md +7 -5
- package/packages/agent-team/README.zh.md +7 -4
- package/packages/agent-team/lib/attachments.js +14 -4
- package/packages/agent-team/lib/context-management.js +382 -0
- package/packages/agent-team/lib/context-projection.js +578 -0
- package/packages/agent-team/lib/context-source.js +212 -0
- package/packages/agent-team/lib/index.js +1272 -76
- package/packages/agent-team/lib/ledger.js +333 -44
- package/packages/agent-team/lib/member-context.js +6 -2
- package/packages/agent-team/lib/member-runtime.js +159 -4
- package/packages/agent-team/lib/member-time-context.js +126 -0
- package/packages/agent-team/lib/pressure-policy.js +199 -0
- package/packages/agent-team/lib/progress-nudge.js +12 -4
- package/packages/agent-team/lib/session-remediation.js +481 -0
- package/packages/agent-team/lib/spec.js +21 -2
- package/packages/agent-team/lib/time-format.js +56 -0
- package/packages/agent-team/lib/typert.host.js +168 -54
- package/packages/agent-team/lib/typert.remote-client.d.ts.map +1 -1
- package/packages/agent-team/lib/typert.remote-client.js +59 -25
- package/packages/agent-team/lib/types/attachments.d.ts +1 -1
- package/packages/agent-team/lib/types/attachments.d.ts.map +1 -1
- package/packages/agent-team/lib/types/context-management.d.ts +147 -0
- package/packages/agent-team/lib/types/context-management.d.ts.map +1 -0
- package/packages/agent-team/lib/types/context-projection.d.ts +219 -0
- package/packages/agent-team/lib/types/context-projection.d.ts.map +1 -0
- package/packages/agent-team/lib/types/context-source.d.ts +117 -0
- package/packages/agent-team/lib/types/context-source.d.ts.map +1 -0
- package/packages/agent-team/lib/types/index.d.ts +300 -2
- package/packages/agent-team/lib/types/index.d.ts.map +1 -1
- package/packages/agent-team/lib/types/ledger.d.ts +119 -6
- package/packages/agent-team/lib/types/ledger.d.ts.map +1 -1
- package/packages/agent-team/lib/types/member-context.d.ts.map +1 -1
- package/packages/agent-team/lib/types/member-runtime.d.ts +30 -2
- package/packages/agent-team/lib/types/member-runtime.d.ts.map +1 -1
- package/packages/agent-team/lib/types/member-time-context.d.ts +83 -0
- package/packages/agent-team/lib/types/member-time-context.d.ts.map +1 -0
- package/packages/agent-team/lib/types/pressure-policy.d.ts +106 -0
- package/packages/agent-team/lib/types/pressure-policy.d.ts.map +1 -0
- package/packages/agent-team/lib/types/progress-nudge.d.ts.map +1 -1
- package/packages/agent-team/lib/types/session-remediation.d.ts +149 -0
- package/packages/agent-team/lib/types/session-remediation.d.ts.map +1 -0
- package/packages/agent-team/lib/types/spec.d.ts.map +1 -1
- package/packages/agent-team/lib/types/time-format.d.ts +28 -0
- package/packages/agent-team/lib/types/time-format.d.ts.map +1 -0
- package/packages/agent-team/lib/types/types/entities.d.ts +22 -1
- package/packages/agent-team/lib/types/types/entities.d.ts.map +1 -1
- package/packages/agent-team/lib/types/types/operations.d.ts +38 -3
- package/packages/agent-team/lib/types/types/operations.d.ts.map +1 -1
- package/packages/agent-team/lib/types/types/requests-results.d.ts +58 -1
- package/packages/agent-team/lib/types/types/requests-results.d.ts.map +1 -1
- package/packages/agent-team/preset/team-member/agent.cordis.yml +27 -4
- package/packages/client-agent-team/lib/client.js +369 -352
- package/packages/client-agent-team/lib/client.js.map +1 -1
- package/packages/client-agent-team/lib/types/client/TeamAgentsPanel.d.ts +1 -2
- package/packages/client-agent-team/lib/types/client/TeamAgentsPanel.d.ts.map +1 -1
- package/packages/client-agent-team/lib/types/client/TeamAgentsPanel.js +61 -41
- package/packages/client-agent-team/lib/types/client/TeamMessage.js +2 -2
- package/packages/client-agent-team/lib/types/client/TeamThreadPage.js +4 -4
- package/packages/client-agent-team/lib/types/client/TeamWorkspaceBrowser.d.ts +1 -1
- package/packages/client-agent-team/lib/types/client/TeamWorkspaceBrowser.d.ts.map +1 -1
- package/packages/client-agent-team/lib/types/client/TeamWorkspaceBrowser.js +2 -2
- package/packages/client-agent-team/lib/types/client/index.d.ts.map +1 -1
- package/packages/client-agent-team/lib/types/client/index.js +44 -16
- package/packages/client-agent-team/lib/types/client/locales.d.ts +0 -14
- package/packages/client-agent-team/lib/types/client/locales.d.ts.map +1 -1
- package/packages/client-agent-team/lib/types/client/locales.js +0 -14
- package/packages/client-agent-team/lib/types/client/slots.d.ts +6 -1
- package/packages/client-agent-team/lib/types/client/slots.d.ts.map +1 -1
- package/packages/tool-agent-team/README.md +11 -6
- package/packages/tool-agent-team/README.zh.md +11 -6
- package/packages/tool-agent-team/lib/context-tools.js +179 -0
- package/packages/tool-agent-team/lib/index.js +369 -58
- package/packages/tool-agent-team/lib/types/context-tools.d.ts +16 -0
- package/packages/tool-agent-team/lib/types/context-tools.d.ts.map +1 -0
- package/packages/tool-agent-team/lib/types/index.d.ts.map +1 -1
- package/packages/agent-team/lib/auto-compaction.js +0 -201
- package/packages/agent-team/lib/types/auto-compaction.d.ts +0 -47
- package/packages/agent-team/lib/types/auto-compaction.d.ts.map +0 -1
|
@@ -7,8 +7,10 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import { Context, Service } from '@deepseek-ai/cordis';
|
|
9
9
|
import { type Agent } from '@deepseek-ai/dsh-agent';
|
|
10
|
+
import { SessionId } from '@deepseek-ai/dsh-session';
|
|
10
11
|
import { TypertRemoteService } from '@deepseek-ai/dsh-typert-protocol';
|
|
11
|
-
import
|
|
12
|
+
import { type AgentTeamDurableMemberResult } from './ledger.ts';
|
|
13
|
+
import type { AgentTeamAddMemberRequest, AgentTeamAgentMember, AgentTeamAgentMemberStatus, AgentTeamArchiveChannelRequest, AgentTeamArchiveChannelResult, AgentTeamArchiveMemberRequest, AgentTeamArchiveMemberResult, AgentTeamChangesRequest, AgentTeamChangesResult, AgentTeamClaimList, AgentTeamClaimRequest, AgentTeamClaimResult, AgentTeamClientMemberStatus, AgentTeamContextCheckpointRef, AgentTeamCreateChannelRequest, AgentTeamCreateChannelResult, AgentTeamGetAttachmentRequest, AgentTeamGetAttachmentResult, AgentTeamInbox, AgentTeamInboxRequest, AgentTeamJoinChannelRequest, AgentTeamJoinChannelResult, AgentTeamMemberId, AgentTeamMemberResult, AgentTeamMembersRequest, AgentTeamResolveTaskRefsRequest, AgentTeamResolveTaskRefsResult, AgentTeamOperationReceipt, AgentTeamPromoteThreadRequest, AgentTeamPromoteThreadResult, AgentTeamPutAttachmentRequest, AgentTeamPutAttachmentResult, AgentTeamRecoverMemberRequest, AgentTeamRecoverMemberResult, AgentTeamClearMemberContextRequest, AgentTeamClearMemberContextResult, AgentTeamRolloverSessionRequest, AgentTeamDmRequest, AgentTeamDmResult, AgentTeamRemoveChannelMemberRequest, AgentTeamRemoveChannelMemberResult, AgentTeamRemoveMemberRequest, AgentTeamRemoveMemberResult, AgentTeamReplyRequest, AgentTeamReplyResult, AgentTeamSendMessageRequest, AgentTeamSendMessageResult, AgentTeamSetMemberStateRequest, AgentTeamStatus, AgentTeamTask, AgentTeamTaskRequest, AgentTeamTaskResult, AgentTeamThreadAttentionRequest, AgentTeamThreadAttentionResult, AgentTeamThreadAttentionStatus, AgentTeamThreadHistory, AgentTeamThreadHistoryRequest, AgentTeamThreadReadRequest, AgentTeamThreadReadResult, AgentTeamThreadObservations, AgentTeamThreadObservationsRequest, AgentTeamUpdateChannelRequest, AgentTeamUpdateChannelResult, AgentTeamUpdateMemberRequest, AgentTeamView, AgentTeamViewRequest } from './types.ts';
|
|
12
14
|
export { agentTeamDomainSpec, agentTeamOperationSchema } from './spec.ts';
|
|
13
15
|
export type * from './types.ts';
|
|
14
16
|
export { AGENT_TEAM_HUMAN_MEMBER_ID, AGENT_TEAM_INITIALIZE_REQUEST_ID } from './ledger.ts';
|
|
@@ -17,6 +19,24 @@ export { AGENT_TEAM_TOOL_NAMES } from './member-runtime.ts';
|
|
|
17
19
|
export declare const AGENT_TEAM_PRESET_MARKER: unique symbol;
|
|
18
20
|
/** Mark the preset's `team_message` definition as an Agent Team consumer. */
|
|
19
21
|
export declare function markAgentTeamPreset<T extends object>(definition: T): T;
|
|
22
|
+
/**
|
|
23
|
+
* Whether the running dsh loads workspace packages from source via tsx.
|
|
24
|
+
*
|
|
25
|
+
* The Harness `tsconfig.base.json` maps `@deepseek-ai/*` package names onto
|
|
26
|
+
* `src/` directories; tsx honors those paths, so a CLI launched with
|
|
27
|
+
* `node --import tsx/esm apps/cli/src/bin.ts` imports `@deepseek-ai/dsh-scope`
|
|
28
|
+
* from `src/index.ts` while a profile-installed bundle resolves the compiled
|
|
29
|
+
* `lib/index.js` — two module instances with independent scope keys.
|
|
30
|
+
*/
|
|
31
|
+
export declare function isTsxDevMode(): boolean;
|
|
32
|
+
/**
|
|
33
|
+
* The activation diagnostic for a dsh-scope module-instance mismatch.
|
|
34
|
+
*
|
|
35
|
+
* `agentPresets.mount` already rejected an unscoped context, so a scope key
|
|
36
|
+
* the harness sees but this bundle does not can only mean the two sides
|
|
37
|
+
* loaded different physical copies of `@deepseek-ai/dsh-scope`.
|
|
38
|
+
*/
|
|
39
|
+
export declare function teamPresetScopeMismatchMessage(tsxDevMode: boolean): string;
|
|
20
40
|
export interface AgentTeamCommitted {
|
|
21
41
|
readonly receipt: AgentTeamOperationReceipt;
|
|
22
42
|
}
|
|
@@ -40,6 +60,69 @@ declare module '@deepseek-ai/cordis' {
|
|
|
40
60
|
'agent-team/committed'(event: AgentTeamCommitted): void;
|
|
41
61
|
}
|
|
42
62
|
}
|
|
63
|
+
/** Tool-side request for one context rollover; the Host validates without side effects. */
|
|
64
|
+
export interface AgentTeamNewContextToolRequest {
|
|
65
|
+
readonly memberId: AgentTeamMemberId;
|
|
66
|
+
/** Selected checkpoint ref from `context_timeline`; absent means fresh. */
|
|
67
|
+
readonly checkpointRef?: AgentTeamContextCheckpointRef;
|
|
68
|
+
readonly relatedFiles?: readonly {
|
|
69
|
+
readonly path: string;
|
|
70
|
+
readonly reason: string;
|
|
71
|
+
}[];
|
|
72
|
+
}
|
|
73
|
+
/** Tool-side validation outcome: which rollover mode a successful call will take. */
|
|
74
|
+
export interface AgentTeamNewContextToolOutcome {
|
|
75
|
+
readonly mode: 'fresh' | 'from-checkpoint';
|
|
76
|
+
}
|
|
77
|
+
/** Tool-side request for one explicit checkpoint; the Host validates without side effects. */
|
|
78
|
+
export interface AgentTeamCheckpointToolRequest {
|
|
79
|
+
readonly memberId: AgentTeamMemberId;
|
|
80
|
+
/** Provider-issued call id of this tool call; the stable ref derives from it. */
|
|
81
|
+
readonly callId: string;
|
|
82
|
+
readonly name: string;
|
|
83
|
+
}
|
|
84
|
+
/** Tool-side checkpoint validation outcome: the deterministic ref the result will carry. */
|
|
85
|
+
export interface AgentTeamCheckpointToolOutcome {
|
|
86
|
+
readonly checkpointRef: AgentTeamContextCheckpointRef;
|
|
87
|
+
readonly name: string;
|
|
88
|
+
}
|
|
89
|
+
/** Tool-side request for the bounded structural context timeline. */
|
|
90
|
+
export interface AgentTeamTimelineToolRequest {
|
|
91
|
+
readonly memberId: AgentTeamMemberId;
|
|
92
|
+
readonly limit?: number;
|
|
93
|
+
}
|
|
94
|
+
/** One structural timeline item: a checkpoint or boundary candidate with pricing. */
|
|
95
|
+
export interface AgentTeamTimelineItem {
|
|
96
|
+
/** Opaque stable ref; the selection surface for `context_rollover.checkpointRef`. */
|
|
97
|
+
readonly checkpointRef: string;
|
|
98
|
+
/** Semantic label: the model-supplied checkpoint name or boundary label. */
|
|
99
|
+
readonly name: string;
|
|
100
|
+
/** Which structural source produced this item. */
|
|
101
|
+
readonly source: 'agent' | 'team-boundary' | 'handoff' | 'compaction' | 'head';
|
|
102
|
+
/** Approximate tokens a return would retain (the prefix through this anchor). */
|
|
103
|
+
readonly retainedTokens: number;
|
|
104
|
+
/** Approximate tokens a return would discard (the suffix after this anchor). */
|
|
105
|
+
readonly discardedTokens: number;
|
|
106
|
+
/**
|
|
107
|
+
* Threads whose facts entered this Session's model context by this anchor
|
|
108
|
+
* (delivered Team notices only — never unread ledger activity). Empty when
|
|
109
|
+
* nothing attributable was delivered.
|
|
110
|
+
*/
|
|
111
|
+
readonly affectedThreads: readonly string[];
|
|
112
|
+
/** Whether `context_rollover` accepts this ref as a seed target. */
|
|
113
|
+
readonly restorable: boolean;
|
|
114
|
+
/** When not restorable, the concise reason. */
|
|
115
|
+
readonly reason?: string;
|
|
116
|
+
/** Session the candidate anchors in; present for non-current-generation sources. */
|
|
117
|
+
readonly sourceSessionId?: SessionId;
|
|
118
|
+
}
|
|
119
|
+
/** Tool-side timeline outcome: usage plus the bounded structural candidate list. */
|
|
120
|
+
export interface AgentTeamTimelineToolResult {
|
|
121
|
+
readonly usageTokens: number;
|
|
122
|
+
readonly hardLimit: number;
|
|
123
|
+
readonly handoffAt: number;
|
|
124
|
+
readonly items: readonly AgentTeamTimelineItem[];
|
|
125
|
+
}
|
|
43
126
|
/** Host owner of the single Agent Team in one dshHome. */
|
|
44
127
|
export default class AgentTeam extends TypertRemoteService {
|
|
45
128
|
static inject: string[];
|
|
@@ -62,7 +145,7 @@ export default class AgentTeam extends TypertRemoteService {
|
|
|
62
145
|
* stale keys.
|
|
63
146
|
*/
|
|
64
147
|
private readonly memberFailures;
|
|
65
|
-
private readonly
|
|
148
|
+
private readonly pressurePolicy;
|
|
66
149
|
private readonly notifiedInbox;
|
|
67
150
|
private attachmentGcTimer?;
|
|
68
151
|
private readonly recovery;
|
|
@@ -72,6 +155,14 @@ export default class AgentTeam extends TypertRemoteService {
|
|
|
72
155
|
* writes Team facts. See docs/team-collaboration.md for the regimes.
|
|
73
156
|
*/
|
|
74
157
|
private readonly progressNudge;
|
|
158
|
+
/**
|
|
159
|
+
* Context self-management: the one deep module that turns a Member's
|
|
160
|
+
* successful `context_rollover` tool result into its next private context
|
|
161
|
+
* generation. The ledger owns the binding audit, the Session projection
|
|
162
|
+
* owns intent, and this coordinator owns only reconstructible process
|
|
163
|
+
* state. See docs/architecture.md and docs/team-collaboration.md.
|
|
164
|
+
*/
|
|
165
|
+
private readonly contextManagement;
|
|
75
166
|
private lifecycleTail;
|
|
76
167
|
private accepting;
|
|
77
168
|
private changeVersion;
|
|
@@ -79,6 +170,15 @@ export default class AgentTeam extends TypertRemoteService {
|
|
|
79
170
|
constructor(ctx: Context);
|
|
80
171
|
/** Open the durable ledger and restore every enabled Member independently. */
|
|
81
172
|
protected [Service.init](): Promise<void>;
|
|
173
|
+
/**
|
|
174
|
+
* Whether one Member Session has durable persisted content, decided through
|
|
175
|
+
* {@link SessionPersistence.stat} rather than a bare metadata listing: the
|
|
176
|
+
* backend reports a still-draining session through its pending header, so a
|
|
177
|
+
* resume racing a suspend's fire-and-forget final flush cannot mistake a
|
|
178
|
+
* still-draining persisted Session for an unpersisted one and fork a fresh
|
|
179
|
+
* generation over it.
|
|
180
|
+
*/
|
|
181
|
+
private sessionPersisted;
|
|
82
182
|
/** Resolve one exact live Agent to its durable Team Member; forks do not inherit identity. */
|
|
83
183
|
memberForAgent(agent: Agent): AgentTeamAgentMember | undefined;
|
|
84
184
|
/** Return every durable Member with current process availability. */
|
|
@@ -127,6 +227,22 @@ export default class AgentTeam extends TypertRemoteService {
|
|
|
127
227
|
* grayed session view.
|
|
128
228
|
*/
|
|
129
229
|
clearMemberContext(request: AgentTeamClearMemberContextRequest): Promise<AgentTeamClearMemberContextResult>;
|
|
230
|
+
/**
|
|
231
|
+
* Retire one Member's previous generation after its durable binding moved
|
|
232
|
+
* onto a new Session id: drop the old handle's transient state, dispose the
|
|
233
|
+
* Agent, and archive the old Session log (which stays on disk for history).
|
|
234
|
+
* Shared by the Human clear path and the model-initiated rollover.
|
|
235
|
+
*/
|
|
236
|
+
private retireMemberGeneration;
|
|
237
|
+
/**
|
|
238
|
+
* Execute one prepared context rollover at a true idle boundary: commit the
|
|
239
|
+
* idempotent Member-actor operation, retire the previous generation, and
|
|
240
|
+
* activate the fresh Session whose first model-facing context is the
|
|
241
|
+
* Member's own handoff. Later non-Team input captured during the transition
|
|
242
|
+
* is delivered after the handoff; the Team Inbox is rederived from the
|
|
243
|
+
* ledger, never copied.
|
|
244
|
+
*/
|
|
245
|
+
private executeMemberTransition;
|
|
130
246
|
/** Ledger handle for log lines; falls back to the raw id when unknown. */
|
|
131
247
|
private memberLabel;
|
|
132
248
|
/**
|
|
@@ -232,6 +348,16 @@ export default class AgentTeam extends TypertRemoteService {
|
|
|
232
348
|
}): AgentTeamClaimList;
|
|
233
349
|
inboxForAgent(agent: Agent, request: AgentTeamInboxRequest): AgentTeamInbox;
|
|
234
350
|
readThreadForAgent(agent: Agent, request: AgentTeamThreadReadRequest): Promise<AgentTeamThreadReadResult>;
|
|
351
|
+
/**
|
|
352
|
+
* Context advice for one acceptance acknowledged by this read: only when
|
|
353
|
+
* the read carried an unread accept activity AND the Task is still done.
|
|
354
|
+
* Repeat reads (nothing unread), history-style reads, and reopened Tasks
|
|
355
|
+
* carry no advice — the acceptance no longer stands.
|
|
356
|
+
*/
|
|
357
|
+
private acceptanceContextAdvice;
|
|
358
|
+
/** Price the reading Member's context against its current route's budgets. */
|
|
359
|
+
private contextAdviceFor;
|
|
360
|
+
private unavailableAdvice;
|
|
235
361
|
/**
|
|
236
362
|
* Agent-only direct message: append the audit-only dm-sent operation, then
|
|
237
363
|
* inject the body into the recipient's live session. The ledger commit is
|
|
@@ -247,6 +373,164 @@ export default class AgentTeam extends TypertRemoteService {
|
|
|
247
373
|
viewForAgent(agent: Agent, request: AgentTeamViewRequest): AgentTeamView;
|
|
248
374
|
/** Validate the durable ledger against an independently replayed projection. */
|
|
249
375
|
validateLedger(): void;
|
|
376
|
+
/**
|
|
377
|
+
* Effective context-pressure budget for one Member's current route:
|
|
378
|
+
* `hardLimit = min(256K, routeWindow - outputReserve)` and
|
|
379
|
+
* `handoffAt = min(200K, hardLimit - handoffReserve)`.
|
|
380
|
+
*/
|
|
381
|
+
private contextLimits;
|
|
382
|
+
/**
|
|
383
|
+
* Budget + measurement for one Member's CURRENT routed selection — the
|
|
384
|
+
* member-pinned model or the default selection, resolved through the LLM
|
|
385
|
+
* service so a route change is honored at the next pre-step. The last
|
|
386
|
+
* persisted `request/context` event wins when it matches the current
|
|
387
|
+
* selection (no directory round-trip for an unchanged route). A selection
|
|
388
|
+
* whose capacity cannot be resolved returns `undefined` and the pressure
|
|
389
|
+
* policy fails closed instead of assuming an unbounded route.
|
|
390
|
+
*/
|
|
391
|
+
private routeLimitsForAgent;
|
|
392
|
+
/** Cache of resolved context windows per provider/model; unknown stays unknown. */
|
|
393
|
+
private readonly routeWindows;
|
|
394
|
+
/**
|
|
395
|
+
* Resolve one selection's provider-owned context capacity, cached per
|
|
396
|
+
* route. The LLM service is resolved lazily (not a hard inject): the Host
|
|
397
|
+
* mounts it in every production shape, while ledger-level fixtures provide
|
|
398
|
+
* only the services the Team service itself owns. A missing or throwing
|
|
399
|
+
* resolution is an unknown route — the pressure policy fails closed on it.
|
|
400
|
+
*/
|
|
401
|
+
private resolvedContextWindow;
|
|
402
|
+
/**
|
|
403
|
+
* Resolve one checkpoint ref to its exact seed prefix before any rollover
|
|
404
|
+
* commit. The walk covers the current generation (own events) and archived
|
|
405
|
+
* ancestors through `sessionPersistence`; the same projection definition
|
|
406
|
+
* folds every source. Guards fail closed: unresolved, foreign-lineage,
|
|
407
|
+
* open-turn, or nonshrinking targets reject without any lifecycle effect.
|
|
408
|
+
*/
|
|
409
|
+
private resolveCheckpointSeed;
|
|
410
|
+
/**
|
|
411
|
+
* Rebuild the handoff for a Member whose rollover committed but whose new
|
|
412
|
+
* Session activated without the handoff delivery (a crash between the
|
|
413
|
+
* ledger commit and the swap's delivery step). The previous Session —
|
|
414
|
+
* recorded in the operation, mirrored by the lineage parent, and available
|
|
415
|
+
* from the ledger even when the new Session's own header never carried it —
|
|
416
|
+
* holds the durable intent; fold it cold and deliver the same handoff
|
|
417
|
+
* envelope first. Idempotent: once any handoff exists in the new Session's
|
|
418
|
+
* own log this never runs.
|
|
419
|
+
*/
|
|
420
|
+
private reconstructMissingHandoff;
|
|
421
|
+
/**
|
|
422
|
+
* Resolve the exact recorded seed prefix of one committed checkpoint
|
|
423
|
+
* return for crash recovery: cold-read the recorded source Session, take
|
|
424
|
+
* the contiguous prefix of the recorded exclusive length, and verify the
|
|
425
|
+
* source's own fold still resolves the recorded anchor there — an explicit
|
|
426
|
+
* checkpoint through `checkpointByRef`, or a default Team boundary whose
|
|
427
|
+
* recorded ref appears among the source's own boundary keys.
|
|
428
|
+
* Fail-closed by contract: an unreadable source or an unprovable anchor
|
|
429
|
+
* REJECTS the activation — a committed checkpoint return may never
|
|
430
|
+
* downgrade to a blank child.
|
|
431
|
+
*/
|
|
432
|
+
private recordedCheckpointPrefix;
|
|
433
|
+
/**
|
|
434
|
+
* Redeliver the old generation's unconsumed post-intent input to a
|
|
435
|
+
* generation whose durable rollover committed but whose delivery did not
|
|
436
|
+
* finish. Bound to the ledger's recorded transition target — the CURRENT
|
|
437
|
+
* Session being that target — never to whether the handoff itself landed,
|
|
438
|
+
* so a crash after the handoff but before the carried enqueue still
|
|
439
|
+
* replays. The fold is the same durable truth the live transition uses
|
|
440
|
+
* (unconsumed, non-Team, order preserved). Idempotency keys on what is
|
|
441
|
+
* CURRENTLY present: delivered `user/message` ids plus the live inbox's
|
|
442
|
+
* pending next-step/next-turn ids — a historical insert that was already
|
|
443
|
+
* claimed (and removed) but never surfaced is NOT known and must replay.
|
|
444
|
+
* Fail-closed for genuinely unreadable previous Sessions (missing/IO) so
|
|
445
|
+
* the Member's input is never dropped silently, with three bounded
|
|
446
|
+
* exceptions: a generation that already started its own turns needs no
|
|
447
|
+
* replay (its carried input was delivered or superseded while it ran), a
|
|
448
|
+
* log-corruption class error skips with a warning (the Host repairs torn
|
|
449
|
+
* tails; a retired generation's corrupt log must not permanently block the
|
|
450
|
+
* Member's activation), and a deterministic released-format refusal skips
|
|
451
|
+
* with a warning (the candidate's own migration audit refuses that
|
|
452
|
+
* artifact, so no retry can ever read it).
|
|
453
|
+
*/
|
|
454
|
+
private replayCarriedInput;
|
|
455
|
+
/**
|
|
456
|
+
* Agent-only checkpoint request validation: the tool calls this inside its
|
|
457
|
+
* own running turn. Like `context_rollover`, the tool performs no side effect —
|
|
458
|
+
* the durable checkpoint is the successful `tool/call`+`tool/result` pair
|
|
459
|
+
* the Session projection folds; the ref returned here is deterministic
|
|
460
|
+
* from this Member Session's identity plus the tool call id, so the model
|
|
461
|
+
* can cite it before the result exists and a repeated provider call id in
|
|
462
|
+
* another generation never collides with this one.
|
|
463
|
+
*/
|
|
464
|
+
recordCheckpointForAgent(agent: Agent, request: AgentTeamCheckpointToolRequest): AgentTeamCheckpointToolOutcome;
|
|
465
|
+
/**
|
|
466
|
+
* Agent-only bounded structural timeline: resolved checkpoints plus Team
|
|
467
|
+
* delivery, handoff, and compaction boundaries across the current
|
|
468
|
+
* generation and its archived ancestor lineage. Structural only — no
|
|
469
|
+
* transcript content. The meter prices retained/discarded tokens; entries
|
|
470
|
+
* the Host cannot prove restorable carry a rejection reason instead of
|
|
471
|
+
* silently disappearing.
|
|
472
|
+
*/
|
|
473
|
+
contextTimelineForAgent(agent: Agent, request: AgentTeamTimelineToolRequest): Promise<AgentTeamTimelineToolResult>;
|
|
474
|
+
/**
|
|
475
|
+
* Replayed measurement of one lineage source: the live current Session
|
|
476
|
+
* measures directly; an archived ancestor measures through a borrowed
|
|
477
|
+
* prepared Session, so a seed's retained cost is priced in the SOURCE's
|
|
478
|
+
* own tokens — never the current generation's. Returns undefined when no
|
|
479
|
+
* meter is available or the source cannot be borrowed; callers fail
|
|
480
|
+
* closed on the unknown.
|
|
481
|
+
*/
|
|
482
|
+
private sourceUsageTokens;
|
|
483
|
+
/**
|
|
484
|
+
* Monotonic anchor-share estimate of a seed's retained cost, priced in the
|
|
485
|
+
* SOURCE Session's own measurement: the fraction of the source log the
|
|
486
|
+
* seed prefix covers, scaled to the source's replayed token count. The
|
|
487
|
+
* anchor position is exact and the share grows monotonically toward the
|
|
488
|
+
* source's head (100%). A large ancestor's anchor therefore prices at the
|
|
489
|
+
* ancestor's real size even inside a small current generation — the
|
|
490
|
+
* timeline display and the return guard share this one estimate.
|
|
491
|
+
*/
|
|
492
|
+
private retainedEstimate;
|
|
493
|
+
/**
|
|
494
|
+
* Threads whose facts entered this Session's model context by the given
|
|
495
|
+
* seq: delivered Team notices (their bodies quote `Thread: <ref>`
|
|
496
|
+
* structurally) and successful Team-claim mutations (their task overlays
|
|
497
|
+
* resolve to Threads through the ledger). Never from unread ledger
|
|
498
|
+
* activity — a Thread the Member never saw did not enter its context.
|
|
499
|
+
* Order-stable, deduplicated.
|
|
500
|
+
*/
|
|
501
|
+
private threadsEnteringContext;
|
|
502
|
+
/**
|
|
503
|
+
* Price and annotate one timeline candidate without mutating anything.
|
|
504
|
+
* Retained prices in the SOURCE Session's own replayed measurement (the
|
|
505
|
+
* monotonic anchor-share of the source log); discarded is what a return
|
|
506
|
+
* replaces — for a current-generation anchor, the measured usage beyond
|
|
507
|
+
* the anchor; for an ancestor anchor, the current generation's whole
|
|
508
|
+
* usage (an approximation: the ancestor's own suffix is not part of this
|
|
509
|
+
* generation). A small current child therefore discards little but may
|
|
510
|
+
* still retain a large ancestor seed, and both numbers say so honestly.
|
|
511
|
+
*/
|
|
512
|
+
private timelineItemFor;
|
|
513
|
+
/**
|
|
514
|
+
* Agent-only rollover request validation: the tool calls this to check its
|
|
515
|
+
* Member binding, exclusivity, and checkpoint ownership. It performs no
|
|
516
|
+
* lifecycle effect — the actual transition reacts to the successful tool
|
|
517
|
+
* result through the context-management coordinator.
|
|
518
|
+
*/
|
|
519
|
+
requestNewContext(agent: Agent, request: AgentTeamNewContextToolRequest): Promise<AgentTeamNewContextToolOutcome>;
|
|
520
|
+
/**
|
|
521
|
+
* Jobs this Agent owns that cannot survive a generation swap: any
|
|
522
|
+
* running/stopping job, and any settled job whose terminal output was
|
|
523
|
+
* never reported (disposal would silently discard it). In-place hard
|
|
524
|
+
* compaction is exempt — it never cancels the owner.
|
|
525
|
+
*/
|
|
526
|
+
private ownedJobsBlockingRollover;
|
|
527
|
+
/**
|
|
528
|
+
* Agent-only session rollover commit: the Member actor must be the target
|
|
529
|
+
* Member on its currently bound live Session. The Host performs the actual
|
|
530
|
+
* generation swap around this write; the ledger records only the durable
|
|
531
|
+
* binding transition and rollover audit envelope.
|
|
532
|
+
*/
|
|
533
|
+
rolloverSessionForAgent(agent: Agent, request: AgentTeamRolloverSessionRequest): Promise<AgentTeamDurableMemberResult>;
|
|
250
534
|
private emitCommittedOutcome;
|
|
251
535
|
private assertChannelMembersAvailable;
|
|
252
536
|
/** Shared Task-creation commit: resolve uploads into metadata lines and append through the ledger. */
|
|
@@ -265,6 +549,16 @@ export default class AgentTeam extends TypertRemoteService {
|
|
|
265
549
|
* LLM layer's runtime check at call time.
|
|
266
550
|
*/
|
|
267
551
|
private assertModelRoute;
|
|
552
|
+
/**
|
|
553
|
+
* Session headers currently durable in the persistence backend.
|
|
554
|
+
*
|
|
555
|
+
* The Host retires a disposed Session's log without awaiting it, so a
|
|
556
|
+
* concurrent activation can observe the JSONL backend's transient win32
|
|
557
|
+
* staging directories (.dsh-mkdir-*) as ENOENT while they rename into
|
|
558
|
+
* place. The read is idempotent; back off briefly instead of failing the
|
|
559
|
+
* activation on a race the publisher resolves within milliseconds.
|
|
560
|
+
*/
|
|
561
|
+
private persistedSessionHeaders;
|
|
268
562
|
private activateMember;
|
|
269
563
|
/**
|
|
270
564
|
* Rebuild one enabled Member in place from its persisted Session.
|
|
@@ -291,6 +585,10 @@ export default class AgentTeam extends TypertRemoteService {
|
|
|
291
585
|
private requireLedger;
|
|
292
586
|
private requireAccepting;
|
|
293
587
|
private emitCommitted;
|
|
588
|
+
/** Model-visible active-Claim labels for the pressure notice. */
|
|
589
|
+
private activeClaimLabels;
|
|
590
|
+
/** Model-visible running/stopping job labels for the pressure notice. */
|
|
591
|
+
private runningJobLabels;
|
|
294
592
|
private emitAutoCompactionChanged;
|
|
295
593
|
/** Wake from durable unread state with bounded facts for direct and state-changing work. */
|
|
296
594
|
private notifyMember;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","s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,OAAO,CAAC,kBAAkB;IAQ1B,OAAO,CAAC,gBAAgB;IAMxB,OAAO,CAAC,aAAa;IAKrB,OAAO,CAAC,gBAAgB;IAIxB,OAAO,CAAC,aAAa;IAsBrB,iEAAiE;IACjE,OAAO,CAAC,iBAAiB;IAWzB,yEAAyE;IACzE,OAAO,CAAC,gBAAgB;IAUxB,OAAO,CAAC,yBAAyB;IAKjC,4FAA4F;IAC5F,OAAO,CAAC,YAAY;IAiDpB,OAAO,CAAC,aAAa;IAMrB,OAAO,CAAC,gBAAgB;IAMxB,OAAO,CAAC,gBAAgB;IA6CxB,OAAO,CAAC,uBAAuB;IAK/B,OAAO,CAAC,oBAAoB;IAwC5B,6EAA6E;YAC/D,oBAAoB;IAalC,OAAO,CAAC,wBAAwB;IAOhC,OAAO,CAAC,4BAA4B;IAIpC;;;;OAIG;IACH,OAAO,CAAC,WAAW;IAUnB,OAAO,CAAC,mBAAmB;IAO3B,OAAO,CAAC,gBAAgB;CAMzB"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { KvTable } from '@deepseek-ai/dsh-storage-domain';
|
|
2
|
-
import type { SessionId } from '@deepseek-ai/dsh-session';
|
|
2
|
+
import type { SessionId, SessionLogOffset, SessionSeq } from '@deepseek-ai/dsh-session';
|
|
3
3
|
import type { WorkspaceId } from '@deepseek-ai/dsh-workspace';
|
|
4
|
-
import type { AgentTeamAddMemberRequest, AgentTeamAttachmentId, AgentTeamAgentMember, AgentTeamArchiveChannelRequest, AgentTeamArchiveChannelResult, AgentTeamArchiveMemberRequest, AgentTeamArchiveMemberResult, AgentTeamChangeScope, AgentTeamClaim, AgentTeamClaimList, AgentTeamClaimRequest, AgentTeamClaimResult, AgentTeamClaimRef, AgentTeamCreateChannelRequest, AgentTeamCreateChannelResult, AgentTeamDmRequest, AgentTeamDmResult, AgentTeamHumanActor, AgentTeamInbox, AgentTeamInboxRequest, AgentTeamInboxItem, AgentTeamJoinChannelRequest, AgentTeamJoinChannelResult, AgentTeamMemberActor, AgentTeamMemberId, AgentTeamOperation, AgentTeamOperationId, AgentTeamOperationReceipt, AgentTeamRemoveChannelMemberRequest, AgentTeamRemoveChannelMemberResult, AgentTeamRemoveMemberRequest, AgentTeamRemoveMemberResult, AgentTeamReplyRequest, AgentTeamReplyResult, AgentTeamRequestId, AgentTeamResolvedTaskRef, AgentTeamMessageAttachment, AgentTeamSendMessageRequest, AgentTeamSendMessageResult, AgentTeamSetMemberStateRequest, AgentTeamStatus, AgentTeamTask, AgentTeamTaskRequest, AgentTeamTaskResult, AgentTeamTaskRef, AgentTeamThreadAttentionRequest, AgentTeamThreadAttentionResult, AgentTeamThreadAttentionStatus, AgentTeamThreadHistory, AgentTeamThreadHistoryRequest, AgentTeamThreadReadFact, AgentTeamThreadReadRequest, AgentTeamThreadReadResult, AgentTeamThreadObservations, AgentTeamThreadObservationsRequest, AgentTeamThreadRef, AgentTeamPromoteThreadRequest, AgentTeamPromoteThreadResult, AgentTeamProgressNudgeTargets, AgentTeamUpdateChannelRequest, AgentTeamUpdateChannelResult, AgentTeamUpdateMemberRequest, AgentTeamView, AgentTeamViewRequest } from './types.ts';
|
|
4
|
+
import type { AgentTeamAddMemberRequest, AgentTeamAttachmentId, AgentTeamAgentMember, AgentTeamArchiveChannelRequest, AgentTeamArchiveChannelResult, AgentTeamArchiveMemberRequest, AgentTeamArchiveMemberResult, AgentTeamChangeScope, AgentTeamContextCheckpointRef, AgentTeamClaim, AgentTeamClaimList, AgentTeamClaimRequest, AgentTeamClaimResult, AgentTeamClaimRef, AgentTeamCreateChannelRequest, AgentTeamCreateChannelResult, AgentTeamDmRequest, AgentTeamDmResult, AgentTeamHumanActor, AgentTeamInbox, AgentTeamInboxRequest, AgentTeamInboxItem, AgentTeamJoinChannelRequest, AgentTeamJoinChannelResult, AgentTeamMemberActor, AgentTeamMemberId, AgentTeamOperation, AgentTeamOperationId, AgentTeamOperationReceipt, AgentTeamRemoveChannelMemberRequest, AgentTeamRemoveChannelMemberResult, AgentTeamRemoveMemberRequest, AgentTeamRemoveMemberResult, AgentTeamReplyRequest, AgentTeamReplyResult, AgentTeamRequestId, AgentTeamResolvedTaskRef, AgentTeamMessageAttachment, AgentTeamSendMessageRequest, AgentTeamSendMessageResult, AgentTeamSetMemberStateRequest, AgentTeamStatus, AgentTeamTask, AgentTeamTaskRequest, AgentTeamTaskResult, AgentTeamTaskRef, AgentTeamThreadAttentionRequest, AgentTeamThreadAttentionResult, AgentTeamThreadAttentionStatus, AgentTeamThreadHistory, AgentTeamThreadHistoryRequest, AgentTeamThreadReadFact, AgentTeamThreadReadRequest, AgentTeamThreadReadResult, AgentTeamThreadObservations, AgentTeamThreadObservationsRequest, AgentTeamThreadRef, AgentTeamPromoteThreadRequest, AgentTeamPromoteThreadResult, AgentTeamProgressNudgeTargets, AgentTeamUpdateChannelRequest, AgentTeamUpdateChannelResult, AgentTeamUpdateMemberRequest, AgentTeamView, AgentTeamViewRequest } from './types.ts';
|
|
5
5
|
/** Stable Human Member identity shared by every replay of one dshHome Team. */
|
|
6
6
|
export declare const AGENT_TEAM_HUMAN_MEMBER_ID: AgentTeamMemberId;
|
|
7
7
|
/** Idempotency identity of the one Host bootstrap operation. */
|
|
@@ -33,6 +33,32 @@ export interface AgentTeamAuthorizedRenewMemberSessionRequest {
|
|
|
33
33
|
readonly sessionId: SessionId;
|
|
34
34
|
readonly actor: AgentTeamHumanActor;
|
|
35
35
|
}
|
|
36
|
+
/**
|
|
37
|
+
* Member-authored intent to continue in its next private context generation.
|
|
38
|
+
* The requestId and new Session id derive stably from the successful
|
|
39
|
+
* `context_rollover` tool call so crash replay converges on one operation.
|
|
40
|
+
*/
|
|
41
|
+
export interface AgentTeamAuthorizedRolloverMemberSessionRequest {
|
|
42
|
+
readonly requestId: AgentTeamRequestId;
|
|
43
|
+
readonly workspaceId: WorkspaceId;
|
|
44
|
+
readonly memberId: AgentTeamMemberId;
|
|
45
|
+
/** The calling Member; must be the target Member itself. */
|
|
46
|
+
readonly actor: AgentTeamMemberActor;
|
|
47
|
+
/** The Session the Member must still be bound to at commit time. */
|
|
48
|
+
readonly previousSessionId: SessionId;
|
|
49
|
+
/** The next generation Session, derived from the successful tool call. */
|
|
50
|
+
readonly newSessionId: SessionId;
|
|
51
|
+
/** Seq of the successful `context_rollover` tool result in the previous Session log. */
|
|
52
|
+
readonly handoffEventSeq: SessionSeq;
|
|
53
|
+
/** Why the rollover happened: the model asked, or honored a pressure notice. */
|
|
54
|
+
readonly trigger: 'model' | 'pressure';
|
|
55
|
+
/** Seed source Session for a checkpoint return; absent on a fresh rollover. */
|
|
56
|
+
readonly sourceSessionId?: SessionId;
|
|
57
|
+
/** Exclusive end of the seeded source prefix (its exact length in the source log). */
|
|
58
|
+
readonly sourceThroughSeq?: SessionLogOffset;
|
|
59
|
+
/** The checkpoint a return was addressed to; absent on a fresh rollover. */
|
|
60
|
+
readonly checkpointRef?: AgentTeamContextCheckpointRef;
|
|
61
|
+
}
|
|
36
62
|
export interface AgentTeamAuthorizedJoinChannelRequest extends AgentTeamJoinChannelRequest {
|
|
37
63
|
readonly actor: AgentTeamHumanActor;
|
|
38
64
|
}
|
|
@@ -97,6 +123,7 @@ interface AgentTeamDurableMemberResult {
|
|
|
97
123
|
readonly receipt: AgentTeamOperationReceipt;
|
|
98
124
|
readonly member: AgentTeamAgentMember;
|
|
99
125
|
}
|
|
126
|
+
export type { AgentTeamDurableMemberResult };
|
|
100
127
|
/** Replay and append logic behind the Agent Team service interface. */
|
|
101
128
|
export declare class AgentTeamLedger {
|
|
102
129
|
private readonly table;
|
|
@@ -124,7 +151,66 @@ export declare class AgentTeamLedger {
|
|
|
124
151
|
* Session log around this write, so the next turn starts empty.
|
|
125
152
|
*/
|
|
126
153
|
renewMemberSession(request: AgentTeamAuthorizedRenewMemberSessionRequest): Promise<AgentTeamLedgerResult<AgentTeamDurableMemberResult>>;
|
|
154
|
+
/**
|
|
155
|
+
* Move one enabled Member onto its next context generation as itself. The
|
|
156
|
+
* actor is the calling Member — the Host executes the transition but is
|
|
157
|
+
* never the business actor — and the durable data records only the
|
|
158
|
+
* verifiable envelope (previous/new Session anchors, the successful handoff
|
|
159
|
+
* tool-result seq, checkpoint seed lineage, trigger). The private handoff
|
|
160
|
+
* prose stays in the Member's own Session log. An exact retry resolves to
|
|
161
|
+
* the recorded outcome; the same requestId with different data collides.
|
|
162
|
+
*/
|
|
163
|
+
rolloverMemberSession(request: AgentTeamAuthorizedRolloverMemberSessionRequest): Promise<AgentTeamLedgerResult<AgentTeamDurableMemberResult>>;
|
|
127
164
|
getMember(memberId: AgentTeamMemberId): AgentTeamAgentMember | undefined;
|
|
165
|
+
/**
|
|
166
|
+
* The retired Session this Member most recently left through a renewal or
|
|
167
|
+
* rollover — the lineage parent a crash between the durable binding commit
|
|
168
|
+
* and the new Session's activation must reconstruct a handoff from. Read
|
|
169
|
+
* from the audit projection; the Member record itself only names the
|
|
170
|
+
* current Session.
|
|
171
|
+
*/
|
|
172
|
+
previousSessionForMember(memberId: AgentTeamMemberId): SessionId | undefined;
|
|
173
|
+
/**
|
|
174
|
+
* The latest session transition this Member committed: the retired Session
|
|
175
|
+
* and the target it moved onto, through either a renewal or a rollover.
|
|
176
|
+
* Crash recovery binds carried-input redelivery to the recorded target —
|
|
177
|
+
* the CURRENT Session being that target proves the old generation's
|
|
178
|
+
* unconsumed input still belongs here, regardless of whether the handoff
|
|
179
|
+
* itself already landed.
|
|
180
|
+
*/
|
|
181
|
+
lastTransitionForMember(memberId: AgentTeamMemberId): {
|
|
182
|
+
readonly previousSessionId: SessionId;
|
|
183
|
+
readonly targetSessionId: SessionId;
|
|
184
|
+
} | undefined;
|
|
185
|
+
/**
|
|
186
|
+
* The Thread a Task overlay lives on, or undefined for an unknown or
|
|
187
|
+
* archived-Channel Task. Read-only input for attributing claim-mutation
|
|
188
|
+
* boundaries to the Thread whose context they entered.
|
|
189
|
+
*/
|
|
190
|
+
threadForTask(taskRef: AgentTeamTaskRef): AgentTeamThreadRef | undefined;
|
|
191
|
+
/**
|
|
192
|
+
* The seed envelope of this Member's most recent rollover, when that
|
|
193
|
+
* rollover was a checkpoint return: the recorded source Session, the
|
|
194
|
+
* exclusive end of its seeded prefix, and the checkpoint ref. A fresh
|
|
195
|
+
* rollover clears the envelope. Crash recovery reads this to rebuild the
|
|
196
|
+
* child generation from the recorded seed instead of an empty context.
|
|
197
|
+
*/
|
|
198
|
+
rolloverSeedForMember(memberId: AgentTeamMemberId, targetSessionId: SessionId): {
|
|
199
|
+
readonly sourceSessionId: SessionId;
|
|
200
|
+
readonly sourceThroughSeq: SessionLogOffset;
|
|
201
|
+
readonly checkpointRef: AgentTeamContextCheckpointRef;
|
|
202
|
+
} | undefined;
|
|
203
|
+
/**
|
|
204
|
+
* Count one Member's active Claims on open Tasks in active Channels — the
|
|
205
|
+
* read-only input to the checkpoint single-Thread coverage guard: with
|
|
206
|
+
* more than one, a rewind cannot be proven to stay inside one Thread.
|
|
207
|
+
*/
|
|
208
|
+
activeClaimCountForMember(memberId: AgentTeamMemberId): number;
|
|
209
|
+
/**
|
|
210
|
+
* One Member's active Claims on open Tasks in active Channels, oldest
|
|
211
|
+
* first — the read-only input for the pressure notice's Claim labels.
|
|
212
|
+
*/
|
|
213
|
+
activeClaimsForMember(memberId: AgentTeamMemberId): readonly AgentTeamClaim[];
|
|
128
214
|
/**
|
|
129
215
|
* Current progress-nudge candidacy for one Member: threads whose Thread
|
|
130
216
|
* progress reminder applies (active Claim, or following a taskless Thread)
|
|
@@ -240,13 +326,23 @@ export declare class AgentTeamLedger {
|
|
|
240
326
|
private visibleToFollower;
|
|
241
327
|
private threadFacts;
|
|
242
328
|
private threadFactsFrom;
|
|
329
|
+
/**
|
|
330
|
+
* The one per-fact instant projection: a fact's wall-clock time is the
|
|
331
|
+
* occurredAt of the ledger operation that committed it, looked up by
|
|
332
|
+
* sequence inside the same read snapshot. Every agent-facing surface
|
|
333
|
+
* (Thread facts, notifications, DM history, mutation results) resolves
|
|
334
|
+
* through this single path, never a second parallel lookup.
|
|
335
|
+
*/
|
|
336
|
+
private occurredAtForFactFrom;
|
|
243
337
|
private messageInboxDelta;
|
|
244
338
|
private closeThreadInbox;
|
|
245
339
|
private closeThreadInboxFrom;
|
|
246
340
|
/**
|
|
247
|
-
*
|
|
248
|
-
*
|
|
249
|
-
*
|
|
341
|
+
* Acceptance notifies every done Claim owner — pre-finished (the normal
|
|
342
|
+
* flow) and atomically completed (early acceptance) alike — through
|
|
343
|
+
* activity markers regardless of whether they still follow the Thread.
|
|
344
|
+
* The actor never notifies itself. Legacy records without the acceptance
|
|
345
|
+
* discriminator keep the old completed-only wake semantics on replay.
|
|
250
346
|
*/
|
|
251
347
|
private acceptThreadInbox;
|
|
252
348
|
private acceptThreadInboxFrom;
|
|
@@ -256,8 +352,10 @@ export declare class AgentTeamLedger {
|
|
|
256
352
|
private promoteThreadInbox;
|
|
257
353
|
private promoteThreadInboxFrom;
|
|
258
354
|
private removeMemberThreadInbox;
|
|
355
|
+
private removeMemberThreadInboxFrom;
|
|
259
356
|
/** Attention and marker cleanup for EVERY Member on the given Threads. */
|
|
260
357
|
private channelArchivalInbox;
|
|
358
|
+
private channelArchivalInboxFrom;
|
|
261
359
|
private inboxDelta;
|
|
262
360
|
private startAttention;
|
|
263
361
|
private followAttention;
|
|
@@ -336,7 +434,9 @@ export declare class AgentTeamLedger {
|
|
|
336
434
|
private requireMemberChannel;
|
|
337
435
|
private isChannelMember;
|
|
338
436
|
private isChannelMemberFrom;
|
|
437
|
+
/** Every Thread of the Channel, taskful or taskless — the scope both cleanup validators replay against. */
|
|
339
438
|
private channelThreadRefs;
|
|
439
|
+
private channelThreadRefsFrom;
|
|
340
440
|
private assertJoinableMember;
|
|
341
441
|
private normalizeRecipients;
|
|
342
442
|
private normalizeUnique;
|
|
@@ -358,6 +458,7 @@ export declare class AgentTeamLedger {
|
|
|
358
458
|
private assertSameMemberAdd;
|
|
359
459
|
private assertSameMemberState;
|
|
360
460
|
private assertSameMemberSessionRenewed;
|
|
461
|
+
private assertSameMemberSessionRolledOver;
|
|
361
462
|
private assertSameChannelUpdate;
|
|
362
463
|
private assertSameMemberUpdate;
|
|
363
464
|
private assertSameChannelJoin;
|
|
@@ -412,9 +513,21 @@ export declare class AgentTeamLedger {
|
|
|
412
513
|
private committed;
|
|
413
514
|
private resolved;
|
|
414
515
|
private sortedRecords;
|
|
516
|
+
/**
|
|
517
|
+
* Releases up to 0.1.9 scoped Channel archival and Channel member-removal
|
|
518
|
+
* inbox cleanup to taskful Threads only (the collector read the Task
|
|
519
|
+
* projection), so archiving or member removal in a Channel holding a
|
|
520
|
+
* taskless Thread with Attention or markers wrote an incomplete inbox and
|
|
521
|
+
* every later load rejected the record, leaving the profile unable to boot.
|
|
522
|
+
* Records carrying exactly that legacy cleanup are repaired in memory the
|
|
523
|
+
* same way pre-envelope Thread reads are; any other inbox still fails
|
|
524
|
+
* validation, so a forgery is not silently accepted.
|
|
525
|
+
*/
|
|
526
|
+
private repairLegacyChannelCleanup;
|
|
527
|
+
/** The pre-fix Channel Thread scope: only Threads carrying a Task. */
|
|
528
|
+
private legacyChannelThreadRefs;
|
|
415
529
|
/** Ledgers written before message occurredAt existed store bare messages; Thread reads resolve instants from the originating operations. */
|
|
416
530
|
private normalizeOperation;
|
|
417
531
|
private enqueue;
|
|
418
532
|
}
|
|
419
|
-
export {};
|
|
420
533
|
//# sourceMappingURL=ledger.d.ts.map
|