@lobu/runtime-server 22.0.0 → 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/catalogs/connectors.json +1353 -181
- package/dist/catalogs/skills.json +1 -1
- package/dist/component.json +1 -1
- package/dist/connectors/README.md +14 -1
- package/dist/connectors/google_gmail.ts +1 -0
- package/dist/connectors/jira-helpers.ts +313 -0
- package/dist/connectors/jira.ts +29 -221
- package/dist/connectors/linkedin-browser-script.ts +13 -0
- package/dist/connectors/linkedin-draft-page.js +104 -0
- package/dist/connectors/linkedin-drafts.ts +73 -0
- package/dist/connectors/linkedin-identity.ts +32 -0
- package/dist/connectors/linkedin-inbox-adapter.js +1185 -0
- package/dist/connectors/linkedin-inbox.ts +156 -0
- package/dist/connectors/linkedin-like.ts +114 -0
- package/dist/connectors/linkedin-takeout.ts +577 -0
- package/dist/connectors/linkedin.ts +3998 -0
- package/dist/connectors/takeout-utils.ts +240 -0
- package/dist/connectors/tiktok-inbox-page.js +9 -9
- package/dist/connectors/tiktok-web-page.js +21 -15
- package/dist/connectors/tiktok_web.ts +63 -30
- package/dist/connectors/whatsapp-web-adapter.js +64 -564
- package/dist/connectors/whatsapp-web-helpers.ts +30 -444
- package/dist/connectors/whatsapp-web-identity.ts +20 -6
- package/dist/connectors/whatsapp_web.ts +45 -645
- package/dist/connectors/x-dm-adapter.js +556 -0
- package/dist/connectors/x-identity.ts +31 -2
- package/dist/connectors/x.ts +266 -120
- package/dist/db/migrations/20261017120000_drop_feeds_kind_virtual.sql +26 -0
- package/dist/db/migrations/20261017130000_drop_retired_dead_code_columns.sql +46 -0
- package/dist/dependencies.bun.lock +41 -41
- package/dist/guest.bundle.js +288 -148
- package/dist/owletto/dist/assets/_-3J-IrxWk.js +2 -0
- package/dist/owletto/dist/assets/{_-CEPl6gU4.js → _-DYUE3ix4.js} +3 -3
- package/dist/owletto/dist/assets/_agentId-Bn2IAjIy.js +2 -0
- package/dist/owletto/dist/assets/{_agentId-CBC_SadO.js → _agentId-Cam7Z0N7.js} +2 -2
- package/dist/owletto/dist/assets/{_automationId-YTTNksw6.js → _automationId-CXEiKVZJ.js} +2 -2
- package/dist/owletto/dist/assets/{_connectorKey._connectionId-fK0h7RAp.js → _connectorKey._connectionId-CS85l61t.js} +2 -2
- package/dist/owletto/dist/assets/{_connectorKey.index-C7TPS598.js → _connectorKey.index-clVDIyW0.js} +2 -2
- package/dist/owletto/dist/assets/{_conversationId-CEhxlTIo.js → _conversationId-Ci2k-BuN.js} +2 -2
- package/dist/owletto/dist/assets/{_deploymentId-BQfYN1U2.js → _deploymentId-BuUzGtVL.js} +2 -2
- package/dist/owletto/dist/assets/{_eventId-Cl8GSdjg.js → _eventId-B0662F8h.js} +2 -2
- package/dist/owletto/dist/assets/_name-CwWePlOl.js +2 -0
- package/dist/owletto/dist/assets/{_owner-cUtGHqSw.js → _owner-dTWkrKsK.js} +3 -3
- package/dist/owletto/dist/assets/_shape-BtS3y4M9.js +2 -0
- package/dist/owletto/dist/assets/_skillKey-Dc9m-nlR.js +2 -0
- package/dist/owletto/dist/assets/{_slug-CU1PuHB9.js → _slug-DQHutM41.js} +2 -2
- package/dist/owletto/dist/assets/_viewKey-B30ik8ma.js +2 -0
- package/dist/owletto/dist/assets/_viewKey-CUHypQnF.js +2 -0
- package/dist/owletto/dist/assets/{accept-invitation-D3OgJG4i.js → accept-invitation-w17IFTtf.js} +2 -2
- package/dist/owletto/dist/assets/{activity-route-view-DQglkhXU.js → activity-route-view-CMqYiiKM.js} +2 -2
- package/dist/owletto/dist/assets/{agent-card-controls-DzRs4Ix9.js → agent-card-controls-mnTN2AZt.js} +2 -2
- package/dist/owletto/dist/assets/{agent-client-setup-list-B2SvH7xD.js → agent-client-setup-list-Bg3hBfUV.js} +2 -2
- package/dist/owletto/dist/assets/{agent-connect-pages-B6uKvT_X.js → agent-connect-pages-B_vrqLVc.js} +2 -2
- package/dist/owletto/dist/assets/{agent-editor-form-oUnIYHd7.js → agent-editor-form-hTs7eO_U.js} +2 -2
- package/dist/owletto/dist/assets/{agent-guardrails-route-BaV1VpDh.js → agent-guardrails-route-BOrCXcAl.js} +2 -2
- package/dist/owletto/dist/assets/{agent-loading-shells-CtZJM2Gc.js → agent-loading-shells-Dqcvky-k.js} +2 -2
- package/dist/owletto/dist/assets/{agent-permissions-matrix-Ds48KFK9.js → agent-permissions-matrix-BOo_4r_4.js} +2 -2
- package/dist/owletto/dist/assets/{agent-skill-context-DPk5r08w.js → agent-skill-context-CCdvtlmH.js} +2 -2
- package/dist/owletto/dist/assets/{agent-skills-route-DYpB5H1J.js → agent-skills-route-BUxIswuq.js} +2 -2
- package/dist/owletto/dist/assets/{agent-subpage-shell-B3K_jPYR.js → agent-subpage-shell-D92imvSt.js} +2 -2
- package/dist/owletto/dist/assets/agent-thread-BJOijbT0.js +6 -0
- package/dist/owletto/dist/assets/agents-9XjpDj_S.js +2 -0
- package/dist/owletto/dist/assets/{agents-workbench-CMyk4PI7.js → agents-workbench-Bt5QCYQ7.js} +2 -2
- package/dist/owletto/dist/assets/{app._appId-DH1Qutz6.js → app._appId-CKv7_squ.js} +2 -2
- package/dist/owletto/dist/assets/{automation-detail-content-CEDNboId.js → automation-detail-content-vUwVumXf.js} +2 -2
- package/dist/owletto/dist/assets/automations-9XjpDj_S.js +2 -0
- package/dist/owletto/dist/assets/{callback-CU-hb8JB.js → callback-BRgcL8gz.js} +2 -2
- package/dist/owletto/dist/assets/{card-DIF8SF9b.js → card-Djgp00r_.js} +2 -2
- package/dist/owletto/dist/assets/{claim-DELEa-gH.js → claim-BYUZnyMp.js} +2 -2
- package/dist/owletto/dist/assets/{clients-CpG676mg.js → clients-D3Zbjxin.js} +2 -2
- package/dist/owletto/dist/assets/{code-editor-V27Z4o3P.js → code-editor-DHeyRGZI.js} +2 -2
- package/dist/owletto/dist/assets/connect-CfsFsy9P.js +2 -0
- package/dist/owletto/dist/assets/connect._clientId-DkiC8xos.js +2 -0
- package/dist/owletto/dist/assets/connected._clientId-CIXrGOsT.js +2 -0
- package/dist/owletto/dist/assets/{connected._clientId.activity-DQWcUqKM.js → connected._clientId.activity-Ckdz6I0y.js} +2 -2
- package/dist/owletto/dist/assets/{connected._clientId.index-BC3R303A.js → connected._clientId.index-CNxafNeo.js} +2 -2
- package/dist/owletto/dist/assets/{connection-DySpRE9x.js → connection-C3XXFEqh.js} +2 -2
- package/dist/owletto/dist/assets/{connection-feed-detail-C_D68j6d.js → connection-feed-detail-CIJJLDP8.js} +2 -2
- package/dist/owletto/dist/assets/{connections-browser-Cnv2iBbZ.js → connections-browser-CKZjzRz6.js} +2 -2
- package/dist/owletto/dist/assets/{connector-provenance-CNXtzYg5.js → connector-provenance-8-d8hl10.js} +2 -2
- package/dist/owletto/dist/assets/{connector-scope-lists-BKDetNDc.js → connector-scope-lists-CadPVsI3.js} +2 -2
- package/dist/owletto/dist/assets/{connectors-BJnk1z_2.js → connectors-lvLJ30lo.js} +2 -2
- package/dist/owletto/dist/assets/{consent-BVzxrAO9.js → consent-CdSvVCgx.js} +2 -2
- package/dist/owletto/dist/assets/{conversations-table-DfZGICl7.js → conversations-table-BdXoZAfc.js} +2 -2
- package/dist/owletto/dist/assets/{core.esm-DiTpULFl.js → core.esm-CYvgWCuv.js} +2 -2
- package/dist/owletto/dist/assets/create-0xW9eXxG.js +2 -0
- package/dist/owletto/dist/assets/{create-JRFM8mMf.js → create-B0qhrrX4.js} +2 -2
- package/dist/owletto/dist/assets/create-CAfF-yI1.js +2 -0
- package/dist/owletto/dist/assets/create-automation-form-CtSSeYj3.js +3 -0
- package/dist/owletto/dist/assets/create._connectorKey-i6xxkWKV.js +2 -0
- package/dist/owletto/dist/assets/{cronstrue-DPXl0qA2.js → cronstrue-n4qGUraE.js} +2 -2
- package/dist/owletto/dist/assets/deployments-4Itm35Xc.js +2 -0
- package/dist/owletto/dist/assets/{deployments-DCQdFdwG.js → deployments-RvUdVkj3.js} +2 -2
- package/dist/owletto/dist/assets/{deployments-body-D6TAWs_6.js → deployments-body-BMp7UsMo.js} +2 -2
- package/dist/owletto/dist/assets/{device-CntqYW65.js → device-CPU6CjkJ.js} +2 -2
- package/dist/owletto/dist/assets/{device-pin-tombstone-Bz4JHHMK.js → device-pin-tombstone-CrjG7gPo.js} +2 -2
- package/dist/owletto/dist/assets/{device._deviceId-D4plO3GM.js → device._deviceId-Cs3ZmXWo.js} +2 -2
- package/dist/owletto/dist/assets/{entity-options-UJs64GdQ.js → entity-options-uXjgT7y9.js} +2 -2
- package/dist/owletto/dist/assets/{entity-page-Djz6T50J.js → entity-page-Dc0LGr5U.js} +2 -2
- package/dist/owletto/dist/assets/{entity-type-page-OznRag6A.js → entity-type-page-CwZxa0BR.js} +2 -2
- package/dist/owletto/dist/assets/{event-detail-04qOUGIP.js → event-detail-ve2d6Gbb.js} +2 -2
- package/dist/owletto/dist/assets/{events-feed-fucGZSJR.js → events-feed-BtvhZF1f.js} +2 -2
- package/dist/owletto/dist/assets/{filter-editors-DCQgGLyR.js → filter-editors-Cj-v6NtH.js} +2 -2
- package/dist/owletto/dist/assets/{full-page-spinner-KpV2FS2u.js → full-page-spinner-DqpH99np.js} +2 -2
- package/dist/owletto/dist/assets/guardrails-HFo2Ut8B.js +2 -0
- package/dist/owletto/dist/assets/identity-BigVSBCl.js +2 -0
- package/dist/owletto/dist/assets/{index-BEvyBdOU.js → index-B9uPN6FC.js} +2 -2
- package/dist/owletto/dist/assets/{index-BNh2cidi.js → index-BQVliQW1.js} +2 -2
- package/dist/owletto/dist/assets/index-BfedB4Rc.js +2 -0
- package/dist/owletto/dist/assets/index-CUw3aKBI.js +2 -0
- package/dist/owletto/dist/assets/index-CXhxUkv3.js +2 -0
- package/dist/owletto/dist/assets/{index-_oPeVpL_.js → index-Cr5hwh-C.js} +66 -66
- package/dist/owletto/dist/assets/index-CzkTV4ZQ.js +2 -0
- package/dist/owletto/dist/assets/index-DKSx8JN_.js +2 -0
- package/dist/owletto/dist/assets/{index-D3s8rhG9.js → index-DVk7Ug0d.js} +2 -2
- package/dist/owletto/dist/assets/index-DmZuKGf8.js +2 -0
- package/dist/owletto/dist/assets/{index-DCdkwg9H.js → index-Hio-HRfo.js} +2 -2
- package/dist/owletto/dist/assets/{index-BJXkc60S.js → index-ICgKp3YK.js} +2 -2
- package/dist/owletto/dist/assets/index-cPcroOH0.js +2 -0
- package/dist/owletto/dist/assets/{index-BOzuAbvi.js → index-n7sTbNv4.js} +2 -2
- package/dist/owletto/dist/assets/index-xiFpcWKv.js +2 -0
- package/dist/owletto/dist/assets/{json-diff-D_Ym3Uku.js → json-diff-DBoag_OS.js} +2 -2
- package/dist/owletto/dist/assets/{list-skeleton-Bl0OS39L.js → list-skeleton-C_GuoxAH.js} +2 -2
- package/dist/owletto/dist/assets/{login-QHdxqX-4.js → login-Ci6ixHuL.js} +2 -2
- package/dist/owletto/dist/assets/{logout-DUccApuZ.js → logout-CLGgeZB7.js} +2 -2
- package/dist/owletto/dist/assets/{member-scope-gate-CFbrq1by.js → member-scope-gate-B44INDPY.js} +2 -2
- package/dist/owletto/dist/assets/{memory-browse-page-IrIXuZTF.js → memory-browse-page-DyQiRvzl.js} +2 -2
- package/dist/owletto/dist/assets/{model-selector-CB1BDvlW.js → model-selector-dAbDgJvx.js} +2 -2
- package/dist/owletto/dist/assets/models-DpVP7ZwX.js +2 -0
- package/dist/owletto/dist/assets/{new-BWo8_Pms.js → new-BUb7AnEW.js} +2 -2
- package/dist/owletto/dist/assets/{new-B5UsLiy6.js → new-BkdULx2r.js} +2 -2
- package/dist/owletto/dist/assets/{new-DpmDXmFI.js → new-CHOr-EcI.js} +2 -2
- package/dist/owletto/dist/assets/{oauth-workspace-access-PGyTnW2K.js → oauth-workspace-access-BxsjwgdH.js} +2 -2
- package/dist/owletto/dist/assets/{organization-BH8PYlVu.js → organization-gxGeDjIV.js} +2 -2
- package/dist/owletto/dist/assets/{peek-pane-content-B2AFNTzP.js → peek-pane-content-CHoQHe2H.js} +2 -2
- package/dist/owletto/dist/assets/{permissions-CwN_YP3u.js → permissions-aPHaKLec.js} +2 -2
- package/dist/owletto/dist/assets/{proposal-review-shell-DKKGu4Ww.js → proposal-review-shell-UcZr87_Q.js} +2 -2
- package/dist/owletto/dist/assets/public-shell-ready-DcnlADmj.js +2 -0
- package/dist/owletto/dist/assets/{recent-DqdZE_TI.js → recent-D-65Pgu-.js} +2 -2
- package/dist/owletto/dist/assets/{record-activity-CvgZyCmw.js → record-activity-CBXH6v1d.js} +2 -2
- package/dist/owletto/dist/assets/{renderer-BL6VcwQH.js → renderer-mEDnVW0O.js} +2 -2
- package/dist/owletto/dist/assets/{reset-password-DAvBYkiI.js → reset-password-uX_V6bip.js} +2 -2
- package/dist/owletto/dist/assets/{runs-BWtc5rmc.js → runs-C0rCgGwX.js} +2 -2
- package/dist/owletto/dist/assets/runs-panel-Du1JMjg5.js +2 -0
- package/dist/owletto/dist/assets/{runs-table-DxIiqrSk.js → runs-table-syPJ6r6T.js} +2 -2
- package/dist/owletto/dist/assets/{settings-Crxlwps-.js → settings-9NkNA1G1.js} +2 -2
- package/dist/owletto/dist/assets/settings-E-10sLQX.js +2 -0
- package/dist/owletto/dist/assets/skills-D2Ri9b4f.js +2 -0
- package/dist/owletto/dist/assets/{source-record-panels-CRIPMWfN.js → source-record-panels-CPyzlfD1.js} +2 -2
- package/dist/owletto/dist/assets/{status-dot-C5KDvvm9.js → status-dot-B-EWMgq6.js} +2 -2
- package/dist/owletto/dist/assets/{tabs-B4Er9hJj.js → tabs-DqIIkCX-.js} +2 -2
- package/dist/owletto/dist/assets/{use-mention-search-DqEykWl_.js → use-mention-search-By8RZyKW.js} +2 -2
- package/dist/owletto/dist/assets/{view-param-filters-Cylutoy1.js → view-param-filters-CqLZQrnO.js} +2 -2
- package/dist/owletto/dist/index.html +1 -1
- package/dist/server-main.bundle.mjs +11447 -10762
- package/npm-shrinkwrap.json +160 -160
- package/package.json +1 -1
- 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-source-read.d.ts +52 -0
- package/vendor/connector-sdk/dist/browser-source-read.js +107 -0
- package/vendor/connector-sdk/dist/connector-types.d.ts +10 -0
- package/vendor/connector-sdk/dist/index.d.ts +3 -0
- package/vendor/connector-sdk/dist/index.js +2 -0
- package/vendor/connector-sdk/package.json +9 -1
- package/vendor/core/dist/capabilities.d.ts +1 -1
- package/vendor/core/dist/capabilities.js +0 -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/tools/manage-conversations.js +2 -2
- 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/worker/protocol.d.ts +8 -131
- package/vendor/core/dist/contracts/worker/protocol.js +9 -61
- 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 +2 -1
- package/vendor/core/dist/index.js +1 -0
- package/vendor/core/dist/logger.js +10 -25
- package/vendor/core/dist/utils/diagnostic-scrubber.js +258 -21
- package/vendor/core/dist/worker/wire.d.ts +0 -10
- package/vendor/core/package.json +6 -6
- package/vendor/views/package.json +1 -1
- package/dist/owletto/dist/assets/_-C_zNZben.js +0 -2
- package/dist/owletto/dist/assets/_agentId-QQW91cHX.js +0 -2
- package/dist/owletto/dist/assets/_name-t3oBJ6Zf.js +0 -2
- package/dist/owletto/dist/assets/_shape-bo2lMVCu.js +0 -2
- package/dist/owletto/dist/assets/_skillKey-Dwm4Q4wI.js +0 -2
- package/dist/owletto/dist/assets/_viewKey-Bh6E_NxA.js +0 -2
- package/dist/owletto/dist/assets/_viewKey-D4jKl-Zf.js +0 -2
- package/dist/owletto/dist/assets/agent-thread-C8UaUTWc.js +0 -6
- package/dist/owletto/dist/assets/agents-F4mGI2oF.js +0 -2
- package/dist/owletto/dist/assets/automations-F4mGI2oF.js +0 -2
- package/dist/owletto/dist/assets/connect-B2YL6qIK.js +0 -2
- package/dist/owletto/dist/assets/connect._clientId-B6LDmDRV.js +0 -2
- package/dist/owletto/dist/assets/connected._clientId-D_HaKoI1.js +0 -2
- package/dist/owletto/dist/assets/create-CUqO6Kfk.js +0 -2
- package/dist/owletto/dist/assets/create-automation-form-_4vUkrls.js +0 -3
- package/dist/owletto/dist/assets/create-iHcxV0xd.js +0 -2
- package/dist/owletto/dist/assets/create._connectorKey-CCYLEicg.js +0 -2
- package/dist/owletto/dist/assets/deployments-ihkhK1zV.js +0 -2
- package/dist/owletto/dist/assets/guardrails-molekzAF.js +0 -2
- package/dist/owletto/dist/assets/identity-BJcaG66g.js +0 -2
- package/dist/owletto/dist/assets/index-B04ON9Jv.js +0 -2
- package/dist/owletto/dist/assets/index-BOsK-K-2.js +0 -2
- package/dist/owletto/dist/assets/index-Bk1x7A67.js +0 -2
- package/dist/owletto/dist/assets/index-CFnx5huL.js +0 -2
- package/dist/owletto/dist/assets/index-Dbd1jusf.js +0 -2
- package/dist/owletto/dist/assets/index-DqZuqC08.js +0 -2
- package/dist/owletto/dist/assets/index-Dr-Xg_xO.js +0 -2
- package/dist/owletto/dist/assets/index-KPOvMVa-.js +0 -2
- package/dist/owletto/dist/assets/models-DnMb3n-Z.js +0 -2
- package/dist/owletto/dist/assets/public-shell-ready-7KYnww6e.js +0 -2
- package/dist/owletto/dist/assets/runs-panel-BO3h5RkS.js +0 -2
- package/dist/owletto/dist/assets/settings-4Ev-0iNL.js +0 -2
- package/dist/owletto/dist/assets/skills-D0X430X8.js +0 -2
- package/vendor/core/dist/contracts/worker/device-chat.d.ts +0 -4
- package/vendor/core/dist/contracts/worker/device-chat.js +0 -26
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Single source of truth for the device/connector-worker job protocol:
|
|
5
5
|
* `POST /api/workers/poll`, `/api/workers/complete`, `/complete-action`,
|
|
6
|
-
* `/complete-embeddings`, `/complete-automation`, `/complete-
|
|
6
|
+
* `/complete-embeddings`, `/complete-automation`, `/complete-agent-turn`,
|
|
7
7
|
* `/emit-auth-artifact`, `/poll-auth-signal`, `/stream`, and the chrome-action
|
|
8
8
|
* dispatch.
|
|
9
9
|
*
|
|
@@ -60,7 +60,7 @@ export interface ConnectorHttpResponse {
|
|
|
60
60
|
body: string;
|
|
61
61
|
}
|
|
62
62
|
/** Run kinds the poller can hand back. */
|
|
63
|
-
export declare const RunTypeSchema: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"sync">, import("@sinclair/typebox").TLiteral<"action">, import("@sinclair/typebox").TLiteral<"automation">, import("@sinclair/typebox").TLiteral<"
|
|
63
|
+
export declare const RunTypeSchema: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"sync">, import("@sinclair/typebox").TLiteral<"action">, import("@sinclair/typebox").TLiteral<"automation">, import("@sinclair/typebox").TLiteral<"embed_backfill">, import("@sinclair/typebox").TLiteral<"auth">, import("@sinclair/typebox").TLiteral<"agent_turn">]>;
|
|
64
64
|
/** Categorized run exit reason on the failed-run path. */
|
|
65
65
|
export declare const WorkerExitReasonSchema: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"ok">, import("@sinclair/typebox").TLiteral<"cancelled">, import("@sinclair/typebox").TLiteral<"error_message">, import("@sinclair/typebox").TLiteral<"timeout">, import("@sinclair/typebox").TLiteral<"oom">, import("@sinclair/typebox").TLiteral<"crash">]>;
|
|
66
66
|
/**
|
|
@@ -261,7 +261,7 @@ export declare const AutomationPollEventSchema: import("@sinclair/typebox").TObj
|
|
|
261
261
|
fired_at: import("@sinclair/typebox").TString;
|
|
262
262
|
payload: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TUnknown>>;
|
|
263
263
|
}>;
|
|
264
|
-
/** Identity context for a device-local CLI run
|
|
264
|
+
/** Identity context for a device-local Automation CLI run. */
|
|
265
265
|
export declare const AutomationPollContextSchema: import("@sinclair/typebox").TObject<{
|
|
266
266
|
device: import("@sinclair/typebox").TObject<{
|
|
267
267
|
worker_id: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
@@ -327,66 +327,6 @@ export declare const AutomationPollPayloadSchema: import("@sinclair/typebox").TO
|
|
|
327
327
|
}>>;
|
|
328
328
|
}>;
|
|
329
329
|
}>;
|
|
330
|
-
/** One bounded prior turn shipped to a stateless device CLI. */
|
|
331
|
-
export declare const DeviceChatHistoryMessageSchema: import("@sinclair/typebox").TObject<{
|
|
332
|
-
role: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"user">, import("@sinclair/typebox").TLiteral<"assistant">]>;
|
|
333
|
-
content: import("@sinclair/typebox").TString;
|
|
334
|
-
}>;
|
|
335
|
-
/**
|
|
336
|
-
* Cap on the device chat envelope's `ephemeral_context`. Exported because the
|
|
337
|
-
* producer must agree with it BEFORE enqueueing: the server-side planner keeps
|
|
338
|
-
* an Automation whose composed instructions exceed this bound on the durable
|
|
339
|
-
* background lane rather than shipping a device turn the poll route would
|
|
340
|
-
* silently truncate.
|
|
341
|
-
*/
|
|
342
|
-
export declare const DEVICE_CHAT_MAX_CONTEXT_LENGTH = 2048;
|
|
343
|
-
/** Device-local chat execution metadata. Conversation ownership stays with `agent.id`. */
|
|
344
|
-
export declare const DeviceChatPollPayloadSchema: import("@sinclair/typebox").TObject<{
|
|
345
|
-
chat: import("@sinclair/typebox").TObject<{
|
|
346
|
-
agent_kind: import("@sinclair/typebox").TString;
|
|
347
|
-
execution_config: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
348
|
-
/** Wall-clock cap in seconds; the dispatcher enforces it by SIGTERM. */
|
|
349
|
-
timeout_seconds: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TInteger>;
|
|
350
|
-
/** Per-run dollar ceiling (claude-only today). */
|
|
351
|
-
max_budget_usd: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
|
|
352
|
-
/** Model alias/id (`--model` / `-m`). */
|
|
353
|
-
model: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
354
|
-
/** Tool permission mode (`--permission-mode`). */
|
|
355
|
-
permission_mode: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
356
|
-
/** Reasoning effort accepted by the selected CLI and model. */
|
|
357
|
-
effort: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
358
|
-
}>>;
|
|
359
|
-
message: import("@sinclair/typebox").TString;
|
|
360
|
-
ephemeral_context: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
361
|
-
history: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
|
|
362
|
-
role: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"user">, import("@sinclair/typebox").TLiteral<"assistant">]>;
|
|
363
|
-
content: import("@sinclair/typebox").TString;
|
|
364
|
-
}>>;
|
|
365
|
-
agent: import("@sinclair/typebox").TObject<{
|
|
366
|
-
id: import("@sinclair/typebox").TString;
|
|
367
|
-
name: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
368
|
-
identity_md: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
369
|
-
soul_md: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
370
|
-
user_md: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
371
|
-
}>;
|
|
372
|
-
}>;
|
|
373
|
-
context: import("@sinclair/typebox").TObject<{
|
|
374
|
-
device: import("@sinclair/typebox").TObject<{
|
|
375
|
-
worker_id: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
376
|
-
}>;
|
|
377
|
-
user: import("@sinclair/typebox").TObject<{
|
|
378
|
-
user_id: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>>;
|
|
379
|
-
}>;
|
|
380
|
-
agent_session: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
381
|
-
conversation_id: import("@sinclair/typebox").TString;
|
|
382
|
-
mcp_url: import("@sinclair/typebox").TString;
|
|
383
|
-
token: import("@sinclair/typebox").TString;
|
|
384
|
-
expires_at: import("@sinclair/typebox").TNumber;
|
|
385
|
-
/** Exact same-device ACP session to continue; never discovered by listing sessions. */
|
|
386
|
-
resume_session_id: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
387
|
-
}>>;
|
|
388
|
-
}>;
|
|
389
|
-
}>;
|
|
390
330
|
export declare const AgentTurnPollPayloadSchema: import("@sinclair/typebox").TObject<{
|
|
391
331
|
turn: import("@sinclair/typebox").TObject<{
|
|
392
332
|
agent_id: import("@sinclair/typebox").TString;
|
|
@@ -700,7 +640,7 @@ export declare const PollResponseSchema: import("@sinclair/typebox").TObject<{
|
|
|
700
640
|
urls: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>;
|
|
701
641
|
}>>>;
|
|
702
642
|
run_id: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TInteger>;
|
|
703
|
-
run_type: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"sync">, import("@sinclair/typebox").TLiteral<"action">, import("@sinclair/typebox").TLiteral<"automation">, import("@sinclair/typebox").TLiteral<"
|
|
643
|
+
run_type: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"sync">, import("@sinclair/typebox").TLiteral<"action">, import("@sinclair/typebox").TLiteral<"automation">, import("@sinclair/typebox").TLiteral<"embed_backfill">, import("@sinclair/typebox").TLiteral<"auth">, import("@sinclair/typebox").TLiteral<"agent_turn">]>>;
|
|
704
644
|
auth_profile_id: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TInteger>;
|
|
705
645
|
previous_credentials: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TUnknown>, import("@sinclair/typebox").TNull]>>;
|
|
706
646
|
connector_key: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
@@ -749,9 +689,9 @@ export declare const PollResponseSchema: import("@sinclair/typebox").TObject<{
|
|
|
749
689
|
/** Owning org of a claimed device-local CLI run. */
|
|
750
690
|
organization_id: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
751
691
|
/**
|
|
752
|
-
*
|
|
753
|
-
* gateway composes the prompt context and the
|
|
754
|
-
* matching completion endpoint. No connector code
|
|
692
|
+
* Envelope for an `automation` run (a device-local CLI) or an `agent_turn`
|
|
693
|
+
* run. The gateway composes the prompt context and the worker reports
|
|
694
|
+
* through the matching completion endpoint. No connector code is shipped.
|
|
755
695
|
*/
|
|
756
696
|
payload: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TObject<{
|
|
757
697
|
automation: import("@sinclair/typebox").TObject<{
|
|
@@ -795,51 +735,6 @@ export declare const PollResponseSchema: import("@sinclair/typebox").TObject<{
|
|
|
795
735
|
resume_session_id: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
796
736
|
}>>;
|
|
797
737
|
}>;
|
|
798
|
-
}>, import("@sinclair/typebox").TObject<{
|
|
799
|
-
chat: import("@sinclair/typebox").TObject<{
|
|
800
|
-
agent_kind: import("@sinclair/typebox").TString;
|
|
801
|
-
execution_config: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
802
|
-
/** Wall-clock cap in seconds; the dispatcher enforces it by SIGTERM. */
|
|
803
|
-
timeout_seconds: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TInteger>;
|
|
804
|
-
/** Per-run dollar ceiling (claude-only today). */
|
|
805
|
-
max_budget_usd: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
|
|
806
|
-
/** Model alias/id (`--model` / `-m`). */
|
|
807
|
-
model: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
808
|
-
/** Tool permission mode (`--permission-mode`). */
|
|
809
|
-
permission_mode: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
810
|
-
/** Reasoning effort accepted by the selected CLI and model. */
|
|
811
|
-
effort: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
812
|
-
}>>;
|
|
813
|
-
message: import("@sinclair/typebox").TString;
|
|
814
|
-
ephemeral_context: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
815
|
-
history: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
|
|
816
|
-
role: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"user">, import("@sinclair/typebox").TLiteral<"assistant">]>;
|
|
817
|
-
content: import("@sinclair/typebox").TString;
|
|
818
|
-
}>>;
|
|
819
|
-
agent: import("@sinclair/typebox").TObject<{
|
|
820
|
-
id: import("@sinclair/typebox").TString;
|
|
821
|
-
name: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
822
|
-
identity_md: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
823
|
-
soul_md: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
824
|
-
user_md: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
825
|
-
}>;
|
|
826
|
-
}>;
|
|
827
|
-
context: import("@sinclair/typebox").TObject<{
|
|
828
|
-
device: import("@sinclair/typebox").TObject<{
|
|
829
|
-
worker_id: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
830
|
-
}>;
|
|
831
|
-
user: import("@sinclair/typebox").TObject<{
|
|
832
|
-
user_id: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>>;
|
|
833
|
-
}>;
|
|
834
|
-
agent_session: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
835
|
-
conversation_id: import("@sinclair/typebox").TString;
|
|
836
|
-
mcp_url: import("@sinclair/typebox").TString;
|
|
837
|
-
token: import("@sinclair/typebox").TString;
|
|
838
|
-
expires_at: import("@sinclair/typebox").TNumber;
|
|
839
|
-
/** Exact same-device ACP session to continue; never discovered by listing sessions. */
|
|
840
|
-
resume_session_id: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
841
|
-
}>>;
|
|
842
|
-
}>;
|
|
843
738
|
}>, import("@sinclair/typebox").TObject<{
|
|
844
739
|
turn: import("@sinclair/typebox").TObject<{
|
|
845
740
|
agent_id: import("@sinclair/typebox").TString;
|
|
@@ -1224,8 +1119,8 @@ export declare const CompleteAuthRequestSchema: import("@sinclair/typebox").TObj
|
|
|
1224
1119
|
status: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"success">, import("@sinclair/typebox").TLiteral<"failed">]>;
|
|
1225
1120
|
run_id: import("@sinclair/typebox").TInteger;
|
|
1226
1121
|
worker_id: import("@sinclair/typebox").TString;
|
|
1227
|
-
metadata: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TUnknown>>;
|
|
1228
1122
|
credentials: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TUnknown>>;
|
|
1123
|
+
metadata: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TUnknown>>;
|
|
1229
1124
|
output_tail: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
1230
1125
|
exit_code: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TInteger, import("@sinclair/typebox").TNull]>>;
|
|
1231
1126
|
exit_signal: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>>;
|
|
@@ -1264,20 +1159,6 @@ export declare const CompleteAutomationResponseSchema: import("@sinclair/typebox
|
|
|
1264
1159
|
run_id: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TInteger, import("@sinclair/typebox").TNull]>>;
|
|
1265
1160
|
idempotent: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TBoolean, import("@sinclair/typebox").TNull]>>;
|
|
1266
1161
|
}>;
|
|
1267
|
-
/** `POST .../complete-chat` terminal report for a `chat_message` turn. */
|
|
1268
|
-
export declare const CompleteDeviceChatRequestSchema: import("@sinclair/typebox").TObject<{
|
|
1269
|
-
worker_id: import("@sinclair/typebox").TString;
|
|
1270
|
-
output: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
1271
|
-
error: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>>;
|
|
1272
|
-
exit_code: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TInteger, import("@sinclair/typebox").TNull]>>;
|
|
1273
|
-
exit_signal: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>>;
|
|
1274
|
-
exit_reason: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"ok">, import("@sinclair/typebox").TLiteral<"cancelled">, import("@sinclair/typebox").TLiteral<"error_message">, import("@sinclair/typebox").TLiteral<"timeout">, import("@sinclair/typebox").TLiteral<"oom">, import("@sinclair/typebox").TLiteral<"crash">]>>;
|
|
1275
|
-
}>;
|
|
1276
|
-
export declare const CompleteDeviceChatResponseSchema: import("@sinclair/typebox").TObject<{
|
|
1277
|
-
ok: import("@sinclair/typebox").TBoolean;
|
|
1278
|
-
status: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"completed">, import("@sinclair/typebox").TLiteral<"failed">]>;
|
|
1279
|
-
idempotent: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
|
1280
|
-
}>;
|
|
1281
1162
|
/**
|
|
1282
1163
|
* `POST /api/workers/complete-agent-turn`.
|
|
1283
1164
|
*
|
|
@@ -1638,12 +1519,8 @@ export type AutomationPollMeta = Static<typeof AutomationPollMetaSchema>;
|
|
|
1638
1519
|
export type AutomationPollEvent = Static<typeof AutomationPollEventSchema>;
|
|
1639
1520
|
export type AutomationPollContext = Static<typeof AutomationPollContextSchema>;
|
|
1640
1521
|
export type AutomationPollPayload = Static<typeof AutomationPollPayloadSchema>;
|
|
1641
|
-
export type DeviceChatHistoryMessage = Static<typeof DeviceChatHistoryMessageSchema>;
|
|
1642
|
-
export type DeviceChatPollPayload = Static<typeof DeviceChatPollPayloadSchema>;
|
|
1643
1522
|
export type CompleteAutomationRequest = Static<typeof CompleteAutomationRequestSchema>;
|
|
1644
1523
|
export type CompleteAutomationResponse = Static<typeof CompleteAutomationResponseSchema>;
|
|
1645
|
-
export type CompleteDeviceChatRequest = Static<typeof CompleteDeviceChatRequestSchema>;
|
|
1646
|
-
export type CompleteDeviceChatResponse = Static<typeof CompleteDeviceChatResponseSchema>;
|
|
1647
1524
|
export type AgentTurnPollPayload = Static<typeof AgentTurnPollPayloadSchema>;
|
|
1648
1525
|
export type CompleteAgentTurnRequest = Static<typeof CompleteAgentTurnRequestSchema>;
|
|
1649
1526
|
export type CompleteAgentTurnResponse = Static<typeof CompleteAgentTurnResponseSchema>;
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*
|
|
5
5
|
* Single source of truth for the device/connector-worker job protocol:
|
|
6
6
|
* `POST /api/workers/poll`, `/api/workers/complete`, `/complete-action`,
|
|
7
|
-
* `/complete-embeddings`, `/complete-automation`, `/complete-
|
|
7
|
+
* `/complete-embeddings`, `/complete-automation`, `/complete-agent-turn`,
|
|
8
8
|
* `/emit-auth-artifact`, `/poll-auth-signal`, `/stream`, and the chrome-action
|
|
9
9
|
* dispatch.
|
|
10
10
|
*
|
|
@@ -26,8 +26,7 @@
|
|
|
26
26
|
* not change that boundary, it only types what already crosses it.
|
|
27
27
|
*/
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
exports.ExecuteConnectorOperationRequestSchema = exports.HeartbeatRequestSchema = exports.AGENT_TURN_BRIDGE_BYTES = exports.TURN_DELTA_MAX_CHARS = exports.PollAuthSignalResponseSchema = exports.PollAuthSignalRequestSchema = exports.EmitAuthArtifactRequestSchema = exports.CompleteAgentTurnResponseSchema = exports.CompleteAgentTurnRequestSchema = exports.AGENT_TURN_INPUT_MAX = exports.TURN_TOOL_EVENT_QUEUE_MAX = exports.TurnToolEventSchema = exports.TURN_TOOL_OUTPUT_MAX_CHARS = exports.
|
|
30
|
-
exports.HeartbeatResponseSchema = exports.DispatchChromeActionResponseSchema = exports.DispatchChromeActionRequestSchema = void 0;
|
|
29
|
+
exports.HeartbeatResponseSchema = exports.DispatchChromeActionResponseSchema = exports.DispatchChromeActionRequestSchema = exports.ExecuteConnectorOperationRequestSchema = exports.HeartbeatRequestSchema = exports.AGENT_TURN_BRIDGE_BYTES = exports.TURN_DELTA_MAX_CHARS = exports.PollAuthSignalResponseSchema = exports.PollAuthSignalRequestSchema = exports.EmitAuthArtifactRequestSchema = exports.CompleteAgentTurnResponseSchema = exports.CompleteAgentTurnRequestSchema = exports.AGENT_TURN_INPUT_MAX = exports.TURN_TOOL_EVENT_QUEUE_MAX = exports.TurnToolEventSchema = exports.TURN_TOOL_OUTPUT_MAX_CHARS = exports.CompleteAutomationResponseSchema = exports.CompleteAutomationRequestSchema = exports.CompleteAuthRequestSchema = exports.CompleteEmbeddingsRequestSchema = exports.EmbeddingEntrySchema = exports.EmbedEventSchema = exports.CompleteActionRequestSchema = exports.CompleteRequestSchema = exports.StreamBatchSchema = exports.ContentItemSchema = exports.ActivatePageResponseSchema = exports.ActivatePageRequestSchema = exports.PollResponseSchema = exports.FeedSourceAckSchema = exports.AgentTurnPollPayloadSchema = exports.AutomationPollPayloadSchema = exports.AutomationPollContextSchema = exports.AutomationPollEventSchema = exports.AutomationPollMetaSchema = exports.AutomationExecutionConfigSchema = exports.PollRequestSchema = exports.WORKER_POLL_MAX_WAIT_SECONDS = exports.FeedNotificationSchema = exports.EXECUTION_BACKENDS = exports.OAuthCredentialsSchema = exports.WorkerExitDiagnosticsSchema = exports.WorkerExitReasonSchema = exports.RunTypeSchema = exports.ConnectorHttpRequestSchema = exports.SourceAttributionSchema = exports.CONNECTOR_HTTP_MAX_BYTES = exports.CONNECTOR_HTTP_AUTH_CAPABILITY = void 0;
|
|
31
30
|
exports.defaultBackendCapacity = defaultBackendCapacity;
|
|
32
31
|
const typebox_1 = require("@sinclair/typebox");
|
|
33
32
|
const manage_operations_1 = require("../tools/manage-operations");
|
|
@@ -81,15 +80,13 @@ exports.RunTypeSchema = typebox_1.Type.Union([
|
|
|
81
80
|
typebox_1.Type.Literal("sync"),
|
|
82
81
|
typebox_1.Type.Literal("action"),
|
|
83
82
|
typebox_1.Type.Literal("automation"),
|
|
84
|
-
typebox_1.Type.Literal("chat_message"),
|
|
85
83
|
typebox_1.Type.Literal("embed_backfill"),
|
|
86
84
|
typebox_1.Type.Literal("auth"),
|
|
87
85
|
/**
|
|
88
86
|
* One conversation turn executed as one isolate job, claimed only by a fleet
|
|
89
87
|
* worker that advertises the lane and run through `IsolateExecutor`. Distinct
|
|
90
|
-
* from `chat_message`, a lobu-queue row the gateway drains
|
|
91
|
-
*
|
|
92
|
-
* this same poll. A daemon that predates this lane must never claim an
|
|
88
|
+
* from `chat_message`, a lobu-queue row the gateway drains itself and never
|
|
89
|
+
* hands to a poller. A daemon that predates this lane must never claim an
|
|
93
90
|
* `agent_turn`: its dispatch would fall through to a connector sync.
|
|
94
91
|
*/
|
|
95
92
|
typebox_1.Type.Literal("agent_turn"),
|
|
@@ -274,7 +271,7 @@ exports.AutomationPollEventSchema = typebox_1.Type.Object({
|
|
|
274
271
|
fired_at: typebox_1.Type.String(),
|
|
275
272
|
payload: typebox_1.Type.Optional(typebox_1.Type.Record(typebox_1.Type.String(), typebox_1.Type.Unknown())),
|
|
276
273
|
});
|
|
277
|
-
/** Identity context for a device-local CLI run
|
|
274
|
+
/** Identity context for a device-local Automation CLI run. */
|
|
278
275
|
exports.AutomationPollContextSchema = typebox_1.Type.Object({
|
|
279
276
|
device: typebox_1.Type.Object({ worker_id: typebox_1.Type.Optional(typebox_1.Type.String()) }),
|
|
280
277
|
user: typebox_1.Type.Object({
|
|
@@ -311,37 +308,6 @@ exports.AutomationPollPayloadSchema = typebox_1.Type.Object({
|
|
|
311
308
|
event: exports.AutomationPollEventSchema,
|
|
312
309
|
context: exports.AutomationPollContextSchema,
|
|
313
310
|
});
|
|
314
|
-
/** One bounded prior turn shipped to a stateless device CLI. */
|
|
315
|
-
exports.DeviceChatHistoryMessageSchema = typebox_1.Type.Object({
|
|
316
|
-
role: typebox_1.Type.Union([typebox_1.Type.Literal("user"), typebox_1.Type.Literal("assistant")]),
|
|
317
|
-
content: typebox_1.Type.String({ maxLength: 16000 }),
|
|
318
|
-
});
|
|
319
|
-
/**
|
|
320
|
-
* Cap on the device chat envelope's `ephemeral_context`. Exported because the
|
|
321
|
-
* producer must agree with it BEFORE enqueueing: the server-side planner keeps
|
|
322
|
-
* an Automation whose composed instructions exceed this bound on the durable
|
|
323
|
-
* background lane rather than shipping a device turn the poll route would
|
|
324
|
-
* silently truncate.
|
|
325
|
-
*/
|
|
326
|
-
exports.DEVICE_CHAT_MAX_CONTEXT_LENGTH = 2048;
|
|
327
|
-
/** Device-local chat execution metadata. Conversation ownership stays with `agent.id`. */
|
|
328
|
-
exports.DeviceChatPollPayloadSchema = typebox_1.Type.Object({
|
|
329
|
-
chat: typebox_1.Type.Object({
|
|
330
|
-
agent_kind: typebox_1.Type.String({ minLength: 1, maxLength: 64 }),
|
|
331
|
-
execution_config: typebox_1.Type.Optional(exports.AutomationExecutionConfigSchema),
|
|
332
|
-
message: typebox_1.Type.String({ maxLength: 32000 }),
|
|
333
|
-
ephemeral_context: typebox_1.Type.Optional(typebox_1.Type.String({ maxLength: exports.DEVICE_CHAT_MAX_CONTEXT_LENGTH })),
|
|
334
|
-
history: typebox_1.Type.Array(exports.DeviceChatHistoryMessageSchema, { maxItems: 12 }),
|
|
335
|
-
agent: typebox_1.Type.Object({
|
|
336
|
-
id: typebox_1.Type.String({ minLength: 1 }),
|
|
337
|
-
name: typebox_1.Type.Optional(typebox_1.Type.String()),
|
|
338
|
-
identity_md: typebox_1.Type.Optional(typebox_1.Type.String()),
|
|
339
|
-
soul_md: typebox_1.Type.Optional(typebox_1.Type.String()),
|
|
340
|
-
user_md: typebox_1.Type.Optional(typebox_1.Type.String()),
|
|
341
|
-
}),
|
|
342
|
-
}),
|
|
343
|
-
context: exports.AutomationPollContextSchema,
|
|
344
|
-
});
|
|
345
311
|
/**
|
|
346
312
|
* `payload` of an agent-turn poll response.
|
|
347
313
|
*
|
|
@@ -724,15 +690,11 @@ exports.PollResponseSchema = typebox_1.Type.Object({
|
|
|
724
690
|
/** Owning org of a claimed device-local CLI run. */
|
|
725
691
|
organization_id: typebox_1.Type.Optional(typebox_1.Type.String()),
|
|
726
692
|
/**
|
|
727
|
-
*
|
|
728
|
-
* gateway composes the prompt context and the
|
|
729
|
-
* matching completion endpoint. No connector code
|
|
693
|
+
* Envelope for an `automation` run (a device-local CLI) or an `agent_turn`
|
|
694
|
+
* run. The gateway composes the prompt context and the worker reports
|
|
695
|
+
* through the matching completion endpoint. No connector code is shipped.
|
|
730
696
|
*/
|
|
731
|
-
payload: typebox_1.Type.Optional(typebox_1.Type.Union([
|
|
732
|
-
exports.AutomationPollPayloadSchema,
|
|
733
|
-
exports.DeviceChatPollPayloadSchema,
|
|
734
|
-
exports.AgentTurnPollPayloadSchema,
|
|
735
|
-
])),
|
|
697
|
+
payload: typebox_1.Type.Optional(typebox_1.Type.Union([exports.AutomationPollPayloadSchema, exports.AgentTurnPollPayloadSchema])),
|
|
736
698
|
});
|
|
737
699
|
exports.ActivatePageRequestSchema = typebox_1.Type.Object({
|
|
738
700
|
worker_id: typebox_1.Type.String({ minLength: 1 }),
|
|
@@ -879,20 +841,6 @@ exports.CompleteAutomationResponseSchema = typebox_1.Type.Object({
|
|
|
879
841
|
run_id: typebox_1.Type.Optional(typebox_1.Type.Union([typebox_1.Type.Integer(), typebox_1.Type.Null()])),
|
|
880
842
|
idempotent: typebox_1.Type.Optional(typebox_1.Type.Union([typebox_1.Type.Boolean(), typebox_1.Type.Null()])),
|
|
881
843
|
});
|
|
882
|
-
/** `POST .../complete-chat` terminal report for a `chat_message` turn. */
|
|
883
|
-
exports.CompleteDeviceChatRequestSchema = typebox_1.Type.Object({
|
|
884
|
-
worker_id: typebox_1.Type.String(),
|
|
885
|
-
output: typebox_1.Type.Optional(typebox_1.Type.String()),
|
|
886
|
-
error: typebox_1.Type.Optional(typebox_1.Type.Union([typebox_1.Type.String(), typebox_1.Type.Null()])),
|
|
887
|
-
exit_code: typebox_1.Type.Optional(typebox_1.Type.Union([typebox_1.Type.Integer(), typebox_1.Type.Null()])),
|
|
888
|
-
exit_signal: typebox_1.Type.Optional(typebox_1.Type.Union([typebox_1.Type.String(), typebox_1.Type.Null()])),
|
|
889
|
-
exit_reason: typebox_1.Type.Optional(exports.WorkerExitReasonSchema),
|
|
890
|
-
});
|
|
891
|
-
exports.CompleteDeviceChatResponseSchema = typebox_1.Type.Object({
|
|
892
|
-
ok: typebox_1.Type.Boolean(),
|
|
893
|
-
status: typebox_1.Type.Union([typebox_1.Type.Literal("completed"), typebox_1.Type.Literal("failed")]),
|
|
894
|
-
idempotent: typebox_1.Type.Optional(typebox_1.Type.Boolean()),
|
|
895
|
-
});
|
|
896
844
|
/**
|
|
897
845
|
* `POST /api/workers/complete-agent-turn`.
|
|
898
846
|
*
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Device-pin tombstones on `connections.error_message`.
|
|
3
|
+
*
|
|
4
|
+
* DELETE /api/me/devices and PATCH device org-move un-pin connections and
|
|
5
|
+
* stamp a fixed error string so the UI can explain why a connector stopped.
|
|
6
|
+
* When a device re-registers / is re-pinned, every restore path MUST clear
|
|
7
|
+
* those strings — otherwise the connection is `active` + green while the
|
|
8
|
+
* header still shows red "Device was removed".
|
|
9
|
+
*
|
|
10
|
+
* Single source of truth for the stamp/clear literals and the live-pin
|
|
11
|
+
* predicate. The gateway (`packages/server/src/utils/device-pin-tombstones.ts`,
|
|
12
|
+
* which adds the DB clear) and the Owletto client
|
|
13
|
+
* (`packages/owletto/src/lib/device-pin-tombstone.ts`, which adds the display
|
|
14
|
+
* mask) both re-export this module. Keep stamp and clear sites on these exact
|
|
15
|
+
* literals.
|
|
16
|
+
*/
|
|
17
|
+
/** Exact `connections.error_message` values written when a device pin is torn down. */
|
|
18
|
+
export declare const DEVICE_PIN_TOMBSTONE_MESSAGES: readonly ["Device was removed", "Device was moved to another workspace"];
|
|
19
|
+
export type DevicePinTombstoneMessage = (typeof DEVICE_PIN_TOMBSTONE_MESSAGES)[number];
|
|
20
|
+
export declare const DEVICE_REMOVED_TOMBSTONE: DevicePinTombstoneMessage;
|
|
21
|
+
export declare const DEVICE_MOVED_TOMBSTONE: DevicePinTombstoneMessage;
|
|
22
|
+
export declare function isDevicePinTombstone(message: string | null | undefined): message is DevicePinTombstoneMessage;
|
|
23
|
+
/**
|
|
24
|
+
* True when a listed connection still has a live device_workers row for its pin
|
|
25
|
+
* (join populated `device_last_seen_at` / handle). Tombstone should not be shown.
|
|
26
|
+
*/
|
|
27
|
+
export declare function connectionHasLiveDevicePin(row: {
|
|
28
|
+
device_worker_id?: string | null;
|
|
29
|
+
device_last_seen_at?: string | Date | null;
|
|
30
|
+
device_worker_handle?: string | null;
|
|
31
|
+
device_label?: string | null;
|
|
32
|
+
}): boolean;
|
|
33
|
+
/**
|
|
34
|
+
* Effective error for API responses: suppress pin-tombstones once a device is
|
|
35
|
+
* pinned again (even if a write path forgot to clear the column).
|
|
36
|
+
*/
|
|
37
|
+
export declare function effectiveConnectionErrorMessage(row: {
|
|
38
|
+
error_message?: string | null;
|
|
39
|
+
device_worker_id?: string | null;
|
|
40
|
+
device_last_seen_at?: string | Date | null;
|
|
41
|
+
device_worker_handle?: string | null;
|
|
42
|
+
device_label?: string | null;
|
|
43
|
+
}): string | null;
|
|
44
|
+
//# sourceMappingURL=device-pin-tombstones.d.ts.map
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Device-pin tombstones on `connections.error_message`.
|
|
4
|
+
*
|
|
5
|
+
* DELETE /api/me/devices and PATCH device org-move un-pin connections and
|
|
6
|
+
* stamp a fixed error string so the UI can explain why a connector stopped.
|
|
7
|
+
* When a device re-registers / is re-pinned, every restore path MUST clear
|
|
8
|
+
* those strings — otherwise the connection is `active` + green while the
|
|
9
|
+
* header still shows red "Device was removed".
|
|
10
|
+
*
|
|
11
|
+
* Single source of truth for the stamp/clear literals and the live-pin
|
|
12
|
+
* predicate. The gateway (`packages/server/src/utils/device-pin-tombstones.ts`,
|
|
13
|
+
* which adds the DB clear) and the Owletto client
|
|
14
|
+
* (`packages/owletto/src/lib/device-pin-tombstone.ts`, which adds the display
|
|
15
|
+
* mask) both re-export this module. Keep stamp and clear sites on these exact
|
|
16
|
+
* literals.
|
|
17
|
+
*/
|
|
18
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
19
|
+
exports.DEVICE_MOVED_TOMBSTONE = exports.DEVICE_REMOVED_TOMBSTONE = exports.DEVICE_PIN_TOMBSTONE_MESSAGES = void 0;
|
|
20
|
+
exports.isDevicePinTombstone = isDevicePinTombstone;
|
|
21
|
+
exports.connectionHasLiveDevicePin = connectionHasLiveDevicePin;
|
|
22
|
+
exports.effectiveConnectionErrorMessage = effectiveConnectionErrorMessage;
|
|
23
|
+
/** Exact `connections.error_message` values written when a device pin is torn down. */
|
|
24
|
+
exports.DEVICE_PIN_TOMBSTONE_MESSAGES = [
|
|
25
|
+
"Device was removed",
|
|
26
|
+
"Device was moved to another workspace",
|
|
27
|
+
];
|
|
28
|
+
exports.DEVICE_REMOVED_TOMBSTONE = "Device was removed";
|
|
29
|
+
exports.DEVICE_MOVED_TOMBSTONE = "Device was moved to another workspace";
|
|
30
|
+
function isDevicePinTombstone(message) {
|
|
31
|
+
return (typeof message === "string" &&
|
|
32
|
+
exports.DEVICE_PIN_TOMBSTONE_MESSAGES.includes(message));
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* True when a listed connection still has a live device_workers row for its pin
|
|
36
|
+
* (join populated `device_last_seen_at` / handle). Tombstone should not be shown.
|
|
37
|
+
*/
|
|
38
|
+
function connectionHasLiveDevicePin(row) {
|
|
39
|
+
if (!row.device_worker_id)
|
|
40
|
+
return false;
|
|
41
|
+
// Any of these being set means the LEFT JOIN to device_workers matched.
|
|
42
|
+
return (row.device_last_seen_at != null ||
|
|
43
|
+
row.device_worker_handle != null ||
|
|
44
|
+
row.device_label != null);
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Effective error for API responses: suppress pin-tombstones once a device is
|
|
48
|
+
* pinned again (even if a write path forgot to clear the column).
|
|
49
|
+
*/
|
|
50
|
+
function effectiveConnectionErrorMessage(row) {
|
|
51
|
+
const msg = row.error_message ?? null;
|
|
52
|
+
if (isDevicePinTombstone(msg) && connectionHasLiveDevicePin(row)) {
|
|
53
|
+
return null;
|
|
54
|
+
}
|
|
55
|
+
return msg;
|
|
56
|
+
}
|
|
57
|
+
//# sourceMappingURL=device-pin-tombstones.js.map
|
|
@@ -12,6 +12,7 @@ export type { CommandContext, CommandDefinition } from "./command-registry";
|
|
|
12
12
|
export { CommandRegistry } from "./command-registry";
|
|
13
13
|
export * from "./connector-query-errors";
|
|
14
14
|
export * from "./constants";
|
|
15
|
+
export * from "./device-pin-tombstones";
|
|
15
16
|
export * from "./contracts/interaction-envelope";
|
|
16
17
|
export * from "./credentials";
|
|
17
18
|
export * from "./classify-error";
|
|
@@ -48,6 +49,6 @@ export { slugify } from "./utils/slug";
|
|
|
48
49
|
export * from "./utils/urls";
|
|
49
50
|
export * from "./worker/auth";
|
|
50
51
|
export type { WorkerTransport, WorkerTransportConfig, } from "./worker/transport";
|
|
51
|
-
export type {
|
|
52
|
+
export type { JobType, MessagePayload, QueuedMessage, } from "./worker/wire";
|
|
52
53
|
export { withLobuFileParameters } from "./agent-tooling";
|
|
53
54
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -30,6 +30,7 @@ var command_registry_1 = require("./command-registry");
|
|
|
30
30
|
Object.defineProperty(exports, "CommandRegistry", { enumerable: true, get: function () { return command_registry_1.CommandRegistry; } });
|
|
31
31
|
__exportStar(require("./connector-query-errors"), exports);
|
|
32
32
|
__exportStar(require("./constants"), exports);
|
|
33
|
+
__exportStar(require("./device-pin-tombstones"), exports);
|
|
33
34
|
// Interaction-envelope wire literals (tool_approval resourceKind / attribution).
|
|
34
35
|
// Deep import `@lobu/core/contracts/interaction-envelope` also works under
|
|
35
36
|
// bundler/NodeNext resolution; plugin packages with classic `moduleResolution:
|
|
@@ -11,30 +11,9 @@ const USE_WINSTON_LOGGER = process.env.USE_WINSTON_LOGGER === "true";
|
|
|
11
11
|
const USE_JSON_FORMAT = process.env.LOG_FORMAT === "json";
|
|
12
12
|
const winston_1 = __importDefault(require("winston"));
|
|
13
13
|
const diagnostic_scrubber_1 = require("./utils/diagnostic-scrubber");
|
|
14
|
-
const SENSITIVE_LOG_KEY_PATTERN = /(?:credential|secret|token|password|api(?:_|-)?key|authorization)/i;
|
|
15
|
-
function createRedactingReplacer() {
|
|
16
|
-
const seen = new WeakSet();
|
|
17
|
-
return (key, value) => {
|
|
18
|
-
if (SENSITIVE_LOG_KEY_PATTERN.test(key))
|
|
19
|
-
return "[REDACTED]";
|
|
20
|
-
if (value instanceof Error) {
|
|
21
|
-
return {
|
|
22
|
-
name: value.name,
|
|
23
|
-
message: value.message,
|
|
24
|
-
stack: value.stack,
|
|
25
|
-
};
|
|
26
|
-
}
|
|
27
|
-
if (typeof value === "object" && value !== null) {
|
|
28
|
-
if (seen.has(value))
|
|
29
|
-
return "[Circular Reference]";
|
|
30
|
-
seen.add(value);
|
|
31
|
-
}
|
|
32
|
-
return value;
|
|
33
|
-
};
|
|
34
|
-
}
|
|
35
14
|
function safeStringify(value, space) {
|
|
36
15
|
try {
|
|
37
|
-
return JSON.stringify((0, diagnostic_scrubber_1.scrubDiagnosticValue)(value),
|
|
16
|
+
return JSON.stringify((0, diagnostic_scrubber_1.scrubDiagnosticValue)(value), null, space);
|
|
38
17
|
}
|
|
39
18
|
catch {
|
|
40
19
|
return "[unserializable]";
|
|
@@ -63,7 +42,9 @@ function createConsoleLogger(serviceName) {
|
|
|
63
42
|
// Keep the metadata object as a trailing arg so it still renders.
|
|
64
43
|
// Slicing it away accepted the signature and then dropped the payload,
|
|
65
44
|
// emptying every structured diagnostic that uses this call shape.
|
|
66
|
-
|
|
45
|
+
// The message itself is a string, so it takes the same boundary
|
|
46
|
+
// scrubbing as any other string message.
|
|
47
|
+
msgStr = (0, diagnostic_scrubber_1.scrubDiagnosticValue)(args[0]);
|
|
67
48
|
args = [message, ...args.slice(1)];
|
|
68
49
|
}
|
|
69
50
|
else {
|
|
@@ -72,7 +53,11 @@ function createConsoleLogger(serviceName) {
|
|
|
72
53
|
}
|
|
73
54
|
}
|
|
74
55
|
else {
|
|
75
|
-
|
|
56
|
+
// Everything else funnels through String() here: plain strings,
|
|
57
|
+
// Errors, and top-level arrays (their join is just message text).
|
|
58
|
+
// Scrub the converted text — the removed final scrub used to cover
|
|
59
|
+
// all of these, and that coverage now lives here.
|
|
60
|
+
msgStr = (0, diagnostic_scrubber_1.scrubDiagnosticValue)(String(message));
|
|
76
61
|
}
|
|
77
62
|
if (USE_JSON_FORMAT) {
|
|
78
63
|
return safeStringify({
|
|
@@ -90,7 +75,7 @@ function createConsoleLogger(serviceName) {
|
|
|
90
75
|
if (args.length > 0) {
|
|
91
76
|
msgStr += ` ${safeStringify(args.length === 1 ? args[0] : args)}`;
|
|
92
77
|
}
|
|
93
|
-
return `[${timestamp.replace("T", " ").slice(0, 19)}] [${lvl}] [${serviceName}] ${
|
|
78
|
+
return `[${timestamp.replace("T", " ").slice(0, 19)}] [${lvl}] [${serviceName}] ${msgStr}`;
|
|
94
79
|
};
|
|
95
80
|
return {
|
|
96
81
|
error: (message, ...args) => {
|