@pipod/cli 0.1.8 → 0.1.10
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/dist/cli.js +19 -9
- package/dist/cli.js.map +1 -1
- package/docs/config-simplification.md +3 -2
- package/man/pipod-config.5 +5 -1
- package/man/pipod-config.5.md +4 -0
- package/man/pipod.1 +2 -2
- package/man/pipod.1.md +1 -1
- package/package.json +1 -1
- package/templates/user-config.jsonc +5 -1
package/dist/cli.js
CHANGED
|
@@ -583,7 +583,7 @@ import * as path5 from "path";
|
|
|
583
583
|
import * as fs from "fs";
|
|
584
584
|
import * as path from "path";
|
|
585
585
|
var HOST_PI_AGENT_SUBPATH = path.join(".pi", "agent");
|
|
586
|
-
var HOST_COUPLED_SETTINGS_KEYS = ["hooks", "mcpServers", "deviceId"];
|
|
586
|
+
var HOST_COUPLED_SETTINGS_KEYS = ["hooks", "mcpServers", "deviceId", "trackingId"];
|
|
587
587
|
var DEFAULT_HOST_CONFIG = {
|
|
588
588
|
settings: true,
|
|
589
589
|
packages: true
|
|
@@ -2349,7 +2349,7 @@ function retiredLocalKeysFound(raw) {
|
|
|
2349
2349
|
return found;
|
|
2350
2350
|
}
|
|
2351
2351
|
var CLIENT_ONLY_TOP_KEYS = ["$schema", "secretResolver"];
|
|
2352
|
-
var CLIENT_ONLY_PI_KEYS = ["chords", "sessionNaming"];
|
|
2352
|
+
var CLIENT_ONLY_PI_KEYS = ["chords", "sessionNaming", "podExtensions"];
|
|
2353
2353
|
function nonBundleKeysFound(config) {
|
|
2354
2354
|
const found = outgoingStrippedKeysFound(config);
|
|
2355
2355
|
for (const key of CLIENT_ONLY_TOP_KEYS) {
|
|
@@ -2442,7 +2442,8 @@ var DEFAULT_CONFIG = {
|
|
|
2442
2442
|
args: [],
|
|
2443
2443
|
hostConfig: DEFAULT_HOST_CONFIG,
|
|
2444
2444
|
chords: { enabled: true, prefix: DEFAULT_CHORD_PREFIX, bindings: DEFAULT_CHORD_BINDINGS },
|
|
2445
|
-
sessionNaming: "auto"
|
|
2445
|
+
sessionNaming: "auto",
|
|
2446
|
+
podExtensions: "ask"
|
|
2446
2447
|
},
|
|
2447
2448
|
idleTimeoutMinutes: 15,
|
|
2448
2449
|
archiveAfterMinutes: 60,
|
|
@@ -2746,7 +2747,8 @@ function validateConfig(raw) {
|
|
|
2746
2747
|
"args",
|
|
2747
2748
|
"hostConfig",
|
|
2748
2749
|
"chords",
|
|
2749
|
-
"sessionNaming"
|
|
2750
|
+
"sessionNaming",
|
|
2751
|
+
"podExtensions"
|
|
2750
2752
|
]);
|
|
2751
2753
|
const hostConfigRaw = v.object("pi.hostConfig", piRaw["hostConfig"]);
|
|
2752
2754
|
v.warnUnknownKeys("pi.hostConfig", hostConfigRaw, [
|
|
@@ -2810,6 +2812,12 @@ function validateConfig(raw) {
|
|
|
2810
2812
|
piRaw["sessionNaming"],
|
|
2811
2813
|
["auto", "off"],
|
|
2812
2814
|
d.pi.sessionNaming
|
|
2815
|
+
),
|
|
2816
|
+
podExtensions: v.enumValue(
|
|
2817
|
+
"pi.podExtensions",
|
|
2818
|
+
piRaw["podExtensions"],
|
|
2819
|
+
["ask", "run"],
|
|
2820
|
+
d.pi.podExtensions
|
|
2813
2821
|
)
|
|
2814
2822
|
},
|
|
2815
2823
|
// 0 is meaningful here (auto-stop off), so the floor is 0 rather than 1.
|
|
@@ -3694,7 +3702,7 @@ function resolveLaunchTemplateRef(flags, layers) {
|
|
|
3694
3702
|
function machineClientConfig(raw) {
|
|
3695
3703
|
const pi = isPlainObjectValue(raw["pi"]) ? raw["pi"] : {};
|
|
3696
3704
|
const clientPi = Object.fromEntries(
|
|
3697
|
-
Object.entries(pi).filter(([key]) =>
|
|
3705
|
+
Object.entries(pi).filter(([key]) => CLIENT_ONLY_PI_KEYS.includes(key))
|
|
3698
3706
|
);
|
|
3699
3707
|
return Object.keys(clientPi).length > 0 ? { pi: clientPi } : {};
|
|
3700
3708
|
}
|
|
@@ -4176,7 +4184,6 @@ function settingsBundle(settings) {
|
|
|
4176
4184
|
return { ...settings, piFiles: settings.piFiles ?? {} };
|
|
4177
4185
|
}
|
|
4178
4186
|
var CLIENT_ONLY_TOP_KEYS2 = ["$schema", "template", "secretResolver"];
|
|
4179
|
-
var CLIENT_ONLY_PI_KEYS2 = ["chords", "sessionNaming"];
|
|
4180
4187
|
function isPlainObject2(value) {
|
|
4181
4188
|
return value !== null && typeof value === "object" && !Array.isArray(value);
|
|
4182
4189
|
}
|
|
@@ -4194,7 +4201,7 @@ function mergePulledConfig(existing, pulled) {
|
|
|
4194
4201
|
..."template" in top ? { template: top["template"] } : {},
|
|
4195
4202
|
..."secretResolver" in top ? { secretResolver: top["secretResolver"] } : {}
|
|
4196
4203
|
};
|
|
4197
|
-
const clientPi = isPlainObject2(existing["pi"]) ? pick(existing["pi"],
|
|
4204
|
+
const clientPi = isPlainObject2(existing["pi"]) ? pick(existing["pi"], CLIENT_ONLY_PI_KEYS) : {};
|
|
4198
4205
|
const pi = { ...isPlainObject2(pod["pi"]) ? pod["pi"] : {}, ...clientPi };
|
|
4199
4206
|
if (Object.keys(pi).length > 0) next["pi"] = pi;
|
|
4200
4207
|
return next;
|
|
@@ -7456,6 +7463,7 @@ function attestedPackages(piSettings) {
|
|
|
7456
7463
|
return { specs, refused };
|
|
7457
7464
|
}
|
|
7458
7465
|
async function trustAttestedPackages(specs, opts) {
|
|
7466
|
+
if (opts.policy === "run") return { trusted: specs, declined: [] };
|
|
7459
7467
|
const file = path17.join(opts.cacheRoot, "trusted-extensions.json");
|
|
7460
7468
|
const key = (spec) => `${spec.name}@${spec.version}`;
|
|
7461
7469
|
let known = [];
|
|
@@ -14334,6 +14342,7 @@ async function runAccountInteractive(opts) {
|
|
|
14334
14342
|
}
|
|
14335
14343
|
const { trusted, declined } = await trustAttestedPackages(attested.specs, {
|
|
14336
14344
|
cacheRoot,
|
|
14345
|
+
policy: context.config.pi.podExtensions,
|
|
14337
14346
|
ask: (question) => confirm(question, { nonInteractiveDefault: false })
|
|
14338
14347
|
});
|
|
14339
14348
|
if (declined.length > 0) {
|
|
@@ -17955,12 +17964,13 @@ async function removeCredential(args, flags) {
|
|
|
17955
17964
|
});
|
|
17956
17965
|
}
|
|
17957
17966
|
const approved = await confirm(
|
|
17958
|
-
`Remove the saved ${providerId} sign-in? Pods using it
|
|
17967
|
+
`Remove the saved ${providerId} sign-in? Pods stop using it.`,
|
|
17959
17968
|
{ nonInteractiveDefault: false, assumeYes: yes }
|
|
17960
17969
|
);
|
|
17961
17970
|
if (!approved) throw new CancelledError("Credential removal cancelled");
|
|
17962
17971
|
await clientFor(flags).deleteModelCredential(providerId);
|
|
17963
|
-
info(`removed the saved ${providerId} sign-in`);
|
|
17972
|
+
info(`removed the saved ${providerId} sign-in; pods stop using it`);
|
|
17973
|
+
info(`${providerId} still accepts it until you revoke it there; do that if a pod may have exposed it`);
|
|
17964
17974
|
return 0;
|
|
17965
17975
|
}
|
|
17966
17976
|
function formatStatus(status) {
|