@things-factory/ai-assistant 10.1.277 → 10.1.279
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-client/bootstrap.d.ts +4 -4
- package/dist-client/bootstrap.js +4 -8
- package/dist-client/components/ai-model-price-table.d.ts +32 -0
- package/dist-client/components/ai-model-price-table.js +311 -0
- package/dist-client/components/ai-usage-table.d.ts +17 -0
- package/dist-client/components/ai-usage-table.js +151 -0
- package/dist-client/index.d.ts +1 -0
- package/dist-client/index.js +2 -0
- package/dist-client/pages/ai-model-price-page.d.ts +37 -0
- package/dist-client/pages/ai-model-price-page.js +312 -0
- package/dist-client/route.d.ts +1 -1
- package/dist-client/route.js +4 -0
- package/dist-client/settings/ai-agent-setting-let.js +11 -0
- package/dist-client/utils/model-price-model.d.ts +31 -0
- package/dist-client/utils/model-price-model.js +30 -0
- package/dist-client/utils/usage-charts.d.ts +21 -0
- package/dist-client/utils/usage-charts.js +45 -0
- package/dist-client/utils/usage-model.d.ts +44 -0
- package/dist-client/utils/usage-model.js +44 -0
- package/dist-server/service/ai-agent-resolver.d.ts +46 -0
- package/dist-server/service/ai-agent-resolver.js +252 -0
- package/dist-server/service/assistant-mode/mode-categories.js +2 -2
- package/dist-server/service/chat-message/message-doors.d.ts +6 -10
- package/dist-server/service/chat-message/message-doors.js +5 -12
- package/dist-server/service/data-read/read-target.d.ts +3 -4
- package/dist-server/service/people/person-subject.d.ts +9 -5
- package/dist-server/service/people/person-subject.js +14 -19
- package/package.json +25 -10
- package/things-factory.config.js +4 -1
- package/translations/en.json +46 -4
- package/translations/es.json +43 -1
- package/translations/ja.json +43 -1
- package/translations/ko.json +46 -4
- package/translations/ms.json +43 -1
- package/translations/zh.json +43 -1
- package/client/bootstrap.ts +0 -27
- package/client/components/assistant-chat.test.ts +0 -149
- package/client/components/assistant-chat.ts +0 -5599
- package/client/components/assistant-dock.ts +0 -1036
- package/client/components/assistant-invite.ts +0 -138
- package/client/components/assistant-mode.test.ts +0 -119
- package/client/components/assistant-mode.ts +0 -174
- package/client/components/assistant-selection-bar.test.ts +0 -167
- package/client/components/assistant-selection-bar.ts +0 -178
- package/client/components/assistant-session-manager.ts +0 -915
- package/client/components/assistant-session-toolbar.ts +0 -80
- package/client/components/chat-defaults.ts +0 -64
- package/client/components/chat-echo-dedup.test.ts +0 -253
- package/client/components/chat-echo-dedup.ts +0 -190
- package/client/components/chat-input-builder.test.ts +0 -86
- package/client/components/chat-input-builder.ts +0 -133
- package/client/components/chat-proposal-survival.test.ts +0 -73
- package/client/components/entry-review.ts +0 -346
- package/client/components/markdown.test.ts +0 -518
- package/client/components/markdown.ts +0 -508
- package/client/components/mention-popup-helpers.ts +0 -433
- package/client/components/mention-popup.test.ts +0 -588
- package/client/components/mention-popup.ts +0 -261
- package/client/components/panel-aria.test.ts +0 -59
- package/client/components/proposal-outcome-line.ts +0 -74
- package/client/components/proposal-request.test.ts +0 -73
- package/client/components/reply-message.test.ts +0 -15
- package/client/components/reply-message.ts +0 -11
- package/client/components/roster-identity.test.ts +0 -8
- package/client/components/roster-identity.ts +0 -4
- package/client/components/workspace-view.ts +0 -486
- package/client/index.ts +0 -36
- package/client/pages/assistant-workspace-page.ts +0 -317
- package/client/route.ts +0 -9
- package/client/settings/agent-settings-model.ts +0 -164
- package/client/settings/ai-agent-setting-let.ts +0 -667
- package/client/settings/ai-usage-setting-let.ts +0 -240
- package/client/settings/usage-model.ts +0 -46
- package/client/setup-assistant-dock.ts +0 -177
- package/client/tsconfig.json +0 -13
- package/client/utils/addressed-draft.test.ts +0 -31
- package/client/utils/agent-choice.ts +0 -56
- package/client/utils/applied-screens.ts +0 -36
- package/client/utils/assistant-activity.ts +0 -122
- package/client/utils/assistant-ask.test.ts +0 -38
- package/client/utils/assistant-ask.ts +0 -93
- package/client/utils/assistant-capability-read.ts +0 -24
- package/client/utils/assistant-capability.test.ts +0 -17
- package/client/utils/assistant-capability.ts +0 -19
- package/client/utils/assistant-navigation.test.ts +0 -66
- package/client/utils/assistant-navigation.ts +0 -11
- package/client/utils/assistant-proposals.ts +0 -85
- package/client/utils/assistant-request-context.ts +0 -63
- package/client/utils/assistant-selection.test.ts +0 -54
- package/client/utils/assistant-selection.ts +0 -75
- package/client/utils/assistant-session-actions.ts +0 -32
- package/client/utils/assistant-session-admin.ts +0 -239
- package/client/utils/assistant-session-controller.test.ts +0 -75
- package/client/utils/assistant-session-controller.ts +0 -208
- package/client/utils/assistant-session-transport.ts +0 -46
- package/client/utils/assistant-surface.ts +0 -178
- package/client/utils/assistant-typing.test.ts +0 -33
- package/client/utils/assistant-typing.ts +0 -53
- package/client/utils/attachment-policy.ts +0 -106
- package/client/utils/composer-frame.ts +0 -77
- package/client/utils/document-text.ts +0 -332
- package/client/utils/entry-hash.ts +0 -35
- package/client/utils/entry-proposal.ts +0 -215
- package/client/utils/entry-workspace.ts +0 -70
- package/client/utils/invite-proposal-register.ts +0 -31
- package/client/utils/invite-proposal.test.ts +0 -40
- package/client/utils/invite-proposal.ts +0 -54
- package/client/utils/menu-room.ts +0 -33
- package/client/utils/open-page.ts +0 -21
- package/client/utils/pasted-table.ts +0 -145
- package/client/utils/pdf-pages.ts +0 -25
- package/client/utils/spreadsheet-text.ts +0 -125
- package/client/utils/workspace.ts +0 -89
- package/dist-client/bootstrap.js.map +0 -1
- package/dist-client/components/assistant-chat.js.map +0 -1
- package/dist-client/components/assistant-chat.test.d.ts +0 -1
- package/dist-client/components/assistant-chat.test.js +0 -138
- package/dist-client/components/assistant-chat.test.js.map +0 -1
- package/dist-client/components/assistant-dock.js.map +0 -1
- package/dist-client/components/assistant-invite.js.map +0 -1
- package/dist-client/components/assistant-mode.js.map +0 -1
- package/dist-client/components/assistant-mode.test.d.ts +0 -1
- package/dist-client/components/assistant-mode.test.js +0 -100
- package/dist-client/components/assistant-mode.test.js.map +0 -1
- package/dist-client/components/assistant-selection-bar.js.map +0 -1
- package/dist-client/components/assistant-selection-bar.test.d.ts +0 -1
- package/dist-client/components/assistant-selection-bar.test.js +0 -148
- package/dist-client/components/assistant-selection-bar.test.js.map +0 -1
- package/dist-client/components/assistant-session-manager.js.map +0 -1
- package/dist-client/components/assistant-session-toolbar.js.map +0 -1
- package/dist-client/components/chat-defaults.js.map +0 -1
- package/dist-client/components/chat-echo-dedup.js.map +0 -1
- package/dist-client/components/chat-echo-dedup.test.d.ts +0 -1
- package/dist-client/components/chat-echo-dedup.test.js +0 -223
- package/dist-client/components/chat-echo-dedup.test.js.map +0 -1
- package/dist-client/components/chat-input-builder.js.map +0 -1
- package/dist-client/components/chat-input-builder.test.d.ts +0 -1
- package/dist-client/components/chat-input-builder.test.js +0 -70
- package/dist-client/components/chat-input-builder.test.js.map +0 -1
- package/dist-client/components/chat-proposal-survival.test.d.ts +0 -1
- package/dist-client/components/chat-proposal-survival.test.js +0 -61
- package/dist-client/components/chat-proposal-survival.test.js.map +0 -1
- package/dist-client/components/entry-review.js.map +0 -1
- package/dist-client/components/markdown.js.map +0 -1
- package/dist-client/components/markdown.test.d.ts +0 -1
- package/dist-client/components/markdown.test.js +0 -418
- package/dist-client/components/markdown.test.js.map +0 -1
- package/dist-client/components/mention-popup-helpers.js.map +0 -1
- package/dist-client/components/mention-popup.js.map +0 -1
- package/dist-client/components/mention-popup.test.d.ts +0 -1
- package/dist-client/components/mention-popup.test.js +0 -474
- package/dist-client/components/mention-popup.test.js.map +0 -1
- package/dist-client/components/panel-aria.test.d.ts +0 -1
- package/dist-client/components/panel-aria.test.js +0 -53
- package/dist-client/components/panel-aria.test.js.map +0 -1
- package/dist-client/components/proposal-outcome-line.js.map +0 -1
- package/dist-client/components/proposal-request.test.d.ts +0 -1
- package/dist-client/components/proposal-request.test.js +0 -63
- package/dist-client/components/proposal-request.test.js.map +0 -1
- package/dist-client/components/reply-message.js.map +0 -1
- package/dist-client/components/reply-message.test.d.ts +0 -1
- package/dist-client/components/reply-message.test.js +0 -16
- package/dist-client/components/reply-message.test.js.map +0 -1
- package/dist-client/components/roster-identity.js.map +0 -1
- package/dist-client/components/roster-identity.test.d.ts +0 -1
- package/dist-client/components/roster-identity.test.js +0 -9
- package/dist-client/components/roster-identity.test.js.map +0 -1
- package/dist-client/components/workspace-view.js.map +0 -1
- package/dist-client/index.js.map +0 -1
- package/dist-client/pages/assistant-workspace-page.js.map +0 -1
- package/dist-client/route.js.map +0 -1
- package/dist-client/settings/agent-settings-model.js.map +0 -1
- package/dist-client/settings/ai-agent-setting-let.js.map +0 -1
- package/dist-client/settings/ai-usage-setting-let.d.ts +0 -25
- package/dist-client/settings/ai-usage-setting-let.js +0 -258
- package/dist-client/settings/ai-usage-setting-let.js.map +0 -1
- package/dist-client/settings/usage-model.d.ts +0 -32
- package/dist-client/settings/usage-model.js +0 -25
- package/dist-client/settings/usage-model.js.map +0 -1
- package/dist-client/setup-assistant-dock.js.map +0 -1
- package/dist-client/tsconfig.tsbuildinfo +0 -1
- package/dist-client/utils/addressed-draft.test.d.ts +0 -1
- package/dist-client/utils/addressed-draft.test.js +0 -27
- package/dist-client/utils/addressed-draft.test.js.map +0 -1
- package/dist-client/utils/agent-choice.js.map +0 -1
- package/dist-client/utils/applied-screens.js.map +0 -1
- package/dist-client/utils/assistant-activity.js.map +0 -1
- package/dist-client/utils/assistant-ask.js.map +0 -1
- package/dist-client/utils/assistant-ask.test.d.ts +0 -1
- package/dist-client/utils/assistant-ask.test.js +0 -40
- package/dist-client/utils/assistant-ask.test.js.map +0 -1
- package/dist-client/utils/assistant-capability-read.js.map +0 -1
- package/dist-client/utils/assistant-capability.js.map +0 -1
- package/dist-client/utils/assistant-capability.test.d.ts +0 -1
- package/dist-client/utils/assistant-capability.test.js +0 -16
- package/dist-client/utils/assistant-capability.test.js.map +0 -1
- package/dist-client/utils/assistant-navigation.js.map +0 -1
- package/dist-client/utils/assistant-navigation.test.d.ts +0 -1
- package/dist-client/utils/assistant-navigation.test.js +0 -63
- package/dist-client/utils/assistant-navigation.test.js.map +0 -1
- package/dist-client/utils/assistant-proposals.js.map +0 -1
- package/dist-client/utils/assistant-request-context.js.map +0 -1
- package/dist-client/utils/assistant-selection.js.map +0 -1
- package/dist-client/utils/assistant-selection.test.d.ts +0 -1
- package/dist-client/utils/assistant-selection.test.js +0 -46
- package/dist-client/utils/assistant-selection.test.js.map +0 -1
- package/dist-client/utils/assistant-session-actions.js.map +0 -1
- package/dist-client/utils/assistant-session-admin.js.map +0 -1
- package/dist-client/utils/assistant-session-controller.js.map +0 -1
- package/dist-client/utils/assistant-session-controller.test.d.ts +0 -1
- package/dist-client/utils/assistant-session-controller.test.js +0 -56
- package/dist-client/utils/assistant-session-controller.test.js.map +0 -1
- package/dist-client/utils/assistant-session-transport.js.map +0 -1
- package/dist-client/utils/assistant-surface.js.map +0 -1
- package/dist-client/utils/assistant-typing.js.map +0 -1
- package/dist-client/utils/assistant-typing.test.d.ts +0 -1
- package/dist-client/utils/assistant-typing.test.js +0 -30
- package/dist-client/utils/assistant-typing.test.js.map +0 -1
- package/dist-client/utils/attachment-policy.js.map +0 -1
- package/dist-client/utils/composer-frame.js.map +0 -1
- package/dist-client/utils/document-text.js.map +0 -1
- package/dist-client/utils/entry-hash.js.map +0 -1
- package/dist-client/utils/entry-proposal.js.map +0 -1
- package/dist-client/utils/entry-workspace.js.map +0 -1
- package/dist-client/utils/invite-proposal-register.js.map +0 -1
- package/dist-client/utils/invite-proposal.js.map +0 -1
- package/dist-client/utils/invite-proposal.test.d.ts +0 -1
- package/dist-client/utils/invite-proposal.test.js +0 -35
- package/dist-client/utils/invite-proposal.test.js.map +0 -1
- package/dist-client/utils/menu-room.js.map +0 -1
- package/dist-client/utils/open-page.js.map +0 -1
- package/dist-client/utils/pasted-table.js.map +0 -1
- package/dist-client/utils/pdf-pages.js.map +0 -1
- package/dist-client/utils/spreadsheet-text.js.map +0 -1
- package/dist-client/utils/workspace.js.map +0 -1
- package/dist-server/door-declaration-report.js.map +0 -1
- package/dist-server/index.js.map +0 -1
- package/dist-server/role-tasks.js.map +0 -1
- package/dist-server/service/ai-agent-resolver.js.map +0 -1
- package/dist-server/service/assistant-capability-resolver.js.map +0 -1
- package/dist-server/service/assistant-chat-resolver.js.map +0 -1
- package/dist-server/service/assistant-mode/assistant-mode-resolver.js.map +0 -1
- package/dist-server/service/assistant-mode/fallback-subjects.js.map +0 -1
- package/dist-server/service/assistant-mode/index.js.map +0 -1
- package/dist-server/service/assistant-mode/mode-categories.js.map +0 -1
- package/dist-server/service/assistant-mode/record-subject.js.map +0 -1
- package/dist-server/service/assistant-mode/registry.js.map +0 -1
- package/dist-server/service/assistant-mode/resolve.js.map +0 -1
- package/dist-server/service/assistant-mode/screen-rules.js.map +0 -1
- package/dist-server/service/assistant-mode/turn-lines.js.map +0 -1
- package/dist-server/service/assistant-mode/types.js.map +0 -1
- package/dist-server/service/chat-message/carried-turns.js.map +0 -1
- package/dist-server/service/chat-message/chat-message-broadcast.js.map +0 -1
- package/dist-server/service/chat-message/chat-message-publish.js.map +0 -1
- package/dist-server/service/chat-message/chat-message-room.js.map +0 -1
- package/dist-server/service/chat-message/chat-message-subscription.js.map +0 -1
- package/dist-server/service/chat-message/chat-message.js.map +0 -1
- package/dist-server/service/chat-message/chat-typing-subscription.js.map +0 -1
- package/dist-server/service/chat-message/chat-typing.js.map +0 -1
- package/dist-server/service/chat-message/door-access.js.map +0 -1
- package/dist-server/service/chat-message/fold-history.js.map +0 -1
- package/dist-server/service/chat-message/fold-session-history.js.map +0 -1
- package/dist-server/service/chat-message/history-summary.js.map +0 -1
- package/dist-server/service/chat-message/index.js.map +0 -1
- package/dist-server/service/chat-message/llm-history.js.map +0 -1
- package/dist-server/service/chat-message/message-doors.js.map +0 -1
- package/dist-server/service/chat-message/proposal-outcome.js.map +0 -1
- package/dist-server/service/chat-message/reader-gate.js.map +0 -1
- package/dist-server/service/chat-message/room-message.js.map +0 -1
- package/dist-server/service/chat-message/room-turn.js.map +0 -1
- package/dist-server/service/chat-message/used-tools.js.map +0 -1
- package/dist-server/service/chat-session/attachment-policy.js.map +0 -1
- package/dist-server/service/chat-session/attachment-route.js.map +0 -1
- package/dist-server/service/chat-session/attachment-tool-result.js.map +0 -1
- package/dist-server/service/chat-session/attachment-tools.js.map +0 -1
- package/dist-server/service/chat-session/chat-session.js.map +0 -1
- package/dist-server/service/chat-session/index.js.map +0 -1
- package/dist-server/service/chat-session/session-activity-broadcast.js.map +0 -1
- package/dist-server/service/chat-session/session-activity-publish.js.map +0 -1
- package/dist-server/service/chat-session/session-activity-subscription.js.map +0 -1
- package/dist-server/service/chat-session/session-anchor.js.map +0 -1
- package/dist-server/service/chat-session/session-attachments.js.map +0 -1
- package/dist-server/service/chat-session/session-cleanup.js.map +0 -1
- package/dist-server/service/chat-session/session-inbox.js.map +0 -1
- package/dist-server/service/chat-session/session-kind.js.map +0 -1
- package/dist-server/service/chat-session/session-name.js.map +0 -1
- package/dist-server/service/chat-session/session-purge.js.map +0 -1
- package/dist-server/service/chat-session/session-retention.js.map +0 -1
- package/dist-server/service/chat-session/session-visibility.js.map +0 -1
- package/dist-server/service/chat-session/session-write-gate.js.map +0 -1
- package/dist-server/service/chat-session/station-session-guard.js.map +0 -1
- package/dist-server/service/chat-session/turn-attachments.js.map +0 -1
- package/dist-server/service/chat-session-participant/chat-session-participant.js.map +0 -1
- package/dist-server/service/chat-session-participant/index.js.map +0 -1
- package/dist-server/service/chat-session-participant/invite-notification.js.map +0 -1
- package/dist-server/service/chat-session-participant/mention-invite.js.map +0 -1
- package/dist-server/service/chat-session-participant/participant-lookup-roles.js.map +0 -1
- package/dist-server/service/chat-session-participant/participant-lookup.js.map +0 -1
- package/dist-server/service/chat-session-participant/presence.js.map +0 -1
- package/dist-server/service/chat-session-participant/read-roster.js.map +0 -1
- package/dist-server/service/chat-session-resolver.js.map +0 -1
- package/dist-server/service/data-entry/entry-apply.js.map +0 -1
- package/dist-server/service/data-entry/entry-hash.js.map +0 -1
- package/dist-server/service/data-entry/entry-refusal.js.map +0 -1
- package/dist-server/service/data-entry/entry-resolver.js.map +0 -1
- package/dist-server/service/data-entry/entry-screen.js.map +0 -1
- package/dist-server/service/data-entry/entry-sources.js.map +0 -1
- package/dist-server/service/data-entry/entry-target.js.map +0 -1
- package/dist-server/service/data-entry/entry-tools.js.map +0 -1
- package/dist-server/service/data-entry/entry-update.js.map +0 -1
- package/dist-server/service/data-read/list-read.js.map +0 -1
- package/dist-server/service/data-read/read-target.js.map +0 -1
- package/dist-server/service/data-read/read-tools.js.map +0 -1
- package/dist-server/service/grounding-sources.js.map +0 -1
- package/dist-server/service/help-documents/help-keys.js.map +0 -1
- package/dist-server/service/help-documents/help-tools.js.map +0 -1
- package/dist-server/service/index.js.map +0 -1
- package/dist-server/service/people/index.js.map +0 -1
- package/dist-server/service/people/invite-tools.js.map +0 -1
- package/dist-server/service/people/people-keys.js.map +0 -1
- package/dist-server/service/people/people-read.js.map +0 -1
- package/dist-server/service/people/person-subject.js.map +0 -1
- package/dist-server/service/request-translator.js.map +0 -1
- package/dist-server/service/testing/conversation-script.js.map +0 -1
- package/dist-server/service/testing/mode-conformance.js.map +0 -1
- package/dist-server/service/tool-access.js.map +0 -1
- package/dist-server/service/types.js.map +0 -1
- package/dist-server/service/unattended-run/assistant-run.js.map +0 -1
- package/dist-server/service/unattended-run/index.js.map +0 -1
- package/dist-server/service/unattended-run/limits.js.map +0 -1
- package/dist-server/service/unattended-run/run-as.js.map +0 -1
- package/dist-server/service/unattended-run/run-budget.js.map +0 -1
- package/dist-server/service/unattended-run/run-ledger.js.map +0 -1
- package/dist-server/service/unattended-run/run-outcome.js.map +0 -1
- package/dist-server/service/unattended-run/run-store.js.map +0 -1
- package/dist-server/service/unattended-run/run-unattended.js.map +0 -1
- package/dist-server/service/unattended-run/unattended-prompt.js.map +0 -1
- package/dist-server/service/workspace/workspace-blocks.js.map +0 -1
- package/dist-server/service/workspace/workspace-tools.js.map +0 -1
- package/dist-server/tool-registry-boot-report.js.map +0 -1
- package/dist-server/tsconfig.tsbuildinfo +0 -1
- package/docs/session-controller.md +0 -52
- package/server/door-declaration-report.test.ts +0 -53
- package/server/door-declaration-report.ts +0 -61
- package/server/explicit-graphql-types.test.ts +0 -56
- package/server/index.ts +0 -36
- package/server/role-tasks.ts +0 -14
- package/server/service/ai-agent-resolver.ts +0 -330
- package/server/service/assistant-capability-resolver.ts +0 -66
- package/server/service/assistant-chat-resolver.ts +0 -640
- package/server/service/assistant-mode/assistant-mode-resolver.ts +0 -101
- package/server/service/assistant-mode/conversation-category.test.ts +0 -48
- package/server/service/assistant-mode/fallback-subjects.ts +0 -36
- package/server/service/assistant-mode/index.ts +0 -22
- package/server/service/assistant-mode/mode-categories.ts +0 -178
- package/server/service/assistant-mode/mode-front.test.ts +0 -181
- package/server/service/assistant-mode/one-conversation-per-subject.test.ts +0 -37
- package/server/service/assistant-mode/open-subject-door.test.ts +0 -52
- package/server/service/assistant-mode/record-subject.test.ts +0 -41
- package/server/service/assistant-mode/record-subject.ts +0 -44
- package/server/service/assistant-mode/registry.test.ts +0 -171
- package/server/service/assistant-mode/registry.ts +0 -139
- package/server/service/assistant-mode/resolve.test.ts +0 -129
- package/server/service/assistant-mode/resolve.ts +0 -113
- package/server/service/assistant-mode/screen-rules.test.ts +0 -99
- package/server/service/assistant-mode/screen-rules.ts +0 -103
- package/server/service/assistant-mode/turn-lines.ts +0 -43
- package/server/service/assistant-mode/types.ts +0 -138
- package/server/service/chat-message/carried-turns.test.ts +0 -80
- package/server/service/chat-message/carried-turns.ts +0 -112
- package/server/service/chat-message/chat-message-broadcast.integration.test.ts +0 -73
- package/server/service/chat-message/chat-message-broadcast.test.ts +0 -40
- package/server/service/chat-message/chat-message-broadcast.ts +0 -70
- package/server/service/chat-message/chat-message-publish.ts +0 -22
- package/server/service/chat-message/chat-message-room.test.ts +0 -145
- package/server/service/chat-message/chat-message-room.ts +0 -50
- package/server/service/chat-message/chat-message-subscription.ts +0 -77
- package/server/service/chat-message/chat-message.ts +0 -289
- package/server/service/chat-message/chat-typing-subscription.ts +0 -52
- package/server/service/chat-message/chat-typing.test.ts +0 -45
- package/server/service/chat-message/chat-typing.ts +0 -48
- package/server/service/chat-message/door-access.test.ts +0 -72
- package/server/service/chat-message/door-access.ts +0 -65
- package/server/service/chat-message/fold-history-window.test.ts +0 -184
- package/server/service/chat-message/fold-history.test.ts +0 -98
- package/server/service/chat-message/fold-history.ts +0 -77
- package/server/service/chat-message/fold-session-history.test.ts +0 -116
- package/server/service/chat-message/fold-session-history.ts +0 -115
- package/server/service/chat-message/history-summary.test.ts +0 -127
- package/server/service/chat-message/history-summary.ts +0 -100
- package/server/service/chat-message/index.ts +0 -13
- package/server/service/chat-message/llm-history.test.ts +0 -245
- package/server/service/chat-message/llm-history.ts +0 -182
- package/server/service/chat-message/message-doors.test.ts +0 -124
- package/server/service/chat-message/message-doors.ts +0 -137
- package/server/service/chat-message/proposal-outcome.test.ts +0 -111
- package/server/service/chat-message/proposal-outcome.ts +0 -99
- package/server/service/chat-message/reader-gate.ts +0 -44
- package/server/service/chat-message/room-message.test.ts +0 -21
- package/server/service/chat-message/room-message.ts +0 -22
- package/server/service/chat-message/room-turn.ts +0 -42
- package/server/service/chat-message/used-tools.test.ts +0 -19
- package/server/service/chat-message/used-tools.ts +0 -25
- package/server/service/chat-session/attachment-policy.test.ts +0 -42
- package/server/service/chat-session/attachment-policy.ts +0 -91
- package/server/service/chat-session/attachment-route.ts +0 -45
- package/server/service/chat-session/attachment-tool-result.test.ts +0 -63
- package/server/service/chat-session/attachment-tool-result.ts +0 -37
- package/server/service/chat-session/attachment-tools.ts +0 -66
- package/server/service/chat-session/chat-session.ts +0 -244
- package/server/service/chat-session/group-room.test.ts +0 -233
- package/server/service/chat-session/index.ts +0 -5
- package/server/service/chat-session/session-activity-broadcast.ts +0 -77
- package/server/service/chat-session/session-activity-publish.ts +0 -49
- package/server/service/chat-session/session-activity-receivers.test.ts +0 -26
- package/server/service/chat-session/session-activity-subscription.ts +0 -66
- package/server/service/chat-session/session-anchor.ts +0 -142
- package/server/service/chat-session/session-attachments.ts +0 -90
- package/server/service/chat-session/session-cleanup.test.ts +0 -83
- package/server/service/chat-session/session-cleanup.ts +0 -69
- package/server/service/chat-session/session-inbox.test.ts +0 -273
- package/server/service/chat-session/session-inbox.ts +0 -240
- package/server/service/chat-session/session-kind.test.ts +0 -24
- package/server/service/chat-session/session-kind.ts +0 -32
- package/server/service/chat-session/session-name.ts +0 -32
- package/server/service/chat-session/session-purge.test.ts +0 -24
- package/server/service/chat-session/session-purge.ts +0 -117
- package/server/service/chat-session/session-retention.ts +0 -17
- package/server/service/chat-session/session-visibility.test.ts +0 -130
- package/server/service/chat-session/session-visibility.ts +0 -68
- package/server/service/chat-session/session-write-gate.test.ts +0 -59
- package/server/service/chat-session/session-write-gate.ts +0 -31
- package/server/service/chat-session/station-session-guard.ts +0 -25
- package/server/service/chat-session/turn-attachments.test.ts +0 -106
- package/server/service/chat-session/turn-attachments.ts +0 -45
- package/server/service/chat-session-participant/chat-session-participant.ts +0 -135
- package/server/service/chat-session-participant/index.ts +0 -8
- package/server/service/chat-session-participant/invite-notification.test.ts +0 -80
- package/server/service/chat-session-participant/invite-notification.ts +0 -118
- package/server/service/chat-session-participant/mention-invite.test.ts +0 -173
- package/server/service/chat-session-participant/mention-invite.ts +0 -180
- package/server/service/chat-session-participant/participant-lookup-roles.ts +0 -6
- package/server/service/chat-session-participant/participant-lookup.ts +0 -22
- package/server/service/chat-session-participant/presence.test.ts +0 -39
- package/server/service/chat-session-participant/presence.ts +0 -21
- package/server/service/chat-session-participant/read-roster.test.ts +0 -27
- package/server/service/chat-session-participant/read-roster.ts +0 -17
- package/server/service/chat-session-resolver.ts +0 -1455
- package/server/service/data-entry/data-entry-update.test.ts +0 -378
- package/server/service/data-entry/data-entry.test.ts +0 -494
- package/server/service/data-entry/entry-apply.ts +0 -247
- package/server/service/data-entry/entry-hash.ts +0 -35
- package/server/service/data-entry/entry-refusal.test.ts +0 -73
- package/server/service/data-entry/entry-refusal.ts +0 -20
- package/server/service/data-entry/entry-resolver.ts +0 -74
- package/server/service/data-entry/entry-screen.ts +0 -14
- package/server/service/data-entry/entry-sources.ts +0 -39
- package/server/service/data-entry/entry-target.ts +0 -774
- package/server/service/data-entry/entry-tools.ts +0 -282
- package/server/service/data-entry/entry-update.ts +0 -238
- package/server/service/data-read/data-read.test.ts +0 -395
- package/server/service/data-read/detail-lists.test.ts +0 -61
- package/server/service/data-read/list-missing.test.ts +0 -49
- package/server/service/data-read/list-read.ts +0 -146
- package/server/service/data-read/list-status.test.ts +0 -46
- package/server/service/data-read/read-target.ts +0 -510
- package/server/service/data-read/read-tools.ts +0 -334
- package/server/service/data-read/read-words.test.ts +0 -99
- package/server/service/data-read/record-keys.test.ts +0 -42
- package/server/service/grounding-sources.test.ts +0 -55
- package/server/service/grounding-sources.ts +0 -46
- package/server/service/help-documents/help-keys.ts +0 -2
- package/server/service/help-documents/help-tools.test.ts +0 -40
- package/server/service/help-documents/help-tools.ts +0 -88
- package/server/service/index.ts +0 -99
- package/server/service/people/index.ts +0 -15
- package/server/service/people/invite-tools.ts +0 -159
- package/server/service/people/invite.test.ts +0 -159
- package/server/service/people/people-keys.ts +0 -16
- package/server/service/people/people-read.test.ts +0 -82
- package/server/service/people/people-read.ts +0 -56
- package/server/service/people/person-subject.test.ts +0 -163
- package/server/service/people/person-subject.ts +0 -88
- package/server/service/request-translator.test.ts +0 -45
- package/server/service/request-translator.ts +0 -33
- package/server/service/session-anchor.test.ts +0 -198
- package/server/service/station-session-guard.test.ts +0 -31
- package/server/service/testing/conversation-scenario.test.ts +0 -164
- package/server/service/testing/conversation-script.test.ts +0 -133
- package/server/service/testing/conversation-script.ts +0 -296
- package/server/service/testing/mode-conformance.test.ts +0 -61
- package/server/service/testing/mode-conformance.ts +0 -165
- package/server/service/tool-access.test.ts +0 -96
- package/server/service/tool-access.ts +0 -36
- package/server/service/types.ts +0 -15
- package/server/service/unattended-run/assistant-run.ts +0 -199
- package/server/service/unattended-run/index.ts +0 -10
- package/server/service/unattended-run/limits.ts +0 -24
- package/server/service/unattended-run/run-as.ts +0 -38
- package/server/service/unattended-run/run-budget.ts +0 -58
- package/server/service/unattended-run/run-ledger.ts +0 -31
- package/server/service/unattended-run/run-outcome.ts +0 -43
- package/server/service/unattended-run/run-store-race.pg.test.ts +0 -83
- package/server/service/unattended-run/run-store.ts +0 -162
- package/server/service/unattended-run/run-unattended.test.ts +0 -478
- package/server/service/unattended-run/run-unattended.ts +0 -248
- package/server/service/unattended-run/unattended-prompt.ts +0 -24
- package/server/service/workspace/workspace-blocks.ts +0 -134
- package/server/service/workspace/workspace-tools.ts +0 -108
- package/server/service/workspace/workspace.test.ts +0 -74
- package/server/tool-registry-boot-report.test.ts +0 -41
- package/server/tool-registry-boot-report.ts +0 -63
- package/test/ai-agent-settings.test.ts +0 -123
- package/test/applied-screens.test.ts +0 -65
- package/test/assistant-chat-call-sites.test.ts +0 -92
- package/test/assistant-dock.test.ts +0 -294
- package/test/assistant-request-context.test.ts +0 -72
- package/test/assistant-session-controller.test.ts +0 -87
- package/test/assistant-session-manager.test.ts +0 -186
- package/test/assistant-session-toolbar.test.ts +0 -43
- package/test/attachment-one-rule.test.ts +0 -46
- package/test/attachment-policy-agree.test.ts +0 -38
- package/test/composer-frame.test.ts +0 -173
- package/test/document-text.test.ts +0 -175
- package/test/entry-card-styles.test.ts +0 -18
- package/test/entry-proposal.test.ts +0 -186
- package/test/entry-workspace.test.ts +0 -89
- package/test/menu-room.test.ts +0 -33
- package/test/open-doors.test.ts +0 -164
- package/test/open-page.test.ts +0 -31
- package/test/pasted-table.test.ts +0 -147
- package/test/refusals-in-korean.test.ts +0 -80
- package/test/session-discovery.test.ts +0 -43
- package/test/spreadsheet-text.test.ts +0 -92
- package/test/translations.test.ts +0 -80
- package/test/workspace.test.ts +0 -54
- package/tsconfig.json +0 -9
|
@@ -0,0 +1,312 @@
|
|
|
1
|
+
import { __decorate, __metadata } from "tslib";
|
|
2
|
+
/*
|
|
3
|
+
* AI 모델 단가 - the models' prices first, then the domain's AI usage counted at them, and for the domain's administrator
|
|
4
|
+
* each person's (ADR-0061 decision 6 amendment 1-7). ai-assistant owns the page; an application decides which menu shows
|
|
5
|
+
* it. One's own usage is the application's page of encouragement (Office 「나의 AI」, amendment 1-9).
|
|
6
|
+
*/
|
|
7
|
+
import '@operato/input/ox-input-select-buttons.js';
|
|
8
|
+
import '../components/ai-usage-table.js';
|
|
9
|
+
import '../components/ai-model-price-table.js';
|
|
10
|
+
import '@operato/chart/ox-report-charts.js';
|
|
11
|
+
import gql from 'graphql-tag';
|
|
12
|
+
import { css, html, nothing } from 'lit';
|
|
13
|
+
import { customElement, state } from 'lit/decorators.js';
|
|
14
|
+
import { QueryController } from '@operato/graphql';
|
|
15
|
+
import { i18next, localize } from '@operato/i18n';
|
|
16
|
+
import { PageView } from '@operato/shell';
|
|
17
|
+
import { DocumentPageStyles, FormFieldStyles, ScrollbarStyles } from '@operato/styles';
|
|
18
|
+
import { hasPrivilege } from '@things-factory/auth-base/dist-client/index.js';
|
|
19
|
+
import { chartUsd, periodRange } from '../utils/usage-model.js';
|
|
20
|
+
import { lastMonths, monthlyByAgent, monthsStart, peopleBars } from '../utils/usage-charts.js';
|
|
21
|
+
const t = (key, defaultValue, options = {}) => String(i18next.t(`ai-assistant.usage.${key}`, { ...options, defaultValue }));
|
|
22
|
+
const ROW = `
|
|
23
|
+
bucket
|
|
24
|
+
agentId
|
|
25
|
+
agentName
|
|
26
|
+
provider
|
|
27
|
+
model
|
|
28
|
+
domainId
|
|
29
|
+
domainName
|
|
30
|
+
userId
|
|
31
|
+
userName
|
|
32
|
+
calls
|
|
33
|
+
inputTokens
|
|
34
|
+
outputTokens
|
|
35
|
+
failures
|
|
36
|
+
cost
|
|
37
|
+
`;
|
|
38
|
+
const OVERVIEW_QUERY = gql `
|
|
39
|
+
query AiUsageOverview($from: DateTimeISO!, $to: DateTimeISO!, $bucket: String!) {
|
|
40
|
+
aiUsageOverview(from: $from, to: $to, bucket: $bucket) {
|
|
41
|
+
mine { ${ROW} }
|
|
42
|
+
domain { ${ROW} }
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
`;
|
|
46
|
+
const PEOPLE_QUERY = gql `
|
|
47
|
+
query AiUsageSummary($from: DateTimeISO!, $to: DateTimeISO!, $bucket: String!, $includeDescendants: Boolean) {
|
|
48
|
+
aiUsageSummary(from: $from, to: $to, bucket: $bucket, includeDescendants: $includeDescendants) { ${ROW} }
|
|
49
|
+
}
|
|
50
|
+
`;
|
|
51
|
+
const MONTHS_QUERY = gql `
|
|
52
|
+
query AiUsageMonths($from: DateTimeISO!, $to: DateTimeISO!) {
|
|
53
|
+
aiUsageOverview(from: $from, to: $to, bucket: "month") {
|
|
54
|
+
domain { ${ROW} }
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
`;
|
|
58
|
+
const PEOPLE_MONTH_QUERY = gql `
|
|
59
|
+
query AiUsagePeopleThisMonth($from: DateTimeISO!, $to: DateTimeISO!) {
|
|
60
|
+
aiUsageSummary(from: $from, to: $to, bucket: "month") { ${ROW} }
|
|
61
|
+
}
|
|
62
|
+
`;
|
|
63
|
+
/* What the domain's settings ask - the per-person usage and reading the prices again are behind it. */
|
|
64
|
+
const SETTING_QUERY = { privilege: 'query', category: 'setting', domainOwnerGranted: true };
|
|
65
|
+
const SETTING_MUTATION = { privilege: 'mutation', category: 'setting', domainOwnerGranted: true };
|
|
66
|
+
let AiModelPricePage = class AiModelPricePage extends localize(i18next)(PageView) {
|
|
67
|
+
constructor() {
|
|
68
|
+
super(...arguments);
|
|
69
|
+
this.period = 'year';
|
|
70
|
+
this.bucket = 'month';
|
|
71
|
+
/* Fixed when the period is chosen, so the variables stay the same until the next choice. */
|
|
72
|
+
this.range = periodRange(this.period, new Date());
|
|
73
|
+
this.seesPeople = false;
|
|
74
|
+
this.refreshable = false;
|
|
75
|
+
this.includeDescendants = false;
|
|
76
|
+
this.agentFilter = '';
|
|
77
|
+
this.measure = 'cost';
|
|
78
|
+
/* The charts' own span - the last twelve months and this month - fixed when the page opens. */
|
|
79
|
+
this.now = new Date();
|
|
80
|
+
this.chartsTo = periodRange('today', this.now).to;
|
|
81
|
+
this.userFilter = '';
|
|
82
|
+
this.overview = new QueryController(this, OVERVIEW_QUERY, {
|
|
83
|
+
variables: () => ({ ...this.range, bucket: this.bucket }),
|
|
84
|
+
keepPrevious: true
|
|
85
|
+
});
|
|
86
|
+
/* Read only for someone who may see the domain's settings; the door asks it again. */
|
|
87
|
+
this.people = new QueryController(this, PEOPLE_QUERY, {
|
|
88
|
+
variables: () => (this.seesPeople ? { ...this.range, bucket: this.bucket, includeDescendants: this.includeDescendants } : undefined),
|
|
89
|
+
keepPrevious: true
|
|
90
|
+
});
|
|
91
|
+
this.months = new QueryController(this, MONTHS_QUERY, {
|
|
92
|
+
variables: () => ({ from: monthsStart(this.now), to: this.chartsTo })
|
|
93
|
+
});
|
|
94
|
+
this.peopleThisMonth = new QueryController(this, PEOPLE_MONTH_QUERY, {
|
|
95
|
+
variables: () => (this.seesPeople ? { from: new Date(this.now.getFullYear(), this.now.getMonth(), 1), to: this.chartsTo } : undefined)
|
|
96
|
+
});
|
|
97
|
+
this.agentName = (row) => row.agentName ?? t('deleted-agent', '(deleted agent)');
|
|
98
|
+
}
|
|
99
|
+
static { this.styles = [
|
|
100
|
+
DocumentPageStyles,
|
|
101
|
+
FormFieldStyles,
|
|
102
|
+
ScrollbarStyles,
|
|
103
|
+
css `
|
|
104
|
+
:host {
|
|
105
|
+
display: block;
|
|
106
|
+
overflow: auto;
|
|
107
|
+
}
|
|
108
|
+
.filters {
|
|
109
|
+
display: flex;
|
|
110
|
+
flex-wrap: wrap;
|
|
111
|
+
align-items: center;
|
|
112
|
+
gap: 8px 12px;
|
|
113
|
+
font-size: 12px;
|
|
114
|
+
}
|
|
115
|
+
.filters select {
|
|
116
|
+
height: var(--form-element-height-small, 26px);
|
|
117
|
+
font-size: 12px;
|
|
118
|
+
}
|
|
119
|
+
.filters label {
|
|
120
|
+
display: inline-flex;
|
|
121
|
+
align-items: center;
|
|
122
|
+
gap: 4px;
|
|
123
|
+
}
|
|
124
|
+
.failed {
|
|
125
|
+
font-size: 12px;
|
|
126
|
+
color: var(--md-sys-color-error);
|
|
127
|
+
}
|
|
128
|
+
.loading {
|
|
129
|
+
font-size: 12px;
|
|
130
|
+
color: var(--md-sys-color-on-surface-variant);
|
|
131
|
+
}
|
|
132
|
+
`
|
|
133
|
+
]; }
|
|
134
|
+
get context() {
|
|
135
|
+
return { title: String(i18next.t('ai-assistant.price.title', { defaultValue: 'AI model prices' })), frame: 'document' };
|
|
136
|
+
}
|
|
137
|
+
async connectedCallback() {
|
|
138
|
+
super.connectedCallback();
|
|
139
|
+
const [seesPeople, refreshable] = await Promise.all([hasPrivilege(SETTING_QUERY), hasPrivilege(SETTING_MUTATION)]);
|
|
140
|
+
this.seesPeople = !!seesPeople;
|
|
141
|
+
this.refreshable = !!refreshable;
|
|
142
|
+
}
|
|
143
|
+
render() {
|
|
144
|
+
const overview = this.overview.data?.aiUsageOverview;
|
|
145
|
+
const failed = messageOf(this.overview.error);
|
|
146
|
+
return html `
|
|
147
|
+
<div class="page">
|
|
148
|
+
<section class="page-section">
|
|
149
|
+
<header class="page-section-header"><h3>${t('prices', 'Model prices')}</h3></header>
|
|
150
|
+
<ai-model-price-table ?refreshable=${this.refreshable}></ai-model-price-table>
|
|
151
|
+
<p class="page-section-note">${t('cost-note', 'Costs are reference values calculated from recorded token usage and current registered prices, and may differ from actual charges. Non-token costs, such as audio transcription, are not included.')}</p>
|
|
152
|
+
</section>
|
|
153
|
+
|
|
154
|
+
<section class="page-section">
|
|
155
|
+
<header class="page-section-header">
|
|
156
|
+
<h3>${t('monthly', 'Monthly use')}</h3>
|
|
157
|
+
<div class="page-section-actions">
|
|
158
|
+
<ox-input-select-buttons
|
|
159
|
+
.value=${this.measure}
|
|
160
|
+
.options=${[
|
|
161
|
+
{ display: t('measure-cost', 'Cost'), value: 'cost' },
|
|
162
|
+
{ display: t('measure-calls', 'Calls'), value: 'calls' }
|
|
163
|
+
]}
|
|
164
|
+
@change=${(e) => e.detail && (this.measure = e.detail)}></ox-input-select-buttons>
|
|
165
|
+
</div>
|
|
166
|
+
</header>
|
|
167
|
+
<p class="page-section-note">${t('monthly-caption', 'Last 12 months, by agent')}</p>
|
|
168
|
+
${this.renderMonthly()}
|
|
169
|
+
</section>
|
|
170
|
+
|
|
171
|
+
<section class="page-section">
|
|
172
|
+
<header class="page-section-header">
|
|
173
|
+
<h3>${t('domain', 'Whole domain')}</h3>
|
|
174
|
+
<div class="page-section-actions filters">${this.renderPeriod()}</div>
|
|
175
|
+
</header>
|
|
176
|
+
<p class="page-section-note">${t('domain-note', 'Everyone\'s AI calls in this domain, by agent and model.')}</p>
|
|
177
|
+
${failed ? html `<div class="failed">${t('load-failed', 'Could not read the usage.')} ${failed}</div>` : nothing}
|
|
178
|
+
<ai-usage-table .rows=${overview?.domain}></ai-usage-table>
|
|
179
|
+
</section>
|
|
180
|
+
|
|
181
|
+
${this.seesPeople ? this.renderPeople() : nothing}
|
|
182
|
+
</div>
|
|
183
|
+
`;
|
|
184
|
+
}
|
|
185
|
+
/* The numbers the charts write: USD without trailing zeros, or whole calls. */
|
|
186
|
+
get formatMeasure() {
|
|
187
|
+
return this.measure === 'cost' ? chartUsd : (value) => Math.round(value).toLocaleString();
|
|
188
|
+
}
|
|
189
|
+
/* The last twelve months as columns, one series per agent (@operato/chart ox-column-chart). */
|
|
190
|
+
renderMonthly() {
|
|
191
|
+
const rows = this.months.data?.aiUsageOverview?.domain;
|
|
192
|
+
if (!rows)
|
|
193
|
+
return html `<div class="loading">${t('loading', 'Reading…')}</div>`;
|
|
194
|
+
const months = lastMonths(this.now);
|
|
195
|
+
const series = monthlyByAgent(rows, months, this.measure, this.agentName);
|
|
196
|
+
if (!series.length)
|
|
197
|
+
return html `<div class="loading">${t('empty', 'No AI was used in this period.')}</div>`;
|
|
198
|
+
return html `<ox-column-chart
|
|
199
|
+
stacked
|
|
200
|
+
.labels=${months.map(month => t('month', '{month}', { month: Number(month.slice(5)) }))}
|
|
201
|
+
.series=${series}
|
|
202
|
+
.format=${this.formatMeasure}></ox-column-chart>`;
|
|
203
|
+
}
|
|
204
|
+
/* Each person's use this month, the largest first, as a bar list (@operato/chart ox-bar-list). */
|
|
205
|
+
renderPeopleThisMonth() {
|
|
206
|
+
const rows = this.peopleThisMonth.data?.aiUsageSummary;
|
|
207
|
+
if (!rows)
|
|
208
|
+
return html `<div class="loading">${t('loading', 'Reading…')}</div>`;
|
|
209
|
+
const bars = peopleBars(rows, this.measure, this.agentName);
|
|
210
|
+
if (!bars.length)
|
|
211
|
+
return html `<div class="loading">${t('empty', 'No AI was used in this period.')}</div>`;
|
|
212
|
+
return html `<ox-bar-list .items=${bars} .format=${this.formatMeasure}></ox-bar-list>`;
|
|
213
|
+
}
|
|
214
|
+
renderPeriod() {
|
|
215
|
+
return html `
|
|
216
|
+
<ox-input-select-buttons
|
|
217
|
+
.value=${this.period}
|
|
218
|
+
.options=${[
|
|
219
|
+
{ display: t('today', 'Today'), value: 'today' },
|
|
220
|
+
{ display: t('7d', '7 days'), value: '7d' },
|
|
221
|
+
{ display: t('30d', '30 days'), value: '30d' },
|
|
222
|
+
{ display: t('year', 'This year'), value: 'year' }
|
|
223
|
+
]}
|
|
224
|
+
@change=${(e) => e.detail && ((this.period = e.detail), (this.range = periodRange(e.detail, new Date())))}></ox-input-select-buttons>
|
|
225
|
+
<ox-input-select-buttons
|
|
226
|
+
.value=${this.bucket}
|
|
227
|
+
.options=${[
|
|
228
|
+
{ display: t('by-hour', 'Hour'), value: 'hour' },
|
|
229
|
+
{ display: t('by-day', 'Day'), value: 'day' },
|
|
230
|
+
{ display: t('by-month', 'Month'), value: 'month' }
|
|
231
|
+
]}
|
|
232
|
+
@change=${(e) => e.detail && (this.bucket = e.detail)}></ox-input-select-buttons>
|
|
233
|
+
`;
|
|
234
|
+
}
|
|
235
|
+
renderPeople() {
|
|
236
|
+
const all = this.people.data?.aiUsageSummary;
|
|
237
|
+
const failed = messageOf(this.people.error);
|
|
238
|
+
const agents = [...new Map((all ?? []).filter(one => one.agentId).map(one => [one.agentId, one.agentName ?? one.model])).entries()];
|
|
239
|
+
const users = [...new Map((all ?? []).filter(one => one.userId).map(one => [one.userId, one.userName ?? one.userId])).entries()];
|
|
240
|
+
const rows = all?.filter(one => (!this.agentFilter || one.agentId === this.agentFilter) && (!this.userFilter || one.userId === this.userFilter));
|
|
241
|
+
return html `
|
|
242
|
+
<section class="page-section">
|
|
243
|
+
<header class="page-section-header"><h3>${t('people', 'By person')}</h3></header>
|
|
244
|
+
<p class="page-section-note">${t('people-caption', 'This month, by person and agent')}</p>
|
|
245
|
+
${this.renderPeopleThisMonth()}
|
|
246
|
+
<div class="filters">
|
|
247
|
+
<select aria-label=${t('agent', 'Agent')} @change=${(e) => (this.agentFilter = e.target.value)}>
|
|
248
|
+
<option value="">${t('all-agents', 'All agents')}</option>
|
|
249
|
+
${agents.map(([id, name]) => html `<option value=${id} ?selected=${id === this.agentFilter}>${name}</option>`)}
|
|
250
|
+
</select>
|
|
251
|
+
<select aria-label=${t('person', 'Person')} @change=${(e) => (this.userFilter = e.target.value)}>
|
|
252
|
+
<option value="">${t('all-people', 'Everyone')}</option>
|
|
253
|
+
${users.map(([id, name]) => html `<option value=${id} ?selected=${id === this.userFilter}>${name}</option>`)}
|
|
254
|
+
</select>
|
|
255
|
+
<label>
|
|
256
|
+
<input
|
|
257
|
+
type="checkbox"
|
|
258
|
+
.checked=${this.includeDescendants}
|
|
259
|
+
@change=${(e) => (this.includeDescendants = e.target.checked)} />
|
|
260
|
+
${t('include-below', 'Domains below')}
|
|
261
|
+
</label>
|
|
262
|
+
</div>
|
|
263
|
+
${failed ? html `<div class="failed">${t('load-failed', 'Could not read the usage.')} ${failed}</div>` : nothing}
|
|
264
|
+
<ai-usage-table people .rows=${rows}></ai-usage-table>
|
|
265
|
+
</section>
|
|
266
|
+
`;
|
|
267
|
+
}
|
|
268
|
+
};
|
|
269
|
+
__decorate([
|
|
270
|
+
state(),
|
|
271
|
+
__metadata("design:type", String)
|
|
272
|
+
], AiModelPricePage.prototype, "period", void 0);
|
|
273
|
+
__decorate([
|
|
274
|
+
state(),
|
|
275
|
+
__metadata("design:type", String)
|
|
276
|
+
], AiModelPricePage.prototype, "bucket", void 0);
|
|
277
|
+
__decorate([
|
|
278
|
+
state(),
|
|
279
|
+
__metadata("design:type", Object)
|
|
280
|
+
], AiModelPricePage.prototype, "range", void 0);
|
|
281
|
+
__decorate([
|
|
282
|
+
state(),
|
|
283
|
+
__metadata("design:type", Object)
|
|
284
|
+
], AiModelPricePage.prototype, "seesPeople", void 0);
|
|
285
|
+
__decorate([
|
|
286
|
+
state(),
|
|
287
|
+
__metadata("design:type", Object)
|
|
288
|
+
], AiModelPricePage.prototype, "refreshable", void 0);
|
|
289
|
+
__decorate([
|
|
290
|
+
state(),
|
|
291
|
+
__metadata("design:type", Object)
|
|
292
|
+
], AiModelPricePage.prototype, "includeDescendants", void 0);
|
|
293
|
+
__decorate([
|
|
294
|
+
state(),
|
|
295
|
+
__metadata("design:type", Object)
|
|
296
|
+
], AiModelPricePage.prototype, "agentFilter", void 0);
|
|
297
|
+
__decorate([
|
|
298
|
+
state(),
|
|
299
|
+
__metadata("design:type", String)
|
|
300
|
+
], AiModelPricePage.prototype, "measure", void 0);
|
|
301
|
+
__decorate([
|
|
302
|
+
state(),
|
|
303
|
+
__metadata("design:type", Object)
|
|
304
|
+
], AiModelPricePage.prototype, "userFilter", void 0);
|
|
305
|
+
AiModelPricePage = __decorate([
|
|
306
|
+
customElement('ai-model-price-page')
|
|
307
|
+
], AiModelPricePage);
|
|
308
|
+
export { AiModelPricePage };
|
|
309
|
+
function messageOf(error) {
|
|
310
|
+
return error ? (error.graphQLErrors?.[0]?.message ?? error.message ?? String(error)) : undefined;
|
|
311
|
+
}
|
|
312
|
+
//# sourceMappingURL=ai-model-price-page.js.map
|
package/dist-client/route.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export default function route(page: string): "assistant-workspace" | undefined;
|
|
1
|
+
export default function route(page: string): "ai-model-price-page" | "assistant-workspace" | undefined;
|
package/dist-client/route.js
CHANGED
|
@@ -5,6 +5,10 @@ export default function route(page) {
|
|
|
5
5
|
case 'assistant-workspace':
|
|
6
6
|
import('./pages/assistant-workspace-page.js');
|
|
7
7
|
return page;
|
|
8
|
+
/* AI 모델 단가 - the models' prices and the domain's usage at them (ADR-0061 decision 6 amendment 1-7). */
|
|
9
|
+
case 'ai-model-price-page':
|
|
10
|
+
import('./pages/ai-model-price-page.js');
|
|
11
|
+
return page;
|
|
8
12
|
}
|
|
9
13
|
}
|
|
10
14
|
//# sourceMappingURL=route.js.map
|
|
@@ -233,6 +233,16 @@ let AiAgentSettingLet = class AiAgentSettingLet extends localize(i18next)(LitEle
|
|
|
233
233
|
justify-content: flex-end;
|
|
234
234
|
gap: 8px;
|
|
235
235
|
}
|
|
236
|
+
.usage-link {
|
|
237
|
+
margin-left: auto;
|
|
238
|
+
font-size: 12px;
|
|
239
|
+
color: var(--md-sys-color-primary);
|
|
240
|
+
text-decoration: none;
|
|
241
|
+
white-space: nowrap;
|
|
242
|
+
}
|
|
243
|
+
.usage-link:hover {
|
|
244
|
+
text-decoration: underline;
|
|
245
|
+
}
|
|
236
246
|
button.primary {
|
|
237
247
|
background: var(--md-sys-color-primary);
|
|
238
248
|
color: var(--md-sys-color-on-primary);
|
|
@@ -295,6 +305,7 @@ let AiAgentSettingLet = class AiAgentSettingLet extends localize(i18next)(LitEle
|
|
|
295
305
|
return html `
|
|
296
306
|
<div class="head">
|
|
297
307
|
${this.renderStatus()}
|
|
308
|
+
<a class="page-nav-link usage-link" href="ai-model-price-page">${t('usage-link', 'Usage and prices')}</a>
|
|
298
309
|
<button type="button" ?disabled=${!!this.draft || this.saving} @click=${() => this.startNew()}>
|
|
299
310
|
<md-icon>add</md-icon>${t('add', 'Agent')}
|
|
300
311
|
</button>
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/** What the AI model price card shows and sends (ADR-0061 decision 6 amendment 1-7). */
|
|
2
|
+
export interface ModelPriceRow {
|
|
3
|
+
provider: string;
|
|
4
|
+
model: string;
|
|
5
|
+
inUse: boolean;
|
|
6
|
+
priced: boolean;
|
|
7
|
+
inputPerMTok?: number | null;
|
|
8
|
+
outputPerMTok?: number | null;
|
|
9
|
+
cacheReadPerMTok?: number | null;
|
|
10
|
+
cacheWritePerMTok?: number | null;
|
|
11
|
+
source?: string | null;
|
|
12
|
+
listedAs?: string | null;
|
|
13
|
+
updatedAt?: string | null;
|
|
14
|
+
}
|
|
15
|
+
export declare const PRICE_FIELDS: readonly ["inputPerMTok", "outputPerMTok", "cacheReadPerMTok", "cacheWritePerMTok"];
|
|
16
|
+
export type PriceField = (typeof PRICE_FIELDS)[number];
|
|
17
|
+
/** The prices being typed for one model, as the text in each field. */
|
|
18
|
+
export type PriceDraft = Record<PriceField, string>;
|
|
19
|
+
export declare const REQUIRED_PRICE_FIELDS: PriceField[];
|
|
20
|
+
export declare function draftOf(row: ModelPriceRow): PriceDraft;
|
|
21
|
+
/**
|
|
22
|
+
* The input to save, or the first field that cannot be a price. Input and output are required; an empty cache price
|
|
23
|
+
* is sent as empty, so the input price is used for it.
|
|
24
|
+
*/
|
|
25
|
+
export declare function priceInputOf(row: Pick<ModelPriceRow, 'provider' | 'model'>, draft: PriceDraft): {
|
|
26
|
+
input: Record<string, unknown>;
|
|
27
|
+
} | {
|
|
28
|
+
field: PriceField;
|
|
29
|
+
};
|
|
30
|
+
/** A price per million tokens as the card shows it - as written, no rounding. */
|
|
31
|
+
export declare function priceText(value?: number | null): string;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export const PRICE_FIELDS = ['inputPerMTok', 'outputPerMTok', 'cacheReadPerMTok', 'cacheWritePerMTok'];
|
|
2
|
+
export const REQUIRED_PRICE_FIELDS = ['inputPerMTok', 'outputPerMTok'];
|
|
3
|
+
export function draftOf(row) {
|
|
4
|
+
return Object.fromEntries(PRICE_FIELDS.map(field => [field, row[field] == null ? '' : String(row[field])]));
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* The input to save, or the first field that cannot be a price. Input and output are required; an empty cache price
|
|
8
|
+
* is sent as empty, so the input price is used for it.
|
|
9
|
+
*/
|
|
10
|
+
export function priceInputOf(row, draft) {
|
|
11
|
+
const input = { provider: row.provider, model: row.model };
|
|
12
|
+
for (const field of PRICE_FIELDS) {
|
|
13
|
+
const text = draft[field].trim();
|
|
14
|
+
if (!text) {
|
|
15
|
+
if (REQUIRED_PRICE_FIELDS.includes(field))
|
|
16
|
+
return { field };
|
|
17
|
+
continue;
|
|
18
|
+
}
|
|
19
|
+
const value = Number(text);
|
|
20
|
+
if (!Number.isFinite(value) || value < 0)
|
|
21
|
+
return { field };
|
|
22
|
+
input[field] = value;
|
|
23
|
+
}
|
|
24
|
+
return { input };
|
|
25
|
+
}
|
|
26
|
+
/** A price per million tokens as the card shows it - as written, no rounding. */
|
|
27
|
+
export function priceText(value) {
|
|
28
|
+
return value == null ? '' : `$${value}`;
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=model-price-model.js.map
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { UsageRow } from './usage-model.js';
|
|
2
|
+
export type UsageMeasure = 'cost' | 'calls';
|
|
3
|
+
/** The twelve months up to this one, oldest first, as the buckets name them (`2026-11`). */
|
|
4
|
+
export declare function lastMonths(now: Date, count?: number): string[];
|
|
5
|
+
/** Where the twelve months start: the first of the month eleven months back. */
|
|
6
|
+
export declare function monthsStart(now: Date, count?: number): Date;
|
|
7
|
+
/** The domain's use per month, one series per agent, the largest first; a month with no use is 0. */
|
|
8
|
+
export declare function monthlyByAgent(rows: UsageRow[], months: string[], measure: UsageMeasure, agentName: (row: UsageRow) => string): {
|
|
9
|
+
name: string;
|
|
10
|
+
values: number[];
|
|
11
|
+
}[];
|
|
12
|
+
/**
|
|
13
|
+
* Each person's use as bar-list rows, the largest first - a row a person, or a row a person and agent with the agent as
|
|
14
|
+
* its tag when more than one agent was used. Rows without a person (a domain below) are left out: this compares the
|
|
15
|
+
* people of this domain.
|
|
16
|
+
*/
|
|
17
|
+
export declare function peopleBars(rows: UsageRow[], measure: UsageMeasure, agentName: (row: UsageRow) => string): {
|
|
18
|
+
label: string;
|
|
19
|
+
value: number;
|
|
20
|
+
tag?: string;
|
|
21
|
+
}[];
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/** The twelve months up to this one, oldest first, as the buckets name them (`2026-11`). */
|
|
2
|
+
export function lastMonths(now, count = 12) {
|
|
3
|
+
return Array.from({ length: count }, (_, back) => {
|
|
4
|
+
const month = new Date(now.getFullYear(), now.getMonth() - count + 1 + back, 1);
|
|
5
|
+
return `${month.getFullYear()}-${String(month.getMonth() + 1).padStart(2, '0')}`;
|
|
6
|
+
});
|
|
7
|
+
}
|
|
8
|
+
/** Where the twelve months start: the first of the month eleven months back. */
|
|
9
|
+
export function monthsStart(now, count = 12) {
|
|
10
|
+
return new Date(now.getFullYear(), now.getMonth() - count + 1, 1);
|
|
11
|
+
}
|
|
12
|
+
const measured = (row, measure) => (measure === 'cost' ? (row.cost ?? 0) : row.calls);
|
|
13
|
+
/** The domain's use per month, one series per agent, the largest first; a month with no use is 0. */
|
|
14
|
+
export function monthlyByAgent(rows, months, measure, agentName) {
|
|
15
|
+
const at = new Map(months.map((month, index) => [month, index]));
|
|
16
|
+
const series = new Map();
|
|
17
|
+
for (const row of rows) {
|
|
18
|
+
const index = at.get(row.bucket);
|
|
19
|
+
if (index === undefined)
|
|
20
|
+
continue;
|
|
21
|
+
const name = agentName(row);
|
|
22
|
+
const values = series.get(name) ?? series.set(name, months.map(() => 0)).get(name);
|
|
23
|
+
values[index] += measured(row, measure);
|
|
24
|
+
}
|
|
25
|
+
const total = (values) => values.reduce((sum, value) => sum + value, 0);
|
|
26
|
+
return [...series.entries()].map(([name, values]) => ({ name, values })).sort((a, b) => total(b.values) - total(a.values));
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Each person's use as bar-list rows, the largest first - a row a person, or a row a person and agent with the agent as
|
|
30
|
+
* its tag when more than one agent was used. Rows without a person (a domain below) are left out: this compares the
|
|
31
|
+
* people of this domain.
|
|
32
|
+
*/
|
|
33
|
+
export function peopleBars(rows, measure, agentName) {
|
|
34
|
+
const mine = rows.filter(row => row.userId);
|
|
35
|
+
const agents = new Set(mine.map(agentName));
|
|
36
|
+
const bars = new Map();
|
|
37
|
+
for (const row of mine) {
|
|
38
|
+
const tag = agents.size > 1 ? agentName(row) : undefined;
|
|
39
|
+
const key = `${row.userId}\u0000${tag ?? ''}`;
|
|
40
|
+
const bar = bars.get(key) ?? bars.set(key, { label: row.userName ?? row.userId, value: 0, ...(tag && { tag }) }).get(key);
|
|
41
|
+
bar.value += measured(row, measure);
|
|
42
|
+
}
|
|
43
|
+
return [...bars.values()].sort((a, b) => b.value - a.value);
|
|
44
|
+
}
|
|
45
|
+
//# sourceMappingURL=usage-charts.js.map
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/** What the AI usage page asks for and adds up (ADR-0061 decision 6 amendment 1-7). */
|
|
2
|
+
export type UsagePeriod = 'today' | '7d' | '30d' | 'year';
|
|
3
|
+
export type UsageBucketSize = 'hour' | 'day' | 'month';
|
|
4
|
+
export interface UsageRow {
|
|
5
|
+
bucket: string;
|
|
6
|
+
agentId?: string | null;
|
|
7
|
+
agentName?: string | null;
|
|
8
|
+
provider: string;
|
|
9
|
+
model: string;
|
|
10
|
+
domainId: string;
|
|
11
|
+
domainName: string;
|
|
12
|
+
userId?: string | null;
|
|
13
|
+
userName?: string | null;
|
|
14
|
+
calls: number;
|
|
15
|
+
inputTokens: number;
|
|
16
|
+
outputTokens: number;
|
|
17
|
+
failures: number;
|
|
18
|
+
/** USD at the model price. Empty when the model has no price (ADR-0061 decision 6 amendment 1-4). */
|
|
19
|
+
cost?: number | null;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* The span a period covers, up to the end of the current hour - usage is stored by the hour, so the hour in progress
|
|
23
|
+
* is counted whole.
|
|
24
|
+
*/
|
|
25
|
+
export declare function periodRange(period: UsagePeriod, now: Date): {
|
|
26
|
+
from: Date;
|
|
27
|
+
to: Date;
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* The sums of the rows. The cost adds only the priced rows, and `unpricedCalls` says how many calls it leaves out -
|
|
31
|
+
* an unpriced model is never counted as free. With no priced row at all the cost is empty.
|
|
32
|
+
*/
|
|
33
|
+
export declare function totalsOf(rows: UsageRow[]): {
|
|
34
|
+
calls: number;
|
|
35
|
+
inputTokens: number;
|
|
36
|
+
outputTokens: number;
|
|
37
|
+
failures: number;
|
|
38
|
+
cost: number | undefined;
|
|
39
|
+
unpricedCalls: number;
|
|
40
|
+
};
|
|
41
|
+
/** USD on a chart's axis and bars: no trailing zeros, so an axis reads $0 · $0.5 · $2 and a bar $0.0125. */
|
|
42
|
+
export declare function chartUsd(value: number): string;
|
|
43
|
+
/** USD as the cards show it: cents for a dollar or more, four places below it, `<$0.0001` for a speck. */
|
|
44
|
+
export declare function formatUsd(value: number): string;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The span a period covers, up to the end of the current hour - usage is stored by the hour, so the hour in progress
|
|
3
|
+
* is counted whole.
|
|
4
|
+
*/
|
|
5
|
+
export function periodRange(period, now) {
|
|
6
|
+
const to = new Date(now);
|
|
7
|
+
to.setMinutes(0, 0, 0);
|
|
8
|
+
to.setHours(to.getHours() + 1);
|
|
9
|
+
const from = new Date(now);
|
|
10
|
+
from.setHours(0, 0, 0, 0);
|
|
11
|
+
if (period === '7d')
|
|
12
|
+
from.setDate(from.getDate() - 6);
|
|
13
|
+
if (period === '30d')
|
|
14
|
+
from.setDate(from.getDate() - 29);
|
|
15
|
+
if (period === 'year')
|
|
16
|
+
from.setMonth(0, 1);
|
|
17
|
+
return { from, to };
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* The sums of the rows. The cost adds only the priced rows, and `unpricedCalls` says how many calls it leaves out -
|
|
21
|
+
* an unpriced model is never counted as free. With no priced row at all the cost is empty.
|
|
22
|
+
*/
|
|
23
|
+
export function totalsOf(rows) {
|
|
24
|
+
return rows.reduce((sum, row) => ({
|
|
25
|
+
calls: sum.calls + row.calls,
|
|
26
|
+
inputTokens: sum.inputTokens + row.inputTokens,
|
|
27
|
+
outputTokens: sum.outputTokens + row.outputTokens,
|
|
28
|
+
failures: sum.failures + row.failures,
|
|
29
|
+
cost: row.cost == null ? sum.cost : (sum.cost ?? 0) + row.cost,
|
|
30
|
+
unpricedCalls: sum.unpricedCalls + (row.cost == null ? row.calls : 0)
|
|
31
|
+
}), { calls: 0, inputTokens: 0, outputTokens: 0, failures: 0, cost: undefined, unpricedCalls: 0 });
|
|
32
|
+
}
|
|
33
|
+
/** USD on a chart's axis and bars: no trailing zeros, so an axis reads $0 · $0.5 · $2 and a bar $0.0125. */
|
|
34
|
+
export function chartUsd(value) {
|
|
35
|
+
return `$${Number(value.toFixed(4)).toLocaleString('en-US', { maximumFractionDigits: 4 })}`;
|
|
36
|
+
}
|
|
37
|
+
/** USD as the cards show it: cents for a dollar or more, four places below it, `<$0.0001` for a speck. */
|
|
38
|
+
export function formatUsd(value) {
|
|
39
|
+
if (value > 0 && value < 0.0001)
|
|
40
|
+
return '<$0.0001';
|
|
41
|
+
const places = value >= 1 ? 2 : 4;
|
|
42
|
+
return `$${value.toLocaleString('en-US', { minimumFractionDigits: places, maximumFractionDigits: places })}`;
|
|
43
|
+
}
|
|
44
|
+
//# sourceMappingURL=usage-model.js.map
|
|
@@ -70,13 +70,59 @@ declare class AiUsageBucket {
|
|
|
70
70
|
calls: number;
|
|
71
71
|
inputTokens: number;
|
|
72
72
|
outputTokens: number;
|
|
73
|
+
cacheReadTokens: number;
|
|
74
|
+
cacheWriteTokens: number;
|
|
73
75
|
failures: number;
|
|
76
|
+
cost?: number;
|
|
77
|
+
}
|
|
78
|
+
declare class AiUsageOverview {
|
|
79
|
+
mine: AiUsageBucket[];
|
|
80
|
+
domain: AiUsageBucket[];
|
|
81
|
+
}
|
|
82
|
+
declare class AiModelPriceView {
|
|
83
|
+
provider: string;
|
|
84
|
+
model: string;
|
|
85
|
+
inUse: boolean;
|
|
86
|
+
priced: boolean;
|
|
87
|
+
inputPerMTok?: number;
|
|
88
|
+
outputPerMTok?: number;
|
|
89
|
+
cacheReadPerMTok?: number;
|
|
90
|
+
cacheWritePerMTok?: number;
|
|
91
|
+
source?: string;
|
|
92
|
+
listedAs?: string;
|
|
93
|
+
updatedAt?: Date;
|
|
94
|
+
}
|
|
95
|
+
declare class AiModelPrices {
|
|
96
|
+
models: AiModelPriceView[];
|
|
97
|
+
editable: boolean;
|
|
98
|
+
}
|
|
99
|
+
declare class AiModelRef {
|
|
100
|
+
provider: string;
|
|
101
|
+
model: string;
|
|
102
|
+
}
|
|
103
|
+
declare class AiModelPriceRefresh {
|
|
104
|
+
updated: AiModelRef[];
|
|
105
|
+
kept: AiModelRef[];
|
|
106
|
+
unlisted: AiModelRef[];
|
|
107
|
+
}
|
|
108
|
+
declare class AiModelPriceInput {
|
|
109
|
+
provider: string;
|
|
110
|
+
model: string;
|
|
111
|
+
inputPerMTok: number;
|
|
112
|
+
outputPerMTok: number;
|
|
113
|
+
cacheReadPerMTok?: number;
|
|
114
|
+
cacheWritePerMTok?: number;
|
|
74
115
|
}
|
|
75
116
|
export declare class AiAgentResolver {
|
|
76
117
|
aiAgentSettings(context: ResolverContext): Promise<AiAgentSettings>;
|
|
77
118
|
aiAgentChoices(context: ResolverContext): Promise<AiAgentChoice[]>;
|
|
78
119
|
aiProviderModels(provider: string, apiKey: string, agentId: string, baseURL: string, organization: string, context: ResolverContext): Promise<string[]>;
|
|
79
120
|
saveAiAgents(input: AiAgentsInput, context: ResolverContext): Promise<boolean>;
|
|
121
|
+
aiUsageOverview(from: Date, to: Date, bucket: string, context: ResolverContext): Promise<AiUsageOverview>;
|
|
122
|
+
aiModelPrices(context: ResolverContext): Promise<AiModelPrices>;
|
|
123
|
+
refreshAiModelPrices(context: ResolverContext): Promise<AiModelPriceRefresh>;
|
|
124
|
+
saveAiModelPrice(input: AiModelPriceInput, context: ResolverContext): Promise<boolean>;
|
|
125
|
+
refreshAiModelPrice(provider: string, model: string, context: ResolverContext): Promise<boolean>;
|
|
80
126
|
aiUsageSummary(from: Date, to: Date, bucket: string, agentIds: string[], userIds: string[], includeDescendants: boolean, context: ResolverContext): Promise<AiUsageBucket[]>;
|
|
81
127
|
}
|
|
82
128
|
export {};
|