usebeeline 0.1.249-rc.1 → 0.1.249-rc.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/usebeeline.mjs +175 -161
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
## What you can do
|
|
19
19
|
|
|
20
20
|
- **Work with shared context.** One Room for your people and your coding agents. Everyone sees the same threads, tasks and decisions.
|
|
21
|
-
- **Resolve blocks explicitly.** Answers leave your Tasks list immediately; the
|
|
21
|
+
- **Resolve blocks explicitly.** Answers leave your Tasks list immediately; any member of the thread, person or agent, clears the block when work can continue. Agents see their open blocks on every turn.
|
|
22
22
|
- **See work as it happens.** Threads show “Ruby is working” until Ruby replies; Stop ends the line and the agent's run, and a failed Stop says so. Completed steps appear live in the existing fold; a lost host connection is shown in the thread.
|
|
23
23
|
- **Bring any agent.** Connect the coding agent you already run and tag it like a teammate.
|
|
24
24
|
- **Set up with one prompt.** Paste a single line into your agent and it joins your Workspace.
|
package/dist/usebeeline.mjs
CHANGED
|
@@ -59,141 +59,6 @@ var init_update_progress = __esm({
|
|
|
59
59
|
}
|
|
60
60
|
});
|
|
61
61
|
|
|
62
|
-
// apps/body/dist/self-update-manifest.js
|
|
63
|
-
function resolveManifestUrl(env = process.env, channel = env.BEELINE_RELEASE_CHANNEL?.trim() || "latest") {
|
|
64
|
-
const override = env.BEELINE_UPDATE_MANIFEST_URL?.trim();
|
|
65
|
-
if (override)
|
|
66
|
-
return override;
|
|
67
|
-
if (!["latest", "next"].includes(channel))
|
|
68
|
-
throw new Error(`invalid helper release channel: ${channel}`);
|
|
69
|
-
return channel === "next" ? "https://usebeeline.app/dl/next/manifest.json" : DEFAULT_UPDATE_MANIFEST_URL;
|
|
70
|
-
}
|
|
71
|
-
function parseUpdateManifest(raw, platform) {
|
|
72
|
-
let parsed;
|
|
73
|
-
try {
|
|
74
|
-
parsed = JSON.parse(raw);
|
|
75
|
-
} catch (error) {
|
|
76
|
-
throw new Error(`update manifest is not valid JSON: ${error instanceof Error ? error.message : String(error)}`);
|
|
77
|
-
}
|
|
78
|
-
if (typeof parsed !== "object" || parsed === null) {
|
|
79
|
-
throw new Error("update manifest is not an object");
|
|
80
|
-
}
|
|
81
|
-
const manifest = parsed;
|
|
82
|
-
const bundles = manifest.bundles;
|
|
83
|
-
if (typeof bundles !== "object" || bundles === null) {
|
|
84
|
-
throw new Error("update manifest has no bundles table");
|
|
85
|
-
}
|
|
86
|
-
const entry = bundles[platform];
|
|
87
|
-
if (typeof entry !== "object" || entry === null) {
|
|
88
|
-
throw new Error(`update manifest has no bundle for platform ${platform}`);
|
|
89
|
-
}
|
|
90
|
-
const bundle = entry;
|
|
91
|
-
const file = typeof bundle.file === "string" ? bundle.file : "";
|
|
92
|
-
const sha256 = typeof bundle.sha256 === "string" ? bundle.sha256.toLowerCase() : "";
|
|
93
|
-
if (!file || !/^[a-z0-9][a-z0-9._-]*$/i.test(file)) {
|
|
94
|
-
throw new Error(`update manifest names an unusable bundle file: ${JSON.stringify(bundle.file)}`);
|
|
95
|
-
}
|
|
96
|
-
if (!/^[0-9a-f]{64}$/.test(sha256)) {
|
|
97
|
-
throw new Error(`update manifest carries no usable sha256 for ${platform}`);
|
|
98
|
-
}
|
|
99
|
-
const sourceCommit = typeof bundle.commit === "string" && bundle.commit ? bundle.commit : typeof manifest.sourceCommit === "string" ? manifest.sourceCommit : void 0;
|
|
100
|
-
const version = typeof bundle.version === "string" && bundle.version ? bundle.version : typeof manifest.version === "string" ? manifest.version : void 0;
|
|
101
|
-
return {
|
|
102
|
-
schemaVersion: typeof manifest.schemaVersion === "number" ? manifest.schemaVersion : 1,
|
|
103
|
-
...sourceCommit ? { sourceCommit } : {},
|
|
104
|
-
...version ? { version } : {},
|
|
105
|
-
bundles,
|
|
106
|
-
bundle: {
|
|
107
|
-
file,
|
|
108
|
-
sha256,
|
|
109
|
-
...typeof bundle.bytes === "number" ? { bytes: bundle.bytes } : {},
|
|
110
|
-
...sourceCommit ? { commit: sourceCommit } : {},
|
|
111
|
-
...version ? { version } : {},
|
|
112
|
-
...typeof bundle.node === "string" ? { node: bundle.node } : {}
|
|
113
|
-
}
|
|
114
|
-
};
|
|
115
|
-
}
|
|
116
|
-
function compareBundleIdentity(installed, published) {
|
|
117
|
-
if (installed?.version && published.version && installed.version !== published.version) {
|
|
118
|
-
const installedNewer = versionAtLeast(installed.version, published.version);
|
|
119
|
-
const publishedNewer = versionAtLeast(published.version, installed.version);
|
|
120
|
-
if (installedNewer && !publishedNewer)
|
|
121
|
-
return { kind: "current" };
|
|
122
|
-
if (publishedNewer && !installedNewer)
|
|
123
|
-
return { kind: "update-available", published };
|
|
124
|
-
}
|
|
125
|
-
if (installed?.commit && published.commit) {
|
|
126
|
-
if (installed.commit === published.commit)
|
|
127
|
-
return { kind: "current" };
|
|
128
|
-
return { kind: "update-available", published };
|
|
129
|
-
}
|
|
130
|
-
if (installed?.version && published.version) {
|
|
131
|
-
const ordering = compareVersions(installed.version, published.version);
|
|
132
|
-
if (ordering > 0)
|
|
133
|
-
return { kind: "current" };
|
|
134
|
-
if (ordering < 0)
|
|
135
|
-
return { kind: "update-available", published };
|
|
136
|
-
if (installed.commit && published.commit)
|
|
137
|
-
return { kind: "current" };
|
|
138
|
-
return { kind: "current" };
|
|
139
|
-
}
|
|
140
|
-
const missing = [
|
|
141
|
-
...installed?.commit || installed?.version ? [] : ["installed identity"],
|
|
142
|
-
...published.commit || published.version ? [] : ["published identity"]
|
|
143
|
-
];
|
|
144
|
-
return {
|
|
145
|
-
kind: "indeterminate",
|
|
146
|
-
reason: `cannot compare: ${missing.join(" and ")} unknown`
|
|
147
|
-
};
|
|
148
|
-
}
|
|
149
|
-
function compareVersions(a, b) {
|
|
150
|
-
const parse = (value) => {
|
|
151
|
-
const parts = value.split(/[.+-]/).filter(Boolean);
|
|
152
|
-
if (parts.length === 0)
|
|
153
|
-
return void 0;
|
|
154
|
-
return parts.map((part) => /^\d+$/.test(part) ? Number(part) : part);
|
|
155
|
-
};
|
|
156
|
-
const left = parse(a);
|
|
157
|
-
const right = parse(b);
|
|
158
|
-
if (!left || !right)
|
|
159
|
-
return a === b ? 0 : a > b ? 1 : -1;
|
|
160
|
-
const length = Math.max(left.length, right.length);
|
|
161
|
-
for (let index = 0; index < length; index += 1) {
|
|
162
|
-
const l = left[index];
|
|
163
|
-
const r = right[index];
|
|
164
|
-
if (l === void 0)
|
|
165
|
-
return -1;
|
|
166
|
-
if (r === void 0)
|
|
167
|
-
return 1;
|
|
168
|
-
if (l === r)
|
|
169
|
-
continue;
|
|
170
|
-
if (typeof l === "number" && typeof r === "number")
|
|
171
|
-
return l > r ? 1 : -1;
|
|
172
|
-
return String(l) > String(r) ? 1 : -1;
|
|
173
|
-
}
|
|
174
|
-
return 0;
|
|
175
|
-
}
|
|
176
|
-
function versionAtLeast(actual, minimum) {
|
|
177
|
-
const parse = (value) => {
|
|
178
|
-
const match = /^v?(\d+)\.(\d+)\.(\d+)(?:-rc\.(\d+))?$/.exec(value);
|
|
179
|
-
return match ? [...match.slice(1, 4).map(Number), match[4] === void 0 ? Infinity : Number(match[4])] : void 0;
|
|
180
|
-
};
|
|
181
|
-
const left = parse(actual), right = parse(minimum);
|
|
182
|
-
if (!left || !right)
|
|
183
|
-
return false;
|
|
184
|
-
for (let index = 0; index < 4; index++)
|
|
185
|
-
if (left[index] !== right[index])
|
|
186
|
-
return left[index] > right[index];
|
|
187
|
-
return true;
|
|
188
|
-
}
|
|
189
|
-
var DEFAULT_UPDATE_MANIFEST_URL;
|
|
190
|
-
var init_self_update_manifest = __esm({
|
|
191
|
-
"apps/body/dist/self-update-manifest.js"() {
|
|
192
|
-
"use strict";
|
|
193
|
-
DEFAULT_UPDATE_MANIFEST_URL = "https://usebeeline.app/dl/manifest.json";
|
|
194
|
-
}
|
|
195
|
-
});
|
|
196
|
-
|
|
197
62
|
// apps/body/dist/wait.js
|
|
198
63
|
import { spawn } from "node:child_process";
|
|
199
64
|
import { createHash } from "node:crypto";
|
|
@@ -649,7 +514,7 @@ async function downloadBytes(url, fetchImpl = fetch, options = {}) {
|
|
|
649
514
|
const report = options.report ?? progress;
|
|
650
515
|
let step = `network DNS/connect/headers ${url}`;
|
|
651
516
|
try {
|
|
652
|
-
const response = await ask({ url, fetch: fetchImpl });
|
|
517
|
+
const response = await ask({ url, fetch: fetchImpl }, options.request);
|
|
653
518
|
if (!response.ok)
|
|
654
519
|
throw new Error(`HTTP ${response.status}`);
|
|
655
520
|
if (!response.body)
|
|
@@ -736,6 +601,152 @@ var init_lifecycle_test_guard = __esm({
|
|
|
736
601
|
}
|
|
737
602
|
});
|
|
738
603
|
|
|
604
|
+
// apps/body/dist/self-update-manifest.js
|
|
605
|
+
async function readChannelVersion(channel, fetchImpl, signal) {
|
|
606
|
+
if (channel !== "latest" && channel !== "next")
|
|
607
|
+
throw new Error(`invalid helper release channel: ${channel}`);
|
|
608
|
+
const raw = await downloadBytes(DIST_TAGS_URL, fetchImpl, {
|
|
609
|
+
request: { headers: { "Cache-Control": "no-cache" }, signal }
|
|
610
|
+
});
|
|
611
|
+
const tags = JSON.parse(Buffer.from(raw).toString("utf8"));
|
|
612
|
+
const version = tags?.[channel];
|
|
613
|
+
if (typeof version !== "string" || !/^\d+\.\d+\.\d+(?:-rc\.[1-9]\d*)?$/.test(version)) {
|
|
614
|
+
throw new Error(`usebeeline npm dist-tag ${channel} has no valid helper version`);
|
|
615
|
+
}
|
|
616
|
+
return `v${version}`;
|
|
617
|
+
}
|
|
618
|
+
async function readPublishedBundle(platform, { env = process.env, releaseChannel = env.BEELINE_UPDATE_RELEASE_CHANNEL || env.BEELINE_RELEASE_CHANNEL?.trim() || "latest", fetchImpl, signal } = {}) {
|
|
619
|
+
const override = env.BEELINE_UPDATE_MANIFEST_URL?.trim();
|
|
620
|
+
const version = override ? void 0 : await readChannelVersion(releaseChannel, fetchImpl, signal);
|
|
621
|
+
const url = override || `${RELEASES_URL}/${version}/manifest.json`;
|
|
622
|
+
const raw = await downloadBytes(url, fetchImpl, { request: { signal } });
|
|
623
|
+
return { url, bundle: parseUpdateBundle(Buffer.from(raw).toString("utf8"), platform, version) };
|
|
624
|
+
}
|
|
625
|
+
function parseUpdateBundle(raw, platform, expectedVersion) {
|
|
626
|
+
let parsed;
|
|
627
|
+
try {
|
|
628
|
+
parsed = JSON.parse(raw);
|
|
629
|
+
} catch (error) {
|
|
630
|
+
throw new Error(`update manifest is not valid JSON: ${error instanceof Error ? error.message : String(error)}`);
|
|
631
|
+
}
|
|
632
|
+
if (typeof parsed !== "object" || parsed === null) {
|
|
633
|
+
throw new Error("update manifest is not an object");
|
|
634
|
+
}
|
|
635
|
+
const manifest = parsed;
|
|
636
|
+
if (expectedVersion && manifest.version !== expectedVersion) {
|
|
637
|
+
throw new Error(`update manifest does not match npm version ${expectedVersion}`);
|
|
638
|
+
}
|
|
639
|
+
const bundles = manifest.bundles;
|
|
640
|
+
if (typeof bundles !== "object" || bundles === null) {
|
|
641
|
+
throw new Error("update manifest has no bundles table");
|
|
642
|
+
}
|
|
643
|
+
const entry = bundles[platform];
|
|
644
|
+
if (typeof entry !== "object" || entry === null) {
|
|
645
|
+
throw new Error(`update manifest has no bundle for platform ${platform}`);
|
|
646
|
+
}
|
|
647
|
+
const bundle = entry;
|
|
648
|
+
const file = typeof bundle.file === "string" ? bundle.file : "";
|
|
649
|
+
const sha256 = typeof bundle.sha256 === "string" ? bundle.sha256.toLowerCase() : "";
|
|
650
|
+
if (!file || !/^[a-z0-9][a-z0-9._-]*$/i.test(file)) {
|
|
651
|
+
throw new Error(`update manifest names an unusable bundle file: ${JSON.stringify(bundle.file)}`);
|
|
652
|
+
}
|
|
653
|
+
if (!/^[0-9a-f]{64}$/.test(sha256)) {
|
|
654
|
+
throw new Error(`update manifest carries no usable sha256 for ${platform}`);
|
|
655
|
+
}
|
|
656
|
+
const sourceCommit = typeof bundle.commit === "string" && bundle.commit ? bundle.commit : typeof manifest.sourceCommit === "string" ? manifest.sourceCommit : void 0;
|
|
657
|
+
const version = typeof bundle.version === "string" && bundle.version ? bundle.version : typeof manifest.version === "string" ? manifest.version : void 0;
|
|
658
|
+
return {
|
|
659
|
+
file,
|
|
660
|
+
sha256,
|
|
661
|
+
...typeof bundle.bytes === "number" ? { bytes: bundle.bytes } : {},
|
|
662
|
+
...sourceCommit ? { commit: sourceCommit } : {},
|
|
663
|
+
...version ? { version } : {},
|
|
664
|
+
...typeof bundle.node === "string" ? { node: bundle.node } : {}
|
|
665
|
+
};
|
|
666
|
+
}
|
|
667
|
+
function compareBundleIdentity(installed, published) {
|
|
668
|
+
if (installed?.version && published.version && installed.version !== published.version) {
|
|
669
|
+
const installedNewer = versionAtLeast(installed.version, published.version);
|
|
670
|
+
const publishedNewer = versionAtLeast(published.version, installed.version);
|
|
671
|
+
if (installedNewer && !publishedNewer)
|
|
672
|
+
return { kind: "current" };
|
|
673
|
+
if (publishedNewer && !installedNewer)
|
|
674
|
+
return { kind: "update-available", published };
|
|
675
|
+
}
|
|
676
|
+
if (installed?.commit && published.commit) {
|
|
677
|
+
if (installed.commit === published.commit)
|
|
678
|
+
return { kind: "current" };
|
|
679
|
+
return { kind: "update-available", published };
|
|
680
|
+
}
|
|
681
|
+
if (installed?.version && published.version) {
|
|
682
|
+
const ordering = compareVersions(installed.version, published.version);
|
|
683
|
+
if (ordering > 0)
|
|
684
|
+
return { kind: "current" };
|
|
685
|
+
if (ordering < 0)
|
|
686
|
+
return { kind: "update-available", published };
|
|
687
|
+
if (installed.commit && published.commit)
|
|
688
|
+
return { kind: "current" };
|
|
689
|
+
return { kind: "current" };
|
|
690
|
+
}
|
|
691
|
+
const missing = [
|
|
692
|
+
...installed?.commit || installed?.version ? [] : ["installed identity"],
|
|
693
|
+
...published.commit || published.version ? [] : ["published identity"]
|
|
694
|
+
];
|
|
695
|
+
return {
|
|
696
|
+
kind: "indeterminate",
|
|
697
|
+
reason: `cannot compare: ${missing.join(" and ")} unknown`
|
|
698
|
+
};
|
|
699
|
+
}
|
|
700
|
+
function compareVersions(a, b) {
|
|
701
|
+
const parse = (value) => {
|
|
702
|
+
const parts = value.split(/[.+-]/).filter(Boolean);
|
|
703
|
+
if (parts.length === 0)
|
|
704
|
+
return void 0;
|
|
705
|
+
return parts.map((part) => /^\d+$/.test(part) ? Number(part) : part);
|
|
706
|
+
};
|
|
707
|
+
const left = parse(a);
|
|
708
|
+
const right = parse(b);
|
|
709
|
+
if (!left || !right)
|
|
710
|
+
return a === b ? 0 : a > b ? 1 : -1;
|
|
711
|
+
const length = Math.max(left.length, right.length);
|
|
712
|
+
for (let index = 0; index < length; index += 1) {
|
|
713
|
+
const l = left[index];
|
|
714
|
+
const r = right[index];
|
|
715
|
+
if (l === void 0)
|
|
716
|
+
return -1;
|
|
717
|
+
if (r === void 0)
|
|
718
|
+
return 1;
|
|
719
|
+
if (l === r)
|
|
720
|
+
continue;
|
|
721
|
+
if (typeof l === "number" && typeof r === "number")
|
|
722
|
+
return l > r ? 1 : -1;
|
|
723
|
+
return String(l) > String(r) ? 1 : -1;
|
|
724
|
+
}
|
|
725
|
+
return 0;
|
|
726
|
+
}
|
|
727
|
+
function versionAtLeast(actual, minimum) {
|
|
728
|
+
const parse = (value) => {
|
|
729
|
+
const match = /^v?(\d+)\.(\d+)\.(\d+)(?:-rc\.(\d+))?$/.exec(value);
|
|
730
|
+
return match ? [...match.slice(1, 4).map(Number), match[4] === void 0 ? Infinity : Number(match[4])] : void 0;
|
|
731
|
+
};
|
|
732
|
+
const left = parse(actual), right = parse(minimum);
|
|
733
|
+
if (!left || !right)
|
|
734
|
+
return false;
|
|
735
|
+
for (let index = 0; index < 4; index++)
|
|
736
|
+
if (left[index] !== right[index])
|
|
737
|
+
return left[index] > right[index];
|
|
738
|
+
return true;
|
|
739
|
+
}
|
|
740
|
+
var DIST_TAGS_URL, RELEASES_URL;
|
|
741
|
+
var init_self_update_manifest = __esm({
|
|
742
|
+
"apps/body/dist/self-update-manifest.js"() {
|
|
743
|
+
"use strict";
|
|
744
|
+
init_update_download();
|
|
745
|
+
DIST_TAGS_URL = "https://registry.npmjs.org/-/package/usebeeline/dist-tags";
|
|
746
|
+
RELEASES_URL = "https://downloads.usebeeline.app/dl/releases";
|
|
747
|
+
}
|
|
748
|
+
});
|
|
749
|
+
|
|
739
750
|
// apps/body/dist/trusty-squire-storage.js
|
|
740
751
|
import { homedir } from "node:os";
|
|
741
752
|
import { isAbsolute, resolve as resolve2 } from "node:path";
|
|
@@ -1120,7 +1131,6 @@ __export(self_update_exports, {
|
|
|
1120
1131
|
describeIdentity: () => describeIdentity,
|
|
1121
1132
|
discoveredBeelineInstallLayout: () => discoveredBeelineInstallLayout,
|
|
1122
1133
|
entrypointCandidates: () => entrypointCandidates,
|
|
1123
|
-
fetchText: () => fetchText,
|
|
1124
1134
|
forwarderScript: () => forwarderScript,
|
|
1125
1135
|
fsyncDir: () => fsyncDir,
|
|
1126
1136
|
hostPlatformKey: () => hostPlatformKey,
|
|
@@ -1142,7 +1152,7 @@ __export(self_update_exports, {
|
|
|
1142
1152
|
runningReleaseId: () => runningReleaseId,
|
|
1143
1153
|
sanitizeReleaseId: () => sanitizeReleaseId,
|
|
1144
1154
|
stageRelease: () => stageRelease,
|
|
1145
|
-
|
|
1155
|
+
updateCommandReleaseEnv: () => updateCommandReleaseEnv,
|
|
1146
1156
|
updateStatePath: () => updateStatePath,
|
|
1147
1157
|
writeUpdateState: () => writeUpdateState
|
|
1148
1158
|
});
|
|
@@ -1280,7 +1290,7 @@ async function installedReleaseChannel(layout, env = process.env) {
|
|
|
1280
1290
|
return recorded;
|
|
1281
1291
|
return env.BEELINE_RELEASE_CHANNEL?.trim() || "latest";
|
|
1282
1292
|
}
|
|
1283
|
-
async function
|
|
1293
|
+
async function updateCommandReleaseEnv(layout, override, rememberChannel) {
|
|
1284
1294
|
const explicit = process.env.BEELINE_RELEASE_CHANNEL?.trim();
|
|
1285
1295
|
if (rememberChannel && (explicit === "next" || explicit === "latest")) {
|
|
1286
1296
|
const path = releaseChannelPath(layout);
|
|
@@ -1288,7 +1298,11 @@ async function updateCommandManifestUrl(layout, override, rememberChannel) {
|
|
|
1288
1298
|
await replaceFile(path, `${explicit}
|
|
1289
1299
|
`, 384);
|
|
1290
1300
|
}
|
|
1291
|
-
return
|
|
1301
|
+
return {
|
|
1302
|
+
...process.env,
|
|
1303
|
+
BEELINE_UPDATE_RELEASE_CHANNEL: explicit || await installedReleaseChannel(layout),
|
|
1304
|
+
BEELINE_UPDATE_MANIFEST_URL: override ?? process.env.BEELINE_UPDATE_MANIFEST_URL
|
|
1305
|
+
};
|
|
1292
1306
|
}
|
|
1293
1307
|
async function readUpdateState(layout) {
|
|
1294
1308
|
try {
|
|
@@ -1364,9 +1378,6 @@ function archiveUrlFor(manifestUrl, file) {
|
|
|
1364
1378
|
return file;
|
|
1365
1379
|
return `${withoutTrailingSlash.slice(0, index)}/${file}`;
|
|
1366
1380
|
}
|
|
1367
|
-
async function fetchText(url, fetchImpl) {
|
|
1368
|
-
return Buffer.from(await downloadBytes(url, fetchImpl)).toString("utf8");
|
|
1369
|
-
}
|
|
1370
1381
|
function entrypointCandidates(bundleDir) {
|
|
1371
1382
|
return [join2(bundleDir, BUNDLE_ENTRYPOINT), join2(bundleDir, "beeline-cli.mjs")];
|
|
1372
1383
|
}
|
|
@@ -1540,8 +1551,11 @@ async function prepareLatestRelease(layout, options = {}) {
|
|
|
1540
1551
|
});
|
|
1541
1552
|
try {
|
|
1542
1553
|
const env = options.env ?? process.env;
|
|
1543
|
-
const
|
|
1544
|
-
|
|
1554
|
+
const { url, bundle } = options.manifest ?? await readPublishedBundle(hostPlatformKey(), {
|
|
1555
|
+
env,
|
|
1556
|
+
releaseChannel: env.BEELINE_UPDATE_RELEASE_CHANNEL || await installedReleaseChannel(layout, env),
|
|
1557
|
+
fetchImpl
|
|
1558
|
+
});
|
|
1545
1559
|
options.signal?.throwIfAborted();
|
|
1546
1560
|
const installed = await readInstalledBundleIdentity(layout);
|
|
1547
1561
|
const active = await activeReleaseId(layout);
|
|
@@ -1553,7 +1567,7 @@ async function prepareLatestRelease(layout, options = {}) {
|
|
|
1553
1567
|
options.logger?.(`already on ${installed?.version ?? active}; verifying content and repairing helper`);
|
|
1554
1568
|
const holds = async (id) => Boolean(id) && (await readFile2(join2(layout.releasesRoot, id, ".stage-ok"), "utf8").catch(() => "")).trim() === bundle.sha256;
|
|
1555
1569
|
const pending = (await readUpdateState(layout)).stagedReleaseId;
|
|
1556
|
-
const releaseId = !options.force && await holds(pending) ? pending : !options.force && await holds(active) ? active : await stageRelease(layout,
|
|
1570
|
+
const releaseId = !options.force && await holds(pending) ? pending : !options.force && await holds(active) ? active : await stageRelease(layout, url, bundle, {
|
|
1557
1571
|
fetchImpl,
|
|
1558
1572
|
logger: options.logger,
|
|
1559
1573
|
force: options.force,
|
|
@@ -1581,7 +1595,6 @@ var RELEASES_SEGMENT, STAGED_NODE_PATH_FILE, BUNDLE_ENTRYPOINT, PI_MCP_ADAPTER_E
|
|
|
1581
1595
|
var init_self_update = __esm({
|
|
1582
1596
|
"apps/body/dist/self-update.js"() {
|
|
1583
1597
|
"use strict";
|
|
1584
|
-
init_self_update_manifest();
|
|
1585
1598
|
init_update_download();
|
|
1586
1599
|
init_wait();
|
|
1587
1600
|
init_lifecycle_test_guard();
|
|
@@ -4040,10 +4053,22 @@ var init_phone_guards_read_choice_card = __esm({
|
|
|
4040
4053
|
}
|
|
4041
4054
|
});
|
|
4042
4055
|
|
|
4056
|
+
// packages/api-contract/dist/chat-links.js
|
|
4057
|
+
var THREAD_NAME, HANDLE, TOKEN_PATTERN;
|
|
4058
|
+
var init_chat_links = __esm({
|
|
4059
|
+
"packages/api-contract/dist/chat-links.js"() {
|
|
4060
|
+
"use strict";
|
|
4061
|
+
THREAD_NAME = String.raw`[\p{L}\p{N}](?:[\p{L}\p{M}\p{N}_-]*[\p{L}\p{M}\p{N}_])?`;
|
|
4062
|
+
HANDLE = String.raw`[A-Za-z0-9](?:[A-Za-z0-9_-]*[A-Za-z0-9_])?`;
|
|
4063
|
+
TOKEN_PATTERN = new RegExp(String.raw`(?:↳(${THREAD_NAME})|¶(${HANDLE})-([1-9][0-9]{0,8}))(?![\p{L}\p{M}\p{N}_]|-[\p{L}\p{N}])`, "gu");
|
|
4064
|
+
}
|
|
4065
|
+
});
|
|
4066
|
+
|
|
4043
4067
|
// packages/api-contract/dist/work-board.js
|
|
4044
4068
|
var init_work_board = __esm({
|
|
4045
4069
|
"packages/api-contract/dist/work-board.js"() {
|
|
4046
4070
|
"use strict";
|
|
4071
|
+
init_chat_links();
|
|
4047
4072
|
init_phone_guards();
|
|
4048
4073
|
}
|
|
4049
4074
|
});
|
|
@@ -4843,17 +4868,6 @@ var init_mcp_muse_recipe = __esm({
|
|
|
4843
4868
|
}
|
|
4844
4869
|
});
|
|
4845
4870
|
|
|
4846
|
-
// packages/api-contract/dist/chat-links.js
|
|
4847
|
-
var THREAD_NAME, HANDLE, TOKEN_PATTERN;
|
|
4848
|
-
var init_chat_links = __esm({
|
|
4849
|
-
"packages/api-contract/dist/chat-links.js"() {
|
|
4850
|
-
"use strict";
|
|
4851
|
-
THREAD_NAME = String.raw`[\p{L}\p{N}](?:[\p{L}\p{M}\p{N}_-]*[\p{L}\p{M}\p{N}_])?`;
|
|
4852
|
-
HANDLE = String.raw`[A-Za-z0-9](?:[A-Za-z0-9_-]*[A-Za-z0-9_])?`;
|
|
4853
|
-
TOKEN_PATTERN = new RegExp(String.raw`(?:↳(${THREAD_NAME})|¶(${HANDLE})-([1-9][0-9]{0,8}))(?![\p{L}\p{M}\p{N}_]|-[\p{L}\p{N}])`, "gu");
|
|
4854
|
-
}
|
|
4855
|
-
});
|
|
4856
|
-
|
|
4857
4871
|
// packages/api-contract/dist/phone.js
|
|
4858
4872
|
var init_phone = __esm({
|
|
4859
4873
|
"packages/api-contract/dist/phone.js"() {
|
|
@@ -27479,16 +27493,16 @@ async function main() {
|
|
|
27479
27493
|
}
|
|
27480
27494
|
const index = args.indexOf("--manifest-url");
|
|
27481
27495
|
const checkOnly = args.includes("--check");
|
|
27482
|
-
const
|
|
27496
|
+
const env = await updateCommandReleaseEnv(layout, index >= 0 ? args[index + 1] : void 0, command2 === "update" && !checkOnly);
|
|
27483
27497
|
if (checkOnly) {
|
|
27484
|
-
const bundle =
|
|
27498
|
+
const { bundle } = await readPublishedBundle(hostPlatformKey(), { env });
|
|
27485
27499
|
console.log(compareBundleIdentity(await readInstalledBundleIdentity(layout), bundle));
|
|
27486
27500
|
return;
|
|
27487
27501
|
}
|
|
27488
27502
|
let target;
|
|
27489
27503
|
try {
|
|
27490
27504
|
target = await prepareMachineRelease(layout, {
|
|
27491
|
-
env
|
|
27505
|
+
env,
|
|
27492
27506
|
force: args.includes("--force")
|
|
27493
27507
|
});
|
|
27494
27508
|
} catch (error) {
|