@vibesdotdev/integrations-pi 0.0.0-stage → 1.0.0-rc.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/LICENSE +126 -0
- package/REFERENCE.md +284 -0
- package/dist/extension/active-tools.d.ts +17 -0
- package/dist/extension/active-tools.d.ts.map +1 -0
- package/dist/extension/active-tools.js +47 -0
- package/dist/extension/active-tools.js.map +1 -0
- package/dist/extension/approvals.d.ts +26 -0
- package/dist/extension/approvals.d.ts.map +1 -0
- package/dist/extension/approvals.js +124 -0
- package/dist/extension/approvals.js.map +1 -0
- package/dist/extension/boot.d.ts +18 -0
- package/dist/extension/boot.d.ts.map +1 -0
- package/dist/extension/boot.js +129 -0
- package/dist/extension/boot.js.map +1 -0
- package/dist/extension/chrome.d.ts +37 -0
- package/dist/extension/chrome.d.ts.map +1 -0
- package/dist/extension/chrome.js +160 -0
- package/dist/extension/chrome.js.map +1 -0
- package/dist/extension/commands.d.ts +41 -0
- package/dist/extension/commands.d.ts.map +1 -0
- package/dist/extension/commands.js +47 -0
- package/dist/extension/commands.js.map +1 -0
- package/dist/extension/entry.d.ts +9 -0
- package/dist/extension/entry.d.ts.map +1 -0
- package/dist/extension/entry.js +16 -0
- package/dist/extension/entry.js.map +1 -0
- package/dist/extension/events.d.ts +17 -0
- package/dist/extension/events.d.ts.map +1 -0
- package/dist/extension/events.js +42 -0
- package/dist/extension/events.js.map +1 -0
- package/dist/extension/index.d.ts +54 -0
- package/dist/extension/index.d.ts.map +1 -0
- package/dist/extension/index.js +547 -0
- package/dist/extension/index.js.map +1 -0
- package/dist/extension/models.d.ts +30 -0
- package/dist/extension/models.d.ts.map +1 -0
- package/dist/extension/models.js +104 -0
- package/dist/extension/models.js.map +1 -0
- package/dist/extension/render.d.ts +17 -0
- package/dist/extension/render.d.ts.map +1 -0
- package/dist/extension/render.js +107 -0
- package/dist/extension/render.js.map +1 -0
- package/dist/extension/runtime-host.d.ts +6 -0
- package/dist/extension/runtime-host.d.ts.map +1 -0
- package/dist/extension/runtime-host.js +2 -0
- package/dist/extension/runtime-host.js.map +1 -0
- package/dist/external/external.plugin.d.ts +7 -0
- package/dist/external/external.plugin.d.ts.map +1 -0
- package/dist/external/external.plugin.js +44 -0
- package/dist/external/external.plugin.js.map +1 -0
- package/dist/external/index.d.ts +8 -0
- package/dist/external/index.d.ts.map +1 -0
- package/dist/external/index.js +8 -0
- package/dist/external/index.js.map +1 -0
- package/dist/external/pi/bootstrap.d.ts +34 -0
- package/dist/external/pi/bootstrap.d.ts.map +1 -0
- package/dist/external/pi/bootstrap.js +238 -0
- package/dist/external/pi/bootstrap.js.map +1 -0
- package/dist/external/pi/guide.d.ts +3 -0
- package/dist/external/pi/guide.d.ts.map +1 -0
- package/dist/external/pi/guide.js +33 -0
- package/dist/external/pi/guide.js.map +1 -0
- package/dist/external/pi/index.d.ts +162 -0
- package/dist/external/pi/index.d.ts.map +1 -0
- package/dist/external/pi/index.js +7 -0
- package/dist/external/pi/index.js.map +1 -0
- package/dist/external/pi/installer.d.ts +19 -0
- package/dist/external/pi/installer.d.ts.map +1 -0
- package/dist/external/pi/installer.descriptor.d.ts +373 -0
- package/dist/external/pi/installer.descriptor.d.ts.map +1 -0
- package/dist/external/pi/installer.descriptor.js +43 -0
- package/dist/external/pi/installer.descriptor.js.map +1 -0
- package/dist/external/pi/installer.js +82 -0
- package/dist/external/pi/installer.js.map +1 -0
- package/dist/external/pi/installers/errors.d.ts +16 -0
- package/dist/external/pi/installers/errors.d.ts.map +1 -0
- package/dist/external/pi/installers/errors.js +15 -0
- package/dist/external/pi/installers/errors.js.map +1 -0
- package/dist/external/pi/installers/extension.d.ts +16 -0
- package/dist/external/pi/installers/extension.d.ts.map +1 -0
- package/dist/external/pi/installers/extension.js +292 -0
- package/dist/external/pi/installers/extension.js.map +1 -0
- package/dist/external/pi/installers/plan.d.ts +29 -0
- package/dist/external/pi/installers/plan.d.ts.map +1 -0
- package/dist/external/pi/installers/plan.js +391 -0
- package/dist/external/pi/installers/plan.js.map +1 -0
- package/dist/external/pi/installers/transaction.d.ts +5 -0
- package/dist/external/pi/installers/transaction.d.ts.map +1 -0
- package/dist/external/pi/installers/transaction.js +66 -0
- package/dist/external/pi/installers/transaction.js.map +1 -0
- package/dist/external/pi/manifest.d.ts +6 -0
- package/dist/external/pi/manifest.d.ts.map +1 -0
- package/dist/external/pi/manifest.js +91 -0
- package/dist/external/pi/manifest.js.map +1 -0
- package/dist/external/pi-presets.d.ts +817 -0
- package/dist/external/pi-presets.d.ts.map +1 -0
- package/dist/external/pi-presets.js +75 -0
- package/dist/external/pi-presets.js.map +1 -0
- package/dist/harness/constants.d.ts +46 -0
- package/dist/harness/constants.d.ts.map +1 -0
- package/dist/harness/constants.js +52 -0
- package/dist/harness/constants.js.map +1 -0
- package/dist/harness/identity.d.ts +29 -0
- package/dist/harness/identity.d.ts.map +1 -0
- package/dist/harness/identity.js +40 -0
- package/dist/harness/identity.js.map +1 -0
- package/dist/harness/index.d.ts +19 -0
- package/dist/harness/index.d.ts.map +1 -0
- package/dist/harness/index.js +18 -0
- package/dist/harness/index.js.map +1 -0
- package/dist/harness/managed-block.d.ts +20 -0
- package/dist/harness/managed-block.d.ts.map +1 -0
- package/dist/harness/managed-block.js +23 -0
- package/dist/harness/managed-block.js.map +1 -0
- package/dist/harness/pi-naming.d.ts +32 -0
- package/dist/harness/pi-naming.d.ts.map +1 -0
- package/dist/harness/pi-naming.js +110 -0
- package/dist/harness/pi-naming.js.map +1 -0
- package/dist/harness/preflight.d.ts +5 -0
- package/dist/harness/preflight.d.ts.map +1 -0
- package/dist/harness/preflight.js +163 -0
- package/dist/harness/preflight.js.map +1 -0
- package/dist/harness/prompt.d.ts +14 -0
- package/dist/harness/prompt.d.ts.map +1 -0
- package/dist/harness/prompt.js +15 -0
- package/dist/harness/prompt.js.map +1 -0
- package/dist/harness/runtime.d.ts +137 -0
- package/dist/harness/runtime.d.ts.map +1 -0
- package/dist/harness/runtime.js +53 -0
- package/dist/harness/runtime.js.map +1 -0
- package/dist/harness/scope.d.ts +11 -0
- package/dist/harness/scope.d.ts.map +1 -0
- package/dist/harness/scope.js +47 -0
- package/dist/harness/scope.js.map +1 -0
- package/dist/harness/themes.d.ts +30 -0
- package/dist/harness/themes.d.ts.map +1 -0
- package/dist/harness/themes.js +225 -0
- package/dist/harness/themes.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -0
- package/dist/schemas/extension-api.d.ts +102 -0
- package/dist/schemas/extension-api.d.ts.map +1 -0
- package/dist/schemas/extension-api.js +2 -0
- package/dist/schemas/extension-api.js.map +1 -0
- package/dist/schemas/extension-host.d.ts +11 -0
- package/dist/schemas/extension-host.d.ts.map +1 -0
- package/dist/schemas/extension-host.js +12 -0
- package/dist/schemas/extension-host.js.map +1 -0
- package/dist/schemas/extension.d.ts +212 -0
- package/dist/schemas/extension.d.ts.map +1 -0
- package/dist/schemas/extension.js +93 -0
- package/dist/schemas/extension.js.map +1 -0
- package/dist/schemas/installer.d.ts +872 -0
- package/dist/schemas/installer.d.ts.map +1 -0
- package/dist/schemas/installer.js +138 -0
- package/dist/schemas/installer.js.map +1 -0
- package/dist/themes/vibes-dark.json +63 -0
- package/dist/themes/vibes-high-contrast.json +63 -0
- package/dist/themes/vibes-light.json +63 -0
- package/package.json +110 -4
- package/README.md +0 -3
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
import { CapabilityError } from '@vibesdotdev/kernel';
|
|
2
|
+
import { PiPreflightInputSchema } from "../schemas/installer.js";
|
|
3
|
+
/**
|
|
4
|
+
* Read-only preflight for a Pi harness install.
|
|
5
|
+
*
|
|
6
|
+
* Every check runs before the first byte is written, so a missing Pi, an
|
|
7
|
+
* missing optional vibes CLI, or a settings file we cannot merge comes back as a list
|
|
8
|
+
* of remedies instead of a half-written configuration. Warnings never block an
|
|
9
|
+
* install; they say what could not be proven.
|
|
10
|
+
*/
|
|
11
|
+
import { statChecked } from '@vibesdotdev/filesystem';
|
|
12
|
+
import { findPiCommand, piInstallHost, resolvePiPackage } from "./runtime.js";
|
|
13
|
+
export const PREFLIGHT_CHECK_IDS = [
|
|
14
|
+
'pi-cli',
|
|
15
|
+
'vibes-cli',
|
|
16
|
+
'bun',
|
|
17
|
+
'package-resolution',
|
|
18
|
+
'writability',
|
|
19
|
+
'merge-safety'
|
|
20
|
+
];
|
|
21
|
+
function skipped(id, skip) {
|
|
22
|
+
return (skip ?? []).includes(id);
|
|
23
|
+
}
|
|
24
|
+
export async function runPiInstallPreflight(rawInput) {
|
|
25
|
+
const admitted = PiPreflightInputSchema.safeParse(rawInput);
|
|
26
|
+
if (!admitted.success)
|
|
27
|
+
throw new CapabilityError('Pi preflight input is invalid.', 'INVALID_INPUT', { reason: 'pi-preflight-input-invalid', cause: admitted.error });
|
|
28
|
+
const input = admitted.data;
|
|
29
|
+
const env = input.env;
|
|
30
|
+
const find = input.probes?.findCommand ?? ((name) => findPiCommand(input.runtime, name, env));
|
|
31
|
+
const resolvePackage = input.probes?.resolvePackage ?? ((specifier) => resolvePiPackage(input.runtime, specifier, input.paths.root));
|
|
32
|
+
const checks = [];
|
|
33
|
+
if (skipped('pi-cli', input.skip)) {
|
|
34
|
+
checks.push({
|
|
35
|
+
id: 'pi-cli',
|
|
36
|
+
status: 'warn',
|
|
37
|
+
message: 'Pi presence check skipped',
|
|
38
|
+
remedy: 'Re-run without the skip once Pi is installed.'
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
else {
|
|
42
|
+
const pi = await find('pi', env);
|
|
43
|
+
checks.push(pi === null
|
|
44
|
+
? {
|
|
45
|
+
id: 'pi-cli',
|
|
46
|
+
status: 'fail',
|
|
47
|
+
message: 'The pi command was not found on PATH',
|
|
48
|
+
remedy: 'Install @earendil-works/pi-coding-agent, or skip this check to write config for another machine.'
|
|
49
|
+
}
|
|
50
|
+
: { id: 'pi-cli', status: 'ok', message: 'Pi found at ' + pi });
|
|
51
|
+
}
|
|
52
|
+
if (skipped('vibes-cli', input.skip)) {
|
|
53
|
+
checks.push({
|
|
54
|
+
id: 'vibes-cli',
|
|
55
|
+
status: 'warn',
|
|
56
|
+
message: 'vibes CLI reachability check skipped',
|
|
57
|
+
remedy: 'Re-run without the skip on the machine that will run Pi.'
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
else {
|
|
61
|
+
const command = env.VIBES_BIN ?? await find('vibes', env);
|
|
62
|
+
const capability = command === null ? { available: false, reason: 'no vibes binary on PATH and VIBES_BIN unset' } : { available: true, command };
|
|
63
|
+
checks.push(capability.available
|
|
64
|
+
? { id: 'vibes-cli', status: 'ok', message: 'vibes CLI found at ' + capability.command }
|
|
65
|
+
: {
|
|
66
|
+
id: 'vibes-cli',
|
|
67
|
+
status: 'warn',
|
|
68
|
+
message: 'The optional vibes CLI is not reachable: ' + capability.reason,
|
|
69
|
+
remedy: 'The extension runs tools and commands in-process. Install vibes or set VIBES_BIN only for standalone CLI use.'
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
if (skipped('bun', input.skip)) {
|
|
73
|
+
checks.push({ id: 'bun', status: 'warn', message: 'bun check skipped' });
|
|
74
|
+
}
|
|
75
|
+
else {
|
|
76
|
+
const bun = await find('bun', env);
|
|
77
|
+
checks.push(bun === null
|
|
78
|
+
? {
|
|
79
|
+
id: 'bun',
|
|
80
|
+
status: 'warn',
|
|
81
|
+
message: 'bun was not found on PATH',
|
|
82
|
+
remedy: 'Pi bundles its own runtime, so this may be fine; install bun to run the harness checks locally.'
|
|
83
|
+
}
|
|
84
|
+
: { id: 'bun', status: 'ok', message: 'bun found at ' + bun });
|
|
85
|
+
}
|
|
86
|
+
if (skipped('package-resolution', input.skip)) {
|
|
87
|
+
checks.push({
|
|
88
|
+
id: 'package-resolution',
|
|
89
|
+
status: 'warn',
|
|
90
|
+
message: 'package resolution check skipped',
|
|
91
|
+
remedy: 'Pi must be able to resolve ' + input.packageName + ' where it runs.'
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
else {
|
|
95
|
+
checks.push(await resolvePackage(input.packageName)
|
|
96
|
+
? {
|
|
97
|
+
id: 'package-resolution',
|
|
98
|
+
status: 'ok',
|
|
99
|
+
message: input.packageName + ' resolves from this checkout'
|
|
100
|
+
}
|
|
101
|
+
: {
|
|
102
|
+
id: 'package-resolution',
|
|
103
|
+
status: 'warn',
|
|
104
|
+
message: input.packageName + ' does not resolve from this process',
|
|
105
|
+
remedy: 'Install @vibesdotdev/integrations-pi where Pi runs. Written config is not proof: only loading Pi verifies it.'
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
const writability = skipped('writability', input.skip) ? null : await checkWritability(input.paths, input.runtime);
|
|
109
|
+
checks.push(skipped('writability', input.skip) ? { id: 'writability', status: 'warn', message: 'Writability check skipped' } : writability === null
|
|
110
|
+
? { id: 'writability', status: 'ok', message: 'All targets are writable' }
|
|
111
|
+
: { id: 'writability', status: 'fail', message: writability, remedy: 'Fix the permissions on that path and re-run.' });
|
|
112
|
+
const conflicts = input.conflicts ?? [];
|
|
113
|
+
checks.push(conflicts.length === 0
|
|
114
|
+
? { id: 'merge-safety', status: 'ok', message: 'Existing files can be merged without loss' }
|
|
115
|
+
: {
|
|
116
|
+
id: 'merge-safety',
|
|
117
|
+
status: 'fail',
|
|
118
|
+
message: conflicts.map((conflict) => conflict.reason).join('; '),
|
|
119
|
+
remedy: conflicts.map((conflict) => conflict.remedy).join('; ')
|
|
120
|
+
});
|
|
121
|
+
return { ok: checks.every((check) => check.status !== 'fail'), checks };
|
|
122
|
+
}
|
|
123
|
+
/**
|
|
124
|
+
* Returns the first problem, or null when every target is reachable and
|
|
125
|
+
* writable. Never creates a directory: a preflight that writes has already
|
|
126
|
+
* failed its own contract.
|
|
127
|
+
*/
|
|
128
|
+
async function checkWritability(paths, runtime) {
|
|
129
|
+
const host = await piInstallHost(runtime);
|
|
130
|
+
const targets = [paths.extensionPath, paths.systemPromptPath, paths.settingsPath,
|
|
131
|
+
...['vibes-dark.json', 'vibes-light.json', 'vibes-high-contrast.json'].map(name => host.paths.join(paths.themesDir, name))];
|
|
132
|
+
for (const target of targets) {
|
|
133
|
+
const entry = await statChecked(host.fs, target);
|
|
134
|
+
if (entry.found) {
|
|
135
|
+
if (entry.stat.kind !== 'file')
|
|
136
|
+
return target + ' exists but is not a regular file';
|
|
137
|
+
if (!entry.stat.writable)
|
|
138
|
+
return target + ' is not writable';
|
|
139
|
+
continue;
|
|
140
|
+
}
|
|
141
|
+
const problem = await checkAncestor(host.fs, host.paths.dirname(target));
|
|
142
|
+
if (problem !== null)
|
|
143
|
+
return problem;
|
|
144
|
+
}
|
|
145
|
+
return null;
|
|
146
|
+
}
|
|
147
|
+
/** Follow the owner's parent operation until an existing directory or the root. No writes. */
|
|
148
|
+
async function checkAncestor(fs, path) {
|
|
149
|
+
let current = path;
|
|
150
|
+
for (;;) {
|
|
151
|
+
const entry = await statChecked(fs, current);
|
|
152
|
+
if (entry.found) {
|
|
153
|
+
if (entry.stat.kind !== 'directory')
|
|
154
|
+
return current + ' is in the way';
|
|
155
|
+
return entry.stat.writable ? null : current + ' is not writable';
|
|
156
|
+
}
|
|
157
|
+
const parent = fs.dirname(current);
|
|
158
|
+
if (parent === current)
|
|
159
|
+
return current + ' cannot be created';
|
|
160
|
+
current = parent;
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
//# sourceMappingURL=preflight.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"preflight.js","sourceRoot":"","sources":["../../src/harness/preflight.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAEtD,OAAO,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;AAEjE;;;;;;;GAOG;AAEH,OAAO,EAAE,WAAW,EAAkC,MAAM,yBAAyB,CAAC;AAEtF,OAAO,EAAE,aAAa,EAAC,aAAa,EAAC,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O,CAAC;IACtC,CAAC;IACD,OAAO,IAAI,CAAC;AACb,CAAC;AAED,8FAA8F;AAC9F,KAAK,UAAU,aAAa,CAAC,EAA8B,EAAE,IAAY;IACxE,IAAI,OAAO,GAAG,IAAI,CAAC;IACnB,SAAS,CAAC;QACT,MAAM,KAAK,GAAG,MAAM,WAAW,CAAC,EAAE,EAAE,OAAO,CAAC,CAAC;QAC7C,IAAI,KAAK,CAAC,KAAK,EAAE,CAAC;YACjB,IAAI,KAAK,CAAC,IAAI,CAAC,IAAI,KAAK,WAAW;gBAAE,OAAO,OAAO,GAAG,gBAAgB,CAAC;YACvE,OAAO,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,GAAG,kBAAkB,CAAC;QAClE,CAAC;QACD,MAAM,MAAM,GAAG,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;QACnC,IAAI,MAAM,KAAK,OAAO;YAAE,OAAO,OAAO,GAAG,oBAAoB,CAAC;QAC9D,OAAO,GAAG,MAAM,CAAC;IAClB,CAAC;AACF,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pi projection of the harness system prompt.
|
|
3
|
+
*
|
|
4
|
+
* The canonical prompt text and the live-surface builder are host-neutral and
|
|
5
|
+
* live in `@vibesdotdev/external/harness`. Pi's own part is the namespace
|
|
6
|
+
* label and the note that the underscore projections, not the registry ids,
|
|
7
|
+
* are the names the model must emit.
|
|
8
|
+
*/
|
|
9
|
+
import { type LivePromptEntry } from '@vibesdotdev/external/harness';
|
|
10
|
+
/** Live Pi briefing over underscore projections, with the session's workspace root. */
|
|
11
|
+
export declare function buildLivePiHarnessPrompt(entries: readonly LivePromptEntry[], workspace?: {
|
|
12
|
+
root: string;
|
|
13
|
+
}): string;
|
|
14
|
+
//# sourceMappingURL=prompt.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prompt.d.ts","sourceRoot":"","sources":["../../src/harness/prompt.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAGN,KAAK,eAAe,EACpB,MAAM,+BAA+B,CAAC;AAKvC,uFAAuF;AACvF,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,SAAS,eAAe,EAAE,EAAE,SAAS,CAAC,EAAE;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,GAAG,MAAM,CAElH"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pi projection of the harness system prompt.
|
|
3
|
+
*
|
|
4
|
+
* The canonical prompt text and the live-surface builder are host-neutral and
|
|
5
|
+
* live in `@vibesdotdev/external/harness`. Pi's own part is the namespace
|
|
6
|
+
* label and the note that the underscore projections, not the registry ids,
|
|
7
|
+
* are the names the model must emit.
|
|
8
|
+
*/
|
|
9
|
+
import { buildHarnessSystemPrompt, livePromptSurface } from '@vibesdotdev/external/harness';
|
|
10
|
+
const PI_PROMPT_NOTE = 'These are the only callable Vibes tool names in this host. The canonical registry\nids (for example workspace-fs) are CLI routing identity; never\nemit one as a tool name.';
|
|
11
|
+
/** Live Pi briefing over underscore projections, with the session's workspace root. */
|
|
12
|
+
export function buildLivePiHarnessPrompt(entries, workspace) {
|
|
13
|
+
return buildHarnessSystemPrompt(livePromptSurface('vibes_*', entries, PI_PROMPT_NOTE), workspace);
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=prompt.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prompt.js","sourceRoot":"","sources":["../../src/harness/prompt.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EACN,wBAAwB,EACxB,iBAAiB,EAEjB,MAAM,+BAA+B,CAAC;AAEvC,MAAM,cAAc,GACnB,6KAA6K,CAAC;AAE/K,uFAAuF;AACvF,MAAM,UAAU,wBAAwB,CAAC,OAAmC,EAAE,SAA4B;IACzG,OAAO,wBAAwB,CAAC,iBAAiB,CAAC,SAAS,EAAE,OAAO,EAAE,cAAc,CAAC,EAAE,SAAS,CAAC,CAAC;AACnG,CAAC"}
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
import { type FileSystemAdapterInterface } from '@vibesdotdev/filesystem';
|
|
2
|
+
import { type RuntimeRef } from '@vibesdotdev/kernel';
|
|
3
|
+
export declare function requirePiRuntime(runtime: RuntimeRef | undefined): RuntimeRef;
|
|
4
|
+
export declare function piInstallHost(runtime: RuntimeRef | undefined): Promise<{
|
|
5
|
+
runtime: RuntimeRef;
|
|
6
|
+
fs: {
|
|
7
|
+
descriptor: {
|
|
8
|
+
id: string;
|
|
9
|
+
kind: "filesystem/adapter";
|
|
10
|
+
protocols: ("file" | "directory" | "symlink" | "special")[];
|
|
11
|
+
capabilities: ("link" | "read" | "write" | "stat" | "list" | "realpath" | "watch" | "move" | "copy" | "trash" | "glob" | "glob-pruning" | "versioned-file" | "file-observation" | "exclusive-create" | "temporary-directory" | "owner-private" | "stream-write" | "chmod" | "append" | "append-stream" | "read-range" | "read-sync" | "mutation-sync" | "touch" | "special-entry-type" | "recursive-watch" | "volume-capacity")[];
|
|
12
|
+
supportsRecursive: boolean;
|
|
13
|
+
supportsWatch: boolean;
|
|
14
|
+
supportsSymlinks: boolean;
|
|
15
|
+
supportsHardLinks: boolean;
|
|
16
|
+
supportsPermissions: boolean;
|
|
17
|
+
supportsOwnership: boolean;
|
|
18
|
+
supportsExtendedAttributes: boolean;
|
|
19
|
+
persistent: boolean;
|
|
20
|
+
supportsTransactions: boolean;
|
|
21
|
+
supportsAtomic: boolean;
|
|
22
|
+
cloudNative: boolean;
|
|
23
|
+
supportsVersioning: boolean;
|
|
24
|
+
supportsGit: boolean;
|
|
25
|
+
supportsEncryption: boolean;
|
|
26
|
+
supportsCompression: boolean;
|
|
27
|
+
supportsQuota: boolean;
|
|
28
|
+
supportsACL: boolean;
|
|
29
|
+
supportsSearch: boolean;
|
|
30
|
+
name?: string | undefined;
|
|
31
|
+
description?: string | undefined;
|
|
32
|
+
tags?: string[] | undefined;
|
|
33
|
+
hardware?: string[] | undefined;
|
|
34
|
+
enabled?: boolean | undefined;
|
|
35
|
+
priority?: number | undefined;
|
|
36
|
+
capabilityId?: string | undefined;
|
|
37
|
+
requiredContext?: string[] | undefined;
|
|
38
|
+
optionalContext?: string[] | undefined;
|
|
39
|
+
config?: unknown;
|
|
40
|
+
retention?: string | {
|
|
41
|
+
reason: string;
|
|
42
|
+
maxAgeDays?: number | undefined;
|
|
43
|
+
maxEntries?: number | undefined;
|
|
44
|
+
maxBytes?: number | undefined;
|
|
45
|
+
cascadeFrom?: string | undefined;
|
|
46
|
+
ageField?: string | undefined;
|
|
47
|
+
enforcedBy?: string | undefined;
|
|
48
|
+
} | undefined;
|
|
49
|
+
versionedFile?: {
|
|
50
|
+
revisionScheme: string;
|
|
51
|
+
revisionScope: "file-content";
|
|
52
|
+
conditionalWrite?: {
|
|
53
|
+
consistency: "process-cooperative" | "cross-process-cooperative" | "backend-atomic";
|
|
54
|
+
writerSet: "adapter-instance-versioned-api" | "process-versioned-api" | "backend-all-writers";
|
|
55
|
+
externalWritersFenced: boolean;
|
|
56
|
+
} | undefined;
|
|
57
|
+
} | undefined;
|
|
58
|
+
};
|
|
59
|
+
exists: (path: string) => Promise<boolean>;
|
|
60
|
+
stat: (path: string) => Promise<import("@vibesdotdev/filesystem").FileSystemStat>;
|
|
61
|
+
readFile: (path: string, encoding?: import("@vibesdotdev/filesystem").FileEncoding) => Promise<string | Uint8Array>;
|
|
62
|
+
writeFile: (path: string, data: string | Uint8Array, options?: import("@vibesdotdev/filesystem").FileEncoding | {
|
|
63
|
+
encoding?: import("@vibesdotdev/filesystem").FileEncoding;
|
|
64
|
+
mode?: number;
|
|
65
|
+
}) => Promise<void>;
|
|
66
|
+
list: (path: string) => Promise<import("@vibesdotdev/filesystem").FileSystemEntry[]>;
|
|
67
|
+
mkdir: (path: string, options?: {
|
|
68
|
+
recursive?: boolean;
|
|
69
|
+
mode?: number;
|
|
70
|
+
}) => Promise<void>;
|
|
71
|
+
remove: (path: string, options?: {
|
|
72
|
+
recursive?: boolean;
|
|
73
|
+
}) => Promise<void>;
|
|
74
|
+
rename: (oldPath: string, newPath: string) => Promise<void>;
|
|
75
|
+
copy: (source: string, destination: string, options?: {
|
|
76
|
+
recursive?: boolean;
|
|
77
|
+
}) => Promise<void>;
|
|
78
|
+
watch: (path: string, callback: import("@vibesdotdev/filesystem").FileSystemWatchCallback) => Promise<() => void>;
|
|
79
|
+
glob: (pattern: string, options?: {
|
|
80
|
+
cwd?: string;
|
|
81
|
+
absolute?: boolean;
|
|
82
|
+
ignore?: string[];
|
|
83
|
+
}) => Promise<string[]>;
|
|
84
|
+
resolve: (...pathSegments: string[]) => string;
|
|
85
|
+
dirname: (path: string) => string;
|
|
86
|
+
basename: (path: string, ext?: string) => string;
|
|
87
|
+
join: (...pathSegments: string[]) => string;
|
|
88
|
+
relative: (from: string, to: string) => string;
|
|
89
|
+
isAbsolute: (path: string) => boolean;
|
|
90
|
+
normalize: (path: string) => string;
|
|
91
|
+
extname: (path: string) => string;
|
|
92
|
+
createSynchronousMutationPort?: (() => import("@vibesdotdev/filesystem").FileSystemSynchronousMutationPort) | undefined;
|
|
93
|
+
createSynchronousReadPort?: ((rootDir: string) => import("@vibesdotdev/filesystem").FileSystemSynchronousReadPort) | undefined;
|
|
94
|
+
createTemporaryDirectory?: (() => Promise<import("@vibesdotdev/filesystem").FileSystemTemporaryDirectory>) | undefined;
|
|
95
|
+
volumeCapacity?: ((path: string) => Promise<import("@vibesdotdev/filesystem").FileSystemVolumeCapacity>) | undefined;
|
|
96
|
+
chmod?: ((path: string, mode: number) => Promise<void>) | undefined;
|
|
97
|
+
readFileRange?: ((path: string, options: import("@vibesdotdev/filesystem").FileSystemReadRangeOptions) => Promise<Uint8Array>) | undefined;
|
|
98
|
+
appendFile?: ((path: string, data: string | Uint8Array, encoding?: import("@vibesdotdev/filesystem").FileEncoding) => Promise<void>) | undefined;
|
|
99
|
+
openAppendFile?: ((path: string) => Promise<import("@vibesdotdev/filesystem").FileSystemAppendHandle>) | undefined;
|
|
100
|
+
realpath?: ((path: string) => Promise<string>) | undefined;
|
|
101
|
+
touch?: ((path: string) => Promise<boolean>) | undefined;
|
|
102
|
+
writeFileStream?: ((path: string, source: ReadableStream<Uint8Array>, options?: import("@vibesdotdev/filesystem").FileStreamWriteOptions) => Promise<number>) | undefined;
|
|
103
|
+
writeFileNoFollow?: ((path: string, data: string | Uint8Array, encoding?: import("@vibesdotdev/filesystem").FileEncoding) => Promise<void>) | undefined;
|
|
104
|
+
readFileNoFollow?: ((path: string) => Promise<import("@vibesdotdev/filesystem").NoFollowFileRead>) | undefined;
|
|
105
|
+
createFileExclusive?: ((path: string, data: string | Uint8Array, encoding?: import("@vibesdotdev/filesystem").FileEncoding) => Promise<boolean>) | undefined;
|
|
106
|
+
writeFilePrivate?: ((path: string, data: string | Uint8Array, encoding?: import("@vibesdotdev/filesystem").FileEncoding) => Promise<void>) | undefined;
|
|
107
|
+
readFilePrivate?: ((path: string, maxBytes: number) => Promise<Uint8Array>) | undefined;
|
|
108
|
+
removeFilePrivateIfContent?: ((path: string, expected: Uint8Array) => Promise<boolean>) | undefined;
|
|
109
|
+
createSymlink?: ((target: string, path: string) => Promise<boolean>) | undefined;
|
|
110
|
+
readFileVersioned?: ((path: string, options: import("@vibesdotdev/filesystem").VersionedReadOptions) => Promise<import("@vibesdotdev/filesystem").VersionedReadResult>) | undefined;
|
|
111
|
+
observeFile?: ((path: string) => Promise<import("@vibesdotdev/filesystem").FileObservationResult>) | undefined;
|
|
112
|
+
readFileObserved?: ((path: string, options: import("@vibesdotdev/filesystem").ObservedReadOptions) => Promise<import("@vibesdotdev/filesystem").ObservedReadResult>) | undefined;
|
|
113
|
+
writeFileConditional?: ((path: string, data: Uint8Array, options: import("@vibesdotdev/filesystem").ConditionalWriteOptions) => Promise<import("@vibesdotdev/filesystem").ConditionalWriteResult>) | undefined;
|
|
114
|
+
watchRecursive?: ((path: string, callback: import("@vibesdotdev/filesystem").FileSystemWatchCallback) => Promise<() => void>) | undefined;
|
|
115
|
+
clear?: (() => Promise<void>) | undefined;
|
|
116
|
+
exportTree?: ((path?: string) => Promise<import("@vibesdotdev/filesystem").FileSystemTreeEntry[]>) | undefined;
|
|
117
|
+
importTree?: ((entries: import("@vibesdotdev/filesystem").FileSystemTreeEntry[], options?: import("@vibesdotdev/filesystem").FileSystemTreeImportOptions) => Promise<void>) | undefined;
|
|
118
|
+
};
|
|
119
|
+
paths: {
|
|
120
|
+
join: import("zod/v4/core").$InferOuterFunctionType<import("zod").ZodTuple<[], import("zod").ZodString>, import("zod").ZodString>;
|
|
121
|
+
resolve: import("zod/v4/core").$InferOuterFunctionType<import("zod").ZodTuple<[], import("zod").ZodString>, import("zod").ZodString>;
|
|
122
|
+
relative: import("zod/v4/core").$InferOuterFunctionType<import("zod").ZodTuple<[import("zod").ZodString, import("zod").ZodString], null>, import("zod").ZodString>;
|
|
123
|
+
dirname: import("zod/v4/core").$InferOuterFunctionType<import("zod").ZodTuple<[import("zod").ZodString], null>, import("zod").ZodString>;
|
|
124
|
+
basename: import("zod/v4/core").$InferOuterFunctionType<import("zod").ZodTuple<[import("zod").ZodString, import("zod").ZodOptional<import("zod").ZodString>], null>, import("zod").ZodString>;
|
|
125
|
+
extname: import("zod/v4/core").$InferOuterFunctionType<import("zod").ZodTuple<[import("zod").ZodString], null>, import("zod").ZodString>;
|
|
126
|
+
isAbsolute: import("zod/v4/core").$InferOuterFunctionType<import("zod").ZodTuple<[import("zod").ZodString], null>, import("zod").ZodBoolean>;
|
|
127
|
+
normalize: import("zod/v4/core").$InferOuterFunctionType<import("zod").ZodTuple<[import("zod").ZodString], null>, import("zod").ZodString>;
|
|
128
|
+
fileURLToPath: import("zod/v4/core").$InferOuterFunctionType<import("zod").ZodTuple<[import("zod").ZodUnion<readonly [import("zod").ZodString, import("zod").ZodInstanceOf<URL>]>], null>, import("zod").ZodString>;
|
|
129
|
+
homedir: import("zod/v4/core").$InferOuterFunctionType<import("zod").ZodTuple<[], null>, import("zod").ZodString>;
|
|
130
|
+
tmpdir: import("zod/v4/core").$InferOuterFunctionType<import("zod").ZodTuple<[], null>, import("zod").ZodString>;
|
|
131
|
+
pathToFileURL?: import("zod/v4/core").$InferOuterFunctionType<import("zod").ZodTuple<[import("zod").ZodString], null>, import("zod").ZodInstanceOf<URL>> | undefined;
|
|
132
|
+
};
|
|
133
|
+
}>;
|
|
134
|
+
export declare function findPiCommand(runtime: RuntimeRef | undefined, command: string, env: Readonly<Record<string, string | undefined>>): Promise<string | null>;
|
|
135
|
+
export declare function resolvePiPackage(runtime: RuntimeRef | undefined, specifier: string, from: string): Promise<boolean>;
|
|
136
|
+
export declare function readPiText(fs: FileSystemAdapterInterface, path: string): Promise<string | undefined>;
|
|
137
|
+
//# sourceMappingURL=runtime.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runtime.d.ts","sourceRoot":"","sources":["../../src/harness/runtime.ts"],"names":[],"mappings":"AAAA,OAAO,EAAuC,KAAK,0BAA0B,EAAE,MAAM,yBAAyB,CAAC;AAC/G,OAAO,EAGP,KAAK,UAAU,EACd,MAAM,qBAAqB,CAAC;AAI7B,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,UAAU,GAAG,SAAS,GAAG,UAAU,CAK5E;AAED,wBAAsB,aAAa,CAAC,OAAO,EAAE,UAAU,GAAG,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;gBAYzC,CAAC;uBACV,CAAC;gBAAkC,CAAC;oBAAwC,CAAC;mBAChF,CAAC;oBAEV,CAAC;wBAA0C,CAAC;2BAC/B,CAAA;2BACgB,CAAC;kBAAsC,CAAC;qBACpD,CAAC;;0BACpB,CAAC;0BAA4C,CAAC;wBAA0C,CAAC;2BAC5F,CAAA;wBAEuC,CAAC;0BAA4C,CAAC;;yBAC5C,CAAC;;;gCAE8B,CAAC;;;;;;;;;yCAYoB,CAAC;oEAAiJ,CAAC;oBAAmE,CAAC;gBAA4D,CAAC;;;qCAA8J,CAAC;qBAAqB,CAAC;gBAAuB,CAAC;;sCAAqE,CAAC;qBAAqB,CAAC;;;2DAA4J,CAAC;qBAAqB,CAAC;;;uCAA4L,CAAC;eAAe,CAAC;oBAA0B,CAAC;kBAAyB,CAAC;;kBAAuD,GAAG;;oCAA0G,CAAC;eAAgC,GAAG;;;;;;;;;;;wEAAo9B,CAAC;;;;qFAAoZ,CAAC;+EAAsK,CAAC;;iFAA8Q,CAAC;8EAA4J,CAAC;;;;;;;;;;2BAAytC,CAAC;gGAAkL,CAAC;;;;;;;;;;;;;;;;GAlChmJ;AAED,wBAAsB,aAAa,CAAC,OAAO,EAAE,UAAU,GAAG,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAAC,0BAEtI;AAED,wBAAsB,gBAAgB,CAAC,OAAO,EAAE,UAAU,GAAG,SAAS,EAAE,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAWzH;AAED,wBAAsB,UAAU,CAAC,EAAE,EAAE,0BAA0B,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAc1G"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { resolveFileSystemAdapter, statChecked } from '@vibesdotdev/filesystem';
|
|
2
|
+
import { CapabilityError, CaughtFailureSchema, valueFreeFailure, settleNow } from '@vibesdotdev/kernel';
|
|
3
|
+
import { whichCommand } from '@vibesdotdev/kernel/execution';
|
|
4
|
+
import { getRuntimePath } from '@vibesdotdev/paths';
|
|
5
|
+
export function requirePiRuntime(runtime) {
|
|
6
|
+
if (!runtime)
|
|
7
|
+
throw new CapabilityError('Pi installation requires the caller runtime.', 'UNAVAILABLE', {
|
|
8
|
+
reason: 'pi-runtime-required', retryable: false
|
|
9
|
+
});
|
|
10
|
+
return runtime;
|
|
11
|
+
}
|
|
12
|
+
export async function piInstallHost(runtime) {
|
|
13
|
+
const owner = requirePiRuntime(runtime);
|
|
14
|
+
const [fs, paths] = await Promise.all([resolveFileSystemAdapter(owner, { binding: false }), getRuntimePath(owner)]);
|
|
15
|
+
return { runtime: owner, fs, paths };
|
|
16
|
+
}
|
|
17
|
+
export async function findPiCommand(runtime, command, env) {
|
|
18
|
+
return whichCommand(requirePiRuntime(runtime), command, { env: { ...env } });
|
|
19
|
+
}
|
|
20
|
+
export async function resolvePiPackage(runtime, specifier, from) {
|
|
21
|
+
const loader = await requirePiRuntime(runtime).query('runtime/loader')
|
|
22
|
+
.withId('runtime/loader.environment').resolve();
|
|
23
|
+
if (!loader?.resolveSpecifier)
|
|
24
|
+
throw new CapabilityError('The host loader cannot resolve packages.', 'UNAVAILABLE', {
|
|
25
|
+
reason: 'pi-package-resolver-unavailable'
|
|
26
|
+
});
|
|
27
|
+
const resolved = settleNow(() => loader.resolveSpecifier(specifier, from));
|
|
28
|
+
if (resolved.ok)
|
|
29
|
+
return true;
|
|
30
|
+
const code = valueFreeFailure(CaughtFailureSchema.parse(resolved.cause)).code;
|
|
31
|
+
if (code === 'MODULE_NOT_FOUND' || code === 'ERR_MODULE_NOT_FOUND')
|
|
32
|
+
return false;
|
|
33
|
+
throw new CapabilityError('Pi package resolution failed.', 'UNAVAILABLE', { reason: 'pi-package-resolution-failed', cause: resolved.cause });
|
|
34
|
+
}
|
|
35
|
+
export async function readPiText(fs, path) {
|
|
36
|
+
const entry = await statChecked(fs, path);
|
|
37
|
+
if (!entry.found)
|
|
38
|
+
return undefined;
|
|
39
|
+
if (entry.stat.kind !== 'file')
|
|
40
|
+
throw new CapabilityError('An install target is not a regular file.', 'CONFLICT', {
|
|
41
|
+
reason: 'pi-file-not-regular'
|
|
42
|
+
});
|
|
43
|
+
try {
|
|
44
|
+
const content = await fs.readFile(path, 'utf8');
|
|
45
|
+
return content instanceof Uint8Array ? new TextDecoder().decode(content) : content;
|
|
46
|
+
}
|
|
47
|
+
catch (cause) {
|
|
48
|
+
throw new CapabilityError('A Pi install target could not be read; it was preserved.', 'UNAVAILABLE', {
|
|
49
|
+
reason: 'pi-file-read-failed', cause
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
//# sourceMappingURL=runtime.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runtime.js","sourceRoot":"","sources":["../../src/harness/runtime.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAC,WAAW,EAAkC,MAAM,yBAAyB,CAAC;AAC/G,OAAO,EACP,eAAe,EAAC,mBAAmB,EAAC,gBAAgB,EAAC,SAAS,EAG7D,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAC7D,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEpD,MAAM,UAAU,gBAAgB,CAAC,OAA+B;IAC/D,IAAI,CAAC,OAAO;QAAE,MAAM,IAAI,eAAe,CAAC,8CAA8C,EAAE,aAAa,EAAE;YACtG,MAAM,EAAE,qBAAqB,EAAE,SAAS,EAAE,KAAK;SAC/C,CAAC,CAAC;IACH,OAAO,OAAO,CAAC;AAChB,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,aAAa,CAAC,OAA+B;IAClE,MAAM,KAAK,GAAG,gBAAgB,CAAC,OAAO,CAAC,CAAC;IACxC,MAAM,CAAC,EAAE,EAAE,KAAK,CAAC,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC,CAAC,wBAAwB,CAAC,KAAK,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC,EAAE,cAAc,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IACpH,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,EAAE,KAAK,EAAE,CAA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AAI,CAAC,CAAC;IAC1C,IAAI,CAAC,KAAK,CAAC,KAAK;QAAE,OAAO,SAAS,CAAC;IACnC,IAAI,KAAK,CAAC,IAAI,CAAC,IAAI,KAAK,MAAM;QAAE,MAAM,IAAI,eAAe,CAAC,0CAA0C,EAAE,UAAU,EAAE;YACjH,MAAM,EAAE,qBAAqB;SAC7B,CAAC,CAAC;IACH,IAAI,CAAC;QACJ,MAAM,OAAO,GAAG,MAAM,EAAE,CAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;QAChD,OAAO,OAAO,YAAY,UAAU,CAAC,CAAC,CAAC,IAAI,WAAW,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC;IACpF,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QAChB,MAAM,IAAI,eAAe,CAAC,0DAA0D,EAAE,aAAa,EAAE;YACpG,MAAM,EAAE,qBAAqB,EAAE,KAAK;SACpC,CAAC,CAAC;IACJ,CAAC;AACF,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { PiScope, PiScopePaths } from '../schemas/installer.ts';
|
|
2
|
+
import { PiScopeSchema } from '../schemas/installer.ts';
|
|
3
|
+
export type { PiScope, PiScopePaths } from '../schemas/installer.ts';
|
|
4
|
+
import type { RuntimePath } from '@vibesdotdev/paths';
|
|
5
|
+
export declare const PI_SCOPES: readonly ["project", "global"];
|
|
6
|
+
export declare function isPiScope(value: Parameters<typeof PiScopeSchema.safeParse>[0]): value is PiScope;
|
|
7
|
+
export declare function resolvePiScopePaths(scope: PiScope, options: {
|
|
8
|
+
cwd?: string;
|
|
9
|
+
home?: string;
|
|
10
|
+
}, paths?: Pick<RuntimePath, 'join'>): PiScopePaths;
|
|
11
|
+
//# sourceMappingURL=scope.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scope.d.ts","sourceRoot":"","sources":["../../src/harness/scope.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAC,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACpE,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,YAAY,EAAE,OAAO,EAAC,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAWpE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAWtD,eAAO,MAAM,SAAS,gCAAiC,CAAC;AAGxD,wBAAgB,SAAS,CAAC,KAAK,EAAE,UAAU,CAAC,OAAO,aAAa,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,GAAG,KAAK,IAAI,OAAO,CAEhG;AAuBD,wBAAgB,mBAAmB,CAClC,KAAK,EAAE,OAAO,EACd,OAAO,EAAE;IAAE,GAAG,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,EACxC,KAAK,CAAC,EAAE,IAAI,CAAC,WAAW,EAAE,MAAM,CAAC,GAC/B,YAAY,CAed"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { PiScopeSchema } from "../schemas/installer.js";
|
|
2
|
+
/**
|
|
3
|
+
* Pi configuration scopes.
|
|
4
|
+
*
|
|
5
|
+
* Pi reads project config from `.pi/` and agent-global config from
|
|
6
|
+
* `~/.pi/agent/`. The layout is identical, so one resolver serves both and no
|
|
7
|
+
* caller has to know which directory won.
|
|
8
|
+
*/
|
|
9
|
+
import { join as portableJoin } from '@vibesdotdev/filesystem';
|
|
10
|
+
import { CapabilityError } from '@vibesdotdev/kernel';
|
|
11
|
+
import { PI_DIR, PI_EXTENSION_FILE, PI_EXTENSION_REF, PI_GLOBAL_RELATIVE_DIR, PI_SETTINGS_FILE, PI_SYSTEM_PROMPT_FILE } from "./constants.js";
|
|
12
|
+
import { PI_THEMES_DIR } from "./themes.js";
|
|
13
|
+
export const PI_SCOPES = ['project', 'global'];
|
|
14
|
+
export function isPiScope(value) {
|
|
15
|
+
return PiScopeSchema.safeParse(value).success;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* The scope's directory: the project directory for `project`, the host's user
|
|
19
|
+
* home (`paths/roots` `userHome`) for `global`. The caller supplies the one
|
|
20
|
+
* the scope needs; nothing is taken from the process.
|
|
21
|
+
*/
|
|
22
|
+
function scopeBase(scope, options) {
|
|
23
|
+
const base = scope === 'global' ? options.home : options.cwd;
|
|
24
|
+
if (!base) {
|
|
25
|
+
throw new CapabilityError(scope === 'global'
|
|
26
|
+
? 'A global Pi install needs the user home.'
|
|
27
|
+
: 'A project Pi install needs the project directory.', 'INVALID_INPUT', { reason: 'pi-scope-root-missing', details: { scope } });
|
|
28
|
+
}
|
|
29
|
+
return base;
|
|
30
|
+
}
|
|
31
|
+
export function resolvePiScopePaths(scope, options, paths) {
|
|
32
|
+
const join = paths ? (...segments) => paths.join(...segments) : portableJoin;
|
|
33
|
+
const base = scopeBase(scope, options);
|
|
34
|
+
const root = scope === 'global' ? join(base, ...PI_GLOBAL_RELATIVE_DIR) : join(base, PI_DIR);
|
|
35
|
+
const extensionsDir = join(root, 'extensions');
|
|
36
|
+
return {
|
|
37
|
+
scope,
|
|
38
|
+
root,
|
|
39
|
+
extensionsDir,
|
|
40
|
+
extensionPath: join(extensionsDir, PI_EXTENSION_FILE),
|
|
41
|
+
systemPromptPath: join(root, PI_SYSTEM_PROMPT_FILE),
|
|
42
|
+
settingsPath: join(root, PI_SETTINGS_FILE),
|
|
43
|
+
themesDir: join(root, PI_THEMES_DIR),
|
|
44
|
+
extensionRef: PI_EXTENSION_REF
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
//# sourceMappingURL=scope.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scope.js","sourceRoot":"","sources":["../../src/harness/scope.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAExD;;;;;;GAMG;AAEH,OAAO,EAAE,IAAI,I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KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,GAAG,sBAAsB,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;IAC7F,MAAM,aAAa,GAAG,IAAI,CAAC,IAAI,EAAE,YAAY,CAAC,CAAC;IAC/C,OAAO;QACN,KAAK;QACL,IAAI;QACJ,aAAa;QACb,aAAa,EAAE,IAAI,CAAC,aAAa,EAAE,iBAAiB,CAAC;QACrD,gBAAgB,EAAE,IAAI,CAAC,IAAI,EAAE,qBAAqB,CAAC;QACnD,YAAY,EAAE,IAAI,CAAC,IAAI,EAAE,gBAAgB,CAAC;QAC1C,SAAS,EAAE,IAAI,CAAC,IAAI,EAAE,aAAa,CAAC;QACpC,YAAY,EAAE,gBAAgB;KAC9B,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { PiThemeFile, PiVibesThemeName } from '../schemas/installer.ts';
|
|
2
|
+
import { PiThemeNameSchema } from '../schemas/installer.ts';
|
|
3
|
+
export type { PiThemeFile, PiVibesThemeName } from '../schemas/installer.ts';
|
|
4
|
+
/**
|
|
5
|
+
* Pi theme files projected from the Studio semantic palettes.
|
|
6
|
+
*
|
|
7
|
+
* Source of the hex values: `@vibesdotdev/tui` `src/theme.semantic.ts`.
|
|
8
|
+
* Pi cannot load OpenTUI, so this package stores the host-native JSON copy
|
|
9
|
+
* rather than importing `@vibesdotdev/tui/theme`.
|
|
10
|
+
*/
|
|
11
|
+
export declare const PI_THEMES_DIR = "themes";
|
|
12
|
+
export declare const PI_THEME_NAMES: readonly ["vibes-dark", "vibes-light", "vibes-high-contrast"];
|
|
13
|
+
/**
|
|
14
|
+
* Where the build emits the theme JSON that `package.json` `pi.themes` names.
|
|
15
|
+
*
|
|
16
|
+
* Pi loads a published package's themes by path, so the themes ship as files
|
|
17
|
+
* inside the package instead of being copied into the user's project by the
|
|
18
|
+
* installer. `scripts/emit-pi-themes.ts` writes them from the palettes below;
|
|
19
|
+
* nothing hand-maintains them.
|
|
20
|
+
*/
|
|
21
|
+
export declare const PI_THEME_DIST_DIR = "dist/themes";
|
|
22
|
+
/** One theme as the `pi.themes` manifest spells it: package-root relative. */
|
|
23
|
+
export declare function piThemePackagePath(filename: string): string;
|
|
24
|
+
export declare const DEFAULT_PI_VIBES_THEME: PiVibesThemeName;
|
|
25
|
+
export declare const PI_THEME_REF = "./themes";
|
|
26
|
+
export declare const PI_THEME_COLOR_KEYS: readonly ["accent", "border", "borderAccent", "borderMuted", "success", "error", "warning", "muted", "dim", "text", "thinkingText", "scrollbarTrack", "scrollbarThumb", "selectedBg", "userMessageBg", "userMessageText", "customMessageBg", "customMessageText", "customMessageLabel", "toolPendingBg", "toolSuccessBg", "toolErrorBg", "toolTitle", "toolOutput", "mdHeading", "mdLink", "mdLinkUrl", "mdCode", "mdCodeBlock", "mdCodeBlockBorder", "mdQuote", "mdQuoteBorder", "mdHr", "mdListBullet", "toolDiffAdded", "toolDiffRemoved", "toolDiffContext", "syntaxComment", "syntaxKeyword", "syntaxFunction", "syntaxVariable", "syntaxString", "syntaxNumber", "syntaxType", "syntaxOperator", "syntaxPunctuation", "thinkingOff", "thinkingMinimal", "thinkingLow", "thinkingMedium", "thinkingHigh", "thinkingXhigh", "bashMode"];
|
|
27
|
+
/** Exact bytes the installer writes for each Vibes Pi theme. */
|
|
28
|
+
export declare function renderPiVibesThemes(): readonly PiThemeFile[];
|
|
29
|
+
export declare function isPiVibesThemeName(value: Parameters<typeof PiThemeNameSchema.safeParse>[0]): value is PiVibesThemeName;
|
|
30
|
+
//# sourceMappingURL=themes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"themes.d.ts","sourceRoot":"","sources":["../../src/harness/themes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAC,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAC5E,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAC5D,YAAY,EAAE,WAAW,EAAC,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAC5E;;;;;;GAMG;AAEH,eAAO,MAAM,aAAa,WAAW,CAAC;AACtC,eAAO,MAAM,cAAc,+DAAgE,CAAC;AAE5F;;;;;;;GAOG;AACH,eAAO,MAAM,iBAAiB,gBAAgB,CAAC;AAE/C,8EAA8E;AAC9E,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAE3D;AAED,eAAO,MAAM,sBAAsB,EAAE,gBAA+B,CAAC;AACrE,eAAO,MAAM,YAAY,aAAa,CAAC;AAqFvC,eAAO,MAAM,mBAAmB,6yBAsDtB,CAAC;AAsFX,gEAAgE;AAChE,wBAAgB,mBAAmB,IAAI,SAAS,WAAW,EAAE,CAM5D;AAED,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,UAAU,CAAC,OAAO,iBAAiB,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,GAAG,KAAK,IAAI,gBAAgB,CAEtH"}
|