@rosetears/aili-pi 0.1.6 → 0.1.8
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 +16 -8
- package/THIRD_PARTY_NOTICES.md +7 -7
- package/extensions/header/index.ts +26 -16
- package/extensions/matrix/index.ts +390 -193
- package/extensions/zentui/config.ts +8 -6
- package/extensions/zentui/gradient.ts +37 -47
- package/extensions/zentui/thinking-message.ts +3 -3
- package/extensions/zentui/tool-execution.ts +6 -6
- package/extensions/zentui/ui.ts +3 -3
- package/licenses/pi-permission-modes-MIT.txt +21 -0
- package/manifests/adapter-evidence.json +10 -9
- package/manifests/live-verification.json +19 -11
- package/manifests/provenance.json +8 -8
- package/manifests/sbom.json +4 -4
- package/manifests/skill-compatibility.json +12 -12
- package/manifests/subagent-provenance.json +13 -3
- package/notices/pi-sakura-cyberdeck-NOTICE.txt +3 -3
- package/package.json +6 -4
- package/scripts/generate-provenance.ts +1 -1
- package/scripts/sync-permission-modes.ts +135 -0
- package/src/runtime/native-integrations.ts +5 -5
- package/src/runtime/package-resolution.ts +8 -0
- package/src/runtime/registry.ts +138 -9
- package/src/runtime/rose-theme.ts +26 -0
- package/src/runtime/subagents.ts +85 -10
- package/src/vendor/pi-permission-modes/index.ts +692 -0
- package/src/vendor/pi-permission-modes/resolve.ts +142 -0
- package/themes/rose-cyberdeck.json +35 -0
- package/upstream/pi-permission-modes.lock.json +47 -0
- package/themes/rem-cyberdeck.json +0 -32
- /package/src/runtime/{rem-head.txt → rose-head.txt} +0 -0
package/README.md
CHANGED
|
@@ -49,11 +49,15 @@ The package does not write global AILI resources during extension load. After re
|
|
|
49
49
|
|
|
50
50
|
That command creates or updates only the AILI marker block in `~/.pi/agent/APPEND_SYSTEM.md` and installs the 19 packaged profiles at `~/.pi/agent/agents/aili/`. The marker block is a Pi-native governance derivation of the pinned `aili-workflows` global AGENTS template: it retains instruction precedence, untrusted-content handling, approval/evidence/verification discipline, bounded delegation, project-rule precedence, and user-language output, while excluding OpenCode-only control planes. It preserves unrelated prompt content, rejects malformed markers or an unowned profile collision, and reports stale profiles without pruning them.
|
|
51
51
|
|
|
52
|
-
##
|
|
52
|
+
## Rose Cyberdeck
|
|
53
53
|
|
|
54
|
-
The package supplies the dark `
|
|
54
|
+
The package supplies the dark `rose-cyberdeck` theme plus three additional Pi Extensions: a Rose header, Rose Shimmer + four-row Rose Code Rain working surface, and Zentui footer/editor surface. Select it through Pi's `/settings` theme selector or set `"theme": "rose-cyberdeck"` in `~/.pi/agent/settings.json`. The visual extensions are adapted from `pi-sakura-cyberdeck` at revision `165a1f8011a12a58a6409b56b8a6c0416cd9b589` under MIT; see `THIRD_PARTY_NOTICES.md` and `notices/pi-sakura-cyberdeck-NOTICE.txt`.
|
|
55
55
|
|
|
56
|
-
|
|
56
|
+
Rose Code Rain retains the pinned sparse waterfall geometry and default `density=0.65`, while bounded ultra-wide tracks are spread across the complete terminal-cell width instead of truncating to a left prefix. `/rose-matrix status` reports its settings; use `/rose-matrix density <0.45-0.95>` or `/rose-matrix appearance <auto|dark|light>` for explicit preferences. `/sakura-matrix` remains a deprecated compatibility alias. The `✦ REASONING` trail uses the Rose-to-ice gradient.
|
|
57
|
+
|
|
58
|
+
### Migrating from Rem/Sakura names
|
|
59
|
+
|
|
60
|
+
Replace an exact legacy `rem-cyberdeck` theme token with `rose-cyberdeck` through `/settings` or `~/.pi/agent/settings.json`; when using a `light/dark` pair, replace only the legacy side. Existing `sakura-cyberdeck-matrix.json` and `rem-cyberdeck-zentui.json` configuration files are read compatibly and retained. Legacy product names below appear only for migration or upstream attribution.
|
|
57
61
|
|
|
58
62
|
Zentui enables its experimental fixed-bottom editor by default when the installed Pi TUI exposes the required private layout capabilities. If capability detection or installation fails, it keeps Pi's native editor and emits a warning. The feature uses the terminal alternate screen; its default mouse scrolling can interfere with terminal text selection and tmux scrollback. Use Zentui's `/zentui` settings to disable the fixed editor or mouse scrolling. Zentui hides `pi-cache-stats` by default so the one canonical Codex weekly quota remains visible; explicitly re-enabled cache stats follow quota in the bounded footer.
|
|
59
63
|
|
|
@@ -62,18 +66,18 @@ Zentui enables its experimental fixed-bottom editor by default when the installe
|
|
|
62
66
|
- `/ideate`, `/define`, `/build`, `/ship`: the four AILI delivery modes.
|
|
63
67
|
- `/local-review`: a standalone local audit, not a fifth lifecycle mode.
|
|
64
68
|
- `/aili-doctor` or `/aili-doctor --json`: human or machine-readable health evidence.
|
|
65
|
-
- `/perm`:
|
|
69
|
+
- `/perm`: the revision-bound `pi-permission-modes@2.2.0` adaptation controls `Default`, `Plan`, `Build`, and `YOLO`.
|
|
66
70
|
- `Alt+M`: upstream mode-cycle shortcut.
|
|
67
71
|
- `/aili-install-global-resources`: explicit installation/update of marker-owned global ROSE and AILI-role resources.
|
|
68
72
|
|
|
69
|
-
`pi-permission-modes` owns mode persistence, prompts, and sandbox behavior. A Linux disposable fixture verified
|
|
73
|
+
The `pi-permission-modes@2.2.0` baseline owns mode persistence, prompts, and sandbox behavior. AILI carries one hash-locked matcher adaptation so `*` and `?` also match line terminators; this prevents multiline Bash/heredoc text from falling through YOLO's `"*": "allow"` rule while retaining custom ask/deny and fail-closed fallback behavior across every pattern-map surface. A Linux disposable fixture verified the stock Build profile through installed Bubblewrap, while an incompatible Git-worktree fixture visibly fell back to confirmation. This is not an isolation guarantee. `YOLO` remains an unrestricted, unsandboxed mode and must be treated accordingly.
|
|
70
74
|
|
|
71
75
|
## Native integrations and side effects
|
|
72
76
|
|
|
73
77
|
- `pi-web-access@0.13.0` provides its complete upstream web-search, content-fetch, curator, clone/PDF/video, and bundled-skill surface. Its provider fallback, network traffic, config/credential paths, clone cache, temporary curator service, downloads, and optional browser-cookie access are upstream behavior; inspect its tool requests and configuration before use.
|
|
74
78
|
- `pi-quota-status@0.3.0` is enabled by default. It may maintain `~/.pi/agent/pi-quota-status/state.json`; `/quota config` creates its configuration template. Zentui displays exactly one weekly value as `codex <percent> <reset>`, preferring explicit `Wk` data and treating the dependency's current `5h`-labeled primary value only as a compatibility fallback when weekly is absent.
|
|
75
|
-
- `pi-permission-modes@2.2.0` provides the permission UI and sandbox degradation behavior above. AILI does not retain `/aili-mode` or `Ctrl+Shift+Alt+A` as competing controls.
|
|
76
|
-
- `@agwab/pi-subagent@0.4.8` owns the generic `subagent` tool, child spawn, cancellation, durable run/artifact lifecycle, bounded parallel fan-out, async actions, worktrees, external `cwd`, and sandbox options. The 19 `aili.<role>` profiles are optional named agents; generic or agentless runs do not use an AILI-only result schema. AILI adds a bounded requested `Agent:`/`Agents:` heading
|
|
79
|
+
- `pi-permission-modes@2.2.0` provides the permission UI and sandbox degradation behavior above through AILI's exact-source adaptation. The only semantic source change is line-terminator-safe shared glob matching; `upstream/pi-permission-modes.lock.json` records the baseline and adapted hashes. AILI does not retain `/aili-mode` or `Ctrl+Shift+Alt+A` as competing controls.
|
|
80
|
+
- `@agwab/pi-subagent@0.4.8` owns the generic `subagent` tool, child spawn, cancellation, durable run/artifact lifecycle, bounded parallel fan-out, async actions, worktrees, external `cwd`, and sandbox options. On Pi 0.81.1, AILI routes ordinary omitted/`auto` calls to `headless` because the pinned inline runner calls removed SDK factories; explicit `inline` stops before model startup with a compatibility diagnostic. Explicit `headless`/`tmux`, visible auto, sandbox auto, lifecycle actions, and caller options remain upstream paths. A mixed parallel auto call that combines visible tasks with ordinary uncontained tasks is rejected rather than silently sending one class through broken inline. The 19 `aili.<role>` profiles are optional named agents; generic or agentless runs do not use an AILI-only result schema. AILI also adds a bounded requested `Agent:`/`Agents:` heading and an immutable credential-path guard. The upstream runner excludes recursive `subagent` exposure inside workers.
|
|
77
81
|
- `pi-cache-optimizer@2.6.18` provides `/cache-optimizer`, provider cache diagnostics, cache statistics, and prompt-cache optimization. It may maintain `~/.pi/agent/pi-cache-optimizer-stats.json`; `/cache-optimizer fix` is interactive and is the only command that may propose editing `models.json`.
|
|
78
82
|
- `pi-markdown-preview@0.10.1` provides `/preview`, `/preview-browser`, `/preview-pdf`, `/preview-clear-cache`, and the `preview_export` tool. Terminal/browser previews require a Chromium executable; PDF export additionally requires Pandoc and a LaTeX engine.
|
|
79
83
|
- `@narumitw/pi-lsp@0.25.0` provides language-agnostic `lsp_diagnostics`, `lsp_fix`, and `/lsp`. It supports routes for C/C++, Python, CSS/SCSS, JavaScript/TypeScript, Go, Rust, Java, Kotlin, Bash, YAML, Terraform, and other languages. It does not download language servers; install the required commands separately and configure project routes in `.pi/pi-lsp.json` or user routes in `~/.pi/agent/pi-lsp.json`.
|
|
@@ -93,7 +97,7 @@ When unavailable, runtime and doctor output use explicit `SKIP`/`WARN` results a
|
|
|
93
97
|
|
|
94
98
|
## Security boundary
|
|
95
99
|
|
|
96
|
-
AILI injects a non-removable guard that denies standard Pi file-tool and parsed-bash access to credential, authentication, and private-key paths, including from an external `cwd`, a YOLO permission mode, or a caller-supplied child extension list. Child Pi processes load the ambient AILI
|
|
100
|
+
AILI injects a non-removable guard that denies standard Pi file-tool and parsed-bash access to credential, authentication, and private-key paths, including from an external `cwd`, a YOLO permission mode, or a caller-supplied child extension list. Child Pi processes load the ambient AILI permission-mode registration exactly once, so adapted permission prompts and sandbox behavior remain active; headless confirmation requests fail closed. The guard does not make arbitrary third-party extension code safe: extensions remain trusted code and may have direct process authority. Neither AILI nor Pi provides a universal OS sandbox or containment: trusted extensions, user-authority processes, ambient network access, and filesystem races remain in the user trust domain. Inspect exact approval targets and do not put credentials in task text.
|
|
97
101
|
|
|
98
102
|
Use `subagent` lifecycle actions (`status`, `logs`, `wait`, `interrupt`, `mark-background`, and `reconcile`) to inspect durable async work. Upstream fan-out is version-bounded rather than capped by AILI at two; background completion is not evidence until inspected. Subagents are a benefit-based way to improve execution efficiency and preserve the main agent's context: the main agent owns decisions, scope, integration, and final verification, while bounded discovery, implementation, testing, or other execution may be delegated when specialist, parallelism, or context-isolation benefits outweigh orchestration cost. Direct parent work remains valid when delegation has no clear net benefit; no subagent call is required to unlock file mutation. Provider/model behavior still depends on the configured Pi environment.
|
|
99
103
|
|
|
@@ -101,6 +105,7 @@ Use `subagent` lifecycle actions (`status`, `logs`, `wait`, `interrupt`, `mark-b
|
|
|
101
105
|
|
|
102
106
|
- `upstream/aili-workflows.lock.json` pins the exact canonical 64-skill/471-file snapshot.
|
|
103
107
|
- `upstream/opencode-global-agents.lock.json` pins the global AGENTS source revision/hash and documents its Pi-native derivation.
|
|
108
|
+
- `upstream/pi-permission-modes.lock.json` pins the exact upstream and adapted permission runtime files and semantic diff.
|
|
104
109
|
- `manifests/skill-compatibility.json` records one compatibility state per skill.
|
|
105
110
|
- `manifests/roles.json` records the 19 generated Pi role profiles.
|
|
106
111
|
- `manifests/provenance.json`, `manifests/sbom.json`, and `THIRD_PARTY_NOTICES.md` record adapted/reference sources and the exact npm lock inventory.
|
|
@@ -119,6 +124,9 @@ npm run validate:release
|
|
|
119
124
|
- **Package install failure:** keep the reported Pi/AILI states distinct. Retry the printed `pi install` command after fixing the cause; do not automatically remove a pre-existing package.
|
|
120
125
|
- **Doctor is non-pass:** inspect the exact `ERROR`, `WARN`, `SKIP`, or `UNVERIFIED` component. Missing optional packs are not core execution success.
|
|
121
126
|
- **Permission shortcut does nothing:** use `/perm`; terminal multiplexers may consume `Alt+M`.
|
|
127
|
+
- **YOLO still asks for multiline Bash:** confirm the loaded Package contains the adapted permission runtime with `npm run verify:permission-modes`; do not work around it by granting every distinct script for the session.
|
|
128
|
+
- **Subagent reports the inline SDK `reading 'create'` failure:** omit `backend` or use `backend: "headless"`; explicit inline is unsupported for the pinned Pi 0.81.1 / subagent 0.4.8 pair.
|
|
129
|
+
- **Sandboxed subagent cannot authenticate or reach its model:** `sandbox:true` is deny-all network, and model-backed sandbox calls must allow the exact provider endpoint while preserving credential protections. This is separate from default-backend compatibility.
|
|
122
130
|
- **Global resources are non-pass:** run `/aili-install-global-resources` only after reviewing the exact `~/.pi/agent/` targets. A malformed marker or an unowned role collision intentionally leaves files unchanged.
|
|
123
131
|
- **Offline use:** the installed Package embeds the pinned skills and does not fetch `aili-workflows` at runtime. Its Pi-managed npm lifecycle synchronizes only pre-existing same-name global skills from that embedded fixed snapshot. First-time Pi/package installation still requires the relevant package sources.
|
|
124
132
|
|
package/THIRD_PARTY_NOTICES.md
CHANGED
|
@@ -22,18 +22,18 @@ This distribution is MIT-licensed. The following adapted sources and locked deve
|
|
|
22
22
|
- License: MIT
|
|
23
23
|
- Source files: src/index.ts, src/api.ts, src/runners/headless-model.ts, src/artifacts/result.ts
|
|
24
24
|
- Reused symbols/patterns: subagent tool renderCall, runSubagent API, headless lifecycle, artifact envelope
|
|
25
|
-
- Local changes: AILI registers the full pinned upstream subagent tool schema, prepends a sanitized bounded requested-Agent heading
|
|
25
|
+
- Local changes: AILI registers the full pinned upstream subagent tool schema, prepends a sanitized bounded requested-Agent heading, injects a non-removable credential guard, normalizes ordinary omitted/auto runs to headless for the Pi 0.81.1 compatibility window, and rejects explicit inline before model startup; no upstream source is copied
|
|
26
26
|
|
|
27
27
|
## pi-permission-modes
|
|
28
28
|
|
|
29
|
-
- Status:
|
|
29
|
+
- Status: adapted
|
|
30
30
|
- Source: https://github.com/wynainfo/pi-permission-modes.git
|
|
31
31
|
- Revision: 23d65d10a53b67043cae42322acf9044d6edb196
|
|
32
32
|
- Version: 2.2.0
|
|
33
33
|
- License: MIT
|
|
34
|
-
- Source files: src/index.ts, permission-
|
|
35
|
-
- Reused symbols/patterns: Default/Plan/Build/YOLO, /perm, Alt+M, sandbox degradation
|
|
36
|
-
- Local changes: AILI
|
|
34
|
+
- Source files: src/vendor/pi-permission-modes/index.ts, src/vendor/pi-permission-modes/resolve.ts, upstream/pi-permission-modes.lock.json, licenses/pi-permission-modes-MIT.txt
|
|
35
|
+
- Reused symbols/patterns: Default/Plan/Build/YOLO, /perm, Alt+M, shared permission pattern matcher, sandbox degradation
|
|
36
|
+
- Local changes: AILI's generated adapted entry redirects unchanged sibling modules to the exact 2.2.0 dependency; the owned resolve.ts compiles permission globs with RegExp dotAll so * and ? include ECMAScript line terminators; the exact upstream and adapted files are hash-locked and drift-checked
|
|
37
37
|
|
|
38
38
|
## pi-quota-status
|
|
39
39
|
|
|
@@ -99,10 +99,10 @@ This distribution is MIT-licensed. The following adapted sources and locked deve
|
|
|
99
99
|
- License: MIT
|
|
100
100
|
- Source files: extensions/header/index.ts, extensions/matrix/index.ts, extensions/zentui/**
|
|
101
101
|
- Reused symbols/patterns: header, matrix animation, Zentui footer, fixed editor compositor
|
|
102
|
-
- Local changes: registered as three additional Pi Package Extensions; header
|
|
102
|
+
- Local changes: registered as three additional Pi Package Extensions; Rose header loads a package-owned renamed artwork asset without changing upstream identity; Rose Shimmer, Rose Code Rain, and Zentui use the Rose-owned palette and gradient; overflowing Matrix tracks remain deterministic across the complete terminal width with the 96-track budget, while each rain row receives a structural blank-row repair; relative import specifiers and session lifecycle event are adapted for this package's NodeNext TypeScript contract
|
|
103
103
|
|
|
104
104
|
## npm dependency inventory
|
|
105
105
|
|
|
106
106
|
The exact 424-entry package-lock inventory, versions, integrity values, dependency scope, and declared licenses is recorded in `manifests/sbom.json`.
|
|
107
107
|
|
|
108
|
-
Runtime dependencies are initialized through the single AILI Extension entry
|
|
108
|
+
Runtime dependencies are initialized through the single AILI Extension entry. Package-owned third-party adaptations are copied only where their provenance sourceFiles explicitly name repository paths.
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { readFileSync } from "node:fs";
|
|
2
|
+
import { getAgentDir, type ExtensionAPI } from "@earendil-works/pi-coding-agent";
|
|
2
3
|
import { fileURLToPath } from "node:url";
|
|
3
|
-
import
|
|
4
|
+
import { join } from "node:path";
|
|
5
|
+
import { legacyRoseThemeGuidanceFromSettings } from "../../src/runtime/rose-theme.js";
|
|
4
6
|
|
|
5
7
|
const RESET = "\x1b[0m";
|
|
6
8
|
const BOLD = "\x1b[1m";
|
|
@@ -26,7 +28,7 @@ function gradient(text: string, from: RGB, to: RGB, bold = false): string {
|
|
|
26
28
|
}).join("");
|
|
27
29
|
}
|
|
28
30
|
|
|
29
|
-
const
|
|
31
|
+
const ROSE_ART = readFileSync(fileURLToPath(new URL("../../src/runtime/rose-head.txt", import.meta.url)), "utf8").trimEnd().split("\n") as readonly string[];
|
|
30
32
|
|
|
31
33
|
function getAvailableRows(tui: unknown): number {
|
|
32
34
|
try {
|
|
@@ -38,15 +40,15 @@ function getAvailableRows(tui: unknown): number {
|
|
|
38
40
|
}
|
|
39
41
|
}
|
|
40
42
|
|
|
41
|
-
function
|
|
43
|
+
export function renderRoseHeader(width: number, availableRows = 0): string[] {
|
|
42
44
|
if (width <= 0) return [];
|
|
43
45
|
|
|
44
|
-
const
|
|
45
|
-
const
|
|
46
|
-
const
|
|
47
|
-
const
|
|
48
|
-
const telemetry = "◈
|
|
49
|
-
const artWidth = Math.max(...
|
|
46
|
+
const blue: RGB = [136, 184, 255];
|
|
47
|
+
const cyan: RGB = [125, 228, 255];
|
|
48
|
+
const violet: RGB = [188, 167, 255];
|
|
49
|
+
const ice: RGB = [214, 244, 255];
|
|
50
|
+
const telemetry = "◈ ROSE CYBERDECK ◈";
|
|
51
|
+
const artWidth = Math.max(...ROSE_ART.map((line) => [...line].length));
|
|
50
52
|
const visibleArtWidth = Math.min(width, artWidth);
|
|
51
53
|
const artPad = " ".repeat(Math.max(0, Math.floor((width - visibleArtWidth) / 2) - 2));
|
|
52
54
|
// Keep the divider visually subordinate: inset it symmetrically from the artwork.
|
|
@@ -58,12 +60,12 @@ function renderHeader(width: number, availableRows = 0): string[] {
|
|
|
58
60
|
const telemetryWidth = [...visibleTelemetry].length;
|
|
59
61
|
const telemetryPad = " ".repeat(Math.max(0, Math.min(width - telemetryWidth, Math.floor((width - telemetryWidth) / 2) + 1)));
|
|
60
62
|
|
|
61
|
-
const art =
|
|
63
|
+
const art = ROSE_ART.map((line) => {
|
|
62
64
|
const clipped = [...line].slice(0, visibleArtWidth).join("");
|
|
63
|
-
return `${artPad}${gradient(clipped,
|
|
65
|
+
return `${artPad}${gradient(clipped, blue, ice)}`;
|
|
64
66
|
});
|
|
65
67
|
|
|
66
|
-
const visualHeight =
|
|
68
|
+
const visualHeight = ROSE_ART.length + 3; // artwork + gap + divider + label
|
|
67
69
|
const extraTopPadding = Math.max(0, Math.floor((availableRows - visualHeight) / 2) - 1);
|
|
68
70
|
|
|
69
71
|
return [
|
|
@@ -71,17 +73,25 @@ function renderHeader(width: number, availableRows = 0): string[] {
|
|
|
71
73
|
"",
|
|
72
74
|
...art,
|
|
73
75
|
"",
|
|
74
|
-
`${railPad}${gradient(rail,
|
|
75
|
-
`${telemetryPad}${gradient(visibleTelemetry,
|
|
76
|
+
`${railPad}${gradient(rail, blue, ice)}`,
|
|
77
|
+
`${telemetryPad}${gradient(visibleTelemetry, violet, cyan, true)}`,
|
|
76
78
|
"",
|
|
77
79
|
];
|
|
78
80
|
}
|
|
79
81
|
|
|
80
|
-
export default function
|
|
82
|
+
export default function roseCyberdeckHeader(pi: ExtensionAPI): void {
|
|
83
|
+
let legacyThemeNoticeSent = false;
|
|
81
84
|
pi.on("session_start", (_event, ctx) => {
|
|
82
85
|
if (!ctx.hasUI) return;
|
|
86
|
+
if (!legacyThemeNoticeSent) {
|
|
87
|
+
const guidance = legacyRoseThemeGuidanceFromSettings(join(getAgentDir(), "settings.json"));
|
|
88
|
+
if (guidance) {
|
|
89
|
+
legacyThemeNoticeSent = true;
|
|
90
|
+
ctx.ui.notify(guidance, "warning");
|
|
91
|
+
}
|
|
92
|
+
}
|
|
83
93
|
ctx.ui.setHeader((tui) => ({
|
|
84
|
-
render: (width) =>
|
|
94
|
+
render: (width) => renderRoseHeader(width, getAvailableRows(tui)),
|
|
85
95
|
invalidate() {},
|
|
86
96
|
}));
|
|
87
97
|
});
|