@primusclaw/personal-agent 0.15.1 → 0.15.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/dist/index.js +807 -807
- package/dist/types/locales/connector-reasons.d.ts +4 -0
- package/dist/types/remote/connector/reasons.d.ts +6 -1
- package/dist/types/review/progress.d.ts +11 -6
- package/dist/types/review/service/follow.d.ts +6 -0
- package/dist/types/review/service/notices.d.ts +0 -3
- package/package.json +1 -1
|
@@ -87,6 +87,10 @@ export declare const connectorReasonHints: import("./catalog.js").Catalog<{
|
|
|
87
87
|
status: string;
|
|
88
88
|
newSession: string;
|
|
89
89
|
retry: string;
|
|
90
|
+
/** A length of time in the sentences that name one (`{wait}`): the connector's own whole seconds. */
|
|
91
|
+
seconds: (p: {
|
|
92
|
+
n: number;
|
|
93
|
+
}) => string;
|
|
90
94
|
unknown: (p: {
|
|
91
95
|
code: string;
|
|
92
96
|
}) => string;
|
|
@@ -4,6 +4,11 @@ import { Setup } from "./setup.js";
|
|
|
4
4
|
export type Pair = readonly [zh: string, en: string];
|
|
5
5
|
/** The release whose Claude agent runs as root with `approval = "never"`; an older connector there refuses every new session. */
|
|
6
6
|
export declare const FIXED_IN: readonly [number, number, number];
|
|
7
|
+
/**
|
|
8
|
+
* `reason` with the connector's figure (`wait_s`, whole seconds) after it when it is a code that says one and the figure is good;
|
|
9
|
+
* `reason` as it is otherwise.
|
|
10
|
+
*/
|
|
11
|
+
export declare function reasonWithWait(reason: string, wait: unknown): string;
|
|
7
12
|
/** The one upgrade command: it installs the new version and restarts the connector on it, under whichever supervisor it has. */
|
|
8
13
|
export declare const UPGRADE: Pair;
|
|
9
14
|
export declare const SANDBOX: Pair;
|
|
@@ -25,7 +30,7 @@ export declare function isCode(reason: string): boolean;
|
|
|
25
30
|
* [Chinese, English] for one reason code: what happened and what to do. An unknown code gets a generic pair that names it.
|
|
26
31
|
* `setup`: the commands of the address this worker reaches Claw at (the login a revoked connector is given).
|
|
27
32
|
*/
|
|
28
|
-
export declare function explain(
|
|
33
|
+
export declare function explain(reason: string, version?: unknown, setup?: Setup): Pair;
|
|
29
34
|
/** A reason as given: trimmed, without the full stops at its end. */
|
|
30
35
|
export declare function bareReason(reason: string | null | undefined): string;
|
|
31
36
|
/**
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* How the asker of a review someone else runs hears of it: only its asker view (state, link, conclusion, merged, what a
|
|
3
|
-
* waiting one waits for, what it found), as one line for one review, or one message for a request's several.
|
|
4
|
-
*
|
|
3
|
+
* waiting one waits for, what it found), as one line for one review, or one message for a request's several. `viewStage` is
|
|
4
|
+
* the key that changes exactly when the view changes, and `isNewsStage` says which of those changes the asker is told at once.
|
|
5
|
+
* What the reviewer hears of the reviews asked of them is not here: Claw sums it up (`review-digest.ts`, the reviewer's one
|
|
6
|
+
* message every `/approvals summary` minutes), and what waits for them has its own notice (`Notices.tellReviewerWaiting`).
|
|
5
7
|
*/
|
|
6
8
|
import type { AskerView, PullRef } from "../claw/model.js";
|
|
7
9
|
import { type ReviewTurn } from "./review-turn.js";
|
|
@@ -29,14 +31,19 @@ export declare function requesterResultText(review: ReviewTurn, view: AskerView)
|
|
|
29
31
|
export declare function itemEndText(view: AskerView): string;
|
|
30
32
|
/** How a review of one's own ended, as its card shows it: from what its turn left on GitHub. */
|
|
31
33
|
export declare function ownItemEndText(review: ReviewTurn): string;
|
|
32
|
-
/** What the reviewer hears when a review asked of them ends. */
|
|
33
|
-
export declare function reviewerResultText(review: ReviewTurn, view: AskerView): string;
|
|
34
34
|
/** What the asker has been told of a review, as a key that changes exactly when there is news ('' nothing yet). */
|
|
35
35
|
export declare function viewStage(view: AskerView): string;
|
|
36
36
|
/** `viewStage` for one followed review, with one more piece of news: a review that waited for a slot has 'started'. */
|
|
37
37
|
export declare function entryStage(entry: Followed, view: AskerView): string;
|
|
38
38
|
/** The conclusion a `viewStage` key holds ('' none). */
|
|
39
39
|
export declare function stageVerdict(stage: string): string;
|
|
40
|
+
/**
|
|
41
|
+
* Whether a change of the view is news to the asker, told at once: an end, a failure, a wait for the reviewer, and a conclusion that
|
|
42
|
+
* needs the author's hands (changes requested, a comment). Not news: that the review waits for a slot, that it started, and an approval
|
|
43
|
+
* that is not merged yet, which the end's line carries within minutes; a review may wait a day for CI, and the conclusions that ask
|
|
44
|
+
* something of the author are told as they come.
|
|
45
|
+
*/
|
|
46
|
+
export declare function isNewsStage(stage: string): boolean;
|
|
40
47
|
/** How a review someone else runs stands, as its asker is told. `started`: it waited for a slot, and has just started. */
|
|
41
48
|
export declare function progressWords(review: ReviewTurn, view: AskerView, started?: boolean): string;
|
|
42
49
|
/**
|
|
@@ -46,5 +53,3 @@ export declare function progressWords(review: ReviewTurn, view: AskerView, start
|
|
|
46
53
|
export declare function progressText(entries: readonly Followed[], told: readonly (readonly [Followed, AskerView])[]): string;
|
|
47
54
|
/** The asker's last line when the reviews they follow are still open at the deadline. */
|
|
48
55
|
export declare function unfinishedText(left: readonly Followed[]): string;
|
|
49
|
-
/** What the reviewer hears when reviews asked of them end. */
|
|
50
|
-
export declare function reviewerEndedText(ended: readonly (readonly [Followed, AskerView])[]): string;
|
|
@@ -46,6 +46,12 @@ export declare class AskerFollow {
|
|
|
46
46
|
private endStopped;
|
|
47
47
|
/** What one view is: news to hold, back to what was said, a start, or an end. */
|
|
48
48
|
private note;
|
|
49
|
+
/**
|
|
50
|
+
* What the view's stage is to the asker: news to hold for the next message, a change they are not told (an approval not merged yet, that
|
|
51
|
+
* the review started) or back to what was said. A change not told is kept as what was seen, so that a later message counts the review
|
|
52
|
+
* right, and it lets go of news held from before it. Returns the stage.
|
|
53
|
+
*/
|
|
54
|
+
private holdNews;
|
|
49
55
|
/** Says the held news in one message; what is said is recorded first, and put back when the message did not go. */
|
|
50
56
|
private flush;
|
|
51
57
|
/** A line for the asker where they asked: in a group it @mentions them (and only them). */
|
|
@@ -23,9 +23,6 @@ export declare class Notices {
|
|
|
23
23
|
personalChatOf(person: Actor, via: ConversationRef): Promise<Conversation | undefined>;
|
|
24
24
|
/** The reviewer's own 1:1 chat. */
|
|
25
25
|
reviewerChat(review: ReviewTurn): Promise<Conversation | undefined>;
|
|
26
|
-
tellReviewer(review: ReviewTurn, text: string): Promise<void>;
|
|
27
|
-
/** The reviewer hears, in their own chat, that someone asked a review of them and that it is an item on their board. */
|
|
28
|
-
tellReviewerStarted(review: ReviewTurn): Promise<void>;
|
|
29
26
|
/** The reviewer's item as Claw shows it to them, read with their own key; undefined when it cannot be. */
|
|
30
27
|
private reviewersItem;
|
|
31
28
|
/** The reviewer's item waits for them: what it asks and how to answer, with the item's card when it can be read as them. */
|