@wowyuarm/dsh-agent-team 0.1.1 → 0.1.2
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/package.json +31 -23
- package/packages/agent-team/lib/index.js +51 -62
- package/packages/agent-team/lib/ledger.js +63 -39
- package/packages/agent-team/lib/spec.js +10 -4
- package/packages/agent-team/lib/typert.host.js +60 -73
- package/packages/agent-team/lib/typert.remote-client.d.ts +3 -3
- package/packages/agent-team/lib/typert.remote-client.d.ts.map +1 -1
- package/packages/agent-team/lib/typert.remote-client.js +41 -56
- package/packages/agent-team/lib/types/index.d.ts +10 -13
- package/packages/agent-team/lib/types/index.d.ts.map +1 -1
- package/packages/agent-team/lib/types/ledger.d.ts +11 -11
- package/packages/agent-team/lib/types/ledger.d.ts.map +1 -1
- package/packages/agent-team/lib/types/spec.d.ts.map +1 -1
- package/packages/agent-team/lib/types/types.d.ts +20 -12
- package/packages/agent-team/lib/types/types.d.ts.map +1 -1
- package/packages/agent-team/preset/team-member/agent.cordis.yml +2 -2
- package/packages/client-agent-team/README.md +3 -2
- package/packages/client-agent-team/README.zh.md +3 -2
- package/packages/client-agent-team/lib/client.js +758 -184
- 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 +20 -17
- package/packages/client-agent-team/lib/types/client/TeamChannelPage.d.ts +3 -1
- package/packages/client-agent-team/lib/types/client/TeamChannelPage.d.ts.map +1 -1
- package/packages/client-agent-team/lib/types/client/TeamChannelPage.js +38 -2
- package/packages/client-agent-team/lib/types/client/TeamChannelsPanel.d.ts.map +1 -1
- package/packages/client-agent-team/lib/types/client/TeamChannelsPanel.js +16 -2
- package/packages/client-agent-team/lib/types/client/TeamComposer.d.ts.map +1 -1
- package/packages/client-agent-team/lib/types/client/TeamComposer.js +22 -1
- 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 +3 -3
- package/packages/client-agent-team/lib/types/client/TeamMessage.d.ts +7 -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 +123 -11
- package/packages/client-agent-team/lib/types/client/TeamThreadPage.d.ts +4 -0
- package/packages/client-agent-team/lib/types/client/TeamThreadPage.d.ts.map +1 -1
- package/packages/client-agent-team/lib/types/client/TeamThreadPage.js +78 -8
- 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.js +1 -1
- package/packages/client-agent-team/lib/types/client/locales.d.ts +8 -2
- package/packages/client-agent-team/lib/types/client/locales.d.ts.map +1 -1
- package/packages/client-agent-team/lib/types/client/locales.js +8 -2
- package/packages/client-agent-team/lib/types/client/sidebar-drag.d.ts +35 -0
- package/packages/client-agent-team/lib/types/client/sidebar-drag.d.ts.map +1 -0
- package/packages/client-agent-team/lib/types/client/sidebar-drag.js +70 -0
- package/packages/client-agent-team/lib/types/client/sidebar-order.d.ts +27 -0
- package/packages/client-agent-team/lib/types/client/sidebar-order.d.ts.map +1 -0
- package/packages/client-agent-team/lib/types/client/sidebar-order.js +170 -0
- package/packages/client-agent-team/lib/types/client/slots.d.ts +2 -2
- package/packages/client-agent-team/lib/types/client/slots.d.ts.map +1 -1
- package/packages/client-agent-team/lib/types/client/task-refs.d.ts +20 -0
- package/packages/client-agent-team/lib/types/client/task-refs.d.ts.map +1 -0
- package/packages/client-agent-team/lib/types/client/task-refs.js +58 -0
- package/packages/client-agent-team/lib/types/client/team-formatters.d.ts +13 -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 +26 -2
- package/packages/tool-agent-team/lib/index.js +4 -4
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { PropsLocale, PropsRuntime } from '@deepseek-ai/dsh-client-ui-slots';
|
|
2
|
-
import type { AgentTeamAddMemberRequest, AgentTeamChannelRef, AgentTeamClientMemberStatus, AgentTeamCreateChannelRequest, AgentTeamCreateChannelResult, AgentTeamJoinChannelRequest, AgentTeamJoinChannelResult, AgentTeamGetAttachmentRequest, AgentTeamGetAttachmentResult, AgentTeamPutAttachmentRequest, AgentTeamPutAttachmentResult, AgentTeamMemberResult, AgentTeamRecoverMemberRequest, AgentTeamRecoverMemberResult,
|
|
2
|
+
import type { AgentTeamAddMemberRequest, AgentTeamChannelRef, AgentTeamClientMemberStatus, AgentTeamCreateChannelRequest, AgentTeamCreateChannelResult, AgentTeamJoinChannelRequest, AgentTeamJoinChannelResult, AgentTeamGetAttachmentRequest, AgentTeamGetAttachmentResult, AgentTeamPutAttachmentRequest, AgentTeamPutAttachmentResult, AgentTeamMemberResult, AgentTeamRecoverMemberRequest, AgentTeamRecoverMemberResult, AgentTeamMembersRequest, AgentTeamRemoveChannelMemberRequest, AgentTeamRemoveChannelMemberResult, AgentTeamReplyRequest, AgentTeamResolveTaskRefsRequest, AgentTeamResolveTaskRefsResult, AgentTeamReplyResult, AgentTeamConfirmationRequired, AgentTeamThreadHistory, AgentTeamThreadHistoryRequest, AgentTeamThreadReadRequest, AgentTeamThreadReadResult, AgentTeamTaskRequest, AgentTeamTaskResult, AgentTeamSendMessageRequest, AgentTeamSendMessageResult, AgentTeamUpdateChannelRequest, AgentTeamUpdateChannelResult, AgentTeamUpdateMemberRequest, AgentTeamView, AgentTeamViewRequest } from '@wowyuarm/dsh-agent-team/types';
|
|
3
3
|
import type { RemoteResult } from '@deepseek-ai/dsh-typert-protocol';
|
|
4
4
|
import type { TeamNavigationActions, TeamNavigationSnapshot } from './navigation.ts';
|
|
5
5
|
import type { TeamChangeListener, TeamChangeScope } from './team-changes.ts';
|
|
@@ -49,7 +49,6 @@ export type TeamSidebarProps = PropsRuntime<'sidebar.workspaces'> & PropsLocale<
|
|
|
49
49
|
updateChannel: (request: AgentTeamUpdateChannelRequest) => Promise<RemoteResult<AgentTeamUpdateChannelResult>>;
|
|
50
50
|
updateMember: (request: AgentTeamUpdateMemberRequest) => Promise<RemoteResult<AgentTeamMemberResult>>;
|
|
51
51
|
recoverMember: (request: AgentTeamRecoverMemberRequest) => Promise<RemoteResult<AgentTeamRecoverMemberResult>>;
|
|
52
|
-
restartMember: (request: AgentTeamRestartMemberRequest) => Promise<RemoteResult<AgentTeamRestartMemberResult>>;
|
|
53
52
|
joinChannel: (request: AgentTeamJoinChannelRequest) => Promise<RemoteResult<AgentTeamJoinChannelResult>>;
|
|
54
53
|
removeChannelMember: (request: AgentTeamRemoveChannelMemberRequest) => Promise<RemoteResult<AgentTeamRemoveChannelMemberResult>>;
|
|
55
54
|
/** Session-independent Host model catalog (`llm.models`); needs no live Member. */
|
|
@@ -73,6 +72,7 @@ export type TeamConversationProps = PropsRuntime<'conversation'> & PropsLocale<'
|
|
|
73
72
|
removeChannelMember: (request: AgentTeamRemoveChannelMemberRequest) => Promise<RemoteResult<AgentTeamRemoveChannelMemberResult>>;
|
|
74
73
|
reply: (request: AgentTeamReplyRequest) => Promise<RemoteResult<AgentTeamReplyResult | AgentTeamConfirmationRequired>>;
|
|
75
74
|
changeTask: (request: AgentTeamTaskRequest) => Promise<RemoteResult<AgentTeamTaskResult>>;
|
|
75
|
+
resolveTaskRefs: (request: AgentTeamResolveTaskRefsRequest) => Promise<RemoteResult<AgentTeamResolveTaskRefsResult>>;
|
|
76
76
|
loadMembers: (request: AgentTeamMembersRequest) => Promise<RemoteResult<readonly AgentTeamClientMemberStatus[]>>;
|
|
77
77
|
};
|
|
78
78
|
export type TeamSettingsProps = PropsRuntime<'sidebar.settings'> & PropsLocale<'team'> & {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"slots.d.ts","sourceRoot":"","sources":["../../../src/client/slots.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAA;AACjF,OAAO,KAAK,EACV,yBAAyB,EACzB,mBAAmB,EACnB,2BAA2B,EAC3B,6BAA6B,EAC7B,4BAA4B,EAC5B,2BAA2B,EAC3B,0BAA0B,EAC1B,6BAA6B,EAC7B,4BAA4B,EAC5B,6BAA6B,EAC7B,4BAA4B,EAC5B,qBAAqB,EACrB,6BAA6B,EAC7B,4BAA4B,EAC5B,
|
|
1
|
+
{"version":3,"file":"slots.d.ts","sourceRoot":"","sources":["../../../src/client/slots.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAA;AACjF,OAAO,KAAK,EACV,yBAAyB,EACzB,mBAAmB,EACnB,2BAA2B,EAC3B,6BAA6B,EAC7B,4BAA4B,EAC5B,2BAA2B,EAC3B,0BAA0B,EAC1B,6BAA6B,EAC7B,4BAA4B,EAC5B,6BAA6B,EAC7B,4BAA4B,EAC5B,qBAAqB,EACrB,6BAA6B,EAC7B,4BAA4B,EAC5B,uBAAuB,EACvB,mCAAmC,EACnC,kCAAkC,EAClC,qBAAqB,EACrB,+BAA+B,EAC/B,8BAA8B,EAE9B,oBAAoB,EACpB,6BAA6B,EAC7B,sBAAsB,EACtB,6BAA6B,EAC7B,0BAA0B,EAC1B,yBAAyB,EACzB,oBAAoB,EACpB,mBAAmB,EACnB,2BAA2B,EAC3B,0BAA0B,EAC1B,6BAA6B,EAC7B,4BAA4B,EAC5B,4BAA4B,EAC5B,aAAa,EACb,oBAAoB,EACrB,MAAM,gCAAgC,CAAA;AACvC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAA;AACpE,OAAO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kCAAkC,CAAC,CAAC,CAAA;IAChI,KAAK,EAAE,CAAC,OAAO,EAAE,qBAAqB,KAAK,OAAO,CAAC,YAAY,CAAC,oBAAoB,GAAG,6BAA6B,CAAC,CAAC,CAAA;IACtH,UAAU,EAAE,CAAC,OAAO,EAAE,oBAAoB,KAAK,OAAO,CAAC,YAAY,CAAC,mBAAmB,CAAC,CAAC,CAAA;IACzF,eAAe,EAAE,CAAC,OAAO,EAAE,+BAA+B,KAAK,OAAO,CAAC,YAAY,CAAC,8BAA8B,CAAC,CAAC,CAAA;IACpH,WAAW,EAAE,CAAC,OAAO,EAAE,uBAAuB,KAAK,OAAO,CAAC,YAAY,CAAC,SAAS,2BAA2B,EAAE,CAAC,CAAC,CAAA;CACjH,CAAA;AAED,MAAM,MAAM,iBAAiB,GAAG,YAAY,CAAC,kBAAkB,CAAC,GAAG,WAAW,CAAC,MAAM,CAAC,GAAG;IACvF,gBAAgB,EAAE,MAAM,OAAO,CAAC,SAAS,eAAe,EAAE,CAAC,CAAA;CAC5D,CAAA;AAED,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAA;IAC5B,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAA;IAC/B,QAAQ,CAAC,OAAO,EAAE,SAAS,2BAA2B,EAAE,CAAA;CACzD;AAED,MAAM,MAAM,eAAe,GAAG,YAAY,CAAC,uBAAuB,CAAC,GAAG,WAAW,CAAC,MAAM,CAAC,GAAG,qBAAqB,GAAG;IAClH,UAAU,EAAE,oBAAoB,CAAA;IAChC,gBAAgB,EAAE,MAAM,OAAO,CAAC,SAAS,eAAe,EAAE,CAAC,CAAA;CAC5D,CAAA"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { AgentTeamChannelRef, AgentTeamTaskRef, AgentTeamThreadRef } from '@wowyuarm/dsh-agent-team/types';
|
|
2
|
+
/** Navigation facts for one branded Task ref, resolved once per session. */
|
|
3
|
+
export interface ResolvedTaskRef {
|
|
4
|
+
readonly taskRef: AgentTeamTaskRef;
|
|
5
|
+
readonly channelRef: AgentTeamChannelRef;
|
|
6
|
+
readonly threadRef: AgentTeamThreadRef;
|
|
7
|
+
readonly taskNumber: number;
|
|
8
|
+
}
|
|
9
|
+
/** React binding: re-renders the caller when any ref resolution lands. */
|
|
10
|
+
export declare const useResolvedTaskRefVersion: () => number;
|
|
11
|
+
export declare const cachedResolvedTaskRef: (taskRef: AgentTeamTaskRef) => ResolvedTaskRef | undefined;
|
|
12
|
+
/** Store one resolution (click path) and wake every rendered link. */
|
|
13
|
+
export declare const rememberResolvedTaskRef: (entry: ResolvedTaskRef) => void;
|
|
14
|
+
/**
|
|
15
|
+
* Batch-resolve unknown refs through the Host lookup. Concurrent callers
|
|
16
|
+
* deduplicate through the pending set; failures just clear the pending mark
|
|
17
|
+
* so a later interaction can retry.
|
|
18
|
+
*/
|
|
19
|
+
export declare const resolveUnknownTaskRefs: (refs: readonly AgentTeamTaskRef[], lookup: (taskRefs: readonly AgentTeamTaskRef[]) => Promise<readonly ResolvedTaskRef[]>) => Promise<void>;
|
|
20
|
+
//# sourceMappingURL=task-refs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"task-refs.d.ts","sourceRoot":"","sources":["../../../src/client/task-refs.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAA;AAE/G,4EAA4E;AAC5E,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,OAAO,EAAE,gBAAgB,CAAA;IAClC,QAAQ,CAAC,UAAU,EAAE,mBAAmB,CAAA;IACxC,QAAQ,CAAC,SAAS,EAAE,kBAAkB,CAAA;IACtC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAA;CAC5B;AAwBD,0EAA0E;AAC1E,eAAO,MAAM,yBAAyB,QAAO,MAAmE,CAAA;AAEhH,eAAO,MAAM,qBAAqB,GAAI,SAAS,gBAAgB,KAAG,eAAe,GAAG,SAAkC,CAAA;AAEtH,sEAAsE;AACtE,eAAO,MAAM,uBAAuB,GAAI,OAAO,eAAe,KAAG,IAIhE,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,sBAAsB,GACjC,MAAM,SAAS,gBAAgB,EAAE,EACjC,QAAQ,CAAC,QAAQ,EAAE,SAAS,gBAAgB,EAAE,KAAK,OAAO,CAAC,SAAS,eAAe,EAAE,CAAC,KACrF,OAAO,CAAC,IAAI,CAmBd,CAAA"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { useSyncExternalStore } from 'react';
|
|
2
|
+
const resolved = new Map();
|
|
3
|
+
const pending = new Set();
|
|
4
|
+
/** Refs the Host did not recognize; never re-queried (no retry loops). */
|
|
5
|
+
const unresolvable = new Set();
|
|
6
|
+
const listeners = new Set();
|
|
7
|
+
let version = 0;
|
|
8
|
+
const emit = () => {
|
|
9
|
+
version += 1;
|
|
10
|
+
for (const listener of listeners)
|
|
11
|
+
listener();
|
|
12
|
+
};
|
|
13
|
+
const subscribe = (listener) => {
|
|
14
|
+
listeners.add(listener);
|
|
15
|
+
return () => { listeners.delete(listener); };
|
|
16
|
+
};
|
|
17
|
+
/** Stable snapshot token; the map is read directly after this changes. */
|
|
18
|
+
const getSnapshot = () => version;
|
|
19
|
+
/** React binding: re-renders the caller when any ref resolution lands. */
|
|
20
|
+
export const useResolvedTaskRefVersion = () => useSyncExternalStore(subscribe, getSnapshot, getSnapshot);
|
|
21
|
+
export const cachedResolvedTaskRef = (taskRef) => resolved.get(taskRef);
|
|
22
|
+
/** Store one resolution (click path) and wake every rendered link. */
|
|
23
|
+
export const rememberResolvedTaskRef = (entry) => {
|
|
24
|
+
resolved.set(entry.taskRef, entry);
|
|
25
|
+
pending.delete(entry.taskRef);
|
|
26
|
+
emit();
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* Batch-resolve unknown refs through the Host lookup. Concurrent callers
|
|
30
|
+
* deduplicate through the pending set; failures just clear the pending mark
|
|
31
|
+
* so a later interaction can retry.
|
|
32
|
+
*/
|
|
33
|
+
export const resolveUnknownTaskRefs = async (refs, lookup) => {
|
|
34
|
+
const missing = refs.filter(taskRef => !resolved.has(taskRef) && !pending.has(taskRef) && !unresolvable.has(taskRef));
|
|
35
|
+
if (missing.length === 0)
|
|
36
|
+
return;
|
|
37
|
+
for (const taskRef of missing)
|
|
38
|
+
pending.add(taskRef);
|
|
39
|
+
try {
|
|
40
|
+
const entries = await lookup(missing);
|
|
41
|
+
for (const entry of entries) {
|
|
42
|
+
resolved.set(entry.taskRef, entry);
|
|
43
|
+
pending.delete(entry.taskRef);
|
|
44
|
+
}
|
|
45
|
+
// Refs the Host does not know are parked for the session: re-querying
|
|
46
|
+
// them on every render would loop and hammer the Host.
|
|
47
|
+
for (const taskRef of missing) {
|
|
48
|
+
if (!resolved.has(taskRef))
|
|
49
|
+
unresolvable.add(taskRef);
|
|
50
|
+
}
|
|
51
|
+
if (entries.length > 0)
|
|
52
|
+
emit();
|
|
53
|
+
}
|
|
54
|
+
finally {
|
|
55
|
+
for (const taskRef of missing)
|
|
56
|
+
pending.delete(taskRef);
|
|
57
|
+
}
|
|
58
|
+
};
|
|
@@ -13,6 +13,19 @@ export declare function taskStatusDot(status: AgentTeamTask['status']): 'ongoing
|
|
|
13
13
|
export declare function formatTaskTitle(body: string): string;
|
|
14
14
|
/** Deterministic avatar hue for one Member identity; stable across sessions and themes. */
|
|
15
15
|
export declare function memberHue(memberId: string): number;
|
|
16
|
+
/** One branded-ref occurrence inside a literal body segment. */
|
|
17
|
+
export interface RefSegment {
|
|
18
|
+
readonly text: string;
|
|
19
|
+
/** The full `task:`/`channel:`/`thread:` ref when this segment is a link. */
|
|
20
|
+
readonly ref?: string;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Split a literal text run into plain and branded-ref segments. The pattern
|
|
24
|
+
* anchors on the fixed ref prefixes plus the UUID shape, so ordinary prose
|
|
25
|
+
* containing a colon never linkifies. Refs render as navigation links; text
|
|
26
|
+
* without any ref comes back as one untouched segment.
|
|
27
|
+
*/
|
|
28
|
+
export declare function splitBrandedRefs(text: string): readonly RefSegment[];
|
|
16
29
|
export interface MentionSegment {
|
|
17
30
|
readonly text: string;
|
|
18
31
|
readonly mention: boolean;
|
|
@@ -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,MAAM,gCAAgC,CAAA;AACzH,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAA;AAEvD,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,SAAS,GAAG,SAAS,GAAG,MAAM,GAAG,MAAM,GAAG,QAAQ,CAEjH;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,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAA;IACzB,kFAAkF;IAClF,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CACvB;AAMD;;;;;;GAMG;A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AGG;AACH,wBAAgB,iBAAiB,CAAC,UAAU,EAAE,MAAM,EAAE,GAAG,OAAa,GAAG,MAAM,CAS9E;AAED,wBAAgB,cAAc,CAAC,QAAQ,EAAE,iBAAiB,EAAE,OAAO,EAAE;IACnE,QAAQ,CAAC,CAAC,EAAE,qBAAqB,CAAC,GAAG,CAAC,CAAA;IACtC,QAAQ,CAAC,SAAS,EAAE,CAAC,QAAQ,EAAE,iBAAiB,KAAK,MAAM,CAAA;IAC3D,QAAQ,CAAC,MAAM,EAAE,SAAS,cAAc,EAAE,CAAA;CAC3C,GAAG,MAAM,CAiBT;AAED,+FAA+F;AAC/F,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEzD"}
|
|
@@ -35,6 +35,27 @@ export function memberHue(memberId) {
|
|
|
35
35
|
hash = (hash * 31 + memberId.charCodeAt(index)) % 360;
|
|
36
36
|
return hash;
|
|
37
37
|
}
|
|
38
|
+
const BRANDED_REF_PATTERN = /\b(task|channel|thread):[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\b/gi;
|
|
39
|
+
/**
|
|
40
|
+
* Split a literal text run into plain and branded-ref segments. The pattern
|
|
41
|
+
* anchors on the fixed ref prefixes plus the UUID shape, so ordinary prose
|
|
42
|
+
* containing a colon never linkifies. Refs render as navigation links; text
|
|
43
|
+
* without any ref comes back as one untouched segment.
|
|
44
|
+
*/
|
|
45
|
+
export function splitBrandedRefs(text) {
|
|
46
|
+
const segments = [];
|
|
47
|
+
let cursor = 0;
|
|
48
|
+
for (const match of text.matchAll(BRANDED_REF_PATTERN)) {
|
|
49
|
+
const start = match.index ?? 0;
|
|
50
|
+
if (start > cursor)
|
|
51
|
+
segments.push({ text: text.slice(cursor, start) });
|
|
52
|
+
segments.push({ text: match[0], ref: match[0] });
|
|
53
|
+
cursor = start + match[0].length;
|
|
54
|
+
}
|
|
55
|
+
if (cursor < text.length)
|
|
56
|
+
segments.push({ text: text.slice(cursor) });
|
|
57
|
+
return segments;
|
|
58
|
+
}
|
|
38
59
|
function escapeRegExp(value) {
|
|
39
60
|
return value.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
|
|
40
61
|
}
|
|
@@ -107,8 +128,11 @@ export function formatMessageTime(occurredAt, now = new Date()) {
|
|
|
107
128
|
}
|
|
108
129
|
export function formatActivity(activity, options) {
|
|
109
130
|
const actor = options.actorName(activity.actor);
|
|
110
|
-
if (activity.kind === 'accept')
|
|
111
|
-
return
|
|
131
|
+
if (activity.kind === 'accept') {
|
|
132
|
+
return activity.completedClaimRefs !== undefined && activity.completedClaimRefs.length > 0
|
|
133
|
+
? options.t('activityAcceptedWithClaims', { actor, count: activity.completedClaimRefs.length })
|
|
134
|
+
: options.t('activityAccepted', { actor });
|
|
135
|
+
}
|
|
112
136
|
if (activity.kind === 'close')
|
|
113
137
|
return options.t('activityClosed', { actor });
|
|
114
138
|
if (activity.kind === 'reopen')
|
|
@@ -131,12 +131,12 @@ function threadResult(kind, snapshot, attention, facts, extra = {}) {
|
|
|
131
131
|
}
|
|
132
132
|
const teamMessage = markAgentTeamPreset(defineTool({
|
|
133
133
|
name: 'team_message',
|
|
134
|
-
description: 'Create a top-level Task or reply to one existing Task Thread. Read the Thread first; replies require its current revision. A top-level start may mention related Agents directly; in replies, only a Human can invite an unfollowed Agent. Pass Member refs in mentions and spell their handles inside the body; only mentioned Members render as mention chips.',
|
|
134
|
+
description: 'Create a top-level Task or reply to one existing Task Thread. Read the Thread first; replies require its current revision (an internal concurrency token carried by baseRevision, never quoted in bodies). A top-level start may mention related Agents directly; in replies, only a Human can invite an unfollowed Agent. Pass Member refs in mentions and spell their handles inside the body; only mentioned Members render as mention chips.',
|
|
135
135
|
parameters: {
|
|
136
136
|
action: { type: 'string', required: true, enum: ['start', 'reply'] },
|
|
137
137
|
channelRef: { type: 'string', description: "Full branded Channel ref exactly as returned by Team tools, including the 'channel:' prefix." },
|
|
138
138
|
taskRef: { type: 'string', description: "Full branded Task ref exactly as returned by Team tools, including the 'task:' prefix." },
|
|
139
|
-
body: { type: 'string', required: true }, baseRevision: { type: 'number', description: "Positive integer; use the current Thread revision as shown by the latest team_inbox or team_thread result for this Task." },
|
|
139
|
+
body: { type: 'string', required: true }, baseRevision: { type: 'number', description: "Positive integer; use the current Thread revision as shown by the latest team_inbox or team_thread result for this Task. The revision is an internal concurrency token, not a citable fact." },
|
|
140
140
|
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.' },
|
|
141
141
|
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.' },
|
|
142
142
|
},
|
|
@@ -192,11 +192,11 @@ function messageOutcome(result) {
|
|
|
192
192
|
}
|
|
193
193
|
const teamClaim = defineTool({
|
|
194
194
|
name: 'team_claim',
|
|
195
|
-
description: 'List or mutate your Direction Claims. Read the Thread first; every mutation uses the current Thread revision.',
|
|
195
|
+
description: 'List or mutate your Direction Claims. Read the Thread first; every mutation uses the current Thread revision. A Claim is your one-sentence direction statement on a Task — "the angle I am taking" — so others can spot collisions and track progress: Tasks define scope (owned by Humans), Claims declare the angle (owned by you). Good direction: "Unify the four form dialogs on shared field components before wiring submits." Bad direction: a multi-paragraph plan with step order, file lists, or acceptance criteria — those belong in Thread messages, not the Claim.',
|
|
196
196
|
parameters: {
|
|
197
197
|
action: { type: 'string', required: true, enum: ['list', 'claim', 'done', 'release'] },
|
|
198
198
|
taskRef: { type: 'string', required: true, description: "Full branded Task ref exactly as returned by Team tools, including the 'task:' prefix." },
|
|
199
|
-
baseRevision: { type: 'number', description: "Positive integer; use the current Thread revision as shown by the latest team_inbox or team_thread result for this Task." }, direction: { type: 'string' },
|
|
199
|
+
baseRevision: { type: 'number', description: "Positive integer; use the current Thread revision as shown by the latest team_inbox or team_thread result for this Task. The revision is an internal concurrency token, not a citable fact." }, direction: { type: 'string' },
|
|
200
200
|
claimRef: { type: 'string', description: "Full branded Claim ref exactly as returned by team_claim, including the 'claim:' prefix." },
|
|
201
201
|
},
|
|
202
202
|
output: {
|