@xopcai/xopc 0.0.254 → 0.0.256
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/telegram/xopc.extension.json +1 -1
- package/dist/gateway/static/root/assets/{activity-store-Ci5Rxmi_.js → activity-store-DYb6xFC3.js} +1 -1
- package/dist/gateway/static/root/assets/{agent-avatar-dicebear-D82jpmFL.js → agent-avatar-dicebear-BZJZvmYw.js} +1 -1
- package/dist/gateway/static/root/assets/agent-defaults-settings-panel-Bq7GNF1L.js +1 -0
- package/dist/gateway/static/root/assets/{agents-p3kWyz1T.js → agents-1vtaw07m.js} +1 -1
- package/dist/gateway/static/root/assets/{api-CXIzQJ2Z.js → api-NADZ8X8B.js} +1 -1
- package/dist/gateway/static/root/assets/{app-management-settings-panel-mhxcQpkQ.js → app-management-settings-panel-DG64SQsx.js} +1 -1
- package/dist/gateway/static/root/assets/{appearance-settings-BIMwACUF.js → appearance-settings-BRWQdIIy.js} +1 -1
- package/dist/gateway/static/root/assets/apps-page-D3ziBisx.js +1 -0
- package/dist/gateway/static/root/assets/{archive-plugin-C63Xp_sU.js → archive-plugin-D3FQ9VzV.js} +1 -1
- package/dist/gateway/static/root/assets/{attachment-load-D12KYOav.js → attachment-load-Cid3dBaW.js} +1 -1
- package/dist/gateway/static/root/assets/{automations-page-DXj0o5CY.js → automations-page-BUTNaZtj.js} +1 -1
- package/dist/gateway/static/root/assets/automations-workspace-D4NJSE8l.js +6 -0
- package/dist/gateway/static/root/assets/{binary-plugins-Bcv8hun6.js → binary-plugins-BSYMCuaB.js} +1 -1
- package/dist/gateway/static/root/assets/block-editor-qDlC3t7b.js +159 -0
- package/dist/gateway/static/root/assets/{browser-automation-inputs-CAclu735.js → browser-automation-inputs-rA2QROKe.js} +1 -1
- package/dist/gateway/static/root/assets/{browser-automations-page-BITfKX8L.js → browser-automations-page-Du1KVE01.js} +2 -2
- package/dist/gateway/static/root/assets/browser-settings-page-WZ0Jt5Hp.js +8 -0
- package/dist/gateway/static/root/assets/capabilities-settings-panel-D1AYoRx4.js +7 -0
- package/dist/gateway/static/root/assets/channels-settings-CZnlYu2L.js +1 -0
- package/dist/gateway/static/root/assets/{channels-status-swr-Cmbx0E8O.js → channels-status-swr-B2aMPOSM.js} +1 -1
- package/dist/gateway/static/root/assets/{chat-terminal-dock-CNBgHN9U.js → chat-terminal-dock-CY-I_bCe.js} +2 -2
- package/dist/gateway/static/root/assets/{chunk-KS7C4IRE-BaASWQor.js → chunk-KS7C4IRE-Cq1tE_3b.js} +2 -2
- package/dist/gateway/static/root/assets/code-editor-CXIH8jQw.js +1 -0
- package/dist/gateway/static/root/assets/connectors-page-CkH3gaqs.js +2 -0
- package/dist/gateway/static/root/assets/{cron-expression-DCTN4QAG.js → cron-expression-z4WOWyBU.js} +1 -1
- package/dist/gateway/static/root/assets/date-picker-vKUcJeQZ.js +1 -0
- package/dist/gateway/static/root/assets/{dependency-picker-l6IXzk0C.js → dependency-picker-BpZ9A2gi.js} +1 -1
- package/dist/gateway/static/root/assets/{desktop-pet-cGn_20DO.js → desktop-pet-ClrAMqgn.js} +1 -1
- package/dist/gateway/static/root/assets/{desktop-pet-settings-DIfccDKS.js → desktop-pet-settings-DKNKGiEG.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-debug-page-CTS5RP_D.js → extension-debug-page-C39hFkJm.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-page-Dg9YssYH.js → extension-page-DkqVsWB7.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-settings-page-CWZYL8Fi.js → extension-settings-page-Be4lFw8f.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-config-swr-Chsr5wGH.js → gateway-config-swr-DEKSw3d-.js} +1 -1
- package/dist/gateway/static/root/assets/gateway-settings-HIHGY-0Y.js +1 -0
- package/dist/gateway/static/root/assets/{gateway-startup-retry-C9ynH6VV.js → gateway-startup-retry-Dlyt2VhF.js} +1 -1
- package/dist/gateway/static/root/assets/{heartbeat-settings-WUhSfvob.js → heartbeat-settings-DiYjWa1F.js} +1 -1
- package/dist/gateway/static/root/assets/home-page-BLZNEVmk.js +1 -0
- package/dist/gateway/static/root/assets/{image-generation-api-D_TsVe7h.js → image-generation-api-CJIPVk_d.js} +1 -1
- package/dist/gateway/static/root/assets/index-50Kr6L6C.css +2 -0
- package/dist/gateway/static/root/assets/index-BWdn9NaX.js +76 -0
- package/dist/gateway/static/root/assets/{keyboard-shortcuts-settings-DGBf6YfD.js → keyboard-shortcuts-settings-ge76J038.js} +1 -1
- package/dist/gateway/static/root/assets/languages-BFe8nIOO.js +2 -0
- package/dist/gateway/static/root/assets/local-app-workbench-page-E47xrPDI.js +2 -0
- package/dist/gateway/static/root/assets/{local-apps-page-DGWP_xsQ.js → local-apps-page-gkw7VRL4.js} +1 -1
- package/dist/gateway/static/root/assets/{locale-store-B2v8mNJw.js → locale-store-DJPCr2mb.js} +1 -1
- package/dist/gateway/static/root/assets/logs-page-HHtDMSUW.js +2 -0
- package/dist/gateway/static/root/assets/{management-settings-DUAZ-dtt.js → management-settings-DOfCSojd.js} +1 -1
- package/dist/gateway/static/root/assets/markdown-editor-BhBJANcx.js +1 -0
- package/dist/gateway/static/root/assets/{markdown-view-DBWu9d_n.js → markdown-view-k_PJsY2C.js} +2 -2
- package/dist/gateway/static/root/assets/{media-plugins-CsUjcIBy.js → media-plugins-D8wMcUtB.js} +1 -1
- package/dist/gateway/static/root/assets/messages-BeIiRpmk.js +3 -0
- package/dist/gateway/static/root/assets/{mobile-pairing-wizard-Dxu8twiQ.js → mobile-pairing-wizard-B4Ewewwr.js} +1 -1
- package/dist/gateway/static/root/assets/note-detail-panel-DPd5L2A9.js +5 -0
- package/dist/gateway/static/root/assets/notes-page-CE_De-iQ.js +8 -0
- package/dist/gateway/static/root/assets/{page-tabs-YeJKwV-7.js → page-tabs-DoxnT3X4.js} +1 -1
- package/dist/gateway/static/root/assets/popover-select-CKBYnT3c.js +1 -0
- package/dist/gateway/static/root/assets/{preview-open-alternatives-BfJ3jMDG.js → preview-open-alternatives-D4oL1yua.js} +1 -1
- package/dist/gateway/static/root/assets/product-open-page-CeStuxSl.js +1 -0
- package/dist/gateway/static/root/assets/project-detail-page-DXhBJzJy.js +1 -0
- package/dist/gateway/static/root/assets/projects-page-CcqhmZoX.js +1 -0
- package/dist/gateway/static/root/assets/{registry-api-B9OZUdwC.js → registry-api-Dalzf2w0.js} +1 -1
- package/dist/gateway/static/root/assets/remote-access-hub-ulmJT_Ac.js +1 -0
- package/dist/gateway/static/root/assets/{runtime-tools-settings-panel-uJ8Br3ZL.js → runtime-tools-settings-panel-CrOpchy5.js} +2 -2
- package/dist/gateway/static/root/assets/{schema-form-CXwn6up5.js → schema-form-Dk52v4cQ.js} +1 -1
- package/dist/gateway/static/root/assets/sessions-page-RM0kAsNa.js +1 -0
- package/dist/gateway/static/root/assets/settings-advanced-gate-BfLbu67w.js +1 -0
- package/dist/gateway/static/root/assets/{settings-form-section-YVNYsR0U.js → settings-form-section-dvGi1APN.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-page-cHqrIdVR.js → settings-page-CEYjEm2D.js} +1 -1
- package/dist/gateway/static/root/assets/setup-status-panel-BZ4i0CYX.js +1 -0
- package/dist/gateway/static/root/assets/{share-preview-page-DnjSDQru.js → share-preview-page-DP4Qgsv6.js} +1 -1
- package/dist/gateway/static/root/assets/shares-settings-B5yHTrGO.js +1 -0
- package/dist/gateway/static/root/assets/skill-reload-api-BicZK04u.js +1 -0
- package/dist/gateway/static/root/assets/{skills-page-DkrGEdiY.js → skills-page-Dlr1Ue1w.js} +1 -1
- package/dist/gateway/static/root/assets/{skills-page.utils-CqZbiZuK.js → skills-page.utils-I1wcnceD.js} +1 -1
- package/dist/gateway/static/root/assets/source-workspace-editor-DunRD1gY.js +1 -0
- package/dist/gateway/static/root/assets/{system-settings-panel-Dmw0RfxZ.js → system-settings-panel-DIaFAHT0.js} +1 -1
- package/dist/gateway/static/root/assets/task-detail-page-4_5g-V8B.js +1 -0
- package/dist/gateway/static/root/assets/{theme-store-CubltMKm.js → theme-store-DYDrhfnD.js} +1 -1
- package/dist/gateway/static/root/assets/{tunnel-api-CiieC6HP.js → tunnel-api-DAXx1rHF.js} +1 -1
- package/dist/gateway/static/root/assets/{use-autosave-XQ3SuyB9.js → use-autosave-BwEFbveP.js} +1 -1
- package/dist/gateway/static/root/assets/user-model-page-CQnXw4ba.js +2 -0
- package/dist/gateway/static/root/assets/{vendor-codemirror-Qdcjid65.js → vendor-codemirror-DFxP3B9T.js} +16 -16
- package/dist/gateway/static/root/assets/{voice-api-key-field-D4QzVgdt.js → voice-api-key-field-C-WbC2fM.js} +1 -1
- package/dist/gateway/static/root/assets/{voice-config-api-B1ZbyVmF.js → voice-config-api-Ds0z9O11.js} +1 -1
- package/dist/gateway/static/root/assets/{work-discovery-overlay-D5Tf8GRZ.js → work-discovery-overlay-DiGw5KKj.js} +1 -1
- package/dist/gateway/static/root/assets/{workflow-run-setup-panel-BW9p8Maz.js → workflow-run-setup-panel-BIU2wg99.js} +2 -2
- package/dist/gateway/static/root/assets/workflows-page-D3Z7JVHH.js +6 -0
- package/dist/gateway/static/root/index.html +12 -12
- package/dist/package.js +1 -1
- package/dist/packages/gateway-contract/src/user-message-display.js +0 -18
- package/dist/src/agent/context/execution-context.js +34 -21
- package/dist/src/agent/context/execution-context.types.d.ts +2 -0
- package/dist/src/agent/inbound/attachment-pipeline.d.ts +1 -0
- package/dist/src/agent/inbound/attachment-pipeline.js +6 -1
- package/dist/src/agent/prompt/sections/memory-skills.js +2 -1
- package/dist/src/agent/prompt/sections/tooling.js +2 -0
- package/dist/src/agent/tools/create-share-tool.js +39 -1
- package/dist/src/agent/tools/delegate-tool.js +1 -0
- package/dist/src/agent/tools/factory.js +14 -1
- package/dist/src/agent/tools/index.d.ts +1 -1
- package/dist/src/agent/tools/index.js +2 -2
- package/dist/src/agent/tools/user-context-tool.d.ts +3 -0
- package/dist/src/agent/tools/user-context-tool.js +147 -4
- package/dist/src/agent/workflow/catalog.js +6 -2
- package/dist/src/chat-commands/builtins/workflow.js +1 -1
- package/dist/src/cli/commands/tunnel.js +3 -3
- package/dist/src/connectors/connected-source-understanding.js +4 -4
- package/dist/src/gateway/agent-builtin-tools.d.ts +7 -1
- package/dist/src/gateway/agent-builtin-tools.js +7 -0
- package/dist/src/gateway/device-routes.js +1 -1
- package/dist/src/gateway/hono/lib/config-payload.js +1 -1
- package/dist/src/gateway/hono/routes/lazy-bundles.js +2 -2
- package/dist/src/gateway/hono/routes/sessions.js +1 -1
- package/dist/src/gateway/hono/routes/shares.js +404 -7
- package/dist/src/gateway/hono/routes/site-shares.js +19 -13
- package/dist/src/gateway/hono/routes/tunnel.js +1 -1
- package/dist/src/gateway/hono/routes/user-model.js +35 -102
- package/dist/src/gateway/hono/routes/workflows.js +7 -4
- package/dist/src/gateway/service/sessions-api.js +1 -1
- package/dist/src/gateway/service.js +6 -6
- package/dist/src/remote-access/exposure-manager.js +1 -1
- package/dist/src/session/index.js +1 -1
- package/dist/src/session/store.js +1 -1
- package/dist/src/share/hosted-note-publication.d.ts +22 -0
- package/dist/src/share/hosted-note-publication.js +96 -0
- package/dist/src/share/hosted-session-share.d.ts +86 -7
- package/dist/src/share/hosted-session-share.js +72 -15
- package/dist/src/share/hosted-static-site-publication.d.ts +16 -0
- package/dist/src/share/hosted-static-site-publication.js +108 -0
- package/dist/src/share/hosted-static-site-publish.d.ts +23 -0
- package/dist/src/share/hosted-static-site-publish.js +53 -0
- package/dist/src/share/note-share-service.d.ts +1 -0
- package/dist/src/share/note-share-service.js +4 -4
- package/dist/src/share/share-url.d.ts +1 -1
- package/dist/src/share/share-url.js +14 -9
- package/dist/src/tui/backends/embedded-backend.js +2 -2
- package/dist/src/tui/tui-agent-events.js +1 -1
- package/dist/src/tui/tui-workflow-slash.d.ts +3 -6
- package/dist/src/tui/tui-workflow-slash.js +3 -6
- package/dist/src/tunnel/index.js +1 -1
- package/dist/src/tunnel/tunnel-service.js +1 -1
- package/dist/src/user-model/bootstrap.d.ts +17 -0
- package/dist/src/user-model/bootstrap.js +118 -0
- package/dist/src/user-model/index.d.ts +3 -0
- package/dist/src/user-model/index.js +4 -1
- package/dist/src/user-model/profile.d.ts +5 -0
- package/dist/src/user-model/profile.js +98 -0
- package/dist/src/user-model/usage-policy.d.ts +2 -0
- package/dist/src/user-model/usage-policy.js +6 -0
- package/dist/src/voice/realtime/agentEngine.js +17 -0
- package/dist/src/voice/realtime/memory-context.js +1 -1
- package/dist/src/voice/realtime/playback-echo.d.ts +2 -0
- package/dist/src/voice/realtime/playback-echo.js +15 -0
- package/dist/src/work-discovery/analyzer.js +8 -6
- package/dist/src/work-discovery/service.d.ts +1 -1
- package/dist/src/work-discovery/service.js +4 -4
- package/dist/src/work-discovery/types.d.ts +1 -1
- package/dist/src/workflows/domain/run.d.ts +8 -1
- package/dist/src/workflows/domain/validation.d.ts +3 -4
- package/dist/src/workflows/domain/validation.js +119 -8
- package/dist/src/workflows/service/workflow-run-service.js +8 -1
- package/package.json +5 -5
- package/dist/gateway/static/root/assets/agent-defaults-settings-panel-vul32IsP.js +0 -1
- package/dist/gateway/static/root/assets/apps-page-CJFJKNwS.js +0 -1
- package/dist/gateway/static/root/assets/automations-workspace-B2wxcpgq.js +0 -6
- package/dist/gateway/static/root/assets/block-editor-C61LqK_-.js +0 -185
- package/dist/gateway/static/root/assets/browser-settings-page-BMjY8cyv.js +0 -8
- package/dist/gateway/static/root/assets/capabilities-settings-panel-wB3Vgmp3.js +0 -7
- package/dist/gateway/static/root/assets/channels-settings-U5ffzu4r.js +0 -1
- package/dist/gateway/static/root/assets/connectors-page-BGaF--m5.js +0 -2
- package/dist/gateway/static/root/assets/date-picker-BuEyUxZn.js +0 -1
- package/dist/gateway/static/root/assets/gateway-settings-vHI_Que8.js +0 -1
- package/dist/gateway/static/root/assets/home-page-CYjlMzPx.js +0 -1
- package/dist/gateway/static/root/assets/index-BBlJYVxR.js +0 -74
- package/dist/gateway/static/root/assets/index-_I0dD2LN.css +0 -2
- package/dist/gateway/static/root/assets/languages-5WaOu0Lf.js +0 -2
- package/dist/gateway/static/root/assets/local-app-workbench-page-CLlIl83V.js +0 -2
- package/dist/gateway/static/root/assets/logs-page-DuhCigiB.js +0 -2
- package/dist/gateway/static/root/assets/markdown-editor-BjMTIM-m.js +0 -1
- package/dist/gateway/static/root/assets/messages-ChSTFZR5.js +0 -3
- package/dist/gateway/static/root/assets/note-detail-panel-DMdbaTZp.js +0 -5
- package/dist/gateway/static/root/assets/notes-page-xe_vX0nM.js +0 -8
- package/dist/gateway/static/root/assets/popover-select-C-Hj-nXR.js +0 -1
- package/dist/gateway/static/root/assets/product-open-page-B7NRGPox.js +0 -1
- package/dist/gateway/static/root/assets/project-detail-page-hG7ELibZ.js +0 -1
- package/dist/gateway/static/root/assets/projects-page-C5G2ET4w.js +0 -1
- package/dist/gateway/static/root/assets/remote-access-hub-DTO-faxH.js +0 -1
- package/dist/gateway/static/root/assets/sessions-page-CwzsUCgP.js +0 -1
- package/dist/gateway/static/root/assets/settings-advanced-gate-Djc3EdoO.js +0 -1
- package/dist/gateway/static/root/assets/setup-status-panel-MUAMcZLD.js +0 -1
- package/dist/gateway/static/root/assets/shares-settings-C7A0aywX.js +0 -1
- package/dist/gateway/static/root/assets/skill-reload-api-D1xSGJAQ.js +0 -1
- package/dist/gateway/static/root/assets/source-workspace-editor-CVWzt0oT.js +0 -1
- package/dist/gateway/static/root/assets/task-detail-page-BvZSCLUH.js +0 -1
- package/dist/gateway/static/root/assets/user-model-page-BKJC7tyW.js +0 -2
- package/dist/gateway/static/root/assets/workflows-page-DuqRodIc.js +0 -5
|
@@ -2,7 +2,9 @@ import { createCollaborationRule, getCollaborationRule, listCollaborationRules,
|
|
|
2
2
|
import { getKnowledgeItem, listKnowledgeItems, searchKnowledgeItems, setKnowledgeStatus } from "../../../knowledge-memory/repository.js";
|
|
3
3
|
import "../../../knowledge-memory/index.js";
|
|
4
4
|
import { createPriorityWindow, createUserGoal, listPriorityWindows, listUserGoals, setUserGoalStatus } from "../../../user-model/goals.js";
|
|
5
|
-
import {
|
|
5
|
+
import { getAssertionSlot, getUserAssertion, listUserAssertions, reconcileAssertion, setAssertionStatus } from "../../../user-model/repository.js";
|
|
6
|
+
import { applyUserProfilePatch, getUserProfileSnapshot } from "../../../user-model/profile.js";
|
|
7
|
+
import { bootstrapUserModel } from "../../../user-model/bootstrap.js";
|
|
6
8
|
import "../../../user-model/index.js";
|
|
7
9
|
import { listMemoryMaintenanceRuns } from "../../../memory-maintenance/service.js";
|
|
8
10
|
import "../../../memory-maintenance/index.js";
|
|
@@ -86,65 +88,6 @@ const RULE_STATUSES = new Set([
|
|
|
86
88
|
"disabled",
|
|
87
89
|
"archived"
|
|
88
90
|
]);
|
|
89
|
-
function profileAssertion(predicate) {
|
|
90
|
-
return getActiveAssertionForSlot({
|
|
91
|
-
subject: {
|
|
92
|
-
type: "user",
|
|
93
|
-
id: "self"
|
|
94
|
-
},
|
|
95
|
-
predicate,
|
|
96
|
-
scope: { type: "global" }
|
|
97
|
-
});
|
|
98
|
-
}
|
|
99
|
-
function profileValue(predicate) {
|
|
100
|
-
return profileAssertion(predicate)?.value;
|
|
101
|
-
}
|
|
102
|
-
function profileSnapshot() {
|
|
103
|
-
return {
|
|
104
|
-
callName: profileValue("identity.call_name"),
|
|
105
|
-
pronouns: profileValue("identity.pronouns"),
|
|
106
|
-
timezone: profileValue("preference.timezone"),
|
|
107
|
-
locale: profileValue("preference.locale"),
|
|
108
|
-
role: profileValue("identity.role")
|
|
109
|
-
};
|
|
110
|
-
}
|
|
111
|
-
const PROFILE_FIELDS = {
|
|
112
|
-
callName: {
|
|
113
|
-
predicate: "identity.call_name",
|
|
114
|
-
kind: "identity",
|
|
115
|
-
volatility: "stable",
|
|
116
|
-
importance: .95,
|
|
117
|
-
statement: (value) => `The user prefers to be called ${value}.`
|
|
118
|
-
},
|
|
119
|
-
role: {
|
|
120
|
-
predicate: "identity.role",
|
|
121
|
-
kind: "identity",
|
|
122
|
-
volatility: "slow",
|
|
123
|
-
importance: .9,
|
|
124
|
-
statement: (value) => `The user's role is ${value}.`
|
|
125
|
-
},
|
|
126
|
-
pronouns: {
|
|
127
|
-
predicate: "identity.pronouns",
|
|
128
|
-
kind: "identity",
|
|
129
|
-
volatility: "stable",
|
|
130
|
-
importance: .75,
|
|
131
|
-
statement: (value) => `The user's pronouns are ${value}.`
|
|
132
|
-
},
|
|
133
|
-
timezone: {
|
|
134
|
-
predicate: "preference.timezone",
|
|
135
|
-
kind: "preference",
|
|
136
|
-
volatility: "slow",
|
|
137
|
-
importance: .85,
|
|
138
|
-
statement: (value) => `The user's timezone is ${value}.`
|
|
139
|
-
},
|
|
140
|
-
locale: {
|
|
141
|
-
predicate: "preference.locale",
|
|
142
|
-
kind: "preference",
|
|
143
|
-
volatility: "slow",
|
|
144
|
-
importance: .85,
|
|
145
|
-
statement: (value) => `The user's language and locale are ${value}.`
|
|
146
|
-
}
|
|
147
|
-
};
|
|
148
91
|
function assertionView(assertion) {
|
|
149
92
|
const slot = getAssertionSlot(assertion.slotId);
|
|
150
93
|
if (!slot) throw new Error(`Assertion slot not found: ${assertion.slotId}`);
|
|
@@ -181,7 +124,7 @@ function registerUserModelRoutes(authenticated, deps) {
|
|
|
181
124
|
rules: listCollaborationRules(),
|
|
182
125
|
knowledge,
|
|
183
126
|
maintenance: { lastRun: listMemoryMaintenanceRuns(1)[0] ?? null },
|
|
184
|
-
profile:
|
|
127
|
+
profile: getUserProfileSnapshot(),
|
|
185
128
|
counts: {
|
|
186
129
|
activeAssertions: assertions.filter((item) => item.status === "active").length,
|
|
187
130
|
reviewAssertions: assertions.filter((item) => item.status === "needs_review" || item.status === "conflicted").length,
|
|
@@ -194,48 +137,38 @@ function registerUserModelRoutes(authenticated, deps) {
|
|
|
194
137
|
authenticated.patch("/api/user-model/profile", write, async (c) => {
|
|
195
138
|
const input = await body(c);
|
|
196
139
|
if (!input) return c.json({ error: "A profile patch is required" }, 400);
|
|
197
|
-
const entries =
|
|
198
|
-
|
|
140
|
+
const entries = [
|
|
141
|
+
"callName",
|
|
142
|
+
"role",
|
|
143
|
+
"pronouns",
|
|
144
|
+
"timezone",
|
|
145
|
+
"locale"
|
|
146
|
+
].filter((key) => Object.hasOwn(input, key));
|
|
147
|
+
if (!entries.length || entries.some((key) => typeof input[key] !== "string")) return c.json({ error: "Profile fields must be strings" }, 400);
|
|
199
148
|
try {
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
statement: field.statement(value),
|
|
224
|
-
authority: "user_explicit",
|
|
225
|
-
confidence: 1,
|
|
226
|
-
declaredImportance: field.importance,
|
|
227
|
-
inferredImportance: field.importance,
|
|
228
|
-
consequence: "medium",
|
|
229
|
-
actionability: .9,
|
|
230
|
-
volatility: field.volatility,
|
|
231
|
-
sensitivity: "normal",
|
|
232
|
-
disclosurePolicy: "referenceable",
|
|
233
|
-
observedAt: now,
|
|
234
|
-
createdBy: "user",
|
|
235
|
-
...current ? { correctionOfAssertionId: current.id } : {}
|
|
236
|
-
});
|
|
237
|
-
}
|
|
238
|
-
return c.json({ profile: profileSnapshot() });
|
|
149
|
+
return c.json({ profile: applyUserProfilePatch(Object.fromEntries(entries.map((key) => [key, input[key]]))) });
|
|
150
|
+
} catch (error) {
|
|
151
|
+
return c.json({ error: errorMessage(error) }, 400);
|
|
152
|
+
}
|
|
153
|
+
});
|
|
154
|
+
authenticated.post("/api/user-model/bootstrap", write, async (c) => {
|
|
155
|
+
const input = await body(c);
|
|
156
|
+
const profile = object(input?.profile);
|
|
157
|
+
const listFields = [
|
|
158
|
+
"responsibilities",
|
|
159
|
+
"goals",
|
|
160
|
+
"communicationPreferences",
|
|
161
|
+
"boundaries",
|
|
162
|
+
"relationships"
|
|
163
|
+
];
|
|
164
|
+
const validProfile = profile && Object.values(profile).every((value) => typeof value === "string");
|
|
165
|
+
const validLists = listFields.every((key) => input?.[key] === void 0 || Array.isArray(input[key]) && input[key].every((value) => typeof value === "string"));
|
|
166
|
+
if (!input || !validProfile || !validLists) return c.json({ error: "profile and string-list user-model fields are required" }, 400);
|
|
167
|
+
try {
|
|
168
|
+
return c.json(bootstrapUserModel({
|
|
169
|
+
profile,
|
|
170
|
+
...Object.fromEntries(listFields.flatMap((key) => input[key] === void 0 ? [] : [[key, input[key]]]))
|
|
171
|
+
}), 201);
|
|
239
172
|
} catch (error) {
|
|
240
173
|
return c.json({ error: errorMessage(error) }, 400);
|
|
241
174
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { init_agent_scope, resolveDefaultAgentId } from "../../../agent/agent-scope.js";
|
|
2
2
|
import { resolveProjectAgentId } from "../../../projects/project-agent.js";
|
|
3
3
|
import "../../../projects/index.js";
|
|
4
|
+
import { messagesToClientHistory } from "../../../session/client-history.js";
|
|
4
5
|
import { validateWorkflowDefinitionInput } from "../../../workflows/domain/validation.js";
|
|
5
6
|
import { WorkflowNameConflictError, WorkflowRevisionConflictError, createWorkflowCatalog } from "../../../agent/workflow/catalog.js";
|
|
6
|
-
import { messagesToClientHistory } from "../../../session/client-history.js";
|
|
7
7
|
import "../../../workflows/domain/index.js";
|
|
8
8
|
import { resolveWorkflowRunArtifactsDir } from "../../../workflows/store/paths.js";
|
|
9
9
|
import { WorkflowDraftService } from "../../../workflows/draft/workflow-draft-service.js";
|
|
@@ -103,7 +103,8 @@ function registerWorkflowRoutes(authenticated, deps) {
|
|
|
103
103
|
const body = await readJsonBody(c.req.raw);
|
|
104
104
|
const result = validateWorkflowDefinitionInput({
|
|
105
105
|
name: body.name,
|
|
106
|
-
graph: body.graph
|
|
106
|
+
graph: body.graph,
|
|
107
|
+
manifest: body.manifest
|
|
107
108
|
});
|
|
108
109
|
return c.json(result);
|
|
109
110
|
});
|
|
@@ -132,7 +133,8 @@ function registerWorkflowRoutes(authenticated, deps) {
|
|
|
132
133
|
if (body.expectedRevision !== 0) return c.json({ error: "expectedRevision must be 0 when creating a workflow" }, 400);
|
|
133
134
|
const validation = validateWorkflowDefinitionInput({
|
|
134
135
|
name: body.name,
|
|
135
|
-
graph: body.graph
|
|
136
|
+
graph: body.graph,
|
|
137
|
+
manifest: body.manifest
|
|
136
138
|
});
|
|
137
139
|
if (!validation.valid) return c.json({
|
|
138
140
|
error: validation.errors[0]?.message ?? "Invalid workflow definition",
|
|
@@ -171,7 +173,8 @@ function registerWorkflowRoutes(authenticated, deps) {
|
|
|
171
173
|
if (!Number.isSafeInteger(body.expectedRevision) || body.expectedRevision < 1) return c.json({ error: "expectedRevision is required" }, 400);
|
|
172
174
|
const validation = validateWorkflowDefinitionInput({
|
|
173
175
|
name: id,
|
|
174
|
-
graph: body.graph
|
|
176
|
+
graph: body.graph,
|
|
177
|
+
manifest: body.manifest
|
|
175
178
|
});
|
|
176
179
|
if (!validation.valid) return c.json({
|
|
177
180
|
error: validation.errors[0]?.message ?? "Invalid workflow definition",
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { init_agent_session_key, resolveAgentIdFromSessionKey } from "../../routing/agent-session-key.js";
|
|
2
2
|
import { buildSessionKey, init_session_key } from "../../routing/session-key.js";
|
|
3
3
|
import { retireSessionMcpRuntimeForSessionKey } from "../../agent/mcp/bundle-mcp-runtime.js";
|
|
4
|
-
import "../../agent/mcp/bundle-mcp-tools.js";
|
|
5
4
|
import { buildSessionTimeline } from "../../session/transcript-outline.js";
|
|
6
5
|
import { transcriptRowsToClientHistory } from "../../session/client-history.js";
|
|
6
|
+
import "../../agent/mcp/bundle-mcp-tools.js";
|
|
7
7
|
import { collectMediaUrisFromValues, deleteMediaUris } from "../../media/session-references.js";
|
|
8
8
|
import { withModelConfigLock } from "../../session/model-config-lock.js";
|
|
9
9
|
import { getDistinctSessionChatIds } from "./session-chat-ids.js";
|
|
@@ -54,12 +54,6 @@ import { registerClarificationChannelRuntime } from "./clarify-runtime.js";
|
|
|
54
54
|
import { ChannelManager } from "../channels/manager.js";
|
|
55
55
|
import { getWorkspacePath } from "../config/workspace-path-helpers.js";
|
|
56
56
|
import "../config/index.js";
|
|
57
|
-
import { DiscussionService } from "../discussions/service.js";
|
|
58
|
-
import { DiscussionOrganizer } from "../discussions/organizer.js";
|
|
59
|
-
import { DiscussionLiveWorker } from "../discussions/live-worker.js";
|
|
60
|
-
import { DiscussionOrganizerWorker } from "../discussions/organizer-worker.js";
|
|
61
|
-
import { DiscussionSealer } from "../discussions/sealer.js";
|
|
62
|
-
import "../discussions/index.js";
|
|
63
57
|
import { ManagedComposioEventPoller } from "../connectors/composio-managed-events.js";
|
|
64
58
|
import { startConnectedKnowledgeCoordinator } from "../knowledge/coordinator.js";
|
|
65
59
|
import "../knowledge/index.js";
|
|
@@ -67,6 +61,12 @@ import { ConnectionRecoveryService } from "../connectors/connection-recovery-ser
|
|
|
67
61
|
import { startConnectorLearningCoordinator } from "../connectors/learning-coordinator.js";
|
|
68
62
|
import { ConnectedSourceChangePublisher } from "../connectors/source-change-publisher.js";
|
|
69
63
|
import { startConnectorSupervisor } from "../connectors/supervisor.js";
|
|
64
|
+
import { DiscussionService } from "../discussions/service.js";
|
|
65
|
+
import { DiscussionOrganizer } from "../discussions/organizer.js";
|
|
66
|
+
import { DiscussionLiveWorker } from "../discussions/live-worker.js";
|
|
67
|
+
import { DiscussionOrganizerWorker } from "../discussions/organizer-worker.js";
|
|
68
|
+
import { DiscussionSealer } from "../discussions/sealer.js";
|
|
69
|
+
import "../discussions/index.js";
|
|
70
70
|
import { EndpointToolRuntime } from "../endpoint-tools/runtime.js";
|
|
71
71
|
import "../endpoint-tools/index.js";
|
|
72
72
|
import { assertGatewayAuthConfigured, extractToken, resolveGatewayAuth, validateToken } from "./auth.js";
|
|
@@ -2,9 +2,9 @@ import { createLogger } from "../utils/logger/index.js";
|
|
|
2
2
|
import { init_logger } from "../utils/logger.js";
|
|
3
3
|
import { isTailscaleInstalled } from "../infra/tailscale.js";
|
|
4
4
|
import { resolveGatewayBindMode } from "../config/gateway-bind.js";
|
|
5
|
+
import { getTunnelService } from "../tunnel/tunnel-service.js";
|
|
5
6
|
import { collectExposureConflicts } from "./exposure-guards.js";
|
|
6
7
|
import { getTailscaleExposureState, maybeStartTailscaleFromConfig, stopTailscaleExposure } from "../gateway/tailscale-lifecycle.js";
|
|
7
|
-
import { getTunnelService } from "../tunnel/tunnel-service.js";
|
|
8
8
|
import { getTunnelConsentState } from "../tunnel/consent.js";
|
|
9
9
|
import { maybeAutoStartTunnelFromConfig } from "../tunnel/gateway-lifecycle.js";
|
|
10
10
|
//#region src/remote-access/exposure-manager.ts
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { buildSessionContextForLlm, isTranscriptContextEntry, mergeLlmMessagesPreservingContextRows, transcriptRowsFromJsonArray } from "./session-context-for-llm.js";
|
|
2
2
|
import { SessionStatus } from "./types.js";
|
|
3
3
|
import { effectiveWorkspacePathForSession, normalizeWorkingDirectoryInput, projectWorkspacePath } from "./session-workspace.js";
|
|
4
|
+
import { flattenMessageContent, messagesToClientHistory } from "./client-history.js";
|
|
4
5
|
import { emitSessionTranscriptUpdate, onSessionTranscriptUpdate } from "./transcript-events.js";
|
|
5
6
|
import { fallbackTitleFromMessages, generateSessionTitleFromMessages, getSessionTitleSource, isWebchatSessionKey, maybeRefineSessionTitleWithLlm, maybeSetProvisionalSessionTitle, provisionalTitleFromUserText, sanitizeGeneratedSessionTitle, sanitizeSessionTitle, shouldAutoTitleSessionKey, shouldRefineSessionTitleWithLlm } from "./session-title.js";
|
|
6
|
-
import { flattenMessageContent, messagesToClientHistory } from "./client-history.js";
|
|
7
7
|
import { SessionStore } from "./store.js";
|
|
8
8
|
import { applySessionPatchToMetadata } from "./patch-metadata.js";
|
|
9
9
|
import { SessionIndex } from "./manager.js";
|
|
@@ -12,6 +12,7 @@ import { appendCompactionBoundaryIfUnchanged, appendTranscriptEntry, listCompact
|
|
|
12
12
|
import { getSessionConfig, setSessionConfig } from "../storage/sqlite/config-repository.js";
|
|
13
13
|
import "../storage/sqlite/index.js";
|
|
14
14
|
import { resolveEffectiveAgentProfileForSession } from "../config/agent-profile.js";
|
|
15
|
+
import { transcriptRowsToClientHistory } from "./client-history.js";
|
|
15
16
|
import { SessionCompactor } from "../agent/memory/compaction.js";
|
|
16
17
|
import { resolveUserContextSessionAccess } from "../user-context/access-policy.js";
|
|
17
18
|
import { readPostCompactionContext } from "../agent/reply/post-compaction-context.js";
|
|
@@ -19,7 +20,6 @@ import { resolveCompactionPolicy } from "../agent/memory/compaction-policy.js";
|
|
|
19
20
|
import { promoteCompactionLedger } from "../agent/memory/compaction-promotion.js";
|
|
20
21
|
import { SlidingWindow } from "../agent/memory/window.js";
|
|
21
22
|
import { isAppendOnlyLlmTranscriptMessage } from "./transcript-stats.js";
|
|
22
|
-
import { transcriptRowsToClientHistory } from "./client-history.js";
|
|
23
23
|
import { backfillStructuredTurnOutcomes } from "./turn-outcome-projector.js";
|
|
24
24
|
import { computeTranscriptUserRoundDeleteRange } from "./user-round-delete.js";
|
|
25
25
|
//#region src/session/store.ts
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { HostedPublicationSnapshot } from './hosted-session-share.js';
|
|
2
|
+
import { type NoteShareSource } from './note-share-service.js';
|
|
3
|
+
export interface HostedNotePublicationSnapshot extends HostedPublicationSnapshot {
|
|
4
|
+
kind: 'note_document';
|
|
5
|
+
sourceNoteId: string;
|
|
6
|
+
sourceVersion: number;
|
|
7
|
+
title: string;
|
|
8
|
+
attachmentCount: number;
|
|
9
|
+
}
|
|
10
|
+
export declare class HostedNotePublicationBuilder {
|
|
11
|
+
private readonly notes;
|
|
12
|
+
constructor(notes: NoteShareSource);
|
|
13
|
+
build(noteId: string, input: {
|
|
14
|
+
expectedNoteVersion?: number;
|
|
15
|
+
attachmentIds?: string[];
|
|
16
|
+
description?: string;
|
|
17
|
+
}): Promise<HostedNotePublicationSnapshot>;
|
|
18
|
+
}
|
|
19
|
+
export declare class HostedNoteVersionConflictError extends Error {
|
|
20
|
+
readonly currentVersion: number;
|
|
21
|
+
constructor(currentVersion: number);
|
|
22
|
+
}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { collectReferencedAttachmentIds } from "../notes/note-attachment-sync.js";
|
|
2
|
+
import { projectPublicNoteMarkdown } from "./note-share-service.js";
|
|
3
|
+
import { createReadStream } from "node:fs";
|
|
4
|
+
import { createHash } from "node:crypto";
|
|
5
|
+
import { stat } from "node:fs/promises";
|
|
6
|
+
//#region src/share/hosted-note-publication.ts
|
|
7
|
+
const MAX_ATTACHMENTS = 20;
|
|
8
|
+
const MAX_ATTACHMENT_BYTES = 32 * 1024 * 1024;
|
|
9
|
+
const MAX_TOTAL_BYTES = 100 * 1024 * 1024;
|
|
10
|
+
const MAX_MARKDOWN_BYTES = 5 * 1024 * 1024;
|
|
11
|
+
var HostedNotePublicationBuilder = class {
|
|
12
|
+
constructor(notes) {
|
|
13
|
+
this.notes = notes;
|
|
14
|
+
}
|
|
15
|
+
async build(noteId, input) {
|
|
16
|
+
const note = await this.notes.getNote(noteId);
|
|
17
|
+
if (!note) throw new Error("Note not found");
|
|
18
|
+
if (input.expectedNoteVersion !== void 0 && note.updatedAt !== input.expectedNoteVersion) throw new HostedNoteVersionConflictError(note.updatedAt);
|
|
19
|
+
const referenced = collectReferencedAttachmentIds(note);
|
|
20
|
+
const attachments = new Map((note.attachments ?? []).map((attachment) => [attachment.id, attachment]));
|
|
21
|
+
for (const id of referenced) if (!attachments.has(id)) throw new Error(`Referenced attachment is missing: ${id}`);
|
|
22
|
+
const selected = input.attachmentIds === void 0 ? [...referenced] : [...new Set(input.attachmentIds)];
|
|
23
|
+
if (selected.length > MAX_ATTACHMENTS) throw new Error("Note has too many attachments to publish");
|
|
24
|
+
for (const id of selected) if (!referenced.has(id)) throw new Error(`Attachment is not referenced by this Note: ${id}`);
|
|
25
|
+
const selectedSet = new Set(selected);
|
|
26
|
+
const markdown = rewritePublicationAssets(projectPublicNoteMarkdown(note, selectedSet), note, selectedSet);
|
|
27
|
+
if (Buffer.byteLength(markdown, "utf8") > MAX_MARKDOWN_BYTES) throw new Error("Note Markdown exceeds publishing limit");
|
|
28
|
+
const assets = [];
|
|
29
|
+
const manifestAttachments = [];
|
|
30
|
+
let totalBytes = Buffer.byteLength(markdown, "utf8");
|
|
31
|
+
for (const id of selected) {
|
|
32
|
+
const attachment = attachments.get(id);
|
|
33
|
+
if (attachment.size > MAX_ATTACHMENT_BYTES) throw new Error(`Attachment exceeds publishing limit: ${attachment.fileName}`);
|
|
34
|
+
totalBytes += attachment.size;
|
|
35
|
+
if (totalBytes > MAX_TOTAL_BYTES) throw new Error("Note publication exceeds total size limit");
|
|
36
|
+
const resolved = await this.notes.getAttachmentPath(note.id, id);
|
|
37
|
+
if (!resolved) throw new Error(`Attachment is missing: ${attachment.fileName}`);
|
|
38
|
+
const current = await stat(resolved.filePath);
|
|
39
|
+
if (!current.isFile() || current.size !== attachment.size) throw new Error(`Attachment changed or is missing: ${attachment.fileName}`);
|
|
40
|
+
assets.push({
|
|
41
|
+
id,
|
|
42
|
+
path: resolved.filePath,
|
|
43
|
+
size: attachment.size
|
|
44
|
+
});
|
|
45
|
+
manifestAttachments.push({
|
|
46
|
+
id,
|
|
47
|
+
fileName: attachment.fileName,
|
|
48
|
+
mimeType: attachment.mimeType,
|
|
49
|
+
size: attachment.size,
|
|
50
|
+
sha256: await sha256File(resolved.filePath)
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
return {
|
|
54
|
+
kind: "note_document",
|
|
55
|
+
sourceNoteId: note.id,
|
|
56
|
+
sourceVersion: note.updatedAt,
|
|
57
|
+
title: note.title?.trim() || "Untitled Note",
|
|
58
|
+
attachmentCount: assets.length,
|
|
59
|
+
assets,
|
|
60
|
+
manifest: {
|
|
61
|
+
schemaVersion: 1,
|
|
62
|
+
kind: "note_document",
|
|
63
|
+
title: note.title?.trim() || "Untitled Note",
|
|
64
|
+
snapshotAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
65
|
+
...input.description?.trim() ? { description: input.description.trim() } : {},
|
|
66
|
+
markdown,
|
|
67
|
+
attachments: manifestAttachments
|
|
68
|
+
}
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
};
|
|
72
|
+
var HostedNoteVersionConflictError = class extends Error {
|
|
73
|
+
constructor(currentVersion) {
|
|
74
|
+
super("Note changed after the publication preview was reviewed");
|
|
75
|
+
this.currentVersion = currentVersion;
|
|
76
|
+
this.name = "HostedNoteVersionConflictError";
|
|
77
|
+
}
|
|
78
|
+
};
|
|
79
|
+
function rewritePublicationAssets(markdown, note, selected) {
|
|
80
|
+
return markdown.replace(/xopc-attachment:\/\/notes\/([^/\s)]+)\/([^\s)]+)/gi, (match, rawNoteId, rawAttachmentId) => {
|
|
81
|
+
try {
|
|
82
|
+
const noteId = decodeURIComponent(rawNoteId);
|
|
83
|
+
const attachmentId = decodeURIComponent(rawAttachmentId);
|
|
84
|
+
return noteId === note.id && selected.has(attachmentId) ? `xopc-publication-asset://${attachmentId}` : match;
|
|
85
|
+
} catch {
|
|
86
|
+
return match;
|
|
87
|
+
}
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
async function sha256File(filePath) {
|
|
91
|
+
const hash = createHash("sha256");
|
|
92
|
+
for await (const chunk of createReadStream(filePath)) hash.update(chunk);
|
|
93
|
+
return hash.digest("hex");
|
|
94
|
+
}
|
|
95
|
+
//#endregion
|
|
96
|
+
export { HostedNotePublicationBuilder, HostedNoteVersionConflictError };
|
|
@@ -3,6 +3,7 @@ import { type SessionShareMessage, type SessionShareToolActivity } from './sessi
|
|
|
3
3
|
import { type SessionShareSource } from './session-share-service.js';
|
|
4
4
|
export interface HostedSessionShareManifest {
|
|
5
5
|
schemaVersion: 1;
|
|
6
|
+
kind: 'session_document';
|
|
6
7
|
title: string;
|
|
7
8
|
snapshotAt: string;
|
|
8
9
|
description?: string;
|
|
@@ -49,7 +50,17 @@ export interface HostedShareResult {
|
|
|
49
50
|
viewCount: number;
|
|
50
51
|
snapshotRevision: number;
|
|
51
52
|
}
|
|
52
|
-
type
|
|
53
|
+
export type HostedPublicationKind = 'session_document' | 'note_document' | 'static_site';
|
|
54
|
+
export interface HostedPublicationSnapshot {
|
|
55
|
+
kind: HostedPublicationKind;
|
|
56
|
+
manifest: unknown;
|
|
57
|
+
assets: Array<{
|
|
58
|
+
id: string;
|
|
59
|
+
path: string;
|
|
60
|
+
size: number;
|
|
61
|
+
}>;
|
|
62
|
+
}
|
|
63
|
+
export type HostedPublicationSummary = {
|
|
53
64
|
id: string;
|
|
54
65
|
title: string;
|
|
55
66
|
description: string | null;
|
|
@@ -60,8 +71,42 @@ type OwnerShare = {
|
|
|
60
71
|
viewCount: number;
|
|
61
72
|
createdAt: string;
|
|
62
73
|
updatedAt: string;
|
|
74
|
+
kind: HostedPublicationKind;
|
|
75
|
+
deliveryMode: 'hosted_snapshot';
|
|
76
|
+
owner: {
|
|
77
|
+
type: 'user' | 'workspace';
|
|
78
|
+
id: string;
|
|
79
|
+
};
|
|
80
|
+
workspaceId: string;
|
|
81
|
+
createdByPrincipalId: string;
|
|
63
82
|
};
|
|
64
|
-
|
|
83
|
+
type OwnerShare = HostedPublicationSummary;
|
|
84
|
+
export interface HostedPublicationCapabilities {
|
|
85
|
+
protocolVersion: string;
|
|
86
|
+
kinds: string[];
|
|
87
|
+
deliveryModes: string[];
|
|
88
|
+
accessModes: string[];
|
|
89
|
+
upload: {
|
|
90
|
+
direct: boolean;
|
|
91
|
+
multipart: boolean;
|
|
92
|
+
resumable: boolean;
|
|
93
|
+
streaming: boolean;
|
|
94
|
+
};
|
|
95
|
+
security?: {
|
|
96
|
+
contentScanning: boolean;
|
|
97
|
+
quarantineBeforeActivation: boolean;
|
|
98
|
+
};
|
|
99
|
+
lifecycle: {
|
|
100
|
+
revisions: boolean;
|
|
101
|
+
revoke: boolean;
|
|
102
|
+
asynchronousDeletion: boolean;
|
|
103
|
+
};
|
|
104
|
+
publishing: {
|
|
105
|
+
allowed: boolean;
|
|
106
|
+
managedBy: 'platform_admin';
|
|
107
|
+
};
|
|
108
|
+
}
|
|
109
|
+
export declare class HostedPublicationPublisher {
|
|
65
110
|
private readonly credentials;
|
|
66
111
|
private readonly fetchImpl;
|
|
67
112
|
private readonly baseUrl;
|
|
@@ -70,23 +115,54 @@ export declare class HostedSessionSharePublisher {
|
|
|
70
115
|
ttlMs: number;
|
|
71
116
|
maxViews: number | null;
|
|
72
117
|
}): Promise<HostedShareResult>;
|
|
118
|
+
createPublication(snapshot: HostedPublicationSnapshot, lifecycle: {
|
|
119
|
+
ttlMs: number;
|
|
120
|
+
maxViews: number | null;
|
|
121
|
+
}): Promise<HostedShareResult>;
|
|
73
122
|
refresh(shareId: string, expectedRevision: number, publicUrl: string, snapshot: HostedSessionShareSnapshot): Promise<HostedShareResult>;
|
|
74
|
-
|
|
123
|
+
refreshPublication(shareId: string, expectedRevision: number, publicUrl: string, snapshot: HostedPublicationSnapshot): Promise<HostedShareResult>;
|
|
124
|
+
listPublications(): Promise<HostedPublicationSummary[]>;
|
|
125
|
+
capabilities(): Promise<HostedPublicationCapabilities>;
|
|
75
126
|
revoke(shareId: string): Promise<void>;
|
|
127
|
+
revokePublication(shareId: string): Promise<void>;
|
|
128
|
+
listRevisions(shareId: string): Promise<Array<{
|
|
129
|
+
revision: number;
|
|
130
|
+
createdAt: string;
|
|
131
|
+
current: boolean;
|
|
132
|
+
}>>;
|
|
133
|
+
rollbackPublication(shareId: string, expectedRevision: number, targetRevision: number): Promise<HostedPublicationSummary>;
|
|
76
134
|
private uploadAssets;
|
|
77
135
|
private request;
|
|
78
136
|
}
|
|
79
137
|
export declare class HostedShareAuthorizationError extends Error {
|
|
80
138
|
constructor();
|
|
81
139
|
}
|
|
140
|
+
export declare class HostedShareRemoteError extends Error {
|
|
141
|
+
readonly status: number;
|
|
142
|
+
readonly code?: string;
|
|
143
|
+
constructor(message: string, status: number, code?: string);
|
|
144
|
+
}
|
|
145
|
+
export type HostedPublicationSource = {
|
|
146
|
+
kind: 'session' | 'note' | 'static_site';
|
|
147
|
+
id: string;
|
|
148
|
+
version: string;
|
|
149
|
+
};
|
|
82
150
|
export interface HostedShareBinding extends HostedShareResult {
|
|
83
|
-
|
|
84
|
-
|
|
151
|
+
kind: HostedPublicationKind;
|
|
152
|
+
source: HostedPublicationSource;
|
|
153
|
+
revisionSources: Record<string, HostedPublicationSource>;
|
|
154
|
+
workspaceContext?: {
|
|
155
|
+
workspaceRoot?: string;
|
|
156
|
+
sessionKey?: string;
|
|
157
|
+
agentId?: string;
|
|
158
|
+
};
|
|
159
|
+
sessionId?: string;
|
|
160
|
+
cutoffSeq?: number;
|
|
85
161
|
title: string;
|
|
86
162
|
description: string | null;
|
|
87
|
-
messageCount
|
|
163
|
+
messageCount?: number;
|
|
88
164
|
attachmentCount: number;
|
|
89
|
-
includeToolActivities
|
|
165
|
+
includeToolActivities?: boolean;
|
|
90
166
|
attachmentIds: string[];
|
|
91
167
|
createdAt: string;
|
|
92
168
|
updatedAt: string;
|
|
@@ -95,7 +171,10 @@ export interface HostedShareBinding extends HostedShareResult {
|
|
|
95
171
|
export declare class HostedShareBindingStore {
|
|
96
172
|
private readonly state;
|
|
97
173
|
list(sessionId: string): Promise<HostedShareBinding[]>;
|
|
174
|
+
listBySource(kind: HostedPublicationSource['kind'], id: string): Promise<HostedShareBinding[]>;
|
|
175
|
+
listAll(): Promise<HostedShareBinding[]>;
|
|
98
176
|
upsert(binding: HostedShareBinding): Promise<void>;
|
|
177
|
+
markRevoked(id: string): Promise<void>;
|
|
99
178
|
reconcile(remote: OwnerShare[]): Promise<void>;
|
|
100
179
|
}
|
|
101
180
|
export {};
|