@vertesia/common 1.0.0-dev.20260203.130115Z → 1.0.0-dev.20260225.024852Z
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/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 +17 -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/audit-trail.js +3 -0
- package/lib/cjs/audit-trail.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 +56 -0
- package/lib/cjs/index.js.map +1 -0
- package/lib/cjs/integrations.js +16 -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 +143 -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/hive-memory.js +3 -0
- package/lib/cjs/store/hive-memory.js.map +1 -0
- package/lib/cjs/store/index.js +32 -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/rendering.js +22 -0
- package/lib/cjs/store/rendering.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 +179 -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 +305 -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 +138 -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 +9 -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 +14 -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/audit-trail.js +2 -0
- package/lib/esm/audit-trail.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 +40 -0
- package/lib/esm/index.js.map +1 -0
- package/lib/esm/integrations.js +13 -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 +138 -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/hive-memory.js +2 -0
- package/lib/esm/store/hive-memory.js.map +1 -0
- package/lib/esm/store/index.js +16 -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/rendering.js +18 -0
- package/lib/esm/store/rendering.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 +171 -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 +287 -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 +129 -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 +6 -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 +99 -0
- package/lib/types/apikey.d.ts.map +1 -0
- package/lib/types/apps.d.ts +455 -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/audit-trail.d.ts +49 -0
- package/lib/types/audit-trail.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 +40 -0
- package/lib/types/index.d.ts.map +1 -0
- package/lib/types/integrations.d.ts +68 -0
- package/lib/types/integrations.d.ts.map +1 -0
- package/lib/types/interaction.d.ts +964 -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 +434 -0
- package/lib/types/project.d.ts.map +1 -0
- package/lib/types/prompt.d.ts +77 -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 +132 -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 +272 -0
- package/lib/types/store/dsl-workflow.d.ts.map +1 -0
- package/lib/types/store/hive-memory.d.ts +116 -0
- package/lib/types/store/hive-memory.d.ts.map +1 -0
- package/lib/types/store/index.d.ts +15 -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/rendering.d.ts +193 -0
- package/lib/types/store/rendering.d.ts.map +1 -0
- package/lib/types/store/schedule.d.ts +184 -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 +436 -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 +948 -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 +125 -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 +18 -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 +4 -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 +2 -4
- package/src/apikey.ts +1 -0
- package/src/apps.ts +163 -1
- package/src/audit-trail.ts +61 -0
- package/src/index.ts +1 -0
- package/src/integrations.ts +10 -0
- package/src/interaction.ts +11 -12
- package/src/project.ts +226 -0
- package/src/prompt.ts +3 -4
- package/src/store/conversation-state.ts +9 -0
- package/src/store/doc-analyzer.ts +1 -1
- package/src/store/dsl-workflow.ts +20 -0
- package/src/store/index.ts +1 -0
- package/src/store/rendering.ts +233 -0
- package/src/store/schedule.ts +3 -0
- package/src/store/store.ts +40 -5
- package/src/store/workflow.ts +184 -7
- package/src/user.ts +11 -0
- package/src/utils/schemas.ts +33 -11
- package/src/versions.ts +1 -0
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
import { CompletionResult, ExecutionTokenUsage, StatelessExecutionOptions, ToolUse } from "@llumiverse/common";
|
|
2
|
+
import { ConversationStripOptions, ResolvedInteractionExecutionInfo, UserChannel } from "../interaction.js";
|
|
3
|
+
import { ExecutionRunDocRef } from "../runs.js";
|
|
4
|
+
import { Plan, WorkflowAncestor } from "./workflow.js";
|
|
5
|
+
/**
|
|
6
|
+
* Lightweight tool reference for activity payloads.
|
|
7
|
+
* References tools stored in GCP instead of embedding full tool definitions.
|
|
8
|
+
*/
|
|
9
|
+
export interface ToolReference {
|
|
10
|
+
storage_key: string;
|
|
11
|
+
tool_count: number;
|
|
12
|
+
stored_at: string;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Conversation state passed between workflow activities.
|
|
16
|
+
* Contains all context needed to continue a multi-turn agent conversation.
|
|
17
|
+
*/
|
|
18
|
+
export interface ConversationState {
|
|
19
|
+
/**
|
|
20
|
+
* A reference to the run that started the conversation
|
|
21
|
+
*/
|
|
22
|
+
run: ExecutionRunDocRef;
|
|
23
|
+
/**
|
|
24
|
+
* The execution environment with provider info for LLM calls.
|
|
25
|
+
*/
|
|
26
|
+
environment: string;
|
|
27
|
+
/**
|
|
28
|
+
* The options to use on the next call.
|
|
29
|
+
*/
|
|
30
|
+
options: StatelessExecutionOptions;
|
|
31
|
+
/**
|
|
32
|
+
* The tools to call next.
|
|
33
|
+
*/
|
|
34
|
+
tool_use?: ToolUse[];
|
|
35
|
+
/**
|
|
36
|
+
* The output of the this conversation step
|
|
37
|
+
*/
|
|
38
|
+
output: CompletionResult[];
|
|
39
|
+
/**
|
|
40
|
+
* The token usage of the this conversation step
|
|
41
|
+
*/
|
|
42
|
+
token_usage?: ExecutionTokenUsage;
|
|
43
|
+
/** If a sub workflow execution, contains the parent's info */
|
|
44
|
+
parent?: WorkflowAncestor;
|
|
45
|
+
/** Full ancestry chain from root to immediate parent (for hierarchical aggregation) */
|
|
46
|
+
ancestors: WorkflowAncestor[];
|
|
47
|
+
/** If part of a larger agentic workflow, task id of this task */
|
|
48
|
+
task_id?: string;
|
|
49
|
+
/** Stores the most recent plan for reference by plan-related tools */
|
|
50
|
+
plan?: Plan;
|
|
51
|
+
/** Debug mode (more logs and persisted artifacts) */
|
|
52
|
+
debug?: boolean;
|
|
53
|
+
/**
|
|
54
|
+
* Configuration for stripping large data from conversation history.
|
|
55
|
+
* Passed to llumiverse ExecutionOptions.stripImagesAfterTurns.
|
|
56
|
+
*/
|
|
57
|
+
strip_options?: ConversationStripOptions;
|
|
58
|
+
/** Conversation artifacts base url */
|
|
59
|
+
conversation_artifacts_base_url?: string;
|
|
60
|
+
/** Reference to tools stored in GCP instead of embedding full tool definitions */
|
|
61
|
+
tool_reference?: ToolReference;
|
|
62
|
+
/** Names of currently active tools (base + unlocked). Tool definitions loaded from tool_reference. */
|
|
63
|
+
active_tool_names?: string[];
|
|
64
|
+
/** Skills that have been used in this conversation (for auto-syncing scripts and package installation) */
|
|
65
|
+
used_skills?: UsedSkill[];
|
|
66
|
+
/** All available skills from registered tool collections (for upfront hydration in sandbox) */
|
|
67
|
+
available_skills?: AvailableSkill[];
|
|
68
|
+
/** Whether to stream LLM responses to Redis (cached from project config) */
|
|
69
|
+
streaming_enabled?: boolean;
|
|
70
|
+
/**
|
|
71
|
+
* Active communication channels with their current state.
|
|
72
|
+
* Channels can be updated as conversation progresses (e.g., email threading info).
|
|
73
|
+
*/
|
|
74
|
+
user_channels?: UserChannel[];
|
|
75
|
+
/**
|
|
76
|
+
* The resolved interaction execution info.
|
|
77
|
+
* Contains interaction ID, name, version, and environment details.
|
|
78
|
+
*/
|
|
79
|
+
resolvedInteraction?: ResolvedInteractionExecutionInfo;
|
|
80
|
+
/**
|
|
81
|
+
* End conversation metadata set when end_conversation tool is called.
|
|
82
|
+
* Signals the workflow to terminate gracefully.
|
|
83
|
+
*/
|
|
84
|
+
end_conversation?: {
|
|
85
|
+
final_result?: string;
|
|
86
|
+
status?: 'success' | 'failure';
|
|
87
|
+
reason?: string;
|
|
88
|
+
};
|
|
89
|
+
/**
|
|
90
|
+
* Tools that have been unlocked by skills during the conversation.
|
|
91
|
+
* These tools were initially hidden (default: false) but became available
|
|
92
|
+
* when a skill with related_tools was called.
|
|
93
|
+
*/
|
|
94
|
+
unlocked_tools?: string[];
|
|
95
|
+
/**
|
|
96
|
+
* Activity ID from the latest LLM call (for deduplication with streamed content).
|
|
97
|
+
* Set by streamToRedis when completing async activities.
|
|
98
|
+
*/
|
|
99
|
+
latest_activity_id?: string;
|
|
100
|
+
/**
|
|
101
|
+
* Mapping of skill names to their related tools.
|
|
102
|
+
* When a skill is called, its related tools are added to unlocked_tools.
|
|
103
|
+
*/
|
|
104
|
+
skill_tool_map?: Record<string, string[]>;
|
|
105
|
+
/**
|
|
106
|
+
* Current activity group ID for internal tool-execution progress messages.
|
|
107
|
+
* All updates emitted during one tool-execution cycle should share this ID.
|
|
108
|
+
*/
|
|
109
|
+
active_activity_group_id?: string;
|
|
110
|
+
/** LLM stop reason from the latest call (e.g., "stop", "length", "tool_use") */
|
|
111
|
+
finish_reason?: string;
|
|
112
|
+
}
|
|
113
|
+
/** Skill metadata collected at workflow start for upfront sandbox hydration */
|
|
114
|
+
export interface AvailableSkill {
|
|
115
|
+
/** Skill name (e.g., "analyze_data") - without the "learn_" prefix */
|
|
116
|
+
name: string;
|
|
117
|
+
/** Source URL of the skill collection (e.g., "https://tools.vertesia.io/api/skills/data-analysis") */
|
|
118
|
+
src: string;
|
|
119
|
+
}
|
|
120
|
+
/** Skill metadata tracked when a skill is used */
|
|
121
|
+
export interface UsedSkill {
|
|
122
|
+
/** Skill name (e.g., "analyze_data") */
|
|
123
|
+
name: string;
|
|
124
|
+
/** Source URL of the skill collection (e.g., "https://tools.vertesia.io/api/skills/data-analysis") */
|
|
125
|
+
src: string;
|
|
126
|
+
/** Programming language (e.g., "python") */
|
|
127
|
+
language?: string;
|
|
128
|
+
/** Required packages (e.g., ["pandas", "numpy"]) */
|
|
129
|
+
packages?: string[];
|
|
130
|
+
/** System-level packages to install via sudo apt-get (e.g., ["poppler-utils"]) */
|
|
131
|
+
system_packages?: string[];
|
|
132
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"conversation-state.d.ts","sourceRoot":"","sources":["../../../src/store/conversation-state.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,yBAAyB,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAC/G,OAAO,EAAE,wBAAwB,EAAE,gCAAgC,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAC5G,OAAO,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAChD,OAAO,EAAE,IAAI,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAEvD;;;GAGG;AACH,MAAM,WAAW,aAAa;IAC1B,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;CACrB;AAED;;;GAGG;AACH,MAAM,WAAW,iBAAiB;IAC9B;;OAEG;IACH,GAAG,EAAE,kBAAkB,CAAC;IAExB;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,OAAO,EAAE,yBAAyB,CAAC;IAEnC;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,EAAE,CAAC;IAErB;;OAEG;IACH,MAAM,EAAE,gBAAgB,EAAE,CAAC;IAE3B;;OAEG;IACH,WAAW,CAAC,EAAE,mBAAmB,CAAC;IAElC,8DAA8D;IAC9D,MAAM,CAAC,EAAE,gBAAgB,CAAC;IAE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AC3B,sEAAsE;IACtE,IAAI,EAAE,MAAM,CAAC;IACb,sGAAsG;IACtG,GAAG,EAAE,MAAM,CAAC;CACf;AAED,kDAAkD;AAClD,MAAM,WAAW,SAAS;IACtB,wCAAwC;IACxC,IAAI,EAAE,MAAM,CAAC;IACb,sGAAsG;IACtG,GAAG,EAAE,MAAM,CAAC;IACZ,4CAA4C;IAC5C,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,oDAAoD;IACpD,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,kFAAkF;IAClF,eAAe,CAAC,EAAE,MAAM,EAAE,CAAC;CAC9B"}
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
import { WorkflowExecutionPayload, WorkflowRunStatus } from "./workflow.js";
|
|
2
|
+
export interface PdfToRichtextOptions {
|
|
3
|
+
features?: string[];
|
|
4
|
+
debug?: boolean;
|
|
5
|
+
[key: string]: any;
|
|
6
|
+
}
|
|
7
|
+
export interface PdfToRichTextWorkflowPayload extends Omit<WorkflowExecutionPayload, "vars"> {
|
|
8
|
+
vars: PdfToRichtextOptions;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Represents a image in a document that has been analyzed
|
|
12
|
+
*/
|
|
13
|
+
export interface DocImage {
|
|
14
|
+
id?: string;
|
|
15
|
+
page_number?: number;
|
|
16
|
+
description?: string;
|
|
17
|
+
is_meaningful?: boolean;
|
|
18
|
+
width?: number;
|
|
19
|
+
height?: number;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* The export type formats for tables.
|
|
23
|
+
*/
|
|
24
|
+
export type ExportTableFormats = 'json' | 'csv' | 'xml';
|
|
25
|
+
/**
|
|
26
|
+
* Represents a table in a document that has been analyzed
|
|
27
|
+
*/
|
|
28
|
+
export interface DocTable {
|
|
29
|
+
page_number?: number;
|
|
30
|
+
table_number?: number;
|
|
31
|
+
title?: string;
|
|
32
|
+
format: "application/csv" | "application/json";
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Represents a table in a document that has been analyzed in CSV format
|
|
36
|
+
*/
|
|
37
|
+
export interface DocTableCsv extends DocTable {
|
|
38
|
+
format: "application/csv";
|
|
39
|
+
title?: string;
|
|
40
|
+
data: string;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Represents a table in a document that has been analyzed in JSON format
|
|
44
|
+
*/
|
|
45
|
+
export interface DocTableJson extends DocTable {
|
|
46
|
+
format: "application/json";
|
|
47
|
+
title?: string;
|
|
48
|
+
data: Object[];
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Output format for document processing workflows
|
|
52
|
+
*/
|
|
53
|
+
export type DocProcessorOutputFormat = "xml" | "markdown";
|
|
54
|
+
/**
|
|
55
|
+
* Represents a document analysis run status
|
|
56
|
+
*/
|
|
57
|
+
export interface DocAnalyzeRunStatusResponse extends WorkflowRunStatus {
|
|
58
|
+
progress?: DocAnalyzerProgress;
|
|
59
|
+
/** The output format being used for processing (markdown or xml) */
|
|
60
|
+
output_format?: DocProcessorOutputFormat;
|
|
61
|
+
}
|
|
62
|
+
export interface DocAnalyzerResultResponse {
|
|
63
|
+
document?: string;
|
|
64
|
+
tables?: DocTableCsv[] | DocTableJson[];
|
|
65
|
+
images?: DocImage[];
|
|
66
|
+
annotated?: string | null;
|
|
67
|
+
}
|
|
68
|
+
export interface DocAnalyzerProgress {
|
|
69
|
+
pages: DocAnalyzerProgressStatus;
|
|
70
|
+
images: DocAnalyzerProgressStatus;
|
|
71
|
+
tables: DocAnalyzerProgressStatus;
|
|
72
|
+
visuals: DocAnalyzerProgressStatus;
|
|
73
|
+
started_at?: number;
|
|
74
|
+
percent: number;
|
|
75
|
+
/** The output format being used for processing (markdown or xml) */
|
|
76
|
+
output_format?: DocProcessorOutputFormat;
|
|
77
|
+
}
|
|
78
|
+
interface DocAnalyzerProgressStatus {
|
|
79
|
+
total: number;
|
|
80
|
+
processed: number;
|
|
81
|
+
success: number;
|
|
82
|
+
failed: number;
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* Adapt Tables Parameters, part of the request
|
|
86
|
+
*/
|
|
87
|
+
export interface AdaptTablesParams {
|
|
88
|
+
/**
|
|
89
|
+
* JSON Schema to to convert the table into
|
|
90
|
+
*/
|
|
91
|
+
target_schema: string;
|
|
92
|
+
/**
|
|
93
|
+
* Natural language description of the type item the table are composed of
|
|
94
|
+
*/
|
|
95
|
+
item_name: string;
|
|
96
|
+
/**
|
|
97
|
+
* Natural language description of the type of table or item to convert
|
|
98
|
+
*/
|
|
99
|
+
instructions?: string;
|
|
100
|
+
/**
|
|
101
|
+
* Format to return the data in (csv, json)
|
|
102
|
+
*/
|
|
103
|
+
format?: "csv" | "json";
|
|
104
|
+
/**
|
|
105
|
+
* Process the table as a whole or by page
|
|
106
|
+
*/
|
|
107
|
+
process_as?: "page" | "table";
|
|
108
|
+
/**
|
|
109
|
+
* Process the table as a CSV file
|
|
110
|
+
*/
|
|
111
|
+
process_as_csv?: boolean;
|
|
112
|
+
}
|
|
113
|
+
interface DocAnalyzerRequestBase {
|
|
114
|
+
synchronous?: boolean;
|
|
115
|
+
notify_endpoints?: string[];
|
|
116
|
+
/**
|
|
117
|
+
* What environment to use to run the request
|
|
118
|
+
* If none specified the project embedded environment will be used
|
|
119
|
+
*/
|
|
120
|
+
environment?: string;
|
|
121
|
+
}
|
|
122
|
+
export interface AdaptTablesRequest extends DocAnalyzerRequestBase, AdaptTablesParams {
|
|
123
|
+
}
|
|
124
|
+
/**
|
|
125
|
+
* Get Adapted Tables Request
|
|
126
|
+
* @param raw If true, the raw data will be returned
|
|
127
|
+
* @param format The format to return the data in (csv, json)
|
|
128
|
+
*/
|
|
129
|
+
export interface GetAdaptedTablesRequestQuery {
|
|
130
|
+
raw?: boolean;
|
|
131
|
+
format: "csv" | "json";
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* The adapted table result format
|
|
135
|
+
*/
|
|
136
|
+
export interface AdaptedTable {
|
|
137
|
+
comment?: string;
|
|
138
|
+
data: Record<string, any>[];
|
|
139
|
+
}
|
|
140
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"doc-analyzer.d.ts","sourceRoot":"","sources":["../../../src/store/doc-analyzer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAE5E,MAAM,WAAW,oBAAoB;IACjC,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACtB;AAED,MAAM,WAAW,4BAA6B,SAAQ,IAAI,CAAC,wBAAwB,EAAE,MAAM,CAAC;IACxF,IAAI,EAAE,oBAAoB,CAAC;CAC9B;AAED;;GAEG;AACH,MAAM,WAAW,QAAQ;IACrB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG,MAAM,GAAG,KAAK,GAAG,KAAK,CAAC;AAExD;;GAEG;AACH,MAAM,WAAW,QAAQ;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,iBAAiB,GAAG,kBAAkB,CAAC;CAClD;AAED;;GAEG;AACH,MAAM,WAAW,WAAY,SAAQ,QAAQ;IACzC,MAAM,EAAE,iBAAiB,CAAC;IAC1B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;CAChB;AAED;;GAEG;AACH,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GAAG,MAAM,CAAC;IAExB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IAE9B;;OAEG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;CAC5B;AAED,UAAU,sBAAsB;IAC5B,WAAW,CAAC,EAAE,OAAO,CAAC;IAEtB,gBAAgB,CAAC,EAAE,MAAM,EAAE,CAAC;IAE5B;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,kBAAmB,SAAQ,sBAAsB,EAAE,iBAAiB;CAAG;AAExF;;;;GAIG;AACH,MAAM,WAAW,4BAA4B;IACzC,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,MAAM,EAAE,KAAK,GAAG,MAAM,CAAC;CAC1B;AACD;;GAEG;AACH,MAAM,WAAW,YAAY;IACzB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,CAAC;CAC/B"}
|
|
@@ -0,0 +1,272 @@
|
|
|
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
|
+
* Discriminator for workflow input type - either object IDs or GCS file URIs
|
|
7
|
+
*/
|
|
8
|
+
export type WorkflowInputType = 'objectIds' | 'files';
|
|
9
|
+
/**
|
|
10
|
+
* File reference with URL and mimetype
|
|
11
|
+
*/
|
|
12
|
+
export interface WorkflowInputFile {
|
|
13
|
+
url: string;
|
|
14
|
+
mimetype: string;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Discriminated union for workflow inputs.
|
|
18
|
+
* Workflows can accept either a list of object IDs (existing behavior) OR a list of file references (new).
|
|
19
|
+
*/
|
|
20
|
+
export type WorkflowInput = {
|
|
21
|
+
inputType: 'objectIds';
|
|
22
|
+
objectIds: string[];
|
|
23
|
+
} | {
|
|
24
|
+
inputType: 'files';
|
|
25
|
+
files: WorkflowInputFile[];
|
|
26
|
+
};
|
|
27
|
+
/**
|
|
28
|
+
* The payload sent when starting a workflow from the temporal client to the workflow instance.
|
|
29
|
+
*/
|
|
30
|
+
export interface DSLWorkflowExecutionPayload extends WorkflowExecutionPayload {
|
|
31
|
+
/**
|
|
32
|
+
* The workflow definition to be used by the DSL workflow.
|
|
33
|
+
* If a dsl workflow is executed and no definition is provided the workflow will fail.
|
|
34
|
+
*/
|
|
35
|
+
workflow: DSLWorkflowSpec;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* The payload for a DSL activity options.
|
|
39
|
+
*
|
|
40
|
+
* @see ActivityOptions in @temporalio/common
|
|
41
|
+
*/
|
|
42
|
+
export interface DSLActivityOptions {
|
|
43
|
+
startToCloseTimeout?: StringValue | number;
|
|
44
|
+
scheduleToStartTimeout?: StringValue | number;
|
|
45
|
+
scheduleToCloseTimeout?: StringValue | number;
|
|
46
|
+
retry?: DSLRetryPolicy;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* The payload for a DSL retry policy.
|
|
50
|
+
*
|
|
51
|
+
* @see RetryPolicy in @temporalio/common
|
|
52
|
+
*/
|
|
53
|
+
export interface DSLRetryPolicy {
|
|
54
|
+
backoffCoefficient?: number;
|
|
55
|
+
initialInterval?: StringValue | number;
|
|
56
|
+
maximumAttempts?: number;
|
|
57
|
+
maximumInterval?: StringValue | number;
|
|
58
|
+
nonRetryableErrorTypes?: string[];
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* The payload for a DSL activity execution.
|
|
62
|
+
*/
|
|
63
|
+
export interface DSLActivityExecutionPayload<ParamsT extends Record<string, any>> extends WorkflowExecutionPayload {
|
|
64
|
+
activity: DSLActivitySpec;
|
|
65
|
+
params: ParamsT;
|
|
66
|
+
workflow_name: string;
|
|
67
|
+
debug_mode?: boolean;
|
|
68
|
+
}
|
|
69
|
+
export type ImportSpec = (string | Record<string, string>)[];
|
|
70
|
+
export interface ActivityFetchSpec {
|
|
71
|
+
/**
|
|
72
|
+
* The data provider name
|
|
73
|
+
*/
|
|
74
|
+
type: "document" | "document_type" | "interaction_run";
|
|
75
|
+
/**
|
|
76
|
+
* An optional URI to the data source.
|
|
77
|
+
*/
|
|
78
|
+
source?: string;
|
|
79
|
+
/**
|
|
80
|
+
* The query to be executed by the data provider
|
|
81
|
+
*/
|
|
82
|
+
query: Record<string, any>;
|
|
83
|
+
/**
|
|
84
|
+
* a string of space separated field names.
|
|
85
|
+
* Prefix a field name with "-" to exclude it from the result.
|
|
86
|
+
*/
|
|
87
|
+
select?: string;
|
|
88
|
+
/**
|
|
89
|
+
* The number of results to return. If the result is limited to 1 the result will be a single object
|
|
90
|
+
*/
|
|
91
|
+
limit?: number;
|
|
92
|
+
/**
|
|
93
|
+
* How to handle not found objects.
|
|
94
|
+
* 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.
|
|
95
|
+
* 2. throw - Throw an error if the object or no objects are found.
|
|
96
|
+
*/
|
|
97
|
+
on_not_found?: "ignore" | "throw";
|
|
98
|
+
}
|
|
99
|
+
export interface DSLWorkflowStepBase {
|
|
100
|
+
/**
|
|
101
|
+
* The type fo the step.
|
|
102
|
+
* If not set defaults to "activity"
|
|
103
|
+
*/
|
|
104
|
+
type: "activity" | "workflow";
|
|
105
|
+
}
|
|
106
|
+
export interface DSLActivitySpec<PARAMS extends Record<string, any> = Record<string, any>> {
|
|
107
|
+
/**
|
|
108
|
+
* The name of the activity function
|
|
109
|
+
*/
|
|
110
|
+
name: string;
|
|
111
|
+
/**
|
|
112
|
+
* Title of the activity to be displayed in the UI workflow builder
|
|
113
|
+
*/
|
|
114
|
+
title?: string;
|
|
115
|
+
/**
|
|
116
|
+
* The description of the activity to e displayed in the UI workflow builder
|
|
117
|
+
*/
|
|
118
|
+
description?: string;
|
|
119
|
+
/**
|
|
120
|
+
* Activities parameters. These parameters can be either literals
|
|
121
|
+
* (hardcoded strings, numbers, booleans, objects, arrays etc.), either
|
|
122
|
+
* references to the workflow variables.
|
|
123
|
+
* The workflow variables are built from the workflow params (e.g. the workflow configuration)
|
|
124
|
+
* and from the result of the previous activities.
|
|
125
|
+
*/
|
|
126
|
+
params?: PARAMS;
|
|
127
|
+
/**
|
|
128
|
+
* The name of the workflow variable that will store the result of the activity
|
|
129
|
+
* If not specified the result will not be stored
|
|
130
|
+
* The parameters describe how the actual parameters will be obtained from the workflow execution vars.
|
|
131
|
+
* since it may contain references to workflow execution vars.
|
|
132
|
+
*/
|
|
133
|
+
output?: string;
|
|
134
|
+
/**
|
|
135
|
+
* A JSON expression which evaluate to true or false similar to mongo matches.
|
|
136
|
+
* We support for now basic expression like: $true, $false, $eq, $ne, $gt, $gte, $lt, $lte, $in, $nin, $regexp
|
|
137
|
+
* {$eq: {name: value}},
|
|
138
|
+
* Ex: {$eq: {wfVarName: value}}
|
|
139
|
+
*/
|
|
140
|
+
condition?: Record<string, any>;
|
|
141
|
+
/**
|
|
142
|
+
* The import spec is used to import data from workflow variables.
|
|
143
|
+
* The import spec is a list of variable names to import from the workflow context.
|
|
144
|
+
* You can also use objects to rename the imported variables, or to reference an expression.
|
|
145
|
+
* Example:
|
|
146
|
+
* ["runId", {"typeId": "docType.id"}]
|
|
147
|
+
*/
|
|
148
|
+
import?: ImportSpec;
|
|
149
|
+
/**
|
|
150
|
+
* The fetch phase is used to fetch data from external sources.
|
|
151
|
+
*/
|
|
152
|
+
fetch?: Record<string, ActivityFetchSpec>;
|
|
153
|
+
/**
|
|
154
|
+
* Projection to apply to the result. Not all activities support this.
|
|
155
|
+
*/
|
|
156
|
+
projection?: never | Record<string, any>;
|
|
157
|
+
/**
|
|
158
|
+
* If true the activity will be executed in parallel with the other activities.
|
|
159
|
+
* (i.e. the workflow will not wait for the activity to finish before starting the next one)
|
|
160
|
+
*/
|
|
161
|
+
parallel?: boolean;
|
|
162
|
+
/**
|
|
163
|
+
* Await for a parallel activity execution to return.
|
|
164
|
+
*/
|
|
165
|
+
await?: string;
|
|
166
|
+
/**
|
|
167
|
+
* Activity options for configuring the activity execution, which overrides the activity options
|
|
168
|
+
* defined at workflow level.
|
|
169
|
+
*/
|
|
170
|
+
options?: DSLActivityOptions;
|
|
171
|
+
}
|
|
172
|
+
export interface DSLActivityStep<PARAMS extends Record<string, any> = Record<string, any>> extends DSLActivitySpec<PARAMS>, DSLWorkflowStepBase {
|
|
173
|
+
type: "activity";
|
|
174
|
+
}
|
|
175
|
+
export interface DSLChildWorkflowStep extends DSLWorkflowStepBase {
|
|
176
|
+
type: "workflow";
|
|
177
|
+
name: string;
|
|
178
|
+
/**
|
|
179
|
+
* The parameters to pass to the child workflow.
|
|
180
|
+
* These parameters will be merged over the parent workflow vars and passed altogether to the child workflow.
|
|
181
|
+
*/
|
|
182
|
+
vars?: Record<string, any>;
|
|
183
|
+
async?: boolean;
|
|
184
|
+
/**
|
|
185
|
+
* The name of the workflow variable that will store the result of the child workflow (if async the workflow id is stored)
|
|
186
|
+
* If not specified the result will not be stored
|
|
187
|
+
* The parameters describe how the actual parameters will be obtained from the workflow execution vars.
|
|
188
|
+
* since it may contain references to workflow execution vars.
|
|
189
|
+
*/
|
|
190
|
+
output?: string;
|
|
191
|
+
/**
|
|
192
|
+
* A JSON expression which evaluates to true or false similar to mongo matches.
|
|
193
|
+
* The child workflow will only execute if the condition is satisfied.
|
|
194
|
+
* Example: {$eq: {wfVarName: value}}
|
|
195
|
+
*/
|
|
196
|
+
condition?: Record<string, any>;
|
|
197
|
+
/**
|
|
198
|
+
* In case the dslWorkflow is used as a child workflow the spec is used to define the child workflow.
|
|
199
|
+
* If spec is defined then the name must be "dslWorkflow"
|
|
200
|
+
*/
|
|
201
|
+
spec?: DSLWorkflowSpec;
|
|
202
|
+
/**
|
|
203
|
+
* If true, copy the parent's workspace artifacts (scripts/, files/, skills/, docs/, out/)
|
|
204
|
+
* to the child workflow's agent space before execution. Defaults to true.
|
|
205
|
+
* conversation.json and tools.json are never copied.
|
|
206
|
+
*/
|
|
207
|
+
inherit_artifacts?: boolean;
|
|
208
|
+
options?: {
|
|
209
|
+
memo?: Record<string, any>;
|
|
210
|
+
retry?: DSLRetryPolicy;
|
|
211
|
+
searchAttributes?: Record<string, string[] | number[] | boolean[] | Date[]>;
|
|
212
|
+
taskQueue?: string;
|
|
213
|
+
workflowExecutionTimeout?: StringValue | number;
|
|
214
|
+
workflowRunTimeout?: StringValue | number;
|
|
215
|
+
workflowTaskTimeout?: StringValue | number;
|
|
216
|
+
workflowId?: string;
|
|
217
|
+
cronSchedule?: string;
|
|
218
|
+
parentClosePolicy?: ParentClosePolicyType;
|
|
219
|
+
};
|
|
220
|
+
}
|
|
221
|
+
export type DSLWorkflowStep = DSLActivityStep | DSLChildWorkflowStep;
|
|
222
|
+
export interface DSLWorkflowSpecBase {
|
|
223
|
+
name: string;
|
|
224
|
+
description?: string;
|
|
225
|
+
tags?: string[];
|
|
226
|
+
steps?: DSLWorkflowStep[] | never;
|
|
227
|
+
/**
|
|
228
|
+
* @deprecated use steps instead
|
|
229
|
+
*/
|
|
230
|
+
activities?: DSLActivitySpec[] | never;
|
|
231
|
+
vars: Record<string, any>;
|
|
232
|
+
options?: DSLActivityOptions;
|
|
233
|
+
result?: string;
|
|
234
|
+
debug_mode?: boolean;
|
|
235
|
+
}
|
|
236
|
+
export interface DSLWorkflowSpecWithSteps extends DSLWorkflowSpecBase {
|
|
237
|
+
steps: DSLWorkflowStep[];
|
|
238
|
+
/**
|
|
239
|
+
* @deprecated use steps instead
|
|
240
|
+
*/
|
|
241
|
+
activities?: never;
|
|
242
|
+
}
|
|
243
|
+
/**
|
|
244
|
+
* @deprecated use steps instead
|
|
245
|
+
*/
|
|
246
|
+
export interface DSLWorkflowSpecWithActivities extends DSLWorkflowSpecBase {
|
|
247
|
+
steps?: never;
|
|
248
|
+
/**
|
|
249
|
+
* @deprecated use steps instead
|
|
250
|
+
*/
|
|
251
|
+
activities: DSLActivitySpec[];
|
|
252
|
+
}
|
|
253
|
+
/**
|
|
254
|
+
* activities and steps fields are mutually exclusive
|
|
255
|
+
* steps was added after activities and may contain a mix of activities and other tasks like exec child workflows.
|
|
256
|
+
* For backward compatibility we keep the activities field as a fallback but one should use one or the other not both.
|
|
257
|
+
*/
|
|
258
|
+
export type DSLWorkflowSpec = DSLWorkflowSpecWithSteps | DSLWorkflowSpecWithActivities;
|
|
259
|
+
export interface DSLWorkflowDefinition extends BaseObject, DSLWorkflowSpecBase {
|
|
260
|
+
input_schema?: Record<string, any>;
|
|
261
|
+
activities?: DSLActivitySpec[];
|
|
262
|
+
steps?: DSLWorkflowStep[];
|
|
263
|
+
}
|
|
264
|
+
export interface WorkflowDefinitionRef {
|
|
265
|
+
id: string;
|
|
266
|
+
name: string;
|
|
267
|
+
description?: string;
|
|
268
|
+
tags?: string[];
|
|
269
|
+
created_at: Date;
|
|
270
|
+
updated_at: Date;
|
|
271
|
+
}
|
|
272
|
+
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,CAAC;AACzC,OAAO,EAAE,wBAAwB,EAAE,MAAM,YAAY,CAAC;AACtD,OAAO,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AAExD;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG,WAAW,GAAG,OAAO,CAAC;AAEtD;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAC9B,GAAG,EAAE,MAAM,CAAC;IACZ,QAAQ,EAAE,MAAM,CAAC;CACpB;AAED;;;GAGG;AACH,MAAM,MAAM,aAAa,GACnB;IAAE,SAAS,EAAE,WAAW,CAAC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M,6BAA6B,mDAAmD,CAAA"}
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import { BaseObject } from "./common.js";
|
|
2
|
+
/**
|
|
3
|
+
* Tool recommendation within a hive memory unit
|
|
4
|
+
*/
|
|
5
|
+
export interface HiveMemoryToolRecommendation {
|
|
6
|
+
tool_name: string;
|
|
7
|
+
guidance: string;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Memory unit scope - project-scoped by default, can be elevated to account
|
|
11
|
+
*/
|
|
12
|
+
export type HiveMemoryScope = 'project' | 'account';
|
|
13
|
+
/**
|
|
14
|
+
* Base interface for hive memory items (list/summary view)
|
|
15
|
+
*/
|
|
16
|
+
export interface HiveMemoryItem extends BaseObject {
|
|
17
|
+
task_category: string;
|
|
18
|
+
domain?: string;
|
|
19
|
+
summary: string;
|
|
20
|
+
tools_involved: string[];
|
|
21
|
+
confidence_score: number;
|
|
22
|
+
usage_count: number;
|
|
23
|
+
success_correlation: number;
|
|
24
|
+
contribution_count: number;
|
|
25
|
+
scope: HiveMemoryScope;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Full hive memory unit with all learnings and patterns
|
|
29
|
+
*/
|
|
30
|
+
export interface HiveMemory extends HiveMemoryItem {
|
|
31
|
+
objective_patterns: string[];
|
|
32
|
+
general_learnings: string[];
|
|
33
|
+
best_practices: string[];
|
|
34
|
+
pitfalls_to_avoid: string[];
|
|
35
|
+
tool_recommendations: HiveMemoryToolRecommendation[];
|
|
36
|
+
embedding?: number[];
|
|
37
|
+
security?: Record<string, string[]>;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Payload for creating a new hive memory unit
|
|
41
|
+
*/
|
|
42
|
+
export interface CreateHiveMemoryPayload {
|
|
43
|
+
task_category: string;
|
|
44
|
+
domain?: string;
|
|
45
|
+
summary: string;
|
|
46
|
+
objective_patterns: string[];
|
|
47
|
+
general_learnings: string[];
|
|
48
|
+
best_practices?: string[];
|
|
49
|
+
pitfalls_to_avoid?: string[];
|
|
50
|
+
tool_recommendations?: HiveMemoryToolRecommendation[];
|
|
51
|
+
tools_involved?: string[];
|
|
52
|
+
confidence_score?: number;
|
|
53
|
+
scope?: HiveMemoryScope;
|
|
54
|
+
name?: string;
|
|
55
|
+
description?: string;
|
|
56
|
+
tags?: string[];
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Payload for updating an existing hive memory unit
|
|
60
|
+
*/
|
|
61
|
+
export interface UpdateHiveMemoryPayload {
|
|
62
|
+
task_category?: string;
|
|
63
|
+
domain?: string;
|
|
64
|
+
summary?: string;
|
|
65
|
+
add_objective_patterns?: string[];
|
|
66
|
+
add_general_learnings?: string[];
|
|
67
|
+
add_best_practices?: string[];
|
|
68
|
+
add_pitfalls_to_avoid?: string[];
|
|
69
|
+
add_tool_recommendations?: HiveMemoryToolRecommendation[];
|
|
70
|
+
add_tools_involved?: string[];
|
|
71
|
+
confidence_score?: number;
|
|
72
|
+
increment_usage_count?: boolean;
|
|
73
|
+
increment_contribution_count?: boolean;
|
|
74
|
+
success_correlation?: number;
|
|
75
|
+
scope?: HiveMemoryScope;
|
|
76
|
+
name?: string;
|
|
77
|
+
description?: string;
|
|
78
|
+
tags?: string[];
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Search parameters for finding relevant memories
|
|
82
|
+
*/
|
|
83
|
+
export interface HiveMemorySearchParams {
|
|
84
|
+
query?: string;
|
|
85
|
+
embedding?: number[];
|
|
86
|
+
task_category?: string;
|
|
87
|
+
domain?: string;
|
|
88
|
+
tools_involved?: string[];
|
|
89
|
+
scope?: HiveMemoryScope;
|
|
90
|
+
min_confidence?: number;
|
|
91
|
+
limit?: number;
|
|
92
|
+
offset?: number;
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* Response from memory search
|
|
96
|
+
*/
|
|
97
|
+
export interface HiveMemorySearchResult {
|
|
98
|
+
memories: HiveMemory[];
|
|
99
|
+
total: number;
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* Formatted memory for agent consumption
|
|
103
|
+
*/
|
|
104
|
+
export interface FormattedMemoryForAgent {
|
|
105
|
+
category: string;
|
|
106
|
+
domain?: string;
|
|
107
|
+
summary: string;
|
|
108
|
+
learnings: string[];
|
|
109
|
+
best_practices: string[];
|
|
110
|
+
pitfalls_to_avoid: string[];
|
|
111
|
+
tool_guidance: {
|
|
112
|
+
tool: string;
|
|
113
|
+
guidance: string;
|
|
114
|
+
}[];
|
|
115
|
+
confidence: number;
|
|
116
|
+
}
|