@onepointfour-packs/flaredeck-agent 0.2.206 → 0.2.208
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 +14 -0
- package/dist/agent.js +20 -2
- package/dist/agent.js.map +1 -1
- package/dist/assistant.js +3 -0
- package/dist/assistant.js.map +1 -1
- package/dist/cli.js +0 -0
- package/dist/flaredeck-proxy.d.ts +8 -0
- package/dist/flaredeck-proxy.js +19 -2
- package/dist/flaredeck-proxy.js.map +1 -1
- package/dist/githubauth.d.ts +2 -0
- package/dist/githubauth.js +9 -0
- package/dist/githubauth.js.map +1 -1
- package/dist/runs.d.ts +2 -2
- package/dist/runs.js +28 -11
- package/dist/runs.js.map +1 -1
- package/dist/serve.d.ts +11 -0
- package/dist/serve.js +21 -0
- package/dist/serve.js.map +1 -1
- package/package.json +2 -2
- package/dist/concurrency.d.ts +0 -14
- package/dist/concurrency.js +0 -52
- package/dist/concurrency.js.map +0 -1
- package/dist/streamtoken.d.ts +0 -2
- package/dist/streamtoken.js +0 -30
- package/dist/streamtoken.js.map +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@onepointfour-packs/flaredeck-agent",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.208",
|
|
4
4
|
"description": "Run a FlareDeck agent on your own machine: it picks up cards assigned to it, works each one in a checkout of its own, and reports back on the card.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"prepublishOnly": "node scripts/bump-sdk.mjs && npm run build"
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@anthropic-ai/claude-agent-sdk": "^0.3.
|
|
24
|
+
"@anthropic-ai/claude-agent-sdk": "^0.3.310",
|
|
25
25
|
"ink": "^7.1.1",
|
|
26
26
|
"ink-text-input": "^6.0.0",
|
|
27
27
|
"playwright-core": "^1.64.0",
|
package/dist/concurrency.d.ts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import type { HookCallbackMatcher, HookEvent } from '@anthropic-ai/claude-agent-sdk';
|
|
2
|
-
/**
|
|
3
|
-
* Cap how many sub-agents run at once.
|
|
4
|
-
*
|
|
5
|
-
* Sub-agents are where an environment gets contended: two testing the API is fine, a third
|
|
6
|
-
* starting its own copy is not. Leasing ports per job would be the thorough answer, but a cap is
|
|
7
|
-
* most of the benefit for a fraction of the machinery — with a known ceiling you can size the
|
|
8
|
-
* environment for it and stop thinking about it.
|
|
9
|
-
*
|
|
10
|
-
* Done as a PreToolUse hook rather than a prompt instruction because hooks run before every other
|
|
11
|
-
* permission step and a hook deny holds even in bypassPermissions. A limit the model can talk
|
|
12
|
-
* itself past is not a limit.
|
|
13
|
-
*/
|
|
14
|
-
export declare function subagentLimit(max: number, onNote: (text: string) => void): Partial<Record<HookEvent, HookCallbackMatcher[]>>;
|
package/dist/concurrency.js
DELETED
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Cap how many sub-agents run at once.
|
|
3
|
-
*
|
|
4
|
-
* Sub-agents are where an environment gets contended: two testing the API is fine, a third
|
|
5
|
-
* starting its own copy is not. Leasing ports per job would be the thorough answer, but a cap is
|
|
6
|
-
* most of the benefit for a fraction of the machinery — with a known ceiling you can size the
|
|
7
|
-
* environment for it and stop thinking about it.
|
|
8
|
-
*
|
|
9
|
-
* Done as a PreToolUse hook rather than a prompt instruction because hooks run before every other
|
|
10
|
-
* permission step and a hook deny holds even in bypassPermissions. A limit the model can talk
|
|
11
|
-
* itself past is not a limit.
|
|
12
|
-
*/
|
|
13
|
-
export function subagentLimit(max, onNote) {
|
|
14
|
-
let running = 0;
|
|
15
|
-
return {
|
|
16
|
-
PreToolUse: [
|
|
17
|
-
{
|
|
18
|
-
// Only the tool that spawns them; everything else is untouched.
|
|
19
|
-
matcher: 'Agent',
|
|
20
|
-
hooks: [
|
|
21
|
-
async () => {
|
|
22
|
-
if (running >= max) {
|
|
23
|
-
onNote(`held back a sub-agent — ${running}/${max} already running`);
|
|
24
|
-
return {
|
|
25
|
-
decision: 'block',
|
|
26
|
-
reason: `${running} sub-agents are already running and the limit is ${max}. Wait for one ` +
|
|
27
|
-
`to finish before starting another, or do this part yourself. Starting more would ` +
|
|
28
|
-
`have them competing for the same ports, database and dev server.`,
|
|
29
|
-
};
|
|
30
|
-
}
|
|
31
|
-
running += 1;
|
|
32
|
-
return { continue: true };
|
|
33
|
-
},
|
|
34
|
-
],
|
|
35
|
-
},
|
|
36
|
-
],
|
|
37
|
-
PostToolUse: [
|
|
38
|
-
{
|
|
39
|
-
matcher: 'Agent',
|
|
40
|
-
hooks: [
|
|
41
|
-
async () => {
|
|
42
|
-
// Never below zero: a hook that missed its pair would otherwise leak capacity upward
|
|
43
|
-
// and quietly remove the limit.
|
|
44
|
-
running = Math.max(0, running - 1);
|
|
45
|
-
return { continue: true };
|
|
46
|
-
},
|
|
47
|
-
],
|
|
48
|
-
},
|
|
49
|
-
],
|
|
50
|
-
};
|
|
51
|
-
}
|
|
52
|
-
//# sourceMappingURL=concurrency.js.map
|
package/dist/concurrency.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"concurrency.js","sourceRoot":"","sources":["../src/concurrency.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,aAAa,CAAC,GAAW,EAAE,MAA8B;IACvE,IAAI,OAAO,GAAG,CAAC,CAAC;IAEhB,OAAO;QACL,UAAU,EAAE;YACV;gBACE,gEAAgE;gBAChE,OAAO,EAAE,OAAO;gBAChB,KAAK,EAAE;oBACL,KAAK,IAAI,EAAE;wBACT,IAAI,OAAO,IAAI,GAAG,EAAE,CAAC;4BACnB,MAAM,CAAC,2BAA2B,OAAO,IAAI,GAAG,kBAAkB,CAAC,CAAC;4BACpE,OAAO;gCACL,QAAQ,EAAE,OAAO;gCACjB,MAAM,EACJ,GAAG,OAAO,oDAAoD,GAAG,iBAAiB;oCAClF,mFAAmF;oCACnF,kEAAkE;6BACrE,CAAC;wBACJ,CAAC;wBACD,OAAO,IAAI,CAAC,CAAC;wBACb,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;oBAC5B,CAAC;iBACF;aACF;SACF;QACD,WAAW,EAAE;YACX;gBACE,OAAO,EAAE,OAAO;gBAChB,KAAK,EAAE;oBACL,KAAK,IAAI,EAAE;wBACT,qFAAqF;wBACrF,gCAAgC;wBAChC,OAAO,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,OAAO,GAAG,CAAC,CAAC,CAAC;wBACnC,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;oBAC5B,CAAC;iBACF;aACF;SACF;KACF,CAAC;AACJ,CAAC"}
|
package/dist/streamtoken.d.ts
DELETED
package/dist/streamtoken.js
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { buildOptions, runTask } from './agent.js';
|
|
2
|
-
import { denyingDecider } from './permissions.js';
|
|
3
|
-
/**
|
|
4
|
-
* Get this agent's event-stream token the way the agent itself does.
|
|
5
|
-
*
|
|
6
|
-
* No extra credential and no `--agent` flag: the MCP session is already OAuth-authenticated, and
|
|
7
|
-
* `get-guide` mints a 90-day token for whoever that session IS. Naming the agent separately would
|
|
8
|
-
* only invite naming the wrong one.
|
|
9
|
-
*
|
|
10
|
-
* The token is read out of the TOOL RESULT, not the model's prose — that text comes from our own
|
|
11
|
-
* server in a fixed shape, so this parses a known format rather than trusting a summary.
|
|
12
|
-
*/
|
|
13
|
-
const IN_URL = /events\/stream\?token=([A-Za-z0-9_.~%-]+)/;
|
|
14
|
-
export async function fetchStreamToken(config) {
|
|
15
|
-
const options = buildOptions(config, denyingDecider, { maxTurns: 3 });
|
|
16
|
-
let found = '';
|
|
17
|
-
for await (const event of runTask('Call the get-guide tool and then stop. Do not summarise it or do anything else.', options)) {
|
|
18
|
-
if (event.kind !== 'result' || found)
|
|
19
|
-
continue;
|
|
20
|
-
const match = IN_URL.exec(event.text);
|
|
21
|
-
if (match?.[1])
|
|
22
|
-
found = decodeURIComponent(match[1]);
|
|
23
|
-
}
|
|
24
|
-
if (!found) {
|
|
25
|
-
throw new Error('The guide came back with no event stream in it. That happens when the FlareDeck MCP ' +
|
|
26
|
-
'server is not connected for this repo, or when this login is not an agent account.');
|
|
27
|
-
}
|
|
28
|
-
return found;
|
|
29
|
-
}
|
|
30
|
-
//# sourceMappingURL=streamtoken.js.map
|
package/dist/streamtoken.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"streamtoken.js","sourceRoot":"","sources":["../src/streamtoken.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAEnD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD;;;;;;;;;GASG;AACH,MAAM,MAAM,GAAG,2CAA2C,CAAC;AAE3D,MAAM,CAAC,KAAK,UAAU,gBAAgB,CAAC,MAAc;IACnD,MAAM,OAAO,GAAG,YAAY,CAAC,MAAM,EAAE,cAAc,EAAE,EAAE,QAAQ,EAAE,CAAC,EAAE,CAAC,CAAC;IACtE,IAAI,KAAK,GAAG,EAAE,CAAC;IAEf,IAAI,KAAK,EAAE,MAAM,KAAK,IAAI,OAAO,CAC/B,iFAAiF,EACjF,OAAO,CACR,EAAE,CAAC;QACF,IAAI,KAAK,CAAC,IAAI,KAAK,QAAQ,IAAI,KAAK;YAAE,SAAS;QAC/C,MAAM,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QACtC,IAAI,KAAK,EAAE,CAAC,CAAC,CAAC;YAAE,KAAK,GAAG,kBAAkB,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;IACvD,CAAC;IAED,IAAI,CAAC,KAAK,EAAE,CAAC;QACX,MAAM,IAAI,KAAK,CACb,sFAAsF;YACpF,oFAAoF,CACvF,CAAC;IACJ,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC"}
|