@usepowerplant/cli 0.4.43 → 0.4.44
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/main.js +51 -10
- package/dist/menubar/Powerplant.app.zip +0 -0
- package/package.json +1 -1
package/dist/main.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="e21c9e8f-a5a6-561f-b7c6-99dd92ba2436")}catch(e){}}();
|
|
3
3
|
import { createRequire as __cliCreateRequire } from 'node:module';
|
|
4
4
|
const require = __cliCreateRequire(import.meta.url);
|
|
5
5
|
var __create = Object.create;
|
|
@@ -61367,8 +61367,16 @@ function latest(a, b2) {
|
|
|
61367
61367
|
}
|
|
61368
61368
|
|
|
61369
61369
|
// ../core/src/onboarding.ts
|
|
61370
|
+
var SYNC_WINDOW_MS = 7 * 24 * 60 * 60 * 1e3;
|
|
61370
61371
|
var SAME_HOUR_MS = 60 * 60 * 1e3;
|
|
61371
61372
|
function describeSyncSignals(member, now, noUpload = "no sessions uploaded yet") {
|
|
61373
|
+
return syncSignalsLine(
|
|
61374
|
+
member,
|
|
61375
|
+
now,
|
|
61376
|
+
(age) => age === null ? noUpload : `last uploaded session ${age}`
|
|
61377
|
+
);
|
|
61378
|
+
}
|
|
61379
|
+
function syncSignalsLine(member, now, sessionClause) {
|
|
61372
61380
|
const session = member.lastSessionActivityAt;
|
|
61373
61381
|
const poll = member.lastCheckedInAt;
|
|
61374
61382
|
const error63 = member.lastSyncErrorAt;
|
|
@@ -61376,7 +61384,7 @@ function describeSyncSignals(member, now, noUpload = "no sessions uploaded yet")
|
|
|
61376
61384
|
if (session === null && poll === null && error63 === null) return null;
|
|
61377
61385
|
const age = (at) => describeDataAge(new Date(at), now);
|
|
61378
61386
|
const apart = (a, b2) => b2 === null || Math.abs(Date.parse(a) - Date.parse(b2)) > SAME_HOUR_MS;
|
|
61379
|
-
const parts = [session === null ?
|
|
61387
|
+
const parts = [sessionClause(session === null ? null : age(session))];
|
|
61380
61388
|
if (error63 !== null) parts.push(`reported sync error ${age(error63)}`);
|
|
61381
61389
|
if (paused) parts.push("syncing paused");
|
|
61382
61390
|
const pollSays = error63 !== null ? apart(poll ?? error63, error63) : paused || apart(poll ?? "", session);
|
|
@@ -61520,6 +61528,15 @@ var recentSessionCursorSchema = external_exports.object({
|
|
|
61520
61528
|
id: external_exports.uuid()
|
|
61521
61529
|
});
|
|
61522
61530
|
|
|
61531
|
+
// ../core/src/sessionVisibility.ts
|
|
61532
|
+
var VISIBILITY_LEVELS = ["metadata", "full"];
|
|
61533
|
+
|
|
61534
|
+
// ../core/src/sessionVisibilitySetting.ts
|
|
61535
|
+
var sessionVisibilitySettingSchema = external_exports.enum(VISIBILITY_LEVELS);
|
|
61536
|
+
function describeOwnSessionVisibility(setting) {
|
|
61537
|
+
return setting === "full" ? "Your new sessions share in full with teammates who can read the repo." : "Your new sessions share as metadata.";
|
|
61538
|
+
}
|
|
61539
|
+
|
|
61523
61540
|
// ../../node_modules/.pnpm/@sentry+core@10.78.0/node_modules/@sentry/core/build/esm/debug-build.js
|
|
61524
61541
|
var DEBUG_BUILD = typeof __SENTRY_DEBUG__ === "undefined" || __SENTRY_DEBUG__;
|
|
61525
61542
|
|
|
@@ -88454,7 +88471,7 @@ function _init2(options = {}, getDefaultIntegrationsImpl) {
|
|
|
88454
88471
|
import tls2 from "node:tls";
|
|
88455
88472
|
var import_undici = __toESM(require_undici(), 1);
|
|
88456
88473
|
var CLI_VERSION_HEADER = "x-powerplant-cli-version";
|
|
88457
|
-
var cliVersion = true ? "0.4.
|
|
88474
|
+
var cliVersion = true ? "0.4.44" : "0.0.0-checkout";
|
|
88458
88475
|
function cliVersionHeaders() {
|
|
88459
88476
|
return { [CLI_VERSION_HEADER]: cliVersion, "user-agent": `powerplant-cli/${cliVersion}` };
|
|
88460
88477
|
}
|
|
@@ -107426,7 +107443,7 @@ async function confirmResume(deps, output2) {
|
|
|
107426
107443
|
var MACOS_BLOCKED_FOLDER_REMEDY = "To allow it, open System Settings > Privacy & Security > Files and Folders, enable the folder for node, then run `powerplant init`.";
|
|
107427
107444
|
|
|
107428
107445
|
// src/version.ts
|
|
107429
|
-
var CLI_VERSION = true ? "0.4.
|
|
107446
|
+
var CLI_VERSION = true ? "0.4.44" : "0.0.0-checkout";
|
|
107430
107447
|
var CLI_RELEASE_BUILD = true ? true : false;
|
|
107431
107448
|
var CLI_DEVELOPMENT_COPY = false;
|
|
107432
107449
|
function updateRefusal(tarball, developmentCopy = CLI_DEVELOPMENT_COPY) {
|
|
@@ -107542,6 +107559,7 @@ function machineBlock(i, syncing) {
|
|
|
107542
107559
|
);
|
|
107543
107560
|
details.push(signals ?? "No sync has run since background sync started.");
|
|
107544
107561
|
}
|
|
107562
|
+
if (i.sessionVisibility) details.push(i.sessionVisibility.line);
|
|
107545
107563
|
return [block(line, ...details)];
|
|
107546
107564
|
}
|
|
107547
107565
|
function warnings(i) {
|
|
@@ -107655,7 +107673,8 @@ function statusJson(i) {
|
|
|
107655
107673
|
automaticUpdates: automaticUpdatesChoice(i.control),
|
|
107656
107674
|
pausedAt: i.control.pausedAt ?? null,
|
|
107657
107675
|
// The same saved checks the human rendering reads, each with when it ran.
|
|
107658
|
-
mcpConnections: i.connections
|
|
107676
|
+
mcpConnections: i.connections,
|
|
107677
|
+
sessionVisibility: i.sessionVisibility ?? null
|
|
107659
107678
|
};
|
|
107660
107679
|
}
|
|
107661
107680
|
function supportedFlag(cliVersion2, oldestSupportedVersion) {
|
|
@@ -108176,6 +108195,26 @@ function runResumeSession(source, sessionId, deps = {}) {
|
|
|
108176
108195
|
}
|
|
108177
108196
|
}
|
|
108178
108197
|
|
|
108198
|
+
// src/sessionVisibilityLine.ts
|
|
108199
|
+
var FETCH_TIMEOUT_MS2 = 3e3;
|
|
108200
|
+
var workspacesAnswer = external_exports.object({
|
|
108201
|
+
data: external_exports.object({ sessionVisibility: sessionVisibilitySettingSchema.optional().catch(void 0) })
|
|
108202
|
+
});
|
|
108203
|
+
async function readSessionVisibilityLine(credentials, fetchImpl = fetch) {
|
|
108204
|
+
if (credentials === null) return null;
|
|
108205
|
+
try {
|
|
108206
|
+
const response = await fetchImpl(`${credentials.apiUrl}/api/collector/workspaces`, {
|
|
108207
|
+
headers: { authorization: `Bearer ${credentials.token}`, ...cliVersionHeaders() },
|
|
108208
|
+
signal: AbortSignal.timeout(FETCH_TIMEOUT_MS2)
|
|
108209
|
+
});
|
|
108210
|
+
if (!response.ok) return null;
|
|
108211
|
+
const setting = workspacesAnswer.safeParse(await response.json()).data?.data.sessionVisibility;
|
|
108212
|
+
return setting === void 0 ? null : { setting, line: describeOwnSessionVisibility(setting) };
|
|
108213
|
+
} catch {
|
|
108214
|
+
return null;
|
|
108215
|
+
}
|
|
108216
|
+
}
|
|
108217
|
+
|
|
108179
108218
|
// src/installProgress.ts
|
|
108180
108219
|
function installProgress(writer, update) {
|
|
108181
108220
|
const show = () => update ? () => {
|
|
@@ -108638,7 +108677,7 @@ var workspaceSchema = external_exports.object({
|
|
|
108638
108677
|
role: external_exports.string().min(1),
|
|
108639
108678
|
active: external_exports.boolean()
|
|
108640
108679
|
});
|
|
108641
|
-
var
|
|
108680
|
+
var FETCH_TIMEOUT_MS3 = 1e4;
|
|
108642
108681
|
async function callApi(credentials, path70, init3, fetchImpl) {
|
|
108643
108682
|
let response;
|
|
108644
108683
|
try {
|
|
@@ -108649,7 +108688,7 @@ async function callApi(credentials, path70, init3, fetchImpl) {
|
|
|
108649
108688
|
"content-type": "application/json",
|
|
108650
108689
|
...cliVersionHeaders()
|
|
108651
108690
|
},
|
|
108652
|
-
signal: AbortSignal.timeout(
|
|
108691
|
+
signal: AbortSignal.timeout(FETCH_TIMEOUT_MS3)
|
|
108653
108692
|
});
|
|
108654
108693
|
} catch (error63) {
|
|
108655
108694
|
const detail = error63 instanceof Error ? error63.message : String(error63);
|
|
@@ -109192,8 +109231,9 @@ The access you granted these agents stays on your Powerplant account until you r
|
|
|
109192
109231
|
const service2 = readServiceSafelyAsync(copy.service);
|
|
109193
109232
|
const stored = loadCredentialsSafely(config2);
|
|
109194
109233
|
const credentials = stored.credentials;
|
|
109195
|
-
const [[latestVersion, oldestSupportedVersion], protectedSessions, serviceRead, moving] = await Promise.all([
|
|
109234
|
+
const [[latestVersion, oldestSupportedVersion], sessionVisibility, protectedSessions, serviceRead, moving] = await Promise.all([
|
|
109196
109235
|
fetchVersionFacts(config2.appEnv, credentials, CLI_PACKAGE_NAME),
|
|
109236
|
+
readSessionVisibilityLine(credentials),
|
|
109197
109237
|
process.platform === "darwin" && credentials ? findRecentProtectedSessions({
|
|
109198
109238
|
environment: { allowedProtectedRoots: credentials.repoDiscoveryRoots ?? [] }
|
|
109199
109239
|
}).then(
|
|
@@ -109202,7 +109242,7 @@ The access you granted these agents stays on your Powerplant account until you r
|
|
|
109202
109242
|
service2,
|
|
109203
109243
|
moveToInstalledCopy(config2, copy)
|
|
109204
109244
|
]);
|
|
109205
|
-
return { stored, latestVersion, oldestSupportedVersion, protectedSessions, serviceRead, moving };
|
|
109245
|
+
return { stored, latestVersion, oldestSupportedVersion, sessionVisibility, protectedSessions, serviceRead, moving };
|
|
109206
109246
|
};
|
|
109207
109247
|
const found = values.json ? await read2() : await terminal.command.activity("Checking sync status\u2026", read2);
|
|
109208
109248
|
const inputs = {
|
|
@@ -109217,6 +109257,7 @@ The access you granted these agents stays on your Powerplant account until you r
|
|
|
109217
109257
|
oldestSupportedVersion: found.oldestSupportedVersion,
|
|
109218
109258
|
protectedSessions: found.protectedSessions,
|
|
109219
109259
|
moveToInstalledCopy: found.moving,
|
|
109260
|
+
sessionVisibility: found.sessionVisibility,
|
|
109220
109261
|
connections: readHarnessConnections(config2.appEnv, realReadTextFile),
|
|
109221
109262
|
...readMcpPreferencesForMenu(config2.appEnv),
|
|
109222
109263
|
now: Date.now()
|
|
@@ -109814,4 +109855,4 @@ undici/lib/web/websocket/frame.js:
|
|
|
109814
109855
|
(*! ws. MIT License. Einar Otto Stangvik <einaros@gmail.com> *)
|
|
109815
109856
|
*/
|
|
109816
109857
|
|
|
109817
|
-
//# debugId=
|
|
109858
|
+
//# debugId=e21c9e8f-a5a6-561f-b7c6-99dd92ba2436
|
|
Binary file
|