@lobu/runtime-device 21.2.1 → 23.0.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 +91 -83
- package/npm-shrinkwrap.json +492 -438
- package/package.json +12 -2
- package/vendor/cli/dist/bundled-skills/lobu/SKILL.md +1 -1
- package/vendor/cli/dist/commands/_lib/apply/apply-cmd.js +5 -6
- package/vendor/cli/dist/commands/_lib/apply/client.d.ts +1 -0
- package/vendor/cli/dist/commands/_lib/apply/client.js +26 -7
- package/vendor/cli/dist/commands/_lib/apply/desired-state.d.ts +9 -1
- package/vendor/cli/dist/commands/_lib/apply/diff.d.ts +1 -0
- package/vendor/cli/dist/commands/_lib/apply/diff.js +46 -4
- package/vendor/cli/dist/commands/_lib/apply/map-config.js +18 -38
- package/vendor/cli/dist/commands/_lib/init-from-org/bootstrap.js +5 -17
- package/vendor/cli/dist/commands/init.d.ts +0 -2
- package/vendor/cli/dist/commands/init.js +0 -27
- package/vendor/cli/dist/commands/login.d.ts +17 -0
- package/vendor/cli/dist/commands/login.js +43 -17
- package/vendor/cli/dist/commands/memory/_lib/errors.d.ts +0 -8
- package/vendor/cli/dist/commands/memory/_lib/errors.js +0 -12
- package/vendor/cli/dist/commands/memory/_lib/mcp.js +6 -6
- package/vendor/cli/dist/commands/memory/_lib/seed-cmd.js +4 -10
- package/vendor/cli/dist/config/define.d.ts +21 -15
- package/vendor/cli/dist/config/define.js +2 -2
- package/vendor/cli/dist/connectors/README.md +21 -6
- package/vendor/cli/dist/connectors/_google/actions.ts +270 -0
- package/vendor/cli/dist/connectors/_google/discovery/calendar_v3.json +1 -0
- package/vendor/cli/dist/connectors/_google/discovery/chat_v1.json +1 -0
- package/vendor/cli/dist/connectors/_google/discovery/docs_v1.json +1 -0
- package/vendor/cli/dist/connectors/_google/discovery/drive_v3.json +1 -0
- package/vendor/cli/dist/connectors/_google/discovery/gmail_v1.json +1 -0
- package/vendor/cli/dist/connectors/_google/discovery/people_v1.json +1 -0
- package/vendor/cli/dist/connectors/_google/discovery/sheets_v4.json +1 -0
- package/vendor/cli/dist/connectors/_google/discovery/tasks_v1.json +1 -0
- package/vendor/cli/dist/connectors/_google/discovery/youtube_v3.json +1 -0
- package/vendor/cli/dist/connectors/_google/discovery.ts +442 -0
- package/vendor/cli/dist/connectors/_google/errors.ts +91 -0
- package/vendor/cli/dist/connectors/_google/list-feed.ts +223 -0
- package/vendor/cli/dist/connectors/_google/policies.ts +127 -0
- package/vendor/cli/dist/connectors/agentid.ts +43 -0
- package/vendor/cli/dist/connectors/chat-user-identity.ts +2 -1
- package/vendor/cli/dist/connectors/github-automation-events.ts +9 -0
- package/vendor/cli/dist/connectors/github-identity.ts +28 -3
- package/vendor/cli/dist/connectors/github.ts +101 -59
- package/vendor/cli/dist/connectors/google_calendar.ts +207 -719
- package/vendor/cli/dist/connectors/google_drive.ts +16 -2
- package/vendor/cli/dist/connectors/google_gmail.ts +52 -33
- package/vendor/cli/dist/connectors/herdr.ts +406 -0
- package/vendor/cli/dist/connectors/jira-helpers.ts +313 -0
- package/vendor/cli/dist/connectors/jira.ts +35 -227
- package/vendor/cli/dist/connectors/linear.ts +7 -4
- package/vendor/cli/dist/connectors/linkedin-browser-script.ts +13 -0
- package/vendor/cli/dist/connectors/linkedin-draft-page.js +104 -0
- package/vendor/cli/dist/connectors/linkedin-drafts.ts +73 -0
- package/vendor/cli/dist/connectors/linkedin-identity.ts +32 -0
- package/vendor/cli/dist/connectors/linkedin-inbox-adapter.js +1185 -0
- package/vendor/cli/dist/connectors/linkedin-inbox.ts +156 -0
- package/vendor/cli/dist/connectors/linkedin-like.ts +114 -0
- package/vendor/cli/dist/connectors/linkedin-takeout.ts +577 -0
- package/vendor/cli/dist/connectors/linkedin.ts +3998 -0
- package/vendor/cli/dist/connectors/postgres.ts +27 -2
- package/vendor/cli/dist/connectors/takeout-utils.ts +240 -0
- package/vendor/cli/dist/connectors/tiktok-inbox-page.js +230 -0
- package/vendor/cli/dist/connectors/tiktok-web-page.js +217 -0
- package/vendor/cli/dist/connectors/tiktok_web.ts +319 -0
- package/vendor/cli/dist/connectors/whatsapp-web-adapter.js +285 -567
- package/vendor/cli/dist/connectors/whatsapp-web-helpers.ts +74 -455
- package/vendor/cli/dist/connectors/whatsapp-web-identity.ts +135 -0
- package/vendor/cli/dist/connectors/whatsapp_web.ts +159 -618
- package/vendor/cli/dist/connectors/x-dm-adapter.js +556 -0
- package/vendor/cli/dist/connectors/x-identity.ts +31 -2
- package/vendor/cli/dist/connectors/x.ts +539 -253
- package/vendor/cli/dist/index.js +1 -37
- package/vendor/cli/dist/internal/context.d.ts +10 -0
- package/vendor/cli/dist/internal/context.js +26 -16
- package/vendor/cli/dist/internal/node-version.d.ts +1 -1
- package/vendor/cli/dist/internal/node-version.js +1 -1
- package/vendor/cli/dist/internal/oauth.d.ts +3 -1
- package/vendor/cli/dist/internal/oauth.js +4 -3
- package/vendor/cli/dist/internal/runtime-components.d.ts +9 -0
- package/vendor/cli/dist/internal/runtime-components.js +67 -2
- package/vendor/cli/dist/mac-auth.js +17 -1
- package/vendor/cli/dist/providers.json +1 -1
- package/vendor/cli/dist/runtime-components.json +4 -4
- package/vendor/cli/dist/templates/AGENTS.md.tmpl +12 -5
- package/vendor/cli/dist/templates/README.md.tmpl +1 -1
- package/vendor/cli/dist/vendor/ora/.bun-tag-fde20e9a6df212fa +0 -0
- package/vendor/cli/dist/vendor/ora/index.d.ts +332 -0
- package/vendor/cli/dist/vendor/ora/index.js +424 -0
- package/vendor/cli/dist/vendor/ora/license +9 -0
- package/vendor/cli/dist/vendor/ora/package.json +64 -0
- package/vendor/cli/dist/vendor/ora/readme.md +329 -0
- package/vendor/cli/package.json +2 -2
- package/vendor/connector-sdk/dist/browser-handoff-banner.d.ts +39 -0
- package/vendor/connector-sdk/dist/browser-handoff-banner.js +175 -0
- package/vendor/connector-sdk/dist/browser-requirement.d.ts +36 -0
- package/vendor/connector-sdk/dist/browser-requirement.js +60 -0
- package/vendor/connector-sdk/dist/browser-source-read.d.ts +52 -0
- package/vendor/connector-sdk/dist/browser-source-read.js +107 -0
- package/vendor/connector-sdk/dist/connector-runtime.d.ts +3 -1
- package/vendor/connector-sdk/dist/connector-runtime.js +10 -0
- package/vendor/connector-sdk/dist/connector-types.d.ts +169 -45
- package/vendor/connector-sdk/dist/define-connector.d.ts +4 -2
- package/vendor/connector-sdk/dist/define-connector.js +3 -0
- package/vendor/connector-sdk/dist/index.d.ts +8 -2
- package/vendor/connector-sdk/dist/index.js +3 -0
- package/vendor/connector-sdk/dist/reaction-client-types.d.ts +16 -21
- package/vendor/connector-sdk/dist/reaction-client-types.typecheck.d.ts +5 -0
- package/vendor/connector-sdk/package.json +13 -1
- package/vendor/connector-worker/dist/agent-turn/guest-entry.js +43 -30
- package/vendor/connector-worker/dist/agent-turn/guest.bundle.js +416 -330
- package/vendor/connector-worker/dist/agent-turn/memory.d.ts +3 -2
- package/vendor/connector-worker/dist/agent-turn/memory.js +3 -20
- package/vendor/connector-worker/dist/agent-turn/types.d.ts +3 -15
- package/vendor/connector-worker/dist/agent-turn/workspace.d.ts +2 -2
- package/vendor/connector-worker/dist/agent-turn/workspace.js +2 -4
- package/vendor/connector-worker/dist/daemon/action-monitor.d.ts +12 -0
- package/vendor/connector-worker/dist/daemon/action-monitor.js +25 -0
- package/vendor/connector-worker/dist/daemon/agent-turn.js +0 -9
- package/vendor/connector-worker/dist/daemon/automation.d.ts +4 -11
- package/vendor/connector-worker/dist/daemon/automation.js +6 -6
- package/vendor/connector-worker/dist/daemon/builtins/index.d.ts +12 -0
- package/vendor/connector-worker/dist/daemon/builtins/index.js +61 -1
- package/vendor/connector-worker/dist/daemon/builtins/os-shell.d.ts +2 -1
- package/vendor/connector-worker/dist/daemon/builtins/os-shell.js +40 -27
- package/vendor/connector-worker/dist/daemon/client.d.ts +6 -4
- package/vendor/connector-worker/dist/daemon/client.js +3 -3
- package/vendor/connector-worker/dist/daemon/device-concurrency.d.ts +8 -0
- package/vendor/connector-worker/dist/daemon/device-concurrency.js +13 -0
- package/vendor/connector-worker/dist/daemon/executor.d.ts +1 -1
- package/vendor/connector-worker/dist/daemon/executor.js +48 -120
- package/vendor/connector-worker/dist/daemon/log.d.ts +2 -0
- package/vendor/connector-worker/dist/daemon/log.js +23 -2
- package/vendor/connector-worker/dist/daemon/mac-device-daemon.d.ts +23 -6
- package/vendor/connector-worker/dist/daemon/mac-device-daemon.js +57 -23
- package/vendor/connector-worker/dist/daemon/native-bridge/client.d.ts +6 -0
- package/vendor/connector-worker/dist/daemon/native-bridge/client.js +15 -0
- package/vendor/connector-worker/dist/daemon/native-bridge/executor.js +29 -25
- package/vendor/connector-worker/dist/daemon/native-bridge/protocol.d.ts +1 -1
- package/vendor/connector-worker/dist/daemon/native-bridge/protocol.js +1 -0
- package/vendor/connector-worker/dist/daemon/poll-loop.d.ts +3 -0
- package/vendor/connector-worker/dist/daemon/poll-loop.js +5 -1
- package/vendor/connector-worker/dist/daemon/start.d.ts +1 -0
- package/vendor/connector-worker/dist/daemon/start.js +15 -20
- package/vendor/connector-worker/dist/daemon/terminal-failure.js +0 -11
- package/vendor/connector-worker/dist/daemon/worker-id.d.ts +17 -0
- package/vendor/connector-worker/dist/daemon/worker-id.js +22 -0
- package/vendor/connector-worker/dist/executor/interface.d.ts +34 -2
- package/vendor/connector-worker/dist/executor/isolate.js +66 -15
- package/vendor/connector-worker/dist/executor/redact.d.ts +1 -0
- package/vendor/connector-worker/dist/executor/redact.js +97 -26
- package/vendor/connector-worker/dist/executor/runtime.d.ts +7 -0
- package/vendor/connector-worker/dist/executor/runtime.js +26 -0
- package/vendor/connector-worker/dist/isolate/bridge.js +3 -1
- package/vendor/connector-worker/dist/mac-device-daemon.js +24 -29
- package/vendor/connector-worker/package.json +2 -2
- package/vendor/core/dist/agent-policy.js +1 -1
- package/vendor/core/dist/agent-store.d.ts +2 -0
- package/vendor/core/dist/agent-tooling.d.ts +1 -1
- package/vendor/core/dist/agent-tooling.js +1 -1
- package/vendor/core/dist/capabilities.d.ts +1 -1
- package/vendor/core/dist/capabilities.js +2 -1
- package/vendor/core/dist/connector-query-errors.d.ts +32 -0
- package/vendor/core/dist/connector-query-errors.js +41 -1
- package/vendor/core/dist/contracts/agent-settings.d.ts +0 -11
- package/vendor/core/dist/contracts/agent-settings.js +1 -7
- package/vendor/core/dist/contracts/tools/collection-presentation.d.ts +93 -0
- package/vendor/core/dist/contracts/tools/collection-presentation.js +88 -0
- package/vendor/core/dist/contracts/tools/collection-selection.d.ts +47 -0
- package/vendor/core/dist/contracts/tools/collection-selection.js +74 -0
- package/vendor/core/dist/contracts/tools/manage-agents.d.ts +10 -4
- package/vendor/core/dist/contracts/tools/manage-auth-profiles.d.ts +1 -1
- package/vendor/core/dist/contracts/tools/manage-auth-profiles.js +5 -1
- package/vendor/core/dist/contracts/tools/manage-automations.d.ts +19 -4
- package/vendor/core/dist/contracts/tools/manage-automations.js +25 -8
- package/vendor/core/dist/contracts/tools/manage-connections.d.ts +1 -0
- package/vendor/core/dist/contracts/tools/manage-connections.js +3 -0
- package/vendor/core/dist/contracts/tools/manage-conversations.js +2 -2
- package/vendor/core/dist/contracts/tools/manage-entity-schema.d.ts +11 -0
- package/vendor/core/dist/contracts/tools/manage-entity-schema.js +42 -3
- package/vendor/core/dist/contracts/tools/manage-entity.d.ts +181 -152
- package/vendor/core/dist/contracts/tools/manage-entity.js +118 -162
- package/vendor/core/dist/contracts/tools/manage-feeds.d.ts +14 -0
- package/vendor/core/dist/contracts/tools/manage-feeds.js +17 -0
- package/vendor/core/dist/contracts/tools/manage-operations.d.ts +41 -3
- package/vendor/core/dist/contracts/tools/manage-operations.js +40 -2
- package/vendor/core/dist/contracts/tools/manage-views.d.ts +182 -7
- package/vendor/core/dist/contracts/tools/manage-views.js +49 -13
- package/vendor/core/dist/contracts/tools/read-knowledge.d.ts +11 -2
- package/vendor/core/dist/contracts/tools/read-knowledge.js +23 -3
- package/vendor/core/dist/contracts/tools/save-memory.d.ts +3 -6
- package/vendor/core/dist/contracts/tools/save-memory.js +2 -6
- package/vendor/core/dist/contracts/tools/view-attach.d.ts +2 -1
- package/vendor/core/dist/contracts/tools/view-attach.js +7 -2
- package/vendor/core/dist/contracts/worker/protocol.d.ts +130 -159
- package/vendor/core/dist/contracts/worker/protocol.js +88 -76
- package/vendor/core/dist/device-pin-tombstones.d.ts +44 -0
- package/vendor/core/dist/device-pin-tombstones.js +57 -0
- package/vendor/core/dist/index.d.ts +5 -5
- package/vendor/core/dist/index.js +4 -6
- package/vendor/core/dist/json-template.d.ts +6 -10
- package/vendor/core/dist/json-template.js +5 -9
- package/vendor/core/dist/logger.js +17 -26
- package/vendor/core/dist/shell-safety.d.ts +9 -0
- package/vendor/core/dist/shell-safety.js +154 -0
- package/vendor/core/dist/suggestions.d.ts +1 -1
- package/vendor/core/dist/suggestions.js +1 -1
- package/vendor/core/dist/tool-trace-summary.d.ts +1 -1
- package/vendor/core/dist/tool-trace-summary.js +1 -1
- package/vendor/core/dist/types.d.ts +1 -3
- package/vendor/core/dist/utils/diagnostic-scrubber.d.ts +7 -0
- package/vendor/core/dist/utils/diagnostic-scrubber.js +437 -0
- package/vendor/core/dist/worker/auth.d.ts +44 -6
- package/vendor/core/dist/worker/auth.js +44 -11
- package/vendor/core/dist/worker/wire.d.ts +0 -10
- package/vendor/core/package.json +20 -11
- package/vendor/ora/.bun-tag-fde20e9a6df212fa +0 -0
- package/vendor/ora/index.d.ts +332 -0
- package/vendor/ora/index.js +424 -0
- package/vendor/ora/license +9 -0
- package/vendor/ora/package.json +53 -0
- package/vendor/ora/readme.md +329 -0
- package/vendor/cli/dist/commands/telemetry.d.ts +0 -10
- package/vendor/cli/dist/commands/telemetry.js +0 -66
- package/vendor/connector-worker/dist/daemon/device-chat.d.ts +0 -9
- package/vendor/connector-worker/dist/daemon/device-chat.js +0 -61
- package/vendor/core/dist/contracts/worker/device-chat.d.ts +0 -4
- package/vendor/core/dist/contracts/worker/device-chat.js +0 -26
- package/vendor/core/dist/sentry.d.ts +0 -26
- package/vendor/core/dist/sentry.js +0 -133
- package/vendor/core/dist/tool-policy.d.ts +0 -74
- package/vendor/core/dist/tool-policy.js +0 -305
- package/vendor/core/dist/utils/sentry-scrubber.d.ts +0 -29
- package/vendor/core/dist/utils/sentry-scrubber.js +0 -228
|
@@ -6,11 +6,99 @@
|
|
|
6
6
|
* surfaces a new sensitive shape.
|
|
7
7
|
*/
|
|
8
8
|
const REDACTED = '[REDACTED]';
|
|
9
|
-
//
|
|
10
|
-
//
|
|
11
|
-
//
|
|
12
|
-
|
|
13
|
-
|
|
9
|
+
// Keep this module dependency-free: it is also bundled into connector isolates.
|
|
10
|
+
// Match credential suffixes even in concatenated names such as PGPASSWORD.
|
|
11
|
+
// The token scanner bounds the work; requiring a prefix delimiter loses secrets.
|
|
12
|
+
const SECRET_KEY = /(?:api[_-]?key|access[_-]?token|refresh[_-]?token|id[_-]?token|auth[_-]?token|client[_-]?secret|secret(?:[_-]access)?[_-]?key|private[_-]?key|token|secret|password|passwd|credentials?|authorization|auth|bearer|cookies?|set[_-]cookie|session[_-]?id)s?$/i;
|
|
13
|
+
export function isSecretOutputKey(key) {
|
|
14
|
+
const normalized = key.replace(/([a-z0-9])([A-Z])/g, '$1_$2');
|
|
15
|
+
return SECRET_KEY.test(key) || SECRET_KEY.test(normalized) ||
|
|
16
|
+
(key.toUpperCase().includes('AWS_') && /(?:KEY|TOKEN|SECRET)$/i.test(key));
|
|
17
|
+
}
|
|
18
|
+
function quotedValueEnd(text, start, delimiter) {
|
|
19
|
+
const quote = delimiter.at(-1);
|
|
20
|
+
const escapes = delimiter.length - 1;
|
|
21
|
+
// A quote closes embedded JSON only at the opening delimiter's escaping layer.
|
|
22
|
+
let end = start;
|
|
23
|
+
while (end < text.length) {
|
|
24
|
+
const runStart = end;
|
|
25
|
+
while (text[end] === '\\')
|
|
26
|
+
end++;
|
|
27
|
+
if (text[end] === quote && (end - runStart) % (2 * (escapes + 1)) === escapes) {
|
|
28
|
+
return end - escapes;
|
|
29
|
+
}
|
|
30
|
+
if (end < text.length)
|
|
31
|
+
end++;
|
|
32
|
+
}
|
|
33
|
+
return end;
|
|
34
|
+
}
|
|
35
|
+
// Consume whole key tokens once, then scan only explicitly assigned secret values.
|
|
36
|
+
// A length threshold misses short passwords; unbounded key-search regexes can
|
|
37
|
+
// repeatedly rescan long malformed log lines.
|
|
38
|
+
function redactAssignments(text) {
|
|
39
|
+
const keys = /[\w.-]+/g;
|
|
40
|
+
const assignment = /(\\*["'])?\s*[:=]\s*(\\*["'])?/y;
|
|
41
|
+
const authScheme = /(?:Bearer|Basic)\s+/iy;
|
|
42
|
+
const parts = [];
|
|
43
|
+
let copied = 0;
|
|
44
|
+
let key;
|
|
45
|
+
while ((key = keys.exec(text))) {
|
|
46
|
+
if (!isSecretOutputKey(key[0]))
|
|
47
|
+
continue;
|
|
48
|
+
assignment.lastIndex = keys.lastIndex;
|
|
49
|
+
const separator = assignment.exec(text);
|
|
50
|
+
if (!separator)
|
|
51
|
+
continue;
|
|
52
|
+
const start = assignment.lastIndex;
|
|
53
|
+
const delimiter = separator[2];
|
|
54
|
+
let end = start;
|
|
55
|
+
let replacement = REDACTED;
|
|
56
|
+
if (!delimiter && text.startsWith(REDACTED, start)) {
|
|
57
|
+
keys.lastIndex = start + REDACTED.length;
|
|
58
|
+
continue;
|
|
59
|
+
}
|
|
60
|
+
if (delimiter) {
|
|
61
|
+
end = quotedValueEnd(text, start, delimiter);
|
|
62
|
+
}
|
|
63
|
+
else if (text[start] === '{' || text[start] === '[') {
|
|
64
|
+
// Secret containers hide every descendant, even those with ordinary keys.
|
|
65
|
+
let depth = 0;
|
|
66
|
+
do {
|
|
67
|
+
const quoteStart = end;
|
|
68
|
+
while (text[end] === '\\')
|
|
69
|
+
end++;
|
|
70
|
+
if (text[end] === '"' || text[end] === "'") {
|
|
71
|
+
const quote = text.slice(quoteStart, end + 1);
|
|
72
|
+
end = quotedValueEnd(text, end + 1, quote) + quote.length;
|
|
73
|
+
continue;
|
|
74
|
+
}
|
|
75
|
+
if (text[end] === '{' || text[end] === '[')
|
|
76
|
+
depth++;
|
|
77
|
+
if (text[end] === '}' || text[end] === ']')
|
|
78
|
+
depth--;
|
|
79
|
+
end++;
|
|
80
|
+
} while (depth > 0 && end < text.length);
|
|
81
|
+
const quote = separator[1] ?? '"';
|
|
82
|
+
replacement = `${quote}${REDACTED}${quote}`;
|
|
83
|
+
}
|
|
84
|
+
else {
|
|
85
|
+
// An unquoted authentication value includes its scheme and credential.
|
|
86
|
+
// Removing only the scheme would hide it from later token redaction.
|
|
87
|
+
authScheme.lastIndex = start;
|
|
88
|
+
if (authScheme.test(text))
|
|
89
|
+
end = authScheme.lastIndex;
|
|
90
|
+
while (end < text.length && !/[\s,;&}\]"']/.test(text[end]))
|
|
91
|
+
end++;
|
|
92
|
+
}
|
|
93
|
+
if (end > start) {
|
|
94
|
+
parts.push(text.slice(copied, start), replacement);
|
|
95
|
+
copied = end;
|
|
96
|
+
}
|
|
97
|
+
keys.lastIndex = end;
|
|
98
|
+
}
|
|
99
|
+
parts.push(text.slice(copied));
|
|
100
|
+
return parts.join('');
|
|
101
|
+
}
|
|
14
102
|
const PATTERNS = [
|
|
15
103
|
// HTTP Authorization header (e.g. "Authorization: Bearer abc...") — match
|
|
16
104
|
// the rest of the line so multi-token schemes like "Bearer xxx" get caught.
|
|
@@ -23,34 +111,17 @@ const PATTERNS = [
|
|
|
23
111
|
{ regex: /eyJ[\w\-]+\.[\w\-]+\.[\w\-]+/g, replacement: REDACTED },
|
|
24
112
|
// Google OAuth access token shape (ya29.<varies>) — high-confidence.
|
|
25
113
|
{ regex: /ya29\.[\w\-.]{20,}/g, replacement: REDACTED },
|
|
26
|
-
//
|
|
27
|
-
//
|
|
114
|
+
// Bound the scheme search so a long non-URI token is not rescanned at every
|
|
115
|
+
// character. Retain the scheme, username and host for diagnostics.
|
|
28
116
|
{
|
|
29
|
-
regex: /([a-z][a-z0-9
|
|
117
|
+
regex: /([a-z][a-z0-9+.-]{0,63}:\/\/[^:/\s]+):([^@/\s]+)@/gi,
|
|
30
118
|
replacement: `$1:${REDACTED}@`,
|
|
31
119
|
},
|
|
32
|
-
// CH_API_KEY=value (literal env-var key from the connector ecosystem)
|
|
33
|
-
{
|
|
34
|
-
regex: /(CH_API_KEY)(["'\s:=]+["']?)([\w\-]+)(["']?)/gi,
|
|
35
|
-
replacement: `$1$2${REDACTED}$4`,
|
|
36
|
-
},
|
|
37
|
-
// AWS_<SOMETHING>_KEY / AWS_<SOMETHING>_TOKEN env-style.
|
|
38
|
-
{
|
|
39
|
-
regex: new RegExp(`(AWS_[A-Z0-9_]*(?:KEY|TOKEN|SECRET))(["'\\s:=]+["']?)(${SECRET_VALUE})(["']?)`, 'g'),
|
|
40
|
-
replacement: `$1$2${REDACTED}$4`,
|
|
41
|
-
},
|
|
42
|
-
// JSON/YAML/env-var style `api_key=...`, `apikey: "..."`, `access_token: ...`,
|
|
43
|
-
// `secret = "..."`, `refresh_token: ...`, `id_token=...`, `_authToken: ...`,
|
|
44
|
-
// `password: "..."`, `client_secret=...`.
|
|
45
|
-
{
|
|
46
|
-
regex: new RegExp(`((?:api[_-]?key|apikey|access[_-]?token|refresh[_-]?token|id[_-]?token|_?auth[_-]?token|client[_-]?secret|secret|password))(["'\\s:=]+["']?)(${SECRET_VALUE})(["']?)`, 'gi'),
|
|
47
|
-
replacement: `$1$2${REDACTED}$4`,
|
|
48
|
-
},
|
|
49
120
|
];
|
|
50
121
|
export function redactOutput(text) {
|
|
51
122
|
if (!text)
|
|
52
123
|
return text;
|
|
53
|
-
let result = text;
|
|
124
|
+
let result = redactAssignments(text);
|
|
54
125
|
for (const { regex, replacement } of PATTERNS) {
|
|
55
126
|
result = result.replace(regex, replacement);
|
|
56
127
|
}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import type { EventEnvelope } from '@lobu/connector-sdk';
|
|
2
|
+
import type { ContentItem } from '@lobu/core/contracts/worker/protocol';
|
|
1
3
|
import type { ExecutionHooks, ExecutorJob, ExecutorResult, SyncExecutor } from './interface.js';
|
|
2
4
|
/**
|
|
3
5
|
* Top-level entry point used by the daemon executor. Just delegates to the
|
|
@@ -18,4 +20,9 @@ export declare function executeCompiledConnector(params: {
|
|
|
18
20
|
* unrestricted; an EMPTY list denies everything. */
|
|
19
21
|
allowedDomains?: readonly string[];
|
|
20
22
|
}): Promise<ExecutorResult>;
|
|
23
|
+
/**
|
|
24
|
+
* Convert a V1 EventEnvelope (the SDK's standard sync output) into the
|
|
25
|
+
* gateway-bound ContentItem shape (without an embedding).
|
|
26
|
+
*/
|
|
27
|
+
export declare function envelopeToContentItem(event: EventEnvelope): ContentItem;
|
|
21
28
|
//# sourceMappingURL=runtime.d.ts.map
|
|
@@ -9,4 +9,30 @@ export async function executeCompiledConnector(params) {
|
|
|
9
9
|
(await selectExecutor({ timeoutMs: params.timeoutMs, allowedDomains: params.allowedDomains }));
|
|
10
10
|
return executor.execute(params.compiledCode, params.job, params.hooks);
|
|
11
11
|
}
|
|
12
|
+
/**
|
|
13
|
+
* Convert a V1 EventEnvelope (the SDK's standard sync output) into the
|
|
14
|
+
* gateway-bound ContentItem shape (without an embedding).
|
|
15
|
+
*/
|
|
16
|
+
export function envelopeToContentItem(event) {
|
|
17
|
+
const occurredAtIso = event.occurred_at instanceof Date
|
|
18
|
+
? event.occurred_at.toISOString()
|
|
19
|
+
: event.occurred_at;
|
|
20
|
+
return {
|
|
21
|
+
id: event.origin_id,
|
|
22
|
+
title: event.title,
|
|
23
|
+
payload_type: event.payload_type,
|
|
24
|
+
payload_text: event.payload_text,
|
|
25
|
+
payload_data: event.payload_data,
|
|
26
|
+
attachments: event.attachments,
|
|
27
|
+
author_name: event.author_name,
|
|
28
|
+
occurred_at: occurredAtIso,
|
|
29
|
+
source_url: event.source_url ?? undefined,
|
|
30
|
+
score: typeof event.score === 'number' ? event.score : 0,
|
|
31
|
+
metadata: event.metadata ?? {},
|
|
32
|
+
origin_parent_id: event.origin_parent_id ?? undefined,
|
|
33
|
+
origin_type: event.origin_type,
|
|
34
|
+
semantic_type: event.semantic_type ?? event.origin_type,
|
|
35
|
+
automation_signals: event.automation_signals,
|
|
36
|
+
};
|
|
37
|
+
}
|
|
12
38
|
//# sourceMappingURL=runtime.js.map
|
|
@@ -185,7 +185,9 @@ export class IsolateHost {
|
|
|
185
185
|
return await script.run(this.context, {
|
|
186
186
|
promise: true,
|
|
187
187
|
copy: true,
|
|
188
|
-
|
|
188
|
+
// The host's single deadline covers compilation, synchronous work,
|
|
189
|
+
// and continuations after await. A second V8 deadline at the same
|
|
190
|
+
// instant races the typed termination and leaks a guest-error result.
|
|
189
191
|
});
|
|
190
192
|
}
|
|
191
193
|
catch (error) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env bun
|
|
2
2
|
import packageJson from '../package.json' with { type: 'json' };
|
|
3
3
|
import { configureCliSupervisorCommand, runPackagedCliSupervisor, } from './daemon/automation-process.js';
|
|
4
|
-
import { INTERNAL_ACP_ADAPTER_ARG, macDeviceDaemonMetadata, packagedDaemonArgs, runMacDeviceDaemon, validateMacDeviceDaemonOptions, } from './daemon/mac-device-daemon.js';
|
|
4
|
+
import { INTERNAL_ACP_ADAPTER_ARG, MAC_DAEMON_CREDENTIAL_REJECTED_EXIT, macDeviceDaemonExitCode, macDeviceDaemonMetadata, packagedDaemonArgs, runMacDeviceDaemon, validateMacDeviceDaemonOptions, } from './daemon/mac-device-daemon.js';
|
|
5
5
|
import { NATIVE_BRIDGE_PROTOCOL } from './daemon/native-bridge/protocol.js';
|
|
6
6
|
const VERSION = packageJson.version;
|
|
7
7
|
const INTERNAL_CLI_SUPERVISOR_ARG = '--internal-cli-supervisor';
|
|
@@ -19,7 +19,8 @@ Options:
|
|
|
19
19
|
--api-url <url> Worker API origin (or API_URL)
|
|
20
20
|
--worker-id <id> Device identity (default: macos:<hostname>)
|
|
21
21
|
--poll-interval-ms <ms> Poll interval (default: 10000)
|
|
22
|
-
--max-concurrent-jobs <n> Maximum active
|
|
22
|
+
--max-concurrent-jobs <n> Maximum active runs (default: half the host's
|
|
23
|
+
threads, clamped to 2-8)
|
|
23
24
|
--default-agent-kind <kind> Agent fallback for Automations without a kind
|
|
24
25
|
--supervised-stdio Treat stdin EOF as a supervised-parent shutdown
|
|
25
26
|
--no-poll Validate the executable without contacting a server
|
|
@@ -85,6 +86,12 @@ function option(options, key) {
|
|
|
85
86
|
throw new Error(`--${key} requires a value`);
|
|
86
87
|
return value;
|
|
87
88
|
}
|
|
89
|
+
function parsePositiveInt(raw, flag) {
|
|
90
|
+
if (!/^[1-9]\d*$/.test(raw)) {
|
|
91
|
+
throw new Error(`${flag} must be a positive integer (got '${raw}')`);
|
|
92
|
+
}
|
|
93
|
+
return Number(raw);
|
|
94
|
+
}
|
|
88
95
|
async function main() {
|
|
89
96
|
const args = process.argv.slice(2);
|
|
90
97
|
const raw = parseArgs(args);
|
|
@@ -93,8 +100,6 @@ async function main() {
|
|
|
93
100
|
return;
|
|
94
101
|
}
|
|
95
102
|
if (raw.version) {
|
|
96
|
-
if (raw.version !== true)
|
|
97
|
-
throw new Error('--version does not accept a value');
|
|
98
103
|
process.stdout.write(`${JSON.stringify(macDeviceDaemonMetadata(VERSION))}\n`);
|
|
99
104
|
return;
|
|
100
105
|
}
|
|
@@ -106,44 +111,28 @@ async function main() {
|
|
|
106
111
|
const defaultAgentKind = option(raw, 'default-agent-kind');
|
|
107
112
|
const supervisedStdio = raw['supervised-stdio'] === true;
|
|
108
113
|
const debug = raw.debug === true;
|
|
109
|
-
if (raw.debug !== undefined && !debug)
|
|
110
|
-
throw new Error('--debug does not accept a value');
|
|
111
|
-
if (raw['no-poll'] !== undefined && !noPoll) {
|
|
112
|
-
throw new Error('--no-poll does not accept a value');
|
|
113
|
-
}
|
|
114
|
-
if (raw['supervised-stdio'] !== undefined && !supervisedStdio) {
|
|
115
|
-
throw new Error('--supervised-stdio does not accept a value');
|
|
116
|
-
}
|
|
117
114
|
const options = {
|
|
118
115
|
apiUrl,
|
|
119
116
|
workerId,
|
|
120
117
|
workerApiToken: process.env.WORKER_API_TOKEN,
|
|
121
118
|
version: VERSION,
|
|
122
|
-
...(pollInterval
|
|
123
|
-
|
|
119
|
+
...(pollInterval
|
|
120
|
+
? { pollIntervalMs: parsePositiveInt(pollInterval, '--poll-interval-ms') }
|
|
121
|
+
: {}),
|
|
122
|
+
...(maxConcurrent
|
|
123
|
+
? { maxConcurrentJobs: parsePositiveInt(maxConcurrent, '--max-concurrent-jobs') }
|
|
124
|
+
: {}),
|
|
124
125
|
...(defaultAgentKind ? { defaultAgentKind: defaultAgentKind } : {}),
|
|
125
126
|
debug,
|
|
126
127
|
noPoll,
|
|
127
128
|
supervisedStdio,
|
|
128
129
|
};
|
|
129
|
-
|
|
130
|
-
if (!/^[1-9]\d*$/.test(pollInterval)) {
|
|
131
|
-
throw new Error(`--poll-interval-ms must be a positive integer (got '${pollInterval}')`);
|
|
132
|
-
}
|
|
133
|
-
options.pollIntervalMs = Number(pollInterval);
|
|
134
|
-
}
|
|
135
|
-
if (maxConcurrent) {
|
|
136
|
-
if (!/^[1-9]\d*$/.test(maxConcurrent)) {
|
|
137
|
-
throw new Error(`--max-concurrent-jobs must be a positive integer (got '${maxConcurrent}')`);
|
|
138
|
-
}
|
|
139
|
-
options.maxConcurrentJobs = Number(maxConcurrent);
|
|
140
|
-
}
|
|
141
|
-
validateMacDeviceDaemonOptions(options);
|
|
130
|
+
const validated = validateMacDeviceDaemonOptions(options);
|
|
142
131
|
if (noPoll) {
|
|
143
132
|
process.stdout.write(`${JSON.stringify(macDeviceDaemonMetadata(VERSION))}\n`);
|
|
144
133
|
return;
|
|
145
134
|
}
|
|
146
|
-
await runMacDeviceDaemon(
|
|
135
|
+
await runMacDeviceDaemon(validated);
|
|
147
136
|
}
|
|
148
137
|
async function start() {
|
|
149
138
|
if (process.argv[2] === INTERNAL_CLI_SUPERVISOR_ARG) {
|
|
@@ -179,6 +168,12 @@ async function start() {
|
|
|
179
168
|
}
|
|
180
169
|
start().catch((error) => {
|
|
181
170
|
process.stderr.write(`error: ${error instanceof Error ? error.message : String(error)}\n`);
|
|
182
|
-
|
|
171
|
+
const exitCode = macDeviceDaemonExitCode(error);
|
|
172
|
+
// The supervised stdin stays open until the app observes our exit. Exiting
|
|
173
|
+
// also triggers the CLI supervisors' parent-loss cleanup and native-run
|
|
174
|
+
// cancellation in the app; waiting for stdio EOF would deadlock relinking.
|
|
175
|
+
if (exitCode === MAC_DAEMON_CREDENTIAL_REJECTED_EXIT)
|
|
176
|
+
process.exit(exitCode);
|
|
177
|
+
process.exitCode = exitCode;
|
|
183
178
|
});
|
|
184
179
|
//# sourceMappingURL=mac-device-daemon.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lobu/connector-worker",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "23.0.0",
|
|
4
4
|
"description": "Self-hosted worker for Lobu memory — connectors and embedding generation",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
"esbuild": "^0.28.1",
|
|
71
71
|
"just-bash": "^2.14.2",
|
|
72
72
|
"pathe": "^2.0.3",
|
|
73
|
-
"undici": "7.29.
|
|
73
|
+
"undici": "7.29.1"
|
|
74
74
|
},
|
|
75
75
|
"optionalDependencies": {
|
|
76
76
|
"isolated-vm": "^6.2.0",
|
|
@@ -28,7 +28,7 @@ exports.CUSTOM_TOOL_METADATA = {
|
|
|
28
28
|
description: "Post a message to one of your conversations. Pass a conversation handle (from list_conversations) to post to the channel, or a thread handle (returned by a previous send_message) to reply in that thread. This is how an automated/scheduled run speaks in its channel.",
|
|
29
29
|
},
|
|
30
30
|
present_event: {
|
|
31
|
-
description: "
|
|
31
|
+
description: "Present an existing Lobu event as a summary and Open event link in the current conversation. Custom interactions open in its React view. Use the event id returned by knowledge.save; do not hand-author platform card JSON or action ids.",
|
|
32
32
|
},
|
|
33
33
|
schedule_followup: {
|
|
34
34
|
description: "Schedule one durable future wake-up for yourself in the current conversation. The server fixes the agent and destination from the signed turn; provide a stable idempotency key so retries do not duplicate the wake-up.",
|
|
@@ -57,6 +57,8 @@ export interface ConnectionSettings {
|
|
|
57
57
|
export interface StoredConnection {
|
|
58
58
|
id: string;
|
|
59
59
|
platform: string;
|
|
60
|
+
/** Verified Lobu creator, recorded on first insert and preserved on updates. */
|
|
61
|
+
createdBy?: string;
|
|
60
62
|
agentId?: string;
|
|
61
63
|
/**
|
|
62
64
|
* Organization id this connection belongs to. Optional in the type for
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* importing the barrel is what made those packages unbundleable, not anything
|
|
9
9
|
* in the tools themselves.
|
|
10
10
|
*
|
|
11
|
-
* Everything re-exported here is pure. Same standing rule as `
|
|
11
|
+
* Everything re-exported here is pure. Same standing rule as `shell-safety.ts`:
|
|
12
12
|
* never grow a Node import or a root `@lobu/core` import in this module or the
|
|
13
13
|
* modules it names, or the isolate lane loses its gateway tools with no
|
|
14
14
|
* compile error to say so — `assertIsolateEligible` catches it at run time.
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* importing the barrel is what made those packages unbundleable, not anything
|
|
10
10
|
* in the tools themselves.
|
|
11
11
|
*
|
|
12
|
-
* Everything re-exported here is pure. Same standing rule as `
|
|
12
|
+
* Everything re-exported here is pure. Same standing rule as `shell-safety.ts`:
|
|
13
13
|
* never grow a Node import or a root `@lobu/core` import in this module or the
|
|
14
14
|
* modules it names, or the isolate lane loses its gateway tools with no
|
|
15
15
|
* compile error to say so — `assertIsolateEligible` catches it at run time.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export declare const BROWSER_CAPABILITIES: readonly ["browser.tabs", "browser.scripting", "browser.history", "browser.bookmarks", "browser.downloads", "browser.notifications", "browser.debugger"];
|
|
2
2
|
export declare const OS_CAPABILITIES: readonly ["os.shell", "os.files", "os.notifications"];
|
|
3
3
|
export declare const IOS_CAPABILITIES: readonly ["ios.notifications", "ios.share-sheet", "ios.files"];
|
|
4
|
-
export declare const MAC_DEVICE_CAPABILITIES: readonly ["automations.execute", "screentime", "local_directory", "healthkit", "photos", "calendar", "reminders", "
|
|
4
|
+
export declare const MAC_DEVICE_CAPABILITIES: readonly ["automations.execute", "screentime", "local_directory", "healthkit", "photos", "calendar", "reminders", "computer_use"];
|
|
5
5
|
export declare const HEADLESS_CAPABILITIES: readonly ["os.shell", "os.files", "automations.execute"];
|
|
6
6
|
export interface CapabilityAuthorizationResult {
|
|
7
7
|
authorized: string[];
|
|
@@ -48,12 +48,13 @@ exports.MAC_DEVICE_CAPABILITIES = [
|
|
|
48
48
|
// existing instructions-only/legacy session handling.
|
|
49
49
|
"automations.execute",
|
|
50
50
|
"screentime",
|
|
51
|
+
// Advertised only by Mac builds released before the Local Folder removal.
|
|
52
|
+
// Drop with the `local.directory` platform allowance in device-manifests.ts.
|
|
51
53
|
"local_directory",
|
|
52
54
|
"healthkit",
|
|
53
55
|
"photos",
|
|
54
56
|
"calendar",
|
|
55
57
|
"reminders",
|
|
56
|
-
"system_audio",
|
|
57
58
|
"computer_use",
|
|
58
59
|
];
|
|
59
60
|
// A server/VM with no UI or browser (the herdr box, a CI node, a k8s pod).
|
|
@@ -20,6 +20,8 @@
|
|
|
20
20
|
export type ToolErrorCode =
|
|
21
21
|
/** No auth profile configured for a connector that requires one. */
|
|
22
22
|
"AUTH_MISSING"
|
|
23
|
+
/** Browser work stopped; an explicit bounded recovery or human handoff is required. */
|
|
24
|
+
| "BROWSER_INTERRUPTED"
|
|
23
25
|
/** Credentials were rejected by the upstream (HTTP 401/403). */
|
|
24
26
|
| "AUTH_INVALID"
|
|
25
27
|
/** Connector / feed / connection / resource does not exist (HTTP 404). */
|
|
@@ -104,4 +106,34 @@ export interface ToolErrorSignal {
|
|
|
104
106
|
* should source their retry decision from `isRetryable(classifyToolError(...))`.
|
|
105
107
|
*/
|
|
106
108
|
export declare function classifyToolError(signal: ToolErrorSignal): ToolErrorCode;
|
|
109
|
+
/** Produced at the connector's page boundary, never inferred from error prose. */
|
|
110
|
+
declare const PAGE_INTERRUPTION_REASON_VALUES: readonly ["challenge_required", "login_required", "account_mismatch", "loading_failure"];
|
|
111
|
+
export type BrowserInterruptionReason = (typeof PAGE_INTERRUPTION_REASON_VALUES)[number] | "timeout" | "recovery_unavailable";
|
|
112
|
+
export interface BrowserRecovery {
|
|
113
|
+
recovery_id: string;
|
|
114
|
+
expires_at: string;
|
|
115
|
+
tab_id: number;
|
|
116
|
+
target_id: string;
|
|
117
|
+
window_id: number;
|
|
118
|
+
device_worker_id: string;
|
|
119
|
+
chrome_connection_id: number;
|
|
120
|
+
}
|
|
121
|
+
export declare class BrowserInterruptionError extends ToolError {
|
|
122
|
+
readonly reason: BrowserInterruptionReason;
|
|
123
|
+
readonly recovery?: BrowserRecovery | undefined;
|
|
124
|
+
constructor(reason: BrowserInterruptionReason, message: string, recovery?: BrowserRecovery | undefined);
|
|
125
|
+
toJSON(): {
|
|
126
|
+
recovery?: BrowserRecovery | undefined;
|
|
127
|
+
reason: BrowserInterruptionReason;
|
|
128
|
+
code: ToolErrorCode;
|
|
129
|
+
retryable: boolean;
|
|
130
|
+
message: string;
|
|
131
|
+
call_id?: string;
|
|
132
|
+
};
|
|
133
|
+
}
|
|
134
|
+
export declare function browserPageInterruption(value: unknown): {
|
|
135
|
+
reason: BrowserInterruptionReason;
|
|
136
|
+
message: string;
|
|
137
|
+
} | undefined;
|
|
138
|
+
export {};
|
|
107
139
|
//# sourceMappingURL=connector-query-errors.d.ts.map
|
|
@@ -19,16 +19,21 @@
|
|
|
19
19
|
* pick the right code; the catalog is the single source of truth for retryability.
|
|
20
20
|
*/
|
|
21
21
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
-
exports.ToolError = exports.TOOL_ERRORS = void 0;
|
|
22
|
+
exports.BrowserInterruptionError = exports.ToolError = exports.TOOL_ERRORS = void 0;
|
|
23
23
|
exports.isRetryable = isRetryable;
|
|
24
24
|
exports.toToolErrorCode = toToolErrorCode;
|
|
25
25
|
exports.isToolError = isToolError;
|
|
26
26
|
exports.classifyToolError = classifyToolError;
|
|
27
|
+
exports.browserPageInterruption = browserPageInterruption;
|
|
27
28
|
exports.TOOL_ERRORS = {
|
|
28
29
|
AUTH_MISSING: {
|
|
29
30
|
retryable: false,
|
|
30
31
|
message: "No auth profile is configured for this connector.",
|
|
31
32
|
},
|
|
33
|
+
BROWSER_INTERRUPTED: {
|
|
34
|
+
retryable: false,
|
|
35
|
+
message: "Browser reading was interrupted; see interruption.reason for the next step.",
|
|
36
|
+
},
|
|
32
37
|
AUTH_INVALID: {
|
|
33
38
|
retryable: false,
|
|
34
39
|
message: "The connector's credentials were rejected.",
|
|
@@ -189,4 +194,39 @@ function classifyToolError(signal) {
|
|
|
189
194
|
}
|
|
190
195
|
return "INTERNAL";
|
|
191
196
|
}
|
|
197
|
+
/** Produced at the connector's page boundary, never inferred from error prose. */
|
|
198
|
+
const PAGE_INTERRUPTION_REASON_VALUES = [
|
|
199
|
+
"challenge_required",
|
|
200
|
+
"login_required",
|
|
201
|
+
"account_mismatch",
|
|
202
|
+
"loading_failure",
|
|
203
|
+
];
|
|
204
|
+
const PAGE_INTERRUPTION_REASONS = new Set(PAGE_INTERRUPTION_REASON_VALUES);
|
|
205
|
+
class BrowserInterruptionError extends ToolError {
|
|
206
|
+
constructor(reason, message, recovery) {
|
|
207
|
+
super("BROWSER_INTERRUPTED", message);
|
|
208
|
+
this.reason = reason;
|
|
209
|
+
this.recovery = recovery;
|
|
210
|
+
}
|
|
211
|
+
toJSON() {
|
|
212
|
+
return {
|
|
213
|
+
...super.toJSON(),
|
|
214
|
+
reason: this.reason,
|
|
215
|
+
...(this.recovery ? { recovery: this.recovery } : {}),
|
|
216
|
+
};
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
exports.BrowserInterruptionError = BrowserInterruptionError;
|
|
220
|
+
function browserPageInterruption(value) {
|
|
221
|
+
const marker = value?.__lobu_browser_interruption;
|
|
222
|
+
if (!marker ||
|
|
223
|
+
typeof marker.reason !== "string" ||
|
|
224
|
+
!PAGE_INTERRUPTION_REASONS.has(marker.reason) ||
|
|
225
|
+
typeof marker.message !== "string")
|
|
226
|
+
return undefined;
|
|
227
|
+
return {
|
|
228
|
+
reason: marker.reason,
|
|
229
|
+
message: marker.message.slice(0, 1000),
|
|
230
|
+
};
|
|
231
|
+
}
|
|
192
232
|
//# sourceMappingURL=connector-query-errors.js.map
|
|
@@ -35,12 +35,6 @@ export declare const NixConfigSchema: import("@sinclair/typebox").TObject<{
|
|
|
35
35
|
packages: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>>;
|
|
36
36
|
}>;
|
|
37
37
|
export type NixConfig = Static<typeof NixConfigSchema>;
|
|
38
|
-
export declare const ToolsConfigSchema: import("@sinclair/typebox").TObject<{
|
|
39
|
-
allowedTools: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>>;
|
|
40
|
-
deniedTools: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>>;
|
|
41
|
-
strictMode: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
|
42
|
-
}>;
|
|
43
|
-
export type ToolsConfig = Static<typeof ToolsConfigSchema>;
|
|
44
38
|
export declare const GuardrailStageSchema: import("@sinclair/typebox").TUnion<import("@sinclair/typebox").TLiteral<"input" | "output" | "pre-tool" | "egress">[]>;
|
|
45
39
|
/**
|
|
46
40
|
* Operator-authored guardrail on an agent.
|
|
@@ -142,11 +136,6 @@ export declare const AgentSettingsStoredSchema: import("@sinclair/typebox").TObj
|
|
|
142
136
|
thinkingLevel: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"off">, import("@sinclair/typebox").TLiteral<"low">, import("@sinclair/typebox").TLiteral<"medium">, import("@sinclair/typebox").TLiteral<"high">]>>;
|
|
143
137
|
}>>;
|
|
144
138
|
}>>;
|
|
145
|
-
toolsConfig: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
146
|
-
allowedTools: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>>;
|
|
147
|
-
deniedTools: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>>;
|
|
148
|
-
strictMode: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
|
149
|
-
}>>;
|
|
150
139
|
guardrails: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>>;
|
|
151
140
|
guardrailsInline: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
|
|
152
141
|
name: import("@sinclair/typebox").TString;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.AgentSettingsStoredSchema = exports.SkillsConfigSchema = exports.SkillConfigSchema = exports.AgentInlineGuardrailSchema = exports.GuardrailStageSchema = exports.
|
|
3
|
+
exports.AgentSettingsStoredSchema = exports.SkillsConfigSchema = exports.SkillConfigSchema = exports.AgentInlineGuardrailSchema = exports.GuardrailStageSchema = exports.NixConfigSchema = exports.NetworkConfigSchema = void 0;
|
|
4
4
|
/**
|
|
5
5
|
* AgentSettings TypeBox contract family — the single source for the agent
|
|
6
6
|
* settings shape across every surface (declarative, CLI apply, admin tools,
|
|
@@ -37,11 +37,6 @@ exports.NixConfigSchema = typebox_1.Type.Object({
|
|
|
37
37
|
flakeUrl: typebox_1.Type.Optional(typebox_1.Type.String()),
|
|
38
38
|
packages: typebox_1.Type.Optional(typebox_1.Type.Array(typebox_1.Type.String())),
|
|
39
39
|
});
|
|
40
|
-
exports.ToolsConfigSchema = typebox_1.Type.Object({
|
|
41
|
-
allowedTools: typebox_1.Type.Optional(typebox_1.Type.Array(typebox_1.Type.String())),
|
|
42
|
-
deniedTools: typebox_1.Type.Optional(typebox_1.Type.Array(typebox_1.Type.String())),
|
|
43
|
-
strictMode: typebox_1.Type.Optional(typebox_1.Type.Boolean()),
|
|
44
|
-
});
|
|
45
40
|
// GuardrailStage lives in guardrails/types.ts as the canonical union. The
|
|
46
41
|
// schema mirrors it exactly; if the union grows, the _StageCheck assertion
|
|
47
42
|
// below fails at compile time. (TypeBox can't derive from a TS type at
|
|
@@ -130,7 +125,6 @@ exports.AgentSettingsStoredSchema = typebox_1.Type.Object({
|
|
|
130
125
|
userMd: typebox_1.Type.Optional(typebox_1.Type.String()),
|
|
131
126
|
identityMd: typebox_1.Type.Optional(typebox_1.Type.String()),
|
|
132
127
|
skillsConfig: typebox_1.Type.Optional(exports.SkillsConfigSchema),
|
|
133
|
-
toolsConfig: typebox_1.Type.Optional(exports.ToolsConfigSchema),
|
|
134
128
|
guardrails: typebox_1.Type.Optional(typebox_1.Type.Array(typebox_1.Type.String())),
|
|
135
129
|
guardrailsInline: typebox_1.Type.Optional(typebox_1.Type.Array(exports.AgentInlineGuardrailSchema)),
|
|
136
130
|
sandboxId: typebox_1.Type.Optional(typebox_1.Type.String()),
|