@xopcai/xopc 0.0.373 → 0.0.375
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/browser-ext/manifest.json +1 -1
- package/dist/extensions/feishu/src/outbound/media-load.js +1 -1
- package/dist/extensions/telegram/xopc.extension.json +1 -1
- package/dist/gateway/static/root/assets/{agent-avatar-dicebear--kDkSTqC.js → agent-avatar-dicebear-B2Popl59.js} +1 -1
- package/dist/gateway/static/root/assets/{agent-defaults-settings-panel-z4_2-Kn2.js → agent-defaults-settings-panel-BnF3HrHY.js} +1 -1
- package/dist/gateway/static/root/assets/{agent-plugin-dialog-BYndK83K.js → agent-plugin-dialog-CwP6OrUs.js} +1 -1
- package/dist/gateway/static/root/assets/{agents-CVo96cx1.js → agents-n3IremKl.js} +3 -3
- package/dist/gateway/static/root/assets/{app-management-settings-panel-D9oOJKiH.js → app-management-settings-panel-DNkXIPxK.js} +1 -1
- package/dist/gateway/static/root/assets/{appearance-settings-B0-8Cdyv.js → appearance-settings-p1_NpH8a.js} +1 -1
- package/dist/gateway/static/root/assets/{apps-page-DasVc6i4.js → apps-page-CP2u5iEh.js} +1 -1
- package/dist/gateway/static/root/assets/{automations-page-BlCNqy2i.js → automations-page-CjYiGOov.js} +1 -1
- package/dist/gateway/static/root/assets/{automations-workspace-C8ipDP05.js → automations-workspace-BAHiUQbe.js} +1 -1
- package/dist/gateway/static/root/assets/{block-editor-Cktlez6g.js → block-editor-DiOou1HO.js} +1 -1
- package/dist/gateway/static/root/assets/{browser-automations-page-KRfDl8ej.js → browser-automations-page-nArl2uwX.js} +1 -1
- package/dist/gateway/static/root/assets/{browser-settings-page-BraQ4wnh.js → browser-settings-page-Bd8tF-gg.js} +1 -1
- package/dist/gateway/static/root/assets/{capabilities-page-B3m8xGzd.js → capabilities-page-Cx4cdgse.js} +2 -2
- package/dist/gateway/static/root/assets/{capabilities-settings-panel-VQ4fHuBV.js → capabilities-settings-panel-DpWceNd0.js} +1 -1
- package/dist/gateway/static/root/assets/{capability-header-actions-f5Ido4Eg.js → capability-header-actions-AeBubNQK.js} +1 -1
- package/dist/gateway/static/root/assets/{channels-N4Vc2nEG.js → channels-Cd1Rf0Vk.js} +1 -1
- package/dist/gateway/static/root/assets/{chat-terminal-dock-BwvTKwsn.js → chat-terminal-dock-DrVlbq_P.js} +1 -1
- package/dist/gateway/static/root/assets/{computer-settings-page-CAwUsKpw.js → computer-settings-page-TUzZnurj.js} +1 -1
- package/dist/gateway/static/root/assets/{connector-service-page-C0HuAMuH.js → connector-service-page-BlpwjGW7.js} +1 -1
- package/dist/gateway/static/root/assets/{connectors-page-BcBmW8JT.js → connectors-page-j8VFMD4o.js} +1 -1
- package/dist/gateway/static/root/assets/{date-picker-DiQxRpe-.js → date-picker-CjKRpA8X.js} +1 -1
- package/dist/gateway/static/root/assets/{dependency-picker-Ds0_BJbN.js → dependency-picker-J9_0obij.js} +1 -1
- package/dist/gateway/static/root/assets/{desktop-pet-ZMEOYwrR.js → desktop-pet-DySwgreF.js} +1 -1
- package/dist/gateway/static/root/assets/{desktop-pet-settings-DkyTqD07.js → desktop-pet-settings-B1-oyKBG.js} +1 -1
- package/dist/gateway/static/root/assets/{device-pairing-wizard-CvaI5ZJZ.js → device-pairing-wizard-C5rjPAyc.js} +1 -1
- package/dist/gateway/static/root/assets/{directory-picker-path-field-Bfv93eK1.js → directory-picker-path-field-BY7MwiZd.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-page-JXKGtIdM.js → extension-page-JoSFhfb6.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-settings-page-lsQ2xvbr.js → extension-settings-page-B7LtTNx7.js} +1 -1
- package/dist/gateway/static/root/assets/{fallback-models-7bG0AND1.js → fallback-models-DKSWcBt_.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-settings-BpbcoPx9.js → gateway-settings-CGm-lbsX.js} +1 -1
- package/dist/gateway/static/root/assets/{home-page-BxctC0aJ.js → home-page-CX3uWkyH.js} +1 -1
- package/dist/gateway/static/root/assets/{imports-page-Bq8CazCb.js → imports-page-DS_RFtWf.js} +1 -1
- package/dist/gateway/static/root/assets/{index-B40-KDN8.js → index-CgvOIDy_.js} +6 -6
- package/dist/gateway/static/root/assets/{keyboard-shortcuts-settings-kkAevkl2.js → keyboard-shortcuts-settings-BxwXR2qA.js} +1 -1
- package/dist/gateway/static/root/assets/{local-app-workbench-page-abLaf1hW.js → local-app-workbench-page-BWd4RMBE.js} +1 -1
- package/dist/gateway/static/root/assets/{local-apps-page-nwsnwYjK.js → local-apps-page-BsgcA6-N.js} +1 -1
- package/dist/gateway/static/root/assets/{logs-page-BEgYS-Xg.js → logs-page-CLP5pu2j.js} +1 -1
- package/dist/gateway/static/root/assets/management-settings-CZAZwCpE.js +1 -0
- package/dist/gateway/static/root/assets/{note-detail-panel-CCnfurBR.js → note-detail-panel-BeAHgdtw.js} +3 -3
- package/dist/gateway/static/root/assets/{notes-page-D9u_znxM.js → notes-page-MP21Zf_R.js} +1 -1
- package/dist/gateway/static/root/assets/{page-context-capture-button-BO3FoRej.js → page-context-capture-button-BZADmKcV.js} +1 -1
- package/dist/gateway/static/root/assets/personal-page-BbaTGmE-.js +1 -0
- package/dist/gateway/static/root/assets/{product-open-page-Dso2_hyl.js → product-open-page-CBnKsW4p.js} +1 -1
- package/dist/gateway/static/root/assets/{product-preview-content-CkvVb3EA.js → product-preview-content-B0gGexdG.js} +1 -1
- package/dist/gateway/static/root/assets/{project-detail-page-UjrrzE3H.js → project-detail-page-ZjQSv_NG.js} +1 -1
- package/dist/gateway/static/root/assets/{projects-page-C1h63P2M.js → projects-page-Bf7Sd_Ck.js} +1 -1
- package/dist/gateway/static/root/assets/{remote-access-hub-BJifH8AB.js → remote-access-hub-Bl8aPuXU.js} +1 -1
- package/dist/gateway/static/root/assets/{runtime-tools-settings-panel-vG1wqcEb.js → runtime-tools-settings-panel-CQZ1c-re.js} +1 -1
- package/dist/gateway/static/root/assets/{scenes-page-CwoAoYMX.js → scenes-page-1xGRBOJO.js} +1 -1
- package/dist/gateway/static/root/assets/{schema-form-BIsHdyz7.js → schema-form-BYqugMox.js} +1 -1
- package/dist/gateway/static/root/assets/{sessions-page-BcCLp3yU.js → sessions-page-DjMSVXU3.js} +1 -1
- package/dist/gateway/static/root/assets/settings-advanced-gate-BJuMTtyI.js +1 -0
- package/dist/gateway/static/root/assets/{settings-page-z9Jlk0BL.js → settings-page-CSqi5fmN.js} +1 -1
- package/dist/gateway/static/root/assets/{setup-status-panel-CrpXECqe.js → setup-status-panel-D5bM0TvA.js} +1 -1
- package/dist/gateway/static/root/assets/{shares-settings-D9XpTJXP.js → shares-settings-C-V9WllF.js} +1 -1
- package/dist/gateway/static/root/assets/{skill-api-DtPOf1aW.js → skill-api-CFtEHy5e.js} +1 -1
- package/dist/gateway/static/root/assets/{skills-page-Bq9-2b9U.js → skills-page-B-olXUVH.js} +1 -1
- package/dist/gateway/static/root/assets/{system-settings-panel-P7T729uD.js → system-settings-panel-DBMR9ks_.js} +1 -1
- package/dist/gateway/static/root/assets/{task-detail-page-CsB9AFx6.js → task-detail-page-CGe34vxR.js} +1 -1
- package/dist/gateway/static/root/assets/{tunnel-api-CuowqIZ7.js → tunnel-api-CzNIlgdJ.js} +1 -1
- package/dist/gateway/static/root/assets/{usage-page-avX3msoZ.js → usage-page-O3abwewp.js} +1 -1
- package/dist/gateway/static/root/assets/user-model-page-Bx2JlCpj.js +2 -0
- package/dist/gateway/static/root/assets/{work-discovery-overlay-BgJNz2tH.js → work-discovery-overlay-D967-fVj.js} +1 -1
- package/dist/gateway/static/root/assets/{workflow-run-setup-panel-1I2q2J_U.js → workflow-run-setup-panel-BJ945m7G.js} +1 -1
- package/dist/gateway/static/root/assets/{workflows-page-DhJl9pnO.js → workflows-page-DUpVeIuw.js} +1 -1
- package/dist/gateway/static/root/assets/{xopc-cloud-account-card-CnPBP1V_.js → xopc-cloud-account-card-Bq9ubffP.js} +1 -1
- package/dist/gateway/static/root/index.html +1 -1
- package/dist/package.js +1 -1
- package/dist/packages/realtime-protocol/src/voice.js +11 -0
- package/dist/src/agent/agent-manager.d.ts +2 -7
- package/dist/src/agent/agent-manager.js +21 -50
- package/dist/src/agent/background-review/coordinator.js +1 -1
- package/dist/src/agent/background-review/prompts.d.ts +6 -0
- package/dist/src/agent/background-review/prompts.js +7 -1
- package/dist/src/agent/background-review/run-background-review.d.ts +3 -0
- package/dist/src/agent/background-review/run-background-review.js +185 -17
- package/dist/src/agent/context/coordinator.d.ts +1 -0
- package/dist/src/agent/context/coordinator.js +11 -2
- package/dist/src/agent/context/execution-context.js +40 -4
- package/dist/src/agent/context/project-context.js +11 -3
- package/dist/src/agent/embedded/run-for-session.js +2 -2
- package/dist/src/agent/embedded/run-turn.js +4 -4
- package/dist/src/agent/external-tools/endpoint-provider.js +2 -2
- package/dist/src/agent/image/tool-model-config.js +1 -1
- package/dist/src/agent/inbound/attachment-pipeline.js +1 -1
- package/dist/src/agent/memory/compaction-promotion.d.ts +2 -0
- package/dist/src/agent/memory/compaction-promotion.js +33 -2
- package/dist/src/agent/service/process-direct-streaming.js +1 -1
- package/dist/src/agent/service.js +5 -5
- package/dist/src/agent/session/session-inspector.js +1 -1
- package/dist/src/agent/skills/index.js +1 -1
- package/dist/src/agent/skills/managed-store.js +1 -1
- package/dist/src/agent/skills/skill-manage-ops.js +1 -1
- package/dist/src/agent/tasks/task-judge-service.js +2 -2
- package/dist/src/agent/tools/factory.js +1 -1
- package/dist/src/agent/tools/knowledge-memory-tool.js +14 -6
- package/dist/src/agent/tools/xopc-use-tool.js +2 -2
- package/dist/src/agent/workspace-runtime/registry.js +1 -1
- package/dist/src/agent-catalog/capabilities.js +2 -2
- package/dist/src/agent-config/schema.d.ts +9 -0
- package/dist/src/agent-config/schema.js +1 -0
- package/dist/src/ai-assist/text-assist.js +1 -1
- package/dist/src/auth/sync-provider-auth.js +1 -1
- package/dist/src/automations/capabilities/drafts.js +1 -1
- package/dist/src/automations/draft/automation-draft-service.js +1 -1
- package/dist/src/automations/service/action-executor.js +1 -1
- package/dist/src/bootstrap/application-state.js +2 -2
- package/dist/src/capabilities/runtime/dispatcher.js +1 -1
- package/dist/src/capabilities/runtime/product.js +1 -1
- package/dist/src/chat-commands/agent-edit.js +1 -1
- package/dist/src/chat-commands/context.js +1 -1
- package/dist/src/cli/commands/agent.js +2 -2
- package/dist/src/cli/commands/agents.js +1 -1
- package/dist/src/cli/commands/doctor/checks/database-schema.js +1 -1
- package/dist/src/cli/commands/doctor/checks/provider-auth.js +1 -1
- package/dist/src/cli/commands/gateway/shared.js +2 -1
- package/dist/src/cli/commands/models.js +1 -1
- package/dist/src/cli/commands/onboard/model.js +1 -1
- package/dist/src/cli/extension-cli-register.js +1 -1
- package/dist/src/cli/utils/init-workspace-core.js +1 -1
- package/dist/src/computer/runtime.js +1 -1
- package/dist/src/config/agent-model-intents.js +1 -1
- package/dist/src/config/agent-profile.js +2 -2
- package/dist/src/config/gateway-bind.js +2 -1
- package/dist/src/config/index.js +4 -4
- package/dist/src/config/loader.js +1 -1
- package/dist/src/config/models-json.d.ts +8 -8
- package/dist/src/config/models-json.js +1 -1
- package/dist/src/config/schema.d.ts +18 -12
- package/dist/src/config/schema.js +12 -8
- package/dist/src/connectors/connected-source-ingestion.js +45 -7
- package/dist/src/connectors/connected-source-understanding.d.ts +1 -0
- package/dist/src/connectors/connected-source-understanding.js +59 -67
- package/dist/src/connectors/content-enrichment.js +1 -1
- package/dist/src/connectors/learning-coordinator.js +2 -2
- package/dist/src/daemon/constants.js +14 -9
- package/dist/src/daemon/index.js +4 -1
- package/dist/src/daemon/install-plan.js +2 -1
- package/dist/src/daemon/launchd.js +2 -1
- package/dist/src/daemon/schtasks.js +2 -1
- package/dist/src/daemon/service-audit.js +2 -1
- package/dist/src/daemon/service.js +2 -1
- package/dist/src/daemon/systemd.js +2 -1
- package/dist/src/extensions/agent-plugins/validation.js +1 -1
- package/dist/src/gateway/agents-admin.js +2 -2
- package/dist/src/gateway/client-ip.js +2 -1
- package/dist/src/gateway/file-path-classifier.js +1 -1
- package/dist/src/gateway/hono/app.js +2 -1
- package/dist/src/gateway/hono/lib/config-payload.d.ts +5 -0
- package/dist/src/gateway/hono/lib/config-payload.js +1 -1
- package/dist/src/gateway/hono/middleware/auth.d.ts +3 -5
- package/dist/src/gateway/hono/middleware/auth.js +56 -14
- package/dist/src/gateway/hono/middleware/logger.js +2 -1
- package/dist/src/gateway/hono/middleware/public-device-rate-limit.d.ts +16 -0
- package/dist/src/gateway/hono/middleware/public-device-rate-limit.js +43 -0
- package/dist/src/gateway/hono/middleware/strict-rate-limit.js +3 -2
- package/dist/src/gateway/hono/oauth-async.js +2 -1
- package/dist/src/gateway/hono/routes/browser.js +2 -1
- package/dist/src/gateway/hono/routes/config-patch/misc.js +5 -5
- package/dist/src/gateway/hono/routes/config.js +2 -1
- package/dist/src/gateway/hono/routes/connectors.js +1 -1
- package/dist/src/gateway/hono/routes/context-sources.js +2 -2
- package/dist/src/gateway/hono/routes/device-pairing-approval.d.ts +3 -8
- package/dist/src/gateway/hono/routes/device-pairing-approval.js +5 -20
- package/dist/src/gateway/hono/routes/devices.js +25 -9
- package/dist/src/gateway/hono/routes/endpoint-tools.js +1 -0
- package/dist/src/gateway/hono/routes/lazy-bundles.js +1 -0
- package/dist/src/gateway/hono/routes/mcp.js +1 -1
- package/dist/src/gateway/hono/routes/memory-learning.d.ts +3 -0
- package/dist/src/gateway/hono/routes/memory-learning.js +76 -0
- package/dist/src/gateway/hono/routes/models.js +1 -1
- package/dist/src/gateway/hono/routes/notes.js +2 -2
- package/dist/src/gateway/hono/routes/personal-agent.js +3 -2
- package/dist/src/gateway/hono/routes/projects.js +3 -3
- package/dist/src/gateway/hono/routes/public-gateway.js +6 -6
- package/dist/src/gateway/hono/routes/session-input-handler.js +1 -1
- package/dist/src/gateway/hono/routes/shares.js +2 -1
- package/dist/src/gateway/hono/routes/tasks.js +1 -1
- package/dist/src/gateway/hono/routes/user-model-refresh.js +1 -1
- package/dist/src/gateway/hono/routes/user-model.js +5 -3
- package/dist/src/gateway/hono/routes/voice.js +1 -0
- package/dist/src/gateway/host.js +9 -4
- package/dist/src/gateway/image-generation-setup.js +2 -2
- package/dist/src/gateway/index.js +8 -4
- package/dist/src/gateway/listen.js +2 -1
- package/dist/src/gateway/lock.js +1 -1
- package/dist/src/gateway/rate-limit/auth-policy.js +7 -11
- package/dist/src/gateway/rate-limit/buckets.d.ts +6 -0
- package/dist/src/gateway/rate-limit/buckets.js +211 -189
- package/dist/src/gateway/rate-limit/env-flags.js +4 -1
- package/dist/src/gateway/rate-limit/index.js +13 -4
- package/dist/src/gateway/runtime-config.js +5 -3
- package/dist/src/gateway/security/audit.js +3 -2
- package/dist/src/gateway/security/browser-session.js +2 -1
- package/dist/src/gateway/security/device-request-proof.d.ts +28 -0
- package/dist/src/gateway/security/device-request-proof.js +122 -0
- package/dist/src/gateway/security/loopback.js +7 -6
- package/dist/src/gateway/service/session-command-service.js +1 -1
- package/dist/src/gateway/service.js +18 -16
- package/dist/src/gateway/tailscale-auth.js +2 -1
- package/dist/src/gateway/ws-security.js +2 -1
- package/dist/src/gateway/xopc-cloud-capability-setup.js +1 -1
- package/dist/src/home-intelligence/generator.js +2 -2
- package/dist/src/home-intelligence/host.js +2 -2
- package/dist/src/imports/inventory.js +1 -1
- package/dist/src/infra/rate-limit/failure-limiter.js +78 -90
- package/dist/src/infra/rate-limit/index.js +11 -3
- package/dist/src/infra/rate-limit/keyed-store.js +52 -47
- package/dist/src/infra/rate-limit/rate-limiter.js +55 -58
- package/dist/src/infra/update-service-refresh.js +2 -1
- package/dist/src/knowledge/chunks.d.ts +10 -0
- package/dist/src/knowledge/chunks.js +28 -0
- package/dist/src/knowledge/connected-knowledge-pipeline.js +67 -33
- package/dist/src/knowledge/index.js +1 -1
- package/dist/src/knowledge/ingestion-service.js +5 -1
- package/dist/src/knowledge/local-folder-adapter.d.ts +2 -1
- package/dist/src/knowledge/local-folder-adapter.js +22 -13
- package/dist/src/knowledge-memory/domain.d.ts +4 -0
- package/dist/src/knowledge-memory/index.d.ts +1 -0
- package/dist/src/knowledge-memory/index.js +2 -1
- package/dist/src/knowledge-memory/repair-evidence.d.ts +2 -0
- package/dist/src/knowledge-memory/repair-evidence.js +57 -0
- package/dist/src/knowledge-memory/repository.d.ts +8 -0
- package/dist/src/knowledge-memory/repository.js +48 -27
- package/dist/src/knowledge-memory/search-text.d.ts +3 -0
- package/dist/src/knowledge-memory/search-text.js +32 -0
- package/dist/src/knowledge-memory/usage-policy.d.ts +6 -0
- package/dist/src/knowledge-memory/usage-policy.js +61 -0
- package/dist/src/local-apps/service.js +1 -1
- package/dist/src/memory-learning/repository.d.ts +24 -0
- package/dist/src/memory-learning/repository.js +96 -0
- package/dist/src/memory-learning/service.d.ts +17 -0
- package/dist/src/memory-learning/service.js +105 -0
- package/dist/src/memory-learning/source-learning.d.ts +7 -0
- package/dist/src/memory-learning/source-learning.js +235 -0
- package/dist/src/memory-learning/task-receipts.d.ts +3 -0
- package/dist/src/memory-learning/task-receipts.js +95 -0
- package/dist/src/memory-learning/work-capture.d.ts +51 -0
- package/dist/src/memory-learning/work-capture.js +140 -0
- package/dist/src/memory-maintenance/service.js +5 -5
- package/dist/src/personal-agent/proactivity/service.js +2 -2
- package/dist/src/personal-agent/prompt-context.js +4 -4
- package/dist/src/personal-agent/reply-composer.js +1 -1
- package/dist/src/personal-agent/repository.d.ts +3 -0
- package/dist/src/personal-agent/repository.js +1 -0
- package/dist/src/personal-agent/service.d.ts +6 -2
- package/dist/src/personal-agent/service.js +6 -5
- package/dist/src/platform/client.d.ts +1 -1
- package/dist/src/platform/contracts.d.ts +1 -1
- package/dist/src/providers/local-model.d.ts +2 -0
- package/dist/src/providers/local-model.js +16 -0
- package/dist/src/providers/model-catalog-persistence.js +1 -1
- package/dist/src/realtime/runtime.js +6 -0
- package/dist/src/realtime/tickets.d.ts +1 -0
- package/dist/src/realtime/tickets.js +4 -0
- package/dist/src/remote-access/exposure-guards.js +2 -1
- package/dist/src/routing/resolve-route.js +1 -1
- package/dist/src/routing/resolve-tui-session-key.js +1 -1
- package/dist/src/scenes/taskFollowUp/service.js +1 -1
- package/dist/src/session/session-title.js +1 -1
- package/dist/src/session/store.js +2 -1
- package/dist/src/share/share-rate-limit.js +2 -1
- package/dist/src/share/share-url.js +2 -1
- package/dist/src/share/site-share-router.js +2 -1
- package/dist/src/storage/sqlite/device-access-repository.d.ts +7 -0
- package/dist/src/storage/sqlite/device-access-repository.js +22 -4
- package/dist/src/storage/sqlite/knowledge-repository.js +6 -0
- package/dist/src/storage/sqlite/migrations/243_voice_opening_greetings.sql +12 -0
- package/dist/src/storage/sqlite/migrations/244_device_request_proofs.sql +8 -0
- package/dist/src/storage/sqlite/migrations/245_memory_learning.sql +125 -0
- package/dist/src/storage/sqlite/migrations/runner.d.ts +1 -1
- package/dist/src/storage/sqlite/migrations/runner.js +6 -3
- package/dist/src/storage/sqlite/schema.js +1 -1
- package/dist/src/tasks/capabilities/read.js +2 -2
- package/dist/src/tasks/task-handoff-service.js +1 -1
- package/dist/src/tasks/task-main-update-decision-service.js +1 -1
- package/dist/src/tui/backends/embedded-backend.js +4 -4
- package/dist/src/tui/extension-host/load-extensions.js +1 -1
- package/dist/src/tui/tui-commands.js +1 -1
- package/dist/src/tui/tui-skills-autocomplete.js +1 -1
- package/dist/src/tui/tui-startup-resources.js +2 -2
- package/dist/src/tui/tui.js +2 -2
- package/dist/src/tunnel/broker-client.js +2 -0
- package/dist/src/tunnel/tunnel-config.js +2 -2
- package/dist/src/tunnel/tunnel-rate-limit.js +2 -1
- package/dist/src/user-context/access-policy.js +2 -1
- package/dist/src/user-context/config.d.ts +10 -0
- package/dist/src/user-context/config.js +5 -0
- package/dist/src/user-context/extraction/registry.d.ts +1 -1
- package/dist/src/user-context/extraction/registry.js +10 -0
- package/dist/src/user-context/identity-bindings.d.ts +10 -0
- package/dist/src/user-context/identity-bindings.js +24 -0
- package/dist/src/user-context/sources/consent-fields.d.ts +2 -0
- package/dist/src/user-context/sources/consent-fields.js +66 -0
- package/dist/src/user-model/bootstrap.js +1 -1
- package/dist/src/user-model/capture/executor.js +1 -1
- package/dist/src/user-model/capture/semantic.d.ts +3 -1
- package/dist/src/user-model/capture/semantic.js +14 -6
- package/dist/src/user-model/index.js +1 -1
- package/dist/src/user-model/usage-policy.js +34 -0
- package/dist/src/utils/logger/redact.js +4 -1
- package/dist/src/voice/platform-streams.d.ts +6 -0
- package/dist/src/voice/platform-streams.js +44 -4
- package/dist/src/voice/realtime/agentEngine.js +138 -83
- package/dist/src/voice/realtime/engine.d.ts +6 -0
- package/dist/src/voice/realtime/memory-context.js +19 -5
- package/dist/src/voice/realtime/opening-greeting.d.ts +12 -0
- package/dist/src/voice/realtime/opening-greeting.js +22 -0
- package/dist/src/voice/realtime/persona-context.js +1 -1
- package/dist/src/voice/realtime/runtime.js +90 -1
- package/dist/src/voice/realtime/runtime.types.d.ts +4 -0
- package/dist/src/work-discovery/incremental-repository.js +1 -1
- package/dist/src/work-discovery/service.js +6 -6
- package/dist/src/workflows/service/workflow-run-service.js +2 -2
- package/dist/src/workflows/service/workflow-session-bridge.js +38 -10
- package/package.json +3 -3
- package/dist/gateway/static/root/assets/management-settings-D_JQ6_X0.js +0 -1
- package/dist/gateway/static/root/assets/personal-page-BJn6UHAF.js +0 -1
- package/dist/gateway/static/root/assets/settings-advanced-gate-D114UdRI.js +0 -1
- package/dist/gateway/static/root/assets/user-model-page-DGDBWw7P.js +0 -2
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { getSessionMetadata } from "../storage/sqlite/session-read-repository.js";
|
|
2
2
|
import { init_session_repository, patchSessionMetadata } from "../storage/sqlite/session-repository.js";
|
|
3
3
|
import { init_config_repository, setSessionConfig } from "../storage/sqlite/config-repository.js";
|
|
4
|
+
import { createConversation, init_conversation_repository } from "../storage/sqlite/conversation-repository.js";
|
|
4
5
|
import { ResponsePreferencesSchema } from "../agent-config/schema.js";
|
|
5
6
|
import { init_agent_config } from "../agent-config/index.js";
|
|
6
7
|
import { AgentCatalogRepository, init_repository } from "../agent-catalog/repository.js";
|
|
7
|
-
import { AgentCatalogService } from "../agent-catalog/service.js";
|
|
8
|
-
import { createConversation, init_conversation_repository } from "../storage/sqlite/conversation-repository.js";
|
|
9
8
|
import { getAvailableModels, init_providers } from "../providers/index.js";
|
|
10
9
|
import { DEFAULT_PERSONAL_PREFERENCES, getPersonalAgent, personalAgentId } from "./repository.js";
|
|
11
10
|
import { PERSONAL_MAIN_TOOL_IDS, PERSONAL_READ_TOOL_ALIASES } from "./policy.js";
|
|
12
11
|
import { getModelThinking } from "../providers/model-thinking.js";
|
|
12
|
+
import { AgentCatalogService } from "../agent-catalog/service.js";
|
|
13
13
|
import { personalInstructions, upgradePersonalInstructions } from "./prompts.js";
|
|
14
14
|
import { completePersonalOnboarding } from "./onboarding.js";
|
|
15
15
|
import { z } from "zod";
|
|
@@ -159,14 +159,14 @@ async function provisionPersonalAgent(service, ownerId, requestedModel, availabl
|
|
|
159
159
|
completePersonalOnboarding(ownerId);
|
|
160
160
|
return getPersonalAgent(ownerId) ?? record;
|
|
161
161
|
}
|
|
162
|
-
async function patchPersonalProfile(service, ownerId, revision, displayName, preferences, appearance, voicePreference) {
|
|
163
|
-
const updated = await updatePersonalProfileRecord(ownerId, revision, displayName, preferences, appearance, voicePreference);
|
|
162
|
+
async function patchPersonalProfile(service, ownerId, revision, displayName, preferences, appearance, voicePreference, voiceCallPreferences) {
|
|
163
|
+
const updated = await updatePersonalProfileRecord(ownerId, revision, displayName, preferences, appearance, voicePreference, voiceCallPreferences);
|
|
164
164
|
if (!updated) return null;
|
|
165
165
|
service.refreshAgentCatalog();
|
|
166
166
|
service.agentService.evictSessionAgent(updated.conversationId);
|
|
167
167
|
return updated;
|
|
168
168
|
}
|
|
169
|
-
async function updatePersonalProfileRecord(ownerId, revision, displayName, preferences, appearance, voicePreference) {
|
|
169
|
+
async function updatePersonalProfileRecord(ownerId, revision, displayName, preferences, appearance, voicePreference, voiceCallPreferences) {
|
|
170
170
|
const current = new AgentCatalogRepository().get(personalAgentId(ownerId));
|
|
171
171
|
if (!current || current.provisioningState !== "ready" || current.revision !== revision || getPersonalAgent(ownerId)?.state !== "ready") return null;
|
|
172
172
|
const profile = {
|
|
@@ -175,6 +175,7 @@ async function updatePersonalProfileRecord(ownerId, revision, displayName, prefe
|
|
|
175
175
|
emoji: appearanceEmoji(appearance),
|
|
176
176
|
avatar: appearanceAvatar(appearance),
|
|
177
177
|
...voicePreference !== void 0 ? { voicePreference: voicePreference ?? void 0 } : {},
|
|
178
|
+
...voiceCallPreferences ? { voiceCallPreferences } : {},
|
|
178
179
|
responsePreferences: preferences,
|
|
179
180
|
instructions: personalInstructions(preferences)
|
|
180
181
|
};
|
|
@@ -67,9 +67,9 @@ export declare const RuntimeCommandSchema: z.ZodObject<{
|
|
|
67
67
|
write: "write";
|
|
68
68
|
execute: "execute";
|
|
69
69
|
purchase: "purchase";
|
|
70
|
-
admin: "admin";
|
|
71
70
|
send: "send";
|
|
72
71
|
publish: "publish";
|
|
72
|
+
admin: "admin";
|
|
73
73
|
}>>;
|
|
74
74
|
}, z.core.$strict>;
|
|
75
75
|
data: z.ZodObject<{
|
|
@@ -153,9 +153,9 @@ export declare const AgentManifestSchema: z.ZodObject<{
|
|
|
153
153
|
write: "write";
|
|
154
154
|
execute: "execute";
|
|
155
155
|
purchase: "purchase";
|
|
156
|
-
admin: "admin";
|
|
157
156
|
send: "send";
|
|
158
157
|
publish: "publish";
|
|
158
|
+
admin: "admin";
|
|
159
159
|
}>>;
|
|
160
160
|
}, z.core.$strict>;
|
|
161
161
|
data: z.ZodObject<{
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
//#region src/providers/local-model.ts
|
|
2
|
+
/** Local-only processing requires a loopback endpoint, regardless of provider name. */
|
|
3
|
+
function isLoopbackModel(baseUrl) {
|
|
4
|
+
try {
|
|
5
|
+
return [
|
|
6
|
+
"localhost",
|
|
7
|
+
"127.0.0.1",
|
|
8
|
+
"[::1]",
|
|
9
|
+
"::1"
|
|
10
|
+
].includes(new URL(baseUrl).hostname);
|
|
11
|
+
} catch {
|
|
12
|
+
return false;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
//#endregion
|
|
16
|
+
export { isLoopbackModel };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { __esmMin } from "../../_virtual/_rolldown/runtime.js";
|
|
2
2
|
import { init_paths_state, resolveXopcCloudCatalogCachePath } from "../config/paths-state.js";
|
|
3
|
-
import { init_write_file_atomic, writeTextAtomic } from "../infra/write-file-atomic.js";
|
|
4
3
|
import { ComputerProfileSchema, init_src } from "../../packages/computer-control-contract/src/index.js";
|
|
4
|
+
import { init_write_file_atomic, writeTextAtomic } from "../infra/write-file-atomic.js";
|
|
5
5
|
import { ImageGenerationCapabilitiesSchema, init_models_json } from "../config/models-json.js";
|
|
6
6
|
import { voiceManifestSchema } from "../../packages/realtime-protocol/src/voice-catalog.js";
|
|
7
7
|
import { init_voice } from "../../packages/realtime-protocol/src/voice.js";
|
|
@@ -3,6 +3,7 @@ import { init_logger } from "../utils/logger.js";
|
|
|
3
3
|
import { hasGatewayScope, init_gateway_scopes } from "../gateway/security/gateway-scopes.js";
|
|
4
4
|
import { EndpointToolPolicyError } from "../endpoint-tools/policy.js";
|
|
5
5
|
import { REALTIME_CAPABILITIES, REALTIME_HEARTBEAT_INTERVAL_MS, REALTIME_HEARTBEAT_TIMEOUT_MS, REALTIME_HELLO_TIMEOUT_MS, REALTIME_MAX_CLIENT_FRAME_BYTES, parseClientRealtimeJsonFrame, parseClientRealtimeMessage } from "../../packages/realtime-protocol/src/index.js";
|
|
6
|
+
import { verifyDeviceConnectionProof } from "../gateway/security/device-request-proof.js";
|
|
6
7
|
import { compactRunEvent } from "./compact-run-event.js";
|
|
7
8
|
import { createPreauthConnectionBudget } from "../gateway/security/preauth-connection-budget.js";
|
|
8
9
|
import { RealtimeBroker } from "./broker.js";
|
|
@@ -221,6 +222,11 @@ var RealtimeRuntime = class {
|
|
|
221
222
|
socket.close(4401, "First realtime message must be hello");
|
|
222
223
|
return;
|
|
223
224
|
}
|
|
225
|
+
const pendingClaim = this.tickets.peek(message.payload.ticket);
|
|
226
|
+
if (!pendingClaim || pendingClaim.deviceId && !verifyDeviceConnectionProof(pendingClaim.deviceId, message.payload.ticket, new URL(request.url, "http://localhost").pathname + new URL(request.url, "http://localhost").search, typeof request.headers["x-xopc-proof"] === "string" ? request.headers["x-xopc-proof"] : void 0)) {
|
|
227
|
+
socket.close(4401, "Realtime authentication failed");
|
|
228
|
+
return;
|
|
229
|
+
}
|
|
224
230
|
const claim = this.tickets.consume(message.payload.ticket, message.payload.clientId, message.payload.clientKind);
|
|
225
231
|
if (!claim || !this.isPrincipalActive(claim.principalId)) {
|
|
226
232
|
socket.close(4401, "Realtime authentication failed");
|
|
@@ -15,6 +15,7 @@ export interface IssuedRealtimeTicket extends RealtimeTicketClaim {
|
|
|
15
15
|
export declare class RealtimeTicketStore {
|
|
16
16
|
private readonly claims;
|
|
17
17
|
issue(clientId: string, clientKind: RealtimeClientKind, principal: Omit<RealtimeTicketClaim, 'clientId' | 'clientKind' | 'expiresAt'>, now?: number): IssuedRealtimeTicket;
|
|
18
|
+
peek(ticket: string, now?: number): RealtimeTicketClaim | undefined;
|
|
18
19
|
consume(ticket: string, clientId: string, clientKind: RealtimeClientKind, now?: number): RealtimeTicketClaim | undefined;
|
|
19
20
|
revokePrincipal(principalId: string): void;
|
|
20
21
|
private prune;
|
|
@@ -23,6 +23,10 @@ var RealtimeTicketStore = class {
|
|
|
23
23
|
...claim
|
|
24
24
|
};
|
|
25
25
|
}
|
|
26
|
+
peek(ticket, now = Date.now()) {
|
|
27
|
+
const claim = this.claims.get(ticketKey(ticket));
|
|
28
|
+
return claim && claim.expiresAt >= now ? claim : void 0;
|
|
29
|
+
}
|
|
26
30
|
consume(ticket, clientId, clientKind, now = Date.now()) {
|
|
27
31
|
const key = ticketKey(ticket);
|
|
28
32
|
const claim = this.claims.get(key);
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { isLoopbackHost } from "../gateway/host.js";
|
|
1
|
+
import { init_host, isLoopbackHost } from "../gateway/host.js";
|
|
2
2
|
import { resolveGatewayBindMode } from "../config/gateway-bind.js";
|
|
3
3
|
import { resolveGatewayListenPlan } from "../gateway/listen.js";
|
|
4
4
|
//#region src/remote-access/exposure-guards.ts
|
|
5
|
+
init_host();
|
|
5
6
|
function collectExposureConflicts(cfg) {
|
|
6
7
|
const conflicts = [];
|
|
7
8
|
const tailscaleMode = cfg.gateway?.tailscale?.mode ?? "off";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { __esmMin } from "../../_virtual/_rolldown/runtime.js";
|
|
2
2
|
import { init_account_id, normalizeAccountId } from "./account-id.js";
|
|
3
|
-
import { AgentCatalogRepository, init_repository } from "../agent-catalog/repository.js";
|
|
4
3
|
import { getConversationRouting } from "../storage/sqlite/conversation-repository.js";
|
|
5
4
|
import { init_agent_session_key, resolveAgentPeerConversationId } from "./agent-session-key.js";
|
|
6
5
|
import { init_session_key, resolveConversationId } from "./session-key.js";
|
|
6
|
+
import { AgentCatalogRepository, init_repository } from "../agent-catalog/repository.js";
|
|
7
7
|
import { init_bindings, parseBindingRules, resolveRoute as resolveRoute$1 } from "./bindings.js";
|
|
8
8
|
//#region src/routing/resolve-route.ts
|
|
9
9
|
/**
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { validateConversationId } from "../../packages/gateway-contract/src/conversation-identity.js";
|
|
2
2
|
import { init_src } from "../../packages/gateway-contract/src/index.js";
|
|
3
|
+
import { init_agent_session_key, normalizeAgentId } from "./agent-session-key.js";
|
|
3
4
|
import { AgentCatalogRepository, init_repository } from "../agent-catalog/repository.js";
|
|
4
5
|
import { init_agent_scope, listAgentEntries, resolveAgentIdByWorkspacePath, resolveDefaultAgentId } from "../agent/agent-scope.js";
|
|
5
|
-
import { init_agent_session_key, normalizeAgentId } from "./agent-session-key.js";
|
|
6
6
|
import { randomUUID } from "node:crypto";
|
|
7
7
|
//#region src/routing/resolve-tui-session-key.ts
|
|
8
8
|
init_src();
|
|
@@ -4,6 +4,7 @@ import { TaskRepository, init_task_repository } from "../../tasks/task-repositor
|
|
|
4
4
|
import { TaskRunRepository, init_task_run_repository } from "../../tasks/task-run-repository.js";
|
|
5
5
|
import { AgentCatalogRepository, init_repository } from "../../agent-catalog/repository.js";
|
|
6
6
|
import { init_agent_scope, resolveDefaultAgentId } from "../../agent/agent-scope.js";
|
|
7
|
+
import { resolveModelSelector } from "../../config/agent-model-intents.js";
|
|
7
8
|
import { init_providers, isProviderConfiguredSync, resolveModel } from "../../providers/index.js";
|
|
8
9
|
import { ExecutionEnvironmentStore } from "../../execution-environments/store.js";
|
|
9
10
|
import { ProjectStore } from "../../projects/project-store.js";
|
|
@@ -12,7 +13,6 @@ import { removeCommandContainer } from "../../agent/commands/command-isolation.j
|
|
|
12
13
|
import { inspectGitRepository } from "../../execution-environments/git.js";
|
|
13
14
|
import { TaskContextRepository } from "../../tasks/task-context-repository.js";
|
|
14
15
|
import { TaskApplicationService } from "../../tasks/task-application-service.js";
|
|
15
|
-
import { resolveModelSelector } from "../../config/agent-model-intents.js";
|
|
16
16
|
import { sceneContentHash } from "../contracts.js";
|
|
17
17
|
import { SceneConflictError, SceneNotFoundError, SceneRepository } from "../repository.js";
|
|
18
18
|
import { SceneSetupError } from "../service.js";
|
|
@@ -5,8 +5,8 @@ import { isCronConversationId } from "../routing/agent-session-key.js";
|
|
|
5
5
|
import { init_session_key } from "../routing/session-key.js";
|
|
6
6
|
import { init_providers, resolveModel } from "../providers/index.js";
|
|
7
7
|
import { completeWithResolvedCredentials } from "../providers/model-call.js";
|
|
8
|
-
import { readAgentMessageContent } from "../agent/memory/agent-message-access.js";
|
|
9
8
|
import { stripRuntimeContextFromUserMessage } from "./user-message-display.js";
|
|
9
|
+
import { readAgentMessageContent } from "../agent/memory/agent-message-access.js";
|
|
10
10
|
//#region src/session/session-title.ts
|
|
11
11
|
init_session_key();
|
|
12
12
|
init_providers();
|
|
@@ -13,8 +13,8 @@ import { appendCompactionBoundaryIfUnchanged, appendTranscriptEntry, listCompact
|
|
|
13
13
|
import { getSessionConfig, setSessionConfig } from "../storage/sqlite/config-repository.js";
|
|
14
14
|
import { init_sqlite } from "../storage/sqlite/index.js";
|
|
15
15
|
import { init_agent_session_key, resolveAgentIdFromConversationId } from "../routing/agent-session-key.js";
|
|
16
|
-
import { resolveEffectiveAgentProfile } from "../config/agent-profile.js";
|
|
17
16
|
import { resolveUserContextSessionAccess } from "../user-context/access-policy.js";
|
|
17
|
+
import { resolveEffectiveAgentProfile } from "../config/agent-profile.js";
|
|
18
18
|
import { DurableState } from "../storage/sqlite/durable-state.js";
|
|
19
19
|
import { transcriptRowsToClientHistory } from "./client-history.js";
|
|
20
20
|
import { SessionCompactor } from "../agent/memory/compaction.js";
|
|
@@ -551,6 +551,7 @@ var SessionStore = class {
|
|
|
551
551
|
handover: result.handover,
|
|
552
552
|
audit: result.audit,
|
|
553
553
|
sourceEntries: expectedSnapshot.entries,
|
|
554
|
+
readPolicy: access.knowledgePolicy,
|
|
554
555
|
writePolicy: access.knowledge && access.knowledgePolicy.scopes.includes("session") && access.knowledgePolicy.contentSources.includes("memory") ? this.options.config.userContext.knowledgeMemory.writePolicy : "deny"
|
|
555
556
|
});
|
|
556
557
|
log.info({
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { createLogger } from "../utils/logger/index.js";
|
|
2
2
|
import { init_logger } from "../utils/logger.js";
|
|
3
3
|
import { buckets } from "../gateway/rate-limit/buckets.js";
|
|
4
|
-
import "../gateway/rate-limit/index.js";
|
|
4
|
+
import { init_rate_limit } from "../gateway/rate-limit/index.js";
|
|
5
5
|
//#region src/share/share-rate-limit.ts
|
|
6
|
+
init_rate_limit();
|
|
6
7
|
init_logger();
|
|
7
8
|
const log = createLogger("ShareRateLimit");
|
|
8
9
|
/**
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { enumerateLanGatewayCandidates } from "../gateway/host.js";
|
|
1
|
+
import { enumerateLanGatewayCandidates, init_host } from "../gateway/host.js";
|
|
2
2
|
import { getTunnelService } from "../tunnel/tunnel-service.js";
|
|
3
3
|
//#region src/share/share-url.ts
|
|
4
|
+
init_host();
|
|
4
5
|
function resolveShareUrl(token, ctx) {
|
|
5
6
|
const tunnelPublicUrl = activeTunnelPublicUrl();
|
|
6
7
|
const { gatewayHost, gatewayPort, reverseProxyPublicUrl } = ctx;
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { createLogger } from "../utils/logger/index.js";
|
|
2
2
|
import { init_logger } from "../utils/logger.js";
|
|
3
|
+
import { getClientIpFromHeaders, init_loopback } from "../gateway/security/loopback.js";
|
|
3
4
|
import { resolveSiteShareConfig } from "./site-share-config.js";
|
|
4
5
|
import "./share-store.js";
|
|
5
6
|
import { getSiteShareStore } from "./site-share-store.js";
|
|
6
|
-
import { getClientIpFromHeaders } from "../gateway/security/loopback.js";
|
|
7
7
|
import { serveStaticSiteRequest } from "./site-static-serve.js";
|
|
8
8
|
import { forwardHttpRequest, handleProxyWebSocketUpgrade } from "./site-proxy.js";
|
|
9
9
|
import { renderShareExpiredPage } from "./share-landing.js";
|
|
10
10
|
//#region src/share/site-share-router.ts
|
|
11
|
+
init_loopback();
|
|
11
12
|
init_logger();
|
|
12
13
|
const log = createLogger("SiteShareRouter");
|
|
13
14
|
const SITE_SUBPATH_PREFIX = "/site/";
|
|
@@ -8,6 +8,7 @@ export type DeviceRecord = {
|
|
|
8
8
|
platform: DevicePlatform;
|
|
9
9
|
extensionId?: string;
|
|
10
10
|
publicKeyJwk: DevicePublicKeyJwk;
|
|
11
|
+
requestProofVersion: number;
|
|
11
12
|
scopes: GatewayScope[];
|
|
12
13
|
createdAt: number;
|
|
13
14
|
lastSeenAt?: number;
|
|
@@ -45,7 +46,12 @@ export declare function buildRefreshProofMessage(input: {
|
|
|
45
46
|
nonce: string;
|
|
46
47
|
requestId: string;
|
|
47
48
|
nextRefreshToken: string;
|
|
49
|
+
requestProofVersion?: number;
|
|
48
50
|
}): string;
|
|
51
|
+
export declare class DeviceRefreshRateLimitError extends Error {
|
|
52
|
+
readonly retryAfterMs: number;
|
|
53
|
+
constructor(retryAfterMs: number);
|
|
54
|
+
}
|
|
49
55
|
export declare function rotateDeviceRefreshToken(input: {
|
|
50
56
|
refreshToken: string;
|
|
51
57
|
timestamp: number;
|
|
@@ -53,6 +59,7 @@ export declare function rotateDeviceRefreshToken(input: {
|
|
|
53
59
|
requestId: string;
|
|
54
60
|
nextRefreshToken: string;
|
|
55
61
|
signature: string;
|
|
62
|
+
requestProofVersion?: number;
|
|
56
63
|
now?: number;
|
|
57
64
|
}): DeviceTokenPair;
|
|
58
65
|
export declare function revokeDevice(deviceId: string, now?: number): boolean;
|
|
@@ -2,6 +2,8 @@ import { __esmMin } from "../../../_virtual/_rolldown/runtime.js";
|
|
|
2
2
|
import { getSqliteDatabase, init_transaction, runSqliteWriteTransaction } from "./transaction.js";
|
|
3
3
|
import { initialDeviceRefreshTokenSchema } from "../../../packages/gateway-contract/src/device-pairing.js";
|
|
4
4
|
import { init_src } from "../../../packages/gateway-contract/src/index.js";
|
|
5
|
+
import { buckets } from "../../gateway/rate-limit/buckets.js";
|
|
6
|
+
import { init_rate_limit } from "../../gateway/rate-limit/index.js";
|
|
5
7
|
import { init_gateway_scopes, parseGatewayScopes } from "../../gateway/security/gateway-scopes.js";
|
|
6
8
|
import crypto from "node:crypto";
|
|
7
9
|
//#region src/storage/sqlite/device-access-repository.ts
|
|
@@ -23,6 +25,7 @@ function deviceFromRow(row) {
|
|
|
23
25
|
displayName: row.display_name,
|
|
24
26
|
platform: row.platform,
|
|
25
27
|
publicKeyJwk: JSON.parse(row.public_key_jwk),
|
|
28
|
+
requestProofVersion: row.request_proof_version,
|
|
26
29
|
...row.extension_id ? { extensionId: row.extension_id } : {},
|
|
27
30
|
scopes: parseGatewayScopes(row.scopes_json),
|
|
28
31
|
createdAt: row.created_at,
|
|
@@ -109,7 +112,7 @@ function authenticateDeviceAccessToken(token, now = Date.now()) {
|
|
|
109
112
|
};
|
|
110
113
|
}
|
|
111
114
|
function buildRefreshProofMessage(input) {
|
|
112
|
-
return `xopc-device-refresh-v2\n${input.credentialId}\n${input.timestamp}\n${input.nonce}\n${input.requestId}\n${input.nextRefreshToken}`;
|
|
115
|
+
return `xopc-device-refresh-v2\n${input.credentialId}\n${input.timestamp}\n${input.nonce}\n${input.requestId}\n${input.nextRefreshToken}${input.requestProofVersion ? `\nrequest-proof:${input.requestProofVersion}` : ""}`;
|
|
113
116
|
}
|
|
114
117
|
function verifyRefreshProof(publicKeyJwk, message, signature) {
|
|
115
118
|
try {
|
|
@@ -146,9 +149,17 @@ function rotateDeviceRefreshToken(input) {
|
|
|
146
149
|
timestamp: input.timestamp,
|
|
147
150
|
nonce: input.nonce,
|
|
148
151
|
requestId: input.requestId,
|
|
149
|
-
nextRefreshToken: input.nextRefreshToken
|
|
152
|
+
nextRefreshToken: input.nextRefreshToken,
|
|
153
|
+
requestProofVersion: input.requestProofVersion
|
|
150
154
|
});
|
|
151
155
|
if (!verifyRefreshProof(JSON.parse(deviceRow.public_key_jwk), message, input.signature)) throw new Error("Invalid refresh proof");
|
|
156
|
+
const refreshBudget = buckets.deviceRefresh().consume(credential.device_id);
|
|
157
|
+
if (!refreshBudget.allowed) throw new DeviceRefreshRateLimitError(refreshBudget.retryAfterMs);
|
|
158
|
+
if (deviceRow.request_proof_version > (input.requestProofVersion ?? 0)) throw new Error("Request proof downgrade denied");
|
|
159
|
+
if (input.requestProofVersion === 1 && deviceRow.request_proof_version === 0) {
|
|
160
|
+
db.prepare("UPDATE devices SET request_proof_version = 1 WHERE device_id = ?").run(credential.device_id);
|
|
161
|
+
db.prepare("UPDATE device_access_sessions SET revoked_at = ? WHERE device_id = ? AND revoked_at IS NULL").run(now, credential.device_id);
|
|
162
|
+
}
|
|
152
163
|
if (credential.replaced_by === nextParsed.id && credential.rotation_request_id === input.requestId) {
|
|
153
164
|
const nextCredential = db.prepare(`
|
|
154
165
|
SELECT credential_id, device_id, token_hash, expires_at, replaced_by,
|
|
@@ -198,9 +209,10 @@ function revokeDevice(deviceId, now = Date.now()) {
|
|
|
198
209
|
return changed;
|
|
199
210
|
});
|
|
200
211
|
}
|
|
201
|
-
var ACCESS_TOKEN_TTL_MS, REFRESH_TOKEN_TTL_MS, REFRESH_PROOF_MAX_AGE_MS, ACCESS_TOKEN_PREFIX, REFRESH_TOKEN_PREFIX;
|
|
212
|
+
var ACCESS_TOKEN_TTL_MS, REFRESH_TOKEN_TTL_MS, REFRESH_PROOF_MAX_AGE_MS, ACCESS_TOKEN_PREFIX, REFRESH_TOKEN_PREFIX, DeviceRefreshRateLimitError;
|
|
202
213
|
var init_device_access_repository = __esmMin((() => {
|
|
203
214
|
init_src();
|
|
215
|
+
init_rate_limit();
|
|
204
216
|
init_gateway_scopes();
|
|
205
217
|
init_transaction();
|
|
206
218
|
ACCESS_TOKEN_TTL_MS = 900 * 1e3;
|
|
@@ -208,7 +220,13 @@ var init_device_access_repository = __esmMin((() => {
|
|
|
208
220
|
REFRESH_PROOF_MAX_AGE_MS = 300 * 1e3;
|
|
209
221
|
ACCESS_TOKEN_PREFIX = "xopc_at_";
|
|
210
222
|
REFRESH_TOKEN_PREFIX = "xopc_rt_";
|
|
223
|
+
DeviceRefreshRateLimitError = class extends Error {
|
|
224
|
+
constructor(retryAfterMs) {
|
|
225
|
+
super("Too many device refresh requests");
|
|
226
|
+
this.retryAfterMs = retryAfterMs;
|
|
227
|
+
}
|
|
228
|
+
};
|
|
211
229
|
}));
|
|
212
230
|
//#endregion
|
|
213
231
|
init_device_access_repository();
|
|
214
|
-
export { authenticateDeviceAccessToken, buildRefreshProofMessage, createDevice, getDevice, init_device_access_repository, issueDeviceTokenPair, listDevices, registerInitialDeviceRefreshToken, revokeDevice, rotateDeviceRefreshToken };
|
|
232
|
+
export { DeviceRefreshRateLimitError, authenticateDeviceAccessToken, buildRefreshProofMessage, createDevice, getDevice, init_device_access_repository, issueDeviceTokenPair, listDevices, registerInitialDeviceRefreshToken, revokeDevice, rotateDeviceRefreshToken };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { __esmMin } from "../../../_virtual/_rolldown/runtime.js";
|
|
2
2
|
import { getSqliteDatabase, init_transaction, runSqliteWriteTransaction } from "./transaction.js";
|
|
3
|
+
import { init_chunks, replaceKnowledgeChunks } from "../../knowledge/chunks.js";
|
|
3
4
|
import { randomUUID } from "node:crypto";
|
|
4
5
|
//#region src/storage/sqlite/knowledge-repository.ts
|
|
5
6
|
function parseTimestamp(value) {
|
|
@@ -185,6 +186,10 @@ function upsertKnowledgeSourceItems(inputs, nowMs = Date.now()) {
|
|
|
185
186
|
updated_at = excluded.updated_at`).run(id, input.sourceInstanceId, input.collectionScope, input.externalId, input.itemType, input.authorRole ?? null, parseTimestamp(input.occurredAt), parseTimestamp(input.sourceUpdatedAt), input.contentHash, input.normalizedText ?? null, input.payloadRef ?? null, JSON.stringify(input.metadata ?? {}), input.sensitivity ?? "normal", input.retentionClass ?? "bounded", input.synthesisPipeline ?? "user_understanding", input.synthesisStatus ?? "pending", parseTimestamp(input.deletedAt), existing?.created_at ?? nowMs, nowMs);
|
|
186
187
|
const row = db.prepare(`SELECT * FROM knowledge_source_items WHERE item_id = ?`).get(id);
|
|
187
188
|
items.push(sourceItemFromRow(row));
|
|
189
|
+
replaceKnowledgeChunks(db, {
|
|
190
|
+
...sourceItemFromRow(row),
|
|
191
|
+
normalizedText: void 0
|
|
192
|
+
});
|
|
188
193
|
changedItemIds.push(id);
|
|
189
194
|
const changeKind = input.deletedAt ? "deleted" : existing ? "modified" : "added";
|
|
190
195
|
db.prepare(`INSERT INTO knowledge_source_changes (
|
|
@@ -351,6 +356,7 @@ function completeKnowledgeSourceItemSynthesis(input) {
|
|
|
351
356
|
});
|
|
352
357
|
}
|
|
353
358
|
var init_knowledge_repository = __esmMin((() => {
|
|
359
|
+
init_chunks();
|
|
354
360
|
init_transaction();
|
|
355
361
|
}));
|
|
356
362
|
//#endregion
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
CREATE TABLE voice_opening_greetings (
|
|
2
|
+
principal_id TEXT NOT NULL,
|
|
3
|
+
conversation_id TEXT NOT NULL,
|
|
4
|
+
logical_call_id TEXT NOT NULL,
|
|
5
|
+
response_id TEXT NOT NULL,
|
|
6
|
+
state TEXT NOT NULL CHECK(state IN ('claimed', 'completed', 'skipped', 'interrupted', 'failed', 'expired')),
|
|
7
|
+
reason TEXT,
|
|
8
|
+
created_at INTEGER NOT NULL,
|
|
9
|
+
updated_at INTEGER NOT NULL,
|
|
10
|
+
PRIMARY KEY (principal_id, conversation_id, logical_call_id)
|
|
11
|
+
);
|
|
12
|
+
CREATE INDEX idx_voice_opening_greetings_created ON voice_opening_greetings(created_at);
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
ALTER TABLE devices ADD COLUMN request_proof_version INTEGER NOT NULL DEFAULT 0;
|
|
2
|
+
CREATE TABLE device_request_nonces (
|
|
3
|
+
device_id TEXT NOT NULL REFERENCES devices(device_id) ON DELETE CASCADE,
|
|
4
|
+
nonce TEXT NOT NULL,
|
|
5
|
+
expires_at INTEGER NOT NULL,
|
|
6
|
+
PRIMARY KEY (device_id, nonce)
|
|
7
|
+
) WITHOUT ROWID;
|
|
8
|
+
CREATE INDEX device_request_nonces_expiry ON device_request_nonces(expires_at);
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
ALTER TABLE knowledge_items ADD COLUMN claim_mode TEXT NOT NULL DEFAULT 'observed'
|
|
2
|
+
CHECK (claim_mode IN ('explicit', 'observed', 'inferred', 'reported'));
|
|
3
|
+
ALTER TABLE knowledge_items ADD COLUMN verification TEXT NOT NULL DEFAULT 'supported'
|
|
4
|
+
CHECK (verification IN ('supported', 'tentative', 'conflicted'));
|
|
5
|
+
ALTER TABLE knowledge_items ADD COLUMN sensitivity TEXT NOT NULL DEFAULT 'normal'
|
|
6
|
+
CHECK (sensitivity IN ('normal', 'personal', 'secret', 'regulated'));
|
|
7
|
+
ALTER TABLE user_assertion_evidence ADD COLUMN content_hash TEXT;
|
|
8
|
+
CREATE TRIGGER assertion_evidence_snapshot_insert AFTER INSERT ON user_assertion_evidence BEGIN
|
|
9
|
+
UPDATE user_assertion_evidence SET content_hash = (SELECT content_hash FROM context_evidence WHERE evidence_id = NEW.evidence_id)
|
|
10
|
+
WHERE assertion_id = NEW.assertion_id AND evidence_id = NEW.evidence_id AND relation = NEW.relation;
|
|
11
|
+
END;
|
|
12
|
+
CREATE TRIGGER assertion_evidence_snapshot_update AFTER UPDATE OF confidence ON user_assertion_evidence BEGIN
|
|
13
|
+
UPDATE user_assertion_evidence SET content_hash = (SELECT content_hash FROM context_evidence WHERE evidence_id = NEW.evidence_id)
|
|
14
|
+
WHERE assertion_id = NEW.assertion_id AND evidence_id = NEW.evidence_id AND relation = NEW.relation;
|
|
15
|
+
END;
|
|
16
|
+
UPDATE knowledge_items SET claim_mode = CASE origin_class
|
|
17
|
+
WHEN 'owner' THEN 'explicit' WHEN 'untrusted' THEN 'reported' ELSE 'observed' END,
|
|
18
|
+
verification = CASE WHEN origin_class = 'untrusted' AND record_class = 'memory' THEN 'tentative' ELSE 'supported' END;
|
|
19
|
+
|
|
20
|
+
CREATE TABLE knowledge_revisions (
|
|
21
|
+
revision_id TEXT PRIMARY KEY,
|
|
22
|
+
knowledge_id TEXT NOT NULL REFERENCES knowledge_items(knowledge_id) ON DELETE CASCADE,
|
|
23
|
+
content TEXT NOT NULL,
|
|
24
|
+
source_json TEXT NOT NULL,
|
|
25
|
+
created_at INTEGER NOT NULL
|
|
26
|
+
);
|
|
27
|
+
CREATE INDEX knowledge_revisions_item ON knowledge_revisions(knowledge_id, created_at);
|
|
28
|
+
CREATE TABLE knowledge_evidence_links (
|
|
29
|
+
knowledge_id TEXT NOT NULL REFERENCES knowledge_items(knowledge_id) ON DELETE CASCADE,
|
|
30
|
+
evidence_id TEXT NOT NULL REFERENCES context_evidence(evidence_id) ON DELETE CASCADE,
|
|
31
|
+
content_hash TEXT,
|
|
32
|
+
consent_receipt_id TEXT REFERENCES understanding_consent_receipts(receipt_id),
|
|
33
|
+
PRIMARY KEY (knowledge_id, evidence_id)
|
|
34
|
+
);
|
|
35
|
+
CREATE TABLE owner_identity_bindings (
|
|
36
|
+
principal_id TEXT NOT NULL,
|
|
37
|
+
channel TEXT NOT NULL,
|
|
38
|
+
account_id TEXT NOT NULL,
|
|
39
|
+
peer_id TEXT NOT NULL,
|
|
40
|
+
verified_at INTEGER NOT NULL,
|
|
41
|
+
revoked_at INTEGER,
|
|
42
|
+
PRIMARY KEY (channel, account_id, peer_id)
|
|
43
|
+
);
|
|
44
|
+
CREATE TABLE memory_learning_jobs (
|
|
45
|
+
job_id TEXT PRIMARY KEY,
|
|
46
|
+
principal_id TEXT NOT NULL DEFAULT 'local-owner',
|
|
47
|
+
conversation_id TEXT NOT NULL REFERENCES sessions(conversation_id) ON DELETE CASCADE,
|
|
48
|
+
transcript_id TEXT NOT NULL,
|
|
49
|
+
through_seq INTEGER NOT NULL,
|
|
50
|
+
start_seq INTEGER,
|
|
51
|
+
extractor_version TEXT NOT NULL,
|
|
52
|
+
policy_hash TEXT NOT NULL,
|
|
53
|
+
workspace_id TEXT NOT NULL,
|
|
54
|
+
state TEXT NOT NULL CHECK (state IN ('queued','running','succeeded','retry_wait','failed','canceled')),
|
|
55
|
+
lease_token TEXT,
|
|
56
|
+
lease_until INTEGER,
|
|
57
|
+
attempts INTEGER NOT NULL DEFAULT 0,
|
|
58
|
+
next_attempt_at INTEGER NOT NULL,
|
|
59
|
+
error_code TEXT,
|
|
60
|
+
created_at INTEGER NOT NULL,
|
|
61
|
+
updated_at INTEGER NOT NULL,
|
|
62
|
+
UNIQUE(conversation_id, transcript_id, through_seq, extractor_version, policy_hash)
|
|
63
|
+
);
|
|
64
|
+
CREATE INDEX memory_learning_jobs_due ON memory_learning_jobs(state, next_attempt_at, lease_until);
|
|
65
|
+
CREATE TABLE memory_source_learning_jobs (
|
|
66
|
+
job_id TEXT PRIMARY KEY,
|
|
67
|
+
chunk_id TEXT NOT NULL REFERENCES knowledge_source_chunks(chunk_id) ON DELETE CASCADE,
|
|
68
|
+
agent_id TEXT NOT NULL,
|
|
69
|
+
workspace_id TEXT NOT NULL,
|
|
70
|
+
consent_receipt_id TEXT NOT NULL REFERENCES understanding_consent_receipts(receipt_id),
|
|
71
|
+
policy_hash TEXT NOT NULL,
|
|
72
|
+
state TEXT NOT NULL CHECK(state IN ('queued','running','succeeded','retry_wait','failed','canceled')),
|
|
73
|
+
lease_token TEXT,
|
|
74
|
+
lease_until INTEGER,
|
|
75
|
+
attempts INTEGER NOT NULL DEFAULT 0,
|
|
76
|
+
next_attempt_at INTEGER NOT NULL,
|
|
77
|
+
error_code TEXT,
|
|
78
|
+
created_at INTEGER NOT NULL,
|
|
79
|
+
updated_at INTEGER NOT NULL,
|
|
80
|
+
UNIQUE(chunk_id, agent_id, consent_receipt_id, policy_hash)
|
|
81
|
+
);
|
|
82
|
+
CREATE INDEX memory_source_learning_due ON memory_source_learning_jobs(state, next_attempt_at, lease_until);
|
|
83
|
+
CREATE TABLE memory_learning_receipts (
|
|
84
|
+
run_id TEXT PRIMARY KEY REFERENCES task_run_receipts(run_id) ON DELETE CASCADE,
|
|
85
|
+
learned_at INTEGER NOT NULL,
|
|
86
|
+
knowledge_id TEXT
|
|
87
|
+
);
|
|
88
|
+
CREATE TABLE memory_learning_cursors (
|
|
89
|
+
conversation_id TEXT NOT NULL REFERENCES sessions(conversation_id) ON DELETE CASCADE,
|
|
90
|
+
transcript_id TEXT NOT NULL,
|
|
91
|
+
processed_seq INTEGER NOT NULL DEFAULT 0,
|
|
92
|
+
observed_seq INTEGER NOT NULL DEFAULT 0,
|
|
93
|
+
updated_at INTEGER NOT NULL,
|
|
94
|
+
PRIMARY KEY (conversation_id, transcript_id)
|
|
95
|
+
);
|
|
96
|
+
CREATE TABLE knowledge_source_chunks (
|
|
97
|
+
chunk_id TEXT PRIMARY KEY,
|
|
98
|
+
source_item_id TEXT NOT NULL REFERENCES knowledge_source_items(item_id) ON DELETE CASCADE,
|
|
99
|
+
source_version TEXT NOT NULL,
|
|
100
|
+
consent_receipt_id TEXT REFERENCES understanding_consent_receipts(receipt_id),
|
|
101
|
+
ordinal INTEGER NOT NULL,
|
|
102
|
+
locator TEXT NOT NULL,
|
|
103
|
+
text TEXT NOT NULL,
|
|
104
|
+
UNIQUE(source_item_id, ordinal)
|
|
105
|
+
);
|
|
106
|
+
CREATE VIRTUAL TABLE knowledge_chunks_fts USING fts5(search_text, chunk_id UNINDEXED, tokenize='unicode61');
|
|
107
|
+
CREATE TRIGGER knowledge_chunk_insert AFTER INSERT ON knowledge_source_chunks BEGIN
|
|
108
|
+
INSERT INTO knowledge_chunks_fts(search_text, chunk_id) VALUES (xopc_memory_search_text(NEW.text), NEW.chunk_id);
|
|
109
|
+
END;
|
|
110
|
+
CREATE TRIGGER knowledge_chunk_delete AFTER DELETE ON knowledge_source_chunks BEGIN
|
|
111
|
+
DELETE FROM knowledge_chunks_fts WHERE chunk_id = OLD.chunk_id;
|
|
112
|
+
END;
|
|
113
|
+
CREATE VIRTUAL TABLE knowledge_search_fts USING fts5(search_text, knowledge_id UNINDEXED, tokenize='unicode61');
|
|
114
|
+
INSERT INTO knowledge_search_fts SELECT xopc_memory_search_text(content), knowledge_id FROM knowledge_items;
|
|
115
|
+
DROP TABLE knowledge_items_fts;
|
|
116
|
+
CREATE TRIGGER knowledge_search_insert AFTER INSERT ON knowledge_items BEGIN
|
|
117
|
+
INSERT INTO knowledge_search_fts VALUES (xopc_memory_search_text(NEW.content), NEW.knowledge_id);
|
|
118
|
+
END;
|
|
119
|
+
CREATE TRIGGER knowledge_search_update AFTER UPDATE OF content ON knowledge_items BEGIN
|
|
120
|
+
DELETE FROM knowledge_search_fts WHERE knowledge_id = OLD.knowledge_id;
|
|
121
|
+
INSERT INTO knowledge_search_fts VALUES (xopc_memory_search_text(NEW.content), NEW.knowledge_id);
|
|
122
|
+
END;
|
|
123
|
+
CREATE TRIGGER knowledge_search_delete AFTER DELETE ON knowledge_items BEGIN
|
|
124
|
+
DELETE FROM knowledge_search_fts WHERE knowledge_id = OLD.knowledge_id;
|
|
125
|
+
END;
|
|
@@ -3,7 +3,7 @@ import type { ApplyMigrationsOptions } from './types.js';
|
|
|
3
3
|
/** Baseline schema version applied from schema.sql on first open. */
|
|
4
4
|
export declare const XOPC_DB_BASELINE_SCHEMA_VERSION = 165;
|
|
5
5
|
/** Latest schema version this release supports (increment when adding migrations). */
|
|
6
|
-
export declare const XOPC_DB_SCHEMA_VERSION =
|
|
6
|
+
export declare const XOPC_DB_SCHEMA_VERSION = 245;
|
|
7
7
|
export declare function resolveMigrationsDir(override?: string): string;
|
|
8
8
|
/**
|
|
9
9
|
* Apply sequential SQL migrations from (currentVersion + 1) through targetVersion.
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { __esmMin } from "../../../../_virtual/_rolldown/runtime.js";
|
|
2
2
|
import { init_sql_assets, resolveSqliteAssetPath } from "../sql-assets.js";
|
|
3
|
+
import { init_search_text, memorySearchText } from "../../../knowledge-memory/search-text.js";
|
|
3
4
|
import { createLogger } from "../../../utils/logger/index.js";
|
|
4
5
|
import { init_logger } from "../../../utils/logger.js";
|
|
5
6
|
import { currentOperationId, init_operation_context } from "../../../infra/operation-context.js";
|
|
@@ -56,8 +57,9 @@ function applySingleMigration(db, migration, discardOldScenes = false) {
|
|
|
56
57
|
* Each step runs in its own transaction and updates schema_meta on success.
|
|
57
58
|
*/
|
|
58
59
|
function applyPendingMigrations(db, options = {}) {
|
|
60
|
+
db.function("xopc_memory_search_text", { deterministic: true }, (value) => memorySearchText(String(value ?? "")));
|
|
59
61
|
db.function("xopc_operation_id", () => currentOperationId() ?? null);
|
|
60
|
-
const targetVersion = options.targetVersion ??
|
|
62
|
+
const targetVersion = options.targetVersion ?? 245;
|
|
61
63
|
let currentVersion = readSchemaVersion(db);
|
|
62
64
|
if (currentVersion > targetVersion) throw new DatabaseSchemaTooNewError(currentVersion, targetVersion);
|
|
63
65
|
if (!options.migrationsDir && currentVersion < 165) throw new DatabaseSchemaTooOldError(currentVersion, 165);
|
|
@@ -95,7 +97,7 @@ function applyPendingMigrations(db, options = {}) {
|
|
|
95
97
|
}
|
|
96
98
|
/** Inspect schema version without mutating the database. */
|
|
97
99
|
function inspectSchemaMigrationStatus(db, options = {}) {
|
|
98
|
-
const appVersion = options.targetVersion ??
|
|
100
|
+
const appVersion = options.targetVersion ?? 245;
|
|
99
101
|
const dbVersion = readSchemaVersion(db);
|
|
100
102
|
if (dbVersion > appVersion) return {
|
|
101
103
|
dbVersion,
|
|
@@ -126,6 +128,7 @@ function inspectSchemaMigrationStatus(db, options = {}) {
|
|
|
126
128
|
}
|
|
127
129
|
var log, XOPC_DB_BASELINE_SCHEMA_VERSION, XOPC_DB_SCHEMA_VERSION;
|
|
128
130
|
var init_runner = __esmMin((() => {
|
|
131
|
+
init_search_text();
|
|
129
132
|
init_logger();
|
|
130
133
|
init_operation_context();
|
|
131
134
|
init_schema_version();
|
|
@@ -137,7 +140,7 @@ var init_runner = __esmMin((() => {
|
|
|
137
140
|
init_errors();
|
|
138
141
|
log = createLogger("Sqlite:Migrations");
|
|
139
142
|
XOPC_DB_BASELINE_SCHEMA_VERSION = 165;
|
|
140
|
-
XOPC_DB_SCHEMA_VERSION =
|
|
143
|
+
XOPC_DB_SCHEMA_VERSION = 245;
|
|
141
144
|
}));
|
|
142
145
|
//#endregion
|
|
143
146
|
init_runner();
|
|
@@ -2,10 +2,10 @@ import { ProductReadContracts } from "../../../packages/gateway-contract/src/cap
|
|
|
2
2
|
import { init_src } from "../../../packages/gateway-contract/src/index.js";
|
|
3
3
|
import { TaskRepository, init_task_repository } from "../task-repository.js";
|
|
4
4
|
import { TaskRunRepository, init_task_run_repository } from "../task-run-repository.js";
|
|
5
|
-
import { CapabilityError } from "../../capabilities/runtime/errors.js";
|
|
6
|
-
import { defineReadCapability } from "../../capabilities/runtime/dispatcher.js";
|
|
7
5
|
import { TaskConversationRepository } from "../task-conversation-repository.js";
|
|
8
6
|
import { TaskReadModelProjector } from "../task-read-model-projector.js";
|
|
7
|
+
import { CapabilityError } from "../../capabilities/runtime/errors.js";
|
|
8
|
+
import { defineReadCapability } from "../../capabilities/runtime/dispatcher.js";
|
|
9
9
|
import { TaskContextRepository } from "../task-context-repository.js";
|
|
10
10
|
import { TaskDependencyService } from "../task-dependency-service.js";
|
|
11
11
|
import { TaskCriterionReviewRepository } from "../task-criterion-review-repository.js";
|
|
@@ -2,9 +2,9 @@ import { createLogger } from "../utils/logger/index.js";
|
|
|
2
2
|
import { init_logger } from "../utils/logger.js";
|
|
3
3
|
import { TaskRepository, init_task_repository } from "./task-repository.js";
|
|
4
4
|
import { TaskRunRepository, init_task_run_repository } from "./task-run-repository.js";
|
|
5
|
+
import { init_session_key, resolveConversationId, sanitizeSegment } from "../routing/session-key.js";
|
|
5
6
|
import { normalizeAgentId } from "../agent-catalog/id.js";
|
|
6
7
|
import { init_agent_scope, listAgentEntries } from "../agent/agent-scope.js";
|
|
7
|
-
import { init_session_key, resolveConversationId, sanitizeSegment } from "../routing/session-key.js";
|
|
8
8
|
import { TaskConversationRepository } from "./task-conversation-repository.js";
|
|
9
9
|
import { TaskContextRepository } from "./task-context-repository.js";
|
|
10
10
|
//#region src/tasks/task-handoff-service.ts
|