@narumitw/pi-subagents 2.0.2 → 2.0.4
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 +253 -160
- package/dist/chunks/auto-transport-SY2VHUFH.ts +8 -8
- package/dist/chunks/capability-grant-CGEWOEKE.ts +3 -3
- package/dist/chunks/{chunk-F5YWVHQX.ts → chunk-2OUVSORM.ts} +32 -32
- package/dist/chunks/chunk-434NII74.ts +4 -4
- package/dist/chunks/chunk-7QPPBBXZ.ts +3 -3
- package/dist/chunks/chunk-AEUYS7JC.ts +2 -2
- package/dist/chunks/chunk-BFK2Z4ZF.ts +1 -1
- package/dist/chunks/chunk-DQMN4OYM.ts +9 -9
- package/dist/chunks/chunk-DSOOH73Y.ts +1 -1
- package/dist/chunks/chunk-EFBPISNT.ts +5 -5
- package/dist/chunks/chunk-EWWXFU7N.ts +2 -2
- package/dist/chunks/chunk-F4L2UVSK.ts +3 -3
- package/dist/chunks/chunk-G3RSMSXJ.ts +3 -3
- package/dist/chunks/chunk-HA36LPCO.ts +1 -1
- package/dist/chunks/chunk-HKC4ES4B.ts +1 -1
- package/dist/chunks/chunk-I2FAK44T.ts +1 -1
- package/dist/chunks/chunk-NIF42QMF.ts +5 -5
- package/dist/chunks/chunk-O4VO6JUJ.ts +3 -3
- package/dist/chunks/chunk-ONDTY4EL.ts +1 -1
- package/dist/chunks/chunk-OVPHFGKO.ts +1 -1
- package/dist/chunks/chunk-PSK43Y6A.ts +2 -2
- package/dist/chunks/chunk-QBORTI4W.ts +3 -3
- package/dist/chunks/chunk-QDVGH2X7.ts +2 -2
- package/dist/chunks/chunk-RHRQMT7Q.ts +7 -7
- package/dist/chunks/chunk-RSUXZD6S.ts +1 -1
- package/dist/chunks/chunk-RTCVYIZA.ts +1 -1
- package/dist/chunks/chunk-SCZ33MYW.ts +4 -4
- package/dist/chunks/chunk-SWGQLFSD.ts +1 -1
- package/dist/chunks/chunk-UVFVHIOP.ts +12 -12
- package/dist/chunks/completion-delivery-YPOWSSV3.ts +6 -6
- package/dist/chunks/config-status-J4GPWP46.ts +8 -8
- package/dist/chunks/{config-ui-3IBMHTQB.ts → config-ui-7IMI3I4B.ts} +24 -24
- package/dist/chunks/consult-NYXVDN5G.ts +24 -24
- package/dist/chunks/context-QDKLVQXE.ts +1 -1
- package/dist/chunks/{create-stateful-transport-4WKZHRSI.ts → create-stateful-transport-F5OG2LEY.ts} +7 -7
- package/dist/chunks/cwd-policy-NB6XZ5GF.ts +3 -3
- package/dist/chunks/delegation-contract-WJPT4FVS.ts +2 -2
- package/dist/chunks/discovery-K25T3SH4.ts +4 -4
- package/dist/chunks/execution-DS2DEIQZ.ts +23 -23
- package/dist/chunks/in-process-transport-TEYAWSEC.ts +16 -16
- package/dist/chunks/inspect-UOQQ3KNL.ts +14 -14
- package/dist/chunks/peer-communication-KL36Z6CO.ts +2 -2
- package/dist/chunks/persistence-VSGXAW4P.ts +12 -12
- package/dist/chunks/registry-E6XPJB7L.ts +12 -12
- package/dist/chunks/retained-semantic-state-7WXSGRJU.ts +3 -3
- package/dist/chunks/{rpc-transport-Y6LA5BOP.ts → rpc-transport-ZNNBRUSY.ts} +118 -48
- package/dist/chunks/rpc-transport-ZNNBRUSY.ts.map +7 -0
- package/dist/chunks/runtime-policy-5YELCOVC.ts +1 -1
- package/dist/chunks/semantic-snapshot-WPJ3UAFW.ts +1 -1
- package/dist/chunks/spawn-idempotency-QGHO2WKC.ts +1 -1
- package/dist/chunks/stateful-lifecycle-JAR6K55H.ts +1 -1
- package/dist/chunks/subprocess-transport-C2XVR25R.ts +21 -21
- package/dist/chunks/workspace-WDKLN72J.ts +1 -1
- package/dist/index.ts +25 -25
- package/package.json +5 -5
- package/src/rpc-transport.ts +20 -6
- package/src/rpc-turn-capture.ts +98 -23
- package/dist/chunks/rpc-transport-Y6LA5BOP.ts.map +0 -7
- /package/dist/chunks/{chunk-F5YWVHQX.ts.map → chunk-2OUVSORM.ts.map} +0 -0
- /package/dist/chunks/{config-ui-3IBMHTQB.ts.map → config-ui-7IMI3I4B.ts.map} +0 -0
- /package/dist/chunks/{create-stateful-transport-4WKZHRSI.ts.map → create-stateful-transport-F5OG2LEY.ts.map} +0 -0
|
@@ -2,16 +2,16 @@
|
|
|
2
2
|
// @ts-nocheck -- generated JavaScript uses a .ts extension for Pi's Jiti loader.
|
|
3
3
|
import {
|
|
4
4
|
isWriteCapable
|
|
5
|
-
} from "./chunk-O4VO6JUJ.
|
|
5
|
+
} from "./chunk-O4VO6JUJ.ts";
|
|
6
6
|
import {
|
|
7
7
|
discoverAgents
|
|
8
|
-
} from "./chunk-PSK43Y6A.
|
|
9
|
-
import "./chunk-RSUXZD6S.
|
|
10
|
-
import "./chunk-QBORTI4W.
|
|
11
|
-
import "./chunk-7OBINKFM.
|
|
12
|
-
import "./chunk-DPPVEQAM.
|
|
13
|
-
import "./chunk-SWGQLFSD.
|
|
14
|
-
import "./chunk-H3FP6DLR.
|
|
8
|
+
} from "./chunk-PSK43Y6A.ts";
|
|
9
|
+
import "./chunk-RSUXZD6S.ts";
|
|
10
|
+
import "./chunk-QBORTI4W.ts";
|
|
11
|
+
import "./chunk-7OBINKFM.ts";
|
|
12
|
+
import "./chunk-DPPVEQAM.ts";
|
|
13
|
+
import "./chunk-SWGQLFSD.ts";
|
|
14
|
+
import "./chunk-H3FP6DLR.ts";
|
|
15
15
|
|
|
16
16
|
// src/auto-transport.ts
|
|
17
17
|
var BUILT_IN_TOOL_NAMES = /* @__PURE__ */ new Set(["read", "bash", "edit", "write", "grep", "find", "ls"]);
|
|
@@ -6,9 +6,9 @@ import {
|
|
|
6
6
|
isCapabilityGrantActive,
|
|
7
7
|
issueCapabilityGrant,
|
|
8
8
|
revokeCapabilityGrant
|
|
9
|
-
} from "./chunk-HKC4ES4B.
|
|
10
|
-
import "./chunk-DSOOH73Y.
|
|
11
|
-
import "./chunk-DPPVEQAM.
|
|
9
|
+
} from "./chunk-HKC4ES4B.ts";
|
|
10
|
+
import "./chunk-DSOOH73Y.ts";
|
|
11
|
+
import "./chunk-DPPVEQAM.ts";
|
|
12
12
|
export {
|
|
13
13
|
CAPABILITY_GRANT_VERSION,
|
|
14
14
|
isCapabilityGrant,
|
|
@@ -3,31 +3,31 @@
|
|
|
3
3
|
import {
|
|
4
4
|
assertCurrentSpawn,
|
|
5
5
|
waitForOwnedSpawn
|
|
6
|
-
} from "./chunk-P7OH4XMF.
|
|
6
|
+
} from "./chunk-P7OH4XMF.ts";
|
|
7
7
|
import {
|
|
8
8
|
MAX_TASK_NAME_LENGTH
|
|
9
|
-
} from "./chunk-N7BLVXKK.
|
|
9
|
+
} from "./chunk-N7BLVXKK.ts";
|
|
10
10
|
import {
|
|
11
11
|
MAX_SUBAGENT_TOOL_CALLS,
|
|
12
12
|
MAX_SUBAGENT_TURNS
|
|
13
|
-
} from "./chunk-ONDTY4EL.
|
|
13
|
+
} from "./chunk-ONDTY4EL.ts";
|
|
14
14
|
import {
|
|
15
15
|
confirmProjectAgent
|
|
16
|
-
} from "./chunk-O4VO6JUJ.
|
|
16
|
+
} from "./chunk-O4VO6JUJ.ts";
|
|
17
17
|
import {
|
|
18
18
|
SUBAGENT_RESULT_FORMATS
|
|
19
|
-
} from "./chunk-RSUXZD6S.
|
|
19
|
+
} from "./chunk-RSUXZD6S.ts";
|
|
20
20
|
import {
|
|
21
21
|
DEFAULT_DELEGATION_CWD_POLICY,
|
|
22
22
|
readSubagentSettings
|
|
23
|
-
} from "./chunk-QBORTI4W.
|
|
23
|
+
} from "./chunk-QBORTI4W.ts";
|
|
24
24
|
import {
|
|
25
25
|
resolveStatefulLimits
|
|
26
|
-
} from "./chunk-7OBINKFM.
|
|
26
|
+
} from "./chunk-7OBINKFM.ts";
|
|
27
27
|
import {
|
|
28
28
|
THINKING_LEVELS,
|
|
29
29
|
isThinkingLevel
|
|
30
|
-
} from "./chunk-DPPVEQAM.
|
|
30
|
+
} from "./chunk-DPPVEQAM.ts";
|
|
31
31
|
import {
|
|
32
32
|
COLLAPSED_LIST_LIMIT,
|
|
33
33
|
expansionHint,
|
|
@@ -40,20 +40,20 @@ import {
|
|
|
40
40
|
stringValue,
|
|
41
41
|
textResult,
|
|
42
42
|
toolHeader
|
|
43
|
-
} from "./chunk-BFK2Z4ZF.
|
|
43
|
+
} from "./chunk-BFK2Z4ZF.ts";
|
|
44
44
|
import {
|
|
45
45
|
DelegationContractSchema
|
|
46
|
-
} from "./chunk-I2FAK44T.
|
|
46
|
+
} from "./chunk-I2FAK44T.ts";
|
|
47
47
|
import {
|
|
48
48
|
DEFAULT_MAX_CONTEXT_BYTES,
|
|
49
49
|
MAX_SUBAGENT_TIMEOUT_MS,
|
|
50
50
|
MAX_TOOL_MESSAGE_BYTES,
|
|
51
51
|
truncateUtf8
|
|
52
|
-
} from "./chunk-H3FP6DLR.
|
|
52
|
+
} from "./chunk-H3FP6DLR.ts";
|
|
53
53
|
import {
|
|
54
54
|
MAX_SPAWN_IDEMPOTENCY_KEY_LENGTH,
|
|
55
55
|
assertSpawnIdempotencyKey
|
|
56
|
-
} from "./chunk-S2IWVK3J.
|
|
56
|
+
} from "./chunk-S2IWVK3J.ts";
|
|
57
57
|
|
|
58
58
|
// src/stateful-agent-view.ts
|
|
59
59
|
function formatStatefulAgentLine(agent, now = Date.now()) {
|
|
@@ -544,14 +544,14 @@ var statefulSpawnModules;
|
|
|
544
544
|
var workspaceModule;
|
|
545
545
|
function loadStatefulSessionModules() {
|
|
546
546
|
statefulSessionModules ??= Promise.all([
|
|
547
|
-
import("./completion-delivery-YPOWSSV3.
|
|
548
|
-
import("./peer-communication-KL36Z6CO.
|
|
549
|
-
import("./context-QDKLVQXE.
|
|
550
|
-
import("./create-stateful-transport-
|
|
551
|
-
import("./cwd-policy-NB6XZ5GF.
|
|
552
|
-
import("./persistence-VSGXAW4P.
|
|
553
|
-
import("./registry-E6XPJB7L.
|
|
554
|
-
import("./stateful-lifecycle-JAR6K55H.
|
|
547
|
+
import("./completion-delivery-YPOWSSV3.ts"),
|
|
548
|
+
import("./peer-communication-KL36Z6CO.ts"),
|
|
549
|
+
import("./context-QDKLVQXE.ts"),
|
|
550
|
+
import("./create-stateful-transport-F5OG2LEY.ts"),
|
|
551
|
+
import("./cwd-policy-NB6XZ5GF.ts"),
|
|
552
|
+
import("./persistence-VSGXAW4P.ts"),
|
|
553
|
+
import("./registry-E6XPJB7L.ts"),
|
|
554
|
+
import("./stateful-lifecycle-JAR6K55H.ts")
|
|
555
555
|
]).then(
|
|
556
556
|
([
|
|
557
557
|
broker,
|
|
@@ -580,15 +580,15 @@ function loadStatefulSessionModules() {
|
|
|
580
580
|
}
|
|
581
581
|
function loadStatefulSpawnModules() {
|
|
582
582
|
statefulSpawnModules ??= Promise.all([
|
|
583
|
-
import("./discovery-K25T3SH4.
|
|
584
|
-
import("./capability-grant-CGEWOEKE.
|
|
585
|
-
import("./context-QDKLVQXE.
|
|
586
|
-
import("./cwd-policy-NB6XZ5GF.
|
|
587
|
-
import("./delegation-contract-WJPT4FVS.
|
|
588
|
-
import("./runtime-policy-5YELCOVC.
|
|
589
|
-
import("./retained-semantic-state-7WXSGRJU.
|
|
590
|
-
import("./semantic-snapshot-WPJ3UAFW.
|
|
591
|
-
import("./spawn-idempotency-QGHO2WKC.
|
|
583
|
+
import("./discovery-K25T3SH4.ts"),
|
|
584
|
+
import("./capability-grant-CGEWOEKE.ts"),
|
|
585
|
+
import("./context-QDKLVQXE.ts"),
|
|
586
|
+
import("./cwd-policy-NB6XZ5GF.ts"),
|
|
587
|
+
import("./delegation-contract-WJPT4FVS.ts"),
|
|
588
|
+
import("./runtime-policy-5YELCOVC.ts"),
|
|
589
|
+
import("./retained-semantic-state-7WXSGRJU.ts"),
|
|
590
|
+
import("./semantic-snapshot-WPJ3UAFW.ts"),
|
|
591
|
+
import("./spawn-idempotency-QGHO2WKC.ts")
|
|
592
592
|
]).then(
|
|
593
593
|
([
|
|
594
594
|
agents,
|
|
@@ -618,7 +618,7 @@ function loadStatefulSpawnModules() {
|
|
|
618
618
|
return statefulSpawnModules;
|
|
619
619
|
}
|
|
620
620
|
async function loadWorkspaceModule() {
|
|
621
|
-
workspaceModule ??= import("./workspace-WDKLN72J.
|
|
621
|
+
workspaceModule ??= import("./workspace-WDKLN72J.ts").catch((error) => {
|
|
622
622
|
workspaceModule = void 0;
|
|
623
623
|
throw error;
|
|
624
624
|
});
|
|
@@ -993,7 +993,7 @@ function registerStatefulSubagents(pi, dependencies = {}) {
|
|
|
993
993
|
const shutdown = async () => {
|
|
994
994
|
await previousPeerBroker?.close();
|
|
995
995
|
const currentWorkspaceManager = await getWorkspaceManager();
|
|
996
|
-
const { disposeStatefulRuntime } = await import("./stateful-lifecycle-JAR6K55H.
|
|
996
|
+
const { disposeStatefulRuntime } = await import("./stateful-lifecycle-JAR6K55H.ts");
|
|
997
997
|
const errors = await disposeStatefulRuntime(previousRegistry, currentWorkspaceManager);
|
|
998
998
|
if (errors.length > 0 && ctx.hasUI) {
|
|
999
999
|
ctx.ui.notify(`Subagent shutdown cleanup reported ${errors.length} error(s).`, "warning");
|
|
@@ -1540,4 +1540,4 @@ export {
|
|
|
1540
1540
|
formatStatefulAgentLine,
|
|
1541
1541
|
registerStatefulSubagents
|
|
1542
1542
|
};
|
|
1543
|
-
//# sourceMappingURL=chunk-
|
|
1543
|
+
//# sourceMappingURL=chunk-2OUVSORM.ts.map
|
|
@@ -2,19 +2,19 @@
|
|
|
2
2
|
// @ts-nocheck -- generated JavaScript uses a .ts extension for Pi's Jiti loader.
|
|
3
3
|
import {
|
|
4
4
|
PI_SUBAGENTS_RPC_PROTOCOL
|
|
5
|
-
} from "./chunk-C4L6P266.
|
|
5
|
+
} from "./chunk-C4L6P266.ts";
|
|
6
6
|
import {
|
|
7
7
|
SUBAGENT_COMPLETION_MESSAGE_TYPE
|
|
8
|
-
} from "./chunk-QDVGH2X7.
|
|
8
|
+
} from "./chunk-QDVGH2X7.ts";
|
|
9
9
|
import {
|
|
10
10
|
safeTerminalText
|
|
11
|
-
} from "./chunk-SWGQLFSD.
|
|
11
|
+
} from "./chunk-SWGQLFSD.ts";
|
|
12
12
|
import {
|
|
13
13
|
DEFAULT_MAX_CONTEXT_BYTES,
|
|
14
14
|
MAX_TOOL_MESSAGE_BYTES,
|
|
15
15
|
redactPrivateText,
|
|
16
16
|
truncateUtf8
|
|
17
|
-
} from "./chunk-H3FP6DLR.
|
|
17
|
+
} from "./chunk-H3FP6DLR.ts";
|
|
18
18
|
|
|
19
19
|
// src/completion-delivery.ts
|
|
20
20
|
var MAX_COMPLETION_ERROR_BYTES = 512;
|
|
@@ -8,16 +8,16 @@ import {
|
|
|
8
8
|
normalizeSubagentSettings,
|
|
9
9
|
pathEntryExists,
|
|
10
10
|
resolveSubagentSettingsPaths
|
|
11
|
-
} from "./chunk-QBORTI4W.
|
|
11
|
+
} from "./chunk-QBORTI4W.ts";
|
|
12
12
|
import {
|
|
13
13
|
STATEFUL_LIMIT_FIELDS,
|
|
14
14
|
isValidStatefulLimit,
|
|
15
15
|
resolveStatefulLimits,
|
|
16
16
|
statefulLimitDefinition
|
|
17
|
-
} from "./chunk-7OBINKFM.
|
|
17
|
+
} from "./chunk-7OBINKFM.ts";
|
|
18
18
|
import {
|
|
19
19
|
MAX_CONFIGURABLE_PARALLEL_TASKS
|
|
20
|
-
} from "./chunk-H3FP6DLR.
|
|
20
|
+
} from "./chunk-H3FP6DLR.ts";
|
|
21
21
|
|
|
22
22
|
// src/settings.ts
|
|
23
23
|
import { randomUUID } from "node:crypto";
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
// @ts-nocheck -- generated JavaScript uses a .ts extension for Pi's Jiti loader.
|
|
3
3
|
import {
|
|
4
4
|
formatTimeoutCheckpoint
|
|
5
|
-
} from "./chunk-RTCVYIZA.
|
|
5
|
+
} from "./chunk-RTCVYIZA.ts";
|
|
6
6
|
import {
|
|
7
7
|
DEFAULT_MAX_CONTEXT_BYTES,
|
|
8
8
|
truncateUtf8
|
|
9
|
-
} from "./chunk-H3FP6DLR.
|
|
9
|
+
} from "./chunk-H3FP6DLR.ts";
|
|
10
10
|
|
|
11
11
|
// src/runner-result.ts
|
|
12
12
|
function getFinalOutput(messages) {
|
|
@@ -2,36 +2,36 @@
|
|
|
2
2
|
// @ts-nocheck -- generated JavaScript uses a .ts extension for Pi's Jiti loader.
|
|
3
3
|
import {
|
|
4
4
|
resolvePiInvocation
|
|
5
|
-
} from "./chunk-IGAMVWFN.
|
|
5
|
+
} from "./chunk-IGAMVWFN.ts";
|
|
6
6
|
import {
|
|
7
7
|
classifyStructuredOutcome
|
|
8
|
-
} from "./chunk-47SK2QYC.
|
|
8
|
+
} from "./chunk-47SK2QYC.ts";
|
|
9
9
|
import {
|
|
10
10
|
revokeCapabilityGrant
|
|
11
|
-
} from "./chunk-HKC4ES4B.
|
|
11
|
+
} from "./chunk-HKC4ES4B.ts";
|
|
12
12
|
import {
|
|
13
13
|
buildTimeoutFinalizationPrompt,
|
|
14
14
|
resolveTimeoutFinalizationMs
|
|
15
|
-
} from "./chunk-G3RSMSXJ.
|
|
15
|
+
} from "./chunk-G3RSMSXJ.ts";
|
|
16
16
|
import {
|
|
17
17
|
formatResultFailure,
|
|
18
18
|
getFinalOutput,
|
|
19
19
|
getResultFinalOutput,
|
|
20
20
|
isResultError
|
|
21
|
-
} from "./chunk-AEUYS7JC.
|
|
21
|
+
} from "./chunk-AEUYS7JC.ts";
|
|
22
22
|
import {
|
|
23
23
|
TURN_TERMINATION_VERSION,
|
|
24
24
|
TimeoutProgressJournal,
|
|
25
25
|
formatTimeoutCheckpoint,
|
|
26
26
|
formatTurnTerminationMessage,
|
|
27
27
|
journalMessages
|
|
28
|
-
} from "./chunk-RTCVYIZA.
|
|
28
|
+
} from "./chunk-RTCVYIZA.ts";
|
|
29
29
|
import {
|
|
30
30
|
TurnBudgetMonitor
|
|
31
|
-
} from "./chunk-ONDTY4EL.
|
|
31
|
+
} from "./chunk-ONDTY4EL.ts";
|
|
32
32
|
import {
|
|
33
33
|
parseAnyStructuredSubagentResult
|
|
34
|
-
} from "./chunk-RSUXZD6S.
|
|
34
|
+
} from "./chunk-RSUXZD6S.ts";
|
|
35
35
|
import {
|
|
36
36
|
DEFAULT_MAX_CONTEXT_BYTES,
|
|
37
37
|
DEFAULT_MAX_MESSAGES,
|
|
@@ -40,7 +40,7 @@ import {
|
|
|
40
40
|
MAX_SUBAGENT_TIMEOUT_MS,
|
|
41
41
|
appendBounded,
|
|
42
42
|
truncateUtf8
|
|
43
|
-
} from "./chunk-H3FP6DLR.
|
|
43
|
+
} from "./chunk-H3FP6DLR.ts";
|
|
44
44
|
|
|
45
45
|
// src/protocol.ts
|
|
46
46
|
import { StringDecoder } from "node:string_decoder";
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// @ts-nocheck -- generated JavaScript uses a .ts extension for Pi's Jiti loader.
|
|
3
3
|
import {
|
|
4
4
|
resolveAgentToolNames
|
|
5
|
-
} from "./chunk-DPPVEQAM.
|
|
5
|
+
} from "./chunk-DPPVEQAM.ts";
|
|
6
6
|
|
|
7
7
|
// src/admission-policy.ts
|
|
8
8
|
var DELEGATION_ADMISSION_VERSION = "pi-subagents:admission:v1";
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
// @ts-nocheck -- generated JavaScript uses a .ts extension for Pi's Jiti loader.
|
|
3
3
|
import {
|
|
4
4
|
projectAgentRecords
|
|
5
|
-
} from "./chunk-KMGKCEO4.
|
|
5
|
+
} from "./chunk-KMGKCEO4.ts";
|
|
6
6
|
import {
|
|
7
7
|
updateStatefulLimitSetting
|
|
8
|
-
} from "./chunk-7QPPBBXZ.
|
|
8
|
+
} from "./chunk-7QPPBBXZ.ts";
|
|
9
9
|
import {
|
|
10
10
|
inspectBlockingParallelLimitSettings,
|
|
11
11
|
inspectCompletionDeliverySettings,
|
|
@@ -14,16 +14,16 @@ import {
|
|
|
14
14
|
inspectDelegationWorkflowSettings,
|
|
15
15
|
inspectStatefulLimitSettings,
|
|
16
16
|
inspectStatefulTransportSettings
|
|
17
|
-
} from "./chunk-QBORTI4W.
|
|
17
|
+
} from "./chunk-QBORTI4W.ts";
|
|
18
18
|
import {
|
|
19
19
|
STATEFUL_LIMIT_DEFINITIONS,
|
|
20
20
|
isValidStatefulLimit,
|
|
21
21
|
resolveStatefulLimits,
|
|
22
22
|
statefulLimitDefinition
|
|
23
|
-
} from "./chunk-7OBINKFM.
|
|
23
|
+
} from "./chunk-7OBINKFM.ts";
|
|
24
24
|
import {
|
|
25
25
|
safeTerminalLine
|
|
26
|
-
} from "./chunk-SWGQLFSD.
|
|
26
|
+
} from "./chunk-SWGQLFSD.ts";
|
|
27
27
|
|
|
28
28
|
// src/stateful-limit-ui.ts
|
|
29
29
|
function statefulLimitListScreen(runtime) {
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
MAX_TOOL_MESSAGE_BYTES,
|
|
5
5
|
redactPrivateText,
|
|
6
6
|
truncateUtf8
|
|
7
|
-
} from "./chunk-H3FP6DLR.
|
|
7
|
+
} from "./chunk-H3FP6DLR.ts";
|
|
8
8
|
|
|
9
9
|
// src/child-peer-tools.ts
|
|
10
10
|
import { defineTool } from "@earendil-works/pi-coding-agent";
|
|
@@ -130,7 +130,7 @@ function createInProcessPeerExtension(runtime, agentId) {
|
|
|
130
130
|
});
|
|
131
131
|
}
|
|
132
132
|
function childPeerBridgePath() {
|
|
133
|
-
return fileURLToPath(new URL("./child-peer-bridge.
|
|
133
|
+
return fileURLToPath(new URL("./child-peer-bridge.ts", import.meta.url));
|
|
134
134
|
}
|
|
135
135
|
function peerBridgeEnvironment(credentials) {
|
|
136
136
|
return {
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import {
|
|
4
4
|
cachedModuleLoader,
|
|
5
5
|
throwIfAborted
|
|
6
|
-
} from "./chunk-HOP5FXDT.
|
|
6
|
+
} from "./chunk-HOP5FXDT.ts";
|
|
7
7
|
import {
|
|
8
8
|
COLLAPSED_LIST_LIMIT,
|
|
9
9
|
booleanValue,
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
statusBadge,
|
|
18
18
|
stringValue,
|
|
19
19
|
toolHeader
|
|
20
|
-
} from "./chunk-BFK2Z4ZF.
|
|
20
|
+
} from "./chunk-BFK2Z4ZF.ts";
|
|
21
21
|
|
|
22
22
|
// src/inspect-tool.ts
|
|
23
23
|
import { StringEnum } from "@earendil-works/pi-ai";
|
|
@@ -328,7 +328,7 @@ function stringList(value) {
|
|
|
328
328
|
// src/inspect-registration.ts
|
|
329
329
|
function registerSubagentInspect(pi, runtime, dependencies = {}) {
|
|
330
330
|
const loadExecution = cachedModuleLoader(
|
|
331
|
-
dependencies.loadExecution ?? (() => import("./inspect-UOQQ3KNL.
|
|
331
|
+
dependencies.loadExecution ?? (() => import("./inspect-UOQQ3KNL.ts"))
|
|
332
332
|
);
|
|
333
333
|
let lifecycleGeneration = 0;
|
|
334
334
|
pi.on("session_start", () => {
|
|
@@ -2,15 +2,15 @@
|
|
|
2
2
|
// @ts-nocheck -- generated JavaScript uses a .ts extension for Pi's Jiti loader.
|
|
3
3
|
import {
|
|
4
4
|
formatTimeoutCheckpoint
|
|
5
|
-
} from "./chunk-RTCVYIZA.
|
|
5
|
+
} from "./chunk-RTCVYIZA.ts";
|
|
6
6
|
import {
|
|
7
7
|
appendResultInstruction
|
|
8
|
-
} from "./chunk-RSUXZD6S.
|
|
8
|
+
} from "./chunk-RSUXZD6S.ts";
|
|
9
9
|
import {
|
|
10
10
|
DEFAULT_MAX_CONTEXT_BYTES,
|
|
11
11
|
redactPrivateText,
|
|
12
12
|
truncateUtf8
|
|
13
|
-
} from "./chunk-H3FP6DLR.
|
|
13
|
+
} from "./chunk-H3FP6DLR.ts";
|
|
14
14
|
|
|
15
15
|
// src/timeout-finalization.ts
|
|
16
16
|
var DEFAULT_TIMEOUT_FINALIZATION_MS = 45e3;
|
|
@@ -3,20 +3,20 @@
|
|
|
3
3
|
import {
|
|
4
4
|
MAX_SUBAGENT_TOOL_CALLS,
|
|
5
5
|
MAX_SUBAGENT_TURNS
|
|
6
|
-
} from "./chunk-ONDTY4EL.
|
|
6
|
+
} from "./chunk-ONDTY4EL.ts";
|
|
7
7
|
import {
|
|
8
8
|
SUBAGENT_RESULT_FORMATS
|
|
9
|
-
} from "./chunk-RSUXZD6S.
|
|
9
|
+
} from "./chunk-RSUXZD6S.ts";
|
|
10
10
|
import {
|
|
11
11
|
THINKING_LEVELS
|
|
12
|
-
} from "./chunk-DPPVEQAM.
|
|
12
|
+
} from "./chunk-DPPVEQAM.ts";
|
|
13
13
|
import {
|
|
14
14
|
DelegationContractSchema
|
|
15
|
-
} from "./chunk-I2FAK44T.
|
|
15
|
+
} from "./chunk-I2FAK44T.ts";
|
|
16
16
|
import {
|
|
17
17
|
MAX_CONFIGURABLE_PARALLEL_TASKS,
|
|
18
18
|
MAX_SUBAGENT_TIMEOUT_MS
|
|
19
|
-
} from "./chunk-H3FP6DLR.
|
|
19
|
+
} from "./chunk-H3FP6DLR.ts";
|
|
20
20
|
|
|
21
21
|
// src/params.ts
|
|
22
22
|
import { StringEnum as StringEnum2 } from "@earendil-works/pi-ai";
|
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
// @ts-nocheck -- generated JavaScript uses a .ts extension for Pi's Jiti loader.
|
|
3
3
|
import {
|
|
4
4
|
discoverAgents
|
|
5
|
-
} from "./chunk-PSK43Y6A.
|
|
5
|
+
} from "./chunk-PSK43Y6A.ts";
|
|
6
6
|
import {
|
|
7
7
|
readSubagentSettings
|
|
8
|
-
} from "./chunk-QBORTI4W.
|
|
8
|
+
} from "./chunk-QBORTI4W.ts";
|
|
9
9
|
import {
|
|
10
10
|
safeTerminalLine
|
|
11
|
-
} from "./chunk-SWGQLFSD.
|
|
11
|
+
} from "./chunk-SWGQLFSD.ts";
|
|
12
12
|
|
|
13
13
|
// src/stateful-safety.ts
|
|
14
14
|
import { realpathSync } from "node:fs";
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
// @ts-nocheck -- generated JavaScript uses a .ts extension for Pi's Jiti loader.
|
|
3
3
|
import {
|
|
4
4
|
SUBAGENT_RESULT_FORMATS
|
|
5
|
-
} from "./chunk-RSUXZD6S.
|
|
5
|
+
} from "./chunk-RSUXZD6S.ts";
|
|
6
6
|
import {
|
|
7
7
|
isThinkingLevel
|
|
8
|
-
} from "./chunk-DPPVEQAM.
|
|
8
|
+
} from "./chunk-DPPVEQAM.ts";
|
|
9
9
|
|
|
10
10
|
// src/agents/discovery.ts
|
|
11
11
|
import * as fs from "node:fs";
|
|
@@ -4,18 +4,18 @@ import {
|
|
|
4
4
|
STATEFUL_LIMIT_FIELDS,
|
|
5
5
|
isValidStatefulLimit,
|
|
6
6
|
resolveStatefulLimits
|
|
7
|
-
} from "./chunk-7OBINKFM.
|
|
7
|
+
} from "./chunk-7OBINKFM.ts";
|
|
8
8
|
import {
|
|
9
9
|
CONSULTATION_CWD_POLICIES,
|
|
10
10
|
CONSULT_RESOURCE_POLICIES,
|
|
11
11
|
DELEGATION_CWD_POLICIES,
|
|
12
12
|
isThinkingLevel
|
|
13
|
-
} from "./chunk-DPPVEQAM.
|
|
13
|
+
} from "./chunk-DPPVEQAM.ts";
|
|
14
14
|
import {
|
|
15
15
|
DEFAULT_MAX_PARALLEL_TASKS,
|
|
16
16
|
MAX_CONFIGURABLE_PARALLEL_TASKS,
|
|
17
17
|
MAX_SUBAGENT_TIMEOUT_MS
|
|
18
|
-
} from "./chunk-H3FP6DLR.
|
|
18
|
+
} from "./chunk-H3FP6DLR.ts";
|
|
19
19
|
|
|
20
20
|
// src/settings/schema.ts
|
|
21
21
|
function hasOwn(obj, key) {
|
|
@@ -8,10 +8,10 @@ import {
|
|
|
8
8
|
safeBlock,
|
|
9
9
|
safeLine,
|
|
10
10
|
statusBadge
|
|
11
|
-
} from "./chunk-BFK2Z4ZF.
|
|
11
|
+
} from "./chunk-BFK2Z4ZF.ts";
|
|
12
12
|
import {
|
|
13
13
|
MAX_TOOL_MESSAGE_BYTES
|
|
14
|
-
} from "./chunk-H3FP6DLR.
|
|
14
|
+
} from "./chunk-H3FP6DLR.ts";
|
|
15
15
|
|
|
16
16
|
// src/completion-render.ts
|
|
17
17
|
import { Box, Spacer, sliceByColumn, visibleWidth } from "@earendil-works/pi-tui";
|
|
@@ -3,19 +3,19 @@
|
|
|
3
3
|
import {
|
|
4
4
|
cachedModuleLoader,
|
|
5
5
|
throwIfAborted
|
|
6
|
-
} from "./chunk-HOP5FXDT.
|
|
6
|
+
} from "./chunk-HOP5FXDT.ts";
|
|
7
7
|
import {
|
|
8
8
|
BUILT_IN_AGENTS,
|
|
9
9
|
discoverAgents
|
|
10
|
-
} from "./chunk-PSK43Y6A.
|
|
10
|
+
} from "./chunk-PSK43Y6A.ts";
|
|
11
11
|
import {
|
|
12
12
|
DEFAULT_CONSULTATION_CWD_POLICY,
|
|
13
13
|
DEFAULT_CONSULT_RESOURCE_POLICY
|
|
14
|
-
} from "./chunk-QBORTI4W.
|
|
14
|
+
} from "./chunk-QBORTI4W.ts";
|
|
15
15
|
import {
|
|
16
16
|
THINKING_LEVELS,
|
|
17
17
|
resolveAgentToolNames
|
|
18
|
-
} from "./chunk-DPPVEQAM.
|
|
18
|
+
} from "./chunk-DPPVEQAM.ts";
|
|
19
19
|
import {
|
|
20
20
|
COLLAPSED_ANSWER_LINES,
|
|
21
21
|
COLLAPSED_LIST_LIMIT,
|
|
@@ -31,11 +31,11 @@ import {
|
|
|
31
31
|
stringValue,
|
|
32
32
|
textResult,
|
|
33
33
|
toolHeader
|
|
34
|
-
} from "./chunk-BFK2Z4ZF.
|
|
34
|
+
} from "./chunk-BFK2Z4ZF.ts";
|
|
35
35
|
import {
|
|
36
36
|
DEFAULT_MAX_CONTEXT_BYTES,
|
|
37
37
|
MAX_SUBAGENT_TIMEOUT_MS
|
|
38
|
-
} from "./chunk-H3FP6DLR.
|
|
38
|
+
} from "./chunk-H3FP6DLR.ts";
|
|
39
39
|
|
|
40
40
|
// src/agents/catalog.ts
|
|
41
41
|
var DEFAULT_AGENT_CATALOG_MAX_ITEMS = 32;
|
|
@@ -372,7 +372,7 @@ function safeNumber(value) {
|
|
|
372
372
|
// src/consult-registration.ts
|
|
373
373
|
function registerSubagentConsult(pi, options, dependencies = {}) {
|
|
374
374
|
const loadExecution = cachedModuleLoader(
|
|
375
|
-
dependencies.loadExecution ?? (() => import("./consult-NYXVDN5G.
|
|
375
|
+
dependencies.loadExecution ?? (() => import("./consult-NYXVDN5G.ts"))
|
|
376
376
|
);
|
|
377
377
|
let generation = 0;
|
|
378
378
|
const active = /* @__PURE__ */ new Set();
|
|
@@ -2,18 +2,18 @@
|
|
|
2
2
|
// @ts-nocheck -- generated JavaScript uses a .ts extension for Pi's Jiti loader.
|
|
3
3
|
import {
|
|
4
4
|
appendResultInstruction
|
|
5
|
-
} from "./chunk-RSUXZD6S.
|
|
5
|
+
} from "./chunk-RSUXZD6S.ts";
|
|
6
6
|
import {
|
|
7
7
|
appendDelegationContract
|
|
8
|
-
} from "./chunk-I2FAK44T.
|
|
8
|
+
} from "./chunk-I2FAK44T.ts";
|
|
9
9
|
import {
|
|
10
10
|
DEFAULT_MAX_CONTEXT_BYTES,
|
|
11
11
|
redactPrivateText,
|
|
12
12
|
truncateUtf8
|
|
13
|
-
} from "./chunk-H3FP6DLR.
|
|
13
|
+
} from "./chunk-H3FP6DLR.ts";
|
|
14
14
|
import {
|
|
15
15
|
resolveDefaultSubagentTimeoutMs
|
|
16
|
-
} from "./chunk-RRR66UWR.
|
|
16
|
+
} from "./chunk-RRR66UWR.ts";
|
|
17
17
|
|
|
18
18
|
// src/stateful-prompt.ts
|
|
19
19
|
function buildStatefulTurnPrompt(record, task, maxBytes = DEFAULT_MAX_CONTEXT_BYTES) {
|