@onepointfour-packs/flaredeck-agent 0.2.37 → 0.2.39
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/agent.d.ts +42 -3
- package/dist/agent.js +84 -6
- package/dist/agent.js.map +1 -1
- package/dist/automode.js +43 -3
- package/dist/automode.js.map +1 -1
- package/dist/boards.d.ts +72 -0
- package/dist/boards.js +136 -0
- package/dist/boards.js.map +1 -0
- package/dist/branches.d.ts +12 -1
- package/dist/branches.js +13 -3
- package/dist/branches.js.map +1 -1
- package/dist/browser.d.ts +59 -0
- package/dist/browser.js +260 -26
- package/dist/browser.js.map +1 -1
- package/dist/config.d.ts +22 -0
- package/dist/config.js +37 -2
- package/dist/config.js.map +1 -1
- package/dist/credentials.d.ts +217 -0
- package/dist/credentials.js +332 -0
- package/dist/credentials.js.map +1 -0
- package/dist/engine-antigravity.js +2 -0
- package/dist/engine-antigravity.js.map +1 -1
- package/dist/engine-claude.js +14 -2
- package/dist/engine-claude.js.map +1 -1
- package/dist/engine.d.ts +19 -0
- package/dist/engine.js.map +1 -1
- package/dist/environment.d.ts +15 -3
- package/dist/environment.js +79 -9
- package/dist/environment.js.map +1 -1
- package/dist/envtools.d.ts +58 -0
- package/dist/envtools.js +151 -0
- package/dist/envtools.js.map +1 -0
- package/dist/flaredeck-proxy.d.ts +11 -1
- package/dist/flaredeck-proxy.js +27 -1
- package/dist/flaredeck-proxy.js.map +1 -1
- package/dist/flaredeck.d.ts +24 -0
- package/dist/flaredeck.js +20 -0
- package/dist/flaredeck.js.map +1 -1
- package/dist/github.d.ts +2 -0
- package/dist/github.js +4 -0
- package/dist/github.js.map +1 -1
- package/dist/githubauth.d.ts +11 -1
- package/dist/githubauth.js +82 -16
- package/dist/githubauth.js.map +1 -1
- package/dist/hydrate.d.ts +76 -0
- package/dist/hydrate.js +77 -0
- package/dist/hydrate.js.map +1 -0
- package/dist/limits.d.ts +184 -0
- package/dist/limits.js +251 -0
- package/dist/limits.js.map +1 -0
- package/dist/main.js +177 -33
- package/dist/main.js.map +1 -1
- package/dist/picker.d.ts +10 -0
- package/dist/picker.js +150 -0
- package/dist/picker.js.map +1 -0
- package/dist/preflight.d.ts +43 -0
- package/dist/preflight.js +133 -19
- package/dist/preflight.js.map +1 -1
- package/dist/repopicker.js +8 -96
- package/dist/repopicker.js.map +1 -1
- package/dist/runs.d.ts +19 -4
- package/dist/runs.js +74 -9
- package/dist/runs.js.map +1 -1
- package/dist/serve.d.ts +6 -0
- package/dist/serve.js +1152 -138
- package/dist/serve.js.map +1 -1
- package/dist/session.d.ts +51 -0
- package/dist/session.js +145 -0
- package/dist/session.js.map +1 -0
- package/dist/settle.d.ts +18 -0
- package/dist/settle.js +39 -0
- package/dist/settle.js.map +1 -0
- package/dist/signin.d.ts +47 -0
- package/dist/signin.js +331 -0
- package/dist/signin.js.map +1 -0
- package/dist/stream.d.ts +8 -0
- package/dist/stream.js +44 -3
- package/dist/stream.js.map +1 -1
- package/dist/subscriptions.d.ts +115 -0
- package/dist/subscriptions.js +140 -0
- package/dist/subscriptions.js.map +1 -0
- package/dist/team.js +7 -1
- package/dist/team.js.map +1 -1
- package/dist/tmux.d.ts +1 -0
- package/dist/tmux.js +47 -0
- package/dist/tmux.js.map +1 -0
- package/dist/ui.d.ts +13 -0
- package/dist/ui.js +7 -2
- package/dist/ui.js.map +1 -1
- package/dist/usage.d.ts +105 -0
- package/dist/usage.js +348 -0
- package/dist/usage.js.map +1 -0
- package/dist/wall.d.ts +35 -0
- package/dist/wall.js +94 -0
- package/dist/wall.js.map +1 -0
- package/dist/workspace.d.ts +15 -1
- package/dist/workspace.js +25 -1
- package/dist/workspace.js.map +1 -1
- package/dist/worktree.d.ts +19 -0
- package/dist/worktree.js +179 -4
- package/dist/worktree.js.map +1 -1
- package/package.json +1 -1
package/dist/agent.d.ts
CHANGED
|
@@ -56,9 +56,21 @@ runs?: ToolSet,
|
|
|
56
56
|
/** Recurring tasks. Asking is harmless: a person's approval is what starts one. */
|
|
57
57
|
schedules?: ToolSet,
|
|
58
58
|
/** The Jev gate, when this machine has a key for it. See jevguard.ts. */
|
|
59
|
-
guard?: Partial<Record<HookEvent, HookCallbackMatcher[]
|
|
59
|
+
guard?: Partial<Record<HookEvent, HookCallbackMatcher[]>>,
|
|
60
|
+
/**
|
|
61
|
+
* Servers the harness builds per card rather than per agent — the browser, and the tool that
|
|
62
|
+
* starts the environment. A record, not two more positional arguments, because this signature
|
|
63
|
+
* taking eleven of them is exactly how they went missing: serve.ts built both, logged "open_page
|
|
64
|
+
* opens it by default", put them on engineContext.tools, and the engine had nowhere to pass them,
|
|
65
|
+
* so they were dropped in silence. Measured across 96 card logs: mcp__flaredeck__*, mcp__runs__*
|
|
66
|
+
* and the rest all appear; mcp__browser__* and mcp__env__* appear zero times. Anything added here
|
|
67
|
+
* from now on is mounted by being named, not by someone remembering to widen a call.
|
|
68
|
+
*/
|
|
69
|
+
local?: Record<string, ToolSet | undefined>,
|
|
70
|
+
/** The Claude subscription FlareDeck picked for this run. Absent = this machine's own login. */
|
|
71
|
+
claudeToken?: string): Options;
|
|
60
72
|
/** process.env minus the one variable that would silently switch us to metered billing. */
|
|
61
|
-
export declare function subscriptionEnv(): Record<string, string | undefined>;
|
|
73
|
+
export declare function subscriptionEnv(claudeToken?: string): Record<string, string | undefined>;
|
|
62
74
|
/**
|
|
63
75
|
* A tool call the agent made or tried to make. The supervisor will read these; for now they are
|
|
64
76
|
* what the CLI prints. Deriving them here rather than logging inline keeps the stream one thing
|
|
@@ -104,6 +116,33 @@ export type AgentEvent = {
|
|
|
104
116
|
kind: 'usage';
|
|
105
117
|
contextTokens: number;
|
|
106
118
|
}
|
|
119
|
+
/**
|
|
120
|
+
* What the subscription behind this run has left.
|
|
121
|
+
*
|
|
122
|
+
* The ONLY live source: `SDKRateLimitEvent` arrives on the message stream while a run is going.
|
|
123
|
+
* There is no way to ask — `rate_limits` belongs to a control request the Query interface does
|
|
124
|
+
* not expose, and the init message carries none of it. So utilisation is known when a run
|
|
125
|
+
* happens to be told, and is stale between runs. Anything scheduling on it has to treat the
|
|
126
|
+
* reading's age as part of the reading.
|
|
127
|
+
*
|
|
128
|
+
* `status` matters more than it looks: 'allowed_warning' arrives while the plan is still
|
|
129
|
+
* WORKING. Treating it as 'rejected' would retire every subscription at roughly half capacity
|
|
130
|
+
* and leave the agents with nothing while every account still had headroom.
|
|
131
|
+
*/
|
|
132
|
+
| {
|
|
133
|
+
kind: 'limits';
|
|
134
|
+
/** True only when the plan is actually OUT. A warning is not a rejection — see limits.ts. */
|
|
135
|
+
spent: boolean;
|
|
136
|
+
/** 'five_hour', 'seven_day', 'seven_day_opus'… the SDK's own names, unchanged. */
|
|
137
|
+
window?: string;
|
|
138
|
+
/** Epoch ms, from the server, so every agent reports the same absolute moment. */
|
|
139
|
+
resetsAt?: number;
|
|
140
|
+
/** 0-100 where the SDK gave it. */
|
|
141
|
+
utilization?: number;
|
|
142
|
+
/** Which signal saw it, so a surprising rotation can be traced back to its evidence. */
|
|
143
|
+
source?: string;
|
|
144
|
+
why?: string;
|
|
145
|
+
}
|
|
107
146
|
/** The SDK compacted the context mid-turn. It keeps the session alive by throwing detail away. */
|
|
108
147
|
| {
|
|
109
148
|
kind: 'compacted';
|
|
@@ -125,4 +164,4 @@ export type AgentEvent = {
|
|
|
125
164
|
* progress — steering it rather than interrupting and starting again, which would throw away
|
|
126
165
|
* whatever it had worked out so far.
|
|
127
166
|
*/
|
|
128
|
-
export declare function runTask(prompt: string, options: Options, onStart?: (q: ReturnType<typeof query>) => void): AsyncGenerator<AgentEvent>;
|
|
167
|
+
export declare function runTask(prompt: string | AsyncIterable<Record<string, unknown>>, options: Options, onStart?: (q: ReturnType<typeof query>) => void): AsyncGenerator<AgentEvent>;
|
package/dist/agent.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { query } from '@anthropic-ai/claude-agent-sdk';
|
|
2
2
|
import { writeAutoModeSettings } from './automode.js';
|
|
3
3
|
import { gitGuard } from './gitguard.js';
|
|
4
|
+
import { limitFromMessage, usageFromMessage, windowsFromRateLimit } from './limits.js';
|
|
4
5
|
import { secretGuard } from './secretguard.js';
|
|
5
6
|
import { sandboxGuard } from './sandbox.js';
|
|
6
7
|
import { readToolNames } from './permissions.js';
|
|
@@ -167,7 +168,19 @@ runs,
|
|
|
167
168
|
/** Recurring tasks. Asking is harmless: a person's approval is what starts one. */
|
|
168
169
|
schedules,
|
|
169
170
|
/** The Jev gate, when this machine has a key for it. See jevguard.ts. */
|
|
170
|
-
guard
|
|
171
|
+
guard,
|
|
172
|
+
/**
|
|
173
|
+
* Servers the harness builds per card rather than per agent — the browser, and the tool that
|
|
174
|
+
* starts the environment. A record, not two more positional arguments, because this signature
|
|
175
|
+
* taking eleven of them is exactly how they went missing: serve.ts built both, logged "open_page
|
|
176
|
+
* opens it by default", put them on engineContext.tools, and the engine had nowhere to pass them,
|
|
177
|
+
* so they were dropped in silence. Measured across 96 card logs: mcp__flaredeck__*, mcp__runs__*
|
|
178
|
+
* and the rest all appear; mcp__browser__* and mcp__env__* appear zero times. Anything added here
|
|
179
|
+
* from now on is mounted by being named, not by someone remembering to widen a call.
|
|
180
|
+
*/
|
|
181
|
+
local,
|
|
182
|
+
/** The Claude subscription FlareDeck picked for this run. Absent = this machine's own login. */
|
|
183
|
+
claudeToken) {
|
|
171
184
|
return {
|
|
172
185
|
systemPrompt: {
|
|
173
186
|
type: 'preset',
|
|
@@ -180,7 +193,7 @@ guard) {
|
|
|
180
193
|
// per-token key is a bill nobody agreed to — so the key is removed from the environment the
|
|
181
194
|
// Claude process gets rather than merely warned about. `env` REPLACES the subprocess
|
|
182
195
|
// environment, so everything else is passed through deliberately.
|
|
183
|
-
env: subscriptionEnv(),
|
|
196
|
+
env: subscriptionEnv(claudeToken),
|
|
184
197
|
// Isolation. Without this the agent inherits whatever Claude Code is configured with on this
|
|
185
198
|
// box — on a developer's machine that meant ten other MCP servers and 473 tools, and Flaredeck
|
|
186
199
|
// itself then timed out competing with them to connect. An agent must behave the same on every
|
|
@@ -228,7 +241,7 @@ guard) {
|
|
|
228
241
|
* .mcp.json written into the repo, and pre-approving it in the CLI's own config, each of
|
|
229
242
|
* which broke in its own way first.
|
|
230
243
|
*/
|
|
231
|
-
mcpServers: mcpServers(config, token, { git, team, runs, schedules }, flaredeck),
|
|
244
|
+
mcpServers: mcpServers(config, token, { git, team, runs, schedules, ...local }, flaredeck),
|
|
232
245
|
// Only the servers named above. A repo's own .mcp.json, agent frontmatter or plugin could
|
|
233
246
|
// declare a server with the same name and shadow the one that carries the token; this makes
|
|
234
247
|
// that impossible rather than merely unlikely.
|
|
@@ -278,10 +291,28 @@ guard) {
|
|
|
278
291
|
};
|
|
279
292
|
}
|
|
280
293
|
/** process.env minus the one variable that would silently switch us to metered billing. */
|
|
281
|
-
export function subscriptionEnv() {
|
|
282
|
-
|
|
294
|
+
export function subscriptionEnv(claudeToken) {
|
|
295
|
+
/* BOTH, not just the API key. The SDK treats ANTHROPIC_AUTH_TOKEN as a credential source in
|
|
296
|
+
its own right — 43 references in the shipped CLI — so a stale one left in a shell can
|
|
297
|
+
out-compete the subscription this run was just assigned, and the only hint would be
|
|
298
|
+
`apiKeySource` in an init message nobody reads. Stripping one and not the other left a
|
|
299
|
+
second door open to exactly the billing surprise the first strip exists to prevent. */
|
|
300
|
+
const { ANTHROPIC_API_KEY: _key, ANTHROPIC_AUTH_TOKEN: _tok, ...rest } = process.env;
|
|
283
301
|
return {
|
|
284
302
|
...rest,
|
|
303
|
+
/**
|
|
304
|
+
* Which Claude subscription this run bills against.
|
|
305
|
+
*
|
|
306
|
+
* Chosen per run by FlareDeck, which holds the tokens and the usage ledger, so one person's
|
|
307
|
+
* `claude setup-token` serves every machine instead of each one being logged in by hand —
|
|
308
|
+
* the thing that made three subscriptions across twenty agents a manual chore.
|
|
309
|
+
*
|
|
310
|
+
* Absent means "use whatever this machine is logged in as", which is the behaviour every
|
|
311
|
+
* agent had before and the right fallback: an unreachable vault must not stop work. What it
|
|
312
|
+
* must NEVER do is fall through to metered billing, and it cannot — ANTHROPIC_API_KEY is
|
|
313
|
+
* stripped above, deliberately, so that switch is never thrown by accident.
|
|
314
|
+
*/
|
|
315
|
+
...(claudeToken ? { CLAUDE_CODE_OAUTH_TOKEN: claudeToken } : {}),
|
|
285
316
|
// Flaredeck is the one server that must be up before the first turn: an agent that starts
|
|
286
317
|
// without it looks healthy and can't touch a card. The default first-turn wait gave up on it
|
|
287
318
|
// after 5 seconds, so wait properly rather than racing a cold remote server.
|
|
@@ -302,7 +333,7 @@ export function subscriptionEnv() {
|
|
|
302
333
|
* whatever it had worked out so far.
|
|
303
334
|
*/
|
|
304
335
|
export async function* runTask(prompt, options, onStart) {
|
|
305
|
-
const running = query({ prompt, options });
|
|
336
|
+
const running = query({ prompt: prompt, options });
|
|
306
337
|
onStart?.(running);
|
|
307
338
|
let lastContext = 0;
|
|
308
339
|
for await (const message of running) {
|
|
@@ -315,6 +346,53 @@ export async function* runTask(prompt, options, onStart) {
|
|
|
315
346
|
yield { kind: 'usage', contextTokens: n };
|
|
316
347
|
}
|
|
317
348
|
}
|
|
349
|
+
/**
|
|
350
|
+
* Detection lives in limits.ts, not here.
|
|
351
|
+
*
|
|
352
|
+
* A hand-rolled check on `rate_limit_event` — which is what this was — catches ONE of the
|
|
353
|
+
* four ways the SDK reports a cap. The others are an assistant error, the result text and a
|
|
354
|
+
* synthetic assistant message, and limits.ts matches those against the SDK's own exported
|
|
355
|
+
* prefix lists rather than invented strings. It also rules out warnings first: "You've used
|
|
356
|
+
* 80% of your limit" and "You've hit your limit" differ by one word and mean opposite
|
|
357
|
+
* things, and acting on the first would retire every subscription at half capacity.
|
|
358
|
+
*/
|
|
359
|
+
/* Every rate_limit_event carries both windows' utilisation — the one usage source a
|
|
360
|
+
setup-token has. Reported whatever the status; a rejection is ALSO reported below as spent. */
|
|
361
|
+
for (const w of windowsFromRateLimit(message)) {
|
|
362
|
+
yield { kind: 'limits', spent: false, window: w.window, utilization: w.utilization, ...(w.resetsAt ? { resetsAt: w.resetsAt } : {}), source: 'rate_limit_event' };
|
|
363
|
+
}
|
|
364
|
+
const hit = limitFromMessage(message);
|
|
365
|
+
if (hit) {
|
|
366
|
+
yield {
|
|
367
|
+
kind: 'limits',
|
|
368
|
+
spent: true,
|
|
369
|
+
window: hit.window,
|
|
370
|
+
...(typeof hit.resetsAt === 'number' ? { resetsAt: hit.resetsAt } : {}),
|
|
371
|
+
...(typeof hit.utilization === 'number' ? { utilization: hit.utilization } : {}),
|
|
372
|
+
source: hit.source,
|
|
373
|
+
why: hit.why,
|
|
374
|
+
};
|
|
375
|
+
}
|
|
376
|
+
else {
|
|
377
|
+
/* A reading carries every window at once, so it becomes one event each. Windows whose
|
|
378
|
+
utilisation is null are skipped rather than sent as 0 — null means NOBODY CAN TELL, and
|
|
379
|
+
a plan that cannot be measured must not be routed to as though it were empty. */
|
|
380
|
+
const reading = usageFromMessage(message);
|
|
381
|
+
if (reading?.rateLimitsAvailable) {
|
|
382
|
+
for (const [window, w] of Object.entries(reading.windows)) {
|
|
383
|
+
if (typeof w.utilization !== 'number')
|
|
384
|
+
continue;
|
|
385
|
+
yield {
|
|
386
|
+
kind: 'limits',
|
|
387
|
+
spent: false,
|
|
388
|
+
window,
|
|
389
|
+
utilization: w.utilization,
|
|
390
|
+
...(typeof w.resetsAt === 'number' ? { resetsAt: w.resetsAt } : {}),
|
|
391
|
+
source: 'usage_report',
|
|
392
|
+
};
|
|
393
|
+
}
|
|
394
|
+
}
|
|
395
|
+
}
|
|
318
396
|
if (m['type'] === 'system' && m['subtype'] === 'compact_boundary')
|
|
319
397
|
yield { kind: 'compacted' };
|
|
320
398
|
if (m['type'] === 'system' && m['subtype'] === 'init') {
|
package/dist/agent.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent.js","sourceRoot":"","sources":["../src/agent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAA2E,MA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AC,QAAQ,CAAC,IAAI,EAAE;gBACzB,GAAG,CAAC,WAAW,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,aAAa,EAAE,WAAW,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;aAC3D,CAAC;QACJ,CAAC;IACH,CAAC;AACH,CAAC"}
|
package/dist/automode.js
CHANGED
|
@@ -33,6 +33,9 @@ function environmentEntries(env) {
|
|
|
33
33
|
'assignee, labels, notes — are metadata on a ticket: setting a card\'s Environment to ' +
|
|
34
34
|
'"Production" records where a bug was seen and deploys nothing, touches no server and no ' +
|
|
35
35
|
'database. Only commands and scripts aimed at the targets below are production operations.',
|
|
36
|
+
'The project\'s own .flaredeck/start.sh, run with no argument or with `down`, starts or stops ' +
|
|
37
|
+
'THIS worktree\'s own local test environment (its api, app and scratch database) and nothing ' +
|
|
38
|
+
'else. Stopping it is routine cleanup, not interfering with anyone\'s workload.',
|
|
36
39
|
`Sensitive remote targets: ${env.sensitiveTargets.join('; ')}. Treat anything else as ` +
|
|
37
40
|
`ordinary development infrastructure.`,
|
|
38
41
|
];
|
|
@@ -56,14 +59,51 @@ export function writeAutoModeSettings(config, env = DEFAULT_ENVIRONMENT) {
|
|
|
56
59
|
// exactly what an agent that must behave the same wherever it starts cannot depend on.
|
|
57
60
|
// Its memory lives on its FlareDeck account instead (see `remember`), and the brief says so.
|
|
58
61
|
autoMemoryEnabled: false,
|
|
62
|
+
/**
|
|
63
|
+
* When a usage limit stops a session, do NOT sit and wait for the window to reset.
|
|
64
|
+
*
|
|
65
|
+
* The SDK's own description: "wait for the limit to reset and continue the task
|
|
66
|
+
* automatically". For a person at a terminal that is a kindness; for an unattended
|
|
67
|
+
* fleet it is the thing that defeats rotation entirely — the run parks for hours
|
|
68
|
+
* holding a spent subscription, never reports the cap, and the other two plans sit
|
|
69
|
+
* idle while the card looks like it is still working. Ending lets the harness notice,
|
|
70
|
+
* mark the plan spent and route the retry elsewhere, which is the whole point.
|
|
71
|
+
*/
|
|
72
|
+
autoContinueAtUsageLimit: false,
|
|
59
73
|
permissions: {
|
|
60
74
|
// Evaluated BEFORE the classifier and always prompt, even in auto mode — which in this
|
|
61
75
|
// harness means they reach canUseTool, and so the team lead. These are the calls worth
|
|
62
76
|
// a person's attention rather than a judgement in the moment.
|
|
63
77
|
ask: ['Bash(git push *)', 'Bash(gh pr create *)'],
|
|
64
|
-
//
|
|
65
|
-
//
|
|
66
|
-
|
|
78
|
+
// Its own environment, up or down. The classifier refused `start.sh down` as "stopping
|
|
79
|
+
// services", which is how a day of environments was left running.
|
|
80
|
+
allow: [
|
|
81
|
+
'Bash(bash .flaredeck/start.sh)', 'Bash(bash .flaredeck/start.sh *)',
|
|
82
|
+
'Bash(.flaredeck/start.sh)', 'Bash(.flaredeck/start.sh *)',
|
|
83
|
+
],
|
|
84
|
+
/**
|
|
85
|
+
* Nothing denied here, deliberately.
|
|
86
|
+
*
|
|
87
|
+
* This denied Edit and Write on every .flaredeck directory, so a script pre-approved to
|
|
88
|
+
* RUN could not also be rewritten — pre-approved execution plus write access is
|
|
89
|
+
* pre-approved arbitrary code, which is a real objection.
|
|
90
|
+
*
|
|
91
|
+
* It was still the wrong rule. `start_environment` tells an agent whose environment
|
|
92
|
+
* will not come up to "change the START SCRIPT so it works next time, commit it", and
|
|
93
|
+
* the whole point of that tool is that an agent with NO start script writes one. A deny
|
|
94
|
+
* rule cannot be overridden by the classifier, by stated intent, or by a hook, so the
|
|
95
|
+
* harness was instructing agents to do the one thing it made impossible — on the single
|
|
96
|
+
* most common reason a card stalls. One of the two had to go.
|
|
97
|
+
*
|
|
98
|
+
* And what the deny protected is thinner than it looks: the agent can write any other
|
|
99
|
+
* script and run it through the decider, so the rule bought a detour, not a boundary.
|
|
100
|
+
* What protects the irrecoverable thing — the repository — is gitGuard, which routes
|
|
101
|
+
* every push through `push_branch` and blocks remote reconfiguration, and sandboxGuard,
|
|
102
|
+
* which keeps writes inside this card's worktree. Those are PreToolUse hooks: they run
|
|
103
|
+
* BEFORE the permission mode and hold whatever it is set to, which is why they, and not
|
|
104
|
+
* a deny rule on a shell script, are the guardrail.
|
|
105
|
+
*/
|
|
106
|
+
deny: [],
|
|
67
107
|
},
|
|
68
108
|
}, null, 2)}\n`, 'utf8');
|
|
69
109
|
return path;
|
package/dist/automode.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"automode.js","sourceRoot":"","sources":["../src/automode.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAE1C,OAAO,EAAE,UAAU,EAAe,MAAM,aAAa,CAAC;AAwBtD,MAAM,CAAC,MAAM,mBAAmB,GAAgB;IAC9C,YAAY,EAAE,uBAAuB;IACrC,cAAc,EAAE,CAAC,mBAAmB,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,oBAAoB,CAAC;IACpG,yFAAyF;IACzF,qFAAqF;IACrF,gBAAgB,EAAE,CAAC,MAAM,EAAE,SAAS,EAAE,gDAAgD,CAAC;IACvF,SAAS,EAAE,IAAI;CAChB,CAAC;AAEF,SAAS,kBAAkB,CAAC,GAAgB;IAC1C,OAAO;QACL,WAAW;QACX,iBAAiB,GAAG,CAAC,YAAY,4DAA4D;YAC3F,yFAAyF;QAC3F,GAAG,CAAC,GAAG,CAAC,SAAS;YACf,CAAC,CAAC;gBACE,qFAAqF;gBACrF,uFAAuF;gBACvF,uDAAuD;gBACvD,kFAAkF;oBAChF,oFAAoF;oBACpF,mFAAmF;oBACnF,qFAAqF;oBACrF,6EAA6E;aAChF;YACH,CAAC,CAAC,EAAE,CAAC;QACP,6BAA6B,GAAG,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE;QAC5D,2FAA2F;YACzF,0FAA0F;YAC1F,sFAAsF;YACtF,uFAAuF;YACvF,0FAA0F;YAC1F,2FAA2F;QAC7F,6BAA6B,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,uFAAuF;YACvF,8DAA8D;YAC9D,GAAG,EAAE,CAAC,kBAAkB,EAAE,sBAAsB,CAAC;YACjD,uFAAuF;YACvF,kEAAkE;YAClE,KAAK,EAAE;gBACL,gCAAgC,EAAE,kCAAkC;gBACpE,2BAA2B,EAAE,6BAA6B;aAC3D;YACD;;;;;;;;;;;;;;;;;;;;;eAqBG;YACH,IAAI,EAAE,EAAE;SACT;KACF,EACD,IAAI,EACJ,CAAC,CACF,IAAI,EACL,MAAM,CACP,CAAC;IACF,OAAO,IAAI,CAAC;AACd,CAAC"}
|
package/dist/boards.d.ts
ADDED
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
export type BoardSeen = {
|
|
2
|
+
key: string;
|
|
3
|
+
name: string;
|
|
4
|
+
prefix: string;
|
|
5
|
+
tenant: string;
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* Pull the account's boards out of `list-boards`.
|
|
9
|
+
*
|
|
10
|
+
* It answers in markdown for a person to read, which is the only interface there is, so this
|
|
11
|
+
* parses it — and returns nothing rather than guessing if the shape ever changes. A login that
|
|
12
|
+
* cannot offer the list keeps the old behaviour (every board), which is the safe direction: an
|
|
13
|
+
* agent that hears about too much is noisy, one scoped to a board it cannot see is deaf.
|
|
14
|
+
*/
|
|
15
|
+
export declare function parseBoards(text: string): BoardSeen[];
|
|
16
|
+
/**
|
|
17
|
+
* Ask, and return what to save. Null when there was nothing to ask or nobody to answer, which
|
|
18
|
+
* leaves whatever is already in the config alone.
|
|
19
|
+
*/
|
|
20
|
+
export declare function askBoards(
|
|
21
|
+
/**
|
|
22
|
+
* Fetches the board list. Passed in rather than imported, so this module stays free of the
|
|
23
|
+
* proxy — it also holds the rules the proxy itself needs, and the two importing each other is
|
|
24
|
+
* a cycle nobody benefits from.
|
|
25
|
+
*/
|
|
26
|
+
list: () => Promise<string>, say: (s: string) => void, already?: readonly {
|
|
27
|
+
key: string;
|
|
28
|
+
name: string;
|
|
29
|
+
}[]): Promise<{
|
|
30
|
+
key: string;
|
|
31
|
+
name: string;
|
|
32
|
+
}[] | null>;
|
|
33
|
+
/**
|
|
34
|
+
* Is this event on a board this agent works? `mine` empty means every board.
|
|
35
|
+
*
|
|
36
|
+
* An event with no board — a direct message, a scheduled run, a question typed in the pane —
|
|
37
|
+
* always comes through. Somebody addressing this agent personally is addressing it whatever board
|
|
38
|
+
* they were looking at, and an agent that cannot be reached is worse than one that is noisy.
|
|
39
|
+
*
|
|
40
|
+
* Pure, and here rather than inside the daemon, so the test exercises the rule the daemon uses
|
|
41
|
+
* instead of a second copy of it that can drift.
|
|
42
|
+
*/
|
|
43
|
+
export declare function onMyBoards(mine: ReadonlySet<string>, event: {
|
|
44
|
+
boardKey?: string;
|
|
45
|
+
}): boolean;
|
|
46
|
+
/**
|
|
47
|
+
* How to ask an account-wide tool for just these boards.
|
|
48
|
+
*
|
|
49
|
+
* One board goes as a plain string: the server can then use its (boardId, done, updatedAt) index
|
|
50
|
+
* instead of filtering in memory, and a server deployed before the list form does `board.trim()`,
|
|
51
|
+
* which an array would throw on. The harness updates itself and the function it talks to is
|
|
52
|
+
* deployed separately — they are never in step, so the older shape is used wherever it fits.
|
|
53
|
+
*/
|
|
54
|
+
export declare function boardArg(boards: readonly string[]): string | string[] | undefined;
|
|
55
|
+
export type OutstandingCard = {
|
|
56
|
+
code: string;
|
|
57
|
+
boardKey: string;
|
|
58
|
+
cardKey: string;
|
|
59
|
+
tenantId: string;
|
|
60
|
+
};
|
|
61
|
+
/**
|
|
62
|
+
* The cards in a `get-outstanding` answer, read from the fields it prints rather than guessed
|
|
63
|
+
* from the shape of a card code.
|
|
64
|
+
*
|
|
65
|
+
* It used to be a regex for the code alone — `[A-Z][A-Z0-9]{1,9}-\d{3,}` — which capped the
|
|
66
|
+
* prefix at ten characters, so a board like DOCUMENTREPOSITOR was invisible to it, and which
|
|
67
|
+
* could not tell which BOARD a card was on at all. Each block names both:
|
|
68
|
+
*
|
|
69
|
+
* ### 1. ⭐ [KD-1362] Some card
|
|
70
|
+
* - **IDs**: board=`...` card=`...` tenant=`...`
|
|
71
|
+
*/
|
|
72
|
+
export declare function outstandingCards(text: string): OutstandingCard[];
|
package/dist/boards.js
ADDED
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Which boards this agent works.
|
|
3
|
+
*
|
|
4
|
+
* An agent was only ever bound to a TENANT. Signed in as a person, or as an account with broad
|
|
5
|
+
* access, it woke for every card and every message on every board that account could see — on
|
|
6
|
+
* this machine, twenty-one boards across nine tenants. The cost is not noise on a screen: every
|
|
7
|
+
* one of those is a turn, and a turn is context and money. A test agent spent 23k of context
|
|
8
|
+
* reaching the conclusion that a two-week-old message on another team's board needed no reply.
|
|
9
|
+
*
|
|
10
|
+
* Asked at login, with the real list, and saved by key. Nothing picked means every board, which
|
|
11
|
+
* is what every install did before this existed.
|
|
12
|
+
*/
|
|
13
|
+
import { pickMany } from './picker.js';
|
|
14
|
+
/**
|
|
15
|
+
* Pull the account's boards out of `list-boards`.
|
|
16
|
+
*
|
|
17
|
+
* It answers in markdown for a person to read, which is the only interface there is, so this
|
|
18
|
+
* parses it — and returns nothing rather than guessing if the shape ever changes. A login that
|
|
19
|
+
* cannot offer the list keeps the old behaviour (every board), which is the safe direction: an
|
|
20
|
+
* agent that hears about too much is noisy, one scoped to a board it cannot see is deaf.
|
|
21
|
+
*/
|
|
22
|
+
export function parseBoards(text) {
|
|
23
|
+
const out = [];
|
|
24
|
+
// ### 3. Bird Test (BIR)
|
|
25
|
+
// - **Board ID**: `-Nfu4b8oysFXt43xZRrP` · **Tenant**: `phiresky-XjajBeaKtYN41nlNVcAE`
|
|
26
|
+
const blocks = text.split(/^### /m).slice(1);
|
|
27
|
+
for (const b of blocks) {
|
|
28
|
+
const head = b.split('\n')[0] ?? '';
|
|
29
|
+
const name = head.replace(/^\d+\.\s*/, '').replace(/\s*\([^)]*\)\s*$/, '').trim();
|
|
30
|
+
const prefix = (head.match(/\(([^)]+)\)\s*$/)?.[1] ?? '').trim();
|
|
31
|
+
const key = (b.match(/\*\*Board ID\*\*:\s*`([^`]+)`/)?.[1] ?? '').trim();
|
|
32
|
+
const tenant = (b.match(/\*\*Tenant\*\*:\s*`([^`]+)`/)?.[1] ?? '').trim();
|
|
33
|
+
if (key && name)
|
|
34
|
+
out.push({ key, name, prefix, tenant });
|
|
35
|
+
}
|
|
36
|
+
return out;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Ask, and return what to save. Null when there was nothing to ask or nobody to answer, which
|
|
40
|
+
* leaves whatever is already in the config alone.
|
|
41
|
+
*/
|
|
42
|
+
export async function askBoards(
|
|
43
|
+
/**
|
|
44
|
+
* Fetches the board list. Passed in rather than imported, so this module stays free of the
|
|
45
|
+
* proxy — it also holds the rules the proxy itself needs, and the two importing each other is
|
|
46
|
+
* a cycle nobody benefits from.
|
|
47
|
+
*/
|
|
48
|
+
list, say, already) {
|
|
49
|
+
let seen = [];
|
|
50
|
+
try {
|
|
51
|
+
seen = parseBoards(await list());
|
|
52
|
+
}
|
|
53
|
+
catch (e) {
|
|
54
|
+
say(` Could not list boards (${e instanceof Error ? e.message : String(e)}) — leaving this agent on every board.`);
|
|
55
|
+
return null;
|
|
56
|
+
}
|
|
57
|
+
if (seen.length < 2) {
|
|
58
|
+
if (seen.length === 1)
|
|
59
|
+
say(` One board on this account: ${seen[0].name}.`);
|
|
60
|
+
return null;
|
|
61
|
+
}
|
|
62
|
+
const prior = already?.length ? new Set(already.map((b) => b.key)) : null;
|
|
63
|
+
// Everything, when nothing was chosen before — the same scope the agent had until now, so a
|
|
64
|
+
// person who presses enter changes nothing.
|
|
65
|
+
const initial = new Set(seen.filter((b) => (prior ? prior.has(b.key) : true)).map((b) => b.key));
|
|
66
|
+
if (!process.stdin.isTTY) {
|
|
67
|
+
const kept = seen.filter((b) => initial.has(b.key));
|
|
68
|
+
say(`\n Not a terminal, so nothing was asked — keeping ${kept.length} of ${seen.length} boards.`);
|
|
69
|
+
return kept.length === seen.length ? [] : kept.map((b) => ({ key: b.key, name: b.name }));
|
|
70
|
+
}
|
|
71
|
+
// Several tenants is the case worth showing: it is how an agent ends up woken by a board that
|
|
72
|
+
// belongs to another client entirely.
|
|
73
|
+
const tenants = new Set(seen.map((b) => b.tenant)).size;
|
|
74
|
+
const picked = await pickMany('Which boards does this agent work?', `${seen.length} on this account${tenants > 1 ? ` across ${tenants} tenants` : ''}`, seen.map((b) => ({
|
|
75
|
+
id: b.key,
|
|
76
|
+
label: b.name,
|
|
77
|
+
note: [b.prefix, tenants > 1 ? b.tenant.replace(/-\d{10,}$/, '') : ''].filter(Boolean).join(' · '),
|
|
78
|
+
})), initial);
|
|
79
|
+
if (!picked)
|
|
80
|
+
return null;
|
|
81
|
+
// Every board ticked is the same as no restriction, and saying so beats a saved list that has
|
|
82
|
+
// to be maintained in step with the account.
|
|
83
|
+
if (picked.length === seen.length)
|
|
84
|
+
return [];
|
|
85
|
+
const byKey = new Map(seen.map((b) => [b.key, b.name]));
|
|
86
|
+
return picked.map((key) => ({ key, name: byKey.get(key) ?? key }));
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* Is this event on a board this agent works? `mine` empty means every board.
|
|
90
|
+
*
|
|
91
|
+
* An event with no board — a direct message, a scheduled run, a question typed in the pane —
|
|
92
|
+
* always comes through. Somebody addressing this agent personally is addressing it whatever board
|
|
93
|
+
* they were looking at, and an agent that cannot be reached is worse than one that is noisy.
|
|
94
|
+
*
|
|
95
|
+
* Pure, and here rather than inside the daemon, so the test exercises the rule the daemon uses
|
|
96
|
+
* instead of a second copy of it that can drift.
|
|
97
|
+
*/
|
|
98
|
+
export function onMyBoards(mine, event) {
|
|
99
|
+
return !mine.size || !event.boardKey || mine.has(event.boardKey);
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* How to ask an account-wide tool for just these boards.
|
|
103
|
+
*
|
|
104
|
+
* One board goes as a plain string: the server can then use its (boardId, done, updatedAt) index
|
|
105
|
+
* instead of filtering in memory, and a server deployed before the list form does `board.trim()`,
|
|
106
|
+
* which an array would throw on. The harness updates itself and the function it talks to is
|
|
107
|
+
* deployed separately — they are never in step, so the older shape is used wherever it fits.
|
|
108
|
+
*/
|
|
109
|
+
export function boardArg(boards) {
|
|
110
|
+
if (!boards.length)
|
|
111
|
+
return undefined;
|
|
112
|
+
return boards.length === 1 ? boards[0] : [...boards];
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* The cards in a `get-outstanding` answer, read from the fields it prints rather than guessed
|
|
116
|
+
* from the shape of a card code.
|
|
117
|
+
*
|
|
118
|
+
* It used to be a regex for the code alone — `[A-Z][A-Z0-9]{1,9}-\d{3,}` — which capped the
|
|
119
|
+
* prefix at ten characters, so a board like DOCUMENTREPOSITOR was invisible to it, and which
|
|
120
|
+
* could not tell which BOARD a card was on at all. Each block names both:
|
|
121
|
+
*
|
|
122
|
+
* ### 1. ⭐ [KD-1362] Some card
|
|
123
|
+
* - **IDs**: board=`...` card=`...` tenant=`...`
|
|
124
|
+
*/
|
|
125
|
+
export function outstandingCards(text) {
|
|
126
|
+
const out = [];
|
|
127
|
+
for (const block of text.split(/^### /m).slice(1)) {
|
|
128
|
+
const code = (block.split('\n')[0] ?? '').match(/\[([^\]]+)\]/)?.[1]?.trim() ?? '';
|
|
129
|
+
const ids = block.match(/\*\*IDs\*\*:\s*board=`([^`]*)`\s*card=`([^`]*)`(?:\s*tenant=`([^`]*)`)?/);
|
|
130
|
+
if (!code || !ids)
|
|
131
|
+
continue;
|
|
132
|
+
out.push({ code, boardKey: (ids[1] ?? '').trim(), cardKey: (ids[2] ?? '').trim(), tenantId: (ids[3] ?? '').trim() });
|
|
133
|
+
}
|
|
134
|
+
return out;
|
|
135
|
+
}
|
|
136
|
+
//# sourceMappingURL=boards.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"boards.js","sourceRoot":"","sources":["../src/boards.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAC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AC,EAAE,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;QACnF,MAAM,GAAG,GAAG,KAAK,CAAC,KAAK,CAAC,yEAAyE,CAAC,CAAC;QACnG,IAAI,CAAC,IAAI,IAAI,CAAC,GAAG;YAAE,SAAS;QAC5B,GAAG,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,EAAE,OAAO,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,EAAE,QAAQ,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;IACvH,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC"}
|
package/dist/branches.d.ts
CHANGED
|
@@ -22,4 +22,15 @@ export type RemoteBranch = {
|
|
|
22
22
|
* possible it falls back to the remote's plain list, undated and unsorted, rather than nothing.
|
|
23
23
|
*/
|
|
24
24
|
export declare function remoteBranches(repo: string): Promise<RemoteBranch[]>;
|
|
25
|
-
export declare function askBaseBranch(repo: string, say: (s: string) => void
|
|
25
|
+
export declare function askBaseBranch(repo: string, say: (s: string) => void,
|
|
26
|
+
/**
|
|
27
|
+
* The caller's reader, when it has one.
|
|
28
|
+
*
|
|
29
|
+
* Opening a second readline on one stdin and then CLOSING it pauses stdin for whatever asks
|
|
30
|
+
* next — so `login` chose a branch, printed the next step, and ended silently, with the next
|
|
31
|
+
* keystroke landing in the shell. The same fault was fixed in oauth.ts and missed here.
|
|
32
|
+
* Borrow when offered, and never close what was borrowed.
|
|
33
|
+
*/
|
|
34
|
+
borrowed?: {
|
|
35
|
+
question: (q: string) => Promise<string>;
|
|
36
|
+
}): Promise<string | null>;
|
package/dist/branches.js
CHANGED
|
@@ -42,7 +42,16 @@ export async function remoteBranches(repo) {
|
|
|
42
42
|
}
|
|
43
43
|
/** The usual names for the branch work merges into — pulled forward, but only when recent. */
|
|
44
44
|
const LIKELY = ['dev', 'develop', 'development', 'main', 'master', 'trunk'];
|
|
45
|
-
export async function askBaseBranch(repo, say
|
|
45
|
+
export async function askBaseBranch(repo, say,
|
|
46
|
+
/**
|
|
47
|
+
* The caller's reader, when it has one.
|
|
48
|
+
*
|
|
49
|
+
* Opening a second readline on one stdin and then CLOSING it pauses stdin for whatever asks
|
|
50
|
+
* next — so `login` chose a branch, printed the next step, and ended silently, with the next
|
|
51
|
+
* keystroke landing in the shell. The same fault was fixed in oauth.ts and missed here.
|
|
52
|
+
* Borrow when offered, and never close what was borrowed.
|
|
53
|
+
*/
|
|
54
|
+
borrowed) {
|
|
46
55
|
const branches = await remoteBranches(repo);
|
|
47
56
|
const all = branches.map((b) => b.name);
|
|
48
57
|
if (all.length === 0) {
|
|
@@ -60,7 +69,7 @@ export async function askBaseBranch(repo, say) {
|
|
|
60
69
|
offered.forEach((b, i) => say(` ${String(i + 1).padStart(2)}. ${b.name.padEnd(width)}${b.when ? ` ${b.when}` : ''}`));
|
|
61
70
|
if (all.length > offered.length)
|
|
62
71
|
say(` … and ${all.length - offered.length} more`);
|
|
63
|
-
const rl = createInterface({ input: process.stdin, output: process.stdout });
|
|
72
|
+
const rl = borrowed ?? createInterface({ input: process.stdin, output: process.stdout });
|
|
64
73
|
try {
|
|
65
74
|
const answer = (await rl.question(`\nNumber, or type a branch name [${offered[0]?.name}]: `)).trim();
|
|
66
75
|
if (!answer)
|
|
@@ -75,7 +84,8 @@ export async function askBaseBranch(repo, say) {
|
|
|
75
84
|
return offered[0]?.name ?? null;
|
|
76
85
|
}
|
|
77
86
|
finally {
|
|
78
|
-
|
|
87
|
+
if (!borrowed)
|
|
88
|
+
rl.close();
|
|
79
89
|
}
|
|
80
90
|
}
|
|
81
91
|
//# sourceMappingURL=branches.js.map
|
package/dist/branches.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
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