@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,244 @@
|
|
|
1
|
+
import { StringValue } from "ms";
|
|
2
|
+
import { BaseObject } from "./common.js";
|
|
3
|
+
import { WorkflowExecutionPayload } from "./index.js";
|
|
4
|
+
import { ParentClosePolicyType } from "./temporalio.js";
|
|
5
|
+
/**
|
|
6
|
+
* The payload sent when starting a workflow from the temporal client to the workflow instance.
|
|
7
|
+
*/
|
|
8
|
+
export interface DSLWorkflowExecutionPayload extends WorkflowExecutionPayload {
|
|
9
|
+
/**
|
|
10
|
+
* The workflow definition to be used by the DSL workflow.
|
|
11
|
+
* If a dsl workflow is executed and no definition is provided the workflow will fail.
|
|
12
|
+
*/
|
|
13
|
+
workflow: DSLWorkflowSpec;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* The payload for a DSL activity options.
|
|
17
|
+
*
|
|
18
|
+
* @see ActivityOptions in @temporalio/common
|
|
19
|
+
*/
|
|
20
|
+
export interface DSLActivityOptions {
|
|
21
|
+
startToCloseTimeout?: StringValue | number;
|
|
22
|
+
scheduleToStartTimeout?: StringValue | number;
|
|
23
|
+
scheduleToCloseTimeout?: StringValue | number;
|
|
24
|
+
retry?: DSLRetryPolicy;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* The payload for a DSL retry policy.
|
|
28
|
+
*
|
|
29
|
+
* @see RetryPolicy in @temporalio/common
|
|
30
|
+
*/
|
|
31
|
+
export interface DSLRetryPolicy {
|
|
32
|
+
backoffCoefficient?: number;
|
|
33
|
+
initialInterval?: StringValue | number;
|
|
34
|
+
maximumAttempts?: number;
|
|
35
|
+
maximumInterval?: StringValue | number;
|
|
36
|
+
nonRetryableErrorTypes?: string[];
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* The payload for a DSL activity execution.
|
|
40
|
+
*/
|
|
41
|
+
export interface DSLActivityExecutionPayload<ParamsT extends Record<string, any>> extends WorkflowExecutionPayload {
|
|
42
|
+
activity: DSLActivitySpec;
|
|
43
|
+
params: ParamsT;
|
|
44
|
+
workflow_name: string;
|
|
45
|
+
debug_mode?: boolean;
|
|
46
|
+
}
|
|
47
|
+
export type ImportSpec = (string | Record<string, string>)[];
|
|
48
|
+
export interface ActivityFetchSpec {
|
|
49
|
+
/**
|
|
50
|
+
* The data provider name
|
|
51
|
+
*/
|
|
52
|
+
type: "document" | "document_type" | "interaction_run";
|
|
53
|
+
/**
|
|
54
|
+
* An optional URI to the data source.
|
|
55
|
+
*/
|
|
56
|
+
source?: string;
|
|
57
|
+
/**
|
|
58
|
+
* The query to be executed by the data provider
|
|
59
|
+
*/
|
|
60
|
+
query: Record<string, any>;
|
|
61
|
+
/**
|
|
62
|
+
* a string of space separated field names.
|
|
63
|
+
* Prefix a field name with "-" to exclude it from the result.
|
|
64
|
+
*/
|
|
65
|
+
select?: string;
|
|
66
|
+
/**
|
|
67
|
+
* The number of results to return. If the result is limited to 1 the result will be a single object
|
|
68
|
+
*/
|
|
69
|
+
limit?: number;
|
|
70
|
+
/**
|
|
71
|
+
* How to handle not found objects.
|
|
72
|
+
* 1. ignore - Ignore and return an empty array for multi objects query (or undefined for single object query) or empty array for multiple objects throw an error.
|
|
73
|
+
* 2. throw - Throw an error if the object or no objects are found.
|
|
74
|
+
*/
|
|
75
|
+
on_not_found?: "ignore" | "throw";
|
|
76
|
+
}
|
|
77
|
+
export interface DSLWorkflowStepBase {
|
|
78
|
+
/**
|
|
79
|
+
* The type fo the step.
|
|
80
|
+
* If not set defaults to "activity"
|
|
81
|
+
*/
|
|
82
|
+
type: "activity" | "workflow";
|
|
83
|
+
}
|
|
84
|
+
export interface DSLActivitySpec<PARAMS extends Record<string, any> = Record<string, any>> {
|
|
85
|
+
/**
|
|
86
|
+
* The name of the activity function
|
|
87
|
+
*/
|
|
88
|
+
name: string;
|
|
89
|
+
/**
|
|
90
|
+
* Title of the activity to be displayed in the UI workflow builder
|
|
91
|
+
*/
|
|
92
|
+
title?: string;
|
|
93
|
+
/**
|
|
94
|
+
* The description of the activity to e displayed in the UI workflow builder
|
|
95
|
+
*/
|
|
96
|
+
description?: string;
|
|
97
|
+
/**
|
|
98
|
+
* Activities parameters. These parameters can be either literals
|
|
99
|
+
* (hardcoded strings, numbers, booleans, objects, arrays etc.), either
|
|
100
|
+
* references to the workflow variables.
|
|
101
|
+
* The workflow variables are built from the workflow params (e.g. the workflow configuration)
|
|
102
|
+
* and from the result of the previous activities.
|
|
103
|
+
*/
|
|
104
|
+
params?: PARAMS;
|
|
105
|
+
/**
|
|
106
|
+
* The name of the workflow variable that will store the result of the activity
|
|
107
|
+
* If not specified the result will not be stored
|
|
108
|
+
* The parameters describe how the actual parameters will be obtained from the workflow execution vars.
|
|
109
|
+
* since it may contain references to workflow execution vars.
|
|
110
|
+
*/
|
|
111
|
+
output?: string;
|
|
112
|
+
/**
|
|
113
|
+
* A JSON expression which evaluate to true or false similar to mongo matches.
|
|
114
|
+
* We support for now basic expression like: $true, $false, $eq, $ne, $gt, $gte, $lt, $lte, $in, $nin, $regexp
|
|
115
|
+
* {$eq: {name: value}},
|
|
116
|
+
* Ex: {$eq: {wfVarName: value}}
|
|
117
|
+
*/
|
|
118
|
+
condition?: Record<string, any>;
|
|
119
|
+
/**
|
|
120
|
+
* The import spec is used to import data from workflow variables.
|
|
121
|
+
* The import spec is a list of variable names to import from the workflow context.
|
|
122
|
+
* You can also use objects to rename the imported variables, or to reference an expression.
|
|
123
|
+
* Example:
|
|
124
|
+
* ["runId", {"typeId": "docType.id"}]
|
|
125
|
+
*/
|
|
126
|
+
import?: ImportSpec;
|
|
127
|
+
/**
|
|
128
|
+
* The fetch phase is used to fetch data from external sources.
|
|
129
|
+
*/
|
|
130
|
+
fetch?: Record<string, ActivityFetchSpec>;
|
|
131
|
+
/**
|
|
132
|
+
* Projection to apply to the result. Not all activities support this.
|
|
133
|
+
*/
|
|
134
|
+
projection?: never | Record<string, any>;
|
|
135
|
+
/**
|
|
136
|
+
* If true the activity will be executed in parallel with the other activities.
|
|
137
|
+
* (i.e. the workflow will not wait for the activity to finish before starting the next one)
|
|
138
|
+
*/
|
|
139
|
+
parallel?: boolean;
|
|
140
|
+
/**
|
|
141
|
+
* Await for a parallel activity execution to return.
|
|
142
|
+
*/
|
|
143
|
+
await?: string;
|
|
144
|
+
/**
|
|
145
|
+
* Activity options for configuring the activity execution, which overrides the activity options
|
|
146
|
+
* defined at workflow level.
|
|
147
|
+
*/
|
|
148
|
+
options?: DSLActivityOptions;
|
|
149
|
+
}
|
|
150
|
+
export interface DSLActivityStep<PARAMS extends Record<string, any> = Record<string, any>> extends DSLActivitySpec<PARAMS>, DSLWorkflowStepBase {
|
|
151
|
+
type: "activity";
|
|
152
|
+
}
|
|
153
|
+
export interface DSLChildWorkflowStep extends DSLWorkflowStepBase {
|
|
154
|
+
type: "workflow";
|
|
155
|
+
name: string;
|
|
156
|
+
/**
|
|
157
|
+
* The parameters to pass to the child workflow.
|
|
158
|
+
* These parameters will be merged over the parent workflow vars and passed altogether to the child workflow.
|
|
159
|
+
*/
|
|
160
|
+
vars?: Record<string, any>;
|
|
161
|
+
async?: boolean;
|
|
162
|
+
/**
|
|
163
|
+
* The name of the workflow variable that will store the result of the child workflow (if async the workflow id is stored)
|
|
164
|
+
* If not specified the result will not be stored
|
|
165
|
+
* The parameters describe how the actual parameters will be obtained from the workflow execution vars.
|
|
166
|
+
* since it may contain references to workflow execution vars.
|
|
167
|
+
*/
|
|
168
|
+
output?: string;
|
|
169
|
+
/**
|
|
170
|
+
* In case the dslWorkflow is used as a child workflow the spec is used to define the child workflow.
|
|
171
|
+
* If spec is defined then the name must be "dslWorkflow"
|
|
172
|
+
*/
|
|
173
|
+
spec?: DSLWorkflowSpec;
|
|
174
|
+
/**
|
|
175
|
+
* If true, copy the parent's workspace artifacts (scripts/, files/, skills/, docs/, out/)
|
|
176
|
+
* to the child workflow's agent space before execution. Defaults to true.
|
|
177
|
+
* conversation.json and tools.json are never copied.
|
|
178
|
+
*/
|
|
179
|
+
inherit_artifacts?: boolean;
|
|
180
|
+
options?: {
|
|
181
|
+
memo?: Record<string, any>;
|
|
182
|
+
retry?: DSLRetryPolicy;
|
|
183
|
+
searchAttributes?: Record<string, string[] | number[] | boolean[] | Date[]>;
|
|
184
|
+
taskQueue?: string;
|
|
185
|
+
workflowExecutionTimeout?: StringValue | number;
|
|
186
|
+
workflowRunTimeout?: StringValue | number;
|
|
187
|
+
workflowTaskTimeout?: StringValue | number;
|
|
188
|
+
workflowId?: string;
|
|
189
|
+
cronSchedule?: string;
|
|
190
|
+
parentClosePolicy?: ParentClosePolicyType;
|
|
191
|
+
};
|
|
192
|
+
}
|
|
193
|
+
export type DSLWorkflowStep = DSLActivityStep | DSLChildWorkflowStep;
|
|
194
|
+
export interface DSLWorkflowSpecBase {
|
|
195
|
+
name: string;
|
|
196
|
+
description?: string;
|
|
197
|
+
tags?: string[];
|
|
198
|
+
steps?: DSLWorkflowStep[] | never;
|
|
199
|
+
/**
|
|
200
|
+
* @deprecated use steps instead
|
|
201
|
+
*/
|
|
202
|
+
activities?: DSLActivitySpec[] | never;
|
|
203
|
+
vars: Record<string, any>;
|
|
204
|
+
options?: DSLActivityOptions;
|
|
205
|
+
result?: string;
|
|
206
|
+
debug_mode?: boolean;
|
|
207
|
+
}
|
|
208
|
+
export interface DSLWorkflowSpecWithSteps extends DSLWorkflowSpecBase {
|
|
209
|
+
steps: DSLWorkflowStep[];
|
|
210
|
+
/**
|
|
211
|
+
* @deprecated use steps instead
|
|
212
|
+
*/
|
|
213
|
+
activities?: never;
|
|
214
|
+
}
|
|
215
|
+
/**
|
|
216
|
+
* @deprecated use steps instead
|
|
217
|
+
*/
|
|
218
|
+
export interface DSLWorkflowSpecWithActivities extends DSLWorkflowSpecBase {
|
|
219
|
+
steps?: never;
|
|
220
|
+
/**
|
|
221
|
+
* @deprecated use steps instead
|
|
222
|
+
*/
|
|
223
|
+
activities: DSLActivitySpec[];
|
|
224
|
+
}
|
|
225
|
+
/**
|
|
226
|
+
* activities and steps fields are mutually exclusive
|
|
227
|
+
* steps was added after activities and may contain a mix of activities and other tasks like exec child workflows.
|
|
228
|
+
* For backward compatibility we keep the activities field as a fallback but one should use one or the other not both.
|
|
229
|
+
*/
|
|
230
|
+
export type DSLWorkflowSpec = DSLWorkflowSpecWithSteps | DSLWorkflowSpecWithActivities;
|
|
231
|
+
export interface DSLWorkflowDefinition extends BaseObject, DSLWorkflowSpecBase {
|
|
232
|
+
input_schema?: Record<string, any>;
|
|
233
|
+
activities?: DSLActivitySpec[];
|
|
234
|
+
steps?: DSLWorkflowStep[];
|
|
235
|
+
}
|
|
236
|
+
export interface WorkflowDefinitionRef {
|
|
237
|
+
id: string;
|
|
238
|
+
name: string;
|
|
239
|
+
description?: string;
|
|
240
|
+
tags?: string[];
|
|
241
|
+
created_at: Date;
|
|
242
|
+
updated_at: Date;
|
|
243
|
+
}
|
|
244
|
+
export declare const WorkflowDefinitionRefPopulate = "id name description tags created_at updated_at";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dsl-workflow.d.ts","sourceRoot":"","sources":["../../../src/store/dsl-workflow.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,IAAI,CAAC;AACjC,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CA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.js";
|
|
3
|
+
export * from "./common.js";
|
|
4
|
+
export * from "./conversation-state.js";
|
|
5
|
+
export * from "./doc-analyzer.js";
|
|
6
|
+
export * from "./dsl-workflow.js";
|
|
7
|
+
export * from "./object-types.js";
|
|
8
|
+
export * from "./schedule.js";
|
|
9
|
+
export * from "./signals.js";
|
|
10
|
+
export * from "./store.js";
|
|
11
|
+
export * from "./temporalio.js";
|
|
12
|
+
export * from "./worker.js";
|
|
13
|
+
export * from "./workflow.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/store/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,cAAc,kBAAkB,CAAC;AACjC,cAAc,aAAa,CAAC;AAC5B,cAAc,yBAAyB,CAAC;AACxC,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,iBAAiB,CAAC;AAChC,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { JSONSchemaType } from "ajv";
|
|
2
|
+
export interface RenditionProperties {
|
|
3
|
+
mime_type: string;
|
|
4
|
+
source_etag?: string;
|
|
5
|
+
height?: number;
|
|
6
|
+
width?: number;
|
|
7
|
+
multipart?: boolean;
|
|
8
|
+
total_parts?: number;
|
|
9
|
+
}
|
|
10
|
+
export declare const RenditionSchema: JSONSchemaType<RenditionProperties>;
|
|
11
|
+
export interface DocumentPartProperties {
|
|
12
|
+
source_etag?: string;
|
|
13
|
+
part_number: number;
|
|
14
|
+
title?: string;
|
|
15
|
+
source_line_start?: number;
|
|
16
|
+
source_line_end?: number;
|
|
17
|
+
type?: 'text' | 'image' | 'table' | 'chart' | 'diagram' | 'code' | 'other';
|
|
18
|
+
page_number?: number;
|
|
19
|
+
description?: string;
|
|
20
|
+
height?: number;
|
|
21
|
+
width?: number;
|
|
22
|
+
}
|
|
23
|
+
export declare const DocumentPartSchema: JSONSchemaType<DocumentPartProperties>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"object-types.d.ts","sourceRoot":"","sources":["../../../src/store/object-types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,KAAK,CAAA;AAIzC,MAAM,WAAW,mBAAmB;IAChC,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,eAAO,MAAM,eAAe,EAAE,cAAc,CAAC,mBAAmB,CAqC/D,CAAA;AAID,MAAM,WAAW,sBAAsB;IAEnC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,IAAI,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,OAAO,GAAG,OAAO,GAAG,SAAS,GAAG,MAAM,GAAG,OAAO,CAAC;IAC3E,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;CAElB;AAGD,eAAO,MAAM,kBAAkB,EAAE,cAAc,CAAC,sBAAsB,CAwDrE,CAAA"}
|
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Agent Schedule Types
|
|
3
|
+
*
|
|
4
|
+
* Defines types for scheduling agents to run on a recurring basis using cron expressions.
|
|
5
|
+
* Schedules are stored in MongoDB with execution handled by Temporal.
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Represents a scheduled agent execution configuration.
|
|
9
|
+
*/
|
|
10
|
+
export interface AgentSchedule {
|
|
11
|
+
/** Unique identifier for the schedule */
|
|
12
|
+
id: string;
|
|
13
|
+
/** Human-readable name for the schedule */
|
|
14
|
+
name: string;
|
|
15
|
+
/** Optional description of what the schedule does */
|
|
16
|
+
description?: string;
|
|
17
|
+
/** Project ID this schedule belongs to */
|
|
18
|
+
project: string;
|
|
19
|
+
/** Account ID this schedule belongs to */
|
|
20
|
+
account: string;
|
|
21
|
+
/** Interaction ID or endpoint name to execute (e.g., "MyAgent" or ObjectId) */
|
|
22
|
+
interaction: string;
|
|
23
|
+
/** Cached interaction name for display purposes */
|
|
24
|
+
interaction_name?: string;
|
|
25
|
+
/**
|
|
26
|
+
* Cron expression defining when to run.
|
|
27
|
+
* Standard 5-field format: minute hour day-of-month month day-of-week
|
|
28
|
+
* Examples:
|
|
29
|
+
* - "0 0 * * MON" - Every Monday at midnight
|
|
30
|
+
* - "0 9 * * *" - Daily at 9am
|
|
31
|
+
* - "0 * * * *" - Every hour
|
|
32
|
+
*/
|
|
33
|
+
cron_expression: string;
|
|
34
|
+
/** Timezone for the cron expression (defaults to "UTC") */
|
|
35
|
+
timezone?: string;
|
|
36
|
+
/** Variables to pass to the agent workflow */
|
|
37
|
+
vars?: Record<string, any>;
|
|
38
|
+
/** Optional task queue override for the workflow */
|
|
39
|
+
task_queue?: string;
|
|
40
|
+
/** Whether the schedule is enabled (can be paused/resumed) */
|
|
41
|
+
enabled: boolean;
|
|
42
|
+
/** Temporal schedule ID once created (format: schedule:{accountId}:{projectId}:{scheduleId}) */
|
|
43
|
+
temporal_schedule_id?: string;
|
|
44
|
+
/** User or service that created this schedule */
|
|
45
|
+
created_by: string;
|
|
46
|
+
/** User or service that last updated this schedule */
|
|
47
|
+
updated_by?: string;
|
|
48
|
+
/** Timestamp when the schedule was created */
|
|
49
|
+
created_at: Date;
|
|
50
|
+
/** Timestamp when the schedule was last updated */
|
|
51
|
+
updated_at: Date;
|
|
52
|
+
/** Timestamp of the last successful execution */
|
|
53
|
+
last_run_at?: Date;
|
|
54
|
+
/** Timestamp of the next scheduled execution */
|
|
55
|
+
next_run_at?: Date;
|
|
56
|
+
/** Total number of times this schedule has executed */
|
|
57
|
+
run_count?: number;
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Payload for creating a new schedule.
|
|
61
|
+
*/
|
|
62
|
+
export interface CreateSchedulePayload {
|
|
63
|
+
/** Human-readable name for the schedule */
|
|
64
|
+
name: string;
|
|
65
|
+
/** Optional description of what the schedule does */
|
|
66
|
+
description?: string;
|
|
67
|
+
/** Interaction ID or endpoint name to execute */
|
|
68
|
+
interaction: string;
|
|
69
|
+
/**
|
|
70
|
+
* Cron expression defining when to run.
|
|
71
|
+
* Standard 5-field format: minute hour day-of-month month day-of-week
|
|
72
|
+
*/
|
|
73
|
+
cron_expression: string;
|
|
74
|
+
/** Timezone for the cron expression (defaults to "UTC") */
|
|
75
|
+
timezone?: string;
|
|
76
|
+
/** Variables to pass to the agent workflow */
|
|
77
|
+
vars?: Record<string, any>;
|
|
78
|
+
/** Optional task queue override */
|
|
79
|
+
task_queue?: string;
|
|
80
|
+
/** Whether the schedule should be enabled immediately (defaults to true) */
|
|
81
|
+
enabled?: boolean;
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* Payload for updating an existing schedule.
|
|
85
|
+
*/
|
|
86
|
+
export interface UpdateSchedulePayload {
|
|
87
|
+
/** Updated name */
|
|
88
|
+
name?: string;
|
|
89
|
+
/** Updated description */
|
|
90
|
+
description?: string;
|
|
91
|
+
/** Updated cron expression */
|
|
92
|
+
cron_expression?: string;
|
|
93
|
+
/** Updated timezone */
|
|
94
|
+
timezone?: string;
|
|
95
|
+
/** Updated variables */
|
|
96
|
+
vars?: Record<string, any>;
|
|
97
|
+
/** Updated task queue */
|
|
98
|
+
task_queue?: string;
|
|
99
|
+
/** Enable or disable the schedule */
|
|
100
|
+
enabled?: boolean;
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* Summary information for listing schedules.
|
|
104
|
+
*/
|
|
105
|
+
export interface ScheduleListItem {
|
|
106
|
+
id: string;
|
|
107
|
+
name: string;
|
|
108
|
+
description?: string;
|
|
109
|
+
interaction: string;
|
|
110
|
+
interaction_name?: string;
|
|
111
|
+
cron_expression: string;
|
|
112
|
+
timezone?: string;
|
|
113
|
+
enabled: boolean;
|
|
114
|
+
last_run_at?: Date;
|
|
115
|
+
next_run_at?: Date;
|
|
116
|
+
run_count?: number;
|
|
117
|
+
created_by: string;
|
|
118
|
+
updated_at: Date;
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* Information about a schedule's recent and upcoming runs.
|
|
122
|
+
*/
|
|
123
|
+
export interface ScheduleRunInfo {
|
|
124
|
+
/** The schedule ID */
|
|
125
|
+
schedule_id: string;
|
|
126
|
+
/** Recent workflow executions from this schedule */
|
|
127
|
+
recent_runs: Array<{
|
|
128
|
+
workflow_id: string;
|
|
129
|
+
run_id: string;
|
|
130
|
+
started_at: Date;
|
|
131
|
+
status: string;
|
|
132
|
+
}>;
|
|
133
|
+
/** Upcoming scheduled execution times */
|
|
134
|
+
upcoming_runs: Date[];
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* Extended schedule information including Temporal execution details.
|
|
138
|
+
*/
|
|
139
|
+
export interface AgentScheduleWithTemporalInfo extends AgentSchedule {
|
|
140
|
+
/** Information from Temporal about the schedule execution */
|
|
141
|
+
temporal_info?: {
|
|
142
|
+
/** Number of actions (workflow starts) executed */
|
|
143
|
+
num_actions_taken: number;
|
|
144
|
+
/** Number of actions missed due to catchup window */
|
|
145
|
+
num_actions_missed: number;
|
|
146
|
+
/** Number of actions skipped due to overlap policy */
|
|
147
|
+
num_actions_skipped: number;
|
|
148
|
+
/** Currently running workflows started by this schedule */
|
|
149
|
+
running_actions: Array<{
|
|
150
|
+
workflow_id: string;
|
|
151
|
+
run_id: string;
|
|
152
|
+
}>;
|
|
153
|
+
/** Recent actions taken by the schedule */
|
|
154
|
+
recent_actions: Array<{
|
|
155
|
+
scheduled_at: Date;
|
|
156
|
+
taken_at: Date;
|
|
157
|
+
workflow_id: string;
|
|
158
|
+
run_id: string;
|
|
159
|
+
}>;
|
|
160
|
+
/** Next scheduled action times */
|
|
161
|
+
next_action_times: Date[];
|
|
162
|
+
/** Whether the schedule is currently paused in Temporal */
|
|
163
|
+
paused: boolean;
|
|
164
|
+
/** Optional note about why the schedule is paused */
|
|
165
|
+
pause_note?: string;
|
|
166
|
+
};
|
|
167
|
+
}
|
|
168
|
+
/**
|
|
169
|
+
* Common cron expression presets for UI convenience.
|
|
170
|
+
*/
|
|
171
|
+
export declare const CRON_PRESETS: {
|
|
172
|
+
readonly EVERY_HOUR: "0 * * * *";
|
|
173
|
+
readonly EVERY_DAY_MIDNIGHT: "0 0 * * *";
|
|
174
|
+
readonly EVERY_DAY_9AM: "0 9 * * *";
|
|
175
|
+
readonly EVERY_MONDAY_MIDNIGHT: "0 0 * * MON";
|
|
176
|
+
readonly EVERY_WEEKDAY_9AM: "0 9 * * MON-FRI";
|
|
177
|
+
readonly FIRST_OF_MONTH: "0 0 1 * *";
|
|
178
|
+
};
|
|
179
|
+
/**
|
|
180
|
+
* Human-readable descriptions for cron presets.
|
|
181
|
+
*/
|
|
182
|
+
export declare const CRON_PRESET_LABELS: Record<keyof typeof CRON_PRESETS, string>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schedule.d.ts","sourceRoot":"","sources":["../../../src/store/schedule.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;GAEG;AACH,MAAM,WAAW,aAAa;IAC1B,yCAAyC;IACzC,EAAE,EAAE,MAAM,CAAC;IAEX,2CAA2C;IAC3C,IAA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W,EAAE,MAAM,CAAC;QACpB,MAAM,EAAE,MAAM,CAAC;QACf,UAAU,EAAE,IAAI,CAAC;QACjB,MAAM,EAAE,MAAM,CAAC;KAClB,CAAC,CAAC;IAEH,yCAAyC;IACzC,aAAa,EAAE,IAAI,EAAE,CAAC;CACzB;AAED;;GAEG;AACH,MAAM,WAAW,6BAA8B,SAAQ,aAAa;IAChE,6DAA6D;IAC7D,aAAa,CAAC,EAAE;QACZ,mDAAmD;QACnD,iBAAiB,EAAE,MAAM,CAAC;QAE1B,qDAAqD;QACrD,kBAAkB,EAAE,MAAM,CAAC;QAE3B,sDAAsD;QACtD,mBAAmB,EAAE,MAAM,CAAC;QAE5B,2DAA2D;QAC3D,eAAe,EAAE,KAAK,CAAC;YACnB,WAAW,EAAE,MAAM,CAAC;YACpB,MAAM,EAAE,MAAM,CAAC;SAClB,CAAC,CAAC;QAEH,2CAA2C;QAC3C,cAAc,EAAE,KAAK,CAAC;YAClB,YAAY,EAAE,IAAI,CAAC;YACnB,QAAQ,EAAE,IAAI,CAAC;YACf,WAAW,EAAE,MAAM,CAAC;YACpB,MAAM,EAAE,MAAM,CAAC;SAClB,CAAC,CAAC;QAEH,kCAAkC;QAClC,iBAAiB,EAAE,IAAI,EAAE,CAAC;QAE1B,2DAA2D;QAC3D,MAAM,EAAE,OAAO,CAAC;QAEhB,qDAAqD;QACrD,UAAU,CAAC,EAAE,MAAM,CAAC;KACvB,CAAC;CACL;AAED;;GAEG;AACH,eAAO,MAAM,YAAY;;;;;;;CAOf,CAAC;AAEX;;GAEG;AACH,eAAO,MAAM,kBAAkB,EAAE,MAAM,CAAC,MAAM,OAAO,YAAY,EAAE,MAAM,CAOxE,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export interface UserInputSignal {
|
|
2
|
+
message: string;
|
|
3
|
+
metadata?: Record<string, any>;
|
|
4
|
+
auth_token?: string;
|
|
5
|
+
/**
|
|
6
|
+
* Email attachments to be processed as store objects.
|
|
7
|
+
* These will be downloaded, uploaded to store, and processed for text extraction
|
|
8
|
+
* before the conversation continues.
|
|
9
|
+
*/
|
|
10
|
+
attachments?: EmailAttachment[];
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Email attachment metadata for processing in conversation workflows.
|
|
14
|
+
*/
|
|
15
|
+
export interface EmailAttachment {
|
|
16
|
+
/** Original filename */
|
|
17
|
+
filename: string;
|
|
18
|
+
/** MIME content type */
|
|
19
|
+
content_type: string;
|
|
20
|
+
/** Size in bytes */
|
|
21
|
+
size: number;
|
|
22
|
+
/** Resend download URL (temporary, expires) */
|
|
23
|
+
download_url: string;
|
|
24
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"signals.d.ts","sourceRoot":"","sources":["../../../src/store/signals.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,eAAe;IAC5B,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC/B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;;OAIG;IACH,WAAW,CAAC,EAAE,eAAe,EAAE,CAAC;CACnC;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC5B,wBAAwB;IACxB,QAAQ,EAAE,MAAM,CAAC;IACjB,wBAAwB;IACxB,YAAY,EAAE,MAAM,CAAC;IACrB,oBAAoB;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,+CAA+C;IAC/C,YAAY,EAAE,MAAM,CAAC;CACxB"}
|