@primusclaw/personal-agent 0.8.0 → 0.8.1
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 +9 -5
- package/dist/types/assistant/chat.d.ts +1 -1
- package/dist/types/config/settings.d.ts +25 -25
- package/dist/types/direct-chat/direct-chat.d.ts +1 -1
- package/dist/types/group-context/buffer.d.ts +1 -1
- package/dist/types/guardrails/operations.d.ts +20 -4
- package/dist/types/limits/user-limits.d.ts +3 -3
- package/dist/types/locales/transparency.d.ts +1 -1
- package/dist/types/observe/observer.d.ts +1 -1
- package/dist/types/ports/secret-source.d.ts +3 -2
- package/dist/types/ports/store/policy.d.ts +3 -3
- package/dist/types/remote/context.d.ts +1 -1
- package/dist/types/remote/follow/control.d.ts +1 -1
- package/dist/types/remote/state.d.ts +1 -1
- package/dist/types/routing/credentials.d.ts +1 -1
- package/dist/types/routing/deps.d.ts +1 -1
- package/dist/types/subscriptions/subscriptions.d.ts +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2328,6 +2328,7 @@ var DEFAULT_LIMITS = {
|
|
|
2328
2328
|
remote_agent: { count: 10, windowSeconds: 3600 }
|
|
2329
2329
|
};
|
|
2330
2330
|
var ENV_PREFIX = "TEAMS_LIMIT_";
|
|
2331
|
+
var LIMIT_ENV_PREFIX = "PA_LIMIT_";
|
|
2331
2332
|
var DIGITS = /^\d+$/;
|
|
2332
2333
|
function parseOne(name, raw, fallback) {
|
|
2333
2334
|
const [number = "", seconds, ...rest] = raw.split("/");
|
|
@@ -2340,15 +2341,17 @@ function parseOne(name, raw, fallback) {
|
|
|
2340
2341
|
`${name} must be COUNT/SECONDS with both positive (for example ${String(fallback.count)}/${String(fallback.windowSeconds)}), or 0 for no limit, not '${raw}'`
|
|
2341
2342
|
);
|
|
2342
2343
|
}
|
|
2343
|
-
function parseLimits(env) {
|
|
2344
|
+
function parseLimits(env, options = {}) {
|
|
2345
|
+
const prefix = options.prefix ?? ENV_PREFIX;
|
|
2346
|
+
const source = options.source ?? ((name) => name);
|
|
2344
2347
|
const limits = /* @__PURE__ */ new Map();
|
|
2345
2348
|
for (const operation of SENSITIVE_OPERATION_NAMES) {
|
|
2346
2349
|
const fallback = DEFAULT_LIMITS[operation];
|
|
2347
|
-
const name =
|
|
2350
|
+
const name = prefix + operation.toUpperCase();
|
|
2348
2351
|
const raw = pyStrip(env(name));
|
|
2349
2352
|
if (!raw) limits.set(operation, fallback);
|
|
2350
2353
|
else if (raw === "0") limits.set(operation, { count: 0, windowSeconds: fallback.windowSeconds });
|
|
2351
|
-
else limits.set(operation, parseOne(name, raw, fallback));
|
|
2354
|
+
else limits.set(operation, parseOne(source(name), raw, fallback));
|
|
2352
2355
|
}
|
|
2353
2356
|
return limits;
|
|
2354
2357
|
}
|
|
@@ -28957,7 +28960,7 @@ var ChatState = class {
|
|
|
28957
28960
|
return "en";
|
|
28958
28961
|
}
|
|
28959
28962
|
}
|
|
28960
|
-
/**
|
|
28963
|
+
/** PA_DIRECT_CHAT is on for this 1:1 chat's person (a group binding keeps its session card). */
|
|
28961
28964
|
directOn(chatKey) {
|
|
28962
28965
|
return !isGroupKey(chatKey) && this.ctx.directChat.on(chatKey);
|
|
28963
28966
|
}
|
|
@@ -31736,7 +31739,7 @@ var FollowControl = class {
|
|
|
31736
31739
|
for (const chatKey of [...this.state.chats.followers.keys()]) this.drop(chatKey);
|
|
31737
31740
|
}
|
|
31738
31741
|
/**
|
|
31739
|
-
*
|
|
31742
|
+
* PA_DIRECT_CHAT is on for this person: an attachment that still has the session card as its window is moved to the chat,
|
|
31740
31743
|
* here and in the store, so nothing reads it as a card any more (the card itself is left where it is).
|
|
31741
31744
|
*/
|
|
31742
31745
|
chatIsWindow(chatKey) {
|
|
@@ -33521,6 +33524,7 @@ export {
|
|
|
33521
33524
|
LABEL_MAX,
|
|
33522
33525
|
LANGS,
|
|
33523
33526
|
LAST_TURNS,
|
|
33527
|
+
LIMIT_ENV_PREFIX,
|
|
33524
33528
|
LIMIT_REASONS,
|
|
33525
33529
|
LINK_CODE_TTL_SECONDS,
|
|
33526
33530
|
LOG_LINES,
|
|
@@ -48,7 +48,7 @@ export interface AssistantChatOptions {
|
|
|
48
48
|
readonly enabled: boolean;
|
|
49
49
|
/** ASSISTANT_USERS, lower case (empty: everybody the switch is on for). */
|
|
50
50
|
readonly users: ReadonlySet<string>;
|
|
51
|
-
/**
|
|
51
|
+
/** PA_ASSISTANT_UNDERSTANDING_USERS, lower case (empty: nobody). */
|
|
52
52
|
readonly understanding: ReadonlySet<string>;
|
|
53
53
|
/** CLAW_PLUGIN_ID: named on each message; undefined for none. */
|
|
54
54
|
readonly pluginId: number | undefined;
|
|
@@ -7,9 +7,9 @@ import type { LinkLimits } from "../ports/store/link.js";
|
|
|
7
7
|
* mode, bot token, Service Bus, reply style). Nothing here has a built-in address: a deployment says its own.
|
|
8
8
|
*/
|
|
9
9
|
export interface Settings {
|
|
10
|
-
/**
|
|
10
|
+
/** PA_DB_PATH (default /data/state.db). */
|
|
11
11
|
readonly dbPath: string;
|
|
12
|
-
/**
|
|
12
|
+
/** PA_ENCRYPTION_KEYS, comma separated Fernet keys: the first encrypts, all decrypt. */
|
|
13
13
|
readonly encryptionKeys: readonly string[];
|
|
14
14
|
/** CLAW_API_URL, without a trailing slash. */
|
|
15
15
|
readonly clawApiUrl: string;
|
|
@@ -26,25 +26,25 @@ export interface Settings {
|
|
|
26
26
|
readonly models: ModelSettings;
|
|
27
27
|
readonly githubReview: GithubReviewSettings;
|
|
28
28
|
readonly assistant: AssistantSettings;
|
|
29
|
-
/**
|
|
29
|
+
/** PA_CLAW_EVENTS_GONE: an event for a person with no chat is answered 410 Gone instead of 200 `dropped`. */
|
|
30
30
|
readonly clawEventsGone: boolean;
|
|
31
|
-
/**
|
|
31
|
+
/** PA_DIRECT_CHAT and PA_DIRECT_CHAT_USERS (lower-cased; empty with `on` is everybody). */
|
|
32
32
|
readonly directChat: {
|
|
33
33
|
readonly enabled: boolean;
|
|
34
34
|
readonly users: ReadonlySet<string>;
|
|
35
35
|
};
|
|
36
|
-
/**
|
|
36
|
+
/** PA_ON_BEHALF_USERS: Claw user ids (as written) whose own key may post into their own chat. */
|
|
37
37
|
readonly onBehalfUsers: ReadonlySet<string>;
|
|
38
|
-
/**
|
|
38
|
+
/** PA_OBSERVE_USERS (lower-cased): who may turn on observing a group chat. */
|
|
39
39
|
readonly observeUsers: ReadonlySet<string>;
|
|
40
40
|
/**
|
|
41
|
-
*
|
|
41
|
+
* PA_GROUP_CONTEXT_MESSAGES (30; 0 off), PA_GROUP_CONTEXT_HOURS (4), PA_GROUP_CONTEXT_CHARS (500), PA_GROUP_CONTEXT_GRANTED (off): the recent
|
|
42
42
|
* messages of a group chat kept in memory as background for an @mention.
|
|
43
43
|
*/
|
|
44
44
|
readonly groupContext: GroupContextSettings;
|
|
45
|
-
/**
|
|
45
|
+
/** PA_LIMIT_<OPERATION>: the per-person limits of operations that act with someone's authority. */
|
|
46
46
|
readonly sensitiveLimits: ReadonlyMap<string, Limit>;
|
|
47
|
-
/**
|
|
47
|
+
/** PA_LINK_MAX_FAILURES_PER_USER (5) / PA_LINK_MAX_FAILURES_GLOBAL (100) / PA_LINK_ATTEMPT_WINDOW_SECONDS (600). */
|
|
48
48
|
readonly linkLimits: LinkLimits;
|
|
49
49
|
readonly userLimits: UserLimits;
|
|
50
50
|
/** SECRETS_SOURCE (env | keyvault). */
|
|
@@ -61,23 +61,23 @@ export interface ClawSettings {
|
|
|
61
61
|
}
|
|
62
62
|
/** Token exchange with the identity service (RFC 8693). */
|
|
63
63
|
export interface ExchangeSettings {
|
|
64
|
-
/**
|
|
64
|
+
/** PA_EXCHANGE_ENABLED. */
|
|
65
65
|
readonly enabled: boolean;
|
|
66
|
-
/**
|
|
66
|
+
/** PA_EXCHANGE_TOKEN_URL (default PUBLIC_BASE_URL/oauth/token); "" when off. */
|
|
67
67
|
readonly tokenUrl: string;
|
|
68
|
-
/**
|
|
68
|
+
/** PA_EXCHANGE_CLIENT_ID, required when on. */
|
|
69
69
|
readonly clientId: string;
|
|
70
|
-
/** The secret
|
|
70
|
+
/** The secret PA_EXCHANGE_CLIENT_SECRET, required when on. */
|
|
71
71
|
readonly clientSecret: string;
|
|
72
|
-
/**
|
|
72
|
+
/** PA_EXCHANGE_ISSUER (default teams.microsoft.com). */
|
|
73
73
|
readonly issuer: string;
|
|
74
|
-
/**
|
|
74
|
+
/** PA_EXCHANGE_AUDIENCE (default claw-api). */
|
|
75
75
|
readonly audience: string;
|
|
76
|
-
/**
|
|
76
|
+
/** PA_EXCHANGE_SCOPE (default claw.api). */
|
|
77
77
|
readonly scope: string;
|
|
78
|
-
/**
|
|
78
|
+
/** PA_EXCHANGE_BINDING_REQUEST_URL (default PUBLIC_BASE_URL/oauth/binding-requests); "" when off. */
|
|
79
79
|
readonly bindingRequestUrl: string;
|
|
80
|
-
/**
|
|
80
|
+
/** PA_EXCHANGE_FOR_CHAT: ordinary chats use a bound person's exchanged token instead of their linked key. */
|
|
81
81
|
readonly forChat: boolean;
|
|
82
82
|
}
|
|
83
83
|
/** The models sessions ask for ("" sends none: Claw's default applies). */
|
|
@@ -91,15 +91,15 @@ export interface ModelSettings {
|
|
|
91
91
|
}
|
|
92
92
|
/** Reviewing and merging a pull request for a colleague. */
|
|
93
93
|
export interface GithubReviewSettings {
|
|
94
|
-
/**
|
|
94
|
+
/** PA_GITHUB_REVIEW_ENABLED (needs the exchange). */
|
|
95
95
|
readonly enabled: boolean;
|
|
96
|
-
/**
|
|
96
|
+
/** PA_GITHUB_REVIEW_OWNERS: the GitHub owners whose pull requests are taken; required when on. */
|
|
97
97
|
readonly owners: readonly string[];
|
|
98
|
-
/**
|
|
98
|
+
/** PA_REVIEW_INTENT_MODEL (else CLAWY_MODEL) when on; "" requests are read by the rules alone. */
|
|
99
99
|
readonly intentModel: string;
|
|
100
|
-
/**
|
|
100
|
+
/** PA_GITHUB_CREDENTIAL_URL (default PUBLIC_BASE_URL/oauth/external-credentials) when on. */
|
|
101
101
|
readonly credentialUrl: string;
|
|
102
|
-
/**
|
|
102
|
+
/** PA_GITHUB_CLIENT_ID: the OAuth client of the device flow (default: the GitHub CLI's public client). */
|
|
103
103
|
readonly clientId: string;
|
|
104
104
|
}
|
|
105
105
|
/** A person's assistant in Claw. */
|
|
@@ -110,7 +110,7 @@ export interface AssistantSettings {
|
|
|
110
110
|
readonly users: ReadonlySet<string>;
|
|
111
111
|
/** ASSISTANT_REPLY_WINDOW_SECONDS (default 1800). */
|
|
112
112
|
readonly replyWindowSeconds: number;
|
|
113
|
-
/**
|
|
113
|
+
/** PA_ASSISTANT_UNDERSTANDING(_USERS): whose every message the assistant understands first (empty: nobody). */
|
|
114
114
|
readonly understandingUsers: ReadonlySet<string>;
|
|
115
115
|
}
|
|
116
116
|
/** How many in a window; `count` 0: no limit. */
|
|
@@ -118,7 +118,7 @@ export interface Limit {
|
|
|
118
118
|
readonly count: number;
|
|
119
119
|
readonly windowSeconds: number;
|
|
120
120
|
}
|
|
121
|
-
/**
|
|
121
|
+
/** PA_USER_MESSAGE_LIMIT per PA_USER_MESSAGE_WINDOW_SECONDS, PA_USER_MAX_CONCURRENT_TASKS. */
|
|
122
122
|
export interface UserLimits {
|
|
123
123
|
readonly messageLimit: number;
|
|
124
124
|
readonly messageWindowSeconds: number;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* The chat itself as the window of an agent session on the person's machine (
|
|
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
3
|
*
|
|
4
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
5
|
* its first line who speaks (`agentHead`, `CLAWY_HEAD`), a line of the agent's that looks like a head is escaped (`guardHeads`),
|
|
@@ -15,7 +15,7 @@ import type { Clock } from "../ports/clock.js";
|
|
|
15
15
|
import type { Logger } from "../ports/logger.js";
|
|
16
16
|
import type { GroupContextRepository } from "../ports/store/group-context.js";
|
|
17
17
|
import type { InboundMessage } from "../ports/surface.js";
|
|
18
|
-
/** How much a group's context keeps (the deployment's
|
|
18
|
+
/** How much a group's context keeps (the deployment's PA_GROUP_CONTEXT_* settings). */
|
|
19
19
|
export interface GroupContextSettings {
|
|
20
20
|
/** The most messages kept per chat; 0 turns the feature off (nothing is kept). */
|
|
21
21
|
readonly messages: number;
|
|
@@ -13,10 +13,26 @@ export type SensitiveOperation = keyof typeof SENSITIVE_OPERATIONS;
|
|
|
13
13
|
export declare const SENSITIVE_OPERATION_NAMES: SensitiveOperation[];
|
|
14
14
|
/** The defaults, per person: a busy coding agent asks for many approvals, a person merges a few pull requests an hour. */
|
|
15
15
|
export declare const DEFAULT_LIMITS: Readonly<Record<SensitiveOperation, Limit>>;
|
|
16
|
-
/**
|
|
16
|
+
/**
|
|
17
|
+
* TEAMS_LIMIT_PR_MERGE=20/3600; 0 turns that limit off. The prefix `parseLimits` reads when it is not given one.
|
|
18
|
+
*
|
|
19
|
+
* @deprecated The worker reads `LIMIT_ENV_PREFIX` (`PA_LIMIT_`), and `TEAMS_LIMIT_` only as its older alias; pass
|
|
20
|
+
* `{ prefix: LIMIT_ENV_PREFIX }` to `parseLimits`. Kept, with its value, for callers of 0.8.0 and earlier.
|
|
21
|
+
*/
|
|
17
22
|
export declare const ENV_PREFIX = "TEAMS_LIMIT_";
|
|
23
|
+
/** PA_LIMIT_PR_MERGE=20/3600; 0 turns that limit off. The worker's own prefix for the limits. */
|
|
24
|
+
export declare const LIMIT_ENV_PREFIX = "PA_LIMIT_";
|
|
25
|
+
/** How `parseLimits` names the variables it asks for, and the one a malformed value is reported under. */
|
|
26
|
+
export interface ParseLimitsOptions {
|
|
27
|
+
/** The prefix of each limit's name (default: `ENV_PREFIX`, `TEAMS_LIMIT_`, as before this option existed). */
|
|
28
|
+
readonly prefix?: string;
|
|
29
|
+
/** The variable a value was read from, for the error (default: the name asked for). */
|
|
30
|
+
readonly source?: (name: string) => string;
|
|
31
|
+
}
|
|
18
32
|
/**
|
|
19
|
-
* The limits from the environment:
|
|
20
|
-
*
|
|
33
|
+
* The limits from the environment: `<prefix><OPERATION>` is `COUNT/SECONDS` (`20/3600`), or `0` to turn that limit
|
|
34
|
+
* off. Unset takes the default. Anything else throws (the worker stops at start: a typo must not lift a limit), naming
|
|
35
|
+
* the variable `options.source` says the value was read from. Called without options it asks for the
|
|
36
|
+
* `TEAMS_LIMIT_<OPERATION>` names, as it always did; the worker passes `{ prefix: LIMIT_ENV_PREFIX }`.
|
|
21
37
|
*/
|
|
22
|
-
export declare function parseLimits(env: (name: string) => string): Map<SensitiveOperation, Limit>;
|
|
38
|
+
export declare function parseLimits(env: (name: string) => string, options?: ParseLimitsOptions): Map<SensitiveOperation, Limit>;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import type { UserLimits } from "../config/settings.js";
|
|
2
|
-
/**
|
|
2
|
+
/** PA_USER_MESSAGE_LIMIT: messages per window and person. */
|
|
3
3
|
export declare const DEFAULT_MESSAGE_LIMIT = 20;
|
|
4
|
-
/**
|
|
4
|
+
/** PA_USER_MESSAGE_WINDOW_SECONDS. */
|
|
5
5
|
export declare const DEFAULT_MESSAGE_WINDOW_SECONDS = 60;
|
|
6
6
|
/**
|
|
7
|
-
*
|
|
7
|
+
* PA_USER_MAX_CONCURRENT_TASKS. A review request starts up to 10 pull requests at once, each a task; the default
|
|
8
8
|
* leaves room for that beside the person's 1:1 chat and a group.
|
|
9
9
|
*/
|
|
10
10
|
export declare const DEFAULT_MAX_CONCURRENT_TASKS = 12;
|
|
@@ -20,7 +20,7 @@ export declare function dataLines(channel?: string): Readonly<Record<Lang, reado
|
|
|
20
20
|
export declare const REMOTE_LINE: Phrase;
|
|
21
21
|
/**
|
|
22
22
|
* How much of a group chat's recent messages the deployment keeps as background for an @mention (core's
|
|
23
|
-
* `GroupContext`,
|
|
23
|
+
* `GroupContext`, PA_GROUP_CONTEXT_*), when that is on: the newest `messages`, none older than `hours`.
|
|
24
24
|
*/
|
|
25
25
|
export interface GroupContextKept {
|
|
26
26
|
readonly messages: number;
|
|
@@ -10,7 +10,7 @@ export interface ObserverDeps {
|
|
|
10
10
|
readonly observe: ObserveRepository;
|
|
11
11
|
readonly links: Pick<LinkRepository, "getKey">;
|
|
12
12
|
readonly assistant: Pick<ClawAssistantPort, "observeScope" | "observe" | "observations" | "session" | "send">;
|
|
13
|
-
/** Who may turn it on (
|
|
13
|
+
/** Who may turn it on (PA_OBSERVE_USERS, any case); empty: nobody. */
|
|
14
14
|
readonly users: readonly string[];
|
|
15
15
|
/** A conversation from the reference the store kept for a group (the channel's `ConversationRef.wire`). */
|
|
16
16
|
readonly conversationOf: (wire: JsonObject) => Conversation;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Where the worker's secrets come from. The names are the settings they
|
|
3
|
-
* environment variable, a mounted file, a vault entry) is that source's
|
|
2
|
+
* Where the worker's secrets come from. The names are the settings they first replaced, kept as stable ids; how a source
|
|
3
|
+
* finds each one (an environment variable, now under its `PA_` name, a mounted file, a vault entry) is that source's
|
|
4
|
+
* business.
|
|
4
5
|
*/
|
|
5
6
|
export declare const SECRET_NAMES: readonly ["TEAMS_ENCRYPTION_KEYS", "TEAMS_EXCHANGE_CLIENT_SECRET", "FEEDBACK_GITHUB_APP_KEY"];
|
|
6
7
|
export type SecretName = (typeof SECRET_NAMES)[number];
|
|
@@ -3,11 +3,11 @@ export declare const LINK_CODE_TTL_SECONDS: number;
|
|
|
3
3
|
export declare const CODE_LENGTH = 8;
|
|
4
4
|
/** The alphabet a link code is drawn from: no 0/O/1/I. */
|
|
5
5
|
export declare const CODE_ALPHABET = "ABCDEFGHJKLMNPQRSTUVWXYZ23456789";
|
|
6
|
-
/** Wrong codes per user in the window (
|
|
6
|
+
/** Wrong codes per user in the window (PA_LINK_MAX_FAILURES_PER_USER). */
|
|
7
7
|
export declare const MAX_FAILED_ATTEMPTS = 5;
|
|
8
|
-
/** Wrong codes of all users together in the window (
|
|
8
|
+
/** Wrong codes of all users together in the window (PA_LINK_MAX_FAILURES_GLOBAL). */
|
|
9
9
|
export declare const MAX_FAILED_ATTEMPTS_GLOBAL = 100;
|
|
10
|
-
/**
|
|
10
|
+
/** PA_LINK_ATTEMPT_WINDOW_SECONDS. */
|
|
11
11
|
export declare const ATTEMPT_WINDOW_SECONDS: number;
|
|
12
12
|
/** An action is carried out for an assistant message this young, at most. */
|
|
13
13
|
export declare const ASSISTANT_MESSAGE_KEEP_SECONDS: number;
|
|
@@ -91,7 +91,7 @@ export interface RemoteContext {
|
|
|
91
91
|
digestHex(algorithm: "sha1" | "sha256", text: string): string;
|
|
92
92
|
/** The language a person is answered in. */
|
|
93
93
|
langOf(person: string): Lang;
|
|
94
|
-
/**
|
|
94
|
+
/** PA_DIRECT_CHAT: whose 1:1 chat is the agent's window itself. */
|
|
95
95
|
readonly directChat: DirectChat;
|
|
96
96
|
}
|
|
97
97
|
/**
|
|
@@ -40,7 +40,7 @@ export declare class FollowControl {
|
|
|
40
40
|
private learn;
|
|
41
41
|
shutdown(): void;
|
|
42
42
|
/**
|
|
43
|
-
*
|
|
43
|
+
* PA_DIRECT_CHAT is on for this person: an attachment that still has the session card as its window is moved to the chat,
|
|
44
44
|
* here and in the store, so nothing reads it as a card any more (the card itself is left where it is).
|
|
45
45
|
*/
|
|
46
46
|
chatIsWindow(chatKey: string): void;
|
|
@@ -14,7 +14,7 @@ export declare class ChatState {
|
|
|
14
14
|
attached(chatKey: string): RemoteState | null;
|
|
15
15
|
/** The language the chat is answered in ("en" when it cannot be read). */
|
|
16
16
|
lang(chatKey: string): Lang;
|
|
17
|
-
/**
|
|
17
|
+
/** PA_DIRECT_CHAT is on for this 1:1 chat's person (a group binding keeps its session card). */
|
|
18
18
|
directOn(chatKey: string): boolean;
|
|
19
19
|
/** The chat is the agent's window itself, with no card. */
|
|
20
20
|
direct(chatKey: string): boolean;
|
|
@@ -24,7 +24,7 @@ export declare function chatCredentialOf(links: Pick<LinkRepository, "getKey">,
|
|
|
24
24
|
* What Claw is called with for a person, and what a person who has none is told (the Python `Agent._credential`,
|
|
25
25
|
* `_unlinked`, `_connect_identity`, `_binding_card`, `_ask_to_link`, `_background_credential`, `_fresh_credential`).
|
|
26
26
|
*
|
|
27
|
-
* A chat runs on the person's linked key; with
|
|
27
|
+
* A chat runs on the person's linked key; with PA_EXCHANGE_FOR_CHAT on, on a fresh exchanged token when they have a
|
|
28
28
|
* confirmed binding, else their linked key, else they get the card that binds them.
|
|
29
29
|
*/
|
|
30
30
|
export declare class Credentials {
|
|
@@ -28,7 +28,7 @@ export interface RouterConfig {
|
|
|
28
28
|
readonly reviewModel: string;
|
|
29
29
|
/** A turn refused for want of a gateway key runs again on this model ("" never). */
|
|
30
30
|
readonly fallbackModel: string;
|
|
31
|
-
/** Ordinary chats run on exchanged tokens (
|
|
31
|
+
/** Ordinary chats run on exchanged tokens (PA_EXCHANGE_FOR_CHAT) instead of the linked key. */
|
|
32
32
|
readonly exchangeForChat: boolean;
|
|
33
33
|
/** The parts of help that need Claw switches this worker cannot read. */
|
|
34
34
|
readonly briefEnabled: boolean;
|
|
@@ -16,7 +16,7 @@ export interface SubscriptionsOptions {
|
|
|
16
16
|
readonly baseUrl: string;
|
|
17
17
|
/** ASSISTANT_ENABLED: subscriptions also get the assistant's event types. */
|
|
18
18
|
readonly assistant?: boolean;
|
|
19
|
-
/**
|
|
19
|
+
/** PA_ASSISTANT_UNDERSTANDING_USERS: whose subscription also asks for `assistant.action`. */
|
|
20
20
|
readonly understood?: (aadId: string) => boolean;
|
|
21
21
|
/** ASSISTANT_USERS: whose subscription gets the assistant's types (an empty list: everybody's). */
|
|
22
22
|
readonly assistantFor?: (aadId: string) => boolean;
|