@lobu/runtime-device 20.0.1 → 20.1.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.
Files changed (39) hide show
  1. package/dist/component.json +1 -1
  2. package/dist/dependencies.bun.lock +8 -8
  3. package/npm-shrinkwrap.json +32 -32
  4. package/package.json +1 -1
  5. package/vendor/cli/dist/commands/_lib/apply/map-config.js +7 -3
  6. package/vendor/cli/dist/commands/call.d.ts +2 -1
  7. package/vendor/cli/dist/commands/call.js +8 -2
  8. package/vendor/cli/dist/commands/dev.js +2 -2
  9. package/vendor/cli/dist/commands/doctor.js +3 -12
  10. package/vendor/cli/dist/commands/init.js +15 -3
  11. package/vendor/cli/dist/commands/memory/_lib/errors.d.ts +12 -0
  12. package/vendor/cli/dist/commands/memory/_lib/errors.js +21 -0
  13. package/vendor/cli/dist/commands/memory/run.js +7 -1
  14. package/vendor/cli/dist/commands/telemetry.js +2 -11
  15. package/vendor/cli/dist/commands/token.js +20 -3
  16. package/vendor/cli/dist/connectors/chat-user-identity.ts +45 -0
  17. package/vendor/cli/dist/connectors/google-identity.ts +107 -0
  18. package/vendor/cli/dist/connectors/google_drive.ts +36 -151
  19. package/vendor/cli/dist/connectors/google_gmail.ts +149 -0
  20. package/vendor/cli/dist/connectors/microsoft_outlook.ts +193 -0
  21. package/vendor/cli/dist/connectors/slack-identity.ts +20 -0
  22. package/vendor/cli/dist/internal/credentials.js +8 -0
  23. package/vendor/cli/dist/internal/env-file.d.ts +8 -0
  24. package/vendor/cli/dist/internal/env-file.js +21 -0
  25. package/vendor/cli/dist/runtime-components.json +4 -4
  26. package/vendor/cli/package.json +1 -1
  27. package/vendor/connector-sdk/dist/file-output.d.ts +97 -0
  28. package/vendor/connector-sdk/dist/file-output.js +176 -0
  29. package/vendor/connector-sdk/dist/index.d.ts +2 -0
  30. package/vendor/connector-sdk/dist/index.js +1 -0
  31. package/vendor/connector-sdk/package.json +1 -1
  32. package/vendor/connector-worker/dist/executor/isolate.js +6 -1
  33. package/vendor/connector-worker/package.json +1 -1
  34. package/vendor/core/dist/classify-error.js +50 -2
  35. package/vendor/core/dist/constants.d.ts +13 -6
  36. package/vendor/core/dist/constants.js +22 -8
  37. package/vendor/core/dist/errors.d.ts +20 -0
  38. package/vendor/core/dist/errors.js +21 -1
  39. package/vendor/core/package.json +1 -1
@@ -6,6 +6,6 @@
6
6
  "connector": "node_modules/@lobu/cli/dist/commands/connector.js",
7
7
  "worker": "node_modules/@lobu/connector-worker/dist/bin.js"
8
8
  },
9
- "version": "20.0.1",
9
+ "version": "20.1.0",
10
10
  "verify": "dist/verify.mjs"
11
11
  }
@@ -22,7 +22,7 @@
22
22
 
23
23
  "@anthropic-ai/sdk": ["@anthropic-ai/sdk@0.91.1", "", { "dependencies": { "json-schema-to-ts": "^3.1.1" }, "peerDependencies": { "zod": "^3.25.0 || ^4.0.0" }, "bin": { "anthropic-ai-sdk": "bin/cli" } }, "sha512-LAmu761tSN9r66ixvmciswUj/ZC+1Q4iAfpedTfSVLeswRwnY3n2Nb6Tsk+cLPP28aLOPWeMgIuTuCcMC6W/iw=="],
24
24
 
25
- "@aws-sdk/client-bedrock-runtime": ["@aws-sdk/client-bedrock-runtime@3.1131.0", "", { "dependencies": { "@aws-sdk/core": "^3.978.0", "@aws-sdk/credential-provider-node": "^3.972.83", "@aws-sdk/eventstream-handler-node": "^3.972.34", "@aws-sdk/middleware-eventstream": "^3.972.29", "@aws-sdk/middleware-websocket": "^3.972.53", "@aws-sdk/token-providers": "3.1131.0", "@aws-sdk/types": "^3.974.5", "@smithy/core": "^3.33.3", "@smithy/fetch-http-handler": "^5.7.2", "@smithy/node-http-handler": "^4.11.3", "@smithy/types": "^4.17.2", "tslib": "^2.6.2" } }, "sha512-q0MTJy3yknOJDt7RfX156CZ/RMkp9X0dWUNBkhEaPU3l+rLV5VYkjsbucF1397UD4eKu1AiMKfP62yE08zblBg=="],
25
+ "@aws-sdk/client-bedrock-runtime": ["@aws-sdk/client-bedrock-runtime@3.1133.0", "", { "dependencies": { "@aws-sdk/core": "^3.978.0", "@aws-sdk/credential-provider-node": "^3.972.83", "@aws-sdk/eventstream-handler-node": "^3.972.34", "@aws-sdk/middleware-eventstream": "^3.972.29", "@aws-sdk/middleware-websocket": "^3.972.53", "@aws-sdk/token-providers": "3.1133.0", "@aws-sdk/types": "^3.974.5", "@smithy/core": "^3.33.3", "@smithy/fetch-http-handler": "^5.7.2", "@smithy/node-http-handler": "^4.11.3", "@smithy/types": "^4.17.2", "tslib": "^2.6.2" } }, "sha512-4yieaqZc7JI396eBjccci390QyLK9CW5S+6fIxiLZEYSGCPD6hrJEleVJkmH4hFBFFx4Q6KPaDScMC/FUYaQtA=="],
26
26
 
27
27
  "@aws-sdk/core": ["@aws-sdk/core@3.978.0", "", { "dependencies": { "@aws-sdk/types": "^3.974.5", "@aws-sdk/xml-builder": "^3.972.40", "@aws/lambda-invoke-store": "^0.3.0", "@smithy/core": "^3.33.3", "@smithy/signature-v4": "^5.6.12", "@smithy/types": "^4.17.2", "bowser": "^2.11.0", "tslib": "^2.6.2" } }, "sha512-2yX9LUmxPklVjSGTb8dfnWRJSiFQ3TeH2nn7G1mdKHTfnabzF0+gfrS8rYfLWmZrQ8A3mEcxMJjRc51dL5KWaA=="],
28
28
 
@@ -52,7 +52,7 @@
52
52
 
53
53
  "@aws-sdk/signature-v4-multi-region": ["@aws-sdk/signature-v4-multi-region@3.996.46", "", { "dependencies": { "@aws-sdk/types": "^3.974.5", "@smithy/signature-v4": "^5.6.12", "@smithy/types": "^4.17.2", "tslib": "^2.6.2" } }, "sha512-L+2xZTye/2T96f3lwCws0Zw6GG2JHZW9e8FpVgGBeeExSKyeoZ6CWRpBml/7DNiK/O26jrgPM9F+Ay8VkgzUWQ=="],
54
54
 
55
- "@aws-sdk/token-providers": ["@aws-sdk/token-providers@3.1131.0", "", { "dependencies": { "@aws-sdk/core": "^3.978.0", "@aws-sdk/nested-clients": "^3.997.45", "@aws-sdk/types": "^3.974.5", "@smithy/core": "^3.33.3", "@smithy/types": "^4.17.2", "tslib": "^2.6.2" } }, "sha512-csUjJ+GsvyjPJhtTURYP2yzZKduVw7VA8L1OpTm39RiA1VYR1eiO7uihOcvXXVOgbaL2GoH4FTGx6X+6s1p6tA=="],
55
+ "@aws-sdk/token-providers": ["@aws-sdk/token-providers@3.1133.0", "", { "dependencies": { "@aws-sdk/core": "^3.978.0", "@aws-sdk/nested-clients": "^3.997.45", "@aws-sdk/types": "^3.974.5", "@smithy/core": "^3.33.3", "@smithy/types": "^4.17.2", "tslib": "^2.6.2" } }, "sha512-CwH8Dc1ACC+G+CGBOjRhQLUI8o7c+O8Q1fsXHeot2Vi5VSD6UPVsKAqoWiFj7yW/r+QB5kN4QWWV9GWi810LfQ=="],
56
56
 
57
57
  "@aws-sdk/types": ["@aws-sdk/types@3.974.5", "", { "dependencies": { "@smithy/types": "^4.17.2", "tslib": "^2.6.2" } }, "sha512-LkwLL2BLbC6wNNm4JaH9mbEqBMdOZCct6VAYqhdN4U1xrWM+fUJQEfbHwQgDypapOWTRtlk25akb5afM0P8CIQ=="],
58
58
 
@@ -282,7 +282,7 @@
282
282
 
283
283
  "@tootallnate/quickjs-emscripten": ["@tootallnate/quickjs-emscripten@0.23.0", "", {}, "sha512-C5Mc6rdnsaJDjO3UpGW/CQTHtCKaYlScZTly4JIu97Jxo/odCiH0ITnDXSJPTOrEKk/ycSZ0AOgTmkDtkOsvIA=="],
284
284
 
285
- "@types/node": ["@types/node@26.5.1", "", { "dependencies": { "undici-types": "~8.9.0" } }, "sha512-CzNm2FezW4VR/LjG6yUdiEgLE/rAQ9Slj5gCu/C2VrdcW7I0ahNZ8DRbHT7zOZ6r3ONgd/bsQIeSaoDGrd1C6g=="],
285
+ "@types/node": ["@types/node@22.20.3", "", { "dependencies": { "undici-types": "~6.21.0" } }, "sha512-DZmzkmwHzXrLPAXPyKNDzlIwMMUZCVacoD25ywdy5YTKGbOx/2ld+Q38Im2zJ0vBuZP5Prd3VZutKZyXwkOS8A=="],
286
286
 
287
287
  "@types/retry": ["@types/retry@0.12.0", "", {}, "sha512-wWKOClTTiizcZhXnPY4wikVAwmdYHp8q6DmC+EJUzAMsycb7HB32Kh9RN4+0gExjmPmZSAQjgURXIGATPegAvA=="],
288
288
 
@@ -326,7 +326,7 @@
326
326
 
327
327
  "bowser": ["bowser@2.14.1", "", {}, "sha512-tzPjzCxygAKWFOJP011oxFHs57HzIhOEracIgAePE4pqB3LikALKnSzUyU4MGs9/iCEUuHlAJTjTc5M+u7YEGg=="],
328
328
 
329
- "brace-expansion": ["brace-expansion@5.0.9", "", { "dependencies": { "balanced-match": "^4.0.2" } }, "sha512-ScQ4IuvIEF1TMlP7Zt+vjJ//9zlPb2SDcxWxM3bk8s6t6GGdJ7KO1dCcTidOPJKePW30LE/2cT7wCyPho9/Wxg=="],
329
+ "brace-expansion": ["brace-expansion@5.0.12", "", { "dependencies": { "balanced-match": "^4.0.2" } }, "sha512-YovQ3rzhaLMIrDjNDMkNS01tea93qhEhG5xy8f6+R0l+dw3Ki+5sCoIoI942iuLZTHWogWktgwVDhU09iNEimQ=="],
330
330
 
331
331
  "buffer": ["buffer@6.0.3", "", { "dependencies": { "base64-js": "^1.3.1", "ieee754": "^1.2.1" } }, "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA=="],
332
332
 
@@ -450,7 +450,7 @@
450
450
 
451
451
  "fast-string-width": ["fast-string-width@3.0.2", "", { "dependencies": { "fast-string-truncated-width": "^3.0.2" } }, "sha512-gX8LrtNEI5hq8DVUfRQMbr5lpaS4nMIWV+7XEbXk2b8kiQIizgnlr12B4dA3ZEx3308ze0O4Q1R+cHts8kyUJg=="],
452
452
 
453
- "fast-uri": ["fast-uri@3.1.7", "", {}, "sha512-dOvZVzjdZdz7phd9v6jCbwxrBW3fK6n8Rc0CtdmM4bumzMnxywBYhuph6J819RRw/ku+rLbelwfMunktuzVVHg=="],
453
+ "fast-uri": ["fast-uri@3.1.8", "", {}, "sha512-GZMtZUTNRpOVIECoXwLNZS5xUGE+mVNbTB8h/7Rwh2TFWcBQiPzTgyZi05BF9UMZKkLJv8XBRJTlU7zg8+ZfMg=="],
454
454
 
455
455
  "fast-wrap-ansi": ["fast-wrap-ansi@0.2.2", "", { "dependencies": { "fast-string-width": "^3.0.2" } }, "sha512-7F2Fl+TjRSenLqlU3UjSH0iyqopqoZIu7eZVpEirP2g1GtWa2G/ecEmBdgz31+Mxr+ELclgg6sokpSFIQiZ02Q=="],
456
456
 
@@ -526,7 +526,7 @@
526
526
 
527
527
  "ini": ["ini@6.0.0", "", {}, "sha512-IBTdIkzZNOpqm7q3dRqJvMaldXjDHWkEDfrwGEQTs5eaQMWV+djAhR+wahyNNMAa+qpbDUhBMVt4ZKNwpPm7xQ=="],
528
528
 
529
- "ip-address": ["ip-address@10.7.0", "", {}, "sha512-BGFsyJd5mpXp3rK6jIdADLNgpJUK1jnjzvYF8lK+VyDab9JAmqN0YOKDdP17HlgKb2+ehPgDc8EtnRLbGCAMhA=="],
529
+ "ip-address": ["ip-address@10.7.2", "", {}, "sha512-7H/2gFSIitxc0hG3nOI1glS8QLo/EHBFFLk8vEUjXY/xu0AdL8jZ9U1IzO2PUm0d2D/ofQcAifb0g6OBkt8U7w=="],
530
530
 
531
531
  "is-callable": ["is-callable@1.2.7", "", {}, "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA=="],
532
532
 
@@ -796,7 +796,7 @@
796
796
 
797
797
  "turndown": ["turndown@7.2.2", "", { "dependencies": { "@mixmark-io/domino": "^2.2.0" } }, "sha512-1F7db8BiExOKxjSMU2b7if62D/XOyQyZbPKq/nUwopfgnHlqXHqQ0lvfUTeUIr1lZJzOPFn43dODyMSIfvWRKQ=="],
798
798
 
799
- "typebox": ["typebox@1.3.30", "", {}, "sha512-vRmBLzlaq9O9dvfGmI5CssLGvDC/R594kH6N/Q1uUU5VPO3PTgQMlWe/UVNdNVTr2EET+FX8BWZkFdYgxTglbQ=="],
799
+ "typebox": ["typebox@1.3.31", "", {}, "sha512-7++UxOb7lAJbJ8pbhN2Yl/ljadShbHZ6GQwst/YEUAlVh1nP8LqYpC2t+R1VysunFpmDffDzhZRsvGchx0PqUA=="],
800
800
 
801
801
  "typed-array-buffer": ["typed-array-buffer@1.0.3", "", { "dependencies": { "call-bound": "^1.0.3", "es-errors": "^1.3.0", "is-typed-array": "^1.1.14" } }, "sha512-nAYYwfY3qnzX30IkA6AQZjVbtK6duGontcQm1WSG1MD94YLqK0515GNApXkoxKOWMusVssAHWLh9SeaoefYFGw=="],
802
802
 
@@ -804,7 +804,7 @@
804
804
 
805
805
  "undici": ["undici@7.29.0", "", {}, "sha512-IDxfleLmmbSskfWSUATiN1nfn2rDuvnMOqb5CWR92iIfojA0Ud+ulOAAEQ57LPr9rWmsreUyf5lwyao+7GNNVw=="],
806
806
 
807
- "undici-types": ["undici-types@8.9.0", "", {}, "sha512-KTDyRTYX8sWmKXAikPHHSyc63CRPETMctyjKFupcC6OBLXT3xsN0e9aF7m+mIXutFWpUXuedtowG7iLOzp0kQg=="],
807
+ "undici-types": ["undici-types@6.21.0", "", {}, "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ=="],
808
808
 
809
809
  "unicode-emoji-modifier-base": ["unicode-emoji-modifier-base@1.0.0", "", {}, "sha512-yLSH4py7oFH3oG/9K+XWrz1pSi3dfUrWEnInbxMfArOfc1+33BlGPQtLsOYwvdMy11AwUBetYuaRxSPqgkq+8g=="],
810
810
 
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@lobu/runtime-device",
3
- "version": "20.0.1",
3
+ "version": "20.1.0",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@lobu/runtime-device",
9
- "version": "20.0.1",
9
+ "version": "20.1.0",
10
10
  "license": "BUSL-1.1",
11
11
  "dependencies": {
12
12
  "@lobu/cli": "file:vendor/cli",
@@ -50,9 +50,9 @@
50
50
  }
51
51
  },
52
52
  "node_modules/@aws-sdk/client-bedrock-runtime": {
53
- "version": "3.1131.0",
54
- "resolved": "https://registry.npmjs.org/@aws-sdk/client-bedrock-runtime/-/client-bedrock-runtime-3.1131.0.tgz",
55
- "integrity": "sha512-q0MTJy3yknOJDt7RfX156CZ/RMkp9X0dWUNBkhEaPU3l+rLV5VYkjsbucF1397UD4eKu1AiMKfP62yE08zblBg==",
53
+ "version": "3.1133.0",
54
+ "resolved": "https://registry.npmjs.org/@aws-sdk/client-bedrock-runtime/-/client-bedrock-runtime-3.1133.0.tgz",
55
+ "integrity": "sha512-4yieaqZc7JI396eBjccci390QyLK9CW5S+6fIxiLZEYSGCPD6hrJEleVJkmH4hFBFFx4Q6KPaDScMC/FUYaQtA==",
56
56
  "license": "Apache-2.0",
57
57
  "dependencies": {
58
58
  "@aws-sdk/core": "^3.978.0",
@@ -60,7 +60,7 @@
60
60
  "@aws-sdk/eventstream-handler-node": "^3.972.34",
61
61
  "@aws-sdk/middleware-eventstream": "^3.972.29",
62
62
  "@aws-sdk/middleware-websocket": "^3.972.53",
63
- "@aws-sdk/token-providers": "3.1131.0",
63
+ "@aws-sdk/token-providers": "3.1133.0",
64
64
  "@aws-sdk/types": "^3.974.5",
65
65
  "@smithy/core": "^3.33.3",
66
66
  "@smithy/fetch-http-handler": "^5.7.2",
@@ -339,9 +339,9 @@
339
339
  }
340
340
  },
341
341
  "node_modules/@aws-sdk/token-providers": {
342
- "version": "3.1131.0",
343
- "resolved": "https://registry.npmjs.org/@aws-sdk/token-providers/-/token-providers-3.1131.0.tgz",
344
- "integrity": "sha512-csUjJ+GsvyjPJhtTURYP2yzZKduVw7VA8L1OpTm39RiA1VYR1eiO7uihOcvXXVOgbaL2GoH4FTGx6X+6s1p6tA==",
342
+ "version": "3.1133.0",
343
+ "resolved": "https://registry.npmjs.org/@aws-sdk/token-providers/-/token-providers-3.1133.0.tgz",
344
+ "integrity": "sha512-CwH8Dc1ACC+G+CGBOjRhQLUI8o7c+O8Q1fsXHeot2Vi5VSD6UPVsKAqoWiFj7yW/r+QB5kN4QWWV9GWi810LfQ==",
345
345
  "license": "Apache-2.0",
346
346
  "dependencies": {
347
347
  "@aws-sdk/core": "^3.978.0",
@@ -2015,12 +2015,12 @@
2015
2015
  "license": "MIT"
2016
2016
  },
2017
2017
  "node_modules/@types/node": {
2018
- "version": "26.5.1",
2019
- "resolved": "https://registry.npmjs.org/@types/node/-/node-26.5.1.tgz",
2020
- "integrity": "sha512-CzNm2FezW4VR/LjG6yUdiEgLE/rAQ9Slj5gCu/C2VrdcW7I0ahNZ8DRbHT7zOZ6r3ONgd/bsQIeSaoDGrd1C6g==",
2018
+ "version": "22.20.3",
2019
+ "resolved": "https://registry.npmjs.org/@types/node/-/node-22.20.3.tgz",
2020
+ "integrity": "sha512-DZmzkmwHzXrLPAXPyKNDzlIwMMUZCVacoD25ywdy5YTKGbOx/2ld+Q38Im2zJ0vBuZP5Prd3VZutKZyXwkOS8A==",
2021
2021
  "license": "MIT",
2022
2022
  "dependencies": {
2023
- "undici-types": "~8.9.0"
2023
+ "undici-types": "~6.21.0"
2024
2024
  }
2025
2025
  },
2026
2026
  "node_modules/@types/retry": {
@@ -2312,9 +2312,9 @@
2312
2312
  "license": "MIT"
2313
2313
  },
2314
2314
  "node_modules/brace-expansion": {
2315
- "version": "5.0.9",
2316
- "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.9.tgz",
2317
- "integrity": "sha512-ScQ4IuvIEF1TMlP7Zt+vjJ//9zlPb2SDcxWxM3bk8s6t6GGdJ7KO1dCcTidOPJKePW30LE/2cT7wCyPho9/Wxg==",
2315
+ "version": "5.0.12",
2316
+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.12.tgz",
2317
+ "integrity": "sha512-YovQ3rzhaLMIrDjNDMkNS01tea93qhEhG5xy8f6+R0l+dw3Ki+5sCoIoI942iuLZTHWogWktgwVDhU09iNEimQ==",
2318
2318
  "license": "MIT",
2319
2319
  "dependencies": {
2320
2320
  "balanced-match": "^4.0.2"
@@ -3162,9 +3162,9 @@
3162
3162
  }
3163
3163
  },
3164
3164
  "node_modules/fast-uri": {
3165
- "version": "3.1.7",
3166
- "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.1.7.tgz",
3167
- "integrity": "sha512-dOvZVzjdZdz7phd9v6jCbwxrBW3fK6n8Rc0CtdmM4bumzMnxywBYhuph6J819RRw/ku+rLbelwfMunktuzVVHg==",
3165
+ "version": "3.1.8",
3166
+ "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.1.8.tgz",
3167
+ "integrity": "sha512-GZMtZUTNRpOVIECoXwLNZS5xUGE+mVNbTB8h/7Rwh2TFWcBQiPzTgyZi05BF9UMZKkLJv8XBRJTlU7zg8+ZfMg==",
3168
3168
  "funding": [
3169
3169
  {
3170
3170
  "type": "github",
@@ -3651,9 +3651,9 @@
3651
3651
  }
3652
3652
  },
3653
3653
  "node_modules/ip-address": {
3654
- "version": "10.7.0",
3655
- "resolved": "https://registry.npmjs.org/ip-address/-/ip-address-10.7.0.tgz",
3656
- "integrity": "sha512-BGFsyJd5mpXp3rK6jIdADLNgpJUK1jnjzvYF8lK+VyDab9JAmqN0YOKDdP17HlgKb2+ehPgDc8EtnRLbGCAMhA==",
3654
+ "version": "10.7.2",
3655
+ "resolved": "https://registry.npmjs.org/ip-address/-/ip-address-10.7.2.tgz",
3656
+ "integrity": "sha512-7H/2gFSIitxc0hG3nOI1glS8QLo/EHBFFLk8vEUjXY/xu0AdL8jZ9U1IzO2PUm0d2D/ofQcAifb0g6OBkt8U7w==",
3657
3657
  "license": "MIT",
3658
3658
  "engines": {
3659
3659
  "node": ">= 12"
@@ -5425,9 +5425,9 @@
5425
5425
  }
5426
5426
  },
5427
5427
  "node_modules/typebox": {
5428
- "version": "1.3.30",
5429
- "resolved": "https://registry.npmjs.org/typebox/-/typebox-1.3.30.tgz",
5430
- "integrity": "sha512-vRmBLzlaq9O9dvfGmI5CssLGvDC/R594kH6N/Q1uUU5VPO3PTgQMlWe/UVNdNVTr2EET+FX8BWZkFdYgxTglbQ==",
5428
+ "version": "1.3.31",
5429
+ "resolved": "https://registry.npmjs.org/typebox/-/typebox-1.3.31.tgz",
5430
+ "integrity": "sha512-7++UxOb7lAJbJ8pbhN2Yl/ljadShbHZ6GQwst/YEUAlVh1nP8LqYpC2t+R1VysunFpmDffDzhZRsvGchx0PqUA==",
5431
5431
  "license": "MIT"
5432
5432
  },
5433
5433
  "node_modules/typed-array-buffer": {
@@ -5466,9 +5466,9 @@
5466
5466
  }
5467
5467
  },
5468
5468
  "node_modules/undici-types": {
5469
- "version": "8.9.0",
5470
- "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-8.9.0.tgz",
5471
- "integrity": "sha512-KTDyRTYX8sWmKXAikPHHSyc63CRPETMctyjKFupcC6OBLXT3xsN0e9aF7m+mIXutFWpUXuedtowG7iLOzp0kQg==",
5469
+ "version": "6.21.0",
5470
+ "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.21.0.tgz",
5471
+ "integrity": "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==",
5472
5472
  "license": "MIT"
5473
5473
  },
5474
5474
  "node_modules/unicode-emoji-modifier-base": {
@@ -5773,7 +5773,7 @@
5773
5773
  },
5774
5774
  "vendor/cli": {
5775
5775
  "name": "@lobu/cli",
5776
- "version": "20.0.1",
5776
+ "version": "20.1.0",
5777
5777
  "license": "Apache-2.0",
5778
5778
  "dependencies": {
5779
5779
  "@clack/prompts": "^1.2.0",
@@ -5815,7 +5815,7 @@
5815
5815
  },
5816
5816
  "vendor/connector-sdk": {
5817
5817
  "name": "@lobu/connector-sdk",
5818
- "version": "20.0.1",
5818
+ "version": "20.1.0",
5819
5819
  "license": "BUSL-1.1",
5820
5820
  "dependencies": {
5821
5821
  "@lobu/core": "file:../core",
@@ -5830,7 +5830,7 @@
5830
5830
  },
5831
5831
  "vendor/connector-worker": {
5832
5832
  "name": "@lobu/connector-worker",
5833
- "version": "20.0.1",
5833
+ "version": "20.1.0",
5834
5834
  "license": "BUSL-1.1",
5835
5835
  "dependencies": {
5836
5836
  "@agentclientprotocol/sdk": "1.4.0",
@@ -5856,7 +5856,7 @@
5856
5856
  },
5857
5857
  "vendor/core": {
5858
5858
  "name": "@lobu/core",
5859
- "version": "20.0.1",
5859
+ "version": "20.1.0",
5860
5860
  "license": "Apache-2.0",
5861
5861
  "dependencies": {
5862
5862
  "@opentelemetry/api": "^1.9.0",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lobu/runtime-device",
3
- "version": "20.0.1",
3
+ "version": "20.1.0",
4
4
  "type": "module",
5
5
  "license": "BUSL-1.1",
6
6
  "repository": {
@@ -8,7 +8,7 @@
8
8
  * unit-tested without importing `lobu.config.ts`.
9
9
  */
10
10
  import { validateEntityMetrics } from "@lobu/connector-sdk/metrics";
11
- import { isHostedChatPlatform, normalizeEntityTypeSlug, } from "@lobu/core";
11
+ import { isChatPlatform, normalizeEntityTypeSlug, } from "@lobu/core";
12
12
  import { normalizeWorkspaceEventTrigger, resolvedEventExecution, } from "@lobu/core/contracts/tools/manage-automations";
13
13
  /**
14
14
  * Marker for each stored field's declarative status. Also exhaustive over the
@@ -712,8 +712,12 @@ function isHostedConnection(connection) {
712
712
  if (connection.credentialMode !== "hosted")
713
713
  return false;
714
714
  const connector = connectorKey(connection.connector);
715
- if (!isHostedChatPlatform(connector)) {
716
- throw new ValidationError(`connection "${connection.slug}" uses credentialMode "hosted", but connector "${connector}" does not support the hosted Lobu bot (expected slack or telegram)`);
715
+ // Only that it IS a chat platform. Whether Lobu runs a hosted bot for that
716
+ // platform is a deployment fact the client cannot see; the server answers it
717
+ // when the code is minted, with a message naming the platform. Checking it
718
+ // here used to reject Google Chat outright.
719
+ if (!isChatPlatform(connector)) {
720
+ throw new ValidationError(`connection "${connection.slug}" uses credentialMode "hosted", but connector "${connector}" is not a chat platform`);
717
721
  }
718
722
  if (connection.config && Object.keys(connection.config).length > 0) {
719
723
  throw new ValidationError(`connection "${connection.slug}" uses credentialMode "hosted" and must not declare config credentials`);
@@ -10,7 +10,8 @@
10
10
  * --arg key:=<jsonvalue> JSON-parsed field (httpie-style)
11
11
  *
12
12
  * Output is pretty JSON by default; `--raw` switches to compact JSON for piping.
13
- * Errors go to stderr with exit code 1 (ApiError) / 2 (validation).
13
+ * Errors go to stderr with exit code 1 (ApiError) / 2 (validation). A tool
14
+ * that reports failure inside a 200 payload still prints its JSON, then exits 1.
14
15
  */
15
16
  interface CallOptions {
16
17
  org?: string;
@@ -10,12 +10,13 @@
10
10
  * --arg key:=<jsonvalue> JSON-parsed field (httpie-style)
11
11
  *
12
12
  * Output is pretty JSON by default; `--raw` switches to compact JSON for piping.
13
- * Errors go to stderr with exit code 1 (ApiError) / 2 (validation).
13
+ * Errors go to stderr with exit code 1 (ApiError) / 2 (validation). A tool
14
+ * that reports failure inside a 200 payload still prints its JSON, then exits 1.
14
15
  */
15
16
  import { readFile } from "node:fs/promises";
16
17
  import { resolveApiClient } from "../internal/api-client.js";
17
18
  import { printJson } from "../internal/output.js";
18
- import { parseJsonObject, ValidationError } from "./memory/_lib/errors.js";
19
+ import { isFailedToolPayload, parseJsonObject, ValidationError, } from "./memory/_lib/errors.js";
19
20
  import { restToolCall } from "./memory/_lib/mcp.js";
20
21
  import { getSessionForOrg, mcpUrlForOrg, resolveOrg, resolveServerUrl, } from "./memory/_lib/memory-auth.js";
21
22
  /** Parse a single `--arg key=value` or `key:=<json>` entry into a [key, value]. */
@@ -153,5 +154,10 @@ export async function callCommand(tool, options = {}) {
153
154
  const args = await buildArgs(options);
154
155
  const result = await restToolCall(mcpUrl, tool, args, options.context);
155
156
  printJson(result, raw);
157
+ // Same contract as `memory run`: the printed JSON stays parseable, but a
158
+ // reported failure must fail the shell or CI gates pass silently.
159
+ if (isFailedToolPayload(tool, result)) {
160
+ process.exitCode = 1;
161
+ }
156
162
  }
157
163
  //# sourceMappingURL=call.js.map
@@ -4,7 +4,7 @@ import { readFile } from "node:fs/promises";
4
4
  import { createServer } from "node:net";
5
5
  import { homedir } from "node:os";
6
6
  import { dirname, join, resolve } from "node:path";
7
- import { isHostedChatPlatform } from "@lobu/core";
7
+ import { isChatPlatform } from "@lobu/core";
8
8
  import chalk from "chalk";
9
9
  import ora from "ora";
10
10
  import { resolveApiClient } from "../internal/api-client.js";
@@ -742,7 +742,7 @@ async function printPreviewInstructions(cwd) {
742
742
  // (agent, hosted connection): the code's agent is the default `/lobu link`
743
743
  // binds to, which the redeemer can still override.
744
744
  const hostedConnections = (project.connections ?? []).filter((c) => c.credentialMode === "hosted" &&
745
- isHostedChatPlatform(connectorRefKey(c.connector)));
745
+ isChatPlatform(connectorRefKey(c.connector)));
746
746
  const enabled = [];
747
747
  for (const conn of hostedConnections) {
748
748
  const platform = connectorRefKey(conn.connector);
@@ -1,5 +1,5 @@
1
1
  import { execFileSync } from "node:child_process";
2
- import { readFile, stat } from "node:fs/promises";
2
+ import { stat } from "node:fs/promises";
3
3
  import { join } from "node:path";
4
4
  import { createRequire } from "node:module";
5
5
  import chalk from "chalk";
@@ -7,7 +7,7 @@ import postgres from "postgres";
7
7
  import { checkMemoryHealth } from "./memory/_lib/memory-health.js";
8
8
  import { resolveServerUrl } from "./memory/_lib/memory-auth.js";
9
9
  import { isExternalDatabaseUrl, isPortFree, resolveEmbeddedDataRoot, } from "./dev.js";
10
- import { parseEnvContent } from "../internal/env-file.js";
10
+ import { readProjectEnvFile } from "../internal/env-file.js";
11
11
  import { MIN_NODE_MAJOR, checkNodeSupport } from "../internal/node-version.js";
12
12
  import { loadProviderRegistry } from "./providers/registry.js";
13
13
  import { loadProjectConfig } from "./_lib/apply/desired-state.js";
@@ -85,15 +85,6 @@ async function checkServerReachable(url) {
85
85
  return { name: "server", status: "fail", detail: `unreachable: ${origin}` };
86
86
  }
87
87
  }
88
- async function loadProjectEnv(cwd) {
89
- try {
90
- const raw = await readFile(join(cwd, ".env"), "utf-8");
91
- return parseEnvContent(raw);
92
- }
93
- catch {
94
- return {};
95
- }
96
- }
97
88
  async function checkDatabaseAndPgvector(databaseUrl) {
98
89
  const results = [];
99
90
  const sql = postgres(databaseUrl, {
@@ -202,7 +193,7 @@ export async function doctorCommand(options = {}) {
202
193
  return;
203
194
  }
204
195
  const cwd = options.cwd ?? process.cwd();
205
- const env = await loadProjectEnv(cwd);
196
+ const env = await readProjectEnvFile(cwd);
206
197
  const checks = [];
207
198
  checks.push(checkNodeVersion());
208
199
  checks.push(checkBinaryExists("git"));
@@ -14,7 +14,11 @@ import { renderTemplate } from "../utils/template.js";
14
14
  import { installProjectDeps } from "./_lib/ensure-deps-installed.js";
15
15
  import { initFromOrg } from "./_lib/init-from-org/bootstrap.js";
16
16
  import { isPortFree } from "./dev.js";
17
- const PROJECT_NAME_PATTERN = /^[a-z0-9-]+$/;
17
+ // Mirrors the server's sanitizeAgentId contract (gateway/routes/public/agents.ts):
18
+ // lowercase alphanumeric with hyphens, 3-60 chars, starting with a letter.
19
+ // The project name becomes agents/<name>, so anything weaker scaffolds a
20
+ // project the server refuses on first contact.
21
+ const PROJECT_NAME_PATTERN = /^[a-z][a-z0-9-]{2,59}$/;
18
22
  const NETWORK_CHOICES = ["restricted", "open", "isolated"];
19
23
  const MEMORY_CHOICES = ["none", "lobu-cloud", "lobu-custom"];
20
24
  async function pickFreePort(start, opts = {}) {
@@ -187,7 +191,7 @@ export async function initCommand(cwd = process.cwd(), projectNameArg, options =
187
191
  }
188
192
  else {
189
193
  if (projectNameArg && !PROJECT_NAME_PATTERN.test(projectNameArg)) {
190
- console.log(chalk.red(`\n✗ Project name must be lowercase alphanumeric with hyphens only (got: ${projectNameArg}).\n`));
194
+ console.log(chalk.red(`\n✗ Project name must be lowercase alphanumeric with hyphens, starting with a letter, 3-60 chars (got: ${projectNameArg}).\n`));
191
195
  process.exit(1);
192
196
  }
193
197
  projectName =
@@ -213,6 +217,14 @@ export async function initCommand(cwd = process.cwd(), projectNameArg, options =
213
217
  console.log(chalk.dim(`\nCreating project in: ${chalk.cyan(projectDir)}\n`));
214
218
  }
215
219
  }
220
+ // Final choke point: every resolution path above must satisfy the server's
221
+ // agent-id contract. The interactive prompt validates, but --yes defaults
222
+ // and --here fallbacks (slugified cwd, explicit arg) bypass it — without
223
+ // this, a short name still scaffolds a project the server refuses.
224
+ if (!PROJECT_NAME_PATTERN.test(projectName)) {
225
+ console.log(chalk.red(`\n✗ "${projectName}" is not a valid project name (lowercase alphanumeric with hyphens, starting with a letter, 3-60 chars).\n`));
226
+ process.exit(1);
227
+ }
216
228
  // Pick free ports at scaffold time so two `lobu run`s on the same machine
217
229
  // don't collide on the default 8787 / 8118. The flag / env value wins.
218
230
  const gatewayPortDefault = String(await pickFreePort(8787));
@@ -632,7 +644,7 @@ export async function initCommand(cwd = process.cwd(), projectNameArg, options =
632
644
  }
633
645
  function validateProjectName(value) {
634
646
  if (!PROJECT_NAME_PATTERN.test(value)) {
635
- return "Project name must be lowercase alphanumeric with hyphens only";
647
+ return "Project name must be lowercase alphanumeric with hyphens, starting with a letter, 3-60 chars";
636
648
  }
637
649
  return true;
638
650
  }
@@ -10,6 +10,18 @@ export declare class ApiError extends CliError {
10
10
  code?: string | undefined;
11
11
  constructor(message: string, status?: number | undefined, code?: string | undefined);
12
12
  }
13
+ /**
14
+ * True when an already-printed tool result payload reports failure, so the
15
+ * command can exit non-zero without changing its stdout contract (the JSON
16
+ * still parses — `gh`/`kubectl -o json` semantics, not curl's). Three shapes:
17
+ * - MCP `tools/call` failures, marked `isError` at the protocol boundary;
18
+ * - `run_sdk` script failures, reported as data (`success` is a required
19
+ * field of the script result) — the tool ran fine, the script did not;
20
+ * - REST-proxy soft failures, a top-level `error` string. This mirrors the
21
+ * server's `isSoftErrorResult` (server/src/tools/execute.ts); kept as a
22
+ * local predicate so the CLI never imports server sources.
23
+ */
24
+ export declare function isFailedToolPayload(tool: string | undefined, result: unknown): boolean;
13
25
  /**
14
26
  * Parse `raw` as a JSON object, throwing {@link ValidationError} when it is not
15
27
  * valid JSON or not a top-level object (arrays and primitives are rejected).
@@ -22,6 +22,27 @@ export class ApiError extends CliError {
22
22
  this.name = "ApiError";
23
23
  }
24
24
  }
25
+ /**
26
+ * True when an already-printed tool result payload reports failure, so the
27
+ * command can exit non-zero without changing its stdout contract (the JSON
28
+ * still parses — `gh`/`kubectl -o json` semantics, not curl's). Three shapes:
29
+ * - MCP `tools/call` failures, marked `isError` at the protocol boundary;
30
+ * - `run_sdk` script failures, reported as data (`success` is a required
31
+ * field of the script result) — the tool ran fine, the script did not;
32
+ * - REST-proxy soft failures, a top-level `error` string. This mirrors the
33
+ * server's `isSoftErrorResult` (server/src/tools/execute.ts); kept as a
34
+ * local predicate so the CLI never imports server sources.
35
+ */
36
+ export function isFailedToolPayload(tool, result) {
37
+ if (typeof result !== "object" || result === null)
38
+ return false;
39
+ const payload = result;
40
+ if (payload.isError === true)
41
+ return true;
42
+ if (tool === "run_sdk" && payload.success === false)
43
+ return true;
44
+ return typeof payload.error === "string" && payload.error.length > 0;
45
+ }
25
46
  /**
26
47
  * Parse `raw` as a JSON object, throwing {@link ValidationError} when it is not
27
48
  * valid JSON or not a top-level object (arrays and primitives are rejected).
@@ -1,4 +1,4 @@
1
- import { ValidationError } from "./_lib/errors.js";
1
+ import { ValidationError, isFailedToolPayload } from "./_lib/errors.js";
2
2
  import { mcpRpc, resolveMcpEndpoint } from "./_lib/mcp.js";
3
3
  import { getSessionForOrg, mcpUrlForOrg, resolveOrg, resolveServerUrl, } from "./_lib/memory-auth.js";
4
4
  import { printText } from "../../internal/output.js";
@@ -44,5 +44,11 @@ export async function memoryRunCommand(tool, params, options = {}) {
44
44
  arguments: parsedParams,
45
45
  }, options.context);
46
46
  printText(JSON.stringify(result, null, 2));
47
+ // The JSON above is the report — leave it parseable — but a reported
48
+ // failure must still fail the shell, or CI gates on this command pass
49
+ // silently. Success paths never touch the exit code.
50
+ if (isFailedToolPayload(tool, result)) {
51
+ process.exitCode = 1;
52
+ }
47
53
  }
48
54
  //# sourceMappingURL=run.js.map
@@ -2,20 +2,11 @@ import { readFile, writeFile } from "node:fs/promises";
2
2
  import { join } from "node:path";
3
3
  import chalk from "chalk";
4
4
  import { setLocalEnvValue } from "../internal/local-env.js";
5
- import { parseEnvContent } from "../internal/env-file.js";
5
+ import { readProjectEnvFile } from "../internal/env-file.js";
6
6
  const SENTRY_DSN_DEFAULT = "https://63abd848f1338116c41d4a8a29091c7c@o4511547660042240.ingest.us.sentry.io/4511547664171008";
7
- async function loadEnv(cwd) {
8
- try {
9
- const raw = await readFile(join(cwd, ".env"), "utf-8");
10
- return parseEnvContent(raw);
11
- }
12
- catch {
13
- return {};
14
- }
15
- }
16
7
  export async function telemetryStatusCommand(options = {}) {
17
8
  const cwd = options.cwd ?? process.cwd();
18
- const env = await loadEnv(cwd);
9
+ const env = await readProjectEnvFile(cwd);
19
10
  const dsn = env.SENTRY_DSN ?? process.env.SENTRY_DSN;
20
11
  if (dsn) {
21
12
  console.log(chalk.green("\n Telemetry: on"));
@@ -1,8 +1,10 @@
1
+ import { select } from "@inquirer/prompts";
1
2
  import chalk from "chalk";
2
3
  import postgres from "postgres";
3
- import { select } from "@inquirer/prompts";
4
- import { getToken, resolveContext } from "../internal/index.js";
5
4
  import { resolveApiClient } from "../internal/api-client.js";
5
+ import { readProjectEnvValue } from "../internal/env-file.js";
6
+ import { getToken, resolveContext } from "../internal/index.js";
7
+ import { isExternalDatabaseUrl } from "./dev.js";
6
8
  export async function tokenCommand(options) {
7
9
  const target = await resolveContext(options.context);
8
10
  const token = await getToken(target.name);
@@ -84,12 +86,27 @@ export async function tokenRevokeCommand(jti, options) {
84
86
  process.exitCode = 1;
85
87
  return;
86
88
  }
87
- const databaseUrl = process.env.DATABASE_URL?.trim();
89
+ // Fall back to the project `.env` like `doctor` does — every other
90
+ // command reads it, so requiring an exported env var here strands local
91
+ // installs. Embedded path-form URLs (`file://.`) carry no host to dial
92
+ // (postgres() parses "." as a hostname → ENOTFOUND), so refuse those
93
+ // clearly instead of letting the dial fail cryptically.
94
+ let databaseUrl = process.env.DATABASE_URL?.trim();
95
+ if (!databaseUrl) {
96
+ databaseUrl =
97
+ (await readProjectEnvValue(process.cwd(), "DATABASE_URL")) || undefined;
98
+ }
88
99
  if (!databaseUrl) {
89
100
  console.error(chalk.red("\n DATABASE_URL is not set. Run this from the same environment as the gateway.\n"));
90
101
  process.exitCode = 1;
91
102
  return;
92
103
  }
104
+ if (!isExternalDatabaseUrl(databaseUrl)) {
105
+ console.error(chalk.red("\n DATABASE_URL is a local embedded path, not a connection string, so there is nothing to dial.\n"));
106
+ console.log(chalk.dim(" Point DATABASE_URL at the Postgres the gateway uses (postgresql://…) and retry.\n"));
107
+ process.exitCode = 1;
108
+ return;
109
+ }
93
110
  let expiresAt;
94
111
  if (options.expiresAt) {
95
112
  expiresAt = new Date(options.expiresAt);
@@ -0,0 +1,45 @@
1
+ /**
2
+ * Connector-owned chat-identity descriptors.
3
+ *
4
+ * A chat platform's "who is this sender" model has two connector-specific
5
+ * facts core code must never hardcode: which `entity_identities` namespace the
6
+ * link is stored under, and how a raw (team, user) pair from an inbound message
7
+ * becomes the storage key. Both live here, contributed by the connector that
8
+ * owns the platform — mirroring `ChannelReadIdentity` for the read-ACL gate.
9
+ *
10
+ * The server collects these in `lobu/stores/chat-identity-sources.ts` and
11
+ * dispatches on `platform`, so `resolveChatUserIdentity` names no connector.
12
+ *
13
+ * The KEY SHAPE is the whole point of the descriptor. Slack user ids are only
14
+ * unique within a workspace, so Slack's key is the composite `T…:U…` and a
15
+ * message without a team id must fail closed. A Google account id is globally
16
+ * unique, so Google's key is the bare id and there is nothing to scope it by.
17
+ * Getting that wrong in either direction is a mis-grant, not a wrong answer —
18
+ * these links authorize approvals and agent re-binding.
19
+ */
20
+
21
+ /** How one chat platform keys a sender identity. */
22
+ export interface ChatUserIdentity {
23
+ /** Chat platform key an inbound message arrives on (`slack`, `gchat`, …). */
24
+ platform: string;
25
+ /**
26
+ * The Better Auth `providerId` whose sign-in PROVES this identity. The login
27
+ * writer stamps the namespace only after a successful OAuth exchange with
28
+ * this provider; nothing else may mint the link.
29
+ */
30
+ providerId: string;
31
+ /** `entity_identities` namespace the key is stored under. */
32
+ namespace: string;
33
+ /**
34
+ * Build the storage key from an inbound message's team id and platform user
35
+ * id. Returns null when the inputs cannot form a valid key — callers treat
36
+ * null as "unlinked", which is the correct fail-closed answer.
37
+ *
38
+ * `teamId` is meaningful only for platforms whose user ids are tenant-scoped;
39
+ * globally-unique platforms ignore it.
40
+ */
41
+ buildUserKey(
42
+ teamId: string | null | undefined,
43
+ platformUserId: string | null | undefined,
44
+ ): string | null;
45
+ }