@onepointfour-packs/flaredeck-agent 0.1.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/agent.d.ts +16 -0
- package/dist/agent.js +38 -1
- package/dist/agent.js.map +1 -1
- package/dist/approval.js +39 -1
- package/dist/approval.js.map +1 -1
- package/dist/browser.d.ts +19 -0
- package/dist/browser.js +261 -0
- package/dist/browser.js.map +1 -0
- package/dist/config.d.ts +18 -0
- package/dist/config.js +2 -1
- package/dist/config.js.map +1 -1
- package/dist/desperation.d.ts +24 -0
- package/dist/desperation.js +64 -0
- package/dist/desperation.js.map +1 -0
- package/dist/engine-antigravity.d.ts +7 -0
- package/dist/engine-antigravity.js +280 -32
- package/dist/engine-antigravity.js.map +1 -1
- package/dist/engine.d.ts +28 -0
- package/dist/engine.js.map +1 -1
- package/dist/env.d.ts +5 -1
- package/dist/env.js +19 -1
- package/dist/env.js.map +1 -1
- package/dist/environment.d.ts +87 -2
- package/dist/environment.js +213 -11
- package/dist/environment.js.map +1 -1
- package/dist/flaredeck-proxy.d.ts +47 -1
- package/dist/flaredeck-proxy.js +120 -3
- package/dist/flaredeck-proxy.js.map +1 -1
- package/dist/gitguard.d.ts +6 -0
- package/dist/gitguard.js +30 -1
- package/dist/gitguard.js.map +1 -1
- package/dist/github.d.ts +23 -1
- package/dist/github.js +105 -28
- package/dist/github.js.map +1 -1
- package/dist/journal.d.ts +23 -0
- package/dist/journal.js +142 -0
- package/dist/journal.js.map +1 -0
- package/dist/localmcp.d.ts +50 -0
- package/dist/localmcp.js +229 -0
- package/dist/localmcp.js.map +1 -0
- package/dist/main.js +13 -1
- package/dist/main.js.map +1 -1
- package/dist/permissions.d.ts +17 -0
- package/dist/permissions.js +38 -1
- package/dist/permissions.js.map +1 -1
- package/dist/runs.js +3 -2
- package/dist/runs.js.map +1 -1
- package/dist/sandbox.d.ts +34 -0
- package/dist/sandbox.js +122 -2
- package/dist/sandbox.js.map +1 -1
- package/dist/schedules.d.ts +1 -1
- package/dist/schedules.js +3 -2
- package/dist/schedules.js.map +1 -1
- package/dist/serve.js +461 -39
- package/dist/serve.js.map +1 -1
- package/dist/setup.d.ts +1 -0
- package/dist/setup.js +99 -0
- package/dist/setup.js.map +1 -0
- package/dist/stream.d.ts +1 -0
- package/dist/team.d.ts +1 -1
- package/dist/team.js +3 -2
- package/dist/team.js.map +1 -1
- package/dist/ui.d.ts +2 -0
- package/dist/ui.js +34 -39
- package/dist/ui.js.map +1 -1
- package/dist/updater-python.d.ts +19 -0
- package/dist/updater-python.js +149 -0
- package/dist/updater-python.js.map +1 -0
- package/dist/workspace.d.ts +2 -0
- package/dist/workspace.js +1 -1
- package/dist/workspace.js.map +1 -1
- package/dist/worktree.d.ts +39 -1
- package/dist/worktree.js +147 -4
- package/dist/worktree.js.map +1 -1
- package/package.json +3 -2
- package/python/sidecar.py +209 -7
package/dist/permissions.d.ts
CHANGED
|
@@ -30,6 +30,23 @@ export type Decider = (request: {
|
|
|
30
30
|
* decider at all. The permission broker would still look wired up, and would in fact be off.
|
|
31
31
|
*/
|
|
32
32
|
export declare const FLAREDECK_READ_TOOLS: readonly ["get-board-info", "get-card-details", "get-cards-by-column", "get-build-status", "get-deploy-status", "get-guide", "get-outstanding", "get-portfolio", "get-timesheet-options", "find-card", "health-check", "hello-authenticated", "list-boards", "list-channel-subscriptions", "list-conversations", "read-messages"];
|
|
33
|
+
/**
|
|
34
|
+
* Tools an agent uses to DO ITS JOB, also pre-approved.
|
|
35
|
+
*
|
|
36
|
+
* These write, and they were falling through to the decider — which, with nobody at the keyboard,
|
|
37
|
+
* means a ten-minute wait and then a refusal. HAL finished a card, told its lead the branch was
|
|
38
|
+
* pushed, and that message was refused for want of a human. An agent that cannot say it has
|
|
39
|
+
* finished without someone approving the sentence is not running unattended.
|
|
40
|
+
*
|
|
41
|
+
* What is here is reversible and IS the work: saying things, moving its own card, taking and
|
|
42
|
+
* releasing it, asking for a person, remembering something, attaching evidence. What stays OFF is
|
|
43
|
+
* anything reaching past this agent's own card — assigning somebody else's work, creating new
|
|
44
|
+
* work, kicking a build, booking time — and mark-card-done, which has a gate of its own. Those
|
|
45
|
+
* still reach the decider, which is the point of having one.
|
|
46
|
+
*/
|
|
47
|
+
export declare const FLAREDECK_WORK_TOOLS: readonly ["create-card-comment", "send-message", "set-card-notes", "mark-comments-actioned", "claim-card", "release-card", "update-card-status", "set-card-meta", "set-needs-human", "clear-needs-human", "remember", "rewrite-memory", "add-card-attachment", "attach-uploaded-file", "get-attachment-upload-url"];
|
|
48
|
+
/** Everything an agent may call without asking: reading, and doing its own job. */
|
|
49
|
+
export declare const FLAREDECK_ALLOWED: readonly string[];
|
|
33
50
|
export declare const readToolNames: (server: string) => string[];
|
|
34
51
|
/**
|
|
35
52
|
* Unattended default until the lead exists.
|
package/dist/permissions.js
CHANGED
|
@@ -25,7 +25,44 @@ export const FLAREDECK_READ_TOOLS = [
|
|
|
25
25
|
'list-conversations',
|
|
26
26
|
'read-messages',
|
|
27
27
|
];
|
|
28
|
-
|
|
28
|
+
/**
|
|
29
|
+
* Tools an agent uses to DO ITS JOB, also pre-approved.
|
|
30
|
+
*
|
|
31
|
+
* These write, and they were falling through to the decider — which, with nobody at the keyboard,
|
|
32
|
+
* means a ten-minute wait and then a refusal. HAL finished a card, told its lead the branch was
|
|
33
|
+
* pushed, and that message was refused for want of a human. An agent that cannot say it has
|
|
34
|
+
* finished without someone approving the sentence is not running unattended.
|
|
35
|
+
*
|
|
36
|
+
* What is here is reversible and IS the work: saying things, moving its own card, taking and
|
|
37
|
+
* releasing it, asking for a person, remembering something, attaching evidence. What stays OFF is
|
|
38
|
+
* anything reaching past this agent's own card — assigning somebody else's work, creating new
|
|
39
|
+
* work, kicking a build, booking time — and mark-card-done, which has a gate of its own. Those
|
|
40
|
+
* still reach the decider, which is the point of having one.
|
|
41
|
+
*/
|
|
42
|
+
export const FLAREDECK_WORK_TOOLS = [
|
|
43
|
+
// Saying things.
|
|
44
|
+
'create-card-comment',
|
|
45
|
+
'send-message',
|
|
46
|
+
'set-card-notes',
|
|
47
|
+
'mark-comments-actioned',
|
|
48
|
+
// Its own card.
|
|
49
|
+
'claim-card',
|
|
50
|
+
'release-card',
|
|
51
|
+
'update-card-status',
|
|
52
|
+
'set-card-meta',
|
|
53
|
+
// Asking for a person, and saying it no longer needs one.
|
|
54
|
+
'set-needs-human',
|
|
55
|
+
'clear-needs-human',
|
|
56
|
+
// Its own memory, and evidence for a card.
|
|
57
|
+
'remember',
|
|
58
|
+
'rewrite-memory',
|
|
59
|
+
'add-card-attachment',
|
|
60
|
+
'attach-uploaded-file',
|
|
61
|
+
'get-attachment-upload-url',
|
|
62
|
+
];
|
|
63
|
+
/** Everything an agent may call without asking: reading, and doing its own job. */
|
|
64
|
+
export const FLAREDECK_ALLOWED = [...FLAREDECK_READ_TOOLS, ...FLAREDECK_WORK_TOOLS];
|
|
65
|
+
export const readToolNames = (server) => FLAREDECK_ALLOWED.map((t) => `mcp__${server}__${t}`);
|
|
29
66
|
/**
|
|
30
67
|
* Unattended default until the lead exists.
|
|
31
68
|
*
|
package/dist/permissions.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"permissions.js","sourceRoot":"","sources":["../src/permissions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAoBzD;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG;IAClC,gBAAgB;IAChB,kBAAkB;IAClB,qBAAqB;IACrB,kBAAkB;IAClB,mBAAmB;IACnB,WAAW;IACX,iBAAiB;IACjB,eAAe;IACf,uBAAuB;IACvB,WAAW;IACX,cAAc;IACd,qBAAqB;IACrB,aAAa;IACb,4BAA4B;IAC5B,oBAAoB;IACpB,eAAe;CACP,CAAC;AAEX,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,MAAc,EAAY,EAAE,CACxD,
|
|
1
|
+
{"version":3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AAC,MAAM,eAAe,GAAY,KAAK,EAAE,OAAO,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE;IACpE,MAAM,EAAE,GAAG,eAAe,CAAC,EAAE,KAAK,EAAE,OAAO,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC;IAC7E,IAAI,CAAC;QACH,MAAM,MAAM,GAAG,MAAM,EAAE,CAAC,QAAQ,CAC9B,OAAO,OAAO,CAAC,QAAQ,OAAO,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,GAAG,CAAC,mBAAmB,EAC5F,EAAE,MAAM,EAAE,CACX,CAAC;QACF,OAAO,MAAM,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC,UAAU,CAAC,GAAG,CAAC;YAChD,CAAC,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE;YACjB,CAAC,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,6BAA6B,EAAE,CAAC;IAC9D,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,0BAA0B,EAAE,CAAC;IAC9D,CAAC;YAAS,CAAC;QACT,EAAE,CAAC,KAAK,EAAE,CAAC;IACb,CAAC;AACH,CAAC,CAAC"}
|
package/dist/runs.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { spawn } from 'node:child_process';
|
|
2
2
|
import { createHash } from 'node:crypto';
|
|
3
|
-
import {
|
|
3
|
+
import { tool } from '@anthropic-ai/claude-agent-sdk';
|
|
4
|
+
import { sdkServer } from './localmcp.js';
|
|
4
5
|
import { z } from 'zod';
|
|
5
6
|
import { flaredeckDecider } from './approval.js';
|
|
6
7
|
/**
|
|
@@ -130,7 +131,7 @@ lead = () => null,
|
|
|
130
131
|
onAsk = () => { }) {
|
|
131
132
|
const names = Object.keys(targets);
|
|
132
133
|
const list = names.map((n) => ` · ${n}${targets[n].about ? ` — ${targets[n].about}` : ''}`).join('\n');
|
|
133
|
-
const server =
|
|
134
|
+
const server = sdkServer({
|
|
134
135
|
name: 'runs',
|
|
135
136
|
version: '1.0.0',
|
|
136
137
|
tools: [
|
package/dist/runs.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runs.js","sourceRoot":"","sources":["../src/runs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"runs.js","sourceRoot":"","sources":["../src/runs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,IAAI,EAAE,MAAM,gCAAgC,CAAC;AACtD,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAIjD;;;;;;;;;;;;;;;GAeG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,mCAAmC,CAAC,CAAC;AAEpE,iFAAiF;AACjF,MAAM,eAAe,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC;AACvC,MAAM,UAAU,GAAG,IAAI,CAAC;AASxB,MAAM,GAAG,GAAG,CAAC,IAAY,EAAE,OAAO,GAAG,KAAK,EAAE,EAAE,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAe,EAAE,IAAI,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC;AAEzG,SAAS,IAAI,CAAC,MAAiB,EAAE,MAAc,EAAE,GAAW;IAC1D,OAAO,IAAI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E,CAAC,MAAM,EAAE,CACzC,CAAC;gBACF,KAAK,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;gBAC7C,IAAI,CAAC,OAAO,CAAC,KAAK;oBAAE,OAAO,GAAG,CAAC,YAAY,OAAO,CAAC,MAAM,EAAE,EAAE,IAAI,CAAC,CAAC;gBAEnE,MAAM,CAAC,GAAG,MAAM,YAAY,CAAC,CAAC,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,UAAU,IAAI,EAAE,EAAE,IAAI,EAAE,GAAG,CAAC,IAAI,EAAE,GAAG,EAAE,GAAG,CAAC,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE,IAAI,EAAE,GAAG,CAAC,CAAC;gBACpJ,OAAO,GAAG,CACR,GAAG,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC,IAAI,GAAG,KAAK,IAAI,QAAQ,MAAM,cAAc,CAAC,CAAC,GAAG,IAAI,aAAa,EAAE,EAChH,CAAC,CAAC,IAAI,KAAK,CAAC,CACb,CAAC;YACJ,CAAC,CACF;SACF;KACF,CAAC,CAAC;IACH,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,cAAc,EAAE,CAAC;AAC/C,CAAC"}
|
package/dist/sandbox.d.ts
CHANGED
|
@@ -11,3 +11,37 @@ export declare function writesOutside(command: string, root: string): string | n
|
|
|
11
11
|
* may change nothing at all) and the publishing tools already refuse it.
|
|
12
12
|
*/
|
|
13
13
|
export declare function sandboxGuard(job: () => string | null, onNote: (text: string) => void): Partial<Record<HookEvent, HookCallbackMatcher[]>>;
|
|
14
|
+
/**
|
|
15
|
+
* Another card's checkout, named in a command.
|
|
16
|
+
*
|
|
17
|
+
* Sibling worktrees are byte-identical in layout, so one is no more informative than another —
|
|
18
|
+
* and absolute paths leak constantly: into card comments, agent notes, a previous session's
|
|
19
|
+
* summary. An agent that follows one spends its turn reading a copy of the files it already has.
|
|
20
|
+
* HR-0622 did exactly that, twelve minutes of `ls -la` in a checkout belonging to another card.
|
|
21
|
+
*
|
|
22
|
+
* Reads are otherwise unrestricted, deliberately — reading the repository is how it decides
|
|
23
|
+
* anything. This is the one place where reading the wrong thing looks exactly like reading the
|
|
24
|
+
* right thing.
|
|
25
|
+
*/
|
|
26
|
+
export declare function foreignWorktree(command: string, mine: string): string | null;
|
|
27
|
+
/**
|
|
28
|
+
* Paths in the home directory that are not this agent's workspace.
|
|
29
|
+
*
|
|
30
|
+
* A denylist was the wrong shape — it only ever names the place you already found something
|
|
31
|
+
* reading. This says it positively: system paths are fine (interpreters, /tmp, /dev/null), the
|
|
32
|
+
* workspace is fine, and anything else under HOME is not.
|
|
33
|
+
*
|
|
34
|
+
* What that catches is everything an agent reaches for when it is lost. The SDK keeps every
|
|
35
|
+
* conversation it has ever had under ~/.gemini/antigravity/brain — 95 of them, 55MB, belonging
|
|
36
|
+
* to other cards and other agents and full of whatever their commands printed. An interrupted
|
|
37
|
+
* session went in there to reconstruct what it had done. It also covers the harness's own keys
|
|
38
|
+
* and decision log, every other repository in ~/Source, and the person's own documents.
|
|
39
|
+
*
|
|
40
|
+
* The refusal names what to read instead, because for this there is always an answer.
|
|
41
|
+
*/
|
|
42
|
+
/**
|
|
43
|
+
* The roots a turn may read, derived from the one directory it may write. A worktree sits beside
|
|
44
|
+
* its repository rather than inside it, so both are needed, and scratch space is always allowed.
|
|
45
|
+
*/
|
|
46
|
+
export declare function readRoots(writable: string, home?: string): string[];
|
|
47
|
+
export declare function readsOutside(command: string, roots: readonly string[], home: string): string | null;
|
package/dist/sandbox.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { homedir } from 'node:os';
|
|
2
|
+
import { basename, dirname, resolve } from 'node:path';
|
|
2
3
|
/**
|
|
3
4
|
* Keep a card's changes inside that card's checkout.
|
|
4
5
|
*
|
|
@@ -83,7 +84,22 @@ export function sandboxGuard(job, onNote) {
|
|
|
83
84
|
return { continue: true };
|
|
84
85
|
const tool = String(input?.tool_name ?? '');
|
|
85
86
|
if (tool === 'Bash') {
|
|
86
|
-
const
|
|
87
|
+
const command = String(input?.tool_input?.command ?? '');
|
|
88
|
+
// Reading ANOTHER card's checkout is allowed by every other rule here and is always a
|
|
89
|
+
// mistake: identical files, wrong place, and whatever it changes there it cannot publish.
|
|
90
|
+
const elsewhere = foreignWorktree(command, root);
|
|
91
|
+
if (elsewhere) {
|
|
92
|
+
onNote('sent back to its own checkout');
|
|
93
|
+
return { decision: 'block', reason: elsewhere };
|
|
94
|
+
}
|
|
95
|
+
// Reads outside the workspace: other repositories, the harness's keys, the SDK's stored
|
|
96
|
+
// conversations. Same rule the other engine's guard applies.
|
|
97
|
+
const nosy = readsOutside(command, readRoots(root, homedir()), homedir());
|
|
98
|
+
if (nosy) {
|
|
99
|
+
onNote('kept inside its workspace');
|
|
100
|
+
return { decision: 'block', reason: nosy };
|
|
101
|
+
}
|
|
102
|
+
const why = writesOutside(command, root);
|
|
87
103
|
if (!why)
|
|
88
104
|
return { continue: true };
|
|
89
105
|
onNote(`blocked a write outside the worktree: ${why}`);
|
|
@@ -107,4 +123,108 @@ export function sandboxGuard(job, onNote) {
|
|
|
107
123
|
],
|
|
108
124
|
};
|
|
109
125
|
}
|
|
126
|
+
/**
|
|
127
|
+
* Another card's checkout, named in a command.
|
|
128
|
+
*
|
|
129
|
+
* Sibling worktrees are byte-identical in layout, so one is no more informative than another —
|
|
130
|
+
* and absolute paths leak constantly: into card comments, agent notes, a previous session's
|
|
131
|
+
* summary. An agent that follows one spends its turn reading a copy of the files it already has.
|
|
132
|
+
* HR-0622 did exactly that, twelve minutes of `ls -la` in a checkout belonging to another card.
|
|
133
|
+
*
|
|
134
|
+
* Reads are otherwise unrestricted, deliberately — reading the repository is how it decides
|
|
135
|
+
* anything. This is the one place where reading the wrong thing looks exactly like reading the
|
|
136
|
+
* right thing.
|
|
137
|
+
*/
|
|
138
|
+
export function foreignWorktree(command, mine) {
|
|
139
|
+
const here = mine.replace(/\/+$/, '');
|
|
140
|
+
// Only a turn that HAS a worktree can be sent back to it. On a turn without one the writable
|
|
141
|
+
// directory is scratch space, and this rule then called every worktree foreign and told the
|
|
142
|
+
// agent its own was an empty folder with "the same files" in it — which is a lie, and it spent
|
|
143
|
+
// the turn trying to make sense of it instead of working.
|
|
144
|
+
if (!/\.worktrees-[^/]+\//.test(`${here}/`))
|
|
145
|
+
return null;
|
|
146
|
+
// Every worktree lives in a .worktrees-<repo> directory beside the checkout.
|
|
147
|
+
const paths = command.match(/\/[^\s'"`;|&)]*\.worktrees-[^\s'"`;|&)]*/g);
|
|
148
|
+
if (!paths)
|
|
149
|
+
return null;
|
|
150
|
+
for (const path of paths) {
|
|
151
|
+
if (path === here || path.startsWith(`${here}/`))
|
|
152
|
+
continue;
|
|
153
|
+
// Name theirs AND yours: "that is not yours" without "this is" sends it hunting again.
|
|
154
|
+
return (`${path} is another card's checkout. Yours is ${here} — it has the same files, already at ` +
|
|
155
|
+
`the right commit for this card, and it is the only one you may change. Work there.`);
|
|
156
|
+
}
|
|
157
|
+
return null;
|
|
158
|
+
}
|
|
159
|
+
/**
|
|
160
|
+
* Paths in the home directory that are not this agent's workspace.
|
|
161
|
+
*
|
|
162
|
+
* A denylist was the wrong shape — it only ever names the place you already found something
|
|
163
|
+
* reading. This says it positively: system paths are fine (interpreters, /tmp, /dev/null), the
|
|
164
|
+
* workspace is fine, and anything else under HOME is not.
|
|
165
|
+
*
|
|
166
|
+
* What that catches is everything an agent reaches for when it is lost. The SDK keeps every
|
|
167
|
+
* conversation it has ever had under ~/.gemini/antigravity/brain — 95 of them, 55MB, belonging
|
|
168
|
+
* to other cards and other agents and full of whatever their commands printed. An interrupted
|
|
169
|
+
* session went in there to reconstruct what it had done. It also covers the harness's own keys
|
|
170
|
+
* and decision log, every other repository in ~/Source, and the person's own documents.
|
|
171
|
+
*
|
|
172
|
+
* The refusal names what to read instead, because for this there is always an answer.
|
|
173
|
+
*/
|
|
174
|
+
/**
|
|
175
|
+
* The roots a turn may read, derived from the one directory it may write. A worktree sits beside
|
|
176
|
+
* its repository rather than inside it, so both are needed, and scratch space is always allowed.
|
|
177
|
+
*/
|
|
178
|
+
export function readRoots(writable, home = '') {
|
|
179
|
+
const w = writable.replace(/\/+$/, '');
|
|
180
|
+
// The SDK's own directory for the session that is running. It is where that engine keeps its
|
|
181
|
+
// MCP state, so the agent reaches for it as part of ordinary work and simply kept retrying when
|
|
182
|
+
// refused. Allowed deliberately, with one thing given up knowingly: other cards' conversations
|
|
183
|
+
// live under here too, so an agent CAN read them. It has no reason to, the brief tells it where
|
|
184
|
+
// its own history is, and a guard it fights every turn is worse than the risk.
|
|
185
|
+
const h = home.replace(/\/+$/, '');
|
|
186
|
+
// The SDK's own directory for the running session, and the harness's record of THIS agent's
|
|
187
|
+
// cards — which is where an agent is told to look for what it did before, so it had better be
|
|
188
|
+
// able to. The rest of the config directory, keys included, stays out.
|
|
189
|
+
const sdk = h ? [`${h}/.gemini/antigravity`, `${h}/.config/flaredeck-agent/cards`] : [];
|
|
190
|
+
const wt = /^(.*)\/\.worktrees-([^/]+)\/[^/]+$/.exec(w);
|
|
191
|
+
if (wt)
|
|
192
|
+
return [`${wt[1]}/${wt[2]}`, `${wt[1]}/.worktrees-${wt[2]}`, w, ...sdk];
|
|
193
|
+
return [w, `${dirname(w)}/.worktrees-${basename(w)}`, ...sdk];
|
|
194
|
+
}
|
|
195
|
+
/**
|
|
196
|
+
* An agent looking for a tool as if it were a program. It happens when a refusal names a tool the
|
|
197
|
+
* turn does not have, and the search is unbounded — PATH, then every parent directory — so it is
|
|
198
|
+
* worth answering directly rather than refusing the same read twenty times.
|
|
199
|
+
*/
|
|
200
|
+
const HUNTING_FOR_A_TOOL = /\b(push_branch|submit_work|open_pull_request|merge_and_promote|which|PATH)\b/;
|
|
201
|
+
export function readsOutside(command, roots, home) {
|
|
202
|
+
const h = home.replace(/\/+$/, '');
|
|
203
|
+
if (!h)
|
|
204
|
+
return null;
|
|
205
|
+
const allowed = roots.filter(Boolean).map((r) => r.replace(/\/+$/, ''));
|
|
206
|
+
// `~` is a path too. It was not matched at all, so every rule here could be walked past by
|
|
207
|
+
// writing ~/… instead of the full path — which an agent did, reaching the harness's own config
|
|
208
|
+
// directory. Expanded first, then matched the same way.
|
|
209
|
+
const expanded = command.replace(/(^|[\s'"`=(])~\//g, `$1${h}/`);
|
|
210
|
+
// Absolute paths the command names. Quotes and separators end a path; so does a comma.
|
|
211
|
+
const paths = expanded.match(/\/[^\s'"`;|&)(,]+/g) ?? [];
|
|
212
|
+
for (const raw of paths) {
|
|
213
|
+
const path = raw.replace(/[.,:]+$/, '');
|
|
214
|
+
if (!path.startsWith(`${h}/`))
|
|
215
|
+
continue; // not in the home directory at all
|
|
216
|
+
if (allowed.some((r) => path === r || path.startsWith(`${r}/`)))
|
|
217
|
+
continue;
|
|
218
|
+
return (`${path} is outside your workspace. You may read ${allowed.join(' and ')} — everything this ` +
|
|
219
|
+
`card needs is there. What you did before is on the card: its comments, your agent notes, ` +
|
|
220
|
+
`and the commits on your branch, not in logs or another folder.` +
|
|
221
|
+
(HUNTING_FOR_A_TOOL.test(command)
|
|
222
|
+
? `\n\nYou appear to be looking for a harness tool on disk. They are not files and are not ` +
|
|
223
|
+
`on PATH — they are tools in this session, called the way you call any other tool. ` +
|
|
224
|
+
`Searching the filesystem will never find one. If a tool you were told to use is not in ` +
|
|
225
|
+
`your list, this turn does not have it: say so on the card instead of looking for it.`
|
|
226
|
+
: ''));
|
|
227
|
+
}
|
|
228
|
+
return null;
|
|
229
|
+
}
|
|
110
230
|
//# sourceMappingURL=sandbox.js.map
|
package/dist/sandbox.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sandbox.js","sourceRoot":"","sources":["../src/sandbox.ts"],"names":[],"mappings":"AAAA,OAA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C,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,qBAAqB;YAC7F,2FAA2F;YAC3F,gEAAgE;YAChE,CAAC,kBAAkB,CAAC,IAAI,CAAC,OAAO,CAAC;gBAC/B,CAAC,CAAC,0FAA0F;oBAC1F,oFAAoF;oBACpF,yFAAyF;oBACzF,sFAAsF;gBACxF,CAAC,CAAC,EAAE,CAAC,CACR,CAAC;IACJ,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC"}
|
package/dist/schedules.d.ts
CHANGED
|
@@ -8,4 +8,4 @@ import type { Flaredeck } from './flaredeck.js';
|
|
|
8
8
|
* more than its late window past the due time is skipped, not delayed.
|
|
9
9
|
*/
|
|
10
10
|
export declare const SCHEDULE_TOOL_NAMES: string[];
|
|
11
|
-
export declare function scheduleTools(deck: Flaredeck | null, currentCard: () => string | null):
|
|
11
|
+
export declare function scheduleTools(deck: Flaredeck | null, currentCard: () => string | null): unknown;
|
package/dist/schedules.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { tool } from '@anthropic-ai/claude-agent-sdk';
|
|
2
|
+
import { sdkServer } from './localmcp.js';
|
|
2
3
|
import { z } from 'zod';
|
|
3
4
|
/**
|
|
4
5
|
* Recurring tasks, held by FlareDeck rather than by this machine.
|
|
@@ -16,7 +17,7 @@ export const SCHEDULE_TOOL_NAMES = [
|
|
|
16
17
|
const say = (text, isError = false) => ({ content: [{ type: 'text', text }], isError });
|
|
17
18
|
export function scheduleTools(deck, currentCard) {
|
|
18
19
|
const need = () => say('This harness has no FlareDeck client of its own, so it cannot manage schedules.', true);
|
|
19
|
-
return
|
|
20
|
+
return sdkServer({
|
|
20
21
|
name: 'schedules',
|
|
21
22
|
version: '1.0.0',
|
|
22
23
|
tools: [
|
package/dist/schedules.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schedules.js","sourceRoot":"","sources":["../src/schedules.ts"],"names":[],"mappings":"AAAA,OAA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