@rosetears/aili-pi 0.1.0 → 0.1.3
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 +15 -6
- package/THIRD_PARTY_NOTICES.md +14 -3
- package/extensions/header/index.ts +92 -0
- package/extensions/matrix/index.ts +375 -0
- package/extensions/zentui/config.ts +1014 -0
- package/extensions/zentui/extension-status.ts +96 -0
- package/extensions/zentui/fixed-editor/cluster.ts +98 -0
- package/extensions/zentui/fixed-editor/compositor.ts +719 -0
- package/extensions/zentui/fixed-editor/index.ts +223 -0
- package/extensions/zentui/fixed-editor/input.ts +85 -0
- package/extensions/zentui/fixed-editor/pi-compat.ts +296 -0
- package/extensions/zentui/fixed-editor/selection.ts +217 -0
- package/extensions/zentui/fixed-editor/terminal-modes.ts +75 -0
- package/extensions/zentui/fixed-editor/types.ts +37 -0
- package/extensions/zentui/footer-format.ts +279 -0
- package/extensions/zentui/footer.ts +595 -0
- package/extensions/zentui/format.ts +434 -0
- package/extensions/zentui/git.ts +384 -0
- package/extensions/zentui/gradient.ts +70 -0
- package/extensions/zentui/icons.ts +252 -0
- package/extensions/zentui/index.ts +580 -0
- package/extensions/zentui/live-context.ts +75 -0
- package/extensions/zentui/package-version.ts +650 -0
- package/extensions/zentui/project-refresh.ts +104 -0
- package/extensions/zentui/project-state.ts +59 -0
- package/extensions/zentui/prototype-patch-registry.ts +111 -0
- package/extensions/zentui/runtime.ts +841 -0
- package/extensions/zentui/selector-border.ts +77 -0
- package/extensions/zentui/session-lifecycle.ts +60 -0
- package/extensions/zentui/settings-command.ts +897 -0
- package/extensions/zentui/state.ts +55 -0
- package/extensions/zentui/style.ts +332 -0
- package/extensions/zentui/thinking-message.ts +159 -0
- package/extensions/zentui/tool-execution.ts +189 -0
- package/extensions/zentui/ui.ts +618 -0
- package/extensions/zentui/user-message.ts +252 -0
- package/licenses/pi-sakura-cyberdeck-MIT.txt +21 -0
- package/licenses/pi-zentui-MIT.txt +21 -0
- package/manifests/capabilities.json +1 -1
- package/manifests/live-verification.json +14 -8
- package/manifests/provenance.json +18 -5
- package/manifests/sbom.json +19 -3
- package/notices/pi-sakura-cyberdeck-NOTICE.txt +6 -0
- package/package.json +12 -3
- package/scripts/local-package-e2e.ts +1 -1
- package/scripts/sync-global-skills.d.mts +13 -0
- package/scripts/sync-global-skills.mjs +134 -0
- package/src/runtime/credential-guard.ts +58 -0
- package/src/runtime/doctor.ts +1 -1
- package/src/runtime/index.ts +2 -2
- package/src/runtime/path-boundaries.ts +1 -1
- package/src/runtime/registry.ts +6 -2
- package/src/runtime/rem-head.txt +38 -0
- package/src/runtime/rose-context.ts +1 -1
- package/src/runtime/subagents.ts +74 -403
- package/templates/APPEND_SYSTEM.md +10 -8
- package/themes/rem-cyberdeck.json +32 -0
- package/upstream/opencode-global-agents.lock.json +34 -0
|
@@ -0,0 +1,252 @@
|
|
|
1
|
+
import { type Theme, type ThemeColor, UserMessageComponent } from "@earendil-works/pi-coding-agent";
|
|
2
|
+
import {
|
|
3
|
+
Markdown,
|
|
4
|
+
type MarkdownTheme,
|
|
5
|
+
truncateToWidth,
|
|
6
|
+
visibleWidth,
|
|
7
|
+
} from "@earendil-works/pi-tui";
|
|
8
|
+
import type { PolishedTuiConfig } from "./config.js";
|
|
9
|
+
import { installPrototypePatch } from "./prototype-patch-registry.js";
|
|
10
|
+
import {
|
|
11
|
+
EDITOR_ACCENT_FALLBACK,
|
|
12
|
+
renderStyleForSourceOrFallback,
|
|
13
|
+
} from "./style.js";
|
|
14
|
+
import { renderEditorFrameBorder } from "./ui.js";
|
|
15
|
+
|
|
16
|
+
const OSC133_ZONE_START = "\x1b]133;A\x07";
|
|
17
|
+
const OSC133_ZONE_END = "\x1b]133;B\x07";
|
|
18
|
+
const OSC133_ZONE_FINAL = "\x1b]133;C\x07";
|
|
19
|
+
|
|
20
|
+
type PatchableUserMessagePrototype = {
|
|
21
|
+
children?: unknown[];
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
type Cleanup = () => void;
|
|
25
|
+
|
|
26
|
+
type UserMessageRenderCache = {
|
|
27
|
+
hasMarkdownText: boolean;
|
|
28
|
+
text?: string;
|
|
29
|
+
width?: number;
|
|
30
|
+
theme?: Theme;
|
|
31
|
+
configKey?: string;
|
|
32
|
+
renderedLines?: string[];
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
const userMessageRenderCache = new WeakMap<object, UserMessageRenderCache>();
|
|
36
|
+
|
|
37
|
+
function isObject(value: unknown): value is object {
|
|
38
|
+
return (typeof value === "object" && value !== null) || typeof value === "function";
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
function isRecord(value: unknown): value is Record<string, unknown> {
|
|
42
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
function findMarkdownText(value: unknown): string | undefined {
|
|
46
|
+
if (!isRecord(value)) return undefined;
|
|
47
|
+
if (typeof value.text === "string") return value.text;
|
|
48
|
+
|
|
49
|
+
const children = value.children;
|
|
50
|
+
if (!Array.isArray(children)) return undefined;
|
|
51
|
+
|
|
52
|
+
for (const child of children) {
|
|
53
|
+
const text = findMarkdownText(child);
|
|
54
|
+
if (text !== undefined) return text;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
return undefined;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
function getCachedMarkdownText(instance: object): string | undefined {
|
|
61
|
+
const cached = userMessageRenderCache.get(instance);
|
|
62
|
+
if (cached?.hasMarkdownText) return cached.text;
|
|
63
|
+
|
|
64
|
+
const text = findMarkdownText(instance);
|
|
65
|
+
if (text !== undefined) {
|
|
66
|
+
userMessageRenderCache.set(instance, { ...cached, hasMarkdownText: true, text });
|
|
67
|
+
}
|
|
68
|
+
return text;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
function getUserMessageConfigKey(config: PolishedTuiConfig): string {
|
|
72
|
+
return [
|
|
73
|
+
config.features.copyFriendly ? "copy" : "chrome",
|
|
74
|
+
config.colorSources.userMessages,
|
|
75
|
+
config.colors.editorAccent ?? "",
|
|
76
|
+
config.colors.editorBorder ?? "",
|
|
77
|
+
config.icons.rail,
|
|
78
|
+
].join("\0");
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
function themeFg(theme: Theme | undefined, color: ThemeColor, text: string): string {
|
|
82
|
+
if (!theme) return text;
|
|
83
|
+
try {
|
|
84
|
+
return theme.fg(color, text);
|
|
85
|
+
} catch {
|
|
86
|
+
return text;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
function makeMarkdownTheme(theme: Theme | undefined): MarkdownTheme {
|
|
91
|
+
return {
|
|
92
|
+
heading: (text) => themeFg(theme, "mdHeading", text),
|
|
93
|
+
link: (text) => themeFg(theme, "mdLink", text),
|
|
94
|
+
linkUrl: (text) => themeFg(theme, "mdLinkUrl", text),
|
|
95
|
+
code: (text) => themeFg(theme, "mdCode", text),
|
|
96
|
+
codeBlock: (text) => themeFg(theme, "mdCodeBlock", text),
|
|
97
|
+
codeBlockBorder: (text) => themeFg(theme, "mdCodeBlockBorder", text),
|
|
98
|
+
quote: (text) => themeFg(theme, "mdQuote", text),
|
|
99
|
+
quoteBorder: (text) => themeFg(theme, "mdQuoteBorder", text),
|
|
100
|
+
hr: (text) => themeFg(theme, "mdHr", text),
|
|
101
|
+
listBullet: (text) => themeFg(theme, "mdListBullet", text),
|
|
102
|
+
bold: (text) => (theme ? theme.bold(text) : text),
|
|
103
|
+
italic: (text) => (theme ? theme.italic(text) : text),
|
|
104
|
+
underline: (text) => (theme ? theme.underline(text) : text),
|
|
105
|
+
strikethrough: (text) => (theme ? theme.strikethrough(text) : text),
|
|
106
|
+
};
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
function fillLine(content: string, width: number): string {
|
|
110
|
+
const truncated = truncateToWidth(content, Math.max(0, width), "");
|
|
111
|
+
const pad = " ".repeat(Math.max(0, width - visibleWidth(truncated)));
|
|
112
|
+
return `${truncated}${pad}`;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
function renderPromptBoxRail(theme: Theme | undefined, config: PolishedTuiConfig): string {
|
|
116
|
+
if (config.features.copyFriendly) return "";
|
|
117
|
+
const railGlyph = config.icons.rail;
|
|
118
|
+
|
|
119
|
+
return `${
|
|
120
|
+
theme
|
|
121
|
+
? renderStyleForSourceOrFallback(
|
|
122
|
+
theme,
|
|
123
|
+
config.colorSources.userMessages,
|
|
124
|
+
config.colors.editorAccent,
|
|
125
|
+
EDITOR_ACCENT_FALLBACK,
|
|
126
|
+
railGlyph,
|
|
127
|
+
)
|
|
128
|
+
: railGlyph
|
|
129
|
+
} `;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
function renderPromptBoxLine(
|
|
133
|
+
line: string,
|
|
134
|
+
width: number,
|
|
135
|
+
theme: Theme | undefined,
|
|
136
|
+
config: PolishedTuiConfig,
|
|
137
|
+
): string {
|
|
138
|
+
if (width <= 0) return "";
|
|
139
|
+
const rail = renderPromptBoxRail(theme, config);
|
|
140
|
+
const contentWidth = Math.max(0, width - visibleWidth(rail));
|
|
141
|
+
const content = config.features.copyFriendly
|
|
142
|
+
? truncateToWidth(line, contentWidth, "")
|
|
143
|
+
: fillLine(line, contentWidth);
|
|
144
|
+
return truncateToWidth(`${rail}${content}`, width, "");
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
function renderZentuiUserMessage(
|
|
148
|
+
instance: PatchableUserMessagePrototype,
|
|
149
|
+
width: number,
|
|
150
|
+
theme: Theme | undefined,
|
|
151
|
+
config: PolishedTuiConfig,
|
|
152
|
+
): string[] | undefined {
|
|
153
|
+
if (!isRecord(instance)) return undefined;
|
|
154
|
+
|
|
155
|
+
const text = getCachedMarkdownText(instance);
|
|
156
|
+
if (text === undefined) return undefined;
|
|
157
|
+
if (width <= 0) return [""];
|
|
158
|
+
|
|
159
|
+
const configKey = getUserMessageConfigKey(config);
|
|
160
|
+
const cached = userMessageRenderCache.get(instance);
|
|
161
|
+
if (
|
|
162
|
+
cached?.hasMarkdownText &&
|
|
163
|
+
cached.width === width &&
|
|
164
|
+
cached.theme === theme &&
|
|
165
|
+
cached.configKey === configKey &&
|
|
166
|
+
cached.renderedLines
|
|
167
|
+
) {
|
|
168
|
+
return cached.renderedLines;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
const railWidth = visibleWidth(renderPromptBoxRail(theme, config));
|
|
172
|
+
const contentWidth = Math.max(1, width - railWidth);
|
|
173
|
+
const renderer = new Markdown(text, 0, 0, makeMarkdownTheme(theme), {
|
|
174
|
+
color: (content) => themeFg(theme, "userMessageText", content),
|
|
175
|
+
});
|
|
176
|
+
const body = renderer.render(contentWidth);
|
|
177
|
+
const contentLines = body.length > 0 ? body : [""];
|
|
178
|
+
const border = theme
|
|
179
|
+
? renderEditorFrameBorder(
|
|
180
|
+
"─".repeat(width),
|
|
181
|
+
config,
|
|
182
|
+
theme,
|
|
183
|
+
config.colorSources.userMessages,
|
|
184
|
+
)
|
|
185
|
+
: "─".repeat(width);
|
|
186
|
+
const lines = [
|
|
187
|
+
truncateToWidth(border, width, ""),
|
|
188
|
+
renderPromptBoxLine("", width, theme, config),
|
|
189
|
+
...contentLines.map((line) => renderPromptBoxLine(line, width, theme, config)),
|
|
190
|
+
renderPromptBoxLine("", width, theme, config),
|
|
191
|
+
truncateToWidth(border, width, ""),
|
|
192
|
+
];
|
|
193
|
+
|
|
194
|
+
userMessageRenderCache.set(instance, {
|
|
195
|
+
hasMarkdownText: true,
|
|
196
|
+
text,
|
|
197
|
+
width,
|
|
198
|
+
theme,
|
|
199
|
+
configKey,
|
|
200
|
+
renderedLines: lines,
|
|
201
|
+
});
|
|
202
|
+
return lines;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
function withPromptZoneMarkers(lines: string[]): string[] {
|
|
206
|
+
const markedLines = [...lines];
|
|
207
|
+
markedLines[0] = OSC133_ZONE_START + markedLines[0];
|
|
208
|
+
markedLines[markedLines.length - 1] =
|
|
209
|
+
OSC133_ZONE_END + OSC133_ZONE_FINAL + markedLines[markedLines.length - 1];
|
|
210
|
+
return markedLines;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
export function installUserMessageStyle(
|
|
214
|
+
getTheme: () => Theme | undefined,
|
|
215
|
+
getConfig: () => PolishedTuiConfig,
|
|
216
|
+
): Cleanup {
|
|
217
|
+
const prototype = UserMessageComponent.prototype;
|
|
218
|
+
const cleanupInvalidate = installPrototypePatch(
|
|
219
|
+
prototype,
|
|
220
|
+
"invalidate",
|
|
221
|
+
"user-message-invalidate",
|
|
222
|
+
({ predecessor, receiver, args }) => {
|
|
223
|
+
if (isObject(receiver)) userMessageRenderCache.delete(receiver);
|
|
224
|
+
return Reflect.apply(predecessor, receiver, args);
|
|
225
|
+
},
|
|
226
|
+
);
|
|
227
|
+
const cleanupRender = installPrototypePatch(
|
|
228
|
+
prototype,
|
|
229
|
+
"render",
|
|
230
|
+
"user-message-render",
|
|
231
|
+
({ predecessor, receiver, args }) => {
|
|
232
|
+
const width = args[0];
|
|
233
|
+
if (typeof width !== "number") return Reflect.apply(predecessor, receiver, args);
|
|
234
|
+
const lines = renderZentuiUserMessage(
|
|
235
|
+
receiver as PatchableUserMessagePrototype,
|
|
236
|
+
width,
|
|
237
|
+
getTheme(),
|
|
238
|
+
getConfig(),
|
|
239
|
+
);
|
|
240
|
+
if (!lines) return Reflect.apply(predecessor, receiver, args);
|
|
241
|
+
if (lines.length === 0) return lines;
|
|
242
|
+
return withPromptZoneMarkers(lines);
|
|
243
|
+
},
|
|
244
|
+
);
|
|
245
|
+
let cleaned = false;
|
|
246
|
+
return () => {
|
|
247
|
+
if (cleaned) return;
|
|
248
|
+
cleaned = true;
|
|
249
|
+
cleanupRender();
|
|
250
|
+
cleanupInvalidate();
|
|
251
|
+
};
|
|
252
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 pi-sakura-cyberdeck contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025-2026 Luka
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
{
|
|
36
36
|
"id": "subagent.dispatch",
|
|
37
37
|
"provider": "@agwab/pi-subagent",
|
|
38
|
-
"adapterOwner": "aili
|
|
38
|
+
"adapterOwner": "aili generic wrapper over @agwab/pi-subagent@0.4.8 with mandatory credential guard",
|
|
39
39
|
"platforms": ["linux"],
|
|
40
40
|
"class": "required",
|
|
41
41
|
"risk": { "secret": "possible", "network": "provider-dependent", "sideEffect": "delegated" },
|
|
@@ -3,24 +3,30 @@
|
|
|
3
3
|
"platform": "linux",
|
|
4
4
|
"piVersion": "0.81.1",
|
|
5
5
|
"status": "passed",
|
|
6
|
-
"approvedScope": "
|
|
6
|
+
"approvedScope": "generic agentless headless child; read-only package.json boundary; no business-file mutation, bash, worktree, sandbox, external cwd, or global-home access; only approved temporary run artifacts were created and removed",
|
|
7
7
|
"probes": [
|
|
8
8
|
{
|
|
9
|
-
"id": "
|
|
10
|
-
"command": "npx vitest run tests/unit/subagents.test.ts",
|
|
9
|
+
"id": "generic-subagent-fixtures",
|
|
10
|
+
"command": "npx vitest run tests/unit/subagents.test.ts tests/integration/generic-subagent.test.ts",
|
|
11
11
|
"status": "passed"
|
|
12
12
|
},
|
|
13
13
|
{
|
|
14
|
-
"id": "
|
|
15
|
-
"command": "
|
|
14
|
+
"id": "generic-agentless-read-package",
|
|
15
|
+
"command": "AILI_LIVE_GENERIC_SUBAGENT_PROBE=1 npx vitest run tests/integration/live-subagent.test.ts",
|
|
16
|
+
"status": "passed",
|
|
17
|
+
"changedFiles": 0
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"id": "generic-credential-guard",
|
|
21
|
+
"command": "AILI_LIVE_CREDENTIAL_GUARD_PROBE=1 npx vitest run tests/integration/live-subagent.test.ts",
|
|
16
22
|
"status": "passed",
|
|
17
23
|
"changedFiles": 0
|
|
18
24
|
}
|
|
19
25
|
],
|
|
20
26
|
"implementation": {
|
|
21
|
-
"src/runtime/subagents.ts": "
|
|
22
|
-
"tests/unit/subagents.test.ts": "
|
|
23
|
-
"tests/integration/live-subagent.test.ts": "
|
|
27
|
+
"src/runtime/subagents.ts": "b33e0ab1dba44212ada389fcca98774d98220396ead94951dee073df54784b0a",
|
|
28
|
+
"tests/unit/subagents.test.ts": "6ae824df46b3ae5b8744bcdef144372281cfca7a4b752ac26fd2d70f0b6cdc6c",
|
|
29
|
+
"tests/integration/live-subagent.test.ts": "46a907526890c4cd4a4e1d768fca51173c9a0c3db37ac83ba57db23d54d7f339"
|
|
24
30
|
},
|
|
25
31
|
"credentialHandling": "Existing Pi authentication was used by Pi; AILI did not copy, print, or modify authentication files."
|
|
26
32
|
}
|
|
@@ -10,14 +10,16 @@
|
|
|
10
10
|
"status": "adapted",
|
|
11
11
|
"sourceFiles": [
|
|
12
12
|
"upstream/aili-workflows.lock.json#files (471 exact skill files)",
|
|
13
|
-
"manifests/roles.json#records[].sourcePath (19 exact role source files)"
|
|
13
|
+
"manifests/roles.json#records[].sourcePath (19 exact role source files)",
|
|
14
|
+
"upstream/opencode-global-agents.lock.json (pinned source template revision/hash)"
|
|
14
15
|
],
|
|
15
16
|
"symbols": ["64 canonical skill bodies and owned assets", "19 child-role prompt bodies"],
|
|
16
17
|
"localChanges": [
|
|
17
18
|
"skills/** is an exact byte-for-byte snapshot with no semantic overlay",
|
|
18
|
-
"role prompts are generated as Pi frontmatter with explicit tool/capability ceilings and structured output"
|
|
19
|
+
"role prompts are generated as Pi frontmatter with explicit tool/capability ceilings and structured output",
|
|
20
|
+
"templates/APPEND_SYSTEM.md is a Pi-native governance derivation of the pinned global AGENTS template, with OpenCode-only control planes excluded"
|
|
19
21
|
],
|
|
20
|
-
"verification": ["npm run verify:skills", "npm run verify:roles"]
|
|
22
|
+
"verification": ["npm run verify:skills", "npm run verify:roles", "tests/unit/global-resources.test.ts"]
|
|
21
23
|
},
|
|
22
24
|
{
|
|
23
25
|
"name": "@agwab/pi-subagent",
|
|
@@ -28,8 +30,8 @@
|
|
|
28
30
|
"status": "dependency",
|
|
29
31
|
"sourceFiles": ["src/api.ts", "src/runners/headless-model.ts", "src/artifacts/result.ts"],
|
|
30
32
|
"symbols": ["runSubagent API", "headless lifecycle", "artifact envelope"],
|
|
31
|
-
"localChanges": ["AILI
|
|
32
|
-
"verification": ["tests/unit/subagents.test.ts", "tests/integration/
|
|
33
|
+
"localChanges": ["AILI registers the full pinned upstream subagent tool schema, injects a non-removable credential guard, and relies on the ambient AILI pi-permission-modes registration exactly once in each child; no upstream source is copied"],
|
|
34
|
+
"verification": ["tests/unit/subagents.test.ts", "tests/integration/package-runtime.test.ts"]
|
|
33
35
|
},
|
|
34
36
|
{
|
|
35
37
|
"name": "pi-permission-modes",
|
|
@@ -66,6 +68,17 @@
|
|
|
66
68
|
"symbols": ["web_search", "fetch_content", "get_search_content", "curator and bundled librarian skill"],
|
|
67
69
|
"localChanges": ["AILI initializes the complete pinned upstream surface through its sole Extension entry; no upstream source is copied"],
|
|
68
70
|
"verification": ["tests/unit/runtime.test.ts", "tests/integration/extension-load.test.ts"]
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
"name": "pi-sakura-cyberdeck",
|
|
74
|
+
"repository": "https://github.com/beautifulrem/pi-sakura-cyberdeck.git",
|
|
75
|
+
"revision": "165a1f8011a12a58a6409b56b8a6c0416cd9b589",
|
|
76
|
+
"license": "MIT",
|
|
77
|
+
"status": "adapted",
|
|
78
|
+
"sourceFiles": ["extensions/header/index.ts", "extensions/matrix/index.ts", "extensions/zentui/**"],
|
|
79
|
+
"symbols": ["header", "matrix animation", "Zentui footer", "fixed editor compositor"],
|
|
80
|
+
"localChanges": ["registered as three additional Pi Package Extensions", "header avatar loads the supplied Rem asset", "Sakura palette values are replaced with the Rem palette", "relative import specifiers and session lifecycle event are adapted for this package's NodeNext TypeScript contract"],
|
|
81
|
+
"verification": ["npm run typecheck", "npm test", "npm pack --dry-run --json"]
|
|
69
82
|
}
|
|
70
83
|
]
|
|
71
84
|
}
|
package/manifests/sbom.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"dataLicense": "CC0-1.0",
|
|
4
4
|
"SPDXID": "SPDXRef-DOCUMENT",
|
|
5
5
|
"name": "@rosetears/aili-pi-0.0.0-development",
|
|
6
|
-
"documentNamespace": "https://github.com/Rosetears520/aili-pi/sbom/
|
|
6
|
+
"documentNamespace": "https://github.com/Rosetears520/aili-pi/sbom/4326541e956e5e266160f3dab73372d5",
|
|
7
7
|
"creationInfo": {
|
|
8
8
|
"creators": [
|
|
9
9
|
"Tool: @rosetears/aili-pi scripts/generate-provenance.ts"
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"licenseDeclared": "MIT",
|
|
32
32
|
"checksums": [],
|
|
33
33
|
"primaryPackagePurpose": "SOURCE",
|
|
34
|
-
"comment": "revision=7eb35f357ad489f5841ee10dac1e44549c1bdb76; files=upstream/aili-workflows.lock.json#files (471 exact skill files), manifests/roles.json#records[].sourcePath (19 exact role source files); symbols=64 canonical skill bodies and owned assets, 19 child-role prompt bodies; local changes=skills/** is an exact byte-for-byte snapshot with no semantic overlay | role prompts are generated as Pi frontmatter with explicit tool/capability ceilings and structured output"
|
|
34
|
+
"comment": "revision=7eb35f357ad489f5841ee10dac1e44549c1bdb76; files=upstream/aili-workflows.lock.json#files (471 exact skill files), manifests/roles.json#records[].sourcePath (19 exact role source files), upstream/opencode-global-agents.lock.json (pinned source template revision/hash); symbols=64 canonical skill bodies and owned assets, 19 child-role prompt bodies; local changes=skills/** is an exact byte-for-byte snapshot with no semantic overlay | role prompts are generated as Pi frontmatter with explicit tool/capability ceilings and structured output | templates/APPEND_SYSTEM.md is a Pi-native governance derivation of the pinned global AGENTS template, with OpenCode-only control planes excluded"
|
|
35
35
|
},
|
|
36
36
|
{
|
|
37
37
|
"SPDXID": "SPDXRef-source-agwab-pi-subagent-7cd9ea345a",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"licenseDeclared": "MIT",
|
|
44
44
|
"checksums": [],
|
|
45
45
|
"primaryPackagePurpose": "SOURCE",
|
|
46
|
-
"comment": "revision=daa7b83819116a62008ad17aa65fcd50fefbafd0; files=src/api.ts, src/runners/headless-model.ts, src/artifacts/result.ts; symbols=runSubagent API, headless lifecycle, artifact envelope; local changes=AILI
|
|
46
|
+
"comment": "revision=daa7b83819116a62008ad17aa65fcd50fefbafd0; files=src/api.ts, src/runners/headless-model.ts, src/artifacts/result.ts; symbols=runSubagent API, headless lifecycle, artifact envelope; local changes=AILI registers the full pinned upstream subagent tool schema, injects a non-removable credential guard, and relies on the ambient AILI pi-permission-modes registration exactly once in each child; no upstream source is copied"
|
|
47
47
|
},
|
|
48
48
|
{
|
|
49
49
|
"SPDXID": "SPDXRef-source-pi-permission-modes-9b38b384cd",
|
|
@@ -81,6 +81,17 @@
|
|
|
81
81
|
"primaryPackagePurpose": "SOURCE",
|
|
82
82
|
"comment": "revision=npm:0.13.0; files=index.ts, skills/; symbols=web_search, fetch_content, get_search_content, curator and bundled librarian skill; local changes=AILI initializes the complete pinned upstream surface through its sole Extension entry; no upstream source is copied"
|
|
83
83
|
},
|
|
84
|
+
{
|
|
85
|
+
"SPDXID": "SPDXRef-source-pi-sakura-cyberdeck-7125826ba0",
|
|
86
|
+
"name": "pi-sakura-cyberdeck",
|
|
87
|
+
"downloadLocation": "https://github.com/beautifulrem/pi-sakura-cyberdeck/commit/165a1f8011a12a58a6409b56b8a6c0416cd9b589",
|
|
88
|
+
"filesAnalyzed": false,
|
|
89
|
+
"licenseConcluded": "MIT",
|
|
90
|
+
"licenseDeclared": "MIT",
|
|
91
|
+
"checksums": [],
|
|
92
|
+
"primaryPackagePurpose": "SOURCE",
|
|
93
|
+
"comment": "revision=165a1f8011a12a58a6409b56b8a6c0416cd9b589; files=extensions/header/index.ts, extensions/matrix/index.ts, extensions/zentui/**; symbols=header, matrix animation, Zentui footer, fixed editor compositor; local changes=registered as three additional Pi Package Extensions | header avatar loads the supplied Rem asset | Sakura palette values are replaced with the Rem palette | relative import specifiers and session lifecycle event are adapted for this package's NodeNext TypeScript contract"
|
|
94
|
+
},
|
|
84
95
|
{
|
|
85
96
|
"SPDXID": "SPDXRef-node-modules-agent-base-e28bede7a2",
|
|
86
97
|
"name": "agent-base",
|
|
@@ -6043,6 +6054,11 @@
|
|
|
6043
6054
|
"relationshipType": "DEPENDS_ON",
|
|
6044
6055
|
"relatedSpdxElement": "SPDXRef-source-pi-web-access-7a2e6bb486"
|
|
6045
6056
|
},
|
|
6057
|
+
{
|
|
6058
|
+
"spdxElementId": "SPDXRef-Package-aili-pi",
|
|
6059
|
+
"relationshipType": "DEPENDS_ON",
|
|
6060
|
+
"relatedSpdxElement": "SPDXRef-source-pi-sakura-cyberdeck-7125826ba0"
|
|
6061
|
+
},
|
|
6046
6062
|
{
|
|
6047
6063
|
"spdxElementId": "SPDXRef-Package-aili-pi",
|
|
6048
6064
|
"relationshipType": "DEPENDS_ON",
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
This package includes a modified copy of pi-zentui by Luka.
|
|
2
|
+
Original project: https://github.com/lmilojevicc/pi-zentui
|
|
3
|
+
License: MIT. Full license text: licenses/pi-zentui-MIT.txt
|
|
4
|
+
|
|
5
|
+
Modifications include the Sakura Macaron palette, truecolor gradient editor
|
|
6
|
+
chrome, package-specific defaults, and package-specific configuration path.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rosetears/aili-pi",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
4
4
|
"description": "AILI and ROSE distribution for official Pi",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -23,18 +23,23 @@
|
|
|
23
23
|
"manifests/",
|
|
24
24
|
"upstream/",
|
|
25
25
|
"scripts/",
|
|
26
|
+
"themes/",
|
|
26
27
|
"templates/",
|
|
27
28
|
"install.sh",
|
|
29
|
+
"licenses/",
|
|
30
|
+
"notices/",
|
|
28
31
|
"README.md",
|
|
29
32
|
"LICENSE",
|
|
30
33
|
"THIRD_PARTY_NOTICES.md"
|
|
31
34
|
],
|
|
32
35
|
"pi": {
|
|
33
36
|
"extensions": [
|
|
34
|
-
"./extensions/index.ts"
|
|
37
|
+
"./extensions/index.ts",
|
|
38
|
+
"./extensions/header/index.ts",
|
|
39
|
+
"./extensions/matrix/index.ts",
|
|
40
|
+
"./extensions/zentui/index.ts"
|
|
35
41
|
],
|
|
36
42
|
"skills": [
|
|
37
|
-
"./skills",
|
|
38
43
|
"./node_modules/pi-web-access/skills"
|
|
39
44
|
],
|
|
40
45
|
"prompts": [
|
|
@@ -43,12 +48,16 @@
|
|
|
43
48
|
"./prompts/build.md",
|
|
44
49
|
"./prompts/ship.md",
|
|
45
50
|
"./prompts/local-review.md"
|
|
51
|
+
],
|
|
52
|
+
"themes": [
|
|
53
|
+
"./themes/rem-cyberdeck.json"
|
|
46
54
|
]
|
|
47
55
|
},
|
|
48
56
|
"engines": {
|
|
49
57
|
"node": ">=22.19.0"
|
|
50
58
|
},
|
|
51
59
|
"scripts": {
|
|
60
|
+
"postinstall": "node scripts/sync-global-skills.mjs --if-pi-managed",
|
|
52
61
|
"typecheck": "tsc --noEmit",
|
|
53
62
|
"test": "vitest run",
|
|
54
63
|
"sync:skills": "node --experimental-strip-types scripts/sync-skills.ts",
|
|
@@ -43,7 +43,7 @@ if (!installed.includes(packageRoot)) throw new Error("Pi list did not report th
|
|
|
43
43
|
const smoke = await run(pi, ["--list-models"], environment);
|
|
44
44
|
if (smoke.includes("Failed to load extension")) throw new Error("installed Package failed Extension loading");
|
|
45
45
|
const packageJson = JSON.parse(await readFile(join(packageRoot, "package.json"), "utf8")) as { pi?: { extensions?: string[]; prompts?: string[]; skills?: string[] } };
|
|
46
|
-
if (packageJson.pi?.extensions?.length !==
|
|
46
|
+
if (packageJson.pi?.extensions?.length !== 4 || packageJson.pi?.prompts?.length !== 5 || packageJson.pi?.skills?.length !== 1 || packageJson.pi.skills[0] !== "./node_modules/pi-web-access/skills") throw new Error("packed resource declarations are incomplete");
|
|
47
47
|
await run(pi, ["remove", packageRoot], environment);
|
|
48
48
|
const removed = await run(pi, ["list"], environment);
|
|
49
49
|
if (!removed.includes("No packages installed")) throw new Error("Pi Package removal did not reconcile settings");
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export type GlobalSkillSyncReport = {
|
|
2
|
+
scanned: number;
|
|
3
|
+
updated: string[];
|
|
4
|
+
skippedMissing: string[];
|
|
5
|
+
skippedUnsafe: string[];
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
export function isPiManagedNpmPackageRoot(packageRoot: string, home?: string): boolean;
|
|
9
|
+
|
|
10
|
+
export function syncExistingGlobalSkills(options?: {
|
|
11
|
+
packageRoot?: string;
|
|
12
|
+
home?: string;
|
|
13
|
+
}): Promise<GlobalSkillSyncReport>;
|