@ascentstudio/cue-contract 0.0.0-stage → 0.0.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/LICENSE +131 -0
- package/dist/client-store.d.ts +6 -0
- package/dist/client-store.js +13 -0
- package/dist/client-store.js.map +1 -0
- package/dist/environment.d.ts +16 -0
- package/dist/environment.js +102 -0
- package/dist/environment.js.map +1 -0
- package/dist/index.d.ts +350 -0
- package/dist/index.js +89 -0
- package/dist/index.js.map +1 -0
- package/package.json +12 -3
- package/README.md +0 -3
package/LICENSE
ADDED
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
# PolyForm Noncommercial License 1.0.0
|
|
2
|
+
|
|
3
|
+
<https://polyformproject.org/licenses/noncommercial/1.0.0>
|
|
4
|
+
|
|
5
|
+
## Acceptance
|
|
6
|
+
|
|
7
|
+
In order to get any license under these terms, you must agree
|
|
8
|
+
to them as both strict obligations and conditions to all
|
|
9
|
+
your licenses.
|
|
10
|
+
|
|
11
|
+
## Copyright License
|
|
12
|
+
|
|
13
|
+
The licensor grants you a copyright license for the
|
|
14
|
+
software to do everything you might do with the software
|
|
15
|
+
that would otherwise infringe the licensor's copyright
|
|
16
|
+
in it for any permitted purpose. However, you may
|
|
17
|
+
only distribute the software according to [Distribution
|
|
18
|
+
License](#distribution-license) and make changes or new works
|
|
19
|
+
based on the software according to [Changes and New Works
|
|
20
|
+
License](#changes-and-new-works-license).
|
|
21
|
+
|
|
22
|
+
## Distribution License
|
|
23
|
+
|
|
24
|
+
The licensor grants you an additional copyright license
|
|
25
|
+
to distribute copies of the software. Your license
|
|
26
|
+
to distribute covers distributing the software with
|
|
27
|
+
changes and new works permitted by [Changes and New Works
|
|
28
|
+
License](#changes-and-new-works-license).
|
|
29
|
+
|
|
30
|
+
## Notices
|
|
31
|
+
|
|
32
|
+
You must ensure that anyone who gets a copy of any part of
|
|
33
|
+
the software from you also gets a copy of these terms or the
|
|
34
|
+
URL for them above, as well as copies of any plain-text lines
|
|
35
|
+
beginning with `Required Notice:` that the licensor provided
|
|
36
|
+
with the software. For example:
|
|
37
|
+
|
|
38
|
+
> Required Notice: Copyright Yoyodyne, Inc. (http://example.com)
|
|
39
|
+
|
|
40
|
+
## Changes and New Works License
|
|
41
|
+
|
|
42
|
+
The licensor grants you an additional copyright license to
|
|
43
|
+
make changes and new works based on the software for any
|
|
44
|
+
permitted purpose.
|
|
45
|
+
|
|
46
|
+
## Patent License
|
|
47
|
+
|
|
48
|
+
The licensor grants you a patent license for the software that
|
|
49
|
+
covers patent claims the licensor can license, or becomes able
|
|
50
|
+
to license, that you would infringe by using the software.
|
|
51
|
+
|
|
52
|
+
## Noncommercial Purposes
|
|
53
|
+
|
|
54
|
+
Any noncommercial purpose is a permitted purpose.
|
|
55
|
+
|
|
56
|
+
## Personal Uses
|
|
57
|
+
|
|
58
|
+
Personal use for research, experiment, and testing for
|
|
59
|
+
the benefit of public knowledge, personal study, private
|
|
60
|
+
entertainment, hobby projects, amateur pursuits, or religious
|
|
61
|
+
observance, without any anticipated commercial application,
|
|
62
|
+
is use for a permitted purpose.
|
|
63
|
+
|
|
64
|
+
## Noncommercial Organizations
|
|
65
|
+
|
|
66
|
+
Use by any charitable organization, educational institution,
|
|
67
|
+
public research organization, public safety or health
|
|
68
|
+
organization, environmental protection organization,
|
|
69
|
+
or government institution is use for a permitted purpose
|
|
70
|
+
regardless of the source of funding or obligations resulting
|
|
71
|
+
from the funding.
|
|
72
|
+
|
|
73
|
+
## Fair Use
|
|
74
|
+
|
|
75
|
+
You may have "fair use" rights for the software under the
|
|
76
|
+
law. These terms do not limit them.
|
|
77
|
+
|
|
78
|
+
## No Other Rights
|
|
79
|
+
|
|
80
|
+
These terms do not allow you to sublicense or transfer any of
|
|
81
|
+
your licenses to anyone else, or prevent the licensor from
|
|
82
|
+
granting licenses to anyone else. These terms do not imply
|
|
83
|
+
any other licenses.
|
|
84
|
+
|
|
85
|
+
## Patent Defense
|
|
86
|
+
|
|
87
|
+
If you make any written claim that the software infringes or
|
|
88
|
+
contributes to infringement of any patent, your patent license
|
|
89
|
+
for the software granted under these terms ends immediately. If
|
|
90
|
+
your company makes such a claim, your patent license ends
|
|
91
|
+
immediately for work on behalf of your company.
|
|
92
|
+
|
|
93
|
+
## Violations
|
|
94
|
+
|
|
95
|
+
The first time you are notified in writing that you have
|
|
96
|
+
violated any of these terms, or done anything with the software
|
|
97
|
+
not covered by your licenses, your licenses can nonetheless
|
|
98
|
+
continue if you come into full compliance with these terms,
|
|
99
|
+
and take practical steps to correct past violations, within
|
|
100
|
+
32 days of receiving notice. Otherwise, all your licenses
|
|
101
|
+
end immediately.
|
|
102
|
+
|
|
103
|
+
## No Liability
|
|
104
|
+
|
|
105
|
+
***As far as the law allows, the software comes as is, without
|
|
106
|
+
any warranty or condition, and the licensor will not be liable
|
|
107
|
+
to you for any damages arising out of these terms or the use
|
|
108
|
+
or nature of the software, under any kind of legal claim.***
|
|
109
|
+
|
|
110
|
+
## Definitions
|
|
111
|
+
|
|
112
|
+
The **licensor** is the individual or entity offering these
|
|
113
|
+
terms, and the **software** is the software the licensor makes
|
|
114
|
+
available under these terms.
|
|
115
|
+
|
|
116
|
+
**You** refers to the individual or entity agreeing to these
|
|
117
|
+
terms.
|
|
118
|
+
|
|
119
|
+
**Your company** is any legal entity, sole proprietorship,
|
|
120
|
+
or other kind of organization that you work for, plus all
|
|
121
|
+
organizations that have control over, are under the control of,
|
|
122
|
+
or are under common control with that organization. **Control**
|
|
123
|
+
means ownership of substantially all the assets of an entity,
|
|
124
|
+
or the power to direct its management and policies by vote,
|
|
125
|
+
contract, or otherwise. Control can be direct or indirect.
|
|
126
|
+
|
|
127
|
+
**Your licenses** are all the licenses granted to you for the
|
|
128
|
+
software under these terms.
|
|
129
|
+
|
|
130
|
+
**Use** means anything you do with the software requiring one
|
|
131
|
+
of your licenses.
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { AsyncLocalStorage } from "node:async_hooks";
|
|
2
|
+
const current = new AsyncLocalStorage();
|
|
3
|
+
export function usingClient(client, run) {
|
|
4
|
+
return current.run(client, run);
|
|
5
|
+
}
|
|
6
|
+
export function currentClient() {
|
|
7
|
+
const client = current.getStore();
|
|
8
|
+
if (!client) {
|
|
9
|
+
throw new Error("client is required");
|
|
10
|
+
}
|
|
11
|
+
return client;
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=client-store.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client-store.js","sourceRoot":"","sources":["../src/client-store.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAOrD,MAAM,OAAO,GAAG,IAAI,iBAAiB,EAAe,CAAC;AAErD,MAAM,UAAU,WAAW,CAAI,MAAmB,EAAE,GAAY;IAC9D,OAAO,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;AAClC,CAAC;AAED,MAAM,UAAU,aAAa;IAC3B,MAAM,MAAM,GAAG,OAAO,CAAC,QAAQ,EAAE,CAAC;IAClC,IAAI,CAAC,MAAM,EAAE,CAAC;QACZ,MAAM,IAAI,KAAK,CAAC,oBAAoB,CAAC,CAAC;IACxC,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export declare class Secret {
|
|
2
|
+
#private;
|
|
3
|
+
constructor(value: string);
|
|
4
|
+
insecure(): string;
|
|
5
|
+
toJSON(): string;
|
|
6
|
+
toString(): string;
|
|
7
|
+
[Symbol.toPrimitive](): string;
|
|
8
|
+
}
|
|
9
|
+
export declare function insecure(value: string | Secret): string;
|
|
10
|
+
export type StepLogCapture = {
|
|
11
|
+
push(line: string): void;
|
|
12
|
+
};
|
|
13
|
+
export declare function withStepLogCapture<T>(capture: StepLogCapture, run: () => T): T;
|
|
14
|
+
export declare function installEnvironment(variables: Readonly<Record<string, string>>, secrets?: Readonly<Record<string, string>>): void;
|
|
15
|
+
export declare function environment(name: string): string | Secret;
|
|
16
|
+
export declare function optionalEnvironment(name: string): string | Secret | undefined;
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import { AsyncLocalStorage } from "node:async_hooks";
|
|
2
|
+
const mask = "••••";
|
|
3
|
+
const stepLogConsole = Symbol("step-log");
|
|
4
|
+
export class Secret {
|
|
5
|
+
#value;
|
|
6
|
+
constructor(value) {
|
|
7
|
+
this.#value = value;
|
|
8
|
+
}
|
|
9
|
+
insecure() {
|
|
10
|
+
return this.#value;
|
|
11
|
+
}
|
|
12
|
+
toJSON() {
|
|
13
|
+
return mask;
|
|
14
|
+
}
|
|
15
|
+
toString() {
|
|
16
|
+
return mask;
|
|
17
|
+
}
|
|
18
|
+
[Symbol.toPrimitive]() {
|
|
19
|
+
return mask;
|
|
20
|
+
}
|
|
21
|
+
[Symbol.for("nodejs.util.inspect.custom")]() {
|
|
22
|
+
return mask;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
export function insecure(value) {
|
|
26
|
+
return value instanceof Secret ? value.insecure() : value;
|
|
27
|
+
}
|
|
28
|
+
const installed = new Map();
|
|
29
|
+
const captures = new AsyncLocalStorage();
|
|
30
|
+
const consoleMethods = ["log", "info", "warn", "error", "debug"];
|
|
31
|
+
export function withStepLogCapture(capture, run) {
|
|
32
|
+
installStepLogConsole();
|
|
33
|
+
return captures.run(capture, run);
|
|
34
|
+
}
|
|
35
|
+
export function installEnvironment(variables, secrets = {}) {
|
|
36
|
+
installed.clear();
|
|
37
|
+
for (const [name, value] of Object.entries(variables)) {
|
|
38
|
+
installed.set(name, value);
|
|
39
|
+
}
|
|
40
|
+
for (const [name, value] of Object.entries(secrets)) {
|
|
41
|
+
installed.set(name, new Secret(value));
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
export function environment(name) {
|
|
45
|
+
const value = installed.get(name);
|
|
46
|
+
if (value === undefined) {
|
|
47
|
+
throw new Error(`${name} is required`);
|
|
48
|
+
}
|
|
49
|
+
return value;
|
|
50
|
+
}
|
|
51
|
+
export function optionalEnvironment(name) {
|
|
52
|
+
const value = installed.get(name);
|
|
53
|
+
if (value === undefined || value === "") {
|
|
54
|
+
return undefined;
|
|
55
|
+
}
|
|
56
|
+
return value;
|
|
57
|
+
}
|
|
58
|
+
function shown(value) {
|
|
59
|
+
if (value instanceof Secret) {
|
|
60
|
+
return value.toString();
|
|
61
|
+
}
|
|
62
|
+
if (value instanceof Error) {
|
|
63
|
+
return `${value.name}: ${value.message}\n${value.stack ?? ""}`;
|
|
64
|
+
}
|
|
65
|
+
try {
|
|
66
|
+
const text = JSON.stringify(value);
|
|
67
|
+
return text === undefined ? String(value) : text;
|
|
68
|
+
}
|
|
69
|
+
catch {
|
|
70
|
+
return String(value);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
function capturedLine(method, args) {
|
|
74
|
+
const text = args.map((value) => (typeof value === "string" ? value : shown(value))).join(" ");
|
|
75
|
+
if (method === "warn" || method === "error" || method === "debug") {
|
|
76
|
+
return text.length === 0 ? method : `${method} ${text}`;
|
|
77
|
+
}
|
|
78
|
+
return text;
|
|
79
|
+
}
|
|
80
|
+
function isStepLogConsole(value) {
|
|
81
|
+
return typeof value === "function" && stepLogConsole in value;
|
|
82
|
+
}
|
|
83
|
+
function installStepLogConsole() {
|
|
84
|
+
for (const method of consoleMethods) {
|
|
85
|
+
const current = console[method];
|
|
86
|
+
if (isStepLogConsole(current)) {
|
|
87
|
+
continue;
|
|
88
|
+
}
|
|
89
|
+
const call = current.bind(console);
|
|
90
|
+
const wrapped = (...args) => {
|
|
91
|
+
call(...args);
|
|
92
|
+
const capture = captures.getStore();
|
|
93
|
+
if (!capture) {
|
|
94
|
+
return;
|
|
95
|
+
}
|
|
96
|
+
capture.push(capturedLine(method, args));
|
|
97
|
+
};
|
|
98
|
+
Object.defineProperty(wrapped, stepLogConsole, { value: true });
|
|
99
|
+
console[method] = wrapped;
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
//# sourceMappingURL=environment.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"environment.js","sourceRoot":"","sources":["../src/environment.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAErD,MAAM,IAAI,GAAG,MAAM,CAAC;AACpB,MAAM,cAAc,GAAG,MAAM,CAAC,UAAU,CAAC,CAAC;AAE1C,MAAM,OAAO,MAAM;IACjB,MAAM,CAAS;IAEf,YAAY,KAAa;QACvB,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;IACtB,CAAC;IAED,QAAQ;QACN,OAAO,IAAI,CAAC,MAAM,CAAC;IACrB,CAAC;IAED,MAAM;QACJ,OAAO,IAAI,CAAC;IACd,CAAC;IAED,QAAQ;QACN,OAAO,IAAI,CAAC;IACd,CAAC;IAED,CAAC,MAAM,CAAC,WAAW,CAAC;QAClB,OAAO,IAAI,CAAC;IACd,CAAC;IAED,CAAC,MAAM,CAAC,GAAG,CAAC,4BAA4B,CAAC,CAAC;QACxC,OAAO,IAAI,CAAC;IACd,CAAC;CACF;AAED,MAAM,UAAU,QAAQ,CAAC,KAAsB;IAC7C,OAAO,KAAK,YAAY,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC;AAC5D,CAAC;AAED,MAAM,SAAS,GAAG,IAAI,GAAG,EAA2B,CAAC;AAMrD,MAAM,QAAQ,GAAG,IAAI,iBAAiB,EAAkB,CAAC;AAczD,MAAM,cAAc,GAA6B,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;AAE3F,MAAM,UAAU,kBAAkB,CAAI,OAAuB,EAAE,GAAY;IACzE,qBAAqB,EAAE,CAAC;IACxB,OAAO,QAAQ,CAAC,GAAG,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC;AACpC,CAAC;AAED,M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GAAG,IAAe,EAAE,EAAE;YACrC,IAAI,CAAC,GAAG,IAAI,CAAC,CAAC;YACd,MAAM,OAAO,GAAG,QAAQ,CAAC,QAAQ,EAAE,CAAC;YACpC,IAAI,CAAC,OAAO,EAAE,CAAC;gBACb,OAAO;YACT,CAAC;YACD,OAAO,CAAC,IAAI,CAAC,YAAY,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC,CAAC;QAC3C,CAAC,CAAC;QACF,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,cAAc,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;QAChE,OAAO,CAAC,MAAM,CAAC,GAAG,OAAO,CAAC;IAC5B,CAAC;AACH,CAAC"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,350 @@
|
|
|
1
|
+
export type OrganizationId = string;
|
|
2
|
+
export type FlowName = string;
|
|
3
|
+
export type EntityType = string;
|
|
4
|
+
export type Identifier = string;
|
|
5
|
+
export type StepName = string;
|
|
6
|
+
export type Kind = string;
|
|
7
|
+
export type EntityId = string;
|
|
8
|
+
export type RunId = string;
|
|
9
|
+
export type StartingData = {
|
|
10
|
+
silenceDurationMin?: number;
|
|
11
|
+
maxResends?: number;
|
|
12
|
+
payload: unknown;
|
|
13
|
+
};
|
|
14
|
+
export type EntityValues = Readonly<Record<string, unknown>>;
|
|
15
|
+
export declare function isValuesRecord(value: unknown): value is Record<string, unknown>;
|
|
16
|
+
export declare function copyValues(value: unknown): Record<string, unknown>;
|
|
17
|
+
export declare function mergeValues(current: Readonly<Record<string, unknown>>, patch: Readonly<Record<string, unknown>>): Record<string, unknown>;
|
|
18
|
+
export type ChildElement = {
|
|
19
|
+
identifier: Identifier;
|
|
20
|
+
payload: unknown;
|
|
21
|
+
};
|
|
22
|
+
export type Silence = {
|
|
23
|
+
silenceDurationMin: number;
|
|
24
|
+
maxResends: number;
|
|
25
|
+
};
|
|
26
|
+
export type ValueParser<T = unknown> = {
|
|
27
|
+
parse(value: unknown): {
|
|
28
|
+
ok: true;
|
|
29
|
+
data: T;
|
|
30
|
+
} | {
|
|
31
|
+
ok: false;
|
|
32
|
+
message: string;
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
export type Result<Body = unknown> = {
|
|
36
|
+
kind: "result";
|
|
37
|
+
status: "done" | "failed" | "not_finished";
|
|
38
|
+
discriminant: string;
|
|
39
|
+
files?: readonly string[];
|
|
40
|
+
values?: Record<string, unknown>;
|
|
41
|
+
body?: Body;
|
|
42
|
+
};
|
|
43
|
+
export type Rule = {
|
|
44
|
+
form: "all";
|
|
45
|
+
at?: string;
|
|
46
|
+
} | {
|
|
47
|
+
form: "quota";
|
|
48
|
+
count: number;
|
|
49
|
+
at?: string;
|
|
50
|
+
} | {
|
|
51
|
+
form: "quota";
|
|
52
|
+
proportion: number;
|
|
53
|
+
at?: string;
|
|
54
|
+
} | {
|
|
55
|
+
form: "deadline";
|
|
56
|
+
at: string;
|
|
57
|
+
};
|
|
58
|
+
export type ChildrenRule = {
|
|
59
|
+
form: "all";
|
|
60
|
+
withinMin?: number;
|
|
61
|
+
} | {
|
|
62
|
+
form: "quota";
|
|
63
|
+
count: number;
|
|
64
|
+
withinMin?: number;
|
|
65
|
+
} | {
|
|
66
|
+
form: "quota";
|
|
67
|
+
proportion: number;
|
|
68
|
+
withinMin?: number;
|
|
69
|
+
};
|
|
70
|
+
export type ChildrenCall = {
|
|
71
|
+
silence?: Silence;
|
|
72
|
+
rule?: ChildrenRule;
|
|
73
|
+
};
|
|
74
|
+
export type OptionalChildrenCall = {
|
|
75
|
+
silence?: Silence;
|
|
76
|
+
rule?: ChildrenRule;
|
|
77
|
+
};
|
|
78
|
+
export declare function asChildren(body: unknown): ChildElement[];
|
|
79
|
+
export type ReportElement = {
|
|
80
|
+
identifier: string;
|
|
81
|
+
discriminant: string;
|
|
82
|
+
flow?: string;
|
|
83
|
+
body?: unknown;
|
|
84
|
+
};
|
|
85
|
+
export type SealedReport = {
|
|
86
|
+
kind: "report";
|
|
87
|
+
endReason: "all" | "quota" | "deadline";
|
|
88
|
+
openedCount: number;
|
|
89
|
+
respondedCount: number;
|
|
90
|
+
elements: readonly ReportElement[];
|
|
91
|
+
};
|
|
92
|
+
export type StepOpening = StepName | {
|
|
93
|
+
name: StepName;
|
|
94
|
+
silenceDurationMin?: number;
|
|
95
|
+
maxResends?: number;
|
|
96
|
+
payload?: unknown;
|
|
97
|
+
};
|
|
98
|
+
export type GroupContext = {
|
|
99
|
+
openStep(step: StepOpening): void;
|
|
100
|
+
openOptionalStep(step: StepOpening): void;
|
|
101
|
+
openChildren(flow: FlowName | {
|
|
102
|
+
name: FlowName;
|
|
103
|
+
}, element: ChildElement, call?: {
|
|
104
|
+
silence?: Silence;
|
|
105
|
+
}): void;
|
|
106
|
+
openChildren(flow: FlowName | {
|
|
107
|
+
name: FlowName;
|
|
108
|
+
}, elements: readonly ChildElement[], call?: ChildrenCall): void;
|
|
109
|
+
openOptionalChildren(flow: FlowName | {
|
|
110
|
+
name: FlowName;
|
|
111
|
+
}, element: ChildElement, call?: {
|
|
112
|
+
silence?: Silence;
|
|
113
|
+
}): void;
|
|
114
|
+
openOptionalChildren(flow: FlowName | {
|
|
115
|
+
name: FlowName;
|
|
116
|
+
}, elements: readonly ChildElement[], call?: OptionalChildrenCall): void;
|
|
117
|
+
each<Element>(elements: readonly Element[], body: (element: Element, group: GroupContext) => void): void;
|
|
118
|
+
};
|
|
119
|
+
type OpenedBody<Opening> = Opening extends {
|
|
120
|
+
__body?: infer Body;
|
|
121
|
+
} ? unknown extends Body ? unknown : Body : unknown;
|
|
122
|
+
type OpenedReturn<Flow> = Flow extends {
|
|
123
|
+
__return?: infer Body;
|
|
124
|
+
} ? unknown extends Body ? unknown : Body : unknown;
|
|
125
|
+
export type FlowContext = {
|
|
126
|
+
values: EntityValues;
|
|
127
|
+
startingData?: StartingData;
|
|
128
|
+
openStep<Opening extends StepOpening>(step: Opening): Result<OpenedBody<Opening>> & {
|
|
129
|
+
body: OpenedBody<Opening>;
|
|
130
|
+
};
|
|
131
|
+
openOptionalStep<Opening extends StepOpening>(step: Opening): Result<OpenedBody<Opening>> & {
|
|
132
|
+
body: OpenedBody<Opening>;
|
|
133
|
+
};
|
|
134
|
+
openDetachedStep(step: StepOpening): void;
|
|
135
|
+
openChildren<Flow extends FlowName | {
|
|
136
|
+
name: FlowName;
|
|
137
|
+
}>(flow: Flow, element: ChildElement, call?: {
|
|
138
|
+
silence?: Silence;
|
|
139
|
+
}): Result<OpenedReturn<Flow>> & {
|
|
140
|
+
body: OpenedReturn<Flow>;
|
|
141
|
+
};
|
|
142
|
+
openChildren<Flow extends FlowName | {
|
|
143
|
+
name: FlowName;
|
|
144
|
+
}>(flow: Flow, elements: readonly ChildElement[], call?: ChildrenCall): SealedReport;
|
|
145
|
+
openOptionalChildren<Flow extends FlowName | {
|
|
146
|
+
name: FlowName;
|
|
147
|
+
}>(flow: Flow, element: ChildElement, call?: {
|
|
148
|
+
silence?: Silence;
|
|
149
|
+
}): Result<OpenedReturn<Flow>> & {
|
|
150
|
+
body: OpenedReturn<Flow>;
|
|
151
|
+
};
|
|
152
|
+
openOptionalChildren<Flow extends FlowName | {
|
|
153
|
+
name: FlowName;
|
|
154
|
+
}>(flow: Flow, elements: readonly ChildElement[], call?: OptionalChildrenCall): SealedReport;
|
|
155
|
+
waitGroup(define: (group: GroupContext) => void): SealedReport;
|
|
156
|
+
choose(taken: string, arms: readonly {
|
|
157
|
+
name: string;
|
|
158
|
+
run: (arm: FlowContext) => void;
|
|
159
|
+
}[]): void;
|
|
160
|
+
each<Element>(elements: readonly Element[], body: (element: Element, ctx: FlowContext) => void): void;
|
|
161
|
+
finish(discriminant?: string, body?: unknown): void;
|
|
162
|
+
fail(): void;
|
|
163
|
+
};
|
|
164
|
+
export type FlowFunction = (ctx: FlowContext) => void;
|
|
165
|
+
export type RecordedResult = {
|
|
166
|
+
outcome: "success";
|
|
167
|
+
finishedAt: string;
|
|
168
|
+
};
|
|
169
|
+
export type Job = {
|
|
170
|
+
organization: OrganizationId;
|
|
171
|
+
entity: EntityId;
|
|
172
|
+
flow: FlowName;
|
|
173
|
+
generation: number;
|
|
174
|
+
step: StepName;
|
|
175
|
+
revision?: string;
|
|
176
|
+
};
|
|
177
|
+
export type FlowMetric = {
|
|
178
|
+
organization: OrganizationId;
|
|
179
|
+
flow: FlowName;
|
|
180
|
+
entityType: EntityType;
|
|
181
|
+
identifier: Identifier;
|
|
182
|
+
generation: number;
|
|
183
|
+
startedAt: string;
|
|
184
|
+
finishedAt: string;
|
|
185
|
+
outcome: "success" | "failure" | "not_finished";
|
|
186
|
+
durationMs: number;
|
|
187
|
+
computeMs: number;
|
|
188
|
+
};
|
|
189
|
+
export type StepMetric = {
|
|
190
|
+
organization: OrganizationId;
|
|
191
|
+
flow: FlowName;
|
|
192
|
+
entityType: EntityType;
|
|
193
|
+
identifier: Identifier;
|
|
194
|
+
generation: number;
|
|
195
|
+
step: StepName;
|
|
196
|
+
mode: "required" | "optional" | "detached";
|
|
197
|
+
progress: "done" | "failed" | "not_finished";
|
|
198
|
+
discriminant: string;
|
|
199
|
+
openedAt: string;
|
|
200
|
+
endedAt: string;
|
|
201
|
+
durationMs: number;
|
|
202
|
+
computeMs?: number;
|
|
203
|
+
ranAt?: string;
|
|
204
|
+
workerId?: string;
|
|
205
|
+
slotId?: string;
|
|
206
|
+
};
|
|
207
|
+
export type TransientFile = {
|
|
208
|
+
body: Uint8Array;
|
|
209
|
+
contentType: string;
|
|
210
|
+
};
|
|
211
|
+
export type TransientFileRef = {
|
|
212
|
+
flow: FlowName;
|
|
213
|
+
identifier: Identifier;
|
|
214
|
+
generation: number;
|
|
215
|
+
name: string;
|
|
216
|
+
};
|
|
217
|
+
export type RunFiles = {
|
|
218
|
+
put(name: string, body: Uint8Array, contentType: string): Promise<void>;
|
|
219
|
+
get(name: string): Promise<TransientFile | null>;
|
|
220
|
+
read(ref: TransientFileRef): Promise<TransientFile | null>;
|
|
221
|
+
};
|
|
222
|
+
export type StepInput = {
|
|
223
|
+
organization: OrganizationId;
|
|
224
|
+
entity: EntityId;
|
|
225
|
+
flow: FlowName;
|
|
226
|
+
generation: number;
|
|
227
|
+
step: StepName;
|
|
228
|
+
startingData: StartingData;
|
|
229
|
+
values: EntityValues;
|
|
230
|
+
files: RunFiles;
|
|
231
|
+
at: string;
|
|
232
|
+
payload?: unknown;
|
|
233
|
+
log(message: string): void;
|
|
234
|
+
signal?: AbortSignal;
|
|
235
|
+
};
|
|
236
|
+
export { Secret, environment, insecure, installEnvironment, optionalEnvironment, withStepLogCapture } from "./environment.js";
|
|
237
|
+
export type { StepLogCapture } from "./environment.js";
|
|
238
|
+
export { currentClient, usingClient } from "./client-store.js";
|
|
239
|
+
export type { ClientStore } from "./client-store.js";
|
|
240
|
+
export type StepImplementation = (input: StepInput) => Promise<Result> | Result;
|
|
241
|
+
export type RateLimit = {
|
|
242
|
+
max: number;
|
|
243
|
+
durationMs: number;
|
|
244
|
+
};
|
|
245
|
+
export type BoundStep = {
|
|
246
|
+
queueName: Kind;
|
|
247
|
+
concurrency: number;
|
|
248
|
+
silenceDurationMin: number;
|
|
249
|
+
maxResends: number;
|
|
250
|
+
rateLimit: RateLimit | null;
|
|
251
|
+
runtime?: string;
|
|
252
|
+
memoryBytes?: number;
|
|
253
|
+
cpu?: number;
|
|
254
|
+
body?: ValueParser<unknown>;
|
|
255
|
+
input?: ValueParser<unknown>;
|
|
256
|
+
run: StepImplementation;
|
|
257
|
+
};
|
|
258
|
+
export type StepDefinition<Body = unknown> = {
|
|
259
|
+
name: StepName;
|
|
260
|
+
names?: readonly StepName[];
|
|
261
|
+
concurrency: number;
|
|
262
|
+
silenceDurationMin: number;
|
|
263
|
+
maxResends: number;
|
|
264
|
+
rateLimit?: RateLimit;
|
|
265
|
+
runtime?: string;
|
|
266
|
+
memoryBytes?: number;
|
|
267
|
+
cpu?: number;
|
|
268
|
+
body?: ValueParser<Body>;
|
|
269
|
+
input?: ValueParser<unknown>;
|
|
270
|
+
__body?: Body;
|
|
271
|
+
run: StepImplementation;
|
|
272
|
+
};
|
|
273
|
+
export type RuntimeDevice = "cpu" | "cuda";
|
|
274
|
+
export type RuntimeArchitecture = "amd64" | "arm64";
|
|
275
|
+
export type RuntimeVariant = {
|
|
276
|
+
device: RuntimeDevice;
|
|
277
|
+
architectures: readonly RuntimeArchitecture[];
|
|
278
|
+
};
|
|
279
|
+
export type RuntimeManifest = {
|
|
280
|
+
revision: string;
|
|
281
|
+
variants: readonly RuntimeVariant[];
|
|
282
|
+
};
|
|
283
|
+
export type SupervisorMode = "process" | "container";
|
|
284
|
+
export type SupervisorDeclaration = {
|
|
285
|
+
architecture: RuntimeArchitecture;
|
|
286
|
+
mode: SupervisorMode;
|
|
287
|
+
device: RuntimeDevice;
|
|
288
|
+
runtimes: readonly string[];
|
|
289
|
+
kinds: readonly string[] | null;
|
|
290
|
+
};
|
|
291
|
+
export declare function runtimeImageName(organization: OrganizationId, runtime: string, revision: string, device: RuntimeDevice): string;
|
|
292
|
+
export declare function entityId(organization: OrganizationId, entityType: EntityType, identifier: Identifier): EntityId;
|
|
293
|
+
export declare function parseEntityId(id: EntityId): {
|
|
294
|
+
organization: OrganizationId;
|
|
295
|
+
entityType: EntityType;
|
|
296
|
+
identifier: Identifier;
|
|
297
|
+
};
|
|
298
|
+
export declare function runId(organization: OrganizationId, flow: FlowName, identifier: Identifier): RunId;
|
|
299
|
+
export declare function parseRunId(id: RunId): {
|
|
300
|
+
organization: OrganizationId;
|
|
301
|
+
flow: FlowName;
|
|
302
|
+
identifier: Identifier;
|
|
303
|
+
};
|
|
304
|
+
export declare const edgePorts: {
|
|
305
|
+
readonly console: 443;
|
|
306
|
+
readonly machine: 3443;
|
|
307
|
+
readonly enrollment: 4443;
|
|
308
|
+
readonly redis: 6380;
|
|
309
|
+
readonly clickhouse: 8443;
|
|
310
|
+
readonly minio: 9443;
|
|
311
|
+
readonly zot: 7443;
|
|
312
|
+
readonly npm: 4873;
|
|
313
|
+
};
|
|
314
|
+
export type TlsMaterial = {
|
|
315
|
+
ca: string;
|
|
316
|
+
cert: string;
|
|
317
|
+
key: string;
|
|
318
|
+
};
|
|
319
|
+
export type WorkerPhase = "accepting" | "draining" | "stopped";
|
|
320
|
+
export type WorkerCommand = "drain-stop" | "drain-restart" | "force-stop";
|
|
321
|
+
export declare function isWorkerCommand(value: unknown): value is WorkerCommand;
|
|
322
|
+
export type PublishedRevision = {
|
|
323
|
+
organization: string;
|
|
324
|
+
revision: string;
|
|
325
|
+
package: string;
|
|
326
|
+
version: string;
|
|
327
|
+
integrity: string;
|
|
328
|
+
};
|
|
329
|
+
export type OrganizationSecrets = {
|
|
330
|
+
variables: Record<string, string>;
|
|
331
|
+
secrets: Record<string, string>;
|
|
332
|
+
};
|
|
333
|
+
export type StepAssignment = Job & {
|
|
334
|
+
token: string;
|
|
335
|
+
};
|
|
336
|
+
export type StepResultMessage = {
|
|
337
|
+
token?: string;
|
|
338
|
+
organization: OrganizationId;
|
|
339
|
+
entity: EntityId;
|
|
340
|
+
flow: FlowName;
|
|
341
|
+
step: StepName;
|
|
342
|
+
result: Result;
|
|
343
|
+
at: string;
|
|
344
|
+
workerId?: string;
|
|
345
|
+
slotId?: string;
|
|
346
|
+
generation?: number;
|
|
347
|
+
apply?: boolean;
|
|
348
|
+
computeMs?: number;
|
|
349
|
+
ranAt?: string;
|
|
350
|
+
};
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
export function isValuesRecord(value) {
|
|
2
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
3
|
+
}
|
|
4
|
+
export function copyValues(value) {
|
|
5
|
+
if (!isValuesRecord(value)) {
|
|
6
|
+
return {};
|
|
7
|
+
}
|
|
8
|
+
return { ...value };
|
|
9
|
+
}
|
|
10
|
+
export function mergeValues(current, patch) {
|
|
11
|
+
const next = copyValues(current);
|
|
12
|
+
for (const [key, value] of Object.entries(patch)) {
|
|
13
|
+
if (value === null) {
|
|
14
|
+
delete next[key];
|
|
15
|
+
}
|
|
16
|
+
else {
|
|
17
|
+
next[key] = value;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
return next;
|
|
21
|
+
}
|
|
22
|
+
export function asChildren(body) {
|
|
23
|
+
if (!Array.isArray(body)) {
|
|
24
|
+
return [];
|
|
25
|
+
}
|
|
26
|
+
const children = [];
|
|
27
|
+
for (const item of body) {
|
|
28
|
+
if (!item || typeof item !== "object" || Array.isArray(item)) {
|
|
29
|
+
continue;
|
|
30
|
+
}
|
|
31
|
+
const record = item;
|
|
32
|
+
if (typeof record.identifier !== "string" || !("payload" in record)) {
|
|
33
|
+
continue;
|
|
34
|
+
}
|
|
35
|
+
children.push({ identifier: record.identifier, payload: record.payload });
|
|
36
|
+
}
|
|
37
|
+
return children;
|
|
38
|
+
}
|
|
39
|
+
export { Secret, environment, insecure, installEnvironment, optionalEnvironment, withStepLogCapture } from "./environment.js";
|
|
40
|
+
export { currentClient, usingClient } from "./client-store.js";
|
|
41
|
+
export function runtimeImageName(organization, runtime, revision, device) {
|
|
42
|
+
switch (device) {
|
|
43
|
+
case "cpu":
|
|
44
|
+
return `${organization}-${runtime}:${revision}`;
|
|
45
|
+
case "cuda":
|
|
46
|
+
return `${organization}-${runtime}:${revision}-cuda`;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
export function entityId(organization, entityType, identifier) {
|
|
50
|
+
return `${organization}/${entityType}/${identifier}`;
|
|
51
|
+
}
|
|
52
|
+
export function parseEntityId(id) {
|
|
53
|
+
const parts = id.split("/");
|
|
54
|
+
const organization = parts[0];
|
|
55
|
+
const entityType = parts[1];
|
|
56
|
+
const identifier = parts.slice(2).join("/");
|
|
57
|
+
if (!organization || !entityType || !identifier) {
|
|
58
|
+
throw new Error(`Unknown entity ${id}`);
|
|
59
|
+
}
|
|
60
|
+
return { organization, entityType, identifier };
|
|
61
|
+
}
|
|
62
|
+
export function runId(organization, flow, identifier) {
|
|
63
|
+
return `${organization}/${flow}/${identifier}`;
|
|
64
|
+
}
|
|
65
|
+
export function parseRunId(id) {
|
|
66
|
+
const parts = id.split("/");
|
|
67
|
+
const organization = parts[0];
|
|
68
|
+
const flow = parts[1];
|
|
69
|
+
const identifier = parts.slice(2).join("/");
|
|
70
|
+
if (!organization || !flow || !identifier) {
|
|
71
|
+
throw new Error(`Unknown run ${id}`);
|
|
72
|
+
}
|
|
73
|
+
return { organization, flow, identifier };
|
|
74
|
+
}
|
|
75
|
+
// Ports the facade publishes. The orchestrator renders them. The supervisor derives its URLs from them.
|
|
76
|
+
export const edgePorts = {
|
|
77
|
+
console: 443,
|
|
78
|
+
machine: 3443,
|
|
79
|
+
enrollment: 4443,
|
|
80
|
+
redis: 6380,
|
|
81
|
+
clickhouse: 8443,
|
|
82
|
+
minio: 9443,
|
|
83
|
+
zot: 7443,
|
|
84
|
+
npm: 4873,
|
|
85
|
+
};
|
|
86
|
+
export function isWorkerCommand(value) {
|
|
87
|
+
return value === "drain-stop" || value === "drain-restart" || value === "force-stop";
|
|
88
|
+
}
|
|
89
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAwBA,MAAM,UAAU,cAAc,CAAC,KAAc;IAC3C,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;AAC9E,CAAC;AAED,MAAM,UAAU,UAAU,CAAC,KAAc;IACvC,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,EAAE,CAAC;QAC3B,OAAO,EAAE,CAAC;IACZ,CAAC;IACD,OAAO,EAAE,GAAG,KAAK,EAAE,CAAC;AACtB,CAAC;AAED,MAAM,UAAU,WAAW,CACzB,OAA0C,EAC1C,KAAwC;IAExC,MAAM,IAAI,GAAG,UAAU,CAAC,OAAO,CAAC,CAAC;IACj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AAK,CAAC,CAAC,CAAC,CAAC;IACtB,MAAM,UAAU,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAC5C,IAAI,CAAC,YAAY,IAAI,CAAC,IAAI,IAAI,CAAC,UAAU,EAAE,CAAC;QAC1C,MAAM,IAAI,KAAK,CAAC,eAAe,EAAE,EAAE,CAAC,CAAC;IACvC,CAAC;IACD,OAAO,EAAE,YAAY,EAAE,IAAI,EAAE,UAAU,EAAE,CAAC;AAC5C,CAAC;AAED,wGAAwG;AACxG,MAAM,CAAC,MAAM,SAAS,GAAG;IACvB,OAAO,EAAE,GAAG;IACZ,OAAO,EAAE,IAAI;IACb,UAAU,EAAE,IAAI;IAChB,KAAK,EAAE,IAAI;IACX,UAAU,EAAE,IAAI;IAChB,KAAK,EAAE,IAAI;IACX,GAAG,EAAE,IAAI;IACT,GAAG,EAAE,IAAI;CACD,CAAC;AAQX,MAAM,UAAU,eAAe,CAAC,KAAc;IAC5C,OAAO,KAAK,KAAK,YAAY,IAAI,KAAK,KAAK,eAAe,IAAI,KAAK,KAAK,YAAY,CAAC;AACvF,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ascentstudio/cue-contract",
|
|
3
|
-
"version": "0.0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"license": "PolyForm-Noncommercial-1.0.0",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"engines": {
|
|
7
|
+
"node": ">=22"
|
|
8
|
+
},
|
|
9
|
+
"files": [
|
|
10
|
+
"dist"
|
|
11
|
+
],
|
|
12
|
+
"exports": {
|
|
13
|
+
".": "./dist/index.js"
|
|
14
|
+
}
|
|
6
15
|
}
|
package/README.md
DELETED