@vibesdotdev/integrations-pi 0.0.0-stage → 1.0.0-rc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/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 +33 -0
- package/dist/extension/chrome.d.ts.map +1 -0
- package/dist/extension/chrome.js +167 -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 +541 -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 +193 -0
- package/dist/schemas/extension.d.ts.map +1 -0
- package/dist/schemas/extension.js +82 -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,238 @@
|
|
|
1
|
+
import { PiBootstrapOptionsSchema } from "../../schemas/installer.js";
|
|
2
|
+
import { CapabilityError, CaughtFailureSchema } from '@vibesdotdev/kernel';
|
|
3
|
+
import { runCapture } from '@vibesdotdev/kernel/execution';
|
|
4
|
+
import { findPiCommand, requirePiRuntime } from "../../harness/runtime.js";
|
|
5
|
+
import { PiOperationOptionsSchema } from "../../schemas/installer.js";
|
|
6
|
+
import { piScopeRoots } from "./installer.js";
|
|
7
|
+
import { installPiVibesExtension } from "./installers/extension.js";
|
|
8
|
+
/** The documented Pi CLI package, named by the harness preflight remedy. */
|
|
9
|
+
export const PI_CLI_PACKAGE = '@earendil-works/pi-coding-agent';
|
|
10
|
+
/** Raised for a refused bootstrap: missing prerequisite, failed install, or failed integration. */
|
|
11
|
+
export class PiBootstrapError extends CapabilityError {
|
|
12
|
+
checks;
|
|
13
|
+
constructor(message, checks, cause) {
|
|
14
|
+
super(message, 'UNAVAILABLE', { reason: checks.some(check => check.id === 'integration' && check.status === 'fail') ? 'pi-bootstrap-integration-failed' : 'pi-bootstrap-binary-failed', cause, details: { failedChecks: checks.filter(check => check.status === 'fail').map(check => check.id) } });
|
|
15
|
+
this.name = 'PiBootstrapError';
|
|
16
|
+
this.checks = checks;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
function formatPiBootstrapCommand(command) {
|
|
20
|
+
return [command.command, ...command.args].join(' ');
|
|
21
|
+
}
|
|
22
|
+
function failureMessage(checks) {
|
|
23
|
+
return ('Pi bootstrap failed:\n' +
|
|
24
|
+
checks
|
|
25
|
+
.map((check) => ` ${check.id}: ${check.status} - ${check.message}` +
|
|
26
|
+
(check.remedy ? `\n remedy: ${check.remedy}` : ''))
|
|
27
|
+
.join('\n'));
|
|
28
|
+
}
|
|
29
|
+
function integrationNotAttempted(reason) {
|
|
30
|
+
return {
|
|
31
|
+
id: 'integration',
|
|
32
|
+
status: 'warn',
|
|
33
|
+
message: `Vibes Pi harness install not attempted: ${reason}`
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* The documented global install for the Pi CLI. bun is preferred when present;
|
|
38
|
+
* npm is the fallback. Null when neither package manager is on PATH.
|
|
39
|
+
*/
|
|
40
|
+
async function piCliInstallCommand(env, find) {
|
|
41
|
+
if (await find('bun', env) !== null)
|
|
42
|
+
return { command: 'bun', args: ['add', '-g', PI_CLI_PACKAGE] };
|
|
43
|
+
if (await find('npm', env) !== null)
|
|
44
|
+
return { command: 'npm', args: ['install', '-g', PI_CLI_PACKAGE] };
|
|
45
|
+
return null;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Check the Pi binary, install it when missing, then apply the Vibes harness.
|
|
49
|
+
* Throws PiBootstrapError (carrying both checks) on the first failed step.
|
|
50
|
+
*/
|
|
51
|
+
export async function runPiBootstrap(rawOptions) {
|
|
52
|
+
const admitted = PiBootstrapOptionsSchema.safeParse(rawOptions);
|
|
53
|
+
if (!admitted.success)
|
|
54
|
+
throw new CapabilityError('Pi bootstrap options are invalid.', 'INVALID_INPUT', { reason: 'pi-bootstrap-options-invalid', cause: admitted.error });
|
|
55
|
+
const options = admitted.data;
|
|
56
|
+
const env = options.env;
|
|
57
|
+
const find = options.probes?.findCommand ?? ((name) => findPiCommand(options.runtime, name, env));
|
|
58
|
+
const run = options.probes?.runCommand ?? ((command) => runCapture(requirePiRuntime(options.runtime), command.command, command.args, { envMode: 'replace', env }));
|
|
59
|
+
const apply = options.probes?.applyIntegration ?? installPiVibesExtension;
|
|
60
|
+
const scope = options.scope ?? 'project';
|
|
61
|
+
const dryRun = options.dryRun ?? false;
|
|
62
|
+
const checks = [];
|
|
63
|
+
const integrationOptions = {
|
|
64
|
+
scope,
|
|
65
|
+
cwd: options.cwd,
|
|
66
|
+
home: options.home,
|
|
67
|
+
dryRun: false,
|
|
68
|
+
skipChecks: options.skipChecks ?? [],
|
|
69
|
+
env,
|
|
70
|
+
profile: options.profile,
|
|
71
|
+
runtime: options.runtime
|
|
72
|
+
};
|
|
73
|
+
let binaryPath = await find('pi', env);
|
|
74
|
+
let installCommand = null;
|
|
75
|
+
if (dryRun) {
|
|
76
|
+
if (binaryPath !== null) {
|
|
77
|
+
checks.push({
|
|
78
|
+
id: 'binary',
|
|
79
|
+
status: 'ok',
|
|
80
|
+
message: `Pi found at ${binaryPath}; no install needed`
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
else {
|
|
84
|
+
installCommand = await piCliInstallCommand(env, find);
|
|
85
|
+
checks.push(installCommand === null
|
|
86
|
+
? {
|
|
87
|
+
id: 'binary',
|
|
88
|
+
status: 'warn',
|
|
89
|
+
message: 'The pi command was not found on PATH and neither bun nor npm is available, so a real bootstrap would stop here',
|
|
90
|
+
remedy: `Install ${PI_CLI_PACKAGE} with bun or npm, then re-run.`
|
|
91
|
+
}
|
|
92
|
+
: {
|
|
93
|
+
id: 'binary',
|
|
94
|
+
status: 'warn',
|
|
95
|
+
message: `The pi command was not found on PATH; would install: ${formatPiBootstrapCommand(installCommand)}`,
|
|
96
|
+
remedy: 'A dry run installs nothing.'
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
checks.push({
|
|
100
|
+
id: 'integration',
|
|
101
|
+
status: 'warn',
|
|
102
|
+
message: `Dry run: would apply the Vibes Pi harness (${scope} scope) after the binary step`
|
|
103
|
+
});
|
|
104
|
+
return {
|
|
105
|
+
ok: true,
|
|
106
|
+
dryRun: true,
|
|
107
|
+
scope,
|
|
108
|
+
binaryPath,
|
|
109
|
+
installCommand,
|
|
110
|
+
checks,
|
|
111
|
+
integration: null,
|
|
112
|
+
message: 'Dry run: Pi bootstrap plan - ' +
|
|
113
|
+
checks
|
|
114
|
+
.map((check) => `${check.id}: ${check.message}` +
|
|
115
|
+
(check.remedy ? ` (${check.remedy})` : ''))
|
|
116
|
+
.join('; ')
|
|
117
|
+
};
|
|
118
|
+
}
|
|
119
|
+
if (binaryPath === null) {
|
|
120
|
+
installCommand = await piCliInstallCommand(env, find);
|
|
121
|
+
if (installCommand === null) {
|
|
122
|
+
checks.push({
|
|
123
|
+
id: 'binary',
|
|
124
|
+
status: 'fail',
|
|
125
|
+
message: 'The pi command was not found on PATH and neither bun nor npm is available to install it',
|
|
126
|
+
remedy: `Install ${PI_CLI_PACKAGE} with bun or npm, then re-run.`
|
|
127
|
+
});
|
|
128
|
+
checks.push(integrationNotAttempted('the pi binary is missing'));
|
|
129
|
+
throw new PiBootstrapError(failureMessage(checks), checks);
|
|
130
|
+
}
|
|
131
|
+
let installResult;
|
|
132
|
+
try {
|
|
133
|
+
installResult = await run(installCommand, env);
|
|
134
|
+
}
|
|
135
|
+
catch (error) {
|
|
136
|
+
checks.push({
|
|
137
|
+
id: 'binary',
|
|
138
|
+
status: 'fail',
|
|
139
|
+
message: `${formatPiBootstrapCommand(installCommand)} could not run: ${error instanceof Error ? error.message : String(error)}`,
|
|
140
|
+
remedy: `Install ${PI_CLI_PACKAGE} manually, then re-run.`
|
|
141
|
+
});
|
|
142
|
+
checks.push(integrationNotAttempted('the pi binary install failed to start'));
|
|
143
|
+
throw new PiBootstrapError(failureMessage(checks), checks, error);
|
|
144
|
+
}
|
|
145
|
+
if (installResult.exitCode !== 0) {
|
|
146
|
+
const detail = installResult.stderr.trim() || installResult.stdout.trim() || 'no output';
|
|
147
|
+
checks.push({
|
|
148
|
+
id: 'binary',
|
|
149
|
+
status: 'fail',
|
|
150
|
+
message: `${formatPiBootstrapCommand(installCommand)} exited with code ${installResult.exitCode}: ${detail}`,
|
|
151
|
+
remedy: `Install ${PI_CLI_PACKAGE} manually, then re-run.`
|
|
152
|
+
});
|
|
153
|
+
checks.push(integrationNotAttempted('the pi binary install failed'));
|
|
154
|
+
throw new PiBootstrapError(failureMessage(checks), checks);
|
|
155
|
+
}
|
|
156
|
+
binaryPath = await find('pi', env);
|
|
157
|
+
if (binaryPath === null) {
|
|
158
|
+
checks.push({
|
|
159
|
+
id: 'binary',
|
|
160
|
+
status: 'fail',
|
|
161
|
+
message: `${formatPiBootstrapCommand(installCommand)} exited 0, but the pi command is still not on PATH`,
|
|
162
|
+
remedy: 'Add the package manager global bin directory to PATH, then re-run.'
|
|
163
|
+
});
|
|
164
|
+
checks.push(integrationNotAttempted('the pi binary is not on PATH'));
|
|
165
|
+
throw new PiBootstrapError(failureMessage(checks), checks);
|
|
166
|
+
}
|
|
167
|
+
checks.push({
|
|
168
|
+
id: 'binary',
|
|
169
|
+
status: 'ok',
|
|
170
|
+
message: `Installed Pi with ${formatPiBootstrapCommand(installCommand)}; pi found at ${binaryPath}`
|
|
171
|
+
});
|
|
172
|
+
}
|
|
173
|
+
else {
|
|
174
|
+
checks.push({
|
|
175
|
+
id: 'binary',
|
|
176
|
+
status: 'ok',
|
|
177
|
+
message: `Pi found at ${binaryPath}; no install needed`
|
|
178
|
+
});
|
|
179
|
+
}
|
|
180
|
+
try {
|
|
181
|
+
const integration = await apply(integrationOptions);
|
|
182
|
+
checks.push({ id: 'integration', status: 'ok', message: integration.message });
|
|
183
|
+
return {
|
|
184
|
+
ok: true,
|
|
185
|
+
dryRun: false,
|
|
186
|
+
scope,
|
|
187
|
+
binaryPath,
|
|
188
|
+
installCommand,
|
|
189
|
+
checks,
|
|
190
|
+
integration,
|
|
191
|
+
message: 'Pi bootstrap complete.'
|
|
192
|
+
};
|
|
193
|
+
}
|
|
194
|
+
catch (error) {
|
|
195
|
+
checks.push({
|
|
196
|
+
id: 'integration',
|
|
197
|
+
status: 'fail',
|
|
198
|
+
message: `Vibes Pi harness install failed: ${error instanceof Error ? error.message : String(error)}`,
|
|
199
|
+
remedy: 'Resolve the named conflict or preflight failure, then re-run.'
|
|
200
|
+
});
|
|
201
|
+
throw new PiBootstrapError(failureMessage(checks), checks, error);
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
/** Operation factory; probes are injected by tests, never by the CLI. */
|
|
205
|
+
export function createPiBootstrapOperation(probes = {}) {
|
|
206
|
+
return {
|
|
207
|
+
async execute(input, context, services) {
|
|
208
|
+
const parsed = PiOperationOptionsSchema.safeParse(input.options);
|
|
209
|
+
if (!parsed.success)
|
|
210
|
+
throw new CapabilityError('Pi bootstrap options are invalid.', 'INVALID_INPUT', {
|
|
211
|
+
reason: 'pi-operation-options-invalid', cause: parsed.error
|
|
212
|
+
});
|
|
213
|
+
const { profile, skipCheck } = parsed.data;
|
|
214
|
+
const result = await runPiBootstrap({
|
|
215
|
+
scope: context.global ? 'global' : 'project',
|
|
216
|
+
...piScopeRoots(context, services),
|
|
217
|
+
env: services.runtime.getEnvSnapshot(),
|
|
218
|
+
profile,
|
|
219
|
+
runtime: services.runtime,
|
|
220
|
+
dryRun: context.dryRun,
|
|
221
|
+
skipChecks: skipCheck,
|
|
222
|
+
probes
|
|
223
|
+
});
|
|
224
|
+
return {
|
|
225
|
+
status: 'ok',
|
|
226
|
+
message: result.message,
|
|
227
|
+
changed: !result.dryRun &&
|
|
228
|
+
(result.installCommand !== null ||
|
|
229
|
+
(result.integration?.changes.length ?? 0) > 0),
|
|
230
|
+
changes: result.integration?.changes,
|
|
231
|
+
checks: result.checks,
|
|
232
|
+
data: result
|
|
233
|
+
};
|
|
234
|
+
}
|
|
235
|
+
};
|
|
236
|
+
}
|
|
237
|
+
export const piBootstrapOperation = createPiBootstrapOperation();
|
|
238
|
+
//# sourceMappingURL=bootstrap.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bootstrap.js","sourceRoot":"","sources":["../../../src/external/pi/bootstrap.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AAqBtE,OAAO,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAC3E,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAC3D,OAAO,EAAE,aAAa,EAAC,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAC1E,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AACtE,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EACP,uBAAuB,EAEtB,MAAM,2BAA2B,CAAC;AAEnC,4EAA4E;AAC5E,MAAM,CAAC,MAAM,cAAc,GAAG,iCAAiC,CAAC;AAgBhE,mGAAmG;AACnG,MAAM,OAAO,gBAAiB,SAAQ,eAAe;IAC3C,MAAM,CAA8B;IAC7C,YAAY,OAAe,EAAE,MAAmC,EAAE,KAAuD;QACxH,KAAK,CAAC,OAAO,EAAE,aAAa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,EAAE,OAAO,CAAC,MAAM,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC;gBAChD,OAAO,EAAE,MAAM,CAAC,WAAW,EAAE,OAAO;gBACpC,MAAM,EAAE,MAAM,CAAC,MAAM;gBACrB,IAAI,EAAE,MAAM;aACZ,CAAC;QACH,CAAC;KACD,CAAC;AACH,CAAC;AAED,MAAM,CAAC,MAAM,oBAAoB,GAAG,0BAA0B,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"guide.d.ts","sourceRoot":"","sources":["../../../src/external/pi/guide.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAkB/D,eAAO,MAAM,gBAAgB,EAAE,iBAe9B,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { CapabilityError } from '@vibesdotdev/kernel';
|
|
2
|
+
import { replaceManagedBlock } from '@vibesdotdev/external/harness';
|
|
3
|
+
import { piInstallHost, readPiText } from "../../harness/runtime.js";
|
|
4
|
+
import { applyPiChanges } from "./installers/transaction.js";
|
|
5
|
+
const GUIDE = `# Vibes + Pi (mcporter)
|
|
6
|
+
|
|
7
|
+
Pi does not embed MCP directly. Use [mcporter](https://github.com/modelcontextprotocol/mcporter) to bridge the vibes MCP server:
|
|
8
|
+
|
|
9
|
+
1. Configure mcporter with your vibes MCP server (see \`vibes dev mcp serve --client pi\`)
|
|
10
|
+
2. Configure mcporter to forward stdio MCP to the \`vibes\` server entry
|
|
11
|
+
3. Run \`vibes dev mcp serve --client pi\` in a terminal or via mcporter spawn
|
|
12
|
+
|
|
13
|
+
See {{docsOrigin}}/external for agent-pack details.
|
|
14
|
+
`;
|
|
15
|
+
export const piGuideOperation = {
|
|
16
|
+
async execute(_input, context, services) {
|
|
17
|
+
const service = await services.runtime.query('infra/service').withId('docs').resolve();
|
|
18
|
+
if (!service)
|
|
19
|
+
throw new CapabilityError('Compose the documentation service before applying the Pi guide.', 'UNAVAILABLE', {
|
|
20
|
+
reason: 'pi-docs-service-unavailable'
|
|
21
|
+
});
|
|
22
|
+
const { origin } = await service.target('primary');
|
|
23
|
+
const host = await piInstallHost(services.runtime);
|
|
24
|
+
const path = host.paths.join(context.projectDir, 'AGENTS.md');
|
|
25
|
+
const previous = await readPiText(host.fs, path) ?? '';
|
|
26
|
+
const content = replaceManagedBlock(previous, 'pi-mcporter-guide', GUIDE.replaceAll('{{docsOrigin}}', origin));
|
|
27
|
+
const changed = content !== previous;
|
|
28
|
+
if (!context.dryRun && changed)
|
|
29
|
+
await applyPiChanges(host.fs, [{ path, content }]);
|
|
30
|
+
return { status: 'ok', changed: !context.dryRun && changed, message: context.dryRun ? 'Dry run: would write the Pi mcporter guide.' : 'Wrote the Pi mcporter guide.' };
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
//# sourceMappingURL=guide.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"guide.js","sourceRoot":"","sources":["../../../src/external/pi/guide.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AACpE,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACrE,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAE7D,MAAM,KAAK,GAAG;;;;;;;;;CASb,CAAC;AAEF,MAAM,CAAC,MAAM,gBAAgB,GAAsB;IAClD,KAAK,CAAC,OAAO,CAAC,MAAM,EAAE,OAAO,EAAE,QAAQ;QACtC,MAAM,OAAO,GAAG,MAAM,QAAQ,CAAC,OAAO,CAAC,KAAK,CAAiC,eAAe,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,OAAO,EAAE,CAAC;QACvH,IAAI,CAAC,OAAO;YAAE,MAAM,IAAI,eAAe,CAAC,iEAAiE,EAAE,aAAa,EAAE;gBACzH,MAAM,EAAE,6BAA6B;aACrC,CAAC,CAAC;QACH,MAAM,EAAC,MAAM,EAAC,GAAG,MAAM,OAAO,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;QACjD,MAAM,IAAI,GAAG,MAAM,aAAa,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;QACnD,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,UAAU,EAAE,WAAW,CAAC,CAAC;QAC9D,MAAM,QAAQ,GAAG,MAAM,UAAU,CAAC,IAAI,CAAC,EAAE,EAAE,IAAI,CAAC,IAAI,EAAE,CAAC;QACvD,MAAM,OAAO,GAAG,mBAAmB,CAAC,QAAQ,EAAE,mBAAmB,EAAE,KAAK,CAAC,UAAU,CAAC,gBAAgB,EAAE,MAAM,CAAC,CAAC,CAAC;QAC/G,MAAM,OAAO,GAAG,OAAO,KAAK,QAAQ,CAAC;QACrC,IAAI,CAAC,OAAO,CAAC,MAAM,IAAI,OAAO;YAAE,MAAM,cAAc,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC,EAAC,IAAI,EAAE,OAAO,EAAC,CAAC,CAAC,CAAC;QACjF,OAAO,EAAC,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC,OAAO,CAAC,MAAM,IAAI,OAAO,EAAE,OAAO,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,6CAA6C,CAAC,CAAC,CAAC,8BAA8B,EAAC,CAAC;IACtK,CAAC;CACD,CAAC"}
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
import { piManifest } from './manifest.ts';
|
|
2
|
+
export { piManifest };
|
|
3
|
+
declare const _default: {
|
|
4
|
+
id: string;
|
|
5
|
+
kind: "external/host";
|
|
6
|
+
manifest: {
|
|
7
|
+
schemaVersion: "1.0";
|
|
8
|
+
id: string;
|
|
9
|
+
name: string;
|
|
10
|
+
description: string;
|
|
11
|
+
category: "cli" | "ide-extension" | "ide-native";
|
|
12
|
+
website: string;
|
|
13
|
+
platforms: ("win32" | "darwin" | "linux" | "all")[];
|
|
14
|
+
configs: {
|
|
15
|
+
path: string;
|
|
16
|
+
format: "json" | "yaml" | "toml" | "jsonc";
|
|
17
|
+
scope: "global" | "project";
|
|
18
|
+
platform?: "win32" | "darwin" | "linux" | "all" | undefined;
|
|
19
|
+
mcpPath?: string | undefined;
|
|
20
|
+
}[];
|
|
21
|
+
mcp: {
|
|
22
|
+
supported: boolean;
|
|
23
|
+
transports: ("http" | "stdio" | "sse")[];
|
|
24
|
+
defaultServerName: string;
|
|
25
|
+
projectConfig: boolean;
|
|
26
|
+
envVarsInConfig: boolean;
|
|
27
|
+
options?: {
|
|
28
|
+
startupTimeout?: number | undefined;
|
|
29
|
+
toolTimeout?: number | undefined;
|
|
30
|
+
autoRestart?: boolean | undefined;
|
|
31
|
+
} | undefined;
|
|
32
|
+
};
|
|
33
|
+
hooks: {
|
|
34
|
+
supported: boolean;
|
|
35
|
+
events: ("session.start" | "session.end" | "prompt.submit" | "tool.before" | "tool.after" | "context.beforeCompact" | "context.afterCompact" | "permission.request" | "agent.stop" | "subagent.stop" | "notification")[];
|
|
36
|
+
nativeEventMap: Record<string, "session.start" | "session.end" | "prompt.submit" | "tool.before" | "tool.after" | "context.beforeCompact" | "context.afterCompact" | "permission.request" | "agent.stop" | "subagent.stop" | "notification">;
|
|
37
|
+
structuredInput: boolean;
|
|
38
|
+
canModify: boolean;
|
|
39
|
+
format?: "json" | "typescript" | "shell" | "python" | undefined;
|
|
40
|
+
trust?: {
|
|
41
|
+
step: string;
|
|
42
|
+
} | undefined;
|
|
43
|
+
};
|
|
44
|
+
plugins: {
|
|
45
|
+
supported: boolean;
|
|
46
|
+
format?: "typescript" | "python" | "javascript" | "lua" | undefined;
|
|
47
|
+
entryPoint?: string | undefined;
|
|
48
|
+
manifestFile?: string | undefined;
|
|
49
|
+
};
|
|
50
|
+
skills: {
|
|
51
|
+
supported: boolean;
|
|
52
|
+
format: "agents-md";
|
|
53
|
+
projectScoped: boolean;
|
|
54
|
+
globalPath?: string | undefined;
|
|
55
|
+
projectPath?: string | undefined;
|
|
56
|
+
};
|
|
57
|
+
detection: {
|
|
58
|
+
command?: string | undefined;
|
|
59
|
+
altCommands?: string[] | undefined;
|
|
60
|
+
configDir?: string | undefined;
|
|
61
|
+
binaryPath?: string | undefined;
|
|
62
|
+
versionArgs?: string[] | undefined;
|
|
63
|
+
versionRegex?: string | undefined;
|
|
64
|
+
platformPaths?: {
|
|
65
|
+
darwin?: {
|
|
66
|
+
binaryPath?: string | undefined;
|
|
67
|
+
configDir?: string | undefined;
|
|
68
|
+
} | undefined;
|
|
69
|
+
linux?: {
|
|
70
|
+
binaryPath?: string | undefined;
|
|
71
|
+
configDir?: string | undefined;
|
|
72
|
+
} | undefined;
|
|
73
|
+
win32?: {
|
|
74
|
+
binaryPath?: string | undefined;
|
|
75
|
+
configDir?: string | undefined;
|
|
76
|
+
} | undefined;
|
|
77
|
+
} | undefined;
|
|
78
|
+
extensionMatch?: {
|
|
79
|
+
dir: string;
|
|
80
|
+
prefixes: string[];
|
|
81
|
+
} | undefined;
|
|
82
|
+
};
|
|
83
|
+
integration: {
|
|
84
|
+
mcp?: {
|
|
85
|
+
installer?: string | undefined;
|
|
86
|
+
configTemplate?: Record<string, import("@vibesdotdev/kernel/bootstrap").JsonValue> | undefined;
|
|
87
|
+
} | undefined;
|
|
88
|
+
hooks?: {
|
|
89
|
+
defaultPromptPolicy: "default" | "none" | "custom-only";
|
|
90
|
+
installer?: string | undefined;
|
|
91
|
+
templates?: Partial<Record<"session.start" | "session.end" | "prompt.submit" | "tool.before" | "tool.after" | "context.beforeCompact" | "context.afterCompact" | "permission.request" | "agent.stop" | "subagent.stop" | "notification", string>> | undefined;
|
|
92
|
+
handlerOptions?: Partial<Record<"session.start" | "session.end" | "prompt.submit" | "tool.before" | "tool.after" | "context.beforeCompact" | "context.afterCompact" | "permission.request" | "agent.stop" | "subagent.stop" | "notification", Record<string, import("@vibesdotdev/kernel/bootstrap").JsonValue>>> | undefined;
|
|
93
|
+
hookAdapterId?: string | undefined;
|
|
94
|
+
workspaceRootEnv?: string | undefined;
|
|
95
|
+
} | undefined;
|
|
96
|
+
plugins?: {
|
|
97
|
+
installer?: string | undefined;
|
|
98
|
+
template?: string | undefined;
|
|
99
|
+
} | undefined;
|
|
100
|
+
presets?: {
|
|
101
|
+
available: string[];
|
|
102
|
+
default?: string | undefined;
|
|
103
|
+
} | undefined;
|
|
104
|
+
};
|
|
105
|
+
version: string;
|
|
106
|
+
hostAliases?: string[] | undefined;
|
|
107
|
+
shortName?: string | undefined;
|
|
108
|
+
assets?: {
|
|
109
|
+
hooks?: string | undefined;
|
|
110
|
+
plugins?: string | undefined;
|
|
111
|
+
commands?: string | undefined;
|
|
112
|
+
agents?: string | undefined;
|
|
113
|
+
templates?: string | undefined;
|
|
114
|
+
skills?: string | undefined;
|
|
115
|
+
settings?: string | undefined;
|
|
116
|
+
globalSettings?: string | undefined;
|
|
117
|
+
} | undefined;
|
|
118
|
+
launch?: {
|
|
119
|
+
defaultMode: string;
|
|
120
|
+
modes: Record<string, string[] | {
|
|
121
|
+
argv: (string | {
|
|
122
|
+
when: string;
|
|
123
|
+
args: string[];
|
|
124
|
+
})[];
|
|
125
|
+
stdin: "null" | "inherit";
|
|
126
|
+
command?: string | undefined;
|
|
127
|
+
structuredOutput?: {
|
|
128
|
+
field: string;
|
|
129
|
+
schemaTarget?: "draft-2020-12" | "draft-7" | undefined;
|
|
130
|
+
wrap?: string | undefined;
|
|
131
|
+
} | undefined;
|
|
132
|
+
}>;
|
|
133
|
+
} | undefined;
|
|
134
|
+
metadata?: Record<string, unknown> | undefined;
|
|
135
|
+
};
|
|
136
|
+
adapters: {
|
|
137
|
+
adapter: string;
|
|
138
|
+
supported: boolean;
|
|
139
|
+
config: Record<string, unknown>;
|
|
140
|
+
}[];
|
|
141
|
+
name?: string | undefined;
|
|
142
|
+
description?: string | undefined;
|
|
143
|
+
tags?: string[] | undefined;
|
|
144
|
+
hardware?: string[] | undefined;
|
|
145
|
+
enabled?: boolean | undefined;
|
|
146
|
+
priority?: number | undefined;
|
|
147
|
+
capabilityId?: string | undefined;
|
|
148
|
+
requiredContext?: string[] | undefined;
|
|
149
|
+
optionalContext?: string[] | undefined;
|
|
150
|
+
config?: unknown;
|
|
151
|
+
retention?: string | {
|
|
152
|
+
reason: string;
|
|
153
|
+
maxAgeDays?: number | undefined;
|
|
154
|
+
maxEntries?: number | undefined;
|
|
155
|
+
maxBytes?: number | undefined;
|
|
156
|
+
cascadeFrom?: string | undefined;
|
|
157
|
+
ageField?: string | undefined;
|
|
158
|
+
enforcedBy?: string | undefined;
|
|
159
|
+
} | undefined;
|
|
160
|
+
};
|
|
161
|
+
export default _default;
|
|
162
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/external/pi/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,OAAO,EAAE,UAAU,EAAE,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACtB,wBAEG"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { externalHostDescriptorFromManifest } from '@vibesdotdev/external';
|
|
2
|
+
import { piManifest } from "./manifest.js";
|
|
3
|
+
export { piManifest };
|
|
4
|
+
export default externalHostDescriptorFromManifest(piManifest, {
|
|
5
|
+
tags: ['external', 'host', 'dev', 'acp', 'agent-pack']
|
|
6
|
+
});
|
|
7
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/external/pi/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kCAAkC,EAAE,MAAM,uBAAuB,CAAC;AAC3E,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,OAAO,EAAE,UAAU,EAAE,CAAC;AACtB,eAAe,kCAAkC,CAAC,UAAU,EAAE;IAC7D,IAAI,EAAE,CAAC,UAAU,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,YAAY,CAAC;CACtD,CAAC,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { ExecutionContext, ExternalOperation, ExternalRuntimeServices } from '@vibesdotdev/external';
|
|
2
|
+
import { type PreflightCheckId } from '../../harness/preflight.ts';
|
|
3
|
+
/** Parse `--skip-check` values, refusing unknown check ids. */
|
|
4
|
+
export declare function parsePiSkipChecks(value: unknown): PreflightCheckId[];
|
|
5
|
+
/**
|
|
6
|
+
* The scope's root: the operation's project directory, or for a global install
|
|
7
|
+
* the runtime's user home (`paths/roots`).
|
|
8
|
+
*/
|
|
9
|
+
export declare function piScopeRoots(context: ExecutionContext, services: ExternalRuntimeServices): {
|
|
10
|
+
cwd: string;
|
|
11
|
+
} | {
|
|
12
|
+
home: string;
|
|
13
|
+
};
|
|
14
|
+
export declare const piInstallOperation: ExternalOperation;
|
|
15
|
+
export declare const piRepairOperation: ExternalOperation;
|
|
16
|
+
export declare const piUpgradeOperation: ExternalOperation;
|
|
17
|
+
export declare const piStatusOperation: ExternalOperation;
|
|
18
|
+
export declare const piUninstallOperation: ExternalOperation;
|
|
19
|
+
//# sourceMappingURL=installer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"installer.d.ts","sourceRoot":"","sources":["../../../src/external/pi/installer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACZ,gBAAgB,EAChB,iBAAiB,EAGjB,uBAAuB,EACtB,MAAM,uBAAuB,CAAC;AAG/B,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAanE,+DAA+D;AAC/D,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,OAAO,GAAG,gBAAgB,EAAE,CAMpE;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAC3B,OAAO,EAAE,gBAAgB,EACzB,QAAQ,EAAE,uBAAuB,GAC/B;IAAE,GAAG,EAAE,MAAM,CAAA;CAAE,GAAG;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,CAIpC;AAmCD,eAAO,MAAM,kBAAkB,EAAE,iBAIhC,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,iBAI/B,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,iBAIhC,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,iBAW/B,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,iBAIlC,CAAC"}
|