@lobu/runtime-device 24.7.0 → 24.8.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/dist/component.json +1 -1
- package/dist/dependencies.bun.lock +25 -41
- package/npm-shrinkwrap.json +116 -240
- package/package.json +4 -2
- package/vendor/cli/dist/chrome-extension/manifest.json +5 -4
- package/vendor/cli/dist/chrome-extension/tools.js +2 -3
- package/vendor/cli/dist/commands/dev.js +28 -4
- package/vendor/cli/dist/connectors/imessage.ts +953 -0
- package/vendor/cli/dist/connectors/linkedin.ts +20 -377
- package/vendor/cli/dist/runtime-components.json +4 -4
- package/vendor/cli/dist/templates/AGENTS.md.tmpl +1 -1
- package/vendor/cli/package.json +1 -1
- package/vendor/connector-sdk/package.json +1 -1
- package/vendor/connector-worker/dist/env.d.ts +15 -0
- package/vendor/connector-worker/dist/env.js +17 -0
- package/vendor/connector-worker/dist/executor/isolate.d.ts +3 -1
- package/vendor/connector-worker/dist/executor/isolate.js +29 -8
- package/vendor/connector-worker/package.json +1 -1
- package/vendor/core/dist/connector-query-errors.d.ts +6 -0
- package/vendor/core/dist/connector-query-errors.js +4 -0
- package/vendor/core/dist/contracts/tools/manage-entity.d.ts +2 -0
- package/vendor/core/dist/contracts/tools/manage-entity.js +7 -0
- package/vendor/core/dist/contracts/tools/manage-feeds.d.ts +2 -0
- package/vendor/core/dist/contracts/tools/manage-feeds.js +3 -0
- package/vendor/core/dist/contracts/tools/view-host.js +2 -0
- package/vendor/core/dist/error-report.js +1 -0
- package/vendor/core/package.json +1 -1
- package/vendor/views/package.json +1 -1
- package/vendor/cli/dist/connectors/linkedin-takeout.ts +0 -577
- package/vendor/cli/dist/connectors/takeout-utils.ts +0 -240
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lobu/runtime-device",
|
|
3
|
-
"version": "24.
|
|
3
|
+
"version": "24.8.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "BUSL-1.1",
|
|
6
6
|
"repository": {
|
|
@@ -17,7 +17,9 @@
|
|
|
17
17
|
"node": ">=26 <27"
|
|
18
18
|
},
|
|
19
19
|
"overrides": {
|
|
20
|
-
"sharp": "^0.35.3"
|
|
20
|
+
"sharp": "^0.35.3",
|
|
21
|
+
"prosemirror-model": "^1.25.11",
|
|
22
|
+
"prosemirror-view": "^1.42.3"
|
|
21
23
|
},
|
|
22
24
|
"dependencies": {
|
|
23
25
|
"chalk": "^5.3.0",
|
|
@@ -24,6 +24,10 @@
|
|
|
24
24
|
"bookmarks",
|
|
25
25
|
"downloads"
|
|
26
26
|
],
|
|
27
|
+
"host_permissions": [
|
|
28
|
+
"https://app.lobu.ai/*",
|
|
29
|
+
"<all_urls>"
|
|
30
|
+
],
|
|
27
31
|
"optional_host_permissions": [],
|
|
28
32
|
"content_scripts": [
|
|
29
33
|
{
|
|
@@ -69,8 +73,5 @@
|
|
|
69
73
|
"48": "icons/icon-48.png",
|
|
70
74
|
"128": "icons/icon-128.png"
|
|
71
75
|
}
|
|
72
|
-
}
|
|
73
|
-
"host_permissions": [
|
|
74
|
-
"<all_urls>"
|
|
75
|
-
]
|
|
76
|
+
}
|
|
76
77
|
}
|
|
@@ -2812,9 +2812,8 @@ export class SiteAccessRequiredError extends Error {
|
|
|
2812
2812
|
}
|
|
2813
2813
|
|
|
2814
2814
|
// Headless runs can't prompt for a host permission — chrome.permissions.request
|
|
2815
|
-
// needs a user gesture and the poll loop has none.
|
|
2816
|
-
//
|
|
2817
|
-
// panel. If the grant is missing, fail with a message that points there, rather
|
|
2815
|
+
// needs a user gesture and the poll loop has none. host_permissions names only
|
|
2816
|
+
// the hosted gateway; the user grants <all_urls> or per-site from the panel. If the grant is missing, fail with a message that points there, rather
|
|
2818
2817
|
// than the raw "Cannot access contents of url" that executeScript/debugger.attach
|
|
2819
2818
|
// would throw deeper in.
|
|
2820
2819
|
async function assertHostPermission(chromeApi, url) {
|
|
@@ -17,6 +17,8 @@ import { checkNodeSupport } from "../internal/node-version.js";
|
|
|
17
17
|
import { loadProjectLink } from "../internal/project-link.js";
|
|
18
18
|
import { prepareRuntime } from "../internal/runtime-components.js";
|
|
19
19
|
import { loadProjectConfig } from "./_lib/apply/desired-state.js";
|
|
20
|
+
/** How long `lobu run` waits after forwarding a signal before forcing exit. */
|
|
21
|
+
const SERVER_SHUTDOWN_GRACE_MS = 45_000;
|
|
20
22
|
function connectorRefKey(ref) {
|
|
21
23
|
return typeof ref === "string" ? ref : new ref().definition.key;
|
|
22
24
|
}
|
|
@@ -270,10 +272,16 @@ export async function devCommand(cwd, options = {}) {
|
|
|
270
272
|
// is a verified Node 26 binary (the current process when it already is one).
|
|
271
273
|
// `--no-node-snapshot` is isolated-vm's upstream launch requirement on
|
|
272
274
|
// Node 20+.
|
|
275
|
+
// The server leads its own process group, so the embedded Postgres and the
|
|
276
|
+
// embeddings child it starts share that group with it. Signals still go to
|
|
277
|
+
// the server alone and its teardown stops those children in order; the group
|
|
278
|
+
// is only for the forced kill below, which must not leave them listening.
|
|
279
|
+
const ownProcessGroup = process.platform !== "win32";
|
|
273
280
|
const child = spawn(nodeBinary, ["--no-node-snapshot", bundlePath], {
|
|
274
281
|
cwd,
|
|
275
282
|
env: childEnv,
|
|
276
283
|
stdio: "inherit",
|
|
284
|
+
detached: ownProcessGroup,
|
|
277
285
|
});
|
|
278
286
|
child.on("error", (err) => {
|
|
279
287
|
console.error(chalk.red(`\n Failed to start Lobu: ${err.message}\n`));
|
|
@@ -329,20 +337,36 @@ export async function devCommand(cwd, options = {}) {
|
|
|
329
337
|
await printPreviewInstructions(cwd);
|
|
330
338
|
}
|
|
331
339
|
});
|
|
332
|
-
// Forward Ctrl+C to the
|
|
333
|
-
// before the parent exits.
|
|
340
|
+
// Forward Ctrl+C / SIGTERM to the server so it can run its ordered shutdown
|
|
341
|
+
// before the parent exits. The grace period covers the server's SIGTERM
|
|
342
|
+
// budget (connector worker 15s, HTTP close 10s, service and tracing
|
|
343
|
+
// teardown); a shorter one cut that teardown off mid-way. If it still wedges,
|
|
344
|
+
// SIGKILL its whole process group so no child outlives `lobu run`.
|
|
334
345
|
const forwardSignal = (signal) => {
|
|
335
346
|
if (child.exitCode !== null || child.signalCode !== null)
|
|
336
347
|
return;
|
|
337
348
|
child.kill(signal);
|
|
338
349
|
setTimeout(() => {
|
|
339
|
-
if (child.exitCode
|
|
350
|
+
if (child.exitCode !== null || child.signalCode !== null)
|
|
351
|
+
return;
|
|
352
|
+
if (ownProcessGroup && child.pid !== undefined) {
|
|
353
|
+
process.kill(-child.pid, "SIGKILL");
|
|
354
|
+
}
|
|
355
|
+
else {
|
|
340
356
|
child.kill("SIGKILL");
|
|
341
357
|
}
|
|
342
|
-
},
|
|
358
|
+
}, SERVER_SHUTDOWN_GRACE_MS).unref();
|
|
343
359
|
};
|
|
344
360
|
process.on("SIGINT", () => forwardSignal("SIGINT"));
|
|
345
361
|
process.on("SIGTERM", () => forwardSignal("SIGTERM"));
|
|
362
|
+
// In its own session the server no longer receives the terminal's hangup or
|
|
363
|
+
// Ctrl+\, and either signal would kill this process at once by default,
|
|
364
|
+
// orphaning the server with its ports held. Turn both into the same ordered
|
|
365
|
+
// shutdown (and forced group kill) as SIGTERM.
|
|
366
|
+
if (ownProcessGroup) {
|
|
367
|
+
process.on("SIGHUP", () => forwardSignal("SIGTERM"));
|
|
368
|
+
process.on("SIGQUIT", () => forwardSignal("SIGTERM"));
|
|
369
|
+
}
|
|
346
370
|
child.on("exit", (code, signal) => {
|
|
347
371
|
if (signal) {
|
|
348
372
|
console.log(chalk.dim(`\n Lobu exited (${signal}).\n`));
|