@vertesia/common 0.24.0-dev.202601221707
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/LICENSE +13 -0
- package/README.md +53 -0
- package/lib/cjs/Progress.js +61 -0
- package/lib/cjs/Progress.js.map +1 -0
- package/lib/cjs/access-control.js +56 -0
- package/lib/cjs/access-control.js.map +1 -0
- package/lib/cjs/analytics.js +3 -0
- package/lib/cjs/analytics.js.map +1 -0
- package/lib/cjs/apikey.js +16 -0
- package/lib/cjs/apikey.js.map +1 -0
- package/lib/cjs/apps.js +35 -0
- package/lib/cjs/apps.js.map +1 -0
- package/lib/cjs/ask-user.js +8 -0
- package/lib/cjs/ask-user.js.map +1 -0
- package/lib/cjs/channels.js +63 -0
- package/lib/cjs/channels.js.map +1 -0
- package/lib/cjs/common.js +3 -0
- package/lib/cjs/common.js.map +1 -0
- package/lib/cjs/data-platform.js +127 -0
- package/lib/cjs/data-platform.js.map +1 -0
- package/lib/cjs/email.js +20 -0
- package/lib/cjs/email.js.map +1 -0
- package/lib/cjs/environment.js +44 -0
- package/lib/cjs/environment.js.map +1 -0
- package/lib/cjs/facets.js +3 -0
- package/lib/cjs/facets.js.map +1 -0
- package/lib/cjs/group.js +5 -0
- package/lib/cjs/group.js.map +1 -0
- package/lib/cjs/index.js +55 -0
- package/lib/cjs/index.js.map +1 -0
- package/lib/cjs/integrations.js +14 -0
- package/lib/cjs/integrations.js.map +1 -0
- package/lib/cjs/interaction.js +97 -0
- package/lib/cjs/interaction.js.map +1 -0
- package/lib/cjs/json-schema.js +3 -0
- package/lib/cjs/json-schema.js.map +1 -0
- package/lib/cjs/json.js +3 -0
- package/lib/cjs/json.js.map +1 -0
- package/lib/cjs/meters.js +13 -0
- package/lib/cjs/meters.js.map +1 -0
- package/lib/cjs/model_utility.js +6 -0
- package/lib/cjs/model_utility.js.map +1 -0
- package/lib/cjs/package.json +3 -0
- package/lib/cjs/payload.js +3 -0
- package/lib/cjs/payload.js.map +1 -0
- package/lib/cjs/pending-asks.js +7 -0
- package/lib/cjs/pending-asks.js.map +1 -0
- package/lib/cjs/project.js +107 -0
- package/lib/cjs/project.js.map +1 -0
- package/lib/cjs/prompt.js +21 -0
- package/lib/cjs/prompt.js.map +1 -0
- package/lib/cjs/query.js +3 -0
- package/lib/cjs/query.js.map +1 -0
- package/lib/cjs/rate-limiter.js +6 -0
- package/lib/cjs/rate-limiter.js.map +1 -0
- package/lib/cjs/refs.js +14 -0
- package/lib/cjs/refs.js.map +1 -0
- package/lib/cjs/runs.js +3 -0
- package/lib/cjs/runs.js.map +1 -0
- package/lib/cjs/skill.js +14 -0
- package/lib/cjs/skill.js.map +1 -0
- package/lib/cjs/store/activity-catalog.js +3 -0
- package/lib/cjs/store/activity-catalog.js.map +1 -0
- package/lib/cjs/store/collections.js +9 -0
- package/lib/cjs/store/collections.js.map +1 -0
- package/lib/cjs/store/common.js +3 -0
- package/lib/cjs/store/common.js.map +1 -0
- package/lib/cjs/store/conversation-state.js +3 -0
- package/lib/cjs/store/conversation-state.js.map +1 -0
- package/lib/cjs/store/doc-analyzer.js +3 -0
- package/lib/cjs/store/doc-analyzer.js.map +1 -0
- package/lib/cjs/store/dsl-workflow.js +5 -0
- package/lib/cjs/store/dsl-workflow.js.map +1 -0
- package/lib/cjs/store/index.js +30 -0
- package/lib/cjs/store/index.js.map +1 -0
- package/lib/cjs/store/object-types.js +98 -0
- package/lib/cjs/store/object-types.js.map +1 -0
- package/lib/cjs/store/schedule.js +32 -0
- package/lib/cjs/store/schedule.js.map +1 -0
- package/lib/cjs/store/signals.js +3 -0
- package/lib/cjs/store/signals.js.map +1 -0
- package/lib/cjs/store/store.js +166 -0
- package/lib/cjs/store/store.js.map +1 -0
- package/lib/cjs/store/temporalio.js +44 -0
- package/lib/cjs/store/temporalio.js.map +1 -0
- package/lib/cjs/store/worker.js +3 -0
- package/lib/cjs/store/worker.js.map +1 -0
- package/lib/cjs/store/workflow.js +241 -0
- package/lib/cjs/store/workflow.js.map +1 -0
- package/lib/cjs/sts-token-types.js +32 -0
- package/lib/cjs/sts-token-types.js.map +1 -0
- package/lib/cjs/tenant.js +3 -0
- package/lib/cjs/tenant.js.map +1 -0
- package/lib/cjs/tool-execution.js +6 -0
- package/lib/cjs/tool-execution.js.map +1 -0
- package/lib/cjs/training.js +14 -0
- package/lib/cjs/training.js.map +1 -0
- package/lib/cjs/transient-tokens.js +9 -0
- package/lib/cjs/transient-tokens.js.map +1 -0
- package/lib/cjs/user.js +25 -0
- package/lib/cjs/user.js.map +1 -0
- package/lib/cjs/utils/auth.js +15 -0
- package/lib/cjs/utils/auth.js.map +1 -0
- package/lib/cjs/utils/schemas.js +114 -0
- package/lib/cjs/utils/schemas.js.map +1 -0
- package/lib/cjs/utils/type-helpers.js +3 -0
- package/lib/cjs/utils/type-helpers.js.map +1 -0
- package/lib/cjs/versions.js +8 -0
- package/lib/cjs/versions.js.map +1 -0
- package/lib/cjs/workflow-analytics.js +52 -0
- package/lib/cjs/workflow-analytics.js.map +1 -0
- package/lib/esm/Progress.js +57 -0
- package/lib/esm/Progress.js.map +1 -0
- package/lib/esm/access-control.js +53 -0
- package/lib/esm/access-control.js.map +1 -0
- package/lib/esm/analytics.js +2 -0
- package/lib/esm/analytics.js.map +1 -0
- package/lib/esm/apikey.js +13 -0
- package/lib/esm/apikey.js.map +1 -0
- package/lib/esm/apps.js +32 -0
- package/lib/esm/apps.js.map +1 -0
- package/lib/esm/ask-user.js +7 -0
- package/lib/esm/ask-user.js.map +1 -0
- package/lib/esm/channels.js +57 -0
- package/lib/esm/channels.js.map +1 -0
- package/lib/esm/common.js +2 -0
- package/lib/esm/common.js.map +1 -0
- package/lib/esm/data-platform.js +124 -0
- package/lib/esm/data-platform.js.map +1 -0
- package/lib/esm/email.js +16 -0
- package/lib/esm/email.js.map +1 -0
- package/lib/esm/environment.js +41 -0
- package/lib/esm/environment.js.map +1 -0
- package/lib/esm/facets.js +2 -0
- package/lib/esm/facets.js.map +1 -0
- package/lib/esm/group.js +2 -0
- package/lib/esm/group.js.map +1 -0
- package/lib/esm/index.js +39 -0
- package/lib/esm/index.js.map +1 -0
- package/lib/esm/integrations.js +11 -0
- package/lib/esm/integrations.js.map +1 -0
- package/lib/esm/interaction.js +92 -0
- package/lib/esm/interaction.js.map +1 -0
- package/lib/esm/json-schema.js +2 -0
- package/lib/esm/json-schema.js.map +1 -0
- package/lib/esm/json.js +2 -0
- package/lib/esm/json.js.map +1 -0
- package/lib/esm/meters.js +10 -0
- package/lib/esm/meters.js.map +1 -0
- package/lib/esm/model_utility.js +2 -0
- package/lib/esm/model_utility.js.map +1 -0
- package/lib/esm/payload.js +2 -0
- package/lib/esm/payload.js.map +1 -0
- package/lib/esm/pending-asks.js +6 -0
- package/lib/esm/pending-asks.js.map +1 -0
- package/lib/esm/project.js +102 -0
- package/lib/esm/project.js.map +1 -0
- package/lib/esm/prompt.js +18 -0
- package/lib/esm/prompt.js.map +1 -0
- package/lib/esm/query.js +2 -0
- package/lib/esm/query.js.map +1 -0
- package/lib/esm/rate-limiter.js +5 -0
- package/lib/esm/rate-limiter.js.map +1 -0
- package/lib/esm/refs.js +11 -0
- package/lib/esm/refs.js.map +1 -0
- package/lib/esm/runs.js +2 -0
- package/lib/esm/runs.js.map +1 -0
- package/lib/esm/skill.js +13 -0
- package/lib/esm/skill.js.map +1 -0
- package/lib/esm/store/activity-catalog.js +2 -0
- package/lib/esm/store/activity-catalog.js.map +1 -0
- package/lib/esm/store/collections.js +6 -0
- package/lib/esm/store/collections.js.map +1 -0
- package/lib/esm/store/common.js +2 -0
- package/lib/esm/store/common.js.map +1 -0
- package/lib/esm/store/conversation-state.js +2 -0
- package/lib/esm/store/conversation-state.js.map +1 -0
- package/lib/esm/store/doc-analyzer.js +2 -0
- package/lib/esm/store/doc-analyzer.js.map +1 -0
- package/lib/esm/store/dsl-workflow.js +2 -0
- package/lib/esm/store/dsl-workflow.js.map +1 -0
- package/lib/esm/store/index.js +14 -0
- package/lib/esm/store/index.js.map +1 -0
- package/lib/esm/store/object-types.js +95 -0
- package/lib/esm/store/object-types.js.map +1 -0
- package/lib/esm/store/schedule.js +29 -0
- package/lib/esm/store/schedule.js.map +1 -0
- package/lib/esm/store/signals.js +2 -0
- package/lib/esm/store/signals.js.map +1 -0
- package/lib/esm/store/store.js +160 -0
- package/lib/esm/store/store.js.map +1 -0
- package/lib/esm/store/temporalio.js +41 -0
- package/lib/esm/store/temporalio.js.map +1 -0
- package/lib/esm/store/worker.js +2 -0
- package/lib/esm/store/worker.js.map +1 -0
- package/lib/esm/store/workflow.js +228 -0
- package/lib/esm/store/workflow.js.map +1 -0
- package/lib/esm/sts-token-types.js +24 -0
- package/lib/esm/sts-token-types.js.map +1 -0
- package/lib/esm/tenant.js +2 -0
- package/lib/esm/tenant.js.map +1 -0
- package/lib/esm/tool-execution.js +5 -0
- package/lib/esm/tool-execution.js.map +1 -0
- package/lib/esm/training.js +11 -0
- package/lib/esm/training.js.map +1 -0
- package/lib/esm/transient-tokens.js +6 -0
- package/lib/esm/transient-tokens.js.map +1 -0
- package/lib/esm/user.js +22 -0
- package/lib/esm/user.js.map +1 -0
- package/lib/esm/utils/auth.js +11 -0
- package/lib/esm/utils/auth.js.map +1 -0
- package/lib/esm/utils/schemas.js +107 -0
- package/lib/esm/utils/schemas.js.map +1 -0
- package/lib/esm/utils/type-helpers.js +2 -0
- package/lib/esm/utils/type-helpers.js.map +1 -0
- package/lib/esm/versions.js +5 -0
- package/lib/esm/versions.js.map +1 -0
- package/lib/esm/workflow-analytics.js +49 -0
- package/lib/esm/workflow-analytics.js.map +1 -0
- package/lib/tsconfig.tsbuildinfo +1 -0
- package/lib/types/Progress.d.ts +21 -0
- package/lib/types/Progress.d.ts.map +1 -0
- package/lib/types/access-control.d.ts +73 -0
- package/lib/types/access-control.d.ts.map +1 -0
- package/lib/types/analytics.d.ts +87 -0
- package/lib/types/analytics.d.ts.map +1 -0
- package/lib/types/apikey.d.ts +98 -0
- package/lib/types/apikey.d.ts.map +1 -0
- package/lib/types/apps.d.ts +236 -0
- package/lib/types/apps.d.ts.map +1 -0
- package/lib/types/ask-user.d.ts +32 -0
- package/lib/types/ask-user.d.ts.map +1 -0
- package/lib/types/channels.d.ts +21 -0
- package/lib/types/channels.d.ts.map +1 -0
- package/lib/types/common.d.ts +31 -0
- package/lib/types/common.d.ts.map +1 -0
- package/lib/types/data-platform.d.ts +860 -0
- package/lib/types/data-platform.d.ts.map +1 -0
- package/lib/types/email.d.ts +66 -0
- package/lib/types/email.d.ts.map +1 -0
- package/lib/types/environment.d.ts +106 -0
- package/lib/types/environment.d.ts.map +1 -0
- package/lib/types/facets.d.ts +34 -0
- package/lib/types/facets.d.ts.map +1 -0
- package/lib/types/group.d.ts +21 -0
- package/lib/types/group.d.ts.map +1 -0
- package/lib/types/index.d.ts +39 -0
- package/lib/types/index.d.ts.map +1 -0
- package/lib/types/integrations.d.ts +60 -0
- package/lib/types/integrations.d.ts.map +1 -0
- package/lib/types/interaction.d.ts +958 -0
- package/lib/types/interaction.d.ts.map +1 -0
- package/lib/types/json-schema.d.ts +1 -0
- package/lib/types/json-schema.d.ts.map +1 -0
- package/lib/types/json.d.ts +1 -0
- package/lib/types/json.d.ts.map +1 -0
- package/lib/types/meters.d.ts +23 -0
- package/lib/types/meters.d.ts.map +1 -0
- package/lib/types/model_utility.d.ts +1 -0
- package/lib/types/model_utility.d.ts.map +1 -0
- package/lib/types/payload.d.ts +60 -0
- package/lib/types/payload.d.ts.map +1 -0
- package/lib/types/pending-asks.d.ts +93 -0
- package/lib/types/pending-asks.d.ts.map +1 -0
- package/lib/types/project.d.ts +179 -0
- package/lib/types/project.d.ts.map +1 -0
- package/lib/types/prompt.d.ts +78 -0
- package/lib/types/prompt.d.ts.map +1 -0
- package/lib/types/query.d.ts +118 -0
- package/lib/types/query.d.ts.map +1 -0
- package/lib/types/rate-limiter.d.ts +28 -0
- package/lib/types/rate-limiter.d.ts.map +1 -0
- package/lib/types/refs.d.ts +22 -0
- package/lib/types/refs.d.ts.map +1 -0
- package/lib/types/runs.d.ts +32 -0
- package/lib/types/runs.d.ts.map +1 -0
- package/lib/types/skill.d.ts +78 -0
- package/lib/types/skill.d.ts.map +1 -0
- package/lib/types/store/activity-catalog.d.ts +26 -0
- package/lib/types/store/activity-catalog.d.ts.map +1 -0
- package/lib/types/store/collections.d.ts +78 -0
- package/lib/types/store/collections.d.ts.map +1 -0
- package/lib/types/store/common.d.ts +22 -0
- package/lib/types/store/common.d.ts.map +1 -0
- package/lib/types/store/conversation-state.d.ts +120 -0
- package/lib/types/store/conversation-state.d.ts.map +1 -0
- package/lib/types/store/doc-analyzer.d.ts +140 -0
- package/lib/types/store/doc-analyzer.d.ts.map +1 -0
- package/lib/types/store/dsl-workflow.d.ts +244 -0
- package/lib/types/store/dsl-workflow.d.ts.map +1 -0
- package/lib/types/store/index.d.ts +13 -0
- package/lib/types/store/index.d.ts.map +1 -0
- package/lib/types/store/object-types.d.ts +23 -0
- package/lib/types/store/object-types.d.ts.map +1 -0
- package/lib/types/store/schedule.d.ts +182 -0
- package/lib/types/store/schedule.d.ts.map +1 -0
- package/lib/types/store/signals.d.ts +24 -0
- package/lib/types/store/signals.d.ts.map +1 -0
- package/lib/types/store/store.d.ts +407 -0
- package/lib/types/store/store.d.ts.map +1 -0
- package/lib/types/store/temporalio.d.ts +16 -0
- package/lib/types/store/temporalio.d.ts.map +1 -0
- package/lib/types/store/worker.d.ts +18 -0
- package/lib/types/store/worker.d.ts.map +1 -0
- package/lib/types/store/workflow.d.ts +730 -0
- package/lib/types/store/workflow.d.ts.map +1 -0
- package/lib/types/sts-token-types.d.ts +72 -0
- package/lib/types/sts-token-types.d.ts.map +1 -0
- package/lib/types/tenant.d.ts +10 -0
- package/lib/types/tenant.d.ts.map +1 -0
- package/lib/types/tool-execution.d.ts +45 -0
- package/lib/types/tool-execution.d.ts.map +1 -0
- package/lib/types/training.d.ts +38 -0
- package/lib/types/training.d.ts.map +1 -0
- package/lib/types/transient-tokens.d.ts +24 -0
- package/lib/types/transient-tokens.d.ts.map +1 -0
- package/lib/types/user.d.ts +116 -0
- package/lib/types/user.d.ts.map +1 -0
- package/lib/types/utils/auth.d.ts +3 -0
- package/lib/types/utils/auth.d.ts.map +1 -0
- package/lib/types/utils/schemas.d.ts +9 -0
- package/lib/types/utils/schemas.d.ts.map +1 -0
- package/lib/types/utils/type-helpers.d.ts +3 -0
- package/lib/types/utils/type-helpers.d.ts.map +1 -0
- package/lib/types/versions.d.ts +3 -0
- package/lib/types/versions.d.ts.map +1 -0
- package/lib/types/workflow-analytics.d.ts +777 -0
- package/lib/types/workflow-analytics.d.ts.map +1 -0
- package/lib/vertesia-common.js +2 -0
- package/lib/vertesia-common.js.map +1 -0
- package/package.json +54 -0
- package/src/Progress.ts +57 -0
- package/src/access-control.ts +98 -0
- package/src/analytics.ts +106 -0
- package/src/apikey.ts +116 -0
- package/src/apps.ts +296 -0
- package/src/ask-user.ts +35 -0
- package/src/channels.ts +70 -0
- package/src/common.ts +37 -0
- package/src/data-platform.ts +976 -0
- package/src/email.ts +80 -0
- package/src/environment.ts +137 -0
- package/src/facets.ts +44 -0
- package/src/group.ts +26 -0
- package/src/index.ts +40 -0
- package/src/integrations.ts +72 -0
- package/src/interaction.ts +1182 -0
- package/src/json-schema.ts +7 -0
- package/src/json.ts +4 -0
- package/src/meters.ts +30 -0
- package/src/model_utility.ts +1 -0
- package/src/payload.ts +83 -0
- package/src/pending-asks.ts +106 -0
- package/src/project.ts +263 -0
- package/src/prompt.ts +103 -0
- package/src/query.ts +137 -0
- package/src/rate-limiter.ts +34 -0
- package/src/refs.ts +30 -0
- package/src/runs.ts +36 -0
- package/src/skill.ts +90 -0
- package/src/store/activity-catalog.ts +44 -0
- package/src/store/collections.ts +87 -0
- package/src/store/common.ts +30 -0
- package/src/store/conversation-state.ts +146 -0
- package/src/store/doc-analyzer.ts +161 -0
- package/src/store/dsl-workflow.ts +288 -0
- package/src/store/index.ts +14 -0
- package/src/store/ms.d.ts +11 -0
- package/src/store/object-types.ts +127 -0
- package/src/store/schedule.ts +238 -0
- package/src/store/signals.ts +25 -0
- package/src/store/store.ts +579 -0
- package/src/store/temporalio.ts +54 -0
- package/src/store/worker.ts +19 -0
- package/src/store/workflow.test.ts +578 -0
- package/src/store/workflow.ts +973 -0
- package/src/sts-token-types.ts +117 -0
- package/src/tenant.ts +10 -0
- package/src/tool-execution.ts +47 -0
- package/src/training.ts +44 -0
- package/src/transient-tokens.ts +30 -0
- package/src/user.ts +153 -0
- package/src/utils/auth.ts +12 -0
- package/src/utils/schemas.ts +108 -0
- package/src/utils/type-helpers.ts +6 -0
- package/src/versions.ts +3 -0
- package/src/workflow-analytics.ts +925 -0
- package/tsconfig.dist.json +20 -0
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Agent Schedule Types
|
|
4
|
+
*
|
|
5
|
+
* Defines types for scheduling agents to run on a recurring basis using cron expressions.
|
|
6
|
+
* Schedules are stored in MongoDB with execution handled by Temporal.
|
|
7
|
+
*/
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.CRON_PRESET_LABELS = exports.CRON_PRESETS = void 0;
|
|
10
|
+
/**
|
|
11
|
+
* Common cron expression presets for UI convenience.
|
|
12
|
+
*/
|
|
13
|
+
exports.CRON_PRESETS = {
|
|
14
|
+
EVERY_HOUR: '0 * * * *',
|
|
15
|
+
EVERY_DAY_MIDNIGHT: '0 0 * * *',
|
|
16
|
+
EVERY_DAY_9AM: '0 9 * * *',
|
|
17
|
+
EVERY_MONDAY_MIDNIGHT: '0 0 * * MON',
|
|
18
|
+
EVERY_WEEKDAY_9AM: '0 9 * * MON-FRI',
|
|
19
|
+
FIRST_OF_MONTH: '0 0 1 * *',
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* Human-readable descriptions for cron presets.
|
|
23
|
+
*/
|
|
24
|
+
exports.CRON_PRESET_LABELS = {
|
|
25
|
+
EVERY_HOUR: 'Every hour',
|
|
26
|
+
EVERY_DAY_MIDNIGHT: 'Daily at midnight',
|
|
27
|
+
EVERY_DAY_9AM: 'Daily at 9:00 AM',
|
|
28
|
+
EVERY_MONDAY_MIDNIGHT: 'Every Monday at midnight',
|
|
29
|
+
EVERY_WEEKDAY_9AM: 'Weekdays at 9:00 AM',
|
|
30
|
+
FIRST_OF_MONTH: 'First day of month at midnight',
|
|
31
|
+
};
|
|
32
|
+
//# sourceMappingURL=schedule.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schedule.js","sourceRoot":"","sources":["../../../src/store/schedule.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAkNH;;GAEG;AACU,QAAA,YAAY,GAAG;IACxB,UAAU,EAAE,WAAW;IACvB,kBAAkB,EAAE,WAAW;IAC/B,aAAa,EAAE,WAAW;IAC1B,qBAAqB,EAAE,aAAa;IACpC,iBAAiB,EAAE,iBAAiB;IACpC,cAAc,EAAE,WAAW;CACrB,CAAC;AAEX;;GAEG;AACU,QAAA,kBAAkB,GAA8C;IACzE,UAAU,EAAE,YAAY;IACxB,kBAAkB,EAAE,mBAAmB;IACvC,aAAa,EAAE,kBAAkB;IACjC,qBAAqB,EAAE,0BAA0B;IACjD,iBAAiB,EAAE,qBAAqB;IACxC,cAAc,EAAE,gCAAgC;CACnD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"signals.js","sourceRoot":"","sources":["../../../src/store/signals.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ContentObjectProcessingPriority = exports.MarkdownRenditionFormat = exports.ImageRenditionFormat = exports.WorkflowRuleInputType = exports.PDF_RENDITION_NAME = exports.WEB_VIDEO_RENDITION_NAME = exports.AUDIO_RENDITION_NAME = exports.POSTER_RENDITION_NAME = exports.ContentNature = exports.ContentObjectStatus = exports.DataStoreApiHeaders = exports.ContentObjectApiHeaders = void 0;
|
|
4
|
+
exports.canGenerateRendition = canGenerateRendition;
|
|
5
|
+
exports.getSupportedRenditionFormats = getSupportedRenditionFormats;
|
|
6
|
+
exports.supportsVisualRendition = supportsVisualRendition;
|
|
7
|
+
var ContentObjectApiHeaders;
|
|
8
|
+
(function (ContentObjectApiHeaders) {
|
|
9
|
+
ContentObjectApiHeaders["COLLECTION_ID"] = "x-collection-id";
|
|
10
|
+
ContentObjectApiHeaders["PROCESSING_PRIORITY"] = "x-processing-priority";
|
|
11
|
+
ContentObjectApiHeaders["CREATE_REVISION"] = "x-create-revision";
|
|
12
|
+
ContentObjectApiHeaders["REVISION_LABEL"] = "x-revision-label";
|
|
13
|
+
/** When set to 'true', prevents this update from triggering workflow rules */
|
|
14
|
+
ContentObjectApiHeaders["SUPPRESS_WORKFLOWS"] = "x-suppress-workflows";
|
|
15
|
+
})(ContentObjectApiHeaders || (exports.ContentObjectApiHeaders = ContentObjectApiHeaders = {}));
|
|
16
|
+
/**
|
|
17
|
+
* Headers for Data Store API calls.
|
|
18
|
+
* Used for Cloud Run session affinity to route requests to the same instance.
|
|
19
|
+
*/
|
|
20
|
+
var DataStoreApiHeaders;
|
|
21
|
+
(function (DataStoreApiHeaders) {
|
|
22
|
+
/** Data store ID for session affinity - routes requests for same store to same instance */
|
|
23
|
+
DataStoreApiHeaders["DATA_STORE_ID"] = "x-data-store-id";
|
|
24
|
+
})(DataStoreApiHeaders || (exports.DataStoreApiHeaders = DataStoreApiHeaders = {}));
|
|
25
|
+
var ContentObjectStatus;
|
|
26
|
+
(function (ContentObjectStatus) {
|
|
27
|
+
ContentObjectStatus["created"] = "created";
|
|
28
|
+
ContentObjectStatus["processing"] = "processing";
|
|
29
|
+
ContentObjectStatus["ready"] = "ready";
|
|
30
|
+
ContentObjectStatus["completed"] = "completed";
|
|
31
|
+
ContentObjectStatus["failed"] = "failed";
|
|
32
|
+
ContentObjectStatus["archived"] = "archived";
|
|
33
|
+
})(ContentObjectStatus || (exports.ContentObjectStatus = ContentObjectStatus = {}));
|
|
34
|
+
var ContentNature;
|
|
35
|
+
(function (ContentNature) {
|
|
36
|
+
ContentNature["Video"] = "video";
|
|
37
|
+
ContentNature["Image"] = "image";
|
|
38
|
+
ContentNature["Audio"] = "audio";
|
|
39
|
+
ContentNature["Document"] = "document";
|
|
40
|
+
ContentNature["Code"] = "code";
|
|
41
|
+
ContentNature["Other"] = "other";
|
|
42
|
+
})(ContentNature || (exports.ContentNature = ContentNature = {}));
|
|
43
|
+
exports.POSTER_RENDITION_NAME = "Poster";
|
|
44
|
+
exports.AUDIO_RENDITION_NAME = "Audio";
|
|
45
|
+
exports.WEB_VIDEO_RENDITION_NAME = "Web";
|
|
46
|
+
exports.PDF_RENDITION_NAME = "PDF";
|
|
47
|
+
var WorkflowRuleInputType;
|
|
48
|
+
(function (WorkflowRuleInputType) {
|
|
49
|
+
WorkflowRuleInputType["single"] = "single";
|
|
50
|
+
WorkflowRuleInputType["multiple"] = "multiple";
|
|
51
|
+
WorkflowRuleInputType["none"] = "none";
|
|
52
|
+
})(WorkflowRuleInputType || (exports.WorkflowRuleInputType = WorkflowRuleInputType = {}));
|
|
53
|
+
var ImageRenditionFormat;
|
|
54
|
+
(function (ImageRenditionFormat) {
|
|
55
|
+
ImageRenditionFormat["jpeg"] = "jpeg";
|
|
56
|
+
ImageRenditionFormat["png"] = "png";
|
|
57
|
+
ImageRenditionFormat["webp"] = "webp";
|
|
58
|
+
})(ImageRenditionFormat || (exports.ImageRenditionFormat = ImageRenditionFormat = {}));
|
|
59
|
+
var MarkdownRenditionFormat;
|
|
60
|
+
(function (MarkdownRenditionFormat) {
|
|
61
|
+
MarkdownRenditionFormat["docx"] = "docx";
|
|
62
|
+
MarkdownRenditionFormat["pdf"] = "pdf";
|
|
63
|
+
})(MarkdownRenditionFormat || (exports.MarkdownRenditionFormat = MarkdownRenditionFormat = {}));
|
|
64
|
+
/**
|
|
65
|
+
* Matrix of supported content type → format conversions.
|
|
66
|
+
* This is the authoritative source of truth for what renditions can be generated.
|
|
67
|
+
*
|
|
68
|
+
* Key patterns:
|
|
69
|
+
* - Exact MIME types (e.g., 'application/pdf')
|
|
70
|
+
* - Wildcard patterns (e.g., 'image/*', 'video/*')
|
|
71
|
+
*/
|
|
72
|
+
const RENDITION_COMPATIBILITY = {
|
|
73
|
+
// Image formats can generate: jpeg, png, webp
|
|
74
|
+
'image/*': [ImageRenditionFormat.jpeg, ImageRenditionFormat.png, ImageRenditionFormat.webp],
|
|
75
|
+
// Video formats can generate: jpeg, png (thumbnails)
|
|
76
|
+
'video/*': [ImageRenditionFormat.jpeg, ImageRenditionFormat.png],
|
|
77
|
+
// PDF can generate: jpeg, png, webp (page images)
|
|
78
|
+
'application/pdf': [ImageRenditionFormat.jpeg, ImageRenditionFormat.png, ImageRenditionFormat.webp],
|
|
79
|
+
// Markdown can generate: pdf, docx (NOT jpeg/png)
|
|
80
|
+
'text/markdown': [MarkdownRenditionFormat.pdf, MarkdownRenditionFormat.docx],
|
|
81
|
+
// Plain text can generate: docx
|
|
82
|
+
'text/plain': [MarkdownRenditionFormat.docx],
|
|
83
|
+
// Office documents can generate: pdf
|
|
84
|
+
'application/vnd.openxmlformats-officedocument.wordprocessingml.document': [MarkdownRenditionFormat.pdf],
|
|
85
|
+
'application/msword': [MarkdownRenditionFormat.pdf],
|
|
86
|
+
'application/vnd.openxmlformats-officedocument.presentationml.presentation': [MarkdownRenditionFormat.pdf],
|
|
87
|
+
'application/vnd.ms-powerpoint': [MarkdownRenditionFormat.pdf],
|
|
88
|
+
};
|
|
89
|
+
/**
|
|
90
|
+
* Check if a specific rendition format can be generated from a content type.
|
|
91
|
+
*
|
|
92
|
+
* @param contentType - The MIME type of the source content (e.g., 'image/png', 'text/markdown')
|
|
93
|
+
* @param format - The desired rendition format (e.g., ImageRenditionFormat.jpeg)
|
|
94
|
+
* @returns true if the format can be generated from the content type
|
|
95
|
+
*
|
|
96
|
+
* @example
|
|
97
|
+
* canGenerateRendition('image/png', ImageRenditionFormat.jpeg) // true
|
|
98
|
+
* canGenerateRendition('text/markdown', ImageRenditionFormat.jpeg) // false
|
|
99
|
+
* canGenerateRendition('text/markdown', MarkdownRenditionFormat.pdf) // true
|
|
100
|
+
*/
|
|
101
|
+
function canGenerateRendition(contentType, format) {
|
|
102
|
+
if (!contentType)
|
|
103
|
+
return false;
|
|
104
|
+
const formatStr = typeof format === 'string' ? format : format;
|
|
105
|
+
// Check exact match first
|
|
106
|
+
const exactMatch = RENDITION_COMPATIBILITY[contentType];
|
|
107
|
+
if (exactMatch && exactMatch.some(f => f === formatStr)) {
|
|
108
|
+
return true;
|
|
109
|
+
}
|
|
110
|
+
// Check wildcard patterns (e.g., 'image/*', 'video/*')
|
|
111
|
+
const [category] = contentType.split('/');
|
|
112
|
+
const wildcardKey = `${category}/*`;
|
|
113
|
+
const wildcardMatch = RENDITION_COMPATIBILITY[wildcardKey];
|
|
114
|
+
if (wildcardMatch && wildcardMatch.some(f => f === formatStr)) {
|
|
115
|
+
return true;
|
|
116
|
+
}
|
|
117
|
+
return false;
|
|
118
|
+
}
|
|
119
|
+
/**
|
|
120
|
+
* Get the list of rendition formats supported for a given content type.
|
|
121
|
+
*
|
|
122
|
+
* @param contentType - The MIME type of the source content
|
|
123
|
+
* @returns Array of supported rendition formats, or empty array if none
|
|
124
|
+
*
|
|
125
|
+
* @example
|
|
126
|
+
* getSupportedRenditionFormats('image/png') // [jpeg, png, webp]
|
|
127
|
+
* getSupportedRenditionFormats('text/markdown') // [pdf, docx]
|
|
128
|
+
* getSupportedRenditionFormats('text/html') // []
|
|
129
|
+
*/
|
|
130
|
+
function getSupportedRenditionFormats(contentType) {
|
|
131
|
+
if (!contentType)
|
|
132
|
+
return [];
|
|
133
|
+
// Check exact match first
|
|
134
|
+
if (RENDITION_COMPATIBILITY[contentType]) {
|
|
135
|
+
return [...RENDITION_COMPATIBILITY[contentType]];
|
|
136
|
+
}
|
|
137
|
+
// Check wildcard patterns
|
|
138
|
+
const [category] = contentType.split('/');
|
|
139
|
+
const wildcardKey = `${category}/*`;
|
|
140
|
+
const wildcardMatch = RENDITION_COMPATIBILITY[wildcardKey];
|
|
141
|
+
if (wildcardMatch) {
|
|
142
|
+
return [...wildcardMatch];
|
|
143
|
+
}
|
|
144
|
+
return [];
|
|
145
|
+
}
|
|
146
|
+
/**
|
|
147
|
+
* Check if a content type supports visual (image) renditions.
|
|
148
|
+
* This is useful for determining if a document can have thumbnails/previews.
|
|
149
|
+
*
|
|
150
|
+
* @param contentType - The MIME type of the source content
|
|
151
|
+
* @returns true if the content type can generate JPEG renditions
|
|
152
|
+
*
|
|
153
|
+
* @example
|
|
154
|
+
* supportsVisualRendition('image/png') // true
|
|
155
|
+
* supportsVisualRendition('application/pdf') // true
|
|
156
|
+
* supportsVisualRendition('text/markdown') // false
|
|
157
|
+
*/
|
|
158
|
+
function supportsVisualRendition(contentType) {
|
|
159
|
+
return canGenerateRendition(contentType, ImageRenditionFormat.jpeg);
|
|
160
|
+
}
|
|
161
|
+
var ContentObjectProcessingPriority;
|
|
162
|
+
(function (ContentObjectProcessingPriority) {
|
|
163
|
+
ContentObjectProcessingPriority["normal"] = "normal";
|
|
164
|
+
ContentObjectProcessingPriority["low"] = "low";
|
|
165
|
+
})(ContentObjectProcessingPriority || (exports.ContentObjectProcessingPriority = ContentObjectProcessingPriority = {}));
|
|
166
|
+
//# sourceMappingURL=store.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"store.js","sourceRoot":"","sources":["../../../src/store/store.ts"],"names":[],"mappings":";;;AA8dA,oDAoBC;AAaD,oEAiBC;AAcD,0DAEC;AA3hBD,IAAY,uBAOX;AAPD,WAAY,uBAAuB;IAC/B,4DAAiC,CAAA;IACjC,wEAA6C,CAAA;IAC7C,gEAAqC,CAAA;IACrC,8DAAmC,CAAA;IACnC,8EAA8E;IAC9E,sEAA2C,CAAA;AAC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value: true });
|
|
3
|
+
exports.ParentClosePolicy = void 0;
|
|
4
|
+
exports.ParentClosePolicy = {
|
|
5
|
+
/**
|
|
6
|
+
* When the Parent is Closed, the Child is Terminated.
|
|
7
|
+
*
|
|
8
|
+
* @default
|
|
9
|
+
*/
|
|
10
|
+
TERMINATE: "TERMINATE",
|
|
11
|
+
/**
|
|
12
|
+
* When the Parent is Closed, nothing is done to the Child.
|
|
13
|
+
*/
|
|
14
|
+
ABANDON: "ABANDON",
|
|
15
|
+
/**
|
|
16
|
+
* When the Parent is Closed, the Child is Cancelled.
|
|
17
|
+
*/
|
|
18
|
+
REQUEST_CANCEL: "REQUEST_CANCEL",
|
|
19
|
+
/**
|
|
20
|
+
* If a `ParentClosePolicy` is set to this, or is not set at all, the server default value will be used.
|
|
21
|
+
*
|
|
22
|
+
* @deprecated Either leave property `undefined`, or set an explicit policy instead.
|
|
23
|
+
*/
|
|
24
|
+
PARENT_CLOSE_POLICY_UNSPECIFIED: undefined,
|
|
25
|
+
/**
|
|
26
|
+
* When the Parent is Closed, the Child is Terminated.
|
|
27
|
+
*
|
|
28
|
+
* @deprecated Use {@link ParentClosePolicy.TERMINATE} instead.
|
|
29
|
+
*/
|
|
30
|
+
PARENT_CLOSE_POLICY_TERMINATE: "TERMINATE",
|
|
31
|
+
/**
|
|
32
|
+
* When the Parent is Closed, nothing is done to the Child.
|
|
33
|
+
*
|
|
34
|
+
* @deprecated Use {@link ParentClosePolicy.ABANDON} instead.
|
|
35
|
+
*/
|
|
36
|
+
PARENT_CLOSE_POLICY_ABANDON: "ABANDON",
|
|
37
|
+
/**
|
|
38
|
+
* When the Parent is Closed, the Child is Cancelled.
|
|
39
|
+
*
|
|
40
|
+
* @deprecated Use {@link ParentClosePolicy.REQUEST_CANCEL} instead.
|
|
41
|
+
*/
|
|
42
|
+
PARENT_CLOSE_POLICY_REQUEST_CANCEL: "REQUEST_CANCEL"
|
|
43
|
+
};
|
|
44
|
+
//# sourceMappingURL=temporalio.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"temporalio.js","sourceRoot":"","sources":["../../../src/store/temporalio.ts"],"names":[],"mappings":";;;AAca,QAAA,iBAAiB,GAAG;IAC7B;;;;OAIG;IACH,SAAS,EAAE,WAAW;IACtB;;OAEG;IACH,OAAO,EAAE,SAAS;IAClB;;OAEG;IACH,cAAc,EAAE,gBAAgB;IAChC;;;;OAIG;IACH,+BAA+B,EAAE,SAAS;IAC1C;;;;OAIG;IACH,6BAA6B,EAAE,WAAW;IAC1C;;;;OAIG;IACH,2BAA2B,EAAE,SAAS;IACtC;;;;OAIG;IACH,kCAAkC,EAAE,gBAAgB;CACjC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"worker.js","sourceRoot":"","sources":["../../../src/store/worker.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,241 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.LOW_PRIORITY_TASK_QUEUE = exports.FileProcessingStatus = exports.AgentMessageType = exports.WorkflowExecutionStatus = exports.ContentEventName = void 0;
|
|
4
|
+
exports.getDocumentIds = getDocumentIds;
|
|
5
|
+
exports.isCompactMessage = isCompactMessage;
|
|
6
|
+
exports.isLegacyMessage = isLegacyMessage;
|
|
7
|
+
exports.normalizeMessageType = normalizeMessageType;
|
|
8
|
+
exports.toCompactMessage = toCompactMessage;
|
|
9
|
+
exports.parseMessage = parseMessage;
|
|
10
|
+
exports.createCompactMessage = createCompactMessage;
|
|
11
|
+
exports.toAgentMessage = toAgentMessage;
|
|
12
|
+
exports.getWorkflowChannel = getWorkflowChannel;
|
|
13
|
+
exports.getWorkflowUpdatesKey = getWorkflowUpdatesKey;
|
|
14
|
+
var ContentEventName;
|
|
15
|
+
(function (ContentEventName) {
|
|
16
|
+
ContentEventName["create"] = "create";
|
|
17
|
+
ContentEventName["change_type"] = "change_type";
|
|
18
|
+
ContentEventName["update"] = "update";
|
|
19
|
+
ContentEventName["revision_created"] = "revision_created";
|
|
20
|
+
ContentEventName["delete"] = "delete";
|
|
21
|
+
ContentEventName["workflow_finished"] = "workflow_finished";
|
|
22
|
+
ContentEventName["workflow_execution_request"] = "workflow_execution_request";
|
|
23
|
+
ContentEventName["api_request"] = "api_request";
|
|
24
|
+
})(ContentEventName || (exports.ContentEventName = ContentEventName = {}));
|
|
25
|
+
function getDocumentIds(payload) {
|
|
26
|
+
if ("objectIds" in payload) {
|
|
27
|
+
return payload.objectIds;
|
|
28
|
+
}
|
|
29
|
+
return [];
|
|
30
|
+
}
|
|
31
|
+
var WorkflowExecutionStatus;
|
|
32
|
+
(function (WorkflowExecutionStatus) {
|
|
33
|
+
WorkflowExecutionStatus[WorkflowExecutionStatus["UNKNOWN"] = 0] = "UNKNOWN";
|
|
34
|
+
WorkflowExecutionStatus[WorkflowExecutionStatus["RUNNING"] = 1] = "RUNNING";
|
|
35
|
+
WorkflowExecutionStatus[WorkflowExecutionStatus["COMPLETED"] = 2] = "COMPLETED";
|
|
36
|
+
WorkflowExecutionStatus[WorkflowExecutionStatus["FAILED"] = 3] = "FAILED";
|
|
37
|
+
WorkflowExecutionStatus[WorkflowExecutionStatus["CANCELED"] = 4] = "CANCELED";
|
|
38
|
+
WorkflowExecutionStatus[WorkflowExecutionStatus["TERMINATED"] = 5] = "TERMINATED";
|
|
39
|
+
WorkflowExecutionStatus[WorkflowExecutionStatus["CONTINUED_AS_NEW"] = 6] = "CONTINUED_AS_NEW";
|
|
40
|
+
WorkflowExecutionStatus[WorkflowExecutionStatus["TIMED_OUT"] = 7] = "TIMED_OUT";
|
|
41
|
+
})(WorkflowExecutionStatus || (exports.WorkflowExecutionStatus = WorkflowExecutionStatus = {}));
|
|
42
|
+
var AgentMessageType;
|
|
43
|
+
(function (AgentMessageType) {
|
|
44
|
+
AgentMessageType[AgentMessageType["SYSTEM"] = 0] = "SYSTEM";
|
|
45
|
+
AgentMessageType[AgentMessageType["THOUGHT"] = 1] = "THOUGHT";
|
|
46
|
+
AgentMessageType[AgentMessageType["PLAN"] = 2] = "PLAN";
|
|
47
|
+
AgentMessageType[AgentMessageType["UPDATE"] = 3] = "UPDATE";
|
|
48
|
+
AgentMessageType[AgentMessageType["COMPLETE"] = 4] = "COMPLETE";
|
|
49
|
+
AgentMessageType[AgentMessageType["WARNING"] = 5] = "WARNING";
|
|
50
|
+
AgentMessageType[AgentMessageType["ERROR"] = 6] = "ERROR";
|
|
51
|
+
AgentMessageType[AgentMessageType["ANSWER"] = 7] = "ANSWER";
|
|
52
|
+
AgentMessageType[AgentMessageType["QUESTION"] = 8] = "QUESTION";
|
|
53
|
+
AgentMessageType[AgentMessageType["REQUEST_INPUT"] = 9] = "REQUEST_INPUT";
|
|
54
|
+
AgentMessageType[AgentMessageType["IDLE"] = 10] = "IDLE";
|
|
55
|
+
AgentMessageType[AgentMessageType["TERMINATED"] = 11] = "TERMINATED";
|
|
56
|
+
AgentMessageType[AgentMessageType["STREAMING_CHUNK"] = 12] = "STREAMING_CHUNK";
|
|
57
|
+
AgentMessageType[AgentMessageType["BATCH_PROGRESS"] = 13] = "BATCH_PROGRESS";
|
|
58
|
+
})(AgentMessageType || (exports.AgentMessageType = AgentMessageType = {}));
|
|
59
|
+
// ============================================
|
|
60
|
+
// TYPE GUARDS
|
|
61
|
+
// ============================================
|
|
62
|
+
/**
|
|
63
|
+
* Check if a message is in compact format
|
|
64
|
+
*/
|
|
65
|
+
function isCompactMessage(msg) {
|
|
66
|
+
return typeof msg === 'object' && msg !== null && 't' in msg;
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Check if a message is in legacy format
|
|
70
|
+
*/
|
|
71
|
+
function isLegacyMessage(msg) {
|
|
72
|
+
return typeof msg === 'object' && msg !== null && 'type' in msg && !('t' in msg);
|
|
73
|
+
}
|
|
74
|
+
// ============================================
|
|
75
|
+
// CONVERTERS
|
|
76
|
+
// ============================================
|
|
77
|
+
/**
|
|
78
|
+
* Map old string enum values to AgentMessageType
|
|
79
|
+
*/
|
|
80
|
+
const STRING_TO_TYPE_MAP = {
|
|
81
|
+
'system': AgentMessageType.SYSTEM,
|
|
82
|
+
'thought': AgentMessageType.THOUGHT,
|
|
83
|
+
'plan': AgentMessageType.PLAN,
|
|
84
|
+
'update': AgentMessageType.UPDATE,
|
|
85
|
+
'complete': AgentMessageType.COMPLETE,
|
|
86
|
+
'warning': AgentMessageType.WARNING,
|
|
87
|
+
'error': AgentMessageType.ERROR,
|
|
88
|
+
'answer': AgentMessageType.ANSWER,
|
|
89
|
+
'question': AgentMessageType.QUESTION,
|
|
90
|
+
'request_input': AgentMessageType.REQUEST_INPUT,
|
|
91
|
+
'idle': AgentMessageType.IDLE,
|
|
92
|
+
'terminated': AgentMessageType.TERMINATED,
|
|
93
|
+
'streaming_chunk': AgentMessageType.STREAMING_CHUNK,
|
|
94
|
+
'batch_progress': AgentMessageType.BATCH_PROGRESS,
|
|
95
|
+
};
|
|
96
|
+
/**
|
|
97
|
+
* Map integer values to AgentMessageType (primary format)
|
|
98
|
+
*/
|
|
99
|
+
const INT_TO_TYPE_MAP = {
|
|
100
|
+
0: AgentMessageType.SYSTEM,
|
|
101
|
+
1: AgentMessageType.THOUGHT,
|
|
102
|
+
2: AgentMessageType.PLAN,
|
|
103
|
+
3: AgentMessageType.UPDATE,
|
|
104
|
+
4: AgentMessageType.COMPLETE,
|
|
105
|
+
5: AgentMessageType.WARNING,
|
|
106
|
+
6: AgentMessageType.ERROR,
|
|
107
|
+
7: AgentMessageType.ANSWER,
|
|
108
|
+
8: AgentMessageType.QUESTION,
|
|
109
|
+
9: AgentMessageType.REQUEST_INPUT,
|
|
110
|
+
10: AgentMessageType.IDLE,
|
|
111
|
+
11: AgentMessageType.TERMINATED,
|
|
112
|
+
12: AgentMessageType.STREAMING_CHUNK,
|
|
113
|
+
13: AgentMessageType.BATCH_PROGRESS,
|
|
114
|
+
};
|
|
115
|
+
/**
|
|
116
|
+
* Normalize message type from string or number to AgentMessageType
|
|
117
|
+
*/
|
|
118
|
+
function normalizeMessageType(type) {
|
|
119
|
+
// Handle integer type (current format and AgentMessageType enum values)
|
|
120
|
+
if (typeof type === 'number') {
|
|
121
|
+
return INT_TO_TYPE_MAP[type] ?? AgentMessageType.UPDATE;
|
|
122
|
+
}
|
|
123
|
+
// Handle string type (legacy messages from Redis with 90-day TTL)
|
|
124
|
+
if (typeof type === 'string') {
|
|
125
|
+
return STRING_TO_TYPE_MAP[type] ?? AgentMessageType.UPDATE;
|
|
126
|
+
}
|
|
127
|
+
return AgentMessageType.UPDATE;
|
|
128
|
+
}
|
|
129
|
+
/**
|
|
130
|
+
* Convert legacy AgentMessage to CompactMessage
|
|
131
|
+
*/
|
|
132
|
+
function toCompactMessage(legacy) {
|
|
133
|
+
const compact = {
|
|
134
|
+
t: normalizeMessageType(legacy.type),
|
|
135
|
+
};
|
|
136
|
+
if (legacy.message)
|
|
137
|
+
compact.m = legacy.message;
|
|
138
|
+
if (legacy.workstream_id && legacy.workstream_id !== 'main')
|
|
139
|
+
compact.w = legacy.workstream_id;
|
|
140
|
+
if (legacy.timestamp)
|
|
141
|
+
compact.ts = legacy.timestamp;
|
|
142
|
+
// Handle legacy streaming chunk details
|
|
143
|
+
if (compact.t === AgentMessageType.STREAMING_CHUNK && legacy.details) {
|
|
144
|
+
const d = legacy.details;
|
|
145
|
+
if (d.is_final)
|
|
146
|
+
compact.f = 1;
|
|
147
|
+
// streaming_id and chunk_index are no longer needed
|
|
148
|
+
}
|
|
149
|
+
else if (legacy.details) {
|
|
150
|
+
compact.d = legacy.details;
|
|
151
|
+
}
|
|
152
|
+
return compact;
|
|
153
|
+
}
|
|
154
|
+
/**
|
|
155
|
+
* Parse any message format (compact or legacy) into CompactMessage.
|
|
156
|
+
* Use this as the entry point for all received messages.
|
|
157
|
+
*/
|
|
158
|
+
function parseMessage(data) {
|
|
159
|
+
const parsed = typeof data === 'string' ? JSON.parse(data) : data;
|
|
160
|
+
if (isCompactMessage(parsed))
|
|
161
|
+
return parsed;
|
|
162
|
+
if (isLegacyMessage(parsed))
|
|
163
|
+
return toCompactMessage(parsed);
|
|
164
|
+
throw new Error('Unknown message format');
|
|
165
|
+
}
|
|
166
|
+
/**
|
|
167
|
+
* Create a compact message (convenience function for server-side)
|
|
168
|
+
*/
|
|
169
|
+
function createCompactMessage(type, options = {}) {
|
|
170
|
+
const compact = { t: type };
|
|
171
|
+
if (options.message)
|
|
172
|
+
compact.m = options.message;
|
|
173
|
+
if (options.workstreamId && options.workstreamId !== 'main')
|
|
174
|
+
compact.w = options.workstreamId;
|
|
175
|
+
if (options.details)
|
|
176
|
+
compact.d = options.details;
|
|
177
|
+
if (options.isFinal)
|
|
178
|
+
compact.f = 1;
|
|
179
|
+
if (options.timestamp)
|
|
180
|
+
compact.ts = options.timestamp;
|
|
181
|
+
return compact;
|
|
182
|
+
}
|
|
183
|
+
/**
|
|
184
|
+
* Convert CompactMessage back to AgentMessage (for UI components).
|
|
185
|
+
* This allows UI to continue using familiar field names while wire format is compact.
|
|
186
|
+
* @param compact The compact message to convert
|
|
187
|
+
* @param workflowRunId Optional workflow_run_id (known from SSE context, not in compact format)
|
|
188
|
+
*/
|
|
189
|
+
function toAgentMessage(compact, workflowRunId = '') {
|
|
190
|
+
const message = {
|
|
191
|
+
type: compact.t,
|
|
192
|
+
timestamp: compact.ts || Date.now(),
|
|
193
|
+
workflow_run_id: workflowRunId,
|
|
194
|
+
message: compact.m || '',
|
|
195
|
+
workstream_id: compact.w || 'main',
|
|
196
|
+
};
|
|
197
|
+
if (compact.d !== undefined)
|
|
198
|
+
message.details = compact.d;
|
|
199
|
+
// For streaming chunks, restore is_final and streaming_id in details
|
|
200
|
+
// (streaming_id removed from wire format, use workstream_id as grouping key)
|
|
201
|
+
if (compact.t === AgentMessageType.STREAMING_CHUNK) {
|
|
202
|
+
message.details = {
|
|
203
|
+
...(typeof compact.d === 'object' ? compact.d : {}),
|
|
204
|
+
streaming_id: compact.w || 'main', // Use workstream_id as streaming_id
|
|
205
|
+
is_final: compact.f === 1,
|
|
206
|
+
};
|
|
207
|
+
}
|
|
208
|
+
return message;
|
|
209
|
+
}
|
|
210
|
+
/**
|
|
211
|
+
* Status of a file being processed for conversation use.
|
|
212
|
+
*/
|
|
213
|
+
var FileProcessingStatus;
|
|
214
|
+
(function (FileProcessingStatus) {
|
|
215
|
+
/** File is being uploaded to artifact storage */
|
|
216
|
+
FileProcessingStatus["UPLOADING"] = "uploading";
|
|
217
|
+
/** File uploaded, text extraction in progress */
|
|
218
|
+
FileProcessingStatus["PROCESSING"] = "processing";
|
|
219
|
+
/** File is ready for use in conversation */
|
|
220
|
+
FileProcessingStatus["READY"] = "ready";
|
|
221
|
+
/** File processing failed */
|
|
222
|
+
FileProcessingStatus["ERROR"] = "error";
|
|
223
|
+
})(FileProcessingStatus || (exports.FileProcessingStatus = FileProcessingStatus = {}));
|
|
224
|
+
/**
|
|
225
|
+
* Get the Redis pub/sub channel name for workflow messages.
|
|
226
|
+
* Used by both publishers (workflow activities, studio-server) and subscribers (zeno-server, clients).
|
|
227
|
+
* @param workflowRunId - The Temporal workflow run ID (NOT the interaction execution run ID)
|
|
228
|
+
*/
|
|
229
|
+
function getWorkflowChannel(workflowRunId) {
|
|
230
|
+
return `workflow:${workflowRunId}:channel`;
|
|
231
|
+
}
|
|
232
|
+
/**
|
|
233
|
+
* Get the Redis list key for storing workflow message history.
|
|
234
|
+
* Messages are stored here for retrieval by reconnecting clients.
|
|
235
|
+
* @param workflowRunId - The Temporal workflow run ID (NOT the interaction execution run ID)
|
|
236
|
+
*/
|
|
237
|
+
function getWorkflowUpdatesKey(workflowRunId) {
|
|
238
|
+
return `workflow:${workflowRunId}:updates`;
|
|
239
|
+
}
|
|
240
|
+
exports.LOW_PRIORITY_TASK_QUEUE = "low_priority";
|
|
241
|
+
//# sourceMappingURL=workflow.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workflow.js","sourceRoot":"","sources":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C,aAAqB;IACpD,OAAO,YAAY,aAAa,UAAU,CAAC;AAC/C,CAAC;AAED;;;;GAIG;AACH,SAAgB,qBAAqB,CAAC,aAAqB;IACvD,OAAO,YAAY,aAAa,UAAU,CAAC;AAC/C,CAAC;AAeY,QAAA,uBAAuB,GAAG,cAAc,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* STS Token Request Types
|
|
4
|
+
* These types define the structure for token requests to the Security Token Service
|
|
5
|
+
*/
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.isApiKeyRequest = isApiKeyRequest;
|
|
8
|
+
exports.isUserRequest = isUserRequest;
|
|
9
|
+
exports.isProjectRequest = isProjectRequest;
|
|
10
|
+
exports.isEnvironmentRequest = isEnvironmentRequest;
|
|
11
|
+
exports.isAgentRequest = isAgentRequest;
|
|
12
|
+
exports.isServiceAccountRequest = isServiceAccountRequest;
|
|
13
|
+
// Helper type guards for type narrowing
|
|
14
|
+
function isApiKeyRequest(req) {
|
|
15
|
+
return req.type === 'apikey';
|
|
16
|
+
}
|
|
17
|
+
function isUserRequest(req) {
|
|
18
|
+
return req.type === 'user';
|
|
19
|
+
}
|
|
20
|
+
function isProjectRequest(req) {
|
|
21
|
+
return req.type === 'project';
|
|
22
|
+
}
|
|
23
|
+
function isEnvironmentRequest(req) {
|
|
24
|
+
return req.type === 'environment';
|
|
25
|
+
}
|
|
26
|
+
function isAgentRequest(req) {
|
|
27
|
+
return req.type === 'agent';
|
|
28
|
+
}
|
|
29
|
+
function isServiceAccountRequest(req) {
|
|
30
|
+
return req.type === 'service_account';
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=sts-token-types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sts-token-types.js","sourceRoot":"","sources":["../../src/sts-token-types.ts"],"names":[],"mappings":";AAAA;;;GAGG;;AAgFH,0CAEC;AAED,sCAEC;AAED,4CAEC;AAED,oDAEC;AAED,wCAEC;AAED,0DAEC;AAvBD,wCAAwC;AACxC,SAAgB,eAAe,CAAC,GAAsB;IAClD,OAAO,GAAG,CAAC,IAAI,KAAK,QAAQ,CAAC;AACjC,CAAC;AAED,SAAgB,aAAa,CAAC,GAAsB;IAChD,OAAO,GAAG,CAAC,IAAI,KAAK,MAAM,CAAC;AAC/B,CAAC;AAED,SAAgB,gBAAgB,CAAC,GAAsB;IACnD,OAAO,GAAG,CAAC,IAAI,KAAK,SAAS,CAAC;AAClC,CAAC;AAED,SAAgB,oBAAoB,CAAC,GAAsB;IACvD,OAAO,GAAG,CAAC,IAAI,KAAK,aAAa,CAAC;AACtC,CAAC;AAED,SAAgB,cAAc,CAAC,GAAsB;IACjD,OAAO,GAAG,CAAC,IAAI,KAAK,OAAO,CAAC;AAChC,CAAC;AAED,SAAgB,uBAAuB,CAAC,GAAsB;IAC1D,OAAO,GAAG,CAAC,IAAI,KAAK,iBAAiB,CAAC;AAC1C,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tenant.js","sourceRoot":"","sources":["../../src/tenant.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tool-execution.js","sourceRoot":"","sources":["../../src/tool-execution.ts"],"names":[],"mappings":";AAAA;;GAEG"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TrainingSessionStatus = void 0;
|
|
4
|
+
var TrainingSessionStatus;
|
|
5
|
+
(function (TrainingSessionStatus) {
|
|
6
|
+
TrainingSessionStatus["created"] = "created";
|
|
7
|
+
TrainingSessionStatus["building"] = "building";
|
|
8
|
+
TrainingSessionStatus["prepared"] = "prepared";
|
|
9
|
+
TrainingSessionStatus["processing"] = "processing";
|
|
10
|
+
TrainingSessionStatus["completed"] = "completed";
|
|
11
|
+
TrainingSessionStatus["cancelled"] = "cancelled";
|
|
12
|
+
TrainingSessionStatus["failed"] = "failed";
|
|
13
|
+
})(TrainingSessionStatus || (exports.TrainingSessionStatus = TrainingSessionStatus = {}));
|
|
14
|
+
//# sourceMappingURL=training.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"training.js","sourceRoot":"","sources":["../../src/training.ts"],"names":[],"mappings":";;;AAGA,IAAY,qBAQX;AARD,WAAY,qBAAqB;IAC7B,4CAAqB,CAAA;IACrB,8CAAuB,CAAA;IACvB,8CAAuB,CAAA;IACvB,kDAA2B,CAAA;IAC3B,gDAAyB,CAAA;IACzB,gDAAyB,CAAA;IACzB,0CAAmB,CAAA;AACvB,CAAC,EARW,qBAAqB,qCAArB,qBAAqB,QAQhC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TransientTokenType = void 0;
|
|
4
|
+
var TransientTokenType;
|
|
5
|
+
(function (TransientTokenType) {
|
|
6
|
+
TransientTokenType["userInvite"] = "user-invite";
|
|
7
|
+
TransientTokenType["migration"] = "migration";
|
|
8
|
+
})(TransientTokenType || (exports.TransientTokenType = TransientTokenType = {}));
|
|
9
|
+
//# sourceMappingURL=transient-tokens.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transient-tokens.js","sourceRoot":"","sources":["../../src/transient-tokens.ts"],"names":[],"mappings":";;;AAIA,IAAY,kBAGX;AAHD,WAAY,kBAAkB;IAC1B,gDAA0B,CAAA;IAC1B,6CAAuB,CAAA;AAC3B,CAAC,EAHW,kBAAkB,kCAAlB,kBAAkB,QAG7B"}
|
package/lib/cjs/user.js
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AccountRefPopulate = exports.AccountType = exports.BillingMethod = exports.Datacenters = exports.UserRefPopulate = void 0;
|
|
4
|
+
exports.UserRefPopulate = "id name email picture";
|
|
5
|
+
var Datacenters;
|
|
6
|
+
(function (Datacenters) {
|
|
7
|
+
Datacenters["aws"] = "aws";
|
|
8
|
+
Datacenters["gcp"] = "gcp";
|
|
9
|
+
Datacenters["azure"] = "azure";
|
|
10
|
+
})(Datacenters || (exports.Datacenters = Datacenters = {}));
|
|
11
|
+
var BillingMethod;
|
|
12
|
+
(function (BillingMethod) {
|
|
13
|
+
BillingMethod["stripe"] = "stripe";
|
|
14
|
+
BillingMethod["invoice"] = "invoice";
|
|
15
|
+
})(BillingMethod || (exports.BillingMethod = BillingMethod = {}));
|
|
16
|
+
var AccountType;
|
|
17
|
+
(function (AccountType) {
|
|
18
|
+
AccountType["vertesia"] = "vertesia";
|
|
19
|
+
AccountType["partner"] = "partner";
|
|
20
|
+
AccountType["free"] = "free";
|
|
21
|
+
AccountType["customer"] = "customer";
|
|
22
|
+
AccountType["unknown"] = "unknown";
|
|
23
|
+
})(AccountType || (exports.AccountType = AccountType = {}));
|
|
24
|
+
exports.AccountRefPopulate = "id name";
|
|
25
|
+
//# sourceMappingURL=user.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"user.js","sourceRoot":"","sources":["../../src/user.ts"],"names":[],"mappings":";;;AA8Ba,QAAA,eAAe,GAAG,uBAAuB,CAAC;AAEvD,IAAY,WAIX;AAJD,WAAY,WAAW;IACnB,0BAAW,CAAA;IACX,0BAAW,CAAA;IACX,8BAAe,CAAA;AACnB,CAAC,EAJW,WAAW,2BAAX,WAAW,QAItB;AAGD,IAAY,aAGX;AAHD,WAAY,aAAa;IACrB,kCAAiB,CAAA;IACjB,oCAAmB,CAAA;AACvB,CAAC,EAHW,aAAa,6BAAb,aAAa,QAGxB;AAED,IAAY,WAMX;AAND,WAAY,WAAW;IACnB,oCAAqB,CAAA;IACrB,kCAAmB,CAAA;IACnB,4BAAa,CAAA;IACb,oCAAqB,CAAA;IACrB,kCAAmB,CAAA;AACvB,CAAC,EANW,WAAW,2BAAX,WAAW,QAMtB;AA4CY,QAAA,kBAAkB,GAAG,SAAS,CAAC"}
|