@primusclaw/personal-agent-runtime 0.7.1 → 0.8.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 +31 -22
- package/dist/types/claw/settings.d.ts +2 -1
- package/dist/types/github/intent-reader.d.ts +3 -3
- package/dist/types/worker/assemble.d.ts +28 -0
- package/dist/types/worker/build-info.d.ts +11 -0
- package/dist/types/worker/features-assistant.d.ts +50 -0
- package/dist/types/worker/features-base.d.ts +94 -0
- package/dist/types/worker/features-proactive.d.ts +25 -0
- package/dist/types/worker/features-remote.d.ts +13 -0
- package/dist/types/worker/features-review.d.ts +31 -0
- package/dist/types/worker/features-switches.d.ts +26 -0
- package/dist/types/worker/features-text.d.ts +38 -0
- package/dist/types/worker/features-turns.d.ts +18 -0
- package/dist/types/worker/features-w8.d.ts +20 -0
- package/dist/types/worker/features.d.ts +50 -0
- package/dist/types/worker/http.d.ts +23 -0
- package/dist/types/worker/plugins.d.ts +20 -0
- package/dist/types/worker/run-main.d.ts +3 -0
- package/dist/types/worker/runner.d.ts +36 -0
- package/dist/types/worker/startup-error.d.ts +7 -0
- package/dist/types/worker/surface-adapter.d.ts +87 -0
- package/dist/types/worker/timers.d.ts +14 -0
- package/dist/types/worker/worker-api.d.ts +70 -0
- package/dist/types/worker/worker-services.d.ts +29 -0
- package/dist/types/worker.d.ts +20 -0
- package/dist/worker.js +1684 -0
- package/package.json +7 -3
package/dist/index.js
CHANGED
|
@@ -791,7 +791,7 @@ var HttpSessions = class {
|
|
|
791
791
|
name: cpHead2(session.text, 50),
|
|
792
792
|
mode: "claw",
|
|
793
793
|
config: sessionConfig(session),
|
|
794
|
-
...withMessage ? { message: await this.#textMessage(key2, session.text, acting) } : {}
|
|
794
|
+
...withMessage ? { message: await this.#textMessage(key2, session.text, acting, session.channel ?? "") } : {}
|
|
795
795
|
};
|
|
796
796
|
const model = session.model !== void 0 && session.model !== "" ? session.model : this.defaults.model;
|
|
797
797
|
const sent = model === "" ? body : { ...body, model };
|
|
@@ -830,7 +830,7 @@ var HttpSessions = class {
|
|
|
830
830
|
}
|
|
831
831
|
async sendMessage(key2, sessionId, text3, options = {}) {
|
|
832
832
|
const headers = modelKeyHeader(key2, options.modelKey);
|
|
833
|
-
const body = await this.#textMessage(key2, text3, options.acting ?? false);
|
|
833
|
+
const body = await this.#textMessage(key2, text3, options.acting ?? false, options.channel ?? "");
|
|
834
834
|
const path = `/v1/sessions/${segment(sessionId)}/messages`;
|
|
835
835
|
return messageIdOf(await this.http.json({ method: "POST", path, key: key2, body, headers }));
|
|
836
836
|
}
|
|
@@ -894,14 +894,14 @@ var HttpSessions = class {
|
|
|
894
894
|
/**
|
|
895
895
|
* A person's message, carrying the plugin id the way the web client does. A session that acts as a user gets the
|
|
896
896
|
* text alone: no plugin (its tools act with the requester's own key, and such a session reads a stranger's pull
|
|
897
|
-
* request) and nothing appended.
|
|
897
|
+
* request) and nothing appended. `channel`: the chat app's short name the appended headings carry.
|
|
898
898
|
*/
|
|
899
|
-
async #textMessage(key2, text3, acting) {
|
|
899
|
+
async #textMessage(key2, text3, acting, channel) {
|
|
900
900
|
if (acting) return { content: text3, messageType: "text" };
|
|
901
901
|
const { rule, pluginId } = this.defaults;
|
|
902
902
|
const ruleText2 = rule === null ? "" : await rule.text(key2);
|
|
903
903
|
return {
|
|
904
|
-
content: messageContent(text3, ruleText2, rule !== null),
|
|
904
|
+
content: messageContent(text3, ruleText2, rule !== null, channel),
|
|
905
905
|
messageType: "text",
|
|
906
906
|
...pluginId === null ? {} : { pluginId }
|
|
907
907
|
};
|
|
@@ -1024,20 +1024,22 @@ var HttpNotifications = class {
|
|
|
1024
1024
|
const path = "/v1/notification-subscriptions";
|
|
1025
1025
|
return rowsOf(await this.http.json({ method: "GET", path, key: key2 }), "the subscriptions");
|
|
1026
1026
|
}
|
|
1027
|
-
async create(key2, url, eventTypes = [], sources = []) {
|
|
1027
|
+
async create(key2, url, eventTypes = [], sources = [], surface = "") {
|
|
1028
1028
|
const body = {
|
|
1029
1029
|
url,
|
|
1030
1030
|
...eventTypes.length === 0 ? {} : { event_types: eventTypes },
|
|
1031
|
-
...sources.length === 0 ? {} : { sources }
|
|
1031
|
+
...sources.length === 0 ? {} : { sources },
|
|
1032
|
+
...surface === "" ? {} : { surface }
|
|
1032
1033
|
};
|
|
1033
1034
|
const path = "/v1/notification-subscriptions";
|
|
1034
1035
|
return dataOf(await this.http.json({ method: "POST", path, key: key2, body }), "a subscription");
|
|
1035
1036
|
}
|
|
1036
1037
|
async updateTypes(key2, subscriptionId, eventTypes, options = {}) {
|
|
1037
|
-
const { enable = false, sources = [] } = options;
|
|
1038
|
+
const { enable = false, sources = [], surface = "" } = options;
|
|
1038
1039
|
const body = {
|
|
1039
1040
|
event_types: eventTypes,
|
|
1040
1041
|
...sources.length === 0 ? {} : { sources },
|
|
1042
|
+
...surface === "" ? {} : { surface },
|
|
1041
1043
|
...enable ? { enabled: true } : {}
|
|
1042
1044
|
};
|
|
1043
1045
|
const path = `/v1/notification-subscriptions/${segment(subscriptionId)}`;
|
|
@@ -3774,8 +3776,10 @@ var ADDED_COLUMNS = [
|
|
|
3774
3776
|
[
|
|
3775
3777
|
["message_id", "TEXT NOT NULL DEFAULT ''"],
|
|
3776
3778
|
// '' = the channel never said the card's id
|
|
3777
|
-
["ask_json", "TEXT NOT NULL DEFAULT ''"]
|
|
3779
|
+
["ask_json", "TEXT NOT NULL DEFAULT ''"],
|
|
3778
3780
|
// '' = not a question a terminal asks
|
|
3781
|
+
["lang", "TEXT NOT NULL DEFAULT ''"]
|
|
3782
|
+
// the card's language; '' = shown before it was kept
|
|
3779
3783
|
]
|
|
3780
3784
|
],
|
|
3781
3785
|
[
|
|
@@ -4268,7 +4272,7 @@ var SqliteRemoteSessionNameRepository = class {
|
|
|
4268
4272
|
);
|
|
4269
4273
|
}
|
|
4270
4274
|
};
|
|
4271
|
-
var PERMISSION_COLUMNS = "session_id, action_id, aad_id, tool, options_json, expires_at, state, message_id, ask_json";
|
|
4275
|
+
var PERMISSION_COLUMNS = "session_id, action_id, aad_id, tool, options_json, expires_at, state, message_id, ask_json, lang";
|
|
4272
4276
|
function permission(row) {
|
|
4273
4277
|
return {
|
|
4274
4278
|
sessionId: col.str(row, "session_id"),
|
|
@@ -4279,9 +4283,13 @@ function permission(row) {
|
|
|
4279
4283
|
expiresAt: col.num(row, "expires_at"),
|
|
4280
4284
|
state: col.str(row, "state"),
|
|
4281
4285
|
messageId: col.str(row, "message_id"),
|
|
4282
|
-
ask: askOf(col.str(row, "ask_json"))
|
|
4286
|
+
ask: askOf(col.str(row, "ask_json")),
|
|
4287
|
+
lang: langOf(col.str(row, "lang"))
|
|
4283
4288
|
};
|
|
4284
4289
|
}
|
|
4290
|
+
function langOf(text3) {
|
|
4291
|
+
return text3 === "zh" || text3 === "en" ? text3 : "";
|
|
4292
|
+
}
|
|
4285
4293
|
function askOf(text3) {
|
|
4286
4294
|
if (!text3) return null;
|
|
4287
4295
|
try {
|
|
@@ -4300,7 +4308,7 @@ var SqliteRemotePermissionRepository = class {
|
|
|
4300
4308
|
const now = this.ctx.now();
|
|
4301
4309
|
this.ctx.db.run("DELETE FROM remote_permissions WHERE expires_at < ?", now - REMOTE_PERMISSION_KEEP_SECONDS);
|
|
4302
4310
|
return this.ctx.db.run(
|
|
4303
|
-
"INSERT OR IGNORE INTO remote_permissions (session_id, action_id, aad_id, tool, options_json, expires_at, created_at, ask_json) VALUES (?, ?, ?, ?, ?, ?, ?, ?)",
|
|
4311
|
+
"INSERT OR IGNORE INTO remote_permissions (session_id, action_id, aad_id, tool, options_json, expires_at, created_at, ask_json, lang) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)",
|
|
4304
4312
|
p.sessionId,
|
|
4305
4313
|
p.actionId,
|
|
4306
4314
|
p.userId,
|
|
@@ -4308,7 +4316,8 @@ var SqliteRemotePermissionRepository = class {
|
|
|
4308
4316
|
pyJsonDumps(p.options),
|
|
4309
4317
|
p.expiresAt,
|
|
4310
4318
|
now,
|
|
4311
|
-
p.ask ? JSON.stringify(p.ask) : ""
|
|
4319
|
+
p.ask ? JSON.stringify(p.ask) : "",
|
|
4320
|
+
p.lang ?? ""
|
|
4312
4321
|
) === 1;
|
|
4313
4322
|
}
|
|
4314
4323
|
getRemotePermission(sessionId, actionId) {
|
|
@@ -5474,9 +5483,9 @@ var GithubDeviceFlow = class {
|
|
|
5474
5483
|
|
|
5475
5484
|
// packages/runtime/src/github/intent-reader.ts
|
|
5476
5485
|
import {
|
|
5477
|
-
|
|
5478
|
-
|
|
5479
|
-
|
|
5486
|
+
answerPrompt,
|
|
5487
|
+
intentPrompt,
|
|
5488
|
+
modePrompt,
|
|
5480
5489
|
errorName as errorName6,
|
|
5481
5490
|
pyJsonDumps as pyJsonDumps2,
|
|
5482
5491
|
pyRstrip as pyRstrip4
|
|
@@ -5507,14 +5516,14 @@ var GatewayIntentReader = class {
|
|
|
5507
5516
|
options;
|
|
5508
5517
|
url;
|
|
5509
5518
|
fetchImpl;
|
|
5510
|
-
read(key2, text3, mentions) {
|
|
5511
|
-
return this.complete(key2,
|
|
5519
|
+
read(key2, text3, mentions, channel) {
|
|
5520
|
+
return this.complete(key2, intentPrompt(channel), { message: text3, mentions });
|
|
5512
5521
|
}
|
|
5513
|
-
readMode(key2, text3) {
|
|
5514
|
-
return this.complete(key2,
|
|
5522
|
+
readMode(key2, text3, channel) {
|
|
5523
|
+
return this.complete(key2, modePrompt(channel), { message: text3 });
|
|
5515
5524
|
}
|
|
5516
|
-
readAnswer(key2, text3, pending) {
|
|
5517
|
-
return this.complete(key2,
|
|
5525
|
+
readAnswer(key2, text3, pending, channel) {
|
|
5526
|
+
return this.complete(key2, answerPrompt(channel), { message: text3, waiting_for_this_person: pending });
|
|
5518
5527
|
}
|
|
5519
5528
|
async complete(key2, system, payload) {
|
|
5520
5529
|
const body = {
|
|
@@ -21,10 +21,11 @@ export declare class HttpNotifications implements ClawNotificationsPort {
|
|
|
21
21
|
private readonly http;
|
|
22
22
|
constructor(http: ClawHttp);
|
|
23
23
|
list(key: ClawCredential): Promise<ClawSubscription[]>;
|
|
24
|
-
create(key: ClawCredential, url: string, eventTypes?: readonly string[], sources?: readonly string[]): Promise<ClawSubscription>;
|
|
24
|
+
create(key: ClawCredential, url: string, eventTypes?: readonly string[], sources?: readonly string[], surface?: string): Promise<ClawSubscription>;
|
|
25
25
|
updateTypes(key: ClawCredential, subscriptionId: string, eventTypes: readonly string[], options?: {
|
|
26
26
|
enable?: boolean;
|
|
27
27
|
sources?: readonly string[];
|
|
28
|
+
surface?: string;
|
|
28
29
|
}): Promise<ClawSubscription>;
|
|
29
30
|
delete(key: ClawCredential, subscriptionId: string): Promise<void>;
|
|
30
31
|
}
|
|
@@ -21,8 +21,8 @@ export declare class GatewayIntentReader implements IntentReader {
|
|
|
21
21
|
private readonly url;
|
|
22
22
|
private readonly fetchImpl;
|
|
23
23
|
constructor(options: IntentReaderOptions);
|
|
24
|
-
read(key: string, text: string, mentions: readonly ListedMention[]): Promise<Record<string, unknown> | undefined>;
|
|
25
|
-
readMode(key: string, text: string): Promise<Record<string, unknown> | undefined>;
|
|
26
|
-
readAnswer(key: string, text: string, pending: readonly Readonly<Record<string, string>>[]): Promise<Record<string, unknown> | undefined>;
|
|
24
|
+
read(key: string, text: string, mentions: readonly ListedMention[], channel: string): Promise<Record<string, unknown> | undefined>;
|
|
25
|
+
readMode(key: string, text: string, channel: string): Promise<Record<string, unknown> | undefined>;
|
|
26
|
+
readAnswer(key: string, text: string, pending: readonly Readonly<Record<string, string>>[], channel: string): Promise<Record<string, unknown> | undefined>;
|
|
27
27
|
private complete;
|
|
28
28
|
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The worker process on a surface (the Python worker's `main.run`): secrets, settings, the store, the Claw client, the
|
|
3
|
+
* surface's outbound side, the features behind the router, the HTTP endpoints and /metrics, the surface's inbound side, and
|
|
4
|
+
* the features' timers. Nothing runs until `run`. What is the surface's own (its settings, how it is reached, where its
|
|
5
|
+
* events come from) is its `SurfaceAdapter`'s.
|
|
6
|
+
*/
|
|
7
|
+
import { InboundStats, type MetricsPort, type IntegrationRegistry, type Integrations, type Plugins, type SecretName } from "@primusclaw/personal-agent";
|
|
8
|
+
import { PrometheusMetrics } from "@primusclaw/personal-agent-runtime";
|
|
9
|
+
import type { SurfaceAdapter } from "./surface-adapter.js";
|
|
10
|
+
import type { PluginFactory, Worker, WorkerEnv, WorkerOptions } from "./worker-api.js";
|
|
11
|
+
/**
|
|
12
|
+
* The metrics, with the inbound path also counted for its `inbound_stats` line (Python `InboundStats(metrics=...)`: one line
|
|
13
|
+
* a minute of what was handled, how long it waited and took, what failed and what a limit refused).
|
|
14
|
+
*/
|
|
15
|
+
export declare function withInboundStats(prometheus: PrometheusMetrics, stats: InboundStats): MetricsPort;
|
|
16
|
+
/** The secrets from the environment, the one source a surface without its own `loadSecrets` has. */
|
|
17
|
+
export declare function envSecrets(env: WorkerEnv, names: readonly SecretName[]): Promise<ReadonlyMap<SecretName, string>>;
|
|
18
|
+
/**
|
|
19
|
+
* `integrations` with what `register` adds to them (`WorkerOptions.registerIntegrations`): a registry that starts with
|
|
20
|
+
* every server and line already there, in their order, then takes the deployment's. Without `register`, `integrations`.
|
|
21
|
+
*/
|
|
22
|
+
export declare function withRegistered(integrations: Integrations, register: ((registry: IntegrationRegistry) => void) | undefined): Integrations;
|
|
23
|
+
/**
|
|
24
|
+
* Build the worker on the surface `adapter` from `env` with `plugins` (or a factory that builds them with the worker's
|
|
25
|
+
* services). Rejects at start, before anything is served, when the settings are not usable: a worker that starts must be
|
|
26
|
+
* able to answer. A surface package's own `buildWorker` is this with its adapter.
|
|
27
|
+
*/
|
|
28
|
+
export declare function assembleWorker(adapter: SurfaceAdapter, env: WorkerEnv, plugins: Plugins | PluginFactory, options?: WorkerOptions): Promise<Worker>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `personal_agent_build_info`: which build a running worker is, on /metrics (the `*_build_info` convention: a gauge that
|
|
3
|
+
* is always 1, the build in its labels). `version` is the surface package's own version (what npm and the image were
|
|
4
|
+
* released as; "unknown" when its package.json cannot be read), `node` the Node.js version it runs on. A deployment
|
|
5
|
+
* checks that what runs is what it pinned by reading this line.
|
|
6
|
+
*/
|
|
7
|
+
export declare const BUILD_INFO_METRIC = "personal_agent_build_info";
|
|
8
|
+
/** The metric's lines (HELP, TYPE and the sample), each ending in a newline. */
|
|
9
|
+
export declare function buildInfoText(version: string, node: string): string;
|
|
10
|
+
/** `render`'s text with the build info appended (after a newline, if the text lacks its last one). */
|
|
11
|
+
export declare function withBuildInfo(render: () => string, info: string): () => string;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The person's assistant as the worker runs it (Python `Agent.__init__`: `Subscriptions`, `Assistant`, and the buttons of its
|
|
3
|
+
* cards): the subscription keeper (only with PROACTIVE_ENABLED, which gives NOTIFY_WEBHOOK_URL), the chat that talks to the
|
|
4
|
+
* assistant, the board, the work item and watch buttons, and the commands the assistant puts to the person.
|
|
5
|
+
*/
|
|
6
|
+
import type { ClickHandler, Integrations } from "@primusclaw/personal-agent";
|
|
7
|
+
import { AssistantActions, AssistantChatService, Board, DirectChat, Receipts, remoteView, SubscriptionKeeper } from "@primusclaw/personal-agent";
|
|
8
|
+
import type { AssemblyBase, ReplyStyle, RouterHooks } from "./features-base.js";
|
|
9
|
+
/** The router's test of a command typed whole (`understanding.exact_command`). */
|
|
10
|
+
export declare const isExactCommand: (text: string) => boolean;
|
|
11
|
+
export interface AssistantParts {
|
|
12
|
+
/** undefined: notifications are off (no NOTIFY_WEBHOOK_URL). */
|
|
13
|
+
readonly subs: SubscriptionKeeper | undefined;
|
|
14
|
+
readonly chat: AssistantChatService;
|
|
15
|
+
readonly board: Board;
|
|
16
|
+
readonly receipts: Receipts;
|
|
17
|
+
readonly directChat: DirectChat;
|
|
18
|
+
readonly actions: AssistantActions;
|
|
19
|
+
readonly clicks: readonly ClickHandler[];
|
|
20
|
+
}
|
|
21
|
+
/** The approval card of a request an agent on the person's machine waits on (W6b's view). */
|
|
22
|
+
export declare function remoteAskCard(request: Parameters<ConstructorParameters<typeof Board>[0]["remoteAsk"]>[0]): {
|
|
23
|
+
body: {
|
|
24
|
+
type: "view";
|
|
25
|
+
view: {
|
|
26
|
+
name: "terminalAsk";
|
|
27
|
+
model: remoteView.TerminalAskView;
|
|
28
|
+
};
|
|
29
|
+
fallbackText: string;
|
|
30
|
+
};
|
|
31
|
+
} | {
|
|
32
|
+
body: {
|
|
33
|
+
type: "view";
|
|
34
|
+
view: {
|
|
35
|
+
name: "remoteAsk";
|
|
36
|
+
model: remoteView.RemoteAskView;
|
|
37
|
+
};
|
|
38
|
+
fallbackText: string;
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
export interface AssistantInputs {
|
|
42
|
+
readonly style: ReplyStyle;
|
|
43
|
+
readonly integrations: Integrations;
|
|
44
|
+
/** A review the assistant handed back (`review_for_other`): to the review service, "dropped" without it. */
|
|
45
|
+
readonly reviewHandoff: (userId: string, event: Readonly<Record<string, unknown>>) => "delivered" | "dropped";
|
|
46
|
+
/** NOTIFY_WEBHOOK_URL ("" off). */
|
|
47
|
+
readonly notifyUrl: string;
|
|
48
|
+
readonly hooks: RouterHooks;
|
|
49
|
+
}
|
|
50
|
+
export declare function assistantParts(base: AssemblyBase, inputs: AssistantInputs): AssistantParts;
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What the features behind the router are built from (the process's ports and settings), and the hooks into the router a
|
|
3
|
+
* feature needs once the router exists: the router is built from the features, and some features call back into it.
|
|
4
|
+
*/
|
|
5
|
+
import type { ClawPort, ConversationKind, ConversationRef, InboundMessage, JsonObject, Clock, Logger, MetricsPort, Plugins, Random, RequestScope, SecurityLog, Settings, Surface, TokenExchange } from "@primusclaw/personal-agent";
|
|
6
|
+
import type { ChatLog, SqliteStore } from "@primusclaw/personal-agent-runtime";
|
|
7
|
+
/**
|
|
8
|
+
* How replies look on the surface: the switches of its reply style that the features read (the surface reads the rest,
|
|
9
|
+
* such as Teams' AI label, itself). Each is the surface's own setting; a surface that has no such thing turns it off.
|
|
10
|
+
*/
|
|
11
|
+
export interface ReplyStyle {
|
|
12
|
+
/** The agent's visible text is streamed into the answer while a turn runs. */
|
|
13
|
+
readonly streamText: boolean;
|
|
14
|
+
/** The assistant's receipt, its live steps and its streamed words. */
|
|
15
|
+
readonly assistantReceipt: boolean;
|
|
16
|
+
readonly assistantProgress: boolean;
|
|
17
|
+
readonly assistantStreamSay: boolean;
|
|
18
|
+
/** An answer carries the worker's own thumbs on phones (the router's `ownThumbsMobile`). */
|
|
19
|
+
readonly ownThumbsMobile: boolean;
|
|
20
|
+
readonly suggestedReplies: boolean;
|
|
21
|
+
readonly citations: boolean;
|
|
22
|
+
/** Whether a turn shows the surface's live status in this kind of chat. */
|
|
23
|
+
streamsIn(kind: ConversationKind): boolean;
|
|
24
|
+
}
|
|
25
|
+
/** What the features read of the surface besides its port: its reply style, how a stored reference is read back, its words. */
|
|
26
|
+
export interface SurfaceShape {
|
|
27
|
+
readonly style: ReplyStyle;
|
|
28
|
+
/**
|
|
29
|
+
* Where a person who has not added the bot yet can add it (a link the surface's people can open; "" for none): what a
|
|
30
|
+
* colleague asked to review is pointed at.
|
|
31
|
+
*/
|
|
32
|
+
readonly installHintUrl: string;
|
|
33
|
+
/** A stored conversation reference back as core's `ConversationRef`; undefined when it names none. Never throws. */
|
|
34
|
+
restoreRef(stored: JsonObject): ConversationRef | undefined;
|
|
35
|
+
/** A stored reference as the surface posts to it: one that names no conversation still gets one (its send then fails). */
|
|
36
|
+
refOf(stored: JsonObject): ConversationRef;
|
|
37
|
+
/**
|
|
38
|
+
* The surface's fields a followed review keeps to open the reviewer's chat again after a restart, from the chat the
|
|
39
|
+
* review was asked in (Teams: service_url, tenant, bot_id).
|
|
40
|
+
*/
|
|
41
|
+
followWire(asked: ConversationRef): Readonly<Record<string, string>>;
|
|
42
|
+
/**
|
|
43
|
+
* The surface's id on the Claw wire ("teams", "slack"): sent as the person's notification subscription's `surface`, so
|
|
44
|
+
* Claw sends an assistant reply back to the surface the message came from.
|
|
45
|
+
*/
|
|
46
|
+
readonly surfaceId: string;
|
|
47
|
+
/** The surface's name as people know it ("Teams"): what a report's words and an unreadable file's line call it. */
|
|
48
|
+
readonly channelName: string;
|
|
49
|
+
/** The build the worker runs (the surface package's version): what a report names. */
|
|
50
|
+
readonly version: string;
|
|
51
|
+
}
|
|
52
|
+
export interface AssemblyBase {
|
|
53
|
+
/** Core's settings (`readSettings`). */
|
|
54
|
+
readonly settings: Settings;
|
|
55
|
+
/** What the features read of the surface besides its port (`SurfaceShape`). */
|
|
56
|
+
readonly shape: SurfaceShape;
|
|
57
|
+
readonly store: SqliteStore;
|
|
58
|
+
readonly claw: ClawPort;
|
|
59
|
+
/** The channel (the worker's surface, such as Teams'; a test's fake surface). */
|
|
60
|
+
readonly surface: Surface;
|
|
61
|
+
readonly clock: Clock;
|
|
62
|
+
readonly random: Random;
|
|
63
|
+
readonly logger: Logger;
|
|
64
|
+
/** What the platform and GitHub clients send with (the global `fetch`; a test's fake). */
|
|
65
|
+
readonly fetch: typeof fetch;
|
|
66
|
+
readonly metrics: MetricsPort;
|
|
67
|
+
readonly securityLog: SecurityLog;
|
|
68
|
+
/** The one request scope (runtime `alsRequestScope`): the router enters it per inbound event, everything else reads it. */
|
|
69
|
+
readonly requestScope: RequestScope;
|
|
70
|
+
/** The last log lines of each chat, for a report's scene (Python `feedback.LogBuffer`). */
|
|
71
|
+
readonly chatLog: ChatLog;
|
|
72
|
+
readonly plugins: Plugins;
|
|
73
|
+
readonly exchange: TokenExchange;
|
|
74
|
+
/** The switches the Python worker's `main.py` read from the environment itself (`features-switches.ts`). */
|
|
75
|
+
readonly env: Readonly<Record<string, string | undefined>>;
|
|
76
|
+
}
|
|
77
|
+
/** What the features ask of the router, bound once it is built (a call before then is a defect of the assembly). */
|
|
78
|
+
export interface RouterHooks {
|
|
79
|
+
/** A chat turn of the old kind is running in the person's 1:1 chat (`Router.hasPersonalTurn`). */
|
|
80
|
+
legacyTurn(userId: string): boolean;
|
|
81
|
+
/** A work item was stopped from its card: whatever follows it here ends as stopped (`Agent._item_stopped`). */
|
|
82
|
+
itemStopped(itemId: string): void;
|
|
83
|
+
/** The person pressed Deny on an approval of the chat's running turn (`turn.tool_denied`). */
|
|
84
|
+
toolDenied(userId: string, scope: string): void;
|
|
85
|
+
/** `text` carried out exactly as typed, with `key`, in `conversation` (`Agent._command`). */
|
|
86
|
+
runCommand(text: string, sender: SenderOf, conversation: ConversationOf, key: string): Promise<boolean>;
|
|
87
|
+
/** What reads Claw for a person with nobody to ask (`Agent._background_credential`); undefined: none. */
|
|
88
|
+
background(userId: string): Promise<string | undefined>;
|
|
89
|
+
/** `message` handled as one the person typed (`Router.handle`): what a choice card's Send sends. */
|
|
90
|
+
typed(message: InboundMessage): Promise<void>;
|
|
91
|
+
}
|
|
92
|
+
type SenderOf = Parameters<import("@primusclaw/personal-agent").Router["chat"]>[0];
|
|
93
|
+
type ConversationOf = Parameters<import("@primusclaw/personal-agent").Router["chat"]>[1];
|
|
94
|
+
export {};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Unasked messages (Python `proactive.Proactive`, as `link_api.build_app` and `Agent.__init__` build it): what Claw's events
|
|
3
|
+
* become in the chat, what quiet hours and /pause hold and later release, approval cards sent again, and the two views of it
|
|
4
|
+
* the router and the remote agents read (`ProactiveHold`, `FollowReach`).
|
|
5
|
+
*/
|
|
6
|
+
import type { Conversation, FollowReach, JsonObject, ProactiveHold, PublicErrors, Router } from "@primusclaw/personal-agent";
|
|
7
|
+
import { Proactive, Release } from "@primusclaw/personal-agent";
|
|
8
|
+
import type { AssistantParts } from "./features-assistant.js";
|
|
9
|
+
import type { AssemblyBase, ReplyStyle } from "./features-base.js";
|
|
10
|
+
export declare function conversationFor(base: Pick<AssemblyBase, "surface" | "shape">): (reference: JsonObject) => Conversation;
|
|
11
|
+
export interface ProactiveParts {
|
|
12
|
+
readonly proactive: Proactive;
|
|
13
|
+
readonly release: Release;
|
|
14
|
+
}
|
|
15
|
+
export declare function proactiveParts(base: AssemblyBase, style: ReplyStyle, assistant: Pick<AssistantParts, "receipts" | "directChat">, errors: PublicErrors, router?: () => Router): ProactiveParts;
|
|
16
|
+
/** The event claim key prefix of a turn whose identity card was sent (`identityAfterRefusal`). */
|
|
17
|
+
export declare const IDENTITY_REFUSED_PREFIX = "identity-refused:";
|
|
18
|
+
/** What the router reads of quiet hours and /pause (`muted` as a word or null, `release` on /resume). */
|
|
19
|
+
export declare function proactiveHold(parts: ProactiveParts): ProactiveHold;
|
|
20
|
+
/**
|
|
21
|
+
* What the remote agents' follower reads of it. Python's follower hands Proactive its chat key as the person (`self.aad_id`
|
|
22
|
+
* is the chat key: the person for a 1:1 chat, `<person>#<group>` for a group binding), so the same key is passed on here
|
|
23
|
+
* unchanged; the event id of a held message is a fresh uuid4 hex, as Python's `hold_remote` makes it.
|
|
24
|
+
*/
|
|
25
|
+
export declare function followReach(parts: ProactiveParts, base: Pick<AssemblyBase, "random">): FollowReach;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { DirectChat, FollowReach, PublicErrors } from "@primusclaw/personal-agent";
|
|
2
|
+
import { Guardrails, RemoteAgents } from "@primusclaw/personal-agent";
|
|
3
|
+
import type { AssemblyBase, RouterHooks } from "./features-base.js";
|
|
4
|
+
import type { FeatureSwitches } from "./features-switches.js";
|
|
5
|
+
export interface RemoteInputs {
|
|
6
|
+
readonly switches: FeatureSwitches;
|
|
7
|
+
readonly guard: Guardrails;
|
|
8
|
+
readonly reach: FollowReach;
|
|
9
|
+
readonly errors: PublicErrors;
|
|
10
|
+
readonly directChat: DirectChat;
|
|
11
|
+
readonly hooks: RouterHooks;
|
|
12
|
+
}
|
|
13
|
+
export declare function remoteAgents(base: AssemblyBase, inputs: RemoteInputs): RemoteAgents;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The review delegation (TEAMS_GITHUB_REVIEW_ENABLED), as the Python worker's `main.run` builds `GithubReview` and
|
|
3
|
+
* `Agent.__init__` attaches it: the identity service's GitHub credentials, the device flow `/github` connects with, the
|
|
4
|
+
* public pull request reader, the request reader on the platform's model gateway (TEAMS_REVIEW_INTENT_MODEL), and the chat
|
|
5
|
+
* it runs in (its turns start on the router, its onboarding and connect cards are the router's). What it gives back: the
|
|
6
|
+
* router's GitHub part, its handlers, the handoff the assistant can send back, the follows it takes up again at start, the
|
|
7
|
+
* open review cards it sweeps, and the stopped items it hears of.
|
|
8
|
+
*/
|
|
9
|
+
import { GithubReview, ReviewHandoffAction, type Guardrails, type PostWorkCard, type PublicErrors, type Router, type SubscriptionKeeper } from "@primusclaw/personal-agent";
|
|
10
|
+
import type { AssistantParts } from "./features-assistant.js";
|
|
11
|
+
import type { AssemblyBase } from "./features-base.js";
|
|
12
|
+
/** How often open review cards are checked for an item that is over (Python `CARD_SWEEP_SECONDS`, core `CARD_SWEEP_MS`). */
|
|
13
|
+
export declare const REVIEW_CARD_SWEEP_MS = 120000;
|
|
14
|
+
export interface ReviewInputs {
|
|
15
|
+
readonly guard: Pick<Guardrails, "take" | "giveBack">;
|
|
16
|
+
readonly errors: PublicErrors;
|
|
17
|
+
/** The router, once it is built (the service starts its turns there). */
|
|
18
|
+
readonly router: () => Router;
|
|
19
|
+
readonly subs: SubscriptionKeeper | undefined;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* A work item's card in the reviewer's chat when a review waits for them (Python `_tell_reviewer_waiting`: `work_card`,
|
|
23
|
+
* then the card is placed so it is ended with its item).
|
|
24
|
+
*/
|
|
25
|
+
export declare function workCardPoster(base: Pick<AssemblyBase, "store">): PostWorkCard;
|
|
26
|
+
export interface ReviewParts {
|
|
27
|
+
readonly service: GithubReview;
|
|
28
|
+
readonly handoff: ReviewHandoffAction;
|
|
29
|
+
}
|
|
30
|
+
/** The review service and the handoff the assistant sends back; undefined with TEAMS_GITHUB_REVIEW_ENABLED off. */
|
|
31
|
+
export declare function reviewParts(base: AssemblyBase, inputs: ReviewInputs, assistant: Pick<AssistantParts, "receipts" | "chat">): ReviewParts | undefined;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export type Env = Readonly<Record<string, string | undefined>>;
|
|
2
|
+
export interface FeatureSwitches {
|
|
3
|
+
/** BRIEF_ENABLED == "1": `/brief` (it needs Claw's trigger API). */
|
|
4
|
+
readonly brief: boolean;
|
|
5
|
+
/** ASSISTANT_SCHEDULES_ENABLED == "1". */
|
|
6
|
+
readonly schedules: boolean;
|
|
7
|
+
/** ASSISTANT_JOB_WATCH_ENABLED == "1". */
|
|
8
|
+
readonly jobWatch: boolean;
|
|
9
|
+
/** REMOTE_AGENTS_ENABLED == "1". */
|
|
10
|
+
readonly remoteAgents: boolean;
|
|
11
|
+
/** An attached chat hears its agent between turns (`remote_push_wanted`). */
|
|
12
|
+
readonly remotePush: boolean;
|
|
13
|
+
/** REMOTE_WINDOW_DEFAULT: "chat", or "card" for anything else. */
|
|
14
|
+
readonly remoteWindow: "card" | "chat";
|
|
15
|
+
/** PROACTIVE_ENABLED == "1". */
|
|
16
|
+
readonly proactive: boolean;
|
|
17
|
+
/** Where Claw sends this worker's events ("" when proactive messages are off: no subscriptions at all). */
|
|
18
|
+
readonly notifyUrl: string;
|
|
19
|
+
}
|
|
20
|
+
/** NOTIFY_WEBHOOK_URL, required with PROACTIVE_ENABLED and ignored without it (`notify_url_from_env`). */
|
|
21
|
+
export declare function notifyUrlFromEnv(proactive: boolean, raw: string): string;
|
|
22
|
+
/** On unless REMOTE_PUSH_ENABLED says off, and only with PROACTIVE_ENABLED (`remote_push_wanted`). */
|
|
23
|
+
export declare function remotePushWanted(proactive: boolean, raw: string): boolean;
|
|
24
|
+
/** "chat" when REMOTE_WINDOW_DEFAULT says so, else "card" (`remote_window_default`). */
|
|
25
|
+
export declare function remoteWindowDefault(raw: string): "card" | "chat";
|
|
26
|
+
export declare function featureSwitches(env: Env): FeatureSwitches;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The router's small readers, built from core's pure functions: what a message carries besides its words (quotes, links,
|
|
3
|
+
* files the surface gave no way to fetch), the per-person limits, the channel context a message to the assistant carries, the
|
|
4
|
+
* note card a settled click ends as, `/whoami`'s connection lines, and fetching a message's files through the surface.
|
|
5
|
+
*/
|
|
6
|
+
import type { PendingEntry, ChannelContextBuilder, Clock, ConnectionsText, FetchedFile, InboundFile, KnownMember, Integrations, MessageFiles, MessageText, NoteFactory, RouterLimits, Surface, UserLimits } from "@primusclaw/personal-agent";
|
|
7
|
+
/**
|
|
8
|
+
* The router's reading of quotes, links and unreadable files (Python `activity.quote_block`, `with_links`, `with_quote`), on
|
|
9
|
+
* the surface people know as `channelName` (what an unreadable file's line says did not give it).
|
|
10
|
+
*/
|
|
11
|
+
export declare function messageTextFor(channelName: string): MessageText;
|
|
12
|
+
/** TEAMS_USER_*: messages per window, tasks at once (Python `limits.UserLimits` and `MessageRateLimiter`). */
|
|
13
|
+
export declare function routerLimits(limits: UserLimits, clock: Clock): RouterLimits;
|
|
14
|
+
/** Python `understanding.channel_context` as `Agent._understood` builds it (the people named, the chat's actions). */
|
|
15
|
+
export declare function channelContextBuilder(store: ContextStore,
|
|
16
|
+
/** What waits for the person's answer (the review service's held confirmations; none without it). */
|
|
17
|
+
pending?: (userId: string) => readonly PendingEntry[]): ChannelContextBuilder;
|
|
18
|
+
interface ContextStore {
|
|
19
|
+
readonly members: {
|
|
20
|
+
knownMembers(): readonly KnownMember[];
|
|
21
|
+
userForChannelId(channelUserId: string): string | null;
|
|
22
|
+
};
|
|
23
|
+
readonly links: {
|
|
24
|
+
clawUserIdOf(userId: string): string | null;
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
/** The note card a settled click ends as (Python `render.note_card`). */
|
|
28
|
+
export declare const noteFactory: NoteFactory;
|
|
29
|
+
/** `/whoami`'s lines after its first (the review service's `connectionsText`, with the deployment's integration lines). */
|
|
30
|
+
export declare function whoamiConnections(integrations: Integrations): ConnectionsText;
|
|
31
|
+
/** A message's files through the surface, each once (Python `FileFetcher.fetch_all`): fetched, and why not for the rest. */
|
|
32
|
+
export declare function fetchAll(surface: Pick<Surface, "fetchFile">, files: readonly InboundFile[]): Promise<{
|
|
33
|
+
fetched: FetchedFile[];
|
|
34
|
+
failed: [string, string][];
|
|
35
|
+
}>;
|
|
36
|
+
/** The assistant's side of a message's files (W5 `MessageFiles`). */
|
|
37
|
+
export declare function messageFiles(surface: Pick<Surface, "fetchFile">): MessageFiles;
|
|
38
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The turns the router starts (W4b's turn engine), the Stop cards of turns a phone starts, and the approval and question cards
|
|
3
|
+
* those turns show (`Agent._start_turn`'s `on_approval*`, `Agent._decide`).
|
|
4
|
+
*/
|
|
5
|
+
import type { ClickHandler, Guardrails, Integrations, PublicErrors, TurnRunner } from "@primusclaw/personal-agent";
|
|
6
|
+
import { turn } from "@primusclaw/personal-agent";
|
|
7
|
+
import type { AssemblyBase, ReplyStyle, RouterHooks } from "./features-base.js";
|
|
8
|
+
export interface TurnInputs {
|
|
9
|
+
readonly style: ReplyStyle;
|
|
10
|
+
readonly errors: PublicErrors;
|
|
11
|
+
readonly integrations: Integrations;
|
|
12
|
+
}
|
|
13
|
+
/** The router's turn runner: one engine per run, its approval records bound to the person the turn is for. */
|
|
14
|
+
export declare function turnRunner(base: AssemblyBase, inputs: TurnInputs): TurnRunner;
|
|
15
|
+
/** The Stop cards of turns a phone starts (`StopButtons`). */
|
|
16
|
+
export declare function stopCards(base: AssemblyBase): turn.StopButtons;
|
|
17
|
+
/** The buttons of approval and question cards (`Agent._decide`), the person's allowance taken per approval given. */
|
|
18
|
+
export declare function approvalClicks(base: AssemblyBase, guard: Guardrails, hooks: RouterHooks): ClickHandler;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { JsonObject, OutMessage } from "@primusclaw/personal-agent";
|
|
2
|
+
import { DailyBrief, FeedbackFlow, FeedbackService, FeedbackThumbs, GroupContext, Observer } from "@primusclaw/personal-agent";
|
|
3
|
+
import type { AssemblyBase } from "./features-base.js";
|
|
4
|
+
/** The brief Claw put together, as a message (Python `render.brief_markdown`). */
|
|
5
|
+
export declare function briefMarkdown(brief: JsonObject): string;
|
|
6
|
+
export interface W8Parts {
|
|
7
|
+
readonly service: FeedbackService;
|
|
8
|
+
readonly flow: FeedbackFlow;
|
|
9
|
+
readonly thumbs: FeedbackThumbs;
|
|
10
|
+
readonly observer: Observer;
|
|
11
|
+
/** The recent messages of group chats, in memory, as background for an @mention. */
|
|
12
|
+
readonly groupContext: GroupContext;
|
|
13
|
+
readonly brief: DailyBrief;
|
|
14
|
+
/** The Report a problem card under a message of the person's that went wrong. */
|
|
15
|
+
reportView(userId: string, scope: string): OutMessage;
|
|
16
|
+
}
|
|
17
|
+
export declare function w8Parts(base: AssemblyBase, options: {
|
|
18
|
+
readonly briefEnabled: boolean;
|
|
19
|
+
readonly assistantOn: (userId: string) => boolean;
|
|
20
|
+
}): W8Parts;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The features behind the router, built and wired as the Python worker's `main.build_agent`, `Agent.__init__` and
|
|
3
|
+
* `main.build_worker_app` wire them: the router with every feature it hands messages to, what carries Claw's events into the
|
|
4
|
+
* chat (`/claw-events`), the background loops of `main.run`, what runs once at start, and what the release gate's test entry
|
|
5
|
+
* reads. The review service (TEAMS_GITHUB_REVIEW_ENABLED) is built in `features-review.ts`.
|
|
6
|
+
*/
|
|
7
|
+
import type { GroupContext, JsonObject, GithubReview } from "@primusclaw/personal-agent";
|
|
8
|
+
import { Router } from "@primusclaw/personal-agent";
|
|
9
|
+
import type { AssemblyBase } from "./features-base.js";
|
|
10
|
+
export type { AssemblyBase, ReplyStyle, SurfaceShape } from "./features-base.js";
|
|
11
|
+
/** The background loops' period (Python `main.SWEEP_SECONDS`). */
|
|
12
|
+
export declare const SWEEP_MS = 60000;
|
|
13
|
+
/** Claw's event type that asks the chat to carry out a command (Python `claw.ASSISTANT_ACTION`). */
|
|
14
|
+
export declare const ASSISTANT_ACTION = "assistant.action";
|
|
15
|
+
/** The person's notification subscription, as the assistant feature keeps it (what a surface's test entry reads). */
|
|
16
|
+
export interface GateSubscriptions {
|
|
17
|
+
ensure(userId: string): Promise<void>;
|
|
18
|
+
remove(userId: string): Promise<void>;
|
|
19
|
+
/** Whether the subscription carries the assistant's event types. */
|
|
20
|
+
hasAssistantTypes(userId: string): boolean;
|
|
21
|
+
}
|
|
22
|
+
export interface FeatureTimer {
|
|
23
|
+
readonly name: string;
|
|
24
|
+
readonly everyMs: number;
|
|
25
|
+
readonly runAtStart: boolean;
|
|
26
|
+
run(): Promise<void>;
|
|
27
|
+
}
|
|
28
|
+
export interface Features {
|
|
29
|
+
readonly router: Router;
|
|
30
|
+
/** `/claw-events`: an `assistant.action` is carried out as the person (`Agent.run_action`), anything else is shown. */
|
|
31
|
+
readonly deliverEvent: (userId: string, reference: JsonObject, event: JsonObject) => Promise<string>;
|
|
32
|
+
/** The loops of `main.run`: name, period, whether the first run is at start, one run. */
|
|
33
|
+
readonly timers: readonly FeatureTimer[];
|
|
34
|
+
/** Once the worker runs: chats attached to a remote agent are followed again (`Agent.resume_remote`). */
|
|
35
|
+
start(): Promise<void>;
|
|
36
|
+
/** The worker stops: the assistant's open receipts are dropped, so their close timers do not keep the process up. */
|
|
37
|
+
stop(): void;
|
|
38
|
+
/** The review service (TEAMS_GITHUB_REVIEW_ENABLED; undefined off), for the gate's review scenarios and the tests. */
|
|
39
|
+
readonly review: GithubReview | undefined;
|
|
40
|
+
/** The recent messages of group chats (kept in memory): the inbound handler drops a chat the bot was removed from. */
|
|
41
|
+
readonly groupContext: GroupContext;
|
|
42
|
+
/** What the release gate's test entry reads: the subscriptions, and the Claw sessions this worker made. */
|
|
43
|
+
readonly gate: {
|
|
44
|
+
readonly subscriptions: GateSubscriptions | undefined;
|
|
45
|
+
readonly madeSessions: () => readonly string[];
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
/** The route the Python worker serves for TEAMS_ON_BEHALF_USERS (link_api.py); a deployment's plugin adds it here. */
|
|
49
|
+
export declare const ON_BEHALF_PATH = "/primus-claw-agent/on-behalf";
|
|
50
|
+
export declare function buildFeatures(given: AssemblyBase): Features;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The worker's HTTP endpoints as it runs them (the Python worker's `build_worker_app`): `/healthz`, the console's
|
|
3
|
+
* `/primus-claw-agent/link`, `/claw-events/<route>` when proactive messages are on, the routes a deployment adds, and in the
|
|
4
|
+
* release gate's test entry its `/gate/v1/*`. `/metrics` is served on a port of its own.
|
|
5
|
+
*/
|
|
6
|
+
import type { ClawPort, Clock, JsonObject, Logger, MetricsPort, Plugins } from "@primusclaw/personal-agent";
|
|
7
|
+
import { type HttpRoute, type SqliteStore } from "@primusclaw/personal-agent-runtime";
|
|
8
|
+
export interface WorkerRoutesParts {
|
|
9
|
+
readonly store: SqliteStore;
|
|
10
|
+
readonly claw: ClawPort;
|
|
11
|
+
readonly clock: Clock;
|
|
12
|
+
readonly metrics: MetricsPort;
|
|
13
|
+
readonly logger: Logger;
|
|
14
|
+
readonly plugins: Plugins;
|
|
15
|
+
/** PROACTIVE_ENABLED: Claw's notifications are taken at /claw-events. */
|
|
16
|
+
readonly proactive: boolean;
|
|
17
|
+
/** TEAMS_CLAW_EVENTS_GONE. */
|
|
18
|
+
readonly gone: boolean;
|
|
19
|
+
readonly deliverEvent: (userId: string, reference: JsonObject, event: JsonObject) => Promise<string>;
|
|
20
|
+
}
|
|
21
|
+
export declare function workerRoutes(parts: WorkerRoutesParts): HttpRoute[];
|
|
22
|
+
/** `/metrics` on its own port: the Prometheus text. */
|
|
23
|
+
export declare function metricsRoutes(render: () => string): HttpRoute[];
|