@versori/run 0.6.0-alpha.1 → 0.6.1
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/esm/deps/jsr.io/@std/fmt/1.0.10/colors.d.ts.map +1 -0
- package/esm/deps/jsr.io/@std/fmt/{1.0.9 → 1.0.10}/colors.js +2 -2
- package/esm/deps/jsr.io/@std/log/0.224.14/console_handler.js +1 -1
- package/esm/src/connection/internal/CredentialHolder.js +1 -1
- package/esm/src/connection/internal/FetchBuilder.d.ts +2 -9
- package/esm/src/connection/internal/FetchBuilder.d.ts.map +1 -1
- package/esm/src/connection/internal/FetchBuilder.js +3 -124
- package/esm/src/context/Context.d.ts +0 -5
- package/esm/src/context/Context.d.ts.map +1 -1
- package/esm/src/context/Context.js +3 -6
- package/esm/src/context/VanillaContext.d.ts.map +1 -1
- package/esm/src/context/VanillaContext.js +3 -0
- package/esm/src/context/WorkflowClient.d.ts +1 -0
- package/esm/src/context/WorkflowClient.d.ts.map +1 -1
- package/esm/src/context/WorkflowClient.js +3 -0
- package/esm/src/dsl/Workflow.d.ts.map +1 -1
- package/esm/src/dsl/Workflow.js +0 -2
- package/esm/src/dsl/http/types.d.ts +0 -2
- package/esm/src/dsl/http/types.d.ts.map +1 -1
- package/esm/src/dsl/http/versori/configloader.d.ts.map +1 -1
- package/esm/src/dsl/http/versori/configloader.js +1 -1
- package/esm/src/dsl/http/versori/constants.d.ts +21 -0
- package/esm/src/dsl/http/versori/constants.d.ts.map +1 -0
- package/esm/src/dsl/http/versori/constants.js +38 -0
- package/esm/src/dsl/http/versori/cronapi.d.ts +3 -2
- package/esm/src/dsl/http/versori/cronapi.d.ts.map +1 -1
- package/esm/src/dsl/http/versori/cronapi.js +15 -14
- package/esm/src/dsl/http/versori/kvapi/core/OpenAPI.js +1 -1
- package/esm/src/dsl/triggers/WebhookTrigger.d.ts.map +1 -1
- package/esm/src/dsl/triggers/WebhookTrigger.js +1 -3
- package/esm/src/internal/constants.d.ts +0 -3
- package/esm/src/internal/constants.d.ts.map +1 -1
- package/esm/src/internal/constants.js +0 -3
- package/esm/src/interpreter/durable/DurableInterpreter.d.ts +2 -9
- package/esm/src/interpreter/durable/DurableInterpreter.d.ts.map +1 -1
- package/esm/src/interpreter/durable/DurableInterpreter.js +13 -57
- package/esm/src/interpreter/durable/ObservableCompiler.d.ts +1 -6
- package/esm/src/interpreter/durable/ObservableCompiler.d.ts.map +1 -1
- package/esm/src/interpreter/durable/Queue.d.ts +3 -0
- package/esm/src/interpreter/durable/Queue.d.ts.map +1 -1
- package/esm/src/interpreter/durable/Queue.js +1 -1
- package/esm/src/interpreter/durable/compilers/catch.d.ts.map +1 -1
- package/esm/src/interpreter/durable/compilers/catch.js +1 -3
- package/esm/src/interpreter/durable/compilers/durableworkflow.d.ts.map +1 -1
- package/esm/src/interpreter/durable/compilers/durableworkflow.js +21 -6
- package/esm/src/interpreter/durable/compilers/fn.d.ts.map +1 -1
- package/esm/src/interpreter/durable/compilers/fn.js +6 -29
- package/esm/src/interpreter/durable/compilers/http.d.ts.map +1 -1
- package/esm/src/interpreter/durable/compilers/http.js +11 -45
- package/esm/src/interpreter/durable/compilers/schedule.d.ts.map +1 -1
- package/esm/src/interpreter/durable/compilers/schedule.js +3 -4
- package/esm/src/interpreter/durable/compilers/webhook.d.ts.map +1 -1
- package/esm/src/interpreter/durable/compilers/webhook.js +0 -2
- package/esm/src/interpreter/memory/MemoryInterpreter.d.ts +1 -8
- package/esm/src/interpreter/memory/MemoryInterpreter.d.ts.map +1 -1
- package/esm/src/interpreter/memory/MemoryInterpreter.js +12 -56
- package/esm/src/interpreter/memory/ObservableCompiler.d.ts +1 -6
- package/esm/src/interpreter/memory/ObservableCompiler.d.ts.map +1 -1
- package/esm/src/interpreter/memory/compilers/catch.d.ts.map +1 -1
- package/esm/src/interpreter/memory/compilers/catch.js +0 -5
- package/esm/src/interpreter/memory/compilers/fn.d.ts.map +1 -1
- package/esm/src/interpreter/memory/compilers/fn.js +18 -29
- package/esm/src/interpreter/memory/compilers/http.d.ts.map +1 -1
- package/esm/src/interpreter/memory/compilers/http.js +10 -44
- package/esm/src/interpreter/memory/compilers/schedule.d.ts.map +1 -1
- package/esm/src/interpreter/memory/compilers/schedule.js +4 -61
- package/esm/src/interpreter/memory/compilers/webhook.d.ts.map +1 -1
- package/esm/src/interpreter/memory/compilers/webhook.js +3 -9
- package/esm/src/interpreter/vanilla/VanillaInterpreter.d.ts +0 -1
- package/esm/src/interpreter/vanilla/VanillaInterpreter.d.ts.map +1 -1
- package/esm/src/interpreter/vanilla/VanillaInterpreter.js +6 -30
- package/esm/src/interpreter/vanilla/compilers/durableworkflow.d.ts.map +1 -1
- package/esm/src/interpreter/vanilla/compilers/durableworkflow.js +12 -2
- package/esm/src/interpreter/vanilla/compilers/schedule.js +1 -1
- package/esm/src/issues/Issues.d.ts.map +1 -1
- package/esm/src/issues/Issues.js +1 -6
- package/esm/src/kv/KeyValue.d.ts +7 -3
- package/esm/src/kv/KeyValue.d.ts.map +1 -1
- package/esm/src/kv/fingerprintExternalUserId.d.ts +6 -0
- package/esm/src/kv/fingerprintExternalUserId.d.ts.map +1 -0
- package/esm/src/kv/fingerprintExternalUserId.js +20 -0
- package/esm/src/kv/memory/MemoryKeyValueProvider.d.ts +4 -0
- package/esm/src/kv/memory/MemoryKeyValueProvider.d.ts.map +1 -1
- package/esm/src/kv/memory/MemoryKeyValueProvider.js +50 -0
- package/esm/src/kv/nats/NatsKeyValueProvider.d.ts.map +1 -1
- package/esm/src/kv/nats/NatsKeyValueProvider.js +14 -0
- package/esm/src/kv/sdk/SDKKeyValueProvider.d.ts.map +1 -1
- package/esm/src/kv/sdk/SDKKeyValueProvider.js +12 -0
- package/esm/src/observability/logging/ConsoleLogger.d.ts.map +1 -1
- package/esm/src/observability/mod.d.ts +1 -0
- package/esm/src/observability/mod.d.ts.map +1 -1
- package/esm/src/observability/mod.js +1 -0
- package/esm/src/observability/tracePropagation.d.ts +23 -0
- package/esm/src/observability/tracePropagation.d.ts.map +1 -0
- package/esm/src/observability/tracePropagation.js +39 -0
- package/package.json +1 -3
- package/script/deps/jsr.io/@std/fmt/1.0.10/colors.d.ts.map +1 -0
- package/script/deps/jsr.io/@std/fmt/{1.0.9 → 1.0.10}/colors.js +2 -2
- package/script/deps/jsr.io/@std/log/0.224.14/console_handler.js +1 -1
- package/script/src/connection/internal/CredentialHolder.js +1 -1
- package/script/src/connection/internal/FetchBuilder.d.ts +2 -9
- package/script/src/connection/internal/FetchBuilder.d.ts.map +1 -1
- package/script/src/connection/internal/FetchBuilder.js +3 -147
- package/script/src/context/Context.d.ts +0 -5
- package/script/src/context/Context.d.ts.map +1 -1
- package/script/src/context/Context.js +3 -6
- package/script/src/context/VanillaContext.d.ts.map +1 -1
- package/script/src/context/VanillaContext.js +3 -0
- package/script/src/context/WorkflowClient.d.ts +1 -0
- package/script/src/context/WorkflowClient.d.ts.map +1 -1
- package/script/src/context/WorkflowClient.js +3 -0
- package/script/src/dsl/Workflow.d.ts.map +1 -1
- package/script/src/dsl/Workflow.js +0 -2
- package/script/src/dsl/http/types.d.ts +0 -2
- package/script/src/dsl/http/types.d.ts.map +1 -1
- package/script/src/dsl/http/versori/configloader.d.ts.map +1 -1
- package/script/src/dsl/http/versori/configloader.js +1 -1
- package/script/src/dsl/http/versori/constants.d.ts +21 -0
- package/script/src/dsl/http/versori/constants.d.ts.map +1 -0
- package/script/src/dsl/http/versori/constants.js +41 -0
- package/script/src/dsl/http/versori/cronapi.d.ts +3 -2
- package/script/src/dsl/http/versori/cronapi.d.ts.map +1 -1
- package/script/src/dsl/http/versori/cronapi.js +15 -14
- package/script/src/dsl/http/versori/kvapi/core/OpenAPI.js +1 -1
- package/script/src/dsl/triggers/WebhookTrigger.d.ts.map +1 -1
- package/script/src/dsl/triggers/WebhookTrigger.js +1 -3
- package/script/src/internal/constants.d.ts +0 -3
- package/script/src/internal/constants.d.ts.map +1 -1
- package/script/src/internal/constants.js +1 -4
- package/script/src/interpreter/durable/DurableInterpreter.d.ts +2 -9
- package/script/src/interpreter/durable/DurableInterpreter.d.ts.map +1 -1
- package/script/src/interpreter/durable/DurableInterpreter.js +18 -62
- package/script/src/interpreter/durable/ObservableCompiler.d.ts +1 -6
- package/script/src/interpreter/durable/ObservableCompiler.d.ts.map +1 -1
- package/script/src/interpreter/durable/Queue.d.ts +3 -0
- package/script/src/interpreter/durable/Queue.d.ts.map +1 -1
- package/script/src/interpreter/durable/Queue.js +1 -1
- package/script/src/interpreter/durable/compilers/catch.d.ts.map +1 -1
- package/script/src/interpreter/durable/compilers/catch.js +1 -3
- package/script/src/interpreter/durable/compilers/durableworkflow.d.ts.map +1 -1
- package/script/src/interpreter/durable/compilers/durableworkflow.js +21 -6
- package/script/src/interpreter/durable/compilers/fn.d.ts.map +1 -1
- package/script/src/interpreter/durable/compilers/fn.js +5 -28
- package/script/src/interpreter/durable/compilers/http.d.ts.map +1 -1
- package/script/src/interpreter/durable/compilers/http.js +11 -45
- package/script/src/interpreter/durable/compilers/schedule.d.ts.map +1 -1
- package/script/src/interpreter/durable/compilers/schedule.js +3 -4
- package/script/src/interpreter/durable/compilers/webhook.d.ts.map +1 -1
- package/script/src/interpreter/durable/compilers/webhook.js +0 -2
- package/script/src/interpreter/memory/MemoryInterpreter.d.ts +1 -8
- package/script/src/interpreter/memory/MemoryInterpreter.d.ts.map +1 -1
- package/script/src/interpreter/memory/MemoryInterpreter.js +11 -55
- package/script/src/interpreter/memory/ObservableCompiler.d.ts +1 -6
- package/script/src/interpreter/memory/ObservableCompiler.d.ts.map +1 -1
- package/script/src/interpreter/memory/compilers/catch.d.ts.map +1 -1
- package/script/src/interpreter/memory/compilers/catch.js +0 -5
- package/script/src/interpreter/memory/compilers/fn.d.ts.map +1 -1
- package/script/src/interpreter/memory/compilers/fn.js +17 -28
- package/script/src/interpreter/memory/compilers/http.d.ts.map +1 -1
- package/script/src/interpreter/memory/compilers/http.js +10 -44
- package/script/src/interpreter/memory/compilers/schedule.d.ts.map +1 -1
- package/script/src/interpreter/memory/compilers/schedule.js +4 -61
- package/script/src/interpreter/memory/compilers/webhook.d.ts.map +1 -1
- package/script/src/interpreter/memory/compilers/webhook.js +3 -9
- package/script/src/interpreter/vanilla/VanillaInterpreter.d.ts +0 -1
- package/script/src/interpreter/vanilla/VanillaInterpreter.d.ts.map +1 -1
- package/script/src/interpreter/vanilla/VanillaInterpreter.js +6 -30
- package/script/src/interpreter/vanilla/compilers/durableworkflow.d.ts.map +1 -1
- package/script/src/interpreter/vanilla/compilers/durableworkflow.js +12 -2
- package/script/src/interpreter/vanilla/compilers/schedule.js +1 -1
- package/script/src/issues/Issues.d.ts.map +1 -1
- package/script/src/issues/Issues.js +1 -6
- package/script/src/kv/KeyValue.d.ts +7 -3
- package/script/src/kv/KeyValue.d.ts.map +1 -1
- package/script/src/kv/fingerprintExternalUserId.d.ts +6 -0
- package/script/src/kv/fingerprintExternalUserId.d.ts.map +1 -0
- package/script/src/kv/fingerprintExternalUserId.js +23 -0
- package/script/src/kv/memory/MemoryKeyValueProvider.d.ts +4 -0
- package/script/src/kv/memory/MemoryKeyValueProvider.d.ts.map +1 -1
- package/script/src/kv/memory/MemoryKeyValueProvider.js +50 -0
- package/script/src/kv/nats/NatsKeyValueProvider.d.ts.map +1 -1
- package/script/src/kv/nats/NatsKeyValueProvider.js +14 -0
- package/script/src/kv/sdk/SDKKeyValueProvider.d.ts.map +1 -1
- package/script/src/kv/sdk/SDKKeyValueProvider.js +12 -0
- package/script/src/observability/logging/ConsoleLogger.d.ts.map +1 -1
- package/script/src/observability/mod.d.ts +1 -0
- package/script/src/observability/mod.d.ts.map +1 -1
- package/script/src/observability/mod.js +1 -0
- package/script/src/observability/tracePropagation.d.ts +23 -0
- package/script/src/observability/tracePropagation.d.ts.map +1 -0
- package/script/src/observability/tracePropagation.js +46 -0
- package/esm/deps/jsr.io/@std/fmt/1.0.9/colors.d.ts.map +0 -1
- package/esm/src/internal/supervisor.d.ts +0 -23
- package/esm/src/internal/supervisor.d.ts.map +0 -1
- package/esm/src/internal/supervisor.js +0 -267
- package/script/deps/jsr.io/@std/fmt/1.0.9/colors.d.ts.map +0 -1
- package/script/src/internal/supervisor.d.ts +0 -23
- package/script/src/internal/supervisor.d.ts.map +0 -1
- package/script/src/internal/supervisor.js +0 -275
- /package/esm/deps/jsr.io/@std/fmt/{1.0.9 → 1.0.10}/colors.d.ts +0 -0
- /package/script/deps/jsr.io/@std/fmt/{1.0.9 → 1.0.10}/colors.d.ts +0 -0
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Copyright (c) 2025 Versori Group Inc
|
|
4
|
+
*
|
|
5
|
+
* Use of this software is governed by the Business Source License 1.1
|
|
6
|
+
* included in the LICENSE file at the root of this repository.
|
|
7
|
+
*
|
|
8
|
+
* Change Date: 2029-01-01
|
|
9
|
+
* Change License: Apache License, Version 2.0
|
|
10
|
+
*
|
|
11
|
+
* As of the Change Date, in accordance with the Business Source License,
|
|
12
|
+
* use of this software will be governed by the Apache License, Version 2.0.
|
|
13
|
+
*/
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.fingerprintExternalUserId = fingerprintExternalUserId;
|
|
16
|
+
const node_crypto_1 = require("node:crypto");
|
|
17
|
+
/**
|
|
18
|
+
* Stable hex fingerprint of an external user id for KV path segments.
|
|
19
|
+
* Output is `[0-9a-f]{64}` so it satisfies backends that only allow `[a-zA-Z0-9_-]+` per segment.
|
|
20
|
+
*/
|
|
21
|
+
function fingerprintExternalUserId(externalUserId) {
|
|
22
|
+
return (0, node_crypto_1.createHash)('sha256').update(externalUserId, 'utf8').digest('hex');
|
|
23
|
+
}
|
|
@@ -2,8 +2,12 @@ import { DestroyOptions, KeyValue, KeyValueProvider, KVOptions } from '../KeyVal
|
|
|
2
2
|
export declare class MemoryKeyValueProvider implements KeyValueProvider {
|
|
3
3
|
private executionKv;
|
|
4
4
|
private projectKv;
|
|
5
|
+
private workspaceKv;
|
|
6
|
+
private organizationKv;
|
|
7
|
+
private userKv;
|
|
5
8
|
kv(options: KVOptions): KeyValue;
|
|
6
9
|
destroy(options: DestroyOptions): Promise<void>;
|
|
7
10
|
private getExecutionKv;
|
|
11
|
+
private getUserKv;
|
|
8
12
|
}
|
|
9
13
|
//# sourceMappingURL=MemoryKeyValueProvider.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MemoryKeyValueProvider.d.ts","sourceRoot":"","sources":["../../../../src/src/kv/memory/MemoryKeyValueProvider.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,cAAc,EAAE,QAAQ,EAAE,gBAAgB,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAGvF,qBAAa,sBAAuB,YAAW,gBAAgB;IAC3D,OAAO,CAAC,WAAW,CAAoC;
|
|
1
|
+
{"version":3,"file":"MemoryKeyValueProvider.d.ts","sourceRoot":"","sources":["../../../../src/src/kv/memory/MemoryKeyValueProvider.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,cAAc,EAAE,QAAQ,EAAE,gBAAgB,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAGvF,qBAAa,sBAAuB,YAAW,gBAAgB;IAC3D,OAAO,CAAC,WAAW,CAAoC;IACvD,OAAO,CAAC,SAAS,CAAkC;IACnD,OAAO,CAAC,WAAW,CAAkC;IACrD,OAAO,CAAC,cAAc,CAAkC;IACxD,OAAO,CAAC,MAAM,CAAoC;IAElD,EAAE,CAAC,OAAO,EAAE,SAAS,GAAG,QAAQ;IAyBhC,OAAO,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC;IAgC/C,OAAO,CAAC,cAAc;IAWtB,OAAO,CAAC,SAAS;CAUpB"}
|
|
@@ -28,6 +28,24 @@ class MemoryKeyValueProvider {
|
|
|
28
28
|
writable: true,
|
|
29
29
|
value: new MemoryKeyValue_js_1.MemoryKeyValue()
|
|
30
30
|
});
|
|
31
|
+
Object.defineProperty(this, "workspaceKv", {
|
|
32
|
+
enumerable: true,
|
|
33
|
+
configurable: true,
|
|
34
|
+
writable: true,
|
|
35
|
+
value: new MemoryKeyValue_js_1.MemoryKeyValue()
|
|
36
|
+
});
|
|
37
|
+
Object.defineProperty(this, "organizationKv", {
|
|
38
|
+
enumerable: true,
|
|
39
|
+
configurable: true,
|
|
40
|
+
writable: true,
|
|
41
|
+
value: new MemoryKeyValue_js_1.MemoryKeyValue()
|
|
42
|
+
});
|
|
43
|
+
Object.defineProperty(this, "userKv", {
|
|
44
|
+
enumerable: true,
|
|
45
|
+
configurable: true,
|
|
46
|
+
writable: true,
|
|
47
|
+
value: new Map()
|
|
48
|
+
});
|
|
31
49
|
}
|
|
32
50
|
kv(options) {
|
|
33
51
|
switch (options.scope) {
|
|
@@ -38,6 +56,15 @@ class MemoryKeyValueProvider {
|
|
|
38
56
|
return this.getExecutionKv(options.executionId);
|
|
39
57
|
case ':project:':
|
|
40
58
|
return this.projectKv;
|
|
59
|
+
case ':workspace:':
|
|
60
|
+
return this.workspaceKv;
|
|
61
|
+
case ':organization:':
|
|
62
|
+
return this.organizationKv;
|
|
63
|
+
case ':user:':
|
|
64
|
+
if (typeof options.externalUserId === 'undefined') {
|
|
65
|
+
throw new Error('externalUserId is required when scope is :user:');
|
|
66
|
+
}
|
|
67
|
+
return this.getUserKv(options.externalUserId);
|
|
41
68
|
default:
|
|
42
69
|
throw new Error(`Unsupported scope: ${options.scope}`);
|
|
43
70
|
}
|
|
@@ -50,6 +77,21 @@ class MemoryKeyValueProvider {
|
|
|
50
77
|
}
|
|
51
78
|
this.executionKv.delete(options.executionId);
|
|
52
79
|
return Promise.resolve();
|
|
80
|
+
case ':project:':
|
|
81
|
+
this.projectKv = new MemoryKeyValue_js_1.MemoryKeyValue();
|
|
82
|
+
return Promise.resolve();
|
|
83
|
+
case ':workspace:':
|
|
84
|
+
this.workspaceKv = new MemoryKeyValue_js_1.MemoryKeyValue();
|
|
85
|
+
return Promise.resolve();
|
|
86
|
+
case ':organization:':
|
|
87
|
+
this.organizationKv = new MemoryKeyValue_js_1.MemoryKeyValue();
|
|
88
|
+
return Promise.resolve();
|
|
89
|
+
case ':user:':
|
|
90
|
+
if (typeof options.externalUserId === 'undefined') {
|
|
91
|
+
throw new Error('externalUserId is required when scope is :user:');
|
|
92
|
+
}
|
|
93
|
+
this.userKv.delete(options.externalUserId);
|
|
94
|
+
return Promise.resolve();
|
|
53
95
|
default:
|
|
54
96
|
return Promise.resolve();
|
|
55
97
|
}
|
|
@@ -62,5 +104,13 @@ class MemoryKeyValueProvider {
|
|
|
62
104
|
}
|
|
63
105
|
return kv;
|
|
64
106
|
}
|
|
107
|
+
getUserKv(externalUserId) {
|
|
108
|
+
let kv = this.userKv.get(externalUserId);
|
|
109
|
+
if (!kv) {
|
|
110
|
+
kv = new MemoryKeyValue_js_1.MemoryKeyValue();
|
|
111
|
+
this.userKv.set(externalUserId, kv);
|
|
112
|
+
}
|
|
113
|
+
return kv;
|
|
114
|
+
}
|
|
65
115
|
}
|
|
66
116
|
exports.MemoryKeyValueProvider = MemoryKeyValueProvider;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NatsKeyValueProvider.d.ts","sourceRoot":"","sources":["../../../../src/src/kv/nats/NatsKeyValueProvider.ts"],"names":[],"mappings":"AAeA,OAAO,EAA+B,UAAU,EAAE,MAAM,+DAA+D,CAAC;
|
|
1
|
+
{"version":3,"file":"NatsKeyValueProvider.d.ts","sourceRoot":"","sources":["../../../../src/src/kv/nats/NatsKeyValueProvider.ts"],"names":[],"mappings":"AAeA,OAAO,EAA+B,UAAU,EAAE,MAAM,+DAA+D,CAAC;AAGxH,OAAO,EAAE,cAAc,EAAE,QAAQ,EAAE,gBAAgB,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AA4CvF,MAAM,MAAM,2BAA2B,GAAG;IACtC,cAAc,EAAE,MAAM,CAAC;IACvB,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE;QACF,GAAG,EAAE,MAAM,CAAC;QACZ,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,GAAG,CAAC,EAAE,UAAU,CAAC;KACpB,CAAC;CACL,CAAC;AAuBF,qBAAa,oBAAqB,YAAW,gBAAgB,EAAE,eAAe;IAEtE,OAAO,CAAC,QAAQ,CAAC,GAAG;IACpB,OAAO,CAAC,QAAQ,CAAC,UAAU;IAC3B,OAAO,CAAC,QAAQ,CAAC,cAAc;IAC/B,OAAO,CAAC,QAAQ,CAAC,gBAAgB;IACjC,OAAO,CAAC,QAAQ,CAAC,IAAI;IALzB,OAAO;WAQM,WAAW,CACpB,IAAI,GAAE,OAAO,CAAC,2BAA2B,CAAM,GAChD,OAAO,CAAC,oBAAoB,CAAC;IA0BhC,MAAM,CAAC,OAAO,IAAI,OAAO,CAAC,oBAAoB,CAAC;IAI/C,CAAC,MAAM,CAAC,YAAY,CAAC,IAAI,WAAW,CAAC,IAAI,CAAC;IAI1C,EAAE,CAAC,OAAO,EAAE,SAAS,GAAG,QAAQ;IAyB1B,OAAO,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC;IA6CrD,OAAO,CAAC,aAAa;CAsBxB"}
|
|
@@ -16,6 +16,7 @@ exports.NatsKeyValueProvider = void 0;
|
|
|
16
16
|
const mod_js_1 = require("../../../deps/jsr.io/@nats-io/jetstream/3.3.1/src/mod.js");
|
|
17
17
|
const mod_js_2 = require("../../../deps/jsr.io/@nats-io/kv/3.3.1/src/mod.js");
|
|
18
18
|
const mod_js_3 = require("../../../deps/jsr.io/@nats-io/transport-deno/3.3.1/src/mod.js");
|
|
19
|
+
const fingerprintExternalUserId_js_1 = require("../fingerprintExternalUserId.js");
|
|
19
20
|
const isKVOptionsExecution_js_1 = require("../isKVOptionsExecution.js");
|
|
20
21
|
const NatsKeyValue_js_1 = require("./NatsKeyValue.js");
|
|
21
22
|
function getOptionsFromEnv() {
|
|
@@ -128,6 +129,10 @@ class NatsKeyValueProvider {
|
|
|
128
129
|
return new NatsKeyValue_js_1.NatsKeyValue(this.kvOrgScope, this.subjectPrefix(options));
|
|
129
130
|
case ':project:':
|
|
130
131
|
return new NatsKeyValue_js_1.NatsKeyValue(this.kvProjectScope, this.subjectPrefix(options));
|
|
132
|
+
case ':workspace:':
|
|
133
|
+
return new NatsKeyValue_js_1.NatsKeyValue(this.kvProjectScope, this.subjectPrefix(options));
|
|
134
|
+
case ':user:':
|
|
135
|
+
return new NatsKeyValue_js_1.NatsKeyValue(this.kvProjectScope, this.subjectPrefix(options));
|
|
131
136
|
case ':execution:':
|
|
132
137
|
if (!(0, isKVOptionsExecution_js_1.isKVOptionsExecution)(options)) {
|
|
133
138
|
throw new Error('invalid KV options, executionId is required for :execution: scope');
|
|
@@ -178,8 +183,17 @@ class NatsKeyValueProvider {
|
|
|
178
183
|
return `${this.opts.organizationId}`;
|
|
179
184
|
case ':project:':
|
|
180
185
|
return `${this.opts.organizationId}.${this.opts.projectId}.${this.opts.environment}${activationSuffix}`;
|
|
186
|
+
case ':workspace:':
|
|
187
|
+
return `${this.opts.organizationId}.${this.opts.projectId}.${this.opts.environment}`;
|
|
188
|
+
case ':user:':
|
|
189
|
+
if (typeof options.externalUserId === 'undefined') {
|
|
190
|
+
throw new Error('externalUserId is required when scope is :user:');
|
|
191
|
+
}
|
|
192
|
+
return `${this.opts.organizationId}.${this.opts.projectId}.${this.opts.environment}.${(0, fingerprintExternalUserId_js_1.fingerprintExternalUserId)(options.externalUserId)}`;
|
|
181
193
|
case ':execution:':
|
|
182
194
|
return `${this.opts.organizationId}.${this.opts.projectId}.${this.opts.environment}.${options.executionId}${activationSuffix}`;
|
|
195
|
+
default:
|
|
196
|
+
throw new Error(`Unsupported scope for subjectPrefix: ${options.scope}`);
|
|
183
197
|
}
|
|
184
198
|
}
|
|
185
199
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SDKKeyValueProvider.d.ts","sourceRoot":"","sources":["../../../../src/src/kv/sdk/SDKKeyValueProvider.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SDKKeyValueProvider.d.ts","sourceRoot":"","sources":["../../../../src/src/kv/sdk/SDKKeyValueProvider.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAE,cAAc,EAAE,QAAQ,EAAE,gBAAgB,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAkCvF,MAAM,MAAM,0BAA0B,GAAG;IACrC,cAAc,EAAE,MAAM,CAAC;IACvB,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;CACpB,CAAC;AA6BF,qBAAa,mBAAoB,YAAW,gBAAgB,EAAE,eAAe;IAErE,OAAO,CAAC,QAAQ,CAAC,UAAU;IAC3B,OAAO,CAAC,QAAQ,CAAC,cAAc;IAC/B,OAAO,CAAC,QAAQ,CAAC,gBAAgB;IACjC,OAAO,CAAC,QAAQ,CAAC,IAAI;IAJzB,OAAO;WAOM,WAAW,CACpB,IAAI,GAAE,OAAO,CAAC,0BAA0B,CAAM,GAC/C,OAAO,CAAC,mBAAmB,CAAC;IAY/B,MAAM,CAAC,OAAO,IAAI,OAAO,CAAC,mBAAmB,CAAC;IAI9C,CAAC,MAAM,CAAC,YAAY,CAAC,IAAI,WAAW,CAAC,IAAI,CAAC;IAI1C,EAAE,CAAC,OAAO,EAAE,SAAS,GAAG,QAAQ;IAyB1B,OAAO,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC;IA6CrD,OAAO,CAAC,aAAa;CAoBxB"}
|
|
@@ -15,6 +15,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
15
15
|
exports.SDKKeyValueProvider = void 0;
|
|
16
16
|
const KvOperationsService_js_1 = require("../../dsl/http/versori/kvapi/services/KvOperationsService.js");
|
|
17
17
|
const StoresService_js_1 = require("../../dsl/http/versori/kvapi/services/StoresService.js");
|
|
18
|
+
const fingerprintExternalUserId_js_1 = require("../fingerprintExternalUserId.js");
|
|
18
19
|
const isKVOptionsExecution_js_1 = require("../isKVOptionsExecution.js");
|
|
19
20
|
const SDKKeyValue_js_1 = require("./SDKKeyValue.js");
|
|
20
21
|
function getOptionsFromEnv() {
|
|
@@ -107,6 +108,10 @@ class SDKKeyValueProvider {
|
|
|
107
108
|
return new SDKKeyValue_js_1.SDKKeyValue(this.kvOrgScope, this.subjectPrefix(options));
|
|
108
109
|
case ':project:':
|
|
109
110
|
return new SDKKeyValue_js_1.SDKKeyValue(this.kvProjectScope, this.subjectPrefix(options));
|
|
111
|
+
case ':workspace:':
|
|
112
|
+
return new SDKKeyValue_js_1.SDKKeyValue(this.kvProjectScope, this.subjectPrefix(options));
|
|
113
|
+
case ':user:':
|
|
114
|
+
return new SDKKeyValue_js_1.SDKKeyValue(this.kvProjectScope, this.subjectPrefix(options));
|
|
110
115
|
case ':execution:':
|
|
111
116
|
if (!(0, isKVOptionsExecution_js_1.isKVOptionsExecution)(options)) {
|
|
112
117
|
throw new Error('invalid KV options, executionId is required for :execution: scope');
|
|
@@ -153,6 +158,13 @@ class SDKKeyValueProvider {
|
|
|
153
158
|
return `${this.opts.organizationId}/${this.opts.projectId}/${this.opts.environment}${activationSuffix}`;
|
|
154
159
|
case ':execution:':
|
|
155
160
|
return `${this.opts.organizationId}/${this.opts.projectId}/${this.opts.environment}/${options.executionId}${activationSuffix}`;
|
|
161
|
+
case ':workspace:':
|
|
162
|
+
return `${this.opts.organizationId}/${this.opts.projectId}/${this.opts.environment}`;
|
|
163
|
+
case ':user:':
|
|
164
|
+
if (typeof options.externalUserId === 'undefined') {
|
|
165
|
+
throw new Error('externalUserId is required when scope is :user:');
|
|
166
|
+
}
|
|
167
|
+
return `${this.opts.organizationId}/${this.opts.projectId}/${this.opts.environment}/${(0, fingerprintExternalUserId_js_1.fingerprintExternalUserId)(options.externalUserId)}`;
|
|
156
168
|
}
|
|
157
169
|
}
|
|
158
170
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConsoleLogger.d.ts","sourceRoot":"","sources":["../../../../src/src/observability/logging/ConsoleLogger.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,GAAG,MAAM,+CAA+C,CAAC;AACrE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"ConsoleLogger.d.ts","sourceRoot":"","sources":["../../../../src/src/observability/logging/ConsoleLogger.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,GAAG,MAAM,+CAA+C,CAAC;AACrE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAmN/C;;;;;GAKG;AACH,qBAAa,aAAc,YAAW,MAAM;IACxC,GAAG,EAAE,GAAG,CAAC,MAAM,CAAC;IAEhB,KAAK,EAAE,QAAQ,CAAC;IAEhB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;gBAEpB,KAAK,GAAE,QAAqD,EAAE,MAAM,GAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAM;IAO9G,KAAK,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI;IAO9D,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI;IAO7D,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI;IAO7D,KAAK,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,CAAC,EAAE,KAAK,EAAE,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI;IAC3E,KAAK,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI;IAsB9D,KAAK,CAAC,MAAM,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,GAAG,aAAa;IAOvD,QAAQ,CAAC,KAAK,EAAE,QAAQ,GAAG,IAAI;CAIlC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mod.d.ts","sourceRoot":"","sources":["../../../src/src/observability/mod.ts"],"names":[],"mappings":"AAaA;;;;;;GAMG;AAEH,cAAc,kBAAkB,CAAC"}
|
|
1
|
+
{"version":3,"file":"mod.d.ts","sourceRoot":"","sources":["../../../src/src/observability/mod.ts"],"names":[],"mappings":"AAaA;;;;;;GAMG;AAEH,cAAc,kBAAkB,CAAC;AACjC,cAAc,uBAAuB,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { Context } from '@opentelemetry/api';
|
|
2
|
+
/**
|
|
3
|
+
* Injects the current active OpenTelemetry trace context into the given carrier
|
|
4
|
+
* using the default W3C trace-context propagator. The returned object will
|
|
5
|
+
* contain `traceparent` (and optionally `tracestate`) keys that downstream
|
|
6
|
+
* consumers can use to continue the trace.
|
|
7
|
+
*/
|
|
8
|
+
export declare function injectTraceContext(into?: Record<string, any>): Record<string, any>;
|
|
9
|
+
/**
|
|
10
|
+
* Extracts an OpenTelemetry trace context from the given carrier (usually a
|
|
11
|
+
* workflow's metadata containing `traceparent`/`tracestate`). The returned
|
|
12
|
+
* Context can be passed as the parent context to
|
|
13
|
+
* `tracer.startActiveSpan(name, options, ctx, fn)` (or to
|
|
14
|
+
* `opentelemetry.context.with(...)`) so that subsequently created spans are
|
|
15
|
+
* children of the upstream trace.
|
|
16
|
+
*
|
|
17
|
+
* If the carrier has no `traceparent`, the current active context is returned
|
|
18
|
+
* unchanged - `startActiveSpan` will then create a new root span / new trace,
|
|
19
|
+
* which is exactly the behaviour we want for workflows submitted without any
|
|
20
|
+
* upstream trace (e.g. scheduler-triggered submissions).
|
|
21
|
+
*/
|
|
22
|
+
export declare function extractTraceContext(from: Record<string, any> | undefined): Context;
|
|
23
|
+
//# sourceMappingURL=tracePropagation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tracePropagation.d.ts","sourceRoot":"","sources":["../../../src/src/observability/tracePropagation.ts"],"names":[],"mappings":"AAaA,OAAsB,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAE5D;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAC9B,IAAI,GAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAM,GAC/B,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAGrB;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,mBAAmB,CAC/B,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,SAAS,GACtC,OAAO,CAKT"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Copyright (c) 2025 Versori Group Inc
|
|
4
|
+
*
|
|
5
|
+
* Use of this software is governed by the Business Source License 1.1
|
|
6
|
+
* included in the LICENSE file at the root of this repository.
|
|
7
|
+
*
|
|
8
|
+
* Change Date: 2029-01-01
|
|
9
|
+
* Change License: Apache License, Version 2.0
|
|
10
|
+
*
|
|
11
|
+
* As of the Change Date, in accordance with the Business Source License,
|
|
12
|
+
* use of this software will be governed by the Apache License, Version 2.0.
|
|
13
|
+
*/
|
|
14
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
15
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
16
|
+
};
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.injectTraceContext = injectTraceContext;
|
|
19
|
+
exports.extractTraceContext = extractTraceContext;
|
|
20
|
+
const api_1 = __importDefault(require("@opentelemetry/api"));
|
|
21
|
+
/**
|
|
22
|
+
* Injects the current active OpenTelemetry trace context into the given carrier
|
|
23
|
+
* using the default W3C trace-context propagator. The returned object will
|
|
24
|
+
* contain `traceparent` (and optionally `tracestate`) keys that downstream
|
|
25
|
+
* consumers can use to continue the trace.
|
|
26
|
+
*/
|
|
27
|
+
function injectTraceContext(into = {}) {
|
|
28
|
+
api_1.default.propagation.inject(api_1.default.context.active(), into);
|
|
29
|
+
return into;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Extracts an OpenTelemetry trace context from the given carrier (usually a
|
|
33
|
+
* workflow's metadata containing `traceparent`/`tracestate`). The returned
|
|
34
|
+
* Context can be passed as the parent context to
|
|
35
|
+
* `tracer.startActiveSpan(name, options, ctx, fn)` (or to
|
|
36
|
+
* `opentelemetry.context.with(...)`) so that subsequently created spans are
|
|
37
|
+
* children of the upstream trace.
|
|
38
|
+
*
|
|
39
|
+
* If the carrier has no `traceparent`, the current active context is returned
|
|
40
|
+
* unchanged - `startActiveSpan` will then create a new root span / new trace,
|
|
41
|
+
* which is exactly the behaviour we want for workflows submitted without any
|
|
42
|
+
* upstream trace (e.g. scheduler-triggered submissions).
|
|
43
|
+
*/
|
|
44
|
+
function extractTraceContext(from) {
|
|
45
|
+
return api_1.default.propagation.extract(api_1.default.context.active(), from ?? {});
|
|
46
|
+
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"colors.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/fmt/1.0.9/colors.ts"],"names":[],"mappings":"AAoEA,qEAAqE;AACrE,MAAM,WAAW,GAAG;IAClB,0BAA0B;IAC1B,CAAC,EAAE,MAAM,CAAC;IACV,4BAA4B;IAC5B,CAAC,EAAE,MAAM,CAAC;IACV,2BAA2B;IAC3B,CAAC,EAAE,MAAM,CAAC;CACX;AAID;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,OAA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AE,KAAK,EAAE,MAAM,GAAG,MAAM,CAEvD;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,MAAM,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAEzD;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,KAAK,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,GAAG,GAAG,MAAM,CAuB9D;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,OAAO,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,GAAG,GAAG,MAAM,CAuBhE;AAWD;;;;;;;;;;;;GAYG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAEpD"}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { ExportResult } from '@opentelemetry/core';
|
|
2
|
-
import { ReadableSpan, SpanExporter } from '@opentelemetry/sdk-trace-node';
|
|
3
|
-
import { Span } from '@opentelemetry/api';
|
|
4
|
-
import { ContextImpl } from '../context/Context.js';
|
|
5
|
-
import { WorkflowImpl } from '../dsl/Workflow.js';
|
|
6
|
-
export declare const enabled: boolean;
|
|
7
|
-
type MockConnection = {
|
|
8
|
-
name: string;
|
|
9
|
-
id?: string;
|
|
10
|
-
baseUrl?: string;
|
|
11
|
-
};
|
|
12
|
-
export declare function signalReady(): Promise<void>;
|
|
13
|
-
export declare function registerWorkflow<I, O>(workflow: WorkflowImpl<I, O>): Promise<void>;
|
|
14
|
-
export declare function sendTaskStartEvent<I, O>(taskId: string, ctx: ContextImpl<I, O>, span: Span): Promise<ContextImpl<I, O>>;
|
|
15
|
-
export declare function mockAPIRequest(info: RequestInfo | URL, cnx?: MockConnection, options?: RequestInit): Promise<Response>;
|
|
16
|
-
export declare class Fake implements SpanExporter {
|
|
17
|
-
constructor();
|
|
18
|
-
export(spans: ReadableSpan[], resultCallback: (result: ExportResult) => void): void;
|
|
19
|
-
shutdown(): Promise<void>;
|
|
20
|
-
forceFlush(): Promise<void>;
|
|
21
|
-
}
|
|
22
|
-
export {};
|
|
23
|
-
//# sourceMappingURL=supervisor.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"supervisor.d.ts","sourceRoot":"","sources":["../../../src/src/internal/supervisor.ts"],"names":[],"mappings":"AAaA,OAAO,EACH,YAAY,EAIf,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAE3E,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AA2ClD,eAAO,MAAM,OAAO,SAEhB,CAAC;AA2BL,KAAK,cAAc,GAAG;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,OAAO,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AA0DF,wBAAsB,WAAW,IAAI,OAAO,CAAC,IAAI,CAAC,CAYjD;AAED,wBAAsB,gBAAgB,CAAC,CAAC,EAAE,CAAC,EAAE,QAAQ,EAAE,YAAY,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CA0BxF;AAED,wBAAsB,kBAAkB,CAAC,CAAC,EAAE,CAAC,EACzC,MAAM,EAAE,MAAM,EACd,GAAG,EAAE,WAAW,CAAC,CAAC,EAAE,CAAC,CAAC,EACtB,IAAI,EAAE,IAAI,GACX,OAAO,CAAC,WAAW,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAwC5B;AAED,wBAAsB,cAAc,CAChC,IAAI,EAAE,WAAW,GAAG,GAAG,EACvB,GAAG,CAAC,EAAE,cAAc,EACpB,OAAO,CAAC,EAAE,WAAW,GACtB,OAAO,CAAC,QAAQ,CAAC,CAoCnB;AA0BD,qBAAa,IAAK,YAAW,YAAY;;IAOrC,MAAM,CAAC,KAAK,EAAE,YAAY,EAAE,EAAE,cAAc,EAAE,CAAC,MAAM,EAAE,YAAY,KAAK,IAAI,GAAG,IAAI;IAmBnF,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;IAIzB,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;CAG9B"}
|
|
@@ -1,267 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright (c) 2025 Versori Group Inc
|
|
3
|
-
*
|
|
4
|
-
* Use of this software is governed by the Business Source License 1.1
|
|
5
|
-
* included in the LICENSE file at the root of this repository.
|
|
6
|
-
*
|
|
7
|
-
* Change Date: 2029-01-01
|
|
8
|
-
* Change License: Apache License, Version 2.0
|
|
9
|
-
*
|
|
10
|
-
* As of the Change Date, in accordance with the Business Source License,
|
|
11
|
-
* use of this software will be governed by the Apache License, Version 2.0.
|
|
12
|
-
*/
|
|
13
|
-
import { ExportResultCode, hrTimeToMilliseconds, hrTimeToTimeStamp, } from '@opentelemetry/core';
|
|
14
|
-
import { ConsoleLogger } from '../observability/logging/ConsoleLogger.js';
|
|
15
|
-
import { ChainTask } from '../dsl/tasks/ChainTask.js';
|
|
16
|
-
import { ScheduleTrigger } from '../dsl/triggers/ScheduleTrigger.js';
|
|
17
|
-
import { WebhookTrigger } from '../dsl/triggers/WebhookTrigger.js';
|
|
18
|
-
import { DurableWorkflowTrigger } from '../dsl/triggers/DurableTrigger.js';
|
|
19
|
-
import { TaskType } from '../dsl/Task.js';
|
|
20
|
-
import { CatchTask } from '../dsl/tasks/CatchTask.js';
|
|
21
|
-
import { FnTask } from '../dsl/tasks/FnTask.js';
|
|
22
|
-
import { HttpTaskImpl } from '../dsl/tasks/HttpTask.js';
|
|
23
|
-
import { BackgroundTask } from '../dsl/tasks/BackgroundTask.js';
|
|
24
|
-
import { ParallelTask } from '../dsl/tasks/ParallelTask.js';
|
|
25
|
-
const supervisorURL = (function () {
|
|
26
|
-
return Deno.env.get('RUN_SUPERVISOR_URL') || '';
|
|
27
|
-
})();
|
|
28
|
-
export const enabled = (function () {
|
|
29
|
-
return Deno.env.get('RUN_SUPERVISOR_URL') ? true : false;
|
|
30
|
-
})();
|
|
31
|
-
const flows = (function () {
|
|
32
|
-
try {
|
|
33
|
-
const _cwd = Deno.cwd();
|
|
34
|
-
const flowsFile = Deno.readTextFileSync(_cwd + '/versori-flow.json');
|
|
35
|
-
const flows = JSON.parse(flowsFile);
|
|
36
|
-
const nodes = {};
|
|
37
|
-
for (const node of flows.nodes) {
|
|
38
|
-
nodes[node.id] = {
|
|
39
|
-
description: node?.data?.description,
|
|
40
|
-
steps: node?.data?.steps,
|
|
41
|
-
files: node?.data?.files[0],
|
|
42
|
-
};
|
|
43
|
-
}
|
|
44
|
-
return nodes;
|
|
45
|
-
}
|
|
46
|
-
catch {
|
|
47
|
-
return {};
|
|
48
|
-
}
|
|
49
|
-
})();
|
|
50
|
-
const logger = new ConsoleLogger('debug');
|
|
51
|
-
function getTriggerData(workflow) {
|
|
52
|
-
if (workflow.trigger instanceof WebhookTrigger) {
|
|
53
|
-
return {
|
|
54
|
-
id: workflow.trigger.id,
|
|
55
|
-
type: 'webhook',
|
|
56
|
-
method: workflow.trigger.options.method || 'post',
|
|
57
|
-
};
|
|
58
|
-
}
|
|
59
|
-
else if (workflow.trigger instanceof ScheduleTrigger) {
|
|
60
|
-
return {
|
|
61
|
-
id: workflow.trigger.id,
|
|
62
|
-
type: 'schedule',
|
|
63
|
-
schedule: workflow.trigger.schedule,
|
|
64
|
-
};
|
|
65
|
-
}
|
|
66
|
-
else if (workflow.trigger instanceof DurableWorkflowTrigger) {
|
|
67
|
-
return {
|
|
68
|
-
id: workflow.trigger.id,
|
|
69
|
-
type: 'durable',
|
|
70
|
-
};
|
|
71
|
-
}
|
|
72
|
-
return null;
|
|
73
|
-
}
|
|
74
|
-
function getTaskData(task) {
|
|
75
|
-
let taskData = [];
|
|
76
|
-
if (task instanceof ChainTask) {
|
|
77
|
-
taskData = task.tasks.map((t) => getTaskData(t)).flat();
|
|
78
|
-
}
|
|
79
|
-
else if (task instanceof CatchTask) {
|
|
80
|
-
taskData = [...getTaskData(task._base), ...getTaskData(task._errorHandler)];
|
|
81
|
-
}
|
|
82
|
-
else if (task instanceof BackgroundTask) {
|
|
83
|
-
taskData = getTaskData(task._base);
|
|
84
|
-
}
|
|
85
|
-
else if (task instanceof ParallelTask) {
|
|
86
|
-
// I'm not sure if this is correct, but I don't think there are any ParallelTasks out in the wild yet
|
|
87
|
-
taskData = [...getTaskData(task._base), ...getTaskData(task._each)];
|
|
88
|
-
}
|
|
89
|
-
else if (task instanceof FnTask) {
|
|
90
|
-
taskData.push({
|
|
91
|
-
taskId: task.id,
|
|
92
|
-
type: task[TaskType].toLowerCase(),
|
|
93
|
-
});
|
|
94
|
-
}
|
|
95
|
-
else if (task instanceof HttpTaskImpl) {
|
|
96
|
-
taskData.push({
|
|
97
|
-
taskId: task.id,
|
|
98
|
-
type: task[TaskType].toLowerCase(),
|
|
99
|
-
});
|
|
100
|
-
}
|
|
101
|
-
else {
|
|
102
|
-
// yolo
|
|
103
|
-
taskData.push({
|
|
104
|
-
taskId: String(task.id || 'unknown'),
|
|
105
|
-
type: task[TaskType].toLowerCase(),
|
|
106
|
-
});
|
|
107
|
-
}
|
|
108
|
-
return taskData;
|
|
109
|
-
}
|
|
110
|
-
export async function signalReady() {
|
|
111
|
-
if (!enabled) {
|
|
112
|
-
return;
|
|
113
|
-
}
|
|
114
|
-
try {
|
|
115
|
-
await fetch(`${supervisorURL}/ready`, {
|
|
116
|
-
method: 'POST',
|
|
117
|
-
});
|
|
118
|
-
}
|
|
119
|
-
catch (err) {
|
|
120
|
-
logger.error('Failed to signal ready to supervisor', { error: err });
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
export async function registerWorkflow(workflow) {
|
|
124
|
-
if (!enabled) {
|
|
125
|
-
return;
|
|
126
|
-
}
|
|
127
|
-
const triggerData = getTriggerData(workflow);
|
|
128
|
-
const tasks = getTaskData(workflow.task);
|
|
129
|
-
try {
|
|
130
|
-
if (triggerData) {
|
|
131
|
-
const data = {
|
|
132
|
-
workflowId: triggerData.id,
|
|
133
|
-
trigger: triggerData,
|
|
134
|
-
tasks,
|
|
135
|
-
};
|
|
136
|
-
await fetch(`${supervisorURL}/register-workflow`, {
|
|
137
|
-
method: 'POST',
|
|
138
|
-
body: JSON.stringify(data),
|
|
139
|
-
headers: {
|
|
140
|
-
'Content-Type': 'application/json',
|
|
141
|
-
},
|
|
142
|
-
});
|
|
143
|
-
}
|
|
144
|
-
}
|
|
145
|
-
catch (err) {
|
|
146
|
-
logger.error('Failed to register workflow with supervisor', { error: err });
|
|
147
|
-
}
|
|
148
|
-
}
|
|
149
|
-
export async function sendTaskStartEvent(taskId, ctx, span) {
|
|
150
|
-
if (!enabled) {
|
|
151
|
-
return ctx;
|
|
152
|
-
}
|
|
153
|
-
const data = {
|
|
154
|
-
taskId,
|
|
155
|
-
spanId: span.spanContext().spanId,
|
|
156
|
-
traceId: span.spanContext().traceId,
|
|
157
|
-
startTime: new Date().toISOString(), // assuming current time as start time
|
|
158
|
-
executionId: ctx.executionId,
|
|
159
|
-
workflowId: ctx.workflowId || '',
|
|
160
|
-
};
|
|
161
|
-
try {
|
|
162
|
-
const resp = await fetch(`${supervisorURL}/tasks/start`, {
|
|
163
|
-
method: 'POST',
|
|
164
|
-
body: JSON.stringify(data),
|
|
165
|
-
headers: {
|
|
166
|
-
'Content-Type': 'application/json',
|
|
167
|
-
},
|
|
168
|
-
});
|
|
169
|
-
if (resp.ok) {
|
|
170
|
-
const bodyString = await resp.text();
|
|
171
|
-
if (!bodyString) {
|
|
172
|
-
return ctx;
|
|
173
|
-
}
|
|
174
|
-
// TODO: XML, CSV yada yada
|
|
175
|
-
const respData = JSON.parse(bodyString);
|
|
176
|
-
return ctx.withData(respData);
|
|
177
|
-
}
|
|
178
|
-
}
|
|
179
|
-
catch (err) {
|
|
180
|
-
logger.error('Failed to send task start event to supervisor', { error: err });
|
|
181
|
-
}
|
|
182
|
-
return ctx;
|
|
183
|
-
}
|
|
184
|
-
export async function mockAPIRequest(info, cnx, options) {
|
|
185
|
-
if (!enabled) {
|
|
186
|
-
return new Response();
|
|
187
|
-
}
|
|
188
|
-
const mockRequest = {
|
|
189
|
-
url: info.toString(),
|
|
190
|
-
payload: options?.body || '',
|
|
191
|
-
method: options?.method || 'GET',
|
|
192
|
-
headers: options?.headers,
|
|
193
|
-
connection: cnx?.name,
|
|
194
|
-
connectionId: cnx?.id,
|
|
195
|
-
};
|
|
196
|
-
try {
|
|
197
|
-
const response = await fetch(`${supervisorURL}/ai/fake-fetch-call`, {
|
|
198
|
-
method: 'POST',
|
|
199
|
-
body: JSON.stringify(mockRequest),
|
|
200
|
-
headers: {
|
|
201
|
-
'Content-Type': 'application/json',
|
|
202
|
-
},
|
|
203
|
-
});
|
|
204
|
-
if (!response.ok) {
|
|
205
|
-
logger.error('Failed to mock api request', { response });
|
|
206
|
-
return new Response();
|
|
207
|
-
}
|
|
208
|
-
const text = await response.text();
|
|
209
|
-
return new Response(text);
|
|
210
|
-
}
|
|
211
|
-
catch (err) {
|
|
212
|
-
logger.error('Failed to mock api request', { error: err });
|
|
213
|
-
return new Response();
|
|
214
|
-
}
|
|
215
|
-
}
|
|
216
|
-
function printableSpan(s) {
|
|
217
|
-
const span = {
|
|
218
|
-
name: s.name,
|
|
219
|
-
startTime: hrTimeToTimeStamp(s.startTime),
|
|
220
|
-
endTime: hrTimeToTimeStamp(s.endTime),
|
|
221
|
-
duration: hrTimeToMilliseconds(s.duration),
|
|
222
|
-
attributes: s.attributes,
|
|
223
|
-
status: s.status,
|
|
224
|
-
ended: s.ended,
|
|
225
|
-
events: s.events,
|
|
226
|
-
parentSpanContext: s.parentSpanContext,
|
|
227
|
-
spanContext: s.spanContext(),
|
|
228
|
-
};
|
|
229
|
-
const nodeDetail = flows[span.attributes['task.id']]; // I know I have coded all of those as string
|
|
230
|
-
if (nodeDetail) {
|
|
231
|
-
span.attributes['description'] = nodeDetail?.description || '';
|
|
232
|
-
span.attributes['steps'] = nodeDetail?.steps || '';
|
|
233
|
-
span.attributes['files'] = nodeDetail?.files || '';
|
|
234
|
-
}
|
|
235
|
-
return span;
|
|
236
|
-
}
|
|
237
|
-
export class Fake {
|
|
238
|
-
constructor() {
|
|
239
|
-
this.export = this.export.bind(this);
|
|
240
|
-
this.shutdown = this.shutdown.bind(this);
|
|
241
|
-
this.forceFlush = this.forceFlush.bind(this);
|
|
242
|
-
}
|
|
243
|
-
export(spans, resultCallback) {
|
|
244
|
-
const ss = spans.map(printableSpan);
|
|
245
|
-
try {
|
|
246
|
-
fetch(`${supervisorURL}/receive-spans`, {
|
|
247
|
-
method: 'POST',
|
|
248
|
-
body: JSON.stringify({ spans: ss }),
|
|
249
|
-
headers: {
|
|
250
|
-
'Content-Type': 'application/json',
|
|
251
|
-
},
|
|
252
|
-
}).catch((err) => {
|
|
253
|
-
logger.error('Failed to send spans to supervisor', { error: err });
|
|
254
|
-
});
|
|
255
|
-
}
|
|
256
|
-
catch (err) {
|
|
257
|
-
logger.error('Failed to send spans to supervisor', { error: err });
|
|
258
|
-
}
|
|
259
|
-
resultCallback({ code: ExportResultCode.SUCCESS });
|
|
260
|
-
}
|
|
261
|
-
shutdown() {
|
|
262
|
-
return Promise.resolve();
|
|
263
|
-
}
|
|
264
|
-
forceFlush() {
|
|
265
|
-
return Promise.resolve();
|
|
266
|
-
}
|
|
267
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"colors.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/fmt/1.0.9/colors.ts"],"names":[],"mappings":"AAoEA,qEAAqE;AACrE,MAAM,WAAW,GAAG;IAClB,0BAA0B;IAC1B,CAAC,EAAE,MAAM,CAAC;IACV,4BAA4B;IAC5B,CAAC,EAAE,MAAM,CAAC;IACV,2BAA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AC,GAAG,EAAE,MAAM,GAAG,MAAM,CAEjD;AAcD;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,IAAI,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAEvD;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,MAAM,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAEzD;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,KAAK,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,GAAG,GAAG,MAAM,CAuB9D;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,OAAO,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,GAAG,GAAG,MAAM,CAuBhE;AAWD;;;;;;;;;;;;GAYG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAEpD"}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { ExportResult } from '@opentelemetry/core';
|
|
2
|
-
import { ReadableSpan, SpanExporter } from '@opentelemetry/sdk-trace-node';
|
|
3
|
-
import { Span } from '@opentelemetry/api';
|
|
4
|
-
import { ContextImpl } from '../context/Context.js';
|
|
5
|
-
import { WorkflowImpl } from '../dsl/Workflow.js';
|
|
6
|
-
export declare const enabled: boolean;
|
|
7
|
-
type MockConnection = {
|
|
8
|
-
name: string;
|
|
9
|
-
id?: string;
|
|
10
|
-
baseUrl?: string;
|
|
11
|
-
};
|
|
12
|
-
export declare function signalReady(): Promise<void>;
|
|
13
|
-
export declare function registerWorkflow<I, O>(workflow: WorkflowImpl<I, O>): Promise<void>;
|
|
14
|
-
export declare function sendTaskStartEvent<I, O>(taskId: string, ctx: ContextImpl<I, O>, span: Span): Promise<ContextImpl<I, O>>;
|
|
15
|
-
export declare function mockAPIRequest(info: RequestInfo | URL, cnx?: MockConnection, options?: RequestInit): Promise<Response>;
|
|
16
|
-
export declare class Fake implements SpanExporter {
|
|
17
|
-
constructor();
|
|
18
|
-
export(spans: ReadableSpan[], resultCallback: (result: ExportResult) => void): void;
|
|
19
|
-
shutdown(): Promise<void>;
|
|
20
|
-
forceFlush(): Promise<void>;
|
|
21
|
-
}
|
|
22
|
-
export {};
|
|
23
|
-
//# sourceMappingURL=supervisor.d.ts.map
|