@primusclaw/personal-agent 0.12.0 → 0.13.0
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/dist/index.js +2038 -1635
- package/dist/types/assistant/actions.d.ts +8 -1
- package/dist/types/assistant/confirm-outcome.d.ts +5 -2
- package/dist/types/assistant/events.d.ts +34 -4
- package/dist/types/assistant/say.d.ts +5 -2
- package/dist/types/assistant/seat-dispatch-outcome.d.ts +8 -0
- package/dist/types/assistant/seat-outcome.d.ts +4 -0
- package/dist/types/assistant/views.d.ts +21 -0
- package/dist/types/claw/model.d.ts +10 -0
- package/dist/types/claw/work-item.d.ts +17 -1
- package/dist/types/language/chosen.d.ts +2 -1
- package/dist/types/locales/assistant-cards.d.ts +9 -0
- package/dist/types/locales/assistant-seats.d.ts +46 -0
- package/dist/types/locales/assistant-work-clicks.d.ts +5 -0
- package/dist/types/locales/index.d.ts +1 -0
- package/dist/types/locales/remote.d.ts +7 -0
- package/dist/types/ports/claw/assistant.d.ts +5 -2
- package/dist/types/ports/store/assistant.d.ts +13 -2
- package/dist/types/ports/store/remote.d.ts +5 -0
- package/dist/types/proactive/deliver.d.ts +5 -0
- package/dist/types/proactive/deps.d.ts +4 -0
- package/dist/types/proactive/quiet.d.ts +4 -1
- package/dist/types/protocol/claw-api/assistant-events.d.ts +44 -4
- package/dist/types/protocol/remote-agents.d.ts +57 -0
- package/dist/types/remote/chat-key.d.ts +2 -0
- package/dist/types/remote/context.d.ts +4 -1
- package/dist/types/remote/state.d.ts +4 -1
- package/dist/types/remote-view/permission-view.d.ts +4 -0
- package/dist/types/routing/chat.d.ts +4 -3
- package/dist/types/routing/question-reply.d.ts +6 -1
- package/dist/types/routing/turn-runner.d.ts +3 -2
- package/dist/types/routing/turn-start.d.ts +8 -13
- package/package.json +1 -1
|
@@ -41,6 +41,10 @@ export interface RemoteAsk {
|
|
|
41
41
|
readonly agent: string;
|
|
42
42
|
/** Which errand: `#seq title`. */
|
|
43
43
|
readonly about: string;
|
|
44
|
+
/** The name the person gave the seat the errand went to (absent: none): the card's title names it. */
|
|
45
|
+
readonly seat?: string | undefined;
|
|
46
|
+
/** The one reminder of a request the agent keeps waiting on: the card says it still waits, until when. */
|
|
47
|
+
readonly parked?: boolean | undefined;
|
|
44
48
|
readonly expiresAt: number;
|
|
45
49
|
readonly zone: string;
|
|
46
50
|
}
|
|
@@ -22,10 +22,11 @@ export declare function helpLang(store: Pick<RouterStore, "prefs">, userId: stri
|
|
|
22
22
|
/**
|
|
23
23
|
* The language a group chat is answered in, its fixed texts and its answers alike: the one its members set (`/lang zh|en` there,
|
|
24
24
|
* or a pick on its language card); else (none set, or "follow the asker") the language of the message being answered (`written`).
|
|
25
|
-
* A
|
|
26
|
-
* language
|
|
25
|
+
* A message that says no language of its own ("help", "/new", a link) is answered in English: a group's members share no other
|
|
26
|
+
* language, so neither the sender's own (`/lang` in their 1:1 chat, or the one their messages were last written in) nor their
|
|
27
|
+
* client's locale is read here.
|
|
27
28
|
*/
|
|
28
|
-
export declare function groupLangOf(store:
|
|
29
|
+
export declare function groupLangOf(store: Partial<Pick<RouterStore, "groupLanguage">>, conversationId: string, written: string): Lang;
|
|
29
30
|
/** The language a group chat's members set, when it is one (`/lang zh|en`); undefined for none, and for "follow the asker". */
|
|
30
31
|
export declare function groupChosenLang(store: Partial<Pick<RouterStore, "groupLanguage">>, conversationId: string): Lang | undefined;
|
|
31
32
|
/** One chat as the router answers in it: who wrote, where to answer, and in which language. */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type Chat } from "./chat.js";
|
|
2
2
|
import type { RouterContext } from "./context.js";
|
|
3
3
|
/**
|
|
4
4
|
* A question with less than this left of its wait is not answered from a typed message: Brain may already have stopped
|
|
@@ -10,6 +10,11 @@ export declare const TYPED_ANSWER_MARGIN_SECONDS = 15;
|
|
|
10
10
|
export interface TypedReply {
|
|
11
11
|
readonly chat: Chat;
|
|
12
12
|
readonly text: string;
|
|
13
|
+
/**
|
|
14
|
+
* What the message forwards, as text for the model ("" none), read once there is a question to answer: it goes to Claw with
|
|
15
|
+
* the answer, since no other message carries it (the card shows only the words).
|
|
16
|
+
*/
|
|
17
|
+
readonly forward?: () => string;
|
|
13
18
|
/** The Claw credential of the person, read when there is a question to answer. */
|
|
14
19
|
readonly credential: () => Promise<string>;
|
|
15
20
|
}
|
|
@@ -45,8 +45,9 @@ export interface TurnRun {
|
|
|
45
45
|
readonly lang: Lang;
|
|
46
46
|
/**
|
|
47
47
|
* The language the turn is to be answered in, told to Claw after the message: in a 1:1 chat the one the person chose (`/lang
|
|
48
|
-
* zh|en`, `chosenLang`), in a group the group's (`groupChosenLang`), or with none the
|
|
49
|
-
*
|
|
48
|
+
* zh|en`, `chosenLang`), in a group the group's (`groupChosenLang`), or with none the language of the message's own words
|
|
49
|
+
* (`writtenLang`), else English; undefined (a 1:1 chat with none chosen): the answer is in the language of what they wrote.
|
|
50
|
+
* A chat turn's only: a review's follows its request.
|
|
50
51
|
*/
|
|
51
52
|
readonly replyLang?: Lang;
|
|
52
53
|
/** The answer gets thumbs of the worker's own (a phone, whose own thumbs never reach the worker). */
|
|
@@ -51,6 +51,11 @@ export interface StartTurn {
|
|
|
51
51
|
readonly messageId: string;
|
|
52
52
|
readonly clientPlatform: string;
|
|
53
53
|
readonly quote?: string;
|
|
54
|
+
/**
|
|
55
|
+
* What it forwards, alone, as text for the model ("": nothing): part of `quote` (beside what it quotes and, in a group, the
|
|
56
|
+
* chat's recent messages), and what goes with the words when they answer a waiting question. Read only then.
|
|
57
|
+
*/
|
|
58
|
+
readonly forward?: () => string;
|
|
54
59
|
readonly sent?: string;
|
|
55
60
|
readonly files?: readonly InboundFile[];
|
|
56
61
|
readonly review?: ReviewTurnStart;
|
|
@@ -69,7 +74,6 @@ export interface StartTurn {
|
|
|
69
74
|
export declare class TurnStarter {
|
|
70
75
|
private readonly ctx;
|
|
71
76
|
private readonly running;
|
|
72
|
-
private readonly askers;
|
|
73
77
|
constructor(ctx: RouterContext);
|
|
74
78
|
/** The turns that run now (a test waits for them). */
|
|
75
79
|
settled(): Promise<void>;
|
|
@@ -102,9 +106,9 @@ export declare class TurnStarter {
|
|
|
102
106
|
/**
|
|
103
107
|
* The language a chat turn is to be answered in (a review's answer follows its request's language). In a 1:1 chat the one the
|
|
104
108
|
* person chose, if any. In a group the group's (`groupChosenLang`; the sender's own choice is not read there); with none set, or
|
|
105
|
-
* "follow the asker", the language of the @-message's own words (`writtenLang`), else
|
|
106
|
-
*
|
|
107
|
-
* the model answers in the language of that history, not the asker's.
|
|
109
|
+
* "follow the asker", the language of the @-message's own words (`writtenLang`), else English, as the group's fixed texts are
|
|
110
|
+
* (`groupLangOf`): a message with no words of its own (`help`, `ok #3`, a link) is answered in English. A group's shared
|
|
111
|
+
* session holds every member's turns, and without the line the model answers in the language of that history, not the asker's.
|
|
108
112
|
*/
|
|
109
113
|
private replyLang;
|
|
110
114
|
private hooks;
|
|
@@ -116,12 +120,3 @@ export declare class TurnStarter {
|
|
|
116
120
|
*/
|
|
117
121
|
private recordSession;
|
|
118
122
|
}
|
|
119
|
-
/**
|
|
120
|
-
* The language each member of a group last asked in there, for a message with no words of its own (`ok`, `#3`, a link): kept in
|
|
121
|
-
* memory, per group and member, the newest `ASKERS_MAX`. After a restart such a message gets no language until its sender writes one.
|
|
122
|
-
*/
|
|
123
|
-
export declare class AskerLanguages {
|
|
124
|
-
private readonly last;
|
|
125
|
-
/** The language of `text` when it has words (and it is remembered), else the one remembered for `userId` in `scope`. */
|
|
126
|
-
answer(scope: string, userId: string, text: string): Lang | undefined;
|
|
127
|
-
}
|