pi-daddy 0.56.3 → 0.57.0
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/CHANGELOG.md +7 -0
- package/README.md +15 -1
- package/dist/governance/approval-prompt.d.ts +3 -1
- package/dist/governance/approval-prompt.d.ts.map +1 -1
- package/dist/governance/approval-prompt.js +7 -3
- package/dist/governance/approval-prompt.js.map +1 -1
- package/dist/governance/permission-question.d.ts.map +1 -1
- package/dist/governance/permission-question.js +15 -5
- package/dist/governance/permission-question.js.map +1 -1
- package/dist/kernel/child-tools.d.ts +17 -0
- package/dist/kernel/child-tools.d.ts.map +1 -0
- package/dist/kernel/child-tools.js +46 -0
- package/dist/kernel/child-tools.js.map +1 -0
- package/dist/kernel/definitions.d.ts +2 -0
- package/dist/kernel/definitions.d.ts.map +1 -1
- package/dist/kernel/definitions.js.map +1 -1
- package/dist/kernel/delegate-types.d.ts +2 -0
- package/dist/kernel/delegate-types.d.ts.map +1 -1
- package/dist/kernel/delegate-types.js.map +1 -1
- package/dist/kernel/delegate.d.ts.map +1 -1
- package/dist/kernel/delegate.js +12 -1
- package/dist/kernel/delegate.js.map +1 -1
- package/dist/kernel/principal-binding.d.ts.map +1 -1
- package/dist/kernel/principal-binding.js +11 -0
- package/dist/kernel/principal-binding.js.map +1 -1
- package/dist/kernel/selected-definitions.d.ts.map +1 -1
- package/dist/kernel/selected-definitions.js +10 -1
- package/dist/kernel/selected-definitions.js.map +1 -1
- package/dist/kernel/selected-resources.d.ts +21 -0
- package/dist/kernel/selected-resources.d.ts.map +1 -0
- package/dist/kernel/selected-resources.js +10 -0
- package/dist/kernel/selected-resources.js.map +1 -0
- package/dist/kernel/spawn.d.ts +2 -0
- package/dist/kernel/spawn.d.ts.map +1 -1
- package/dist/kernel/spawn.js +3 -1
- package/dist/kernel/spawn.js.map +1 -1
- package/dist/products/dashboard-components.d.ts.map +1 -1
- package/dist/products/dashboard-components.js +17 -1
- package/dist/products/dashboard-components.js.map +1 -1
- package/dist/products/dashboard-screen.d.ts.map +1 -1
- package/dist/products/dashboard-screen.js +1 -1
- package/dist/products/dashboard-screen.js.map +1 -1
- package/dist/products/dashboard-settings.d.ts +2 -1
- package/dist/products/dashboard-settings.d.ts.map +1 -1
- package/dist/products/dashboard-settings.js +10 -1
- package/dist/products/dashboard-settings.js.map +1 -1
- package/extensions/approvals.ts +52 -38
- package/extensions/chain-approval-facts.ts +20 -0
- package/extensions/definition-describe.ts +1 -0
- package/extensions/delegate-chain.ts +35 -21
- package/extensions/grants.ts +2 -0
- package/extensions/session.ts +3 -0
- package/package.json +2 -2
- package/src/governance/approval-prompt.ts +10 -4
- package/src/governance/permission-question.ts +16 -5
- package/src/kernel/child-tools.ts +62 -0
- package/src/kernel/definitions.ts +2 -0
- package/src/kernel/delegate-types.ts +2 -0
- package/src/kernel/delegate.ts +12 -1
- package/src/kernel/principal-binding.ts +11 -0
- package/src/kernel/selected-definitions.ts +11 -1
- package/src/kernel/selected-resources.ts +20 -0
- package/src/kernel/spawn.ts +4 -1
- package/src/products/dashboard-components.ts +21 -1
- package/src/products/dashboard-screen.ts +1 -0
- package/src/products/dashboard-settings.ts +11 -0
package/src/kernel/spawn.ts
CHANGED
|
@@ -55,6 +55,8 @@ export interface SpawnPlanInput {
|
|
|
55
55
|
* definition only has to describe its own job.
|
|
56
56
|
*/
|
|
57
57
|
systemPrompt?: string;
|
|
58
|
+
/** Trusted selected-definition locations, separate from the unchanged authored body. */
|
|
59
|
+
selectedResourcePrompt?: string;
|
|
58
60
|
}
|
|
59
61
|
|
|
60
62
|
export interface SpawnPlan {
|
|
@@ -99,7 +101,7 @@ export function planSpawn(input: SpawnPlanInput): SpawnPlan {
|
|
|
99
101
|
else args.push("--no-session");
|
|
100
102
|
|
|
101
103
|
// Disable discovery so ambient user extensions cannot widen a governed child's surface. Explicit
|
|
102
|
-
// `-e` paths
|
|
104
|
+
// `-e` paths still load; the delegation planner adds only its qualified governance/observer entrypoint.
|
|
103
105
|
args.push("--no-extensions");
|
|
104
106
|
|
|
105
107
|
// R-32. `--no-extensions` governs EXTENSIONS ONLY — measured, not assumed: a child spawned with
|
|
@@ -143,6 +145,7 @@ export function planSpawn(input: SpawnPlanInput): SpawnPlan {
|
|
|
143
145
|
// picks WHICH definition, never its contents. That is what keeps it out of `neutralisePrompt`'s
|
|
144
146
|
// remit: the G1 hazard is a model-controlled string reaching a parser, and this is not one.
|
|
145
147
|
if (input.systemPrompt) args.push("--append-system-prompt", input.systemPrompt);
|
|
148
|
+
if (input.selectedResourcePrompt) args.push("--append-system-prompt", input.selectedResourcePrompt);
|
|
146
149
|
// After the definition body, so a child reads what it IS before what it was told (ADR-0078). Operator- and
|
|
147
150
|
// parent-authored text, never a model-chosen argv position, so `neutralisePrompt` has no remit here either.
|
|
148
151
|
if (input.contextPrompt) args.push("--append-system-prompt", input.contextPrompt);
|
|
@@ -138,7 +138,12 @@ function componentItem(producer: KnownSource, options: DashboardScreenOptions):
|
|
|
138
138
|
let state = "observed",
|
|
139
139
|
status: string,
|
|
140
140
|
explanation: string;
|
|
141
|
-
if (
|
|
141
|
+
if (
|
|
142
|
+
options.connected === false ||
|
|
143
|
+
(source &&
|
|
144
|
+
!current(source, options) &&
|
|
145
|
+
!(source.producer === "bookie-memory" && options.session?.auto.enabled === false))
|
|
146
|
+
) {
|
|
142
147
|
state = "last-observed";
|
|
143
148
|
status = "Live status unknown";
|
|
144
149
|
const lastReport =
|
|
@@ -150,6 +155,21 @@ function componentItem(producer: KnownSource, options: DashboardScreenOptions):
|
|
|
150
155
|
? "Project connected"
|
|
151
156
|
: undefined;
|
|
152
157
|
explanation = (lastReport ? `Last report: ${lastReport}. ` : "") + "Check the main Pi chat for current status.";
|
|
158
|
+
} else if (
|
|
159
|
+
bookie &&
|
|
160
|
+
options.session &&
|
|
161
|
+
!options.session.auto.enabled &&
|
|
162
|
+
(source?.producer === "bookie-memory" || pkg?.commandAvailable || pkg?.loadedVersion) &&
|
|
163
|
+
!(source?.producer === "bookie" && current(source, options) && source.items.length)
|
|
164
|
+
) {
|
|
165
|
+
status = "Automatic memory paused · Auto OFF";
|
|
166
|
+
const origin =
|
|
167
|
+
options.session.auto.source === "session"
|
|
168
|
+
? "Auto was turned off for this session."
|
|
169
|
+
: options.session.auto.source === "environment"
|
|
170
|
+
? "Pi started with Auto off."
|
|
171
|
+
: "Auto starts off by default.";
|
|
172
|
+
explanation = `${origin} Turn Auto on in Settings for automatic notes in this folder, or use /bookie-context to select memory manually. A session toggle does not change the startup setting.`;
|
|
153
173
|
} else if (source?.producer === "bookie-memory") {
|
|
154
174
|
status = "Ready in this folder";
|
|
155
175
|
explanation = "Bookie can save and recall routine notes for this workspace.";
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { AutoModeSource } from "../kernel/auto-mode.ts";
|
|
1
2
|
import { sectionHeading } from "./dashboard-layout.ts";
|
|
2
3
|
|
|
3
4
|
/** Settings are owner observations; rendering never grants consent or changes execution. */
|
|
@@ -63,6 +64,7 @@ export function dashboardSettingsLines(
|
|
|
63
64
|
auto: boolean | undefined,
|
|
64
65
|
selected: DashboardSettingKey,
|
|
65
66
|
width: number,
|
|
67
|
+
autoSource?: AutoModeSource,
|
|
66
68
|
): string[] {
|
|
67
69
|
if (!settings) return ["Owner settings unavailable. Reconnect from /grants dashboard."];
|
|
68
70
|
const row = (key: DashboardSettingKey, label: string, nested = false) =>
|
|
@@ -84,6 +86,15 @@ export function dashboardSettingsLines(
|
|
|
84
86
|
return [
|
|
85
87
|
sectionHeading("PERMISSIONS", width),
|
|
86
88
|
row("auto", `Permission Auto: ${auto ? "ON" : "OFF"}`),
|
|
89
|
+
...(autoSource
|
|
90
|
+
? [
|
|
91
|
+
autoSource === "session"
|
|
92
|
+
? " Session choice; /new uses the startup setting."
|
|
93
|
+
: autoSource === "environment"
|
|
94
|
+
? " From the startup environment."
|
|
95
|
+
: " Startup default: OFF.",
|
|
96
|
+
]
|
|
97
|
+
: []),
|
|
87
98
|
"",
|
|
88
99
|
sectionHeading("JEV · optional advice", width),
|
|
89
100
|
row(
|