@narumitw/pi-subagents 2.0.6 → 2.1.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/README.md +171 -60
- package/dist/chunks/{auto-transport-SY2VHUFH.ts → auto-transport-FUUKFDIG.ts} +6 -6
- package/dist/chunks/{capability-grant-CGEWOEKE.ts → capability-grant-PR72SWWS.ts} +4 -4
- package/dist/chunks/{chunk-CBP76ARQ.ts → chunk-2LMJU25E.ts} +172 -74
- package/dist/chunks/chunk-2LMJU25E.ts.map +7 -0
- package/dist/chunks/{chunk-DPPVEQAM.ts → chunk-4AQSF7AS.ts} +1 -1
- package/dist/chunks/chunk-4AQSF7AS.ts.map +7 -0
- package/dist/chunks/chunk-6H6TBBED.ts +108 -0
- package/dist/chunks/chunk-6H6TBBED.ts.map +7 -0
- package/dist/chunks/{chunk-YBUWBRF7.ts → chunk-6NSJVPXX.ts} +6 -16
- package/dist/chunks/{chunk-YBUWBRF7.ts.map → chunk-6NSJVPXX.ts.map} +2 -2
- package/dist/chunks/{chunk-DSOOH73Y.ts → chunk-7AAJEUSL.ts} +3 -3
- package/dist/chunks/{chunk-DSOOH73Y.ts.map → chunk-7AAJEUSL.ts.map} +2 -2
- package/dist/chunks/{chunk-7QPPBBXZ.ts → chunk-D4CR7T73.ts} +21 -3
- package/dist/chunks/chunk-D4CR7T73.ts.map +7 -0
- package/dist/chunks/{chunk-NIF42QMF.ts → chunk-FEVPWRMU.ts} +7 -4
- package/dist/chunks/chunk-FEVPWRMU.ts.map +7 -0
- package/dist/chunks/{chunk-S2IWVK3J.ts → chunk-ILEQ27AL.ts} +3 -2
- package/dist/chunks/chunk-ILEQ27AL.ts.map +7 -0
- package/dist/chunks/{chunk-DQMN4OYM.ts → chunk-ITVWPNU4.ts} +12 -106
- package/dist/chunks/chunk-ITVWPNU4.ts.map +7 -0
- package/dist/chunks/{chunk-QDVGH2X7.ts → chunk-IWC32VPY.ts} +2 -1
- package/dist/chunks/{chunk-QDVGH2X7.ts.map → chunk-IWC32VPY.ts.map} +2 -2
- package/dist/chunks/{chunk-I2FAK44T.ts → chunk-JSZIP73U.ts} +48 -10
- package/dist/chunks/chunk-JSZIP73U.ts.map +7 -0
- package/dist/chunks/{chunk-ZHTNCZIA.ts → chunk-JU6LUNLP.ts} +2 -2
- package/dist/chunks/{chunk-PSK43Y6A.ts → chunk-LASD73CM.ts} +2 -2
- package/dist/chunks/{chunk-C4L6P266.ts → chunk-LEOYDZI3.ts} +1 -1
- package/dist/chunks/{chunk-C4L6P266.ts.map → chunk-LEOYDZI3.ts.map} +2 -2
- package/dist/chunks/{chunk-H3BFJ7HJ.ts → chunk-LL4LP2T7.ts} +5 -5
- package/dist/chunks/chunk-N2T5IN4X.ts +18 -0
- package/dist/chunks/chunk-N2T5IN4X.ts.map +7 -0
- package/dist/chunks/chunk-NLT67IZS.ts +322 -0
- package/dist/chunks/chunk-NLT67IZS.ts.map +7 -0
- package/dist/chunks/{chunk-G3RSMSXJ.ts → chunk-NTRPLF46.ts} +1 -1
- package/dist/chunks/chunk-NTRPLF46.ts.map +7 -0
- package/dist/chunks/{chunk-EFBPISNT.ts → chunk-PBZMBTNJ.ts} +104 -103
- package/dist/chunks/chunk-PBZMBTNJ.ts.map +7 -0
- package/dist/chunks/{chunk-SCZ33MYW.ts → chunk-PGLSFLYW.ts} +2 -2
- package/dist/chunks/{chunk-O4VO6JUJ.ts → chunk-TM2R67J3.ts} +3 -3
- package/dist/chunks/{chunk-QBORTI4W.ts → chunk-TMZRHIIK.ts} +32 -3
- package/dist/chunks/chunk-TMZRHIIK.ts.map +7 -0
- package/dist/chunks/chunk-TZ34IQ3M.ts +59 -0
- package/dist/chunks/chunk-TZ34IQ3M.ts.map +7 -0
- package/dist/chunks/{chunk-7OBINKFM.ts → chunk-VDG7LTYE.ts} +11 -11
- package/dist/chunks/chunk-VDG7LTYE.ts.map +7 -0
- package/dist/chunks/{chunk-AEUYS7JC.ts → chunk-X4NMONPE.ts} +1 -1
- package/dist/chunks/chunk-X4NMONPE.ts.map +7 -0
- package/dist/chunks/{chunk-HKC4ES4B.ts → chunk-YPJEN6NU.ts} +2 -2
- package/dist/chunks/{chunk-434NII74.ts → chunk-YU53SHA7.ts} +54 -8
- package/dist/chunks/chunk-YU53SHA7.ts.map +7 -0
- package/dist/chunks/{completion-delivery-YPOWSSV3.ts → completion-delivery-RSJU6BXL.ts} +5 -4
- package/dist/chunks/{config-status-J4GPWP46.ts → config-status-FKGDECZ3.ts} +7 -6
- package/dist/chunks/{config-ui-2YUCUEBM.ts → config-ui-ABHYNGQ7.ts} +297 -231
- package/dist/chunks/config-ui-ABHYNGQ7.ts.map +7 -0
- package/dist/chunks/{consult-IV7UBNQQ.ts → consult-LJU3IQY5.ts} +14 -13
- package/dist/chunks/consult-LJU3IQY5.ts.map +7 -0
- package/dist/chunks/{create-stateful-transport-ZP3IXNV3.ts → create-stateful-transport-JWC2EFYL.ts} +6 -6
- package/dist/chunks/{delegation-contract-WJPT4FVS.ts → delegation-contract-LA56I5DT.ts} +2 -2
- package/dist/chunks/{discovery-K25T3SH4.ts → discovery-MIFB2U4Y.ts} +3 -3
- package/dist/chunks/{execution-LA7HN5YF.ts → execution-Q2JZLKJA.ts} +19 -16
- package/dist/chunks/execution-Q2JZLKJA.ts.map +7 -0
- package/dist/chunks/{in-process-transport-4RF3J6XK.ts → in-process-transport-HJ6TZXC3.ts} +9 -9
- package/dist/chunks/{inspect-XV2QALMR.ts → inspect-UH2TKH6E.ts} +25 -10
- package/dist/chunks/inspect-UH2TKH6E.ts.map +7 -0
- package/dist/chunks/{persistence-VSGXAW4P.ts → persistence-UY3PY6E5.ts} +11 -7
- package/dist/chunks/persistence-UY3PY6E5.ts.map +7 -0
- package/dist/chunks/{registry-E6XPJB7L.ts → registry-BT54L6CY.ts} +136 -15
- package/dist/chunks/registry-BT54L6CY.ts.map +7 -0
- package/dist/chunks/{retained-semantic-state-7WXSGRJU.ts → retained-semantic-state-GM75FZGE.ts} +3 -3
- package/dist/chunks/{rpc-transport-NEHBHWX4.ts → rpc-transport-7R7DVCEB.ts} +12 -16
- package/dist/chunks/rpc-transport-7R7DVCEB.ts.map +7 -0
- package/dist/chunks/{spawn-idempotency-QGHO2WKC.ts → spawn-idempotency-BNHOSMZW.ts} +2 -2
- package/dist/chunks/{subprocess-transport-NSHOGDC4.ts → subprocess-transport-VHZJRBTW.ts} +15 -14
- package/dist/chunks/subprocess-transport-VHZJRBTW.ts.map +7 -0
- package/dist/chunks/usage-recording-store-CW3EH2SZ.ts +164 -0
- package/dist/chunks/usage-recording-store-CW3EH2SZ.ts.map +7 -0
- package/dist/index.ts +682 -82
- package/dist/index.ts.map +3 -3
- package/docs/async-runtime-protocol.md +83 -0
- package/docs/implementation-notes/pi-subagents-capability-matrix.md +62 -0
- package/docs/implementation-notes/pi-subagents-current-direction.md +99 -0
- package/docs/implementation-notes/pi-subagents-rpc-v1.md +153 -0
- package/docs/pi-subagents-diagrams.md +183 -0
- package/package.json +9 -8
- package/src/agents/types.ts +2 -0
- package/src/async-subagent-benchmark.ts +532 -0
- package/src/completion-delivery.ts +71 -4
- package/src/completion-render.ts +1 -0
- package/src/completion-requirement.ts +479 -0
- package/src/config-registration.ts +5 -5
- package/src/config-status.ts +66 -70
- package/src/config-ui.ts +244 -150
- package/src/consult-registration.ts +4 -12
- package/src/consult-resources.ts +1 -1
- package/src/consult.ts +3 -8
- package/src/delegation-contract.ts +55 -9
- package/src/execution-plan.ts +1 -1
- package/src/execution-ui.ts +40 -29
- package/src/execution.ts +2 -3
- package/src/inspect.ts +24 -1
- package/src/orchestration-metrics.ts +1 -1
- package/src/panel-execution.ts +2 -3
- package/src/panel-failure.ts +1 -1
- package/src/panel-render.ts +1 -1
- package/src/parallel-limit-ui.ts +6 -5
- package/src/params.ts +2 -1
- package/src/persistence.ts +9 -0
- package/src/process-control.ts +43 -0
- package/src/registry-types.ts +5 -0
- package/src/registry.ts +162 -18
- package/src/render.ts +2 -1
- package/src/rpc-transport.ts +1 -1
- package/src/runner-outcome.ts +1 -1
- package/src/runner-result.ts +1 -1
- package/src/runner-types.ts +102 -0
- package/src/runner.ts +11 -192
- package/src/session-guidance-contract.ts +309 -0
- package/src/settings/inspection.ts +27 -0
- package/src/settings/schema.ts +9 -0
- package/src/settings-reader.ts +7 -0
- package/src/settings.ts +20 -0
- package/src/spawn-idempotency.ts +5 -0
- package/src/stateful-agent-view.ts +15 -19
- package/src/stateful-guidance.ts +11 -18
- package/src/stateful-limit-ui.ts +23 -20
- package/src/stateful-limits.ts +10 -10
- package/src/stateful-registration.ts +126 -36
- package/src/stateful-render.ts +27 -2
- package/src/subagent-details.ts +43 -0
- package/src/subagents-extension.ts +116 -68
- package/src/subagents.ts +2 -0
- package/src/subprocess-transport.ts +2 -1
- package/src/supervision.ts +2 -1
- package/src/timeout-finalization.ts +1 -1
- package/src/tool-schema-compatibility.ts +73 -0
- package/src/transport-types.ts +6 -0
- package/src/transport-ui.ts +18 -46
- package/src/usage-recording-config.ts +13 -0
- package/src/usage-recording-store.ts +183 -0
- package/src/usage-recording.ts +478 -0
- package/src/verification-harness.ts +1 -1
- package/src/workflow-ui.ts +17 -9
- package/dist/chunks/chunk-434NII74.ts.map +0 -7
- package/dist/chunks/chunk-7OBINKFM.ts.map +0 -7
- package/dist/chunks/chunk-7QPPBBXZ.ts.map +0 -7
- package/dist/chunks/chunk-AEUYS7JC.ts.map +0 -7
- package/dist/chunks/chunk-CBP76ARQ.ts.map +0 -7
- package/dist/chunks/chunk-DPPVEQAM.ts.map +0 -7
- package/dist/chunks/chunk-DQMN4OYM.ts.map +0 -7
- package/dist/chunks/chunk-EFBPISNT.ts.map +0 -7
- package/dist/chunks/chunk-G3RSMSXJ.ts.map +0 -7
- package/dist/chunks/chunk-I2FAK44T.ts.map +0 -7
- package/dist/chunks/chunk-NIF42QMF.ts.map +0 -7
- package/dist/chunks/chunk-QBORTI4W.ts.map +0 -7
- package/dist/chunks/chunk-S2IWVK3J.ts.map +0 -7
- package/dist/chunks/config-ui-2YUCUEBM.ts.map +0 -7
- package/dist/chunks/consult-IV7UBNQQ.ts.map +0 -7
- package/dist/chunks/execution-LA7HN5YF.ts.map +0 -7
- package/dist/chunks/inspect-XV2QALMR.ts.map +0 -7
- package/dist/chunks/persistence-VSGXAW4P.ts.map +0 -7
- package/dist/chunks/registry-E6XPJB7L.ts.map +0 -7
- package/dist/chunks/rpc-transport-NEHBHWX4.ts.map +0 -7
- package/dist/chunks/subprocess-transport-NSHOGDC4.ts.map +0 -7
- /package/dist/chunks/{auto-transport-SY2VHUFH.ts.map → auto-transport-FUUKFDIG.ts.map} +0 -0
- /package/dist/chunks/{capability-grant-CGEWOEKE.ts.map → capability-grant-PR72SWWS.ts.map} +0 -0
- /package/dist/chunks/{chunk-ZHTNCZIA.ts.map → chunk-JU6LUNLP.ts.map} +0 -0
- /package/dist/chunks/{chunk-PSK43Y6A.ts.map → chunk-LASD73CM.ts.map} +0 -0
- /package/dist/chunks/{chunk-H3BFJ7HJ.ts.map → chunk-LL4LP2T7.ts.map} +0 -0
- /package/dist/chunks/{chunk-SCZ33MYW.ts.map → chunk-PGLSFLYW.ts.map} +0 -0
- /package/dist/chunks/{chunk-O4VO6JUJ.ts.map → chunk-TM2R67J3.ts.map} +0 -0
- /package/dist/chunks/{chunk-HKC4ES4B.ts.map → chunk-YPJEN6NU.ts.map} +0 -0
- /package/dist/chunks/{completion-delivery-YPOWSSV3.ts.map → completion-delivery-RSJU6BXL.ts.map} +0 -0
- /package/dist/chunks/{config-status-J4GPWP46.ts.map → config-status-FKGDECZ3.ts.map} +0 -0
- /package/dist/chunks/{create-stateful-transport-ZP3IXNV3.ts.map → create-stateful-transport-JWC2EFYL.ts.map} +0 -0
- /package/dist/chunks/{delegation-contract-WJPT4FVS.ts.map → delegation-contract-LA56I5DT.ts.map} +0 -0
- /package/dist/chunks/{discovery-K25T3SH4.ts.map → discovery-MIFB2U4Y.ts.map} +0 -0
- /package/dist/chunks/{in-process-transport-4RF3J6XK.ts.map → in-process-transport-HJ6TZXC3.ts.map} +0 -0
- /package/dist/chunks/{retained-semantic-state-7WXSGRJU.ts.map → retained-semantic-state-GM75FZGE.ts.map} +0 -0
- /package/dist/chunks/{spawn-idempotency-QGHO2WKC.ts.map → spawn-idempotency-BNHOSMZW.ts.map} +0 -0
package/src/config-status.ts
CHANGED
|
@@ -16,14 +16,15 @@ import {
|
|
|
16
16
|
inspectDelegationWorkflowSettings,
|
|
17
17
|
inspectStatefulLimitSettings,
|
|
18
18
|
inspectStatefulTransportSettings,
|
|
19
|
+
inspectUsageRecordingSettings,
|
|
19
20
|
} from "./settings.js";
|
|
20
21
|
import type { StatefulSubagentRuntimeStatus } from "./stateful.js";
|
|
21
22
|
import {
|
|
22
23
|
formatConfiguredDetachedLimitDivergence,
|
|
23
|
-
formatConfiguredDetachedLimits,
|
|
24
24
|
formatDetachedLimitSummary,
|
|
25
25
|
} from "./stateful-limit-ui.js";
|
|
26
26
|
import { STATEFUL_LIMIT_DEFINITIONS } from "./stateful-limits.js";
|
|
27
|
+
import { USAGE_RECORDING_RETENTION_DAYS } from "./usage-recording-config.js";
|
|
27
28
|
import { workflowLabel } from "./workflow-ui.js";
|
|
28
29
|
|
|
29
30
|
export function showSubagentStatus(
|
|
@@ -51,32 +52,30 @@ export function statusLines(runtime: SubagentSettingsRuntime): string[] {
|
|
|
51
52
|
return formatStatus(runtime.getRuntimeStatus(), snapshot, runtime).split("\n");
|
|
52
53
|
}
|
|
53
54
|
|
|
54
|
-
export function helpLines(
|
|
55
|
-
const snapshot = inspectCompletionDeliverySettings();
|
|
56
|
-
const cwdPolicy = inspectCwdPolicySettings();
|
|
57
|
-
const parallelLimit = inspectBlockingParallelLimitSettings();
|
|
58
|
-
const detachedLimits = inspectStatefulLimitSettings();
|
|
59
|
-
const transport = inspectStatefulTransportSettings();
|
|
55
|
+
export function helpLines(_runtime: SubagentSettingsRuntime): string[] {
|
|
60
56
|
return [
|
|
61
|
-
"
|
|
62
|
-
"
|
|
63
|
-
"
|
|
64
|
-
"
|
|
65
|
-
"
|
|
66
|
-
"
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
"
|
|
79
|
-
|
|
57
|
+
"Start here",
|
|
58
|
+
" 1. Open How subagents run.",
|
|
59
|
+
" 2. Choose the workflow that matches the tools and blocking behavior you need.",
|
|
60
|
+
" 3. Open Completion and privacy if Pi must use background results in the current answer.",
|
|
61
|
+
"The blocking subagent tool is deprecated and remains available only in compatibility workflows.",
|
|
62
|
+
"subagent_consult and subagent_await remain supported.",
|
|
63
|
+
"Current subagents shows work in progress and subagents saved for follow-up.",
|
|
64
|
+
"Settings",
|
|
65
|
+
" Folders and trusted resources — choose where subagents start and what consultations load.",
|
|
66
|
+
" Completion and privacy — choose what Pi does when work finishes and whether usage is recorded.",
|
|
67
|
+
" Agent defaults — choose tools, model, thinking effort, and time limit for each subagent.",
|
|
68
|
+
" Advanced runtime settings — optional transport and capacity controls.",
|
|
69
|
+
"Changes are saved immediately.",
|
|
70
|
+
"Transport and background-agent limits apply after /reload.",
|
|
71
|
+
"Commands",
|
|
72
|
+
" /subagents — open the manager",
|
|
73
|
+
" /subagents settings — open Settings",
|
|
74
|
+
" /subagents status — show detailed diagnostics",
|
|
75
|
+
" /subagents help — show this help",
|
|
76
|
+
"Safety",
|
|
77
|
+
"Folder choices control starting locations and loaded resources; they do not sandbox files, commands, or network access.",
|
|
78
|
+
"Manage saved folder trust with Pi /trust, then restart Pi.",
|
|
80
79
|
];
|
|
81
80
|
}
|
|
82
81
|
|
|
@@ -86,34 +85,20 @@ export function formatManagerSummary(
|
|
|
86
85
|
configured: ReturnType<typeof inspectDelegationWorkflowSettings>,
|
|
87
86
|
): string {
|
|
88
87
|
const current = currentWorkflow(runtime, status);
|
|
89
|
-
const cwdPolicy = inspectCwdPolicySettings();
|
|
90
|
-
const consult = inspectConsultResourceSettings();
|
|
91
88
|
const detachedLimits = inspectStatefulLimitSettings();
|
|
92
|
-
const transport = inspectStatefulTransportSettings();
|
|
93
89
|
const detachedDivergence = detachedLimits.values
|
|
94
90
|
? formatConfiguredDetachedLimitDivergence(status, detachedLimits.values)
|
|
95
91
|
: undefined;
|
|
96
92
|
return [
|
|
97
|
-
`
|
|
98
|
-
`
|
|
99
|
-
`
|
|
100
|
-
`Delegation target: ${delegationCwdLabel(runtime.getDelegationCwdPolicy())}`,
|
|
101
|
-
`Consult resources: ${consultResourceLabel(runtime.getConsultResourcePolicy())}`,
|
|
102
|
-
`Parallel workers: max ${runtime.getMaxParallelTasks()} per blocking call`,
|
|
103
|
-
`Detached limits: ${formatDetachedLimitSummary(status)}`,
|
|
104
|
-
`Transport: ${status.transport}`,
|
|
105
|
-
`Configured transport: ${transport.value} · ${transport.source}`,
|
|
106
|
-
`Configured consult target: ${consultationCwdLabel(cwdPolicy.consultation.value)} · ${cwdPolicy.consultation.source}`,
|
|
107
|
-
`Configured delegation target: ${delegationCwdLabel(cwdPolicy.delegation.value)} · ${cwdPolicy.delegation.source}`,
|
|
108
|
-
`Configured consult resources: ${consultResourceLabel(consult.value)} · ${consult.source}`,
|
|
109
|
-
`Settings: ${safeTerminalText(cwdPolicy.path)}`,
|
|
110
|
-
`Agents: ${status.activeAgents} active · ${status.retainedAgents} retained`,
|
|
111
|
-
...(detachedDivergence ? [detachedDivergence] : []),
|
|
93
|
+
`How subagents run: ${workflowLabel(current)}`,
|
|
94
|
+
`Subagents: ${status.activeAgents} working · ${status.retainedAgents} saved for follow-up`,
|
|
95
|
+
`When work finishes: ${completionLabel(status.completionDelivery)}`,
|
|
112
96
|
...(configured.value !== current
|
|
113
97
|
? [`Configured after reload: ${workflowLabel(configured.value)}`]
|
|
114
98
|
: []),
|
|
99
|
+
...(detachedDivergence ? [detachedDivergence] : []),
|
|
115
100
|
...(configured.error || detachedLimits.error
|
|
116
|
-
? ["
|
|
101
|
+
? ["Action needed: Repair user settings. Open Diagnostics for details."]
|
|
117
102
|
: []),
|
|
118
103
|
].join("\n");
|
|
119
104
|
}
|
|
@@ -129,27 +114,33 @@ function formatStatus(
|
|
|
129
114
|
const parallelLimit = inspectBlockingParallelLimitSettings();
|
|
130
115
|
const detachedLimits = inspectStatefulLimitSettings();
|
|
131
116
|
const transport = inspectStatefulTransportSettings();
|
|
117
|
+
const usageRecording = inspectUsageRecordingSettings();
|
|
132
118
|
const current = runtime ? currentWorkflow(runtime, status) : configuredWorkflow.value;
|
|
119
|
+
const usageStatus = runtime?.getUsageRecordingStatus?.();
|
|
133
120
|
return [
|
|
134
|
-
"Current
|
|
135
|
-
`
|
|
136
|
-
`
|
|
121
|
+
"Current Session",
|
|
122
|
+
` How subagents run: ${workflowLabel(current)}`,
|
|
123
|
+
` Background runtime: ${status.initialized ? "initialized" : status.enabled ? "not initialized" : "disabled"}`,
|
|
137
124
|
` Transport: ${status.transport}`,
|
|
138
125
|
` Configured transport: ${transport.value} (${transport.source})`,
|
|
139
|
-
`
|
|
140
|
-
`
|
|
141
|
-
`
|
|
142
|
-
`
|
|
143
|
-
`
|
|
144
|
-
`
|
|
145
|
-
`
|
|
146
|
-
"
|
|
147
|
-
`
|
|
148
|
-
`
|
|
126
|
+
` When work finishes: ${completionLabel(status.completionDelivery)}`,
|
|
127
|
+
` Read-only consultation folders: ${consultationCwdLabel(runtime?.getConsultationCwdPolicy() ?? cwdPolicy.consultation.value)}`,
|
|
128
|
+
` Subagent folders: ${delegationCwdLabel(runtime?.getDelegationCwdPolicy() ?? cwdPolicy.delegation.value)}`,
|
|
129
|
+
` Read-only consultation resources: ${consultResourceLabel(runtime?.getConsultResourcePolicy() ?? consult.value)}`,
|
|
130
|
+
` Blocking worker limit: ${runtime?.getMaxParallelTasks() ?? parallelLimit.value} per request`,
|
|
131
|
+
` Background-agent limits: ${formatDetachedLimitSummary(status)}`,
|
|
132
|
+
` Subagents: ${status.activeAgents} working, ${status.retainedAgents} saved for follow-up`,
|
|
133
|
+
` Local usage recording: ${usageStatus?.enabled ? "enabled" : "disabled"}`,
|
|
134
|
+
` Recorded events this session: ${usageStatus?.recordedEvents ?? 0}`,
|
|
135
|
+
` Usage retention: ${usageStatus?.retentionDays ?? USAGE_RECORDING_RETENTION_DAYS} days`,
|
|
136
|
+
` Usage path: ${safeTerminalText(usageStatus?.path ?? "unavailable")}`,
|
|
137
|
+
"User Settings",
|
|
138
|
+
` Workflow source: ${configuredWorkflow.source}`,
|
|
139
|
+
` Configured workflow: ${workflowLabel(configuredWorkflow.value)}`,
|
|
149
140
|
` Completion source: ${snapshot.source}`,
|
|
150
141
|
` Configured completion: ${completionLabel(snapshot.value)}`,
|
|
151
|
-
` Configured
|
|
152
|
-
`
|
|
142
|
+
` Configured blocking worker limit: ${parallelLimit.value}`,
|
|
143
|
+
` Blocking worker limit source: ${parallelLimit.source}`,
|
|
153
144
|
...(detachedLimits.values
|
|
154
145
|
? STATEFUL_LIMIT_DEFINITIONS.map((definition) => {
|
|
155
146
|
const configured = detachedLimits.values?.[definition.field];
|
|
@@ -162,17 +153,20 @@ function formatStatus(
|
|
|
162
153
|
` Delegation target source: ${cwdPolicy.delegation.source}`,
|
|
163
154
|
` Configured consultation resources: ${consultResourceLabel(consult.value)}`,
|
|
164
155
|
` Consultation resource source: ${consult.source}`,
|
|
156
|
+
` Configured usage recording: ${usageRecording.enabled ? "enabled" : "disabled"}`,
|
|
157
|
+
` Usage recording source: ${usageRecording.source}`,
|
|
165
158
|
` Path: ${safeTerminalText(snapshot.path)}`,
|
|
166
159
|
configuredWorkflow.error ||
|
|
167
160
|
snapshot.error ||
|
|
168
161
|
cwdPolicy.error ||
|
|
169
162
|
parallelLimit.error ||
|
|
170
163
|
detachedLimits.error ||
|
|
171
|
-
transport.error
|
|
172
|
-
|
|
164
|
+
transport.error ||
|
|
165
|
+
usageRecording.error
|
|
166
|
+
? ` Warning: ${safeTerminalText(configuredWorkflow.error ?? snapshot.error ?? cwdPolicy.error ?? parallelLimit.error ?? detachedLimits.error ?? transport.error ?? usageRecording.error ?? "invalid settings")}`
|
|
173
167
|
: " Warning: none",
|
|
174
168
|
configuredWorkflow.value !== current
|
|
175
|
-
? "
|
|
169
|
+
? "The configured workflow differs from this session. Run /reload to apply it."
|
|
176
170
|
: "Manual file changes require /reload.",
|
|
177
171
|
].join("\n");
|
|
178
172
|
}
|
|
@@ -189,23 +183,25 @@ export function currentWorkflow(
|
|
|
189
183
|
}
|
|
190
184
|
|
|
191
185
|
export function completionLabel(value: CompletionDelivery): string {
|
|
192
|
-
return value === "auto-resume"
|
|
186
|
+
return value === "auto-resume"
|
|
187
|
+
? "Continue automatically when work finishes"
|
|
188
|
+
: "Wait for my next message";
|
|
193
189
|
}
|
|
194
190
|
|
|
195
191
|
export function consultationCwdLabel(value: ConsultationCwdPolicy): string {
|
|
196
192
|
return value === "current-workspace"
|
|
197
|
-
? "
|
|
198
|
-
: "
|
|
193
|
+
? "This workspace only"
|
|
194
|
+
: "Any folder · no project resources when untrusted";
|
|
199
195
|
}
|
|
200
196
|
|
|
201
197
|
export function delegationCwdLabel(value: DelegationCwdPolicy): string {
|
|
202
198
|
switch (value) {
|
|
203
199
|
case "trusted-targets":
|
|
204
|
-
return "
|
|
200
|
+
return "This workspace or saved-trusted folders";
|
|
205
201
|
case "current-workspace":
|
|
206
|
-
return "
|
|
202
|
+
return "This workspace only";
|
|
207
203
|
case "anywhere":
|
|
208
|
-
return "
|
|
204
|
+
return "Any folder Pi can access";
|
|
209
205
|
}
|
|
210
206
|
}
|
|
211
207
|
|
|
@@ -214,7 +210,7 @@ export function consultResourceLabel(value: ConsultResourcePolicy): string {
|
|
|
214
210
|
case "project-context":
|
|
215
211
|
return "Project context only";
|
|
216
212
|
case "none":
|
|
217
|
-
return "No
|
|
213
|
+
return "No project resources";
|
|
218
214
|
case "all":
|
|
219
215
|
return "All trusted resources";
|
|
220
216
|
}
|