@mattstack/rt-client 0.11.1 → 0.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -0
- package/dist/client.d.ts +5 -0
- package/dist/commands.d.ts +2 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +81 -9
- package/package.json +2 -2
- package/src/client.ts +24 -0
- package/src/commands.ts +2 -0
- package/src/index.ts +3 -0
- package/src/settings/registry-defs.ts +73 -9
package/README.md
CHANGED
|
@@ -111,6 +111,10 @@ socket. The verbs and their payloads are specified in repo-tools
|
|
|
111
111
|
`docs/superpowers/specs/2026-08-28-rt-chat-delivery-v2-design.md`; the
|
|
112
112
|
agent-facing rules are `skills/rt-chat/SKILL.md`.
|
|
113
113
|
|
|
114
|
+
## Runs
|
|
115
|
+
|
|
116
|
+
`RunStageRow.status` is one of `running | done | failed | redirected`; `rt runs stage-redirect` writes the fourth when the work engine leaves a stage for another one, so a reader that maps statuses to icons or filters must handle all four.
|
|
117
|
+
|
|
114
118
|
## License
|
|
115
119
|
|
|
116
120
|
MIT
|
package/dist/client.d.ts
CHANGED
|
@@ -159,6 +159,11 @@ export declare function chatDmOpen(a: {
|
|
|
159
159
|
export declare function eventsHead(o?: RtClientOptions): Promise<RtResponse<{
|
|
160
160
|
cursor: number;
|
|
161
161
|
}>>;
|
|
162
|
+
export declare function eventsEmit(topic: string, payload?: unknown, o?: RtClientOptions): Promise<RtResponse<{
|
|
163
|
+
id: number;
|
|
164
|
+
}>>;
|
|
165
|
+
export declare function eventsWait(payload: Commands["events:wait"]["payload"], o?: RtClientOptions): Promise<RtResponse<Commands["events:wait"]["data"]>>;
|
|
166
|
+
export declare function eventsList(payload: Commands["events:list"]["payload"], o?: RtClientOptions): Promise<RtResponse<Commands["events:list"]["data"]>>;
|
|
162
167
|
export declare function agentStart(a: Commands["agent:start"]["payload"], o?: RtClientOptions): Promise<RtResponse<AgentRecord>>;
|
|
163
168
|
export declare function agentResume(a: Commands["agent:resume"]["payload"], o?: RtClientOptions): Promise<RtResponse<AgentRecord>>;
|
|
164
169
|
export declare function agentGet(a: {
|
package/dist/commands.d.ts
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { rtCommand, DEFAULT_SOCK } from "./transport.ts";
|
|
2
2
|
export type { RtResponse, RtClientOptions } from "./transport.ts";
|
|
3
|
-
export { readProjectMRs, readDiscussions, readMrsByBranch, readBranchCache, resolveForgeToken, listRuns, getRun, abandonRun, chatJoin, chatLeave, chatAck, chatClaim, chatRelease, chatPost, chatRead, chatRooms, chatWho, chatMark, chatMessages, chatSignIn, chatSignOut, chatAway, chatBack, chatBuddies, chatDm, chatArchive, chatDmOpen, eventsHead, agentStart, agentResume, agentGet, agentList, paneList, panePeek, paneSpawn, paneAccounts, paneDirectories, chatInvite, paneSend, paneFocus, } from "./client.ts";
|
|
3
|
+
export { readProjectMRs, readDiscussions, readMrsByBranch, readBranchCache, resolveForgeToken, listRuns, getRun, abandonRun, chatJoin, chatLeave, chatAck, chatClaim, chatRelease, chatPost, chatRead, chatRooms, chatWho, chatMark, chatMessages, chatSignIn, chatSignOut, chatAway, chatBack, chatBuddies, chatDm, chatArchive, chatDmOpen, eventsHead, eventsEmit, eventsWait, eventsList, agentStart, agentResume, agentGet, agentList, paneList, panePeek, paneSpawn, paneAccounts, paneDirectories, chatInvite, paneSend, paneFocus, } from "./client.ts";
|
|
4
4
|
export { COMMAND_NAMES } from "./commands.ts";
|
|
5
5
|
export type { Discussion, DemandDecl, ProjectMRsScope, ProjectMRsData, DiscussionsData, MrByBranchEntry, MrByBranchData, BranchEnrichment, Commands, CommandName, ForgeSlug, ForgeTokenData, Attention, RunSummary, RunStageRow, RunFieldRow, RunDecisionRow, RunDetail, WakeMode, ChatMember, ChatMessage, ChatClaimOutcome, RoomSummary, BuddyStatus, PresenceRow, AgentRecord, AgentSurface, AgentStatus, ChatPane, PaneAccount, PaneDirectory, InviteResult, PaneDelivery, PaneSendResult, PaneFocusResult, } from "./commands.ts";
|
|
6
6
|
export { subscribe, createRelay, DEFAULT_WS_URL } from "./relay.ts";
|
package/dist/index.js
CHANGED
|
@@ -189,6 +189,18 @@ function chatDmOpen(a, o = {}) {
|
|
|
189
189
|
function eventsHead(o = {}) {
|
|
190
190
|
return rtCommand("events:head", {}, { sockPath: o.sockPath, timeoutMs: o.timeoutMs ?? 1e4 });
|
|
191
191
|
}
|
|
192
|
+
function eventsEmit(topic, payload, o = {}) {
|
|
193
|
+
const p = { topic };
|
|
194
|
+
if (payload !== undefined)
|
|
195
|
+
p.payload = payload;
|
|
196
|
+
return rtCommand("events:emit", p, { sockPath: o.sockPath, timeoutMs: o.timeoutMs ?? 1e4 });
|
|
197
|
+
}
|
|
198
|
+
function eventsWait(payload, o = {}) {
|
|
199
|
+
return rtCommand("events:wait", payload, { sockPath: o.sockPath, timeoutMs: o.timeoutMs ?? 250000 });
|
|
200
|
+
}
|
|
201
|
+
function eventsList(payload, o = {}) {
|
|
202
|
+
return rtCommand("events:list", payload, { sockPath: o.sockPath, timeoutMs: o.timeoutMs ?? 1e4 });
|
|
203
|
+
}
|
|
192
204
|
function agentStart(a, o = {}) {
|
|
193
205
|
const payload = { repo: a.repo, cwd: a.cwd };
|
|
194
206
|
for (const k of ["prompt", "surface", "model", "effort", "account", "label", "caller", "workspace", "tab", "extraArgs"]) {
|
|
@@ -816,6 +828,13 @@ var REGISTRY = [
|
|
|
816
828
|
migrated: true,
|
|
817
829
|
description: "User-confirmed integration hosts (forgeHost, switchboardUrl), written only by an explicit `rt setup <id> connect --host` after that host validates a real credential. The one trusted source a credential is ever sent to — mattstack.integrations' team-declared host is shown to the user but never auto-used for a fetch."
|
|
818
830
|
},
|
|
831
|
+
{
|
|
832
|
+
key: "mattstack.roster",
|
|
833
|
+
type: "array",
|
|
834
|
+
scopes: ["team"],
|
|
835
|
+
merge: "replace",
|
|
836
|
+
description: "The suite-wide team roster: [{username, name?}] GitLab usernames with optional display names. Any suite app that lists people reads this; hiding someone is the app's own overlay (e.g. boxscore.hiddenMembers)."
|
|
837
|
+
},
|
|
819
838
|
{
|
|
820
839
|
key: "claude.marketplaces",
|
|
821
840
|
type: "array",
|
|
@@ -870,7 +889,7 @@ var REGISTRY = [
|
|
|
870
889
|
type: "array",
|
|
871
890
|
scopes: ["team"],
|
|
872
891
|
merge: "replace",
|
|
873
|
-
description: "The authors tab's roster: whose MRs the classic board lists, including hidden-by-default entries. Codeowners tabs list MRs from anyone."
|
|
892
|
+
description: "The authors tab's roster: whose MRs the classic board lists, including hidden-by-default entries. Codeowners tabs list MRs from anyone. The cross-app roster successor is mattstack.roster; this key remains the board's own list until the board adopts it."
|
|
874
893
|
},
|
|
875
894
|
{
|
|
876
895
|
key: "board.title",
|
|
@@ -970,13 +989,6 @@ var REGISTRY = [
|
|
|
970
989
|
merge: "deep",
|
|
971
990
|
description: "Local working directories the board's review/respond/doctor panes launch from."
|
|
972
991
|
},
|
|
973
|
-
{
|
|
974
|
-
key: "board.rtRepos",
|
|
975
|
-
type: "array",
|
|
976
|
-
scopes: ["machine"],
|
|
977
|
-
merge: "replace",
|
|
978
|
-
description: "rt-registered repo names the board resolves MRs against on this machine."
|
|
979
|
-
},
|
|
980
992
|
{
|
|
981
993
|
key: "board.triageMaxConcurrent",
|
|
982
994
|
type: "number",
|
|
@@ -991,6 +1003,62 @@ var REGISTRY = [
|
|
|
991
1003
|
merge: "replace",
|
|
992
1004
|
description: "Local switchboard URL the board's POST /peer/join writer targets."
|
|
993
1005
|
},
|
|
1006
|
+
{
|
|
1007
|
+
key: "boxscore.projects",
|
|
1008
|
+
type: "array",
|
|
1009
|
+
scopes: ["team"],
|
|
1010
|
+
merge: "replace",
|
|
1011
|
+
description: 'GitLab projects boxscore scores, as full paths ("group/project").'
|
|
1012
|
+
},
|
|
1013
|
+
{
|
|
1014
|
+
key: "boxscore.linearDoneStates",
|
|
1015
|
+
type: "array",
|
|
1016
|
+
scopes: ["team"],
|
|
1017
|
+
merge: "replace",
|
|
1018
|
+
description: "Linear workflow state names that count as done. Empty means the completed and canceled state types."
|
|
1019
|
+
},
|
|
1020
|
+
{
|
|
1021
|
+
key: "boxscore.sizeBand",
|
|
1022
|
+
type: "object",
|
|
1023
|
+
scopes: ["team"],
|
|
1024
|
+
merge: "deep",
|
|
1025
|
+
description: "MR size health band in changed lines: {tooSmall, tooLarge}. At or below tooSmall, or above tooLarge, is outside the healthy band."
|
|
1026
|
+
},
|
|
1027
|
+
{
|
|
1028
|
+
key: "boxscore.excludeFilePatterns",
|
|
1029
|
+
type: "array",
|
|
1030
|
+
scopes: ["team"],
|
|
1031
|
+
merge: "replace",
|
|
1032
|
+
description: 'Glob patterns for files excluded from addition/deletion counts (e.g. "**/*.json").'
|
|
1033
|
+
},
|
|
1034
|
+
{
|
|
1035
|
+
key: "boxscore.ignoredMrs",
|
|
1036
|
+
type: "array",
|
|
1037
|
+
scopes: ["team"],
|
|
1038
|
+
merge: "replace",
|
|
1039
|
+
description: 'MRs excluded from all metrics: "!123" or "group/project!123".'
|
|
1040
|
+
},
|
|
1041
|
+
{
|
|
1042
|
+
key: "boxscore.botPatterns",
|
|
1043
|
+
type: "array",
|
|
1044
|
+
scopes: ["team"],
|
|
1045
|
+
merge: "replace",
|
|
1046
|
+
description: "Extra regex sources treated as bot accounts, beyond boxscore's built-in detection."
|
|
1047
|
+
},
|
|
1048
|
+
{
|
|
1049
|
+
key: "boxscore.hiddenMembers",
|
|
1050
|
+
type: "array",
|
|
1051
|
+
scopes: ["user"],
|
|
1052
|
+
merge: "replace",
|
|
1053
|
+
description: "Usernames from mattstack.roster hidden from this developer's leaderboard."
|
|
1054
|
+
},
|
|
1055
|
+
{
|
|
1056
|
+
key: "boxscore.defaultRange",
|
|
1057
|
+
type: "string",
|
|
1058
|
+
scopes: ["user"],
|
|
1059
|
+
merge: "replace",
|
|
1060
|
+
description: 'Default comparison window for the API and CLI when none is given: "7d", "30d", or "90d".'
|
|
1061
|
+
},
|
|
994
1062
|
{
|
|
995
1063
|
key: "gitq.workSlots",
|
|
996
1064
|
type: "object",
|
|
@@ -1032,7 +1100,8 @@ var REGISTRY = [
|
|
|
1032
1100
|
type: "string",
|
|
1033
1101
|
scopes: ["user"],
|
|
1034
1102
|
merge: "replace",
|
|
1035
|
-
|
|
1103
|
+
default: "https://chat.mattstack",
|
|
1104
|
+
description: "Base URL of the chat viewer, no trailing slash; rt chat post and the tail's wake lines end with a link to the room or message. Defaults to the viewer deck serves on the mattstack TLD."
|
|
1036
1105
|
},
|
|
1037
1106
|
{
|
|
1038
1107
|
key: "chat.herdrWorkspace",
|
|
@@ -1935,7 +2004,10 @@ export {
|
|
|
1935
2004
|
getDef,
|
|
1936
2005
|
explainSetting,
|
|
1937
2006
|
expandVariables,
|
|
2007
|
+
eventsWait,
|
|
2008
|
+
eventsList,
|
|
1938
2009
|
eventsHead,
|
|
2010
|
+
eventsEmit,
|
|
1939
2011
|
deriveRepoIdentity,
|
|
1940
2012
|
decidePlacement,
|
|
1941
2013
|
daemonHealth,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mattstack/rt-client",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.13.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"./test/fake-daemon.ts": "./test/fake-daemon.ts"
|
|
19
19
|
},
|
|
20
20
|
"peerDependencies": {
|
|
21
|
-
"@mattstack/glance": ">=0.
|
|
21
|
+
"@mattstack/glance": ">=0.23.0"
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
24
|
"jsonc-parser": "^3.3.1"
|
package/src/client.ts
CHANGED
|
@@ -325,6 +325,30 @@ export function eventsHead(o: RtClientOptions = {}): Promise<RtResponse<{ cursor
|
|
|
325
325
|
return rtCommand<{ cursor: number }>("events:head", {}, { sockPath: o.sockPath, timeoutMs: o.timeoutMs ?? 10_000 });
|
|
326
326
|
}
|
|
327
327
|
|
|
328
|
+
export function eventsEmit(
|
|
329
|
+
topic: string,
|
|
330
|
+
payload?: unknown,
|
|
331
|
+
o: RtClientOptions = {},
|
|
332
|
+
): Promise<RtResponse<{ id: number }>> {
|
|
333
|
+
const p: Record<string, unknown> = { topic };
|
|
334
|
+
if (payload !== undefined) p.payload = payload;
|
|
335
|
+
return rtCommand<{ id: number }>("events:emit", p, { sockPath: o.sockPath, timeoutMs: o.timeoutMs ?? 10_000 });
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
export function eventsWait(
|
|
339
|
+
payload: Commands["events:wait"]["payload"],
|
|
340
|
+
o: RtClientOptions = {},
|
|
341
|
+
): Promise<RtResponse<Commands["events:wait"]["data"]>> {
|
|
342
|
+
return rtCommand<Commands["events:wait"]["data"]>("events:wait", payload, { sockPath: o.sockPath, timeoutMs: o.timeoutMs ?? 250_000 });
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
export function eventsList(
|
|
346
|
+
payload: Commands["events:list"]["payload"],
|
|
347
|
+
o: RtClientOptions = {},
|
|
348
|
+
): Promise<RtResponse<Commands["events:list"]["data"]>> {
|
|
349
|
+
return rtCommand<Commands["events:list"]["data"]>("events:list", payload, { sockPath: o.sockPath, timeoutMs: o.timeoutMs ?? 10_000 });
|
|
350
|
+
}
|
|
351
|
+
|
|
328
352
|
// ─── Agent handoff (rt agent) ─────────────────────────────────────────────
|
|
329
353
|
|
|
330
354
|
export function agentStart(
|
package/src/commands.ts
CHANGED
|
@@ -167,6 +167,8 @@ export interface ChatPane {
|
|
|
167
167
|
agentStatus: AgentStatus;
|
|
168
168
|
sessionId?: string;
|
|
169
169
|
presence?: { handle: string; status: BuddyStatus; rooms: string[] };
|
|
170
|
+
/** herdr's per-pane focus flag; false when herdr itself is backgrounded */
|
|
171
|
+
focused?: boolean;
|
|
170
172
|
}
|
|
171
173
|
|
|
172
174
|
export interface PaneAccount { slot: number; email: string; alias?: string; headroom?: string }
|
package/src/index.ts
CHANGED
|
@@ -288,6 +288,16 @@ export const REGISTRY: readonly SettingDef[] = [
|
|
|
288
288
|
"User-confirmed integration hosts (forgeHost, switchboardUrl), written only by an explicit `rt setup <id> connect --host` after that host validates a real credential. The one trusted source a credential is ever sent to — mattstack.integrations' team-declared host is shown to the user but never auto-used for a fetch.",
|
|
289
289
|
},
|
|
290
290
|
|
|
291
|
+
// --- mattstack (shared team truth) ---------------------------------------
|
|
292
|
+
{
|
|
293
|
+
key: "mattstack.roster",
|
|
294
|
+
type: "array",
|
|
295
|
+
scopes: ["team"],
|
|
296
|
+
merge: "replace",
|
|
297
|
+
description:
|
|
298
|
+
"The suite-wide team roster: [{username, name?}] GitLab usernames with optional display names. Any suite app that lists people reads this; hiding someone is the app's own overlay (e.g. boxscore.hiddenMembers).",
|
|
299
|
+
},
|
|
300
|
+
|
|
291
301
|
// --- claude (installer-lane) --------------------------------------------
|
|
292
302
|
{
|
|
293
303
|
key: "claude.marketplaces",
|
|
@@ -351,7 +361,7 @@ export const REGISTRY: readonly SettingDef[] = [
|
|
|
351
361
|
type: "array",
|
|
352
362
|
scopes: ["team"],
|
|
353
363
|
merge: "replace",
|
|
354
|
-
description: "The authors tab's roster: whose MRs the classic board lists, including hidden-by-default entries. Codeowners tabs list MRs from anyone.",
|
|
364
|
+
description: "The authors tab's roster: whose MRs the classic board lists, including hidden-by-default entries. Codeowners tabs list MRs from anyone. The cross-app roster successor is mattstack.roster; this key remains the board's own list until the board adopts it.",
|
|
355
365
|
},
|
|
356
366
|
{
|
|
357
367
|
key: "board.title",
|
|
@@ -455,13 +465,6 @@ export const REGISTRY: readonly SettingDef[] = [
|
|
|
455
465
|
merge: "deep",
|
|
456
466
|
description: "Local working directories the board's review/respond/doctor panes launch from.",
|
|
457
467
|
},
|
|
458
|
-
{
|
|
459
|
-
key: "board.rtRepos",
|
|
460
|
-
type: "array",
|
|
461
|
-
scopes: ["machine"],
|
|
462
|
-
merge: "replace",
|
|
463
|
-
description: "rt-registered repo names the board resolves MRs against on this machine.",
|
|
464
|
-
},
|
|
465
468
|
{
|
|
466
469
|
key: "board.triageMaxConcurrent",
|
|
467
470
|
type: "number",
|
|
@@ -477,6 +480,66 @@ export const REGISTRY: readonly SettingDef[] = [
|
|
|
477
480
|
description: "Local switchboard URL the board's POST /peer/join writer targets.",
|
|
478
481
|
},
|
|
479
482
|
|
|
483
|
+
// --- boxscore -------------------------------------------------------------
|
|
484
|
+
// No `default` on any boxscore row: fallbacks live in boxscore's app-side
|
|
485
|
+
// read (server/config), so an unset key resolves as absent here.
|
|
486
|
+
{
|
|
487
|
+
key: "boxscore.projects",
|
|
488
|
+
type: "array",
|
|
489
|
+
scopes: ["team"],
|
|
490
|
+
merge: "replace",
|
|
491
|
+
description: "GitLab projects boxscore scores, as full paths (\"group/project\").",
|
|
492
|
+
},
|
|
493
|
+
{
|
|
494
|
+
key: "boxscore.linearDoneStates",
|
|
495
|
+
type: "array",
|
|
496
|
+
scopes: ["team"],
|
|
497
|
+
merge: "replace",
|
|
498
|
+
description: "Linear workflow state names that count as done. Empty means the completed and canceled state types.",
|
|
499
|
+
},
|
|
500
|
+
{
|
|
501
|
+
key: "boxscore.sizeBand",
|
|
502
|
+
type: "object",
|
|
503
|
+
scopes: ["team"],
|
|
504
|
+
merge: "deep",
|
|
505
|
+
description: "MR size health band in changed lines: {tooSmall, tooLarge}. At or below tooSmall, or above tooLarge, is outside the healthy band.",
|
|
506
|
+
},
|
|
507
|
+
{
|
|
508
|
+
key: "boxscore.excludeFilePatterns",
|
|
509
|
+
type: "array",
|
|
510
|
+
scopes: ["team"],
|
|
511
|
+
merge: "replace",
|
|
512
|
+
description: "Glob patterns for files excluded from addition/deletion counts (e.g. \"**/*.json\").",
|
|
513
|
+
},
|
|
514
|
+
{
|
|
515
|
+
key: "boxscore.ignoredMrs",
|
|
516
|
+
type: "array",
|
|
517
|
+
scopes: ["team"],
|
|
518
|
+
merge: "replace",
|
|
519
|
+
description: "MRs excluded from all metrics: \"!123\" or \"group/project!123\".",
|
|
520
|
+
},
|
|
521
|
+
{
|
|
522
|
+
key: "boxscore.botPatterns",
|
|
523
|
+
type: "array",
|
|
524
|
+
scopes: ["team"],
|
|
525
|
+
merge: "replace",
|
|
526
|
+
description: "Extra regex sources treated as bot accounts, beyond boxscore's built-in detection.",
|
|
527
|
+
},
|
|
528
|
+
{
|
|
529
|
+
key: "boxscore.hiddenMembers",
|
|
530
|
+
type: "array",
|
|
531
|
+
scopes: ["user"],
|
|
532
|
+
merge: "replace",
|
|
533
|
+
description: "Usernames from mattstack.roster hidden from this developer's leaderboard.",
|
|
534
|
+
},
|
|
535
|
+
{
|
|
536
|
+
key: "boxscore.defaultRange",
|
|
537
|
+
type: "string",
|
|
538
|
+
scopes: ["user"],
|
|
539
|
+
merge: "replace",
|
|
540
|
+
description: "Default comparison window for the API and CLI when none is given: \"7d\", \"30d\", or \"90d\".",
|
|
541
|
+
},
|
|
542
|
+
|
|
480
543
|
// --- gitq ------------------------------------------------------------------
|
|
481
544
|
{
|
|
482
545
|
key: "gitq.workSlots",
|
|
@@ -521,7 +584,8 @@ export const REGISTRY: readonly SettingDef[] = [
|
|
|
521
584
|
type: "string",
|
|
522
585
|
scopes: ["user"],
|
|
523
586
|
merge: "replace",
|
|
524
|
-
|
|
587
|
+
default: "https://chat.mattstack",
|
|
588
|
+
description: "Base URL of the chat viewer, no trailing slash; rt chat post and the tail's wake lines end with a link to the room or message. Defaults to the viewer deck serves on the mattstack TLD.",
|
|
525
589
|
},
|
|
526
590
|
{
|
|
527
591
|
key: "chat.herdrWorkspace",
|