@primusclaw/personal-agent 0.8.1 → 0.10.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 +655 -143
- package/dist/types/assistant/chat.d.ts +8 -1
- package/dist/types/assistant/confirm-outcome.d.ts +2 -0
- package/dist/types/assistant/events.d.ts +28 -1
- package/dist/types/assistant/receipt.d.ts +1 -1
- package/dist/types/assistant/say.d.ts +10 -3
- package/dist/types/branding.d.ts +4 -3
- package/dist/types/capabilities/natural.d.ts +3 -2
- package/dist/types/capabilities/phrases.d.ts +6 -4
- package/dist/types/commands/names.d.ts +1 -1
- package/dist/types/config/settings.d.ts +10 -5
- package/dist/types/direct-chat/direct-chat.d.ts +17 -19
- package/dist/types/feedback/flow.d.ts +2 -0
- package/dist/types/feedback/issue-text.d.ts +3 -3
- package/dist/types/group-context/command.d.ts +1 -1
- package/dist/types/index.d.ts +3 -0
- package/dist/types/legacy-names.d.ts +21 -0
- package/dist/types/locales/help-lead.d.ts +2 -0
- package/dist/types/locales/index.d.ts +1 -0
- package/dist/types/locales/remote.d.ts +1 -1
- package/dist/types/locales/review-github.d.ts +14 -9
- package/dist/types/locales/review-request.d.ts +11 -5
- package/dist/types/locales/review-start.d.ts +6 -6
- package/dist/types/locales/skills.d.ts +105 -0
- package/dist/types/observability/metrics-catalog.d.ts +1 -1
- package/dist/types/observability/security-events.d.ts +1 -1
- package/dist/types/observe/observer.d.ts +2 -0
- package/dist/types/ports/claw/index.d.ts +4 -0
- package/dist/types/ports/claw/skills.d.ts +52 -0
- package/dist/types/ports/surface.d.ts +1 -1
- package/dist/types/proactive/deps.d.ts +1 -1
- package/dist/types/protocol/claw-api/assistant-events.d.ts +47 -2
- package/dist/types/remote/follow/speaker.d.ts +2 -0
- package/dist/types/remote/lines.d.ts +1 -1
- package/dist/types/review/connect/connections.d.ts +1 -1
- package/dist/types/review/consent.d.ts +5 -4
- package/dist/types/review/intent-check.d.ts +3 -2
- package/dist/types/review/service/deps.d.ts +2 -0
- package/dist/types/review/views.d.ts +4 -0
- package/dist/types/skills/card.d.ts +4 -0
- package/dist/types/skills/clicks.d.ts +24 -0
- package/dist/types/skills/command.d.ts +22 -0
- package/dist/types/skills/index.d.ts +5 -0
- package/dist/types/skills/views.d.ts +43 -0
- package/dist/types/typed-answer/prompt.d.ts +2 -2
- package/package.json +1 -1
|
@@ -52,6 +52,11 @@ export interface AssistantChatOptions {
|
|
|
52
52
|
readonly understanding: ReadonlySet<string>;
|
|
53
53
|
/** CLAW_PLUGIN_ID: named on each message; undefined for none. */
|
|
54
54
|
readonly pluginId: number | undefined;
|
|
55
|
+
/**
|
|
56
|
+
* The bot's display name in this deployment (`Settings.botName`), sent on each message as `channel_context.assistant_name` so
|
|
57
|
+
* that the assistant knows the name people call it by ("" sends none). Claw keeps it only when it reads as a short name.
|
|
58
|
+
*/
|
|
59
|
+
readonly assistantName: string;
|
|
55
60
|
/** A chat turn of the old kind is running for this person: it is let finish. */
|
|
56
61
|
readonly legacyTurn: (userId: string) => boolean;
|
|
57
62
|
readonly files: MessageFiles | undefined;
|
|
@@ -91,6 +96,8 @@ export declare class AssistantChat {
|
|
|
91
96
|
filesOnly(lang: Lang): string;
|
|
92
97
|
/** The language the person chose to be answered in, as the message's `channel_context` carries it (none: nothing is sent). */
|
|
93
98
|
private chosenLanguage;
|
|
99
|
+
/** The bot's display name, as the message's `channel_context` carries it (none configured: nothing is sent). */
|
|
100
|
+
private named;
|
|
94
101
|
private langOf;
|
|
95
102
|
/**
|
|
96
103
|
* A message of a person the assistant understands, with the chat's context. True when the assistant has it; otherwise the
|
|
@@ -144,7 +151,7 @@ export declare class AssistantChat {
|
|
|
144
151
|
private follow;
|
|
145
152
|
/**
|
|
146
153
|
* The person sees at once that their message was taken: the receipt under it, or (none can be opened) the typing indicator.
|
|
147
|
-
* Never fails the message. In a chat that is an agent's window the receipt's words start with
|
|
154
|
+
* Never fails the message. In a chat that is an agent's window the receipt's words start with the bot's head.
|
|
148
155
|
*/
|
|
149
156
|
private acknowledge;
|
|
150
157
|
private attachedReader;
|
|
@@ -6,6 +6,8 @@ export declare function localTime(at: unknown, zone: string): string;
|
|
|
6
6
|
export declare function commentOutcome(out: Fields, lang: Lang): string | undefined;
|
|
7
7
|
/** What came of a press on an instruction card (`devenv_send`): sent, as which item, or why not. */
|
|
8
8
|
export declare function devenvSendOutcome(status: string, out: Fields, lang: Lang): string;
|
|
9
|
+
/** What came of Save or Discard on a drafted skill's card: saved (which version), discarded, or why not. */
|
|
10
|
+
export declare function skillSaveOutcome(status: string, out: Fields, lang: Lang): string;
|
|
9
11
|
/** What came of a press on a held write's card of `kind`, in one line: Claw's answer said plainly. */
|
|
10
12
|
export declare function confirmOutcome(kind: string, out: Fields, lang: Lang): string;
|
|
11
13
|
export {};
|
|
@@ -13,7 +13,7 @@ export declare const SUGGESTED_REPLY_MAX = 30;
|
|
|
13
13
|
/** The suggested replies kept under a message when the channel's own limit is not given (`SurfaceCaps.suggestionsMax`). */
|
|
14
14
|
export declare const SUGGESTIONS_MAX = 3;
|
|
15
15
|
/** The writes Claw holds for the person that this worker draws as a card. */
|
|
16
|
-
export declare const CONFIRM_KINDS: readonly ["trigger_create", "trigger_cancel", "devenv_send", "github_comment", "devenv_hide"];
|
|
16
|
+
export declare const CONFIRM_KINDS: readonly ["trigger_create", "trigger_cancel", "devenv_send", "github_comment", "devenv_hide", "skill_save"];
|
|
17
17
|
/** The default replies under what the assistant said: (what the button says, what it sends). */
|
|
18
18
|
export declare const ASSISTANT_SUGGESTED_REPLIES: Readonly<Record<Lang, readonly SuggestedReply[]>>;
|
|
19
19
|
type Event = Readonly<Record<string, unknown>>;
|
|
@@ -42,6 +42,33 @@ export declare function confirmWriteOf(event: Event): ConfirmWrite | undefined;
|
|
|
42
42
|
* language (`lang`; without it, the language of `text`).
|
|
43
43
|
*/
|
|
44
44
|
export declare function suggestedRepliesOf(event: Event, text: string, styleOn: boolean, lang?: Lang, max?: number): SuggestedReply[];
|
|
45
|
+
/** What a skill's card is about (`skill_card.kind`): done already, or a draft to save. */
|
|
46
|
+
export declare const SKILL_CARD_KINDS: readonly ["saved", "deleted", "disabled", "enabled", "draft"];
|
|
47
|
+
/** Code points of a skill's description on its card (Claw sends at most 300). */
|
|
48
|
+
export declare const SKILL_DESCRIPTION_MAX = 300;
|
|
49
|
+
/** Code points of the start of SKILL.md a card shows (Claw sends at most 1500). */
|
|
50
|
+
export declare const SKILL_PREVIEW_MAX = 1500;
|
|
51
|
+
/** The files a skill's card lists (Claw keeps at most 20). */
|
|
52
|
+
export declare const SKILL_FILES_MAX = 20;
|
|
53
|
+
/** One of the person's personal skills as an `assistant.say` shows it (`skill_card`). */
|
|
54
|
+
export interface SkillCardEvent {
|
|
55
|
+
readonly kind: (typeof SKILL_CARD_KINDS)[number];
|
|
56
|
+
readonly name: string;
|
|
57
|
+
readonly version: number | null;
|
|
58
|
+
/** `saved`: a new skill (true) or a new version of one (false). */
|
|
59
|
+
readonly created: boolean;
|
|
60
|
+
readonly description: string;
|
|
61
|
+
readonly manual: boolean;
|
|
62
|
+
readonly files: readonly string[];
|
|
63
|
+
readonly preview: string;
|
|
64
|
+
/** What Undo takes back ("" none). */
|
|
65
|
+
readonly changeId: string;
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* The skill an `assistant.say` is about (`skill_card`); undefined when it carries none this worker draws. Read whole or not at all:
|
|
69
|
+
* a name that is not one, or a kind it does not know, and there is no card (the words still say it).
|
|
70
|
+
*/
|
|
71
|
+
export declare function skillCardOf(event: Event): SkillCardEvent | undefined;
|
|
45
72
|
/** The fewest options a choice card shows (Claw sends from 2). */
|
|
46
73
|
export declare const CHOICE_OPTIONS_MIN = 2;
|
|
47
74
|
/** The most options a choice card shows (Claw sends at most 10). */
|
|
@@ -47,7 +47,7 @@ export declare class Receipt {
|
|
|
47
47
|
reserved: boolean;
|
|
48
48
|
/** The words shown are known not to be said. */
|
|
49
49
|
voided: boolean;
|
|
50
|
-
/** The line the reply starts with (direct chat:
|
|
50
|
+
/** The line the reply starts with (direct chat: the bot's head), shown before its words. */
|
|
51
51
|
head: string;
|
|
52
52
|
/**
|
|
53
53
|
* Which turn of the assistant's session answers the message this receipt stands under (`answeredBy`): its id, once Claw gave
|
|
@@ -6,8 +6,9 @@
|
|
|
6
6
|
* cites as [n], and the replies to tap under the last of its messages when no card follows.
|
|
7
7
|
* - When the event's item holds a result that waits, a card with Accept and Stop; when it holds a write for the person, a card
|
|
8
8
|
* that lets it through or not; when it puts a command to the person, a card with Run and Cancel; when it puts a choice to the
|
|
9
|
-
* person, a card with the options and Send
|
|
10
|
-
*
|
|
9
|
+
* person, a card with the options and Send; when it is about one of the person's skills, the skill's card with Undo and Edit,
|
|
10
|
+
* or a draft's with Save and Discard (each recorded first, so its buttons mean something). A card holds the words only when they
|
|
11
|
+
* are short and not shown already; a skill's card always does.
|
|
11
12
|
* - Then a card for each file the item's worker delivered, with Claw's own download link.
|
|
12
13
|
*
|
|
13
14
|
* Every word of this worker's own is in the person's language, never in that of what was said.
|
|
@@ -22,7 +23,7 @@ export interface SayOptions {
|
|
|
22
23
|
readonly linkFor?: DeliveryLink | undefined;
|
|
23
24
|
/** What the receipt already shows of the words. */
|
|
24
25
|
readonly shown?: string;
|
|
25
|
-
/** The first line of what is said (direct chat:
|
|
26
|
+
/** The first line of what is said (direct chat: the bot's head). */
|
|
26
27
|
readonly head?: string;
|
|
27
28
|
/** Suggested replies of the worker's own, before Claw's. */
|
|
28
29
|
readonly replies?: readonly SuggestedReply[];
|
|
@@ -58,6 +59,12 @@ export declare class SayPlanner {
|
|
|
58
59
|
* to the person; undefined for none. `holdsWords`: the card shows the words, which are then not said apart.
|
|
59
60
|
*/
|
|
60
61
|
private card;
|
|
62
|
+
/**
|
|
63
|
+
* A personal skill the message is about (`skill_card`), recorded first: a draft is its held write (Save and Discard answer it as
|
|
64
|
+
* any held write is answered); anything done already records the change its Undo takes back. Undefined for none, and for a draft
|
|
65
|
+
* without its held write (it is then the plain held write's card).
|
|
66
|
+
*/
|
|
67
|
+
private skillCard;
|
|
61
68
|
/** A write Claw holds for the person (Allow, Deny) or a command put to them (Run, Cancel), recorded first; undefined for none. */
|
|
62
69
|
private askCard;
|
|
63
70
|
/**
|
package/dist/types/branding.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* The user-visible name of the bot
|
|
3
|
-
*
|
|
2
|
+
* The user-visible name of the bot when the deployment names it nothing else. A deployment names it with
|
|
3
|
+
* PERSONAL_AGENT_BOT_NAME (`Settings.botName`); every text that names the bot, and the reading of an @mention of it, takes
|
|
4
|
+
* the configured name, and this constant is only its default.
|
|
4
5
|
*/
|
|
5
|
-
export declare const BOT_NAME = "
|
|
6
|
+
export declare const BOT_NAME = "PrimusClaw Assistant";
|
|
@@ -14,6 +14,7 @@ export declare const NATURAL_PATTERNS: readonly (readonly [string, readonly RegE
|
|
|
14
14
|
* itself. Only the whole message counts. `group`: a group chat reads only what a group may do (help, stop, a new session, which
|
|
15
15
|
* account, feedback), and asking it to introduce itself, read as help. `off`: what this chat cannot do right now, as a command word (`board` without the assistant, `github` without
|
|
16
16
|
* the review service, `agents` and `agent` with remote agents off) or a command and its verb (`agent detach` with no agent
|
|
17
|
-
* attached): a sentence that would mean one of them stays the words it is, for Claw.
|
|
17
|
+
* attached): a sentence that would mean one of them stays the words it is, for Claw. `bot`: the bot's name in this
|
|
18
|
+
* deployment, so "back to <bot>" detaches as "back to" the default name does.
|
|
18
19
|
*/
|
|
19
|
-
export declare function naturalCommand(text: string, group?: boolean, off?: ReadonlySet<string
|
|
20
|
+
export declare function naturalCommand(text: string, group?: boolean, off?: ReadonlySet<string>, bot?: string): string;
|
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The plain sentences help teaches, and close ways of saying the same, each read as the command it means (`natural.ts`). A whole
|
|
3
|
-
* message is looked up as a phrase: lower case, no spaces between the words, no punctuation at either end (`phraseKey`).
|
|
4
|
-
*/
|
|
5
1
|
export declare const HELP: string[];
|
|
6
2
|
/**
|
|
7
3
|
* Asking the bot to introduce itself, read as help in a group only: there the answer is said to everyone, and help is what knows
|
|
@@ -24,6 +20,12 @@ export declare const MEMORY_OFF: string[];
|
|
|
24
20
|
export declare const UNLINK: string[];
|
|
25
21
|
export declare const AGENTS: string[];
|
|
26
22
|
export declare const AGENT_SESSIONS: string[];
|
|
23
|
+
/** "Back to <name>" for the bot's name `name` (a deployment's own name is read beside these: `naturalCommand`'s `bot`). */
|
|
24
|
+
export declare function backToBot(name: string): string[];
|
|
25
|
+
/**
|
|
26
|
+
* The default name, and the name an earlier release gave the bot: "back to ..." buttons under cards it sent are still in
|
|
27
|
+
* people's chats.
|
|
28
|
+
*/
|
|
27
29
|
export declare const DETACH: string[];
|
|
28
30
|
/**
|
|
29
31
|
* What people put around "回到助理" without changing what it asks (好了,回到助理吧 / ok, back to the assistant please): dropped from
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
export declare const COMMANDS: readonly ["help", "new", "stop", "unlink", "whoami", "resume", "memory", "sessions"];
|
|
7
7
|
/** The only commands a group chat accepts. */
|
|
8
8
|
export declare const GROUP_COMMANDS: readonly ["help", "new", "stop", "whoami", "feedback"];
|
|
9
|
-
export declare const PERSONAL_ONLY_COMMANDS: readonly ["link", "unlink", "resume", "timezone", "quiet", "pause", "brief", "repo", "sessions", "agents", "agent", "lang", "approvals"];
|
|
9
|
+
export declare const PERSONAL_ONLY_COMMANDS: readonly ["link", "unlink", "resume", "timezone", "quiet", "pause", "brief", "repo", "sessions", "agents", "agent", "lang", "approvals", "skills"];
|
|
10
10
|
/**
|
|
11
11
|
* `/feedback [TEXT]` takes an argument, so it is read with `commandArgs`, never `parseCommand`; it is listed here (not in
|
|
12
12
|
* COMMANDS) only so that a group chat accepts it and an unknown `/word` is still plain text.
|
|
@@ -21,6 +21,11 @@ export interface Settings {
|
|
|
21
21
|
readonly listenPort: number;
|
|
22
22
|
/** METRICS_PORT (default 9090), never PORT. */
|
|
23
23
|
readonly metricsPort: number;
|
|
24
|
+
/**
|
|
25
|
+
* PERSONAL_AGENT_BOT_NAME (default `BOT_NAME`, "PrimusClaw Assistant"): the name the bot goes by in this deployment, in every
|
|
26
|
+
* text that names it and in what an @mention of it is read as.
|
|
27
|
+
*/
|
|
28
|
+
readonly botName: string;
|
|
24
29
|
readonly claw: ClawSettings;
|
|
25
30
|
readonly exchange: ExchangeSettings;
|
|
26
31
|
readonly models: ModelSettings;
|
|
@@ -56,7 +61,7 @@ export interface ClawSettings {
|
|
|
56
61
|
readonly pluginId: number | null;
|
|
57
62
|
/** CLAW_RULE_TOOL_ID: the rule tool whose text rides on every message; null none. */
|
|
58
63
|
readonly ruleToolId: number | null;
|
|
59
|
-
/** CLAW_CLIENT_LABEL (default "
|
|
64
|
+
/** CLAW_CLIENT_LABEL (default "personal-agent"): what Claw's audit trail calls this client (`X-Claw-Client`). */
|
|
60
65
|
readonly clientLabel: string;
|
|
61
66
|
}
|
|
62
67
|
/** Token exchange with the identity service (RFC 8693). */
|
|
@@ -82,11 +87,11 @@ export interface ExchangeSettings {
|
|
|
82
87
|
}
|
|
83
88
|
/** The models sessions ask for ("" sends none: Claw's default applies). */
|
|
84
89
|
export interface ModelSettings {
|
|
85
|
-
/**
|
|
90
|
+
/** PERSONAL_AGENT_MODEL. */
|
|
86
91
|
readonly chat: string;
|
|
87
|
-
/**
|
|
92
|
+
/** PERSONAL_AGENT_FALLBACK_MODEL: a turn refused for want of a model key is run again on it, once ("" no second run). */
|
|
88
93
|
readonly fallback: string;
|
|
89
|
-
/**
|
|
94
|
+
/** PERSONAL_AGENT_REVIEW_MODEL: a review whose request names none ("" PERSONAL_AGENT_MODEL). */
|
|
90
95
|
readonly review: string;
|
|
91
96
|
}
|
|
92
97
|
/** Reviewing and merging a pull request for a colleague. */
|
|
@@ -95,7 +100,7 @@ export interface GithubReviewSettings {
|
|
|
95
100
|
readonly enabled: boolean;
|
|
96
101
|
/** PA_GITHUB_REVIEW_OWNERS: the GitHub owners whose pull requests are taken; required when on. */
|
|
97
102
|
readonly owners: readonly string[];
|
|
98
|
-
/** PA_REVIEW_INTENT_MODEL (else
|
|
103
|
+
/** PA_REVIEW_INTENT_MODEL (else PERSONAL_AGENT_MODEL) when on; "" requests are read by the rules alone. */
|
|
99
104
|
readonly intentModel: string;
|
|
100
105
|
/** PA_GITHUB_CREDENTIAL_URL (default PUBLIC_BASE_URL/oauth/external-credentials) when on. */
|
|
101
106
|
readonly credentialUrl: string;
|
|
@@ -1,17 +1,11 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The chat itself as the window of an agent session on the person's machine (PA_DIRECT_CHAT, teams_agent/direct_chat.py).
|
|
3
|
-
*
|
|
4
|
-
* For the people it is on for, a chat attached to an agent session is a plain conversation with that agent: every message says in
|
|
5
|
-
* its first line who speaks (`agentHead`, `CLAWY_HEAD`), a line of the agent's that looks like a head is escaped (`guardHeads`),
|
|
6
|
-
* entering and leaving are one line each, and the way back and forth is a suggested reply. Off (the default) changes nothing.
|
|
7
|
-
*/
|
|
8
1
|
import type { Lang } from "../locales/lang.js";
|
|
9
2
|
/** A suggested reply: (what the button says, what it sends). */
|
|
10
3
|
export type SuggestedReply = readonly [title: string, value: string];
|
|
11
|
-
export declare const CLAWY_HEAD = "\uD83D\uDCAC **Clawy**";
|
|
12
4
|
export declare const NEUTRAL_ICON = "\uD83E\uDD16";
|
|
13
5
|
/** The first line of what an agent writes: its icon, then its name and its machine in bold (`🟠 **Claude Code · dev-pod**`). */
|
|
14
6
|
export declare function agentHead(label: string, host: string): string;
|
|
7
|
+
/** The first line of what the bot itself says in a chat attached to an agent: `💬 **<the bot's name>**`. */
|
|
8
|
+
export declare function botHead(bot: string): string;
|
|
15
9
|
/** The first line of the second and later messages of one answer: the agent's icon and where it is in the answer. */
|
|
16
10
|
export declare function continuedHead(label: string, n: number, total: number, lang: string): string;
|
|
17
11
|
/** The agent's words with every line that would read as a head escaped (its bold shown as asterisks). */
|
|
@@ -22,10 +16,10 @@ export declare function signed(head: string, text: string): string;
|
|
|
22
16
|
export declare function signedParts(label: string, host: string, parts: readonly string[], lang: string, suffix?: string): string[];
|
|
23
17
|
export declare const OWN_SUFFIX: Readonly<Record<Lang, string>>;
|
|
24
18
|
export declare const TYPED_SUFFIX: Readonly<Record<Lang, string>>;
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
export declare function backReply(lang: string): SuggestedReply;
|
|
19
|
+
/** The suggested replies under what the agent said: go on with it, or back to the bot (`bot`: its name in this deployment). */
|
|
20
|
+
export declare function agentReplies(lang: string, bot: string): SuggestedReply[];
|
|
21
|
+
/** "Back to <bot>": what it says and sends (the words `naturalCommand` reads as `/agent detach`). */
|
|
22
|
+
export declare function backReply(lang: string, bot: string): SuggestedReply;
|
|
29
23
|
/** The reply that attaches the chat to the agent it last talked to again (`/agent attach MACHINE/AGENT`); undefined when none. */
|
|
30
24
|
export declare function returnReply(label: string, host: string, agentId: string, lang: string): SuggestedReply | undefined;
|
|
31
25
|
export interface EnteredLine {
|
|
@@ -34,16 +28,18 @@ export interface EnteredLine {
|
|
|
34
28
|
readonly cwd: string;
|
|
35
29
|
readonly mode: string;
|
|
36
30
|
readonly lang: string;
|
|
31
|
+
/** The bot's name in this deployment. */
|
|
32
|
+
readonly bot: string;
|
|
37
33
|
readonly unattended?: boolean;
|
|
38
34
|
readonly lead?: string;
|
|
39
35
|
}
|
|
40
36
|
/** The one line a chat gets when it attaches to (or switches to) a session. */
|
|
41
37
|
export declare function enteredLine(entered: EnteredLine): string;
|
|
42
|
-
/** The one line a chat gets when it leaves the session: its messages go to
|
|
43
|
-
export declare function leftLine(lang: string): string;
|
|
38
|
+
/** The one line a chat gets when it leaves the session: its messages go to the bot (`bot`) again. */
|
|
39
|
+
export declare function leftLine(lang: string, bot: string): string;
|
|
44
40
|
/** `/agent mode card|chat` while this is on: the chat is the window, for everybody it is on for. */
|
|
45
41
|
export declare function modeUnifiedLine(lang: string): string;
|
|
46
|
-
/** Where a person's chat is attached, as far as
|
|
42
|
+
/** Where a person's chat is attached, as far as the bot's own words need it. */
|
|
47
43
|
export interface AttachedState {
|
|
48
44
|
readonly sessionId: string;
|
|
49
45
|
readonly agentLabel: string;
|
|
@@ -54,20 +50,22 @@ export interface AttachedState {
|
|
|
54
50
|
export interface AttachedStateReader {
|
|
55
51
|
remoteState(aadId: string): AttachedState | undefined;
|
|
56
52
|
}
|
|
57
|
-
export interface
|
|
53
|
+
export interface BotExtras {
|
|
58
54
|
readonly head: string;
|
|
59
55
|
readonly replies: readonly SuggestedReply[];
|
|
60
56
|
}
|
|
61
57
|
/** The switch: off (undefined), on for everybody (empty set) or on for the people listed (lower-case ids). */
|
|
62
58
|
export declare class DirectChat {
|
|
59
|
+
readonly botName: string;
|
|
63
60
|
private readonly users;
|
|
64
|
-
|
|
61
|
+
/** `botName`: the bot's name in this deployment (`Settings.botName`), for its head and the way back to it. */
|
|
62
|
+
constructor(on: boolean, users?: Iterable<string>, botName?: string);
|
|
65
63
|
/** Whether the chat of this person (or a group binding of theirs: the part before '|') is an agent's window when attached. */
|
|
66
64
|
on(aadId: string): boolean;
|
|
67
65
|
describe(): string;
|
|
68
66
|
/**
|
|
69
|
-
* The head and suggested replies of what
|
|
67
|
+
* The head and suggested replies of what the bot says to this person: attached, `botHead` and "Back to <bot>"; not attached,
|
|
70
68
|
* no head and the way back to the agent it last talked to; nothing when this is off for them.
|
|
71
69
|
*/
|
|
72
|
-
|
|
70
|
+
botExtras(state: AttachedStateReader, aadId: string, lang: string): BotExtras;
|
|
73
71
|
}
|
|
@@ -13,6 +13,8 @@ export interface FeedbackFlowDeps {
|
|
|
13
13
|
readonly reporting: FeedbackReporting;
|
|
14
14
|
readonly service: FeedbackService;
|
|
15
15
|
readonly log: Logger;
|
|
16
|
+
/** The bot's name in this deployment (`Settings.botName`). */
|
|
17
|
+
readonly botName: string;
|
|
16
18
|
}
|
|
17
19
|
export declare class FeedbackFlow {
|
|
18
20
|
private readonly deps;
|
|
@@ -7,12 +7,12 @@
|
|
|
7
7
|
export type Mask = (text: string) => string;
|
|
8
8
|
export declare const FEEDBACK_LABEL = "clawy-feedback";
|
|
9
9
|
export declare const LABEL_COLOR = "d93f0b";
|
|
10
|
-
/** The feedback label's description: who reports, from the chat app `channel` (`SurfaceCaps.shortName`, e.g. "Teams")
|
|
11
|
-
export declare function labelDescription(channel: string): string;
|
|
10
|
+
/** The feedback label's description: who reports, from the chat app `channel` (`SurfaceCaps.shortName`, e.g. "Teams"), through `bot`. */
|
|
11
|
+
export declare function labelDescription(channel: string, bot: string): string;
|
|
12
12
|
export declare const MAX_TEXT_CHARS = 4000;
|
|
13
13
|
/** How the deployment names itself and where its users talk to it. */
|
|
14
14
|
export interface IssueWording {
|
|
15
|
-
/** The bot's display name (
|
|
15
|
+
/** The bot's display name (the deployment's `Settings.botName`). */
|
|
16
16
|
readonly botName: string;
|
|
17
17
|
/** The chat channel ("Teams"). */
|
|
18
18
|
readonly channelName: string;
|
|
@@ -8,4 +8,4 @@ export declare function parseContext(text: string): ContextVerb | undefined;
|
|
|
8
8
|
* `/context on|off|status` in a group, read before the account check: anybody in the chat may turn it off or on (it is
|
|
9
9
|
* the chat's, not one person's), and off drops what was kept at once.
|
|
10
10
|
*/
|
|
11
|
-
export declare function contextInterceptor(context: GroupContext): MessageInterceptor;
|
|
11
|
+
export declare function contextInterceptor(context: GroupContext, bot: string): MessageInterceptor;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -38,6 +38,7 @@ export * as turn from "./turn/index.js";
|
|
|
38
38
|
export { fetchChanges } from "./turn/changes.js";
|
|
39
39
|
export * from "./note/note.js";
|
|
40
40
|
export * from "./branding.js";
|
|
41
|
+
export * from "./legacy-names.js";
|
|
41
42
|
export * from "./claw/message-text.js";
|
|
42
43
|
export * from "./claw/requester-view.js";
|
|
43
44
|
export * from "./claw/service-refusal.js";
|
|
@@ -59,6 +60,8 @@ export * from "./approvals/index.js";
|
|
|
59
60
|
export * from "./assistant/index.js";
|
|
60
61
|
export * from "./assistant/work-items.js";
|
|
61
62
|
export type * from "./assistant/views.js";
|
|
63
|
+
export * from "./skills/index.js";
|
|
64
|
+
export type { SkillCardEvent } from "./assistant/events.js";
|
|
62
65
|
export * from "./direct-chat/index.js";
|
|
63
66
|
export * from "./proactive/index.js";
|
|
64
67
|
export * from "./proactive/views.js";
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Names from before the bot's default name changed (the earlier name collides with third-party products). Every other source
|
|
3
|
+
* file names the bot through the deployment's configured name (`Settings.botName`) or neutral words.
|
|
4
|
+
* - A `LEGACY_` name is read and never written: a suggested reply on a card sent before the rename still takes the chat back.
|
|
5
|
+
* - A `PERSISTED_` name is held outside this process already (a stored field, a label and marker on filed issues, the keys a
|
|
6
|
+
* redelivered message is recognised by, the logger name log queries select on) and keeps its spelling, since renaming it
|
|
7
|
+
* would make what was kept unreadable or unmatched.
|
|
8
|
+
* `test/legacy-names.test.ts` bans the earlier name everywhere in the packages' sources except in declarations of this kind.
|
|
9
|
+
*/
|
|
10
|
+
/** The bot's earlier default display name, as the "back to ..." suggested replies on cards sent before the rename say it. */
|
|
11
|
+
export declare const LEGACY_BOT_NAME = "Clawy";
|
|
12
|
+
/** The field of a kept terminal ask (stored as written) that says its card showed the request whole. */
|
|
13
|
+
export declare const PERSISTED_SHOWN_WHOLE = "clawy_shown_whole";
|
|
14
|
+
/** The label of the GitHub issues feedback is filed as (existing issues carry it). */
|
|
15
|
+
export declare const PERSISTED_FEEDBACK_LABEL = "clawy-feedback";
|
|
16
|
+
/** The hidden marker in a filed feedback issue's body that a report is found again by. */
|
|
17
|
+
export declare const PERSISTED_FEEDBACK_MARKER = "clawy-feedback-id";
|
|
18
|
+
/** The prefix of the idempotency key Claw recognises a redelivered message by (a key from before an upgrade still matches). */
|
|
19
|
+
export declare const PERSISTED_IDEMPOTENCY_PREFIX = "clawy-";
|
|
20
|
+
/** The logger security events are written on: log queries and alerts select them by this name. */
|
|
21
|
+
export declare const PERSISTED_SECURITY_LOGGER = "clawy.security";
|
|
@@ -3,6 +3,8 @@ interface Where {
|
|
|
3
3
|
readonly host: string;
|
|
4
4
|
/** " `<folder>`" or "". */
|
|
5
5
|
readonly cwd: string;
|
|
6
|
+
/** The bot's name in this deployment. */
|
|
7
|
+
readonly bot: string;
|
|
6
8
|
}
|
|
7
9
|
/** Help's first line in a chat attached to an agent's session: where the person's messages go, and how to come back. */
|
|
8
10
|
export declare const helpLeadText: import("./catalog.js").Catalog<{
|
|
@@ -12,5 +12,6 @@ export * from "./assistant-chat.js";
|
|
|
12
12
|
export * from "./assistant-devenv-hide.js";
|
|
13
13
|
export * from "./assistant-work-clicks.js";
|
|
14
14
|
export * from "./assistant.js";
|
|
15
|
+
export * from "./skills.js";
|
|
15
16
|
export * from "./proactive-lines.js";
|
|
16
17
|
export * from "./proactive.js";
|
|
@@ -1,19 +1,24 @@
|
|
|
1
|
-
/**
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
/**
|
|
2
|
+
* The texts of a person's GitHub binding (`/github ...`) and the prompts of the small model that reads a review request.
|
|
3
|
+
* Bilingual where the worker says them in both languages at once. Kept byte for byte as the Python worker writes them.
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* What the model that reads a group's review request is told; `channel`: the chat app's full name (`SurfaceCaps.name`), `bot`:
|
|
7
|
+
* the bot's name in this deployment.
|
|
8
|
+
*/
|
|
9
|
+
export declare const intentPrompt: (channel: string, bot: string) => string;
|
|
10
|
+
/** What the model that reads a 1:1 message about the confirmation setting is told; `channel` and `bot` as `intentPrompt`'s. */
|
|
11
|
+
export declare const modePrompt: (channel: string, bot: string) => string;
|
|
5
12
|
/** Claw answers 404 for the confirmation setting: its API is not deployed yet, and the default applies. */
|
|
6
13
|
export declare const NOT_YET_TEXT = "this setting is not available yet (PrimusClaw does not have it yet), so the default applies: a person confirms high-risk changes / \u8FD9\u4E2A\u8BBE\u7F6E\u8FD8\u6CA1\u4E0A\u7EBF\uFF0C\u6682\u6309\u9ED8\u8BA4\uFF1A\u9AD8\u98CE\u9669\u4EBA\u5DE5\u518D\u786E\u8BA4\u4E00\u6B21";
|
|
7
14
|
/** `/github bind` for a binding made with `public_repo` only, before it asks again (`{login}`). */
|
|
8
15
|
export declare const REAUTHORIZE_LEAD = "\u4F60\u7684 GitHub\uFF08`{login}`\uFF09\u662F\u7528 `public_repo` \u6743\u9650\u8FDE\u63A5\u7684\uFF0C\u8BFB\u4E0D\u5230\u79C1\u6709\u548C\u5185\u90E8\u4ED3\u5E93\u3002\u4E0B\u9762\u91CD\u65B0\u6388\u6743\u4E00\u6B21\uFF08\u7533\u8BF7 `repo`\uFF09\uFF0C\u6279\u51C6\u540E\u66FF\u6362\u539F\u6765\u7684\u6388\u6743\uFF1B\u4F1A\u5199\u5165\u7684\u64CD\u4F5C\u4ECD\u7136\u6BCF\u6B21\u5148\u95EE\u4F60\u3002 / Your GitHub (`{login}`) was connected with `public_repo`, which cannot read private or internal repositories. Approve the code below once more (it asks for `repo`); it replaces the old authorization, and anything that would write still waits for your approval each time.";
|
|
9
16
|
export declare const NARROW_HINT = "public repositories only: send `/github bind` to connect again with `repo` and read private and internal ones too";
|
|
10
|
-
/** What `/github bind` asks the person to agree to (`{code}`, `{minutes}`, `{uri}`). */
|
|
11
|
-
export declare const CONSENT_EN = "To let me review and merge pull requests as you, connect your GitHub account.\n\n1. Open the link below and enter the code `{code}` (it works for {minutes} minutes):\n{uri}\n2. GitHub will show the application as **\"GitHub CLI\"**. That is expected: I use the authorization of GitHub's own command-line client, which AMD-AGI already allows, so no new application has to be approved.\n3. Approve it with the account you want me to use.\n\nWhat you are agreeing to:\n- It asks for one permission, `repo`: read and write access to the repositories you can reach, private and internal ones included, so that I can read those when you ask. GitHub has no narrower permission that reads private repositories. Nothing is written with it without you: reviews and merges are made only of public repositories, and only as described below, and anything else that would write waits for your approval each time.\n- The token is stored encrypted in the Primus identity service. Only Claw's restricted GitHub review tools use it, on the server; it is never put in a sandbox and I never see it.\n- It is used only when someone in a group chat (usually the author of a pull request) asks me, by your name, to review and merge it. Everything I post says it was made by
|
|
12
|
-
export declare const CONSENT_ZH = "\u8981\u8BA9\u6211\u4EE5\u4F60\u7684\u540D\u4E49 review \u548C\u5408\u5165 PR\uFF0C\u8BF7\u5148\u8FDE\u63A5\u4F60\u7684 GitHub \u8D26\u53F7\u3002\n\n1. \u6253\u5F00\u4E0B\u9762\u7684\u94FE\u63A5\uFF0C\u8F93\u5165\u4EE3\u7801 `{code}`\uFF08{minutes} \u5206\u949F\u5185\u6709\u6548\uFF09\uFF1A\n{uri}\n2. GitHub \u7684\u6388\u6743\u9875\u4F1A\u663E\u793A\u5E94\u7528\u540D\u4E3A **\u201CGitHub CLI\u201D**\uFF0C\u8FD9\u662F\u6B63\u5E38\u7684\uFF1A\u6211\u4F7F\u7528\u7684\u662F GitHub \u5B98\u65B9\u547D\u4EE4\u884C\u5BA2\u6237\u7AEF\u7684\u6388\u6743\u65B9\u5F0F\uFF0CAMD-AGI \u5DF2\u5141\u8BB8\u5B83\uFF0C\u4E0D\u9700\u8981\u53E6\u5916\u5BA1\u6279\u65B0\u5E94\u7528\u3002\n3. \u7528\u4F60\u5E0C\u671B\u6211\u4F7F\u7528\u7684\u8D26\u53F7\u6279\u51C6\u3002\n\n\u4F60\u540C\u610F\u7684\u5185\u5BB9\uFF1A\n- \u53EA\u7533\u8BF7\u4E00\u4E2A\u6743\u9650 `repo`\uFF1A\u4F60\u80FD\u8BBF\u95EE\u7684\u4ED3\u5E93\uFF08\u5305\u62EC\u79C1\u6709\u548C\u5185\u90E8\u4ED3\u5E93\uFF09\u7684\u8BFB\u5199\uFF0C\u8FD9\u6837\u4F60\u95EE\u5230\u79C1\u6709\u3001\u5185\u90E8\u4ED3\u5E93\u65F6\u6211\u4E5F\u80FD\u8BFB\uFF1BGitHub \u6CA1\u6709\u66F4\u7A84\u7684\u3001\u80FD\u8BFB\u79C1\u6709\u4ED3\u5E93\u7684\u6743\u9650\u3002\u4E0D\u7ECF\u4F60\u540C\u610F\u4E0D\u4F1A\u7528\u5B83\u5199\u4EFB\u4F55\u4E1C\u897F\uFF1A\u4EE3\u5BA1\u548C\u5408\u5165\u53EA\u9488\u5BF9\u516C\u5F00\u4ED3\u5E93\u3001\u53EA\u6309\u4E0B\u9762\u8BF4\u7684\u65B9\u5F0F\u8FDB\u884C\uFF0C\u5176\u4ED6\u4F1A\u5199\u5165\u7684\u64CD\u4F5C\u6BCF\u6B21\u90FD\u5148\u95EE\u4F60\u3002\n- \u4EE4\u724C\u52A0\u5BC6\u4FDD\u5B58\u5728 Primus \u8EAB\u4EFD\u670D\u52A1\u4E2D\uFF0C\u53EA\u6709 Claw \u53D7\u9650\u7684 GitHub \u8BC4\u5BA1\u5DE5\u5177\u5728\u670D\u52A1\u7AEF\u4F7F\u7528\uFF0C\u4E0D\u4F1A\u653E\u8FDB\u6C99\u7BB1\uFF0C\u6211\u81EA\u5DF1\u4E5F\u770B\u4E0D\u5230\u5B83\u3002\n- \u53EA\u6709\u7FA4\u91CC\u6709\u4EBA\uFF08\u901A\u5E38\u662F PR \u7684\u4F5C\u8005\uFF09\u70B9\u4F60\u7684\u540D\u8981\u6C42 review \u5408\u5165\u65F6\u624D\u4F1A\u4F7F\u7528\uFF1B\u6211\u53D1\u51FA\u7684\u5185\u5BB9\u90FD\u4F1A\u6CE8\u660E\u662F
|
|
17
|
+
/** What `/github bind` asks the person to agree to (`{code}`, `{minutes}`, `{uri}`, `{bot}`: the bot's name in this deployment). */
|
|
18
|
+
export declare const CONSENT_EN = "To let me review and merge pull requests as you, connect your GitHub account.\n\n1. Open the link below and enter the code `{code}` (it works for {minutes} minutes):\n{uri}\n2. GitHub will show the application as **\"GitHub CLI\"**. That is expected: I use the authorization of GitHub's own command-line client, which AMD-AGI already allows, so no new application has to be approved.\n3. Approve it with the account you want me to use.\n\nWhat you are agreeing to:\n- It asks for one permission, `repo`: read and write access to the repositories you can reach, private and internal ones included, so that I can read those when you ask. GitHub has no narrower permission that reads private repositories. Nothing is written with it without you: reviews and merges are made only of public repositories, and only as described below, and anything else that would write waits for your approval each time.\n- The token is stored encrypted in the Primus identity service. Only Claw's restricted GitHub review tools use it, on the server; it is never put in a sandbox and I never see it.\n- It is used only when someone in a group chat (usually the author of a pull request) asks me, by your name, to review and merge it. Everything I post says it was made by {bot} on your behalf. Until you turn on auto-merge (`/github auto-merge on`; it is off) I do nothing with your account, and the colleague who named you is told so. Once it is on, that is your standing permission: I review and, when nothing needs fixing and every check passes, approve and merge as you without asking each time. A change to architecture, interfaces, security, CI or dependencies still waits for your confirmation in this chat.\n- You can end it at any time: `/github unbind` deletes the stored token, and Settings > Applications > Authorized OAuth Apps > GitHub CLI > Revoke on GitHub ends the authorization itself. Revoking GitHub CLI there also signs out the `gh` on your own computer.";
|
|
19
|
+
export declare const CONSENT_ZH = "\u8981\u8BA9\u6211\u4EE5\u4F60\u7684\u540D\u4E49 review \u548C\u5408\u5165 PR\uFF0C\u8BF7\u5148\u8FDE\u63A5\u4F60\u7684 GitHub \u8D26\u53F7\u3002\n\n1. \u6253\u5F00\u4E0B\u9762\u7684\u94FE\u63A5\uFF0C\u8F93\u5165\u4EE3\u7801 `{code}`\uFF08{minutes} \u5206\u949F\u5185\u6709\u6548\uFF09\uFF1A\n{uri}\n2. GitHub \u7684\u6388\u6743\u9875\u4F1A\u663E\u793A\u5E94\u7528\u540D\u4E3A **\u201CGitHub CLI\u201D**\uFF0C\u8FD9\u662F\u6B63\u5E38\u7684\uFF1A\u6211\u4F7F\u7528\u7684\u662F GitHub \u5B98\u65B9\u547D\u4EE4\u884C\u5BA2\u6237\u7AEF\u7684\u6388\u6743\u65B9\u5F0F\uFF0CAMD-AGI \u5DF2\u5141\u8BB8\u5B83\uFF0C\u4E0D\u9700\u8981\u53E6\u5916\u5BA1\u6279\u65B0\u5E94\u7528\u3002\n3. \u7528\u4F60\u5E0C\u671B\u6211\u4F7F\u7528\u7684\u8D26\u53F7\u6279\u51C6\u3002\n\n\u4F60\u540C\u610F\u7684\u5185\u5BB9\uFF1A\n- \u53EA\u7533\u8BF7\u4E00\u4E2A\u6743\u9650 `repo`\uFF1A\u4F60\u80FD\u8BBF\u95EE\u7684\u4ED3\u5E93\uFF08\u5305\u62EC\u79C1\u6709\u548C\u5185\u90E8\u4ED3\u5E93\uFF09\u7684\u8BFB\u5199\uFF0C\u8FD9\u6837\u4F60\u95EE\u5230\u79C1\u6709\u3001\u5185\u90E8\u4ED3\u5E93\u65F6\u6211\u4E5F\u80FD\u8BFB\uFF1BGitHub \u6CA1\u6709\u66F4\u7A84\u7684\u3001\u80FD\u8BFB\u79C1\u6709\u4ED3\u5E93\u7684\u6743\u9650\u3002\u4E0D\u7ECF\u4F60\u540C\u610F\u4E0D\u4F1A\u7528\u5B83\u5199\u4EFB\u4F55\u4E1C\u897F\uFF1A\u4EE3\u5BA1\u548C\u5408\u5165\u53EA\u9488\u5BF9\u516C\u5F00\u4ED3\u5E93\u3001\u53EA\u6309\u4E0B\u9762\u8BF4\u7684\u65B9\u5F0F\u8FDB\u884C\uFF0C\u5176\u4ED6\u4F1A\u5199\u5165\u7684\u64CD\u4F5C\u6BCF\u6B21\u90FD\u5148\u95EE\u4F60\u3002\n- \u4EE4\u724C\u52A0\u5BC6\u4FDD\u5B58\u5728 Primus \u8EAB\u4EFD\u670D\u52A1\u4E2D\uFF0C\u53EA\u6709 Claw \u53D7\u9650\u7684 GitHub \u8BC4\u5BA1\u5DE5\u5177\u5728\u670D\u52A1\u7AEF\u4F7F\u7528\uFF0C\u4E0D\u4F1A\u653E\u8FDB\u6C99\u7BB1\uFF0C\u6211\u81EA\u5DF1\u4E5F\u770B\u4E0D\u5230\u5B83\u3002\n- \u53EA\u6709\u7FA4\u91CC\u6709\u4EBA\uFF08\u901A\u5E38\u662F PR \u7684\u4F5C\u8005\uFF09\u70B9\u4F60\u7684\u540D\u8981\u6C42 review \u5408\u5165\u65F6\u624D\u4F1A\u4F7F\u7528\uFF1B\u6211\u53D1\u51FA\u7684\u5185\u5BB9\u90FD\u4F1A\u6CE8\u660E\u662F {bot} \u4EE3\u4F60\u6240\u53D1\u3002\u5728\u4F60\u5F00\u542F\u81EA\u52A8\u5408\u5165\u4E4B\u524D\uFF08`/github auto-merge on`\uFF0C\u9ED8\u8BA4\u5173\u95ED\uFF09\uFF0C\u6211\u4E0D\u4F1A\u52A8\u7528\u4F60\u7684\u8D26\u53F7\u505A\u4EFB\u4F55\u4E8B\uFF0C\u53EA\u4F1A\u544A\u8BC9\u70B9\u4F60\u540D\u7684\u540C\u4E8B\u4F60\u6CA1\u6709\u5F00\u542F\u3002\u5F00\u542F\u540E\u5C31\u662F\u4F60\u7684\u957F\u671F\u6388\u6743\uFF1A\u6211\u4F1A\u4EE5\u4F60\u7684\u8EAB\u4EFD review\uFF0C\u6CA1\u6709\u95EE\u9898\u4E14\u68C0\u67E5\u5168\u90E8\u901A\u8FC7\u65F6\u76F4\u63A5\u6279\u51C6\u5E76\u5408\u5165\uFF0C\u4E0D\u4F1A\u6BCF\u6B21\u90FD\u95EE\u4F60\uFF1B\u6D89\u53CA\u67B6\u6784\u3001\u63A5\u53E3\u3001\u5B89\u5168\u3001CI\u3001\u4F9D\u8D56\u7684\u53D8\u66F4\u4ECD\u7136\u5148\u5728\u8FD9\u91CC\u8BF7\u4F60\u786E\u8BA4\u3002\n- \u968F\u65F6\u53EF\u4EE5\u7ED3\u675F\uFF1A`/github unbind` \u4F1A\u5220\u9664\u4FDD\u5B58\u7684\u4EE4\u724C\uFF1B\u5728 GitHub \u7684 Settings > Applications > Authorized OAuth Apps > GitHub CLI \u91CC Revoke \u624D\u4F1A\u7ED3\u675F\u6388\u6743\u672C\u8EAB\u3002\u6CE8\u610F\u5728\u90A3\u91CC\u64A4\u9500 GitHub CLI\uFF0C\u4E5F\u4F1A\u8BA9\u4F60\u81EA\u5DF1\u7535\u8111\u4E0A\u7684 `gh` \u9000\u51FA\u767B\u5F55\u3002";
|
|
13
20
|
/** Where Claw also reads GitHub with the binding, these sentences of the consent replace the ones that say reviews only. */
|
|
14
21
|
export declare const CONSENT_READS: readonly (readonly [string, string])[];
|
|
15
|
-
export declare const HELP_LINES = "\n- \"\u8BF7 XX \u5E2E\u6211 review \u5408\u5165 <PR> [<PR> ...]\" here or in a group (\u79C1\u804A\u6216\u7FA4\u91CC\u90FD\u53EF\u4EE5) has XX review and merge them as XX; naming nobody here means your own account; after I review or merge as you, I tell you in this chat\n- `/github bind` connects your GitHub account, and `/github auto-merge on` lets a colleague (usually a pull request's author) ask me, by your name, to review and merge a pull request as you; `/github mode` (or saying \"\u6539\u6210\u5168\u81EA\u52A8\") chooses whether a person confirms high-risk changes (the default) or merges go fully automatic, for every review with your account; `/github status`, `/github unbind` and `/github auto-merge on|off` manage it";
|
|
16
|
-
export declare const GROUP_HELP_LINES = "\n\nHave a committer review and merge your pull request, here or in a 1:1 chat with me (\u7FA4\u91CC\u6216\u79C1\u804A\u90FD\u53EF\u4EE5): `@Clawy \u8BF7 XX \u5E2E\u6211 review \u5408\u5165 <PR link or owner/repo#N>` (a public AMD-AGI pull request). XX has to be named, and I act only with XX's own connected GitHub account, never yours or anyone else's. XX authorizes me once (`/github bind` and `/github auto-merge on`, in a 1:1 chat); without that I do nothing with XX's account and say so. A change to architecture, interfaces, security, CI or dependencies waits for XX's own confirmation. `/github` itself works only in a 1:1 chat.";
|
|
17
22
|
export declare const USAGE = "`/github bind` connects your GitHub account, `/github unbind` removes it, `/github status` shows it, `/github auto-merge on|off` is your standing permission for colleagues to ask me (by your name) to review and merge for you, or not, and `/github mode` chooses how reviews and merges with your account are confirmed: a person confirms high-risk changes (the default), or fully automatic.";
|
|
18
23
|
/**
|
|
19
24
|
* Why a reviewer cannot be reached by what waits for them, and what they can do about it: said to the asker. `channel`:
|
|
@@ -1,7 +1,12 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* What a group is told about a request to review and merge before anything starts. The worker says these in Chinese
|
|
3
|
+
* whatever the request's language (the request form itself is Chinese: "请 XX 帮我 review 合入 <PR>").
|
|
4
|
+
*/
|
|
5
|
+
/** The example of a request, addressed to the bot by its name in this deployment (`bot`). */
|
|
6
|
+
export declare const howToAsk: (bot: string) => string;
|
|
2
7
|
export declare const reviewRequestText: {
|
|
3
8
|
/** The whole reply to a request that names nobody. */
|
|
4
|
-
readonly askWho:
|
|
9
|
+
readonly askWho: (bot: string) => string;
|
|
5
10
|
readonly onePersonPerMessage: (p: {
|
|
6
11
|
names: string;
|
|
7
12
|
}) => string;
|
|
@@ -13,9 +18,10 @@ export declare const reviewRequestText: {
|
|
|
13
18
|
}) => string;
|
|
14
19
|
readonly nameNotInMessage: (p: {
|
|
15
20
|
name: string;
|
|
21
|
+
bot: string;
|
|
16
22
|
}) => string;
|
|
17
|
-
readonly unsureWho:
|
|
18
|
-
readonly unsureWhoFullName:
|
|
19
|
-
readonly noPullRecognised:
|
|
23
|
+
readonly unsureWho: (bot: string) => string;
|
|
24
|
+
readonly unsureWhoFullName: (bot: string) => string;
|
|
25
|
+
readonly noPullRecognised: (bot: string) => string;
|
|
20
26
|
readonly unsureModel: "我不确定你要用哪个模型,请写成 model: <模型名>,或不指定模型。";
|
|
21
27
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export declare const reviewStartText: {
|
|
2
|
-
readonly attachPulls: (unread: string) => string;
|
|
2
|
+
readonly attachPulls: (unread: string, bot: string) => string;
|
|
3
3
|
readonly tooMany: (max: number, atOnce: number, count: number) => string;
|
|
4
4
|
readonly oneModel: (models: string) => string;
|
|
5
5
|
readonly ownersOnly: (owners: string) => string;
|
|
@@ -10,16 +10,16 @@ export declare const reviewStartText: {
|
|
|
10
10
|
readonly identityOnly: (who: string) => string;
|
|
11
11
|
readonly connectLead: "To review and merge pull requests I need to know which Primus account you are. / 代审需要先确认你的 Primus 账号。 ";
|
|
12
12
|
readonly platformDown: "我暂时联系不上 Primus 平台,没能确认你的身份,所以没有开始 review。请稍后再 @ 我一次。";
|
|
13
|
-
readonly unsureWho:
|
|
14
|
-
readonly unsureWhoFull:
|
|
13
|
+
readonly unsureWho: (bot: string) => string;
|
|
14
|
+
readonly unsureWhoFull: (bot: string) => string;
|
|
15
15
|
readonly githubUnknown: (who: string) => string;
|
|
16
16
|
readonly notAuthorized: (who: string, merge: boolean) => string;
|
|
17
|
-
readonly reviewerNotLinked: (who: string) => string;
|
|
18
|
-
readonly reviewerNotConnected: (who: string) => string;
|
|
17
|
+
readonly reviewerNotLinked: (who: string, bot: string) => string;
|
|
18
|
+
readonly reviewerNotConnected: (who: string, bot: string) => string;
|
|
19
19
|
readonly reviewerPlatformDown: (who: string) => string;
|
|
20
20
|
readonly modelsUnknown: (whose: string, model: string) => string;
|
|
21
21
|
readonly modelUnusable: (whose: string, model: string, listed: string, any: boolean) => string;
|
|
22
|
-
readonly ownPull: (pull: string, who: string) => string;
|
|
22
|
+
readonly ownPull: (pull: string, who: string, bot: string) => string;
|
|
23
23
|
readonly ownPullShort: (who: string) => string;
|
|
24
24
|
readonly limited: (pull: string, zh: string, en: string) => string;
|
|
25
25
|
readonly limitedShort: "你发起 review 的次数达到了每人的上限,请稍后再试";
|