@wowyuarm/dsh-agent-team 0.1.10 → 0.1.11
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 +13 -0
- package/README.zh.md +13 -0
- package/package.json +52 -47
- package/packages/agent-team/README.md +4 -2
- package/packages/agent-team/README.zh.md +4 -2
- package/packages/agent-team/lib/context-management.js +40 -50
- package/packages/agent-team/lib/context-projection.js +10 -0
- package/packages/agent-team/lib/index.js +235 -112
- package/packages/agent-team/lib/invariant.js +38 -4
- package/packages/agent-team/lib/ledger.js +554 -271
- package/packages/agent-team/lib/member-context.js +6 -2
- package/packages/agent-team/lib/member-time-context.js +20 -5
- package/packages/agent-team/lib/pressure-policy.js +33 -9
- package/packages/agent-team/lib/session-event-cursor.js +116 -0
- package/packages/agent-team/lib/session-remediation.js +38 -26
- package/packages/agent-team/lib/spec.js +46 -34
- package/packages/agent-team/lib/stored-session-reader.js +138 -0
- package/packages/agent-team/lib/typert.host.js +107 -40
- package/packages/agent-team/lib/typert.remote-client.d.ts.map +1 -1
- package/packages/agent-team/lib/typert.remote-client.js +84 -32
- package/packages/agent-team/lib/types/context-management.d.ts +7 -0
- package/packages/agent-team/lib/types/context-management.d.ts.map +1 -1
- package/packages/agent-team/lib/types/context-projection.d.ts +8 -0
- package/packages/agent-team/lib/types/context-projection.d.ts.map +1 -1
- package/packages/agent-team/lib/types/index.d.ts +78 -2
- package/packages/agent-team/lib/types/index.d.ts.map +1 -1
- package/packages/agent-team/lib/types/invariant.d.ts.map +1 -1
- package/packages/agent-team/lib/types/ledger.d.ts +180 -7
- 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-time-context.d.ts.map +1 -1
- package/packages/agent-team/lib/types/pressure-policy.d.ts +18 -0
- package/packages/agent-team/lib/types/pressure-policy.d.ts.map +1 -1
- package/packages/agent-team/lib/types/session-event-cursor.d.ts +119 -0
- package/packages/agent-team/lib/types/session-event-cursor.d.ts.map +1 -0
- package/packages/agent-team/lib/types/session-remediation.d.ts +23 -0
- package/packages/agent-team/lib/types/session-remediation.d.ts.map +1 -1
- package/packages/agent-team/lib/types/spec.d.ts.map +1 -1
- package/packages/agent-team/lib/types/stored-session-reader.d.ts +92 -0
- package/packages/agent-team/lib/types/stored-session-reader.d.ts.map +1 -0
- package/packages/agent-team/lib/types/types/entities.d.ts +28 -2
- package/packages/agent-team/lib/types/types/entities.d.ts.map +1 -1
- package/packages/agent-team/lib/types/types/operations.d.ts +45 -19
- package/packages/agent-team/lib/types/types/operations.d.ts.map +1 -1
- package/packages/agent-team/lib/types/types/requests-results.d.ts +44 -3
- package/packages/agent-team/lib/types/types/requests-results.d.ts.map +1 -1
- package/packages/agent-team/preset/team-member/agent.cordis.yml +3 -1
- package/packages/client-agent-team/README.md +1 -1
- package/packages/client-agent-team/README.zh.md +1 -1
- package/packages/client-agent-team/lib/client.js +1068 -375
- package/packages/client-agent-team/lib/client.js.map +1 -1
- package/packages/client-agent-team/lib/types/client/TeamAgentsPanel.d.ts.map +1 -1
- package/packages/client-agent-team/lib/types/client/TeamAgentsPanel.js +24 -4
- package/packages/client-agent-team/lib/types/client/TeamChannelPage.d.ts.map +1 -1
- package/packages/client-agent-team/lib/types/client/TeamChannelPage.js +42 -22
- package/packages/client-agent-team/lib/types/client/TeamChannelsPanel.d.ts.map +1 -1
- package/packages/client-agent-team/lib/types/client/TeamChannelsPanel.js +13 -24
- package/packages/client-agent-team/lib/types/client/TeamComposer.d.ts +11 -5
- package/packages/client-agent-team/lib/types/client/TeamComposer.d.ts.map +1 -1
- package/packages/client-agent-team/lib/types/client/TeamComposer.js +15 -9
- package/packages/client-agent-team/lib/types/client/TeamConversation.d.ts +1 -1
- package/packages/client-agent-team/lib/types/client/TeamConversation.d.ts.map +1 -1
- package/packages/client-agent-team/lib/types/client/TeamConversation.js +8 -1
- package/packages/client-agent-team/lib/types/client/TeamInboxPage.d.ts +21 -0
- package/packages/client-agent-team/lib/types/client/TeamInboxPage.d.ts.map +1 -0
- package/packages/client-agent-team/lib/types/client/TeamInboxPage.js +71 -0
- package/packages/client-agent-team/lib/types/client/TeamMemberEditor.d.ts.map +1 -1
- package/packages/client-agent-team/lib/types/client/TeamMemberEditor.js +8 -24
- package/packages/client-agent-team/lib/types/client/TeamMessage.d.ts +9 -2
- package/packages/client-agent-team/lib/types/client/TeamMessage.d.ts.map +1 -1
- package/packages/client-agent-team/lib/types/client/TeamMessage.js +11 -4
- package/packages/client-agent-team/lib/types/client/TeamPresenceDot.d.ts +8 -0
- package/packages/client-agent-team/lib/types/client/TeamPresenceDot.d.ts.map +1 -1
- package/packages/client-agent-team/lib/types/client/TeamPresenceDot.js +21 -1
- package/packages/client-agent-team/lib/types/client/TeamThreadPage.d.ts.map +1 -1
- package/packages/client-agent-team/lib/types/client/TeamThreadPage.js +102 -28
- 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 +50 -7
- package/packages/client-agent-team/lib/types/client/index.d.ts.map +1 -1
- package/packages/client-agent-team/lib/types/client/index.js +17 -6
- package/packages/client-agent-team/lib/types/client/locales.d.ts +18 -0
- package/packages/client-agent-team/lib/types/client/locales.d.ts.map +1 -1
- package/packages/client-agent-team/lib/types/client/locales.js +18 -0
- package/packages/client-agent-team/lib/types/client/navigation.d.ts +10 -0
- package/packages/client-agent-team/lib/types/client/navigation.d.ts.map +1 -1
- package/packages/client-agent-team/lib/types/client/navigation.js +18 -7
- package/packages/client-agent-team/lib/types/client/scope-coverage.d.ts +41 -0
- package/packages/client-agent-team/lib/types/client/scope-coverage.d.ts.map +1 -0
- package/packages/client-agent-team/lib/types/client/scope-coverage.js +64 -0
- package/packages/client-agent-team/lib/types/client/slots.d.ts +7 -1
- package/packages/client-agent-team/lib/types/client/slots.d.ts.map +1 -1
- package/packages/client-agent-team/lib/types/client/team-changes.d.ts +26 -1
- package/packages/client-agent-team/lib/types/client/team-changes.d.ts.map +1 -1
- package/packages/client-agent-team/lib/types/client/team-changes.js +66 -15
- package/packages/client-agent-team/lib/types/client/team-dialog-save.d.ts +20 -0
- package/packages/client-agent-team/lib/types/client/team-dialog-save.d.ts.map +1 -0
- package/packages/client-agent-team/lib/types/client/team-dialog-save.js +36 -0
- package/packages/client-agent-team/lib/types/client/team-formatters.d.ts +9 -0
- package/packages/client-agent-team/lib/types/client/team-formatters.d.ts.map +1 -1
- package/packages/client-agent-team/lib/types/client/team-formatters.js +34 -6
- package/packages/tool-agent-team/README.md +1 -1
- package/packages/tool-agent-team/README.zh.md +1 -1
- package/packages/tool-agent-team/lib/context-tools.js +18 -14
- package/packages/tool-agent-team/lib/host-access.js +20 -0
- package/packages/tool-agent-team/lib/index.js +16 -17
- package/packages/tool-agent-team/lib/types/context-tools.d.ts.map +1 -1
- package/packages/tool-agent-team/lib/types/host-access.d.ts +14 -0
- package/packages/tool-agent-team/lib/types/host-access.d.ts.map +1 -0
- package/packages/tool-agent-team/lib/types/index.d.ts.map +1 -1
|
@@ -62,11 +62,20 @@ export declare function mentionNamesOf(mentions: readonly AgentTeamMemberId[], h
|
|
|
62
62
|
* renders block-level documents that cannot interleave inline chips.
|
|
63
63
|
*/
|
|
64
64
|
export declare function isPlainTextBody(text: string): boolean;
|
|
65
|
+
/** Absolute local `YYYY-MM-DD HH:mm` label: the precise instant behind every shorter form. */
|
|
66
|
+
export declare function formatAbsoluteTime(occurredAt: string): string;
|
|
65
67
|
/**
|
|
66
68
|
* Wall-clock label for one Message instant: time within the current day,
|
|
67
69
|
* month-day time within the year, full date otherwise.
|
|
68
70
|
*/
|
|
69
71
|
export declare function formatMessageTime(occurredAt: string, now?: Date): string;
|
|
72
|
+
/**
|
|
73
|
+
* Queue label for one Inbox row's newest mention. The mention queue scans by
|
|
74
|
+
* recency, so the two days a reader reasons about by name are named ("今天" /
|
|
75
|
+
* "昨天") while everything older keeps the Message date form, so the row and
|
|
76
|
+
* the Thread it opens agree about the same instant.
|
|
77
|
+
*/
|
|
78
|
+
export declare function formatInboxTime(occurredAt: string, t: TeamConversationProps['t'], now?: Date): string;
|
|
70
79
|
export declare function formatActivity(activity: AgentTeamActivity, options: {
|
|
71
80
|
readonly t: TeamConversationProps['t'];
|
|
72
81
|
readonly actorName: (memberId: AgentTeamMemberId) => string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"team-formatters.d.ts","sourceRoot":"","sources":["../../../src/client/team-formatters.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,cAAc,EAAE,iBAAiB,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAA;AAC3I,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAA;AACvD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAA;AAE3D,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,aAAa,CAAC,QAAQ,CAAC,EAAE,CAAC,EAAE,qBAAqB,CAAC,GAAG,CAAC,GAAG,MAAM,CAQvG;AAED,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,cAAc,CAAC,OAAO,CAAC,EAAE,CAAC,EAAE,qBAAqB,CAAC,GAAG,CAAC,GAAG,MAAM,CAMtG;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,aAAa,CAAC,QAAQ,CAAC,GAAG,iBAAiB,CAEhF;AAED,wEAAwE;AACxE,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAGpD;AAED,2FAA2F;AAC3F,wBAAgB,SAAS,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAIlD;AAED,gEAAgE;AAChE,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACr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AQ,CAAC,WAAW,EAAE,MAAM,CAAA;IAC5B,8EAA8E;IAC9E,QAAQ,CAAC,aAAa,EAAE,OAAO,CAAA;IAC/B,6CAA6C;IAC7C,QAAQ,CAAC,MAAM,EAAE,iBAAiB,CAAA;IAClC,+EAA+E;IAC/E,QAAQ,CAAC,MAAM,CAAC,EAAE,UAAU,CAAC,OAAO,iBAAiB,CAAC,CAAA;IACtD,iFAAiF;IACjF,QAAQ,CAAC,aAAa,EAAE,SAAS,MAAM,EAAE,CAAA;IACzC,kGAAkG;IAClG,QAAQ,CAAC,YAAY,EAAE,SAAS,MAAM,EAAE,CAAA;IACxC,mFAAmF;IACnF,QAAQ,CAAC,QAAQ,EAAE,SAAS,gBAAgB,EAAE,CAAA;CAC/C;AAED;;;;;;;GAOG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE;IACrD,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAA;IACvB,QAAQ,CAAC,YAAY,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;IACzC,QAAQ,CAAC,WAAW,EAAE,OAAO,CAAA;CAC9B,GAAG,kBAAkB,CA6BrB"}
|
|
@@ -138,6 +138,13 @@ export function isPlainTextBody(text) {
|
|
|
138
138
|
return !(MARKDOWN_BLOCK_CONSTRUCT.test(text) || MARKDOWN_INLINE_CONSTRUCT.test(text));
|
|
139
139
|
}
|
|
140
140
|
const pad = (value) => String(value).padStart(2, '0');
|
|
141
|
+
/** Absolute local `YYYY-MM-DD HH:mm` label: the precise instant behind every shorter form. */
|
|
142
|
+
export function formatAbsoluteTime(occurredAt) {
|
|
143
|
+
const at = new Date(occurredAt);
|
|
144
|
+
if (Number.isNaN(at.getTime()))
|
|
145
|
+
return '';
|
|
146
|
+
return `${at.getFullYear()}-${pad(at.getMonth() + 1)}-${pad(at.getDate())} ${pad(at.getHours())}:${pad(at.getMinutes())}`;
|
|
147
|
+
}
|
|
141
148
|
/**
|
|
142
149
|
* Wall-clock label for one Message instant: time within the current day,
|
|
143
150
|
* month-day time within the year, full date otherwise.
|
|
@@ -146,14 +153,35 @@ export function formatMessageTime(occurredAt, now = new Date()) {
|
|
|
146
153
|
const at = new Date(occurredAt);
|
|
147
154
|
if (Number.isNaN(at.getTime()))
|
|
148
155
|
return '';
|
|
149
|
-
const time = `${pad(at.getHours())}:${pad(at.getMinutes())}`;
|
|
150
156
|
const sameDay = at.getFullYear() === now.getFullYear() && at.getMonth() === now.getMonth() && at.getDate() === now.getDate();
|
|
151
157
|
if (sameDay)
|
|
152
|
-
return
|
|
153
|
-
const
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
158
|
+
return `${pad(at.getHours())}:${pad(at.getMinutes())}`;
|
|
159
|
+
const absolute = formatAbsoluteTime(occurredAt);
|
|
160
|
+
return at.getFullYear() === now.getFullYear() ? absolute.slice(5) : absolute;
|
|
161
|
+
}
|
|
162
|
+
/**
|
|
163
|
+
* Calendar days between two instants in the viewer's own zone, so "yesterday"
|
|
164
|
+
* means yesterday locally rather than 24 hours earlier.
|
|
165
|
+
*/
|
|
166
|
+
function calendarDayDelta(at, now) {
|
|
167
|
+
const midnight = (date) => new Date(date.getFullYear(), date.getMonth(), date.getDate()).getTime();
|
|
168
|
+
return Math.round((midnight(now) - midnight(at)) / 86_400_000);
|
|
169
|
+
}
|
|
170
|
+
/**
|
|
171
|
+
* Queue label for one Inbox row's newest mention. The mention queue scans by
|
|
172
|
+
* recency, so the two days a reader reasons about by name are named ("今天" /
|
|
173
|
+
* "昨天") while everything older keeps the Message date form, so the row and
|
|
174
|
+
* the Thread it opens agree about the same instant.
|
|
175
|
+
*/
|
|
176
|
+
export function formatInboxTime(occurredAt, t, now = new Date()) {
|
|
177
|
+
const at = new Date(occurredAt);
|
|
178
|
+
if (Number.isNaN(at.getTime()))
|
|
179
|
+
return '';
|
|
180
|
+
const days = calendarDayDelta(at, now);
|
|
181
|
+
if (days === 0 || days === 1) {
|
|
182
|
+
return `${t(days === 0 ? 'inboxTimeToday' : 'inboxTimeYesterday')} ${pad(at.getHours())}:${pad(at.getMinutes())}`;
|
|
183
|
+
}
|
|
184
|
+
return formatMessageTime(occurredAt, now);
|
|
157
185
|
}
|
|
158
186
|
export function formatActivity(activity, options) {
|
|
159
187
|
const actor = options.actorName(activity.actor);
|
|
@@ -7,7 +7,7 @@ Model-facing tools for Agent Team Members. The package registers tools in the ca
|
|
|
7
7
|
## Tools
|
|
8
8
|
|
|
9
9
|
- `team_inbox` lists bounded unread Thread summaries for the calling Member, ordered by direct work and then recency; Task standing appears only where the Thread has a real Task overlay. The header states total unread/direct counts and the number of Threads shown (with a truncation conclusion when unread work lies beyond the bounded list); each item shows its exact unread/direct counts, Channel ref, and Task standing. The footer routes reading to `team_thread read`; the render carries no revision and no write token.
|
|
10
|
-
- `team_thread` reads a Thread, pages history, follows, or unfollows. `threadRef` is primary; a `taskRef` is a Host alias only for released task-only Clients. The five actions render separately: `status`/`follow`/`unfollow` answer only the Attention question in one line; `read` renders outcome, Thread identity, orientation (full anchor when Host-supplied background is present, bounded anchor subject otherwise, never a duplicate of an in-facts anchor), active Claims only, the chronological facts with inline unread/direct markers, and a read-through/remaining-unread footer; `history` renders a historical page with the full anchor on a first page and the bounded subject on continuation pages, never current Claims or advice. `read` advances the durable watermark and is the only read-side source of a next-write token — rendered only when no unread remains; your own committed public mutations hand off a fresh token as well. Activity facts render structured — actor, Task ref, and the Claim refs each activity claimed, completed, accepted, or released. A read that acknowledges an unread acceptance of a still-done Task carries one `contextAdvice` block (usage, route budgets, the `min(128_000, handoffAt)` Task-boundary threshold, and one keep/rollover/handoff-now action); it is advisory only and degrades to an explicit `unavailable` line when measurement fails.
|
|
10
|
+
- `team_thread` reads a Thread, pages history, follows, or unfollows. `threadRef` is primary; a `taskRef` is a Host alias only for released task-only Clients. The five actions render separately: `status`/`follow`/`unfollow` answer only the Attention question in one line; `read` renders outcome, Thread identity, orientation (full anchor when Host-supplied background is present, bounded anchor subject otherwise, never a duplicate of an in-facts anchor), active Claims only, the chronological facts with inline unread/direct markers, and a read-through/remaining-unread footer; `history` renders a historical page with the full anchor on a first page and the bounded subject on continuation pages, never current Claims or advice. `read` advances the durable watermark and is the only read-side source of a next-write token — rendered only when no unread remains; your own committed public mutations hand off a fresh token as well. A read with nothing unread for the caller advances nothing, writes no operation, and renders `Read — no unread updates …` instead of claiming a commit, still answering from the current projection. Activity facts render structured — actor, Task ref, and the Claim refs each activity claimed, completed, accepted, or released. A read that acknowledges an unread acceptance of a still-done Task carries one `contextAdvice` block (usage, route budgets, the `min(128_000, handoffAt)` Task-boundary threshold, and one keep/rollover/handoff-now action); it is advisory only and degrades to an explicit `unavailable` line when measurement fails.
|
|
11
11
|
- `team_message` starts a top-level Thread, replies to an existing Thread, or sends a DM. It defaults to a taskless Thread; pass `asTask: true` for atomic Task creation. A committed start/reply renders one committed-verb outcome (Thread created / reply added) with the Message, Thread, and optional Task refs, and exactly one next-write token hand-off. Replies reject unread work before checking token freshness. Typed rejections begin `Not committed`, keep the structured refs and counts needed to reread and retry, and render no numeric revision or write token — recovery is read-and-reconsider. DMs distinguish `Delivered` from `Recorded, not delivered` (with the delivery note and a no-blind-duplicate warning).
|
|
12
12
|
- `team_claim` lists or mutates the calling Member's Direction Claims through `list`, `claim`, `done`, and `release`; it applies only to real Tasks. `list` renders the Task/Thread identity with active Claims only (the collision surface) and no write token. A committed mutation names its action (Claim created/completed/released), renders the authoritative affected Claim first, and hands off one next-write token. Rejections share the message rejection form. Direction exclusion uses Unicode NFKC normalization, trim, whitespace compression, and deterministic case folding.
|
|
13
13
|
- `team_view` is the address book: bounded, membership-authorized Channel, top-level Thread, and Member summaries — current addresses, not a work queue. Threads are the sole paginated catalog: newest-first rows carrying threadRef, Channel ref, a bounded anchor subject, and Task standing inline (never a second Task index, never revision or message count). The cursor pages Thread rows only; continuation pages render Threads alone, and paging reaches every authorized top-level Thread, including taskless and off-page taskful ones.
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
## 工具
|
|
8
8
|
|
|
9
9
|
- `team_inbox` 列出调用方 Member 的有界未读 Thread 摘要,先按 direct work、再按最近活动排序;只有 Thread 存在真实 Task overlay 时才出现 Task standing。header 给出 unread/direct 总数与展示的 Threads 数(有界列表之外仍有未读时给出截断结论);每个条目显示精确的 unread/direct 计数、Channel ref 与 Task standing。页脚把阅读指向 `team_thread read`;渲染不携带 revision 与写令牌。
|
|
10
|
-
- `team_thread` 读取 Thread、分页历史、follow 或 unfollow。`threadRef` 是主身份;`taskRef` 只对 released task-only Client 是 Host alias。五个 action 分开渲染:`status`/`follow`/`unfollow` 一行只回答 Attention 问题;`read` 渲染结果、Thread 身份、导向(有 Host 提供的 background 时给 full anchor,否则给 bounded anchor subject,anchor 已在 facts 中时绝不重复)、只含 active Claims、带行内 unread/direct 标记的按时间 facts、read-through/剩余未读页脚;`history` 渲染历史页(首页 full anchor、continuation 页 bounded subject,绝无当前 Claims 或 advice)。`read` 推进持久 watermark,是 next-write token 的读侧唯一来源——仅在未读清零时渲染;你自己的已提交 public mutation 也会回传一份新 token。Activity facts 结构化渲染——actor、Task ref,以及每条 activity claim、完成、接受或 release 的 Claim refs。确认仍为 done 状态 Task 的未读验收的那次 read 附带一段 `contextAdvice`(用量、路由预算、`min(128_000, handoffAt)` 任务边界阈值、keep/rollover/handoff-now 唯一动作);它只是建议,测量失败时降级为显式 `unavailable` 文案。
|
|
10
|
+
- `team_thread` 读取 Thread、分页历史、follow 或 unfollow。`threadRef` 是主身份;`taskRef` 只对 released task-only Client 是 Host alias。五个 action 分开渲染:`status`/`follow`/`unfollow` 一行只回答 Attention 问题;`read` 渲染结果、Thread 身份、导向(有 Host 提供的 background 时给 full anchor,否则给 bounded anchor subject,anchor 已在 facts 中时绝不重复)、只含 active Claims、带行内 unread/direct 标记的按时间 facts、read-through/剩余未读页脚;`history` 渲染历史页(首页 full anchor、continuation 页 bounded subject,绝无当前 Claims 或 advice)。`read` 推进持久 watermark,是 next-write token 的读侧唯一来源——仅在未读清零时渲染;你自己的已提交 public mutation 也会回传一份新 token。一次对调用者没有未读的 read 什么都不推进、不写任何 operation,渲染也不再声称提交(`Read — no unread updates …`),画面仍来自当前 projection。Activity facts 结构化渲染——actor、Task ref,以及每条 activity claim、完成、接受或 release 的 Claim refs。确认仍为 done 状态 Task 的未读验收的那次 read 附带一段 `contextAdvice`(用量、路由预算、`min(128_000, handoffAt)` 任务边界阈值、keep/rollover/handoff-now 唯一动作);它只是建议,测量失败时降级为显式 `unavailable` 文案。
|
|
11
11
|
- `team_message` 创建顶层 Thread、回复既有 Thread 或发送 DM。默认创建 taskless Thread;传入 `asTask: true` 才原子创建 Task。commit 的 start/reply 渲染一个 committed-verb 结果(Thread created / reply added),携带 Message、Thread 与可选 Task refs,以及恰好一个 next-write token hand-off。Reply 在检查令牌新鲜度前先拒绝未读工作。类型化拒绝以 `Not committed` 开头,保留重读与审慎重试所需的结构化 refs 与计数,不渲染数字 revision 或写令牌——恢复路径是 read-and-reconsider。DM 区分 `Delivered` 与 `Recorded, not delivered`(携带 delivery note 与禁止盲目重发的警告)。
|
|
12
12
|
- `team_claim` 通过 `list`、`claim`、`done`、`release` 读取或修改调用方 Member 的 Direction Claim;它只适用于真实 Task。`list` 渲染 Task/Thread 身份与只有 active Claims 的 collision surface,且无写令牌。commit 的 mutation 点名动作(Claim created/completed/released),先渲染权威的受影响 Claim,再 hand-off 一个 next-write token。拒绝与 message 拒绝共享同一形式。Direction 互斥键执行 Unicode NFKC normalization、trim、空白压缩和确定性大小写折叠。
|
|
13
13
|
- `team_view` 是 address book:有界、按 membership 授权的 Channel、顶层 Thread 与 Member 摘要——是当前的地址簿,不是工作队列。Threads 是唯一分页目录:newest-first 行携带 threadRef、Channel ref、bounded anchor subject 与行内 Task standing(绝无第二个 Task 索引,也不渲染 revision 或消息数)。cursor 只延续 Thread 行;continuation 页只渲染 Threads,翻页可达全部获授权的顶层 Threads,包括 taskless 与不在首页的 taskful。
|
|
@@ -9,18 +9,7 @@
|
|
|
9
9
|
* @module @wowyuarm/dsh-agent-team/context-tools
|
|
10
10
|
*/
|
|
11
11
|
import { defineTool } from '@deepseek-ai/dsh-tools';
|
|
12
|
-
|
|
13
|
-
const host = agent.ctx.get('agentTeam');
|
|
14
|
-
if (host === undefined)
|
|
15
|
-
throw new Error('Agent Team Host is unavailable');
|
|
16
|
-
return host;
|
|
17
|
-
}
|
|
18
|
-
function member(agent) {
|
|
19
|
-
const current = service(agent).memberForAgent(agent);
|
|
20
|
-
if (current === undefined)
|
|
21
|
-
throw new Error('team tool requires an active Team Member');
|
|
22
|
-
return current;
|
|
23
|
-
}
|
|
12
|
+
import { member, service } from "./host-access.js";
|
|
24
13
|
const MAX_HANDOFF_CHARS = 32 * 1024;
|
|
25
14
|
const MAX_RELATED_FILES = 32;
|
|
26
15
|
const contextRollover = defineTool({
|
|
@@ -139,13 +128,19 @@ const contextTimeline = defineTool({
|
|
|
139
128
|
reason: { type: 'string' },
|
|
140
129
|
sourceSessionId: { type: 'string' },
|
|
141
130
|
} } },
|
|
131
|
+
incompleteFrom: { type: 'object', additionalProperties: false, properties: {
|
|
132
|
+
sessionId: { type: 'string', required: true },
|
|
133
|
+
reason: { type: 'string', required: true },
|
|
134
|
+
} },
|
|
142
135
|
} },
|
|
143
136
|
// The item list is the whole decision surface: without each anchor's
|
|
144
137
|
// ref, label, source, size estimates, affected Threads, and
|
|
145
138
|
// restorable/reason verdict, the model cannot pick a `checkpointRef` for
|
|
146
139
|
// `context_rollover` — the summary line alone left the tool unusable for
|
|
147
140
|
// seeded returns. The Host bounds items (default 12, at most 24), so this
|
|
148
|
-
// list cannot grow unbounded.
|
|
141
|
+
// list cannot grow unbounded. `incompleteFrom` states where and why the
|
|
142
|
+
// lineage walk stopped early, so history read up to that ancestor is
|
|
143
|
+
// known to be a truncation, not everything that exists.
|
|
149
144
|
render: (_args, value) => {
|
|
150
145
|
const lines = [`Context timeline: ${value.usageTokens} tokens used (handoff at ${value.handoffAt}, hard limit ${value.hardLimit}). ${value.items.length} item(s):`];
|
|
151
146
|
for (const item of value.items) {
|
|
@@ -156,6 +151,9 @@ const contextTimeline = defineTool({
|
|
|
156
151
|
: `not restorable — ${item.reason ?? 'no reason given'}`;
|
|
157
152
|
lines.push(`- ${item.name} [source: ${item.source}] (${size}; ${threads}) — ${restorable}`);
|
|
158
153
|
}
|
|
154
|
+
if (value.incompleteFrom !== undefined) {
|
|
155
|
+
lines.push(`History incomplete: the lineage walk stopped at Session ${value.incompleteFrom.sessionId} (${value.incompleteFrom.reason}); ancestors before it could not be read and are not reflected above.`);
|
|
156
|
+
}
|
|
159
157
|
return [{ type: 'text', text: lines.join('\n') }];
|
|
160
158
|
},
|
|
161
159
|
},
|
|
@@ -169,7 +167,13 @@ const contextTimeline = defineTool({
|
|
|
169
167
|
const result = await host.contextTimelineForAgent(agent, { memberId: current.memberId, ...(limit === undefined ? {} : { limit }) });
|
|
170
168
|
// The Host result is deeply immutable; the tool output contract carries
|
|
171
169
|
// plain arrays, so re-shape without any semantic change.
|
|
172
|
-
return {
|
|
170
|
+
return {
|
|
171
|
+
usageTokens: result.usageTokens,
|
|
172
|
+
hardLimit: result.hardLimit,
|
|
173
|
+
handoffAt: result.handoffAt,
|
|
174
|
+
items: result.items.map(item => ({ ...item, affectedThreads: [...item.affectedThreads] })),
|
|
175
|
+
...(result.incompleteFrom === undefined ? {} : { incompleteFrom: result.incompleteFrom }),
|
|
176
|
+
};
|
|
173
177
|
},
|
|
174
178
|
});
|
|
175
179
|
export function registerContextTools(ctx) {
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared Host accessors for every Team tool module. `agent.ctx.get` is the
|
|
3
|
+
* one resolution path a tool row has — the preset mounts these tools beside
|
|
4
|
+
* the Host, so a missing service or an inactive Member is a model-visible
|
|
5
|
+
* rejection rather than a silent no-op. Both messages are user-facing text.
|
|
6
|
+
*/
|
|
7
|
+
/** Resolve the Team Host service, or reject the tool call. */
|
|
8
|
+
export function service(agent) {
|
|
9
|
+
const host = agent.ctx.get('agentTeam');
|
|
10
|
+
if (host === undefined)
|
|
11
|
+
throw new Error('Agent Team Host is unavailable');
|
|
12
|
+
return host;
|
|
13
|
+
}
|
|
14
|
+
/** Resolve the calling Team Member, or reject the tool call. */
|
|
15
|
+
export function member(agent) {
|
|
16
|
+
const current = service(agent).memberForAgent(agent);
|
|
17
|
+
if (current === undefined)
|
|
18
|
+
throw new Error('team tool requires an active Team Member');
|
|
19
|
+
return current;
|
|
20
|
+
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { AgentTeamDmDeliveryError, markAgentTeamPreset } from '@wowyuarm/dsh-agent-team/host';
|
|
2
2
|
import { formatTeamTimestamp } from '@wowyuarm/dsh-agent-team/time-format';
|
|
3
3
|
import { registerContextTools } from "./context-tools.js";
|
|
4
|
+
import { member, service } from "./host-access.js";
|
|
4
5
|
import { defineTool } from '@deepseek-ai/dsh-tools';
|
|
5
6
|
export const name = 'wowyuarm-agent-team-tools';
|
|
6
7
|
export const inject = ['tools'];
|
|
@@ -76,18 +77,6 @@ function taskStanding(value) {
|
|
|
76
77
|
return '';
|
|
77
78
|
return `${value.taskRef}${value.taskNumber === undefined ? '' : ` (#${value.taskNumber})`}${value.status === undefined ? '' : `, ${value.status}${value.resolution === undefined ? '' : `/${value.resolution}`}`}`;
|
|
78
79
|
}
|
|
79
|
-
function service(agent) {
|
|
80
|
-
const host = agent.ctx.get('agentTeam');
|
|
81
|
-
if (host === undefined)
|
|
82
|
-
throw new Error('Agent Team Host is unavailable');
|
|
83
|
-
return host;
|
|
84
|
-
}
|
|
85
|
-
function member(agent) {
|
|
86
|
-
const current = service(agent).memberForAgent(agent);
|
|
87
|
-
if (current === undefined)
|
|
88
|
-
throw new Error('team tool requires an active Team Member');
|
|
89
|
-
return current;
|
|
90
|
-
}
|
|
91
80
|
function requestId(agentId, callId) {
|
|
92
81
|
return `agent-team:tool:${agentId}:${callId}`;
|
|
93
82
|
}
|
|
@@ -243,8 +232,12 @@ const teamThread = defineTool({
|
|
|
243
232
|
const facts = value.facts;
|
|
244
233
|
const acknowledged = facts.filter(fact => fact.unread === true).length;
|
|
245
234
|
const remaining = value.remainingUnreadCount ?? 0;
|
|
235
|
+
// A read with nothing unread writes no durable operation, so the opening
|
|
236
|
+
// line claims a commit only when unread facts were actually acknowledged.
|
|
246
237
|
const lines = [
|
|
247
|
-
|
|
238
|
+
acknowledged === 0
|
|
239
|
+
? `Read — no unread updates on ${value.threadRef}; nothing remains.`
|
|
240
|
+
: `Read committed — acknowledged ${acknowledged} unread update(s) on ${value.threadRef}; ${remaining} remain.`,
|
|
248
241
|
`${value.threadRef}${standing === '' ? '' : ` · ${standing}`} · ${value.following ? 'following' : 'not following'}`,
|
|
249
242
|
];
|
|
250
243
|
// Orientation: A the anchor is one of the returned facts (renders as
|
|
@@ -363,7 +356,7 @@ const teamMessage = markAgentTeamPreset(defineTool({
|
|
|
363
356
|
taskRef: { type: 'string', description: "Optional Task ref alias for reply on a Taskful Thread. Prefer threadRef; an unambiguous abbreviation of the first 6+ UUID hex characters also resolves." },
|
|
364
357
|
memberRef: { type: 'string', description: "Full branded Member ref exactly as returned by Team tools, including the 'member:' prefix. An unambiguous abbreviation of the first 6+ UUID hex characters also resolves. Required for dm; the Member must be an enabled Agent in your Workspace (the Human cannot be DMed)." },
|
|
365
358
|
asTask: { type: 'boolean', description: 'When true, start creates a Task with the Thread. Default false creates a taskless Thread.' },
|
|
366
|
-
body: { type: 'string', required: true, description: "Markdown body. Cite Team refs exactly as returned, as bare text with one colon (e.g. task:0f0a…) — never a double colon, never inside backticks or quotes. Unambiguous UUID abbreviations (first 6+ hex chars) also resolve. Spell each mentioned Member's handle in the prose so the mention renders inline." }, baseRevision: { type: 'number', description: "The next-write token from your latest fully drained team_thread read (or your own last committed mutation) on this Thread. Copy the explicitly rendered value verbatim; never increment, derive, compare, or cite it — it is an opaque concurrency token, not a fact about the Thread." },
|
|
359
|
+
body: { type: 'string', required: true, description: "Markdown body. Lead with the conclusion or state. Mention the Human only when they must know or decide, with a one-to-three-sentence opening and a `Decision needed: X (default: Y)` line when a decision is owed; mechanical detail follows below. Cite Team refs exactly as returned, as bare text with one colon (e.g. task:0f0a…) — never a double colon, never inside backticks or quotes. Unambiguous UUID abbreviations (first 6+ hex chars) also resolve. Spell each mentioned Member's handle in the prose so the mention renders inline." }, baseRevision: { type: 'number', description: "The next-write token from your latest fully drained team_thread read (or your own last committed mutation) on this Thread. Copy the explicitly rendered value verbatim; never increment, derive, compare, or cite it — it is an opaque concurrency token, not a fact about the Thread." },
|
|
367
360
|
mentions: { type: 'array', items: { type: 'string' }, description: 'Member refs to mention. Mentioned Agents receive the Message directly; write their handles in the body (any casing, optional @) so the mention renders inline.' },
|
|
368
361
|
attachments: { type: 'array', items: { type: 'string' }, description: 'Absolute file paths to share, e.g. screenshots or generated artifacts; images render as thumbnails for recipients. The Host validates each path and copies the file into the attachment cache, and members also receive one cached path per attachment; if any path fails validation the whole send is rejected.' },
|
|
369
362
|
},
|
|
@@ -563,7 +556,7 @@ const teamView = defineTool({
|
|
|
563
556
|
threadRef: { type: 'string', required: true }, channelRef: { type: 'string', required: true }, revision: { type: 'number', required: true }, messageCount: { type: 'number', required: true }, subject: { type: 'string', required: true },
|
|
564
557
|
taskRef: { type: 'string' }, status: { type: 'string' }, taskNumber: { type: 'number' }, lastActivityAt: { type: 'string' },
|
|
565
558
|
} } },
|
|
566
|
-
tasks: { type: 'array', required: true, items: { type: 'object', additionalProperties: false, properties: { taskRef: { type: 'string', required: true }, threadRef: { type: 'string', required: true }, channelRef: { type: 'string', required: true }, status: { type: 'string', required: true }, revision: { type: 'number'
|
|
559
|
+
tasks: { type: 'array', required: true, items: { type: 'object', additionalProperties: false, properties: { taskRef: { type: 'string', required: true }, threadRef: { type: 'string', required: true }, channelRef: { type: 'string', required: true }, status: { type: 'string', required: true }, revision: { type: 'number' } } } },
|
|
567
560
|
cursor: { type: 'number', required: true }, hasMore: { type: 'boolean', required: true }, page: { type: 'string' },
|
|
568
561
|
} },
|
|
569
562
|
// Address book, newest Thread first: labelled sections, one bounded
|
|
@@ -622,8 +615,14 @@ const teamView = defineTool({
|
|
|
622
615
|
subject: boundedSubject(item.message.body), lastActivityAt: item.lastActivityAt,
|
|
623
616
|
...(task === undefined ? {} : { taskRef: task.taskRef, status: task.status, ...(item.taskNumber === undefined ? {} : { taskNumber: item.taskNumber }) }) };
|
|
624
617
|
}),
|
|
625
|
-
|
|
626
|
-
|
|
618
|
+
// A Task's revision is its Thread's; it is omitted rather than reported as
|
|
619
|
+
// `0` when the Task's Thread is outside this directory page's scope. A
|
|
620
|
+
// fabricated revision would read as "this Thread has never been written".
|
|
621
|
+
tasks: view.tasks.map(task => {
|
|
622
|
+
const revision = view.threads.find(thread => thread.threadRef === task.threadRef)?.revision;
|
|
623
|
+
return { taskRef: task.taskRef, threadRef: task.threadRef, channelRef: task.channelRef, status: task.status,
|
|
624
|
+
...(revision === undefined ? {} : { revision }) };
|
|
625
|
+
}),
|
|
627
626
|
cursor: view.cursor, hasMore: view.hasMore,
|
|
628
627
|
...(args.cursor === undefined ? {} : { page: 'threads' }),
|
|
629
628
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context-tools.d.ts","sourceRoot":"","sources":["../../src/context-tools.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;
|
|
1
|
+
{"version":3,"file":"context-tools.d.ts","sourceRoot":"","sources":["../../src/context-tools.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAuKH,wBAAgB,oBAAoB,CAAC,GAAG,EAAE;IAAE,QAAQ,CAAC,KAAK,EAAE;QAAE,QAAQ,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI,CAAA;KAAE,CAAA;CAAE,GAAG,IAAI,CAIrG"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared Host accessors for every Team tool module. `agent.ctx.get` is the
|
|
3
|
+
* one resolution path a tool row has — the preset mounts these tools beside
|
|
4
|
+
* the Host, so a missing service or an inactive Member is a model-visible
|
|
5
|
+
* rejection rather than a silent no-op. Both messages are user-facing text.
|
|
6
|
+
*/
|
|
7
|
+
import AgentTeam from '@wowyuarm/dsh-agent-team/host';
|
|
8
|
+
/** The Agent shape every Team tool receives. */
|
|
9
|
+
export type TeamToolAgent = NonNullable<Parameters<AgentTeam['memberForAgent']>[0]>;
|
|
10
|
+
/** Resolve the Team Host service, or reject the tool call. */
|
|
11
|
+
export declare function service(agent: TeamToolAgent): AgentTeam;
|
|
12
|
+
/** Resolve the calling Team Member, or reject the tool call. */
|
|
13
|
+
export declare function member(agent: TeamToolAgent): import("@wowyuarm/dsh-agent-team/types").AgentTeamAgentMember;
|
|
14
|
+
//# sourceMappingURL=host-access.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"host-access.d.ts","sourceRoot":"","sources":["../../src/host-access.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,SAAS,MAAM,+BAA+B,CAAA;AAErD,gDAAgD;AAChD,MAAM,MAAM,aAAa,GAAG,WAAW,CAAC,UAAU,CAAC,SAAS,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;AAEnF,8DAA8D;AAC9D,wBAAgB,OAAO,CAAC,KAAK,EAAE,aAAa,GAAG,SAAS,CAIvD;AAED,gEAAgE;AAChE,wBAAgB,MAAM,CAAC,KAAK,EAAE,aAAa,iEAI1C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAelD,eAAO,MAAM,IAAI,8BAA8B,CAAA;AAC/C,eAAO,MAAM,MAAM,UAAY,CAAA;AAupB/B,wBAAgB,KAAK,CAAC,GAAG,EAAE,OAAO,GAAG,IAAI,CAOxC"}
|