@xemahq/kernel-contracts 0.14.0 → 0.16.0
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/dist/agent-composition/lib/agent.d.ts.map +1 -1
- package/dist/agent-composition/lib/agent.js.map +1 -1
- package/dist/agent-session/index.d.ts +2 -0
- package/dist/agent-session/index.d.ts.map +1 -0
- package/dist/{document-templates/lib → agent-session}/index.js +1 -2
- package/dist/agent-session/index.js.map +1 -0
- package/dist/agent-session/lib/lifecycle.d.ts +40 -0
- package/dist/agent-session/lib/lifecycle.d.ts.map +1 -0
- package/dist/agent-session/lib/lifecycle.js +73 -0
- package/dist/agent-session/lib/lifecycle.js.map +1 -0
- package/dist/agent-workspace/awp-spec.json +1 -1
- package/dist/agent-workspace/lib/workspace-layout.d.ts +0 -1
- package/dist/agent-workspace/lib/workspace-layout.d.ts.map +1 -1
- package/dist/agent-workspace/lib/workspace-layout.js +1 -6
- package/dist/agent-workspace/lib/workspace-layout.js.map +1 -1
- package/dist/biome/index.d.ts +0 -1
- package/dist/biome/index.d.ts.map +1 -1
- package/dist/biome/index.js +0 -1
- package/dist/biome/index.js.map +1 -1
- package/dist/biome/lib/biome-manifest.d.ts +12 -22
- package/dist/biome/lib/biome-manifest.d.ts.map +1 -1
- package/dist/biome/lib/biome-manifest.js +5 -27
- package/dist/biome/lib/biome-manifest.js.map +1 -1
- package/dist/biome/lib/biome-origin.d.ts.map +1 -1
- package/dist/biome/lib/biome-origin.js.map +1 -1
- package/dist/distribution/lib/distribution-lock.d.ts +2 -1
- package/dist/distribution/lib/distribution-lock.d.ts.map +1 -1
- package/dist/distribution/lib/distribution-lock.js +2 -1
- package/dist/distribution/lib/distribution-lock.js.map +1 -1
- package/dist/distribution/lib/distribution.d.ts +4 -2
- package/dist/distribution/lib/distribution.d.ts.map +1 -1
- package/dist/distribution/lib/distribution.js +6 -2
- package/dist/distribution/lib/distribution.js.map +1 -1
- package/dist/execution-context/lib/execution-context.d.ts.map +1 -1
- package/dist/execution-context/lib/execution-context.js.map +1 -1
- package/dist/execution-environment/lib/execution-environment.d.ts +0 -1
- package/dist/execution-environment/lib/execution-environment.d.ts.map +1 -1
- package/dist/execution-environment/lib/execution-environment.js +1 -2
- package/dist/execution-environment/lib/execution-environment.js.map +1 -1
- package/dist/object/lib/xema-object-kind.d.ts +0 -1
- package/dist/object/lib/xema-object-kind.d.ts.map +1 -1
- package/dist/object/lib/xema-object-kind.js +0 -1
- package/dist/object/lib/xema-object-kind.js.map +1 -1
- package/dist/object/lib/xema-object-ref.d.ts.map +1 -1
- package/dist/object/lib/xema-object-ref.js +20 -1
- package/dist/object/lib/xema-object-ref.js.map +1 -1
- package/dist/reference-resolution/lib/reference-resolution.d.ts.map +1 -1
- package/dist/reference-resolution/lib/reference-resolution.js.map +1 -1
- package/dist/runner/index.d.ts +0 -1
- package/dist/runner/index.d.ts.map +1 -1
- package/dist/runner/index.js +0 -1
- package/dist/runner/index.js.map +1 -1
- package/dist/runner-input-hash/index.d.ts +2 -0
- package/dist/runner-input-hash/index.d.ts.map +1 -0
- package/dist/{document-themes/lib → runner-input-hash}/index.js +1 -2
- package/dist/runner-input-hash/index.js.map +1 -0
- package/dist/runner-input-hash/lib/input-hash.d.ts.map +1 -0
- package/dist/runner-input-hash/lib/input-hash.js.map +1 -0
- package/dist/search-source/lib/search-replay.d.ts +0 -1
- package/dist/search-source/lib/search-replay.d.ts.map +1 -1
- package/dist/search-source/lib/search-replay.js +0 -5
- package/dist/search-source/lib/search-replay.js.map +1 -1
- package/dist/service-registry/lib/service-names.generated.d.ts +3 -0
- package/dist/service-registry/lib/service-names.generated.d.ts.map +1 -1
- package/dist/service-registry/lib/service-names.generated.js +3 -0
- package/dist/service-registry/lib/service-names.generated.js.map +1 -1
- package/dist/workflow/index.d.ts +0 -2
- package/dist/workflow/index.d.ts.map +1 -1
- package/dist/workflow/index.js +0 -2
- package/dist/workflow/index.js.map +1 -1
- package/dist/workflow/lib/catalog-taxonomies.d.ts +0 -1
- package/dist/workflow/lib/catalog-taxonomies.d.ts.map +1 -1
- package/dist/workflow/lib/catalog-taxonomies.js +9 -12
- package/dist/workflow/lib/catalog-taxonomies.js.map +1 -1
- package/dist/workflow/lib/enums.d.ts +0 -8
- package/dist/workflow/lib/enums.d.ts.map +1 -1
- package/dist/workflow/lib/enums.js +1 -15
- package/dist/workflow/lib/enums.js.map +1 -1
- package/dist/workflow/lib/model-ref.d.ts.map +1 -1
- package/dist/workflow/lib/model-ref.js.map +1 -1
- package/dist/workflow/lib/mount-plan.d.ts.map +1 -1
- package/dist/workflow/lib/run-progress.d.ts +0 -1
- package/dist/workflow/lib/run-progress.d.ts.map +1 -1
- package/dist/workflow/lib/run-progress.js +0 -1
- package/dist/workflow/lib/run-progress.js.map +1 -1
- package/dist/workspace-storage/index.d.ts +0 -1
- package/dist/workspace-storage/index.d.ts.map +1 -1
- package/dist/workspace-storage/index.js +0 -1
- package/dist/workspace-storage/index.js.map +1 -1
- package/dist/workspace-storage/lib/types.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/agent-composition/lib/agent.ts +3 -2
- package/src/agent-session/index.ts +1 -0
- package/src/agent-session/lib/lifecycle.ts +156 -0
- package/src/agent-workspace/lib/workspace-layout.ts +0 -13
- package/src/biome/index.ts +0 -1
- package/src/biome/lib/biome-manifest.ts +11 -52
- package/src/biome/lib/biome-origin.ts +4 -3
- package/src/distribution/lib/distribution-lock.ts +6 -2
- package/src/distribution/lib/distribution.ts +22 -3
- package/src/execution-context/lib/execution-context.ts +4 -7
- package/src/execution-environment/lib/execution-environment.ts +4 -7
- package/src/object/lib/xema-object-kind.ts +2 -2
- package/src/object/lib/xema-object-ref.ts +21 -1
- package/src/policy/lib/obligations.ts +5 -5
- package/src/reference-resolution/lib/reference-resolution.ts +4 -2
- package/src/runner/index.ts +0 -1
- package/src/runner-input-hash/index.ts +1 -0
- package/src/{runner → runner-input-hash}/lib/input-hash.ts +7 -0
- package/src/search-source/lib/search-replay.ts +0 -10
- package/src/service-registry/lib/service-names.generated.ts +3 -0
- package/src/workflow/index.ts +0 -2
- package/src/workflow/lib/catalog-taxonomies.ts +21 -15
- package/src/workflow/lib/enums.ts +3 -24
- package/src/workflow/lib/model-ref.ts +5 -6
- package/src/workflow/lib/mount-plan.ts +0 -1
- package/src/workflow/lib/run-progress.ts +0 -1
- package/src/workspace-storage/index.ts +0 -1
- package/src/workspace-storage/lib/types.ts +11 -5
- package/dist/agent-composition/lib/composition-limits-schema.d.ts +0 -4
- package/dist/agent-composition/lib/composition-limits-schema.d.ts.map +0 -1
- package/dist/agent-composition/lib/composition-limits-schema.js +0 -13
- package/dist/agent-composition/lib/composition-limits-schema.js.map +0 -1
- package/dist/agent-composition/lib/composition-workspace.d.ts +0 -37
- package/dist/agent-composition/lib/composition-workspace.d.ts.map +0 -1
- package/dist/agent-composition/lib/composition-workspace.js +0 -9
- package/dist/agent-composition/lib/composition-workspace.js.map +0 -1
- package/dist/agent-composition/lib/composition.d.ts +0 -65
- package/dist/agent-composition/lib/composition.d.ts.map +0 -1
- package/dist/agent-composition/lib/composition.js +0 -18
- package/dist/agent-composition/lib/composition.js.map +0 -1
- package/dist/agent-workspace/lib/awp-v1.d.ts +0 -15
- package/dist/agent-workspace/lib/awp-v1.d.ts.map +0 -1
- package/dist/agent-workspace/lib/awp-v1.js +0 -197
- package/dist/agent-workspace/lib/awp-v1.js.map +0 -1
- package/dist/biome/lib/biome-api.d.ts +0 -12
- package/dist/biome/lib/biome-api.d.ts.map +0 -1
- package/dist/biome/lib/biome-api.js +0 -14
- package/dist/biome/lib/biome-api.js.map +0 -1
- package/dist/document-templates/lib/index.d.ts +0 -3
- package/dist/document-templates/lib/index.d.ts.map +0 -1
- package/dist/document-templates/lib/index.js.map +0 -1
- package/dist/document-themes/lib/index.d.ts +0 -3
- package/dist/document-themes/lib/index.d.ts.map +0 -1
- package/dist/document-themes/lib/index.js.map +0 -1
- package/dist/runner/lib/input-hash.d.ts.map +0 -1
- package/dist/runner/lib/input-hash.js.map +0 -1
- package/dist/workflow/lib/sampling-profiles.d.ts +0 -18
- package/dist/workflow/lib/sampling-profiles.d.ts.map +0 -1
- package/dist/workflow/lib/sampling-profiles.js +0 -56
- package/dist/workflow/lib/sampling-profiles.js.map +0 -1
- package/dist/workflow/lib/workflow-stage.d.ts +0 -11
- package/dist/workflow/lib/workflow-stage.d.ts.map +0 -1
- package/dist/workflow/lib/workflow-stage.js +0 -28
- package/dist/workflow/lib/workflow-stage.js.map +0 -1
- package/dist/workspace-storage/lib/schemas.d.ts +0 -56
- package/dist/workspace-storage/lib/schemas.d.ts.map +0 -1
- package/dist/workspace-storage/lib/schemas.js +0 -59
- package/dist/workspace-storage/lib/schemas.js.map +0 -1
- package/src/biome/lib/biome-api.ts +0 -33
- package/src/document-templates/lib/index.ts +0 -2
- package/src/document-themes/lib/index.ts +0 -2
- package/src/workflow/lib/sampling-profiles.ts +0 -153
- package/src/workflow/lib/workflow-stage.ts +0 -89
- package/src/workspace-storage/lib/schemas.ts +0 -75
- /package/dist/{runner → runner-input-hash}/lib/input-hash.d.ts +0 -0
- /package/dist/{runner → runner-input-hash}/lib/input-hash.js +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"sampling-profiles.d.ts","sourceRoot":"","sources":["../../../src/workflow/lib/sampling-profiles.ts"],"names":[],"mappings":"AAgCA,oBAAY,eAAe;IAMzB,aAAa,kBAAkB;IAO/B,OAAO,YAAY;IAOnB,UAAU,eAAe;IAOzB,QAAQ,aAAa;CACtB;AAMD,MAAM,WAAW,cAAc;IAE7B,WAAW,EAAE,MAAM,CAAC;IAGpB,IAAI,CAAC,EAAE,MAAM,CAAC;IAGd,IAAI,CAAC,EAAE,MAAM,CAAC;IAGd,eAAe,CAAC,EAAE,MAAM,CAAC;IAGzB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAG1B,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAUD,eAAO,MAAM,yBAAyB,EAAE,MAAM,CAAC,eAAe,EAAE,cAAc,CAiB7E,CAAC;AAWF,wBAAgB,qBAAqB,CACnC,OAAO,EAAE,eAAe,EACxB,gBAAgB,CAAC,EAAE,OAAO,CAAC,cAAc,CAAC,GACzC,cAAc,CAchB;AAUD,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,eAAe,GAAG,MAAM,GAAG,SAAS,CAG/E"}
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SAMPLING_PROFILE_DEFAULTS = exports.SamplingProfile = void 0;
|
|
4
|
-
exports.resolveSamplingParams = resolveSamplingParams;
|
|
5
|
-
exports.profileTemperature = profileTemperature;
|
|
6
|
-
var SamplingProfile;
|
|
7
|
-
(function (SamplingProfile) {
|
|
8
|
-
SamplingProfile["Deterministic"] = "deterministic";
|
|
9
|
-
SamplingProfile["Precise"] = "precise";
|
|
10
|
-
SamplingProfile["Analytical"] = "analytical";
|
|
11
|
-
SamplingProfile["Creative"] = "creative";
|
|
12
|
-
})(SamplingProfile || (exports.SamplingProfile = SamplingProfile = {}));
|
|
13
|
-
exports.SAMPLING_PROFILE_DEFAULTS = {
|
|
14
|
-
[SamplingProfile.Deterministic]: {
|
|
15
|
-
temperature: 0.0,
|
|
16
|
-
topP: 0.95,
|
|
17
|
-
},
|
|
18
|
-
[SamplingProfile.Precise]: {
|
|
19
|
-
temperature: 0.15,
|
|
20
|
-
topP: 0.95,
|
|
21
|
-
},
|
|
22
|
-
[SamplingProfile.Analytical]: {
|
|
23
|
-
temperature: 0.6,
|
|
24
|
-
topP: 0.95,
|
|
25
|
-
},
|
|
26
|
-
[SamplingProfile.Creative]: {
|
|
27
|
-
temperature: 0.85,
|
|
28
|
-
topP: 0.95,
|
|
29
|
-
},
|
|
30
|
-
};
|
|
31
|
-
function resolveSamplingParams(profile, registryOverride) {
|
|
32
|
-
const defaults = exports.SAMPLING_PROFILE_DEFAULTS[profile];
|
|
33
|
-
if (!registryOverride)
|
|
34
|
-
return { ...defaults };
|
|
35
|
-
const merged = {
|
|
36
|
-
temperature: registryOverride.temperature ?? defaults.temperature,
|
|
37
|
-
};
|
|
38
|
-
const topP = registryOverride.topP ?? defaults.topP;
|
|
39
|
-
if (topP !== undefined)
|
|
40
|
-
merged.topP = topP;
|
|
41
|
-
if (registryOverride.topK !== undefined)
|
|
42
|
-
merged.topK = registryOverride.topK;
|
|
43
|
-
if (registryOverride.presencePenalty !== undefined)
|
|
44
|
-
merged.presencePenalty = registryOverride.presencePenalty;
|
|
45
|
-
if (registryOverride.frequencyPenalty !== undefined)
|
|
46
|
-
merged.frequencyPenalty = registryOverride.frequencyPenalty;
|
|
47
|
-
if (registryOverride.repetitionPenalty !== undefined)
|
|
48
|
-
merged.repetitionPenalty = registryOverride.repetitionPenalty;
|
|
49
|
-
return merged;
|
|
50
|
-
}
|
|
51
|
-
function profileTemperature(profile) {
|
|
52
|
-
if (profile === SamplingProfile.Deterministic)
|
|
53
|
-
return 0.0;
|
|
54
|
-
return undefined;
|
|
55
|
-
}
|
|
56
|
-
//# sourceMappingURL=sampling-profiles.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"sampling-profiles.js","sourceRoot":"","sources":["../../../src/workflow/lib/sampling-profiles.ts"],"names":[],"mappings":";;;AA0HA,sDAiBC;AAUD,gDAGC;AAxHD,IAAY,eA4BX;AA5BD,WAAY,eAAe;IAMzB,kDAA+B,CAAA;IAO/B,sCAAmB,CAAA;IAOnB,4CAAyB,CAAA;IAOzB,wCAAqB,CAAA;AACvB,CAAC,EA5BW,eAAe,+BAAf,eAAe,QA4B1B;AAkCY,QAAA,yBAAyB,GAA4C;IAChF,CAAC,eAAe,CAAC,aAAa,CAAC,EAAE;QAC/B,WAAW,EAAE,GAAG;QAChB,IAAI,EAAE,IAAI;KACX;IACD,CAAC,eAAe,CAAC,OAAO,CAAC,EAAE;QACzB,WAAW,EAAE,I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AAO,SAAS,CAAC;AACnB,CAAC"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
export declare enum WorkflowStageCategory {
|
|
2
|
-
Lifecycle = "lifecycle",
|
|
3
|
-
Delivery = "delivery"
|
|
4
|
-
}
|
|
5
|
-
export interface WorkflowStage {
|
|
6
|
-
readonly stageKey: string;
|
|
7
|
-
readonly category: WorkflowStageCategory;
|
|
8
|
-
}
|
|
9
|
-
export type WorkflowStageSequence = readonly WorkflowStage[];
|
|
10
|
-
export declare function nextStageInSequence(sequence: WorkflowStageSequence, currentStageKey: string, deliveryScope?: readonly string[]): string | undefined;
|
|
11
|
-
//# sourceMappingURL=workflow-stage.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"workflow-stage.d.ts","sourceRoot":"","sources":["../../../src/workflow/lib/workflow-stage.ts"],"names":[],"mappings":"AA4BA,oBAAY,qBAAqB;IAC/B,SAAS,cAAc;IACvB,QAAQ,aAAa;CACtB;AAOD,MAAM,WAAW,aAAa;IAE5B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAE1B,QAAQ,CAAC,QAAQ,EAAE,qBAAqB,CAAC;CAC1C;AAOD,MAAM,MAAM,qBAAqB,GAAG,SAAS,aAAa,EAAE,CAAC;AAa7D,wBAAgB,mBAAmB,CACjC,QAAQ,EAAE,qBAAqB,EAC/B,eAAe,EAAE,MAAM,EACvB,aAAa,CAAC,EAAE,SAAS,MAAM,EAAE,GAChC,MAAM,GAAG,SAAS,CAqBpB"}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.WorkflowStageCategory = void 0;
|
|
4
|
-
exports.nextStageInSequence = nextStageInSequence;
|
|
5
|
-
var WorkflowStageCategory;
|
|
6
|
-
(function (WorkflowStageCategory) {
|
|
7
|
-
WorkflowStageCategory["Lifecycle"] = "lifecycle";
|
|
8
|
-
WorkflowStageCategory["Delivery"] = "delivery";
|
|
9
|
-
})(WorkflowStageCategory || (exports.WorkflowStageCategory = WorkflowStageCategory = {}));
|
|
10
|
-
function nextStageInSequence(sequence, currentStageKey, deliveryScope) {
|
|
11
|
-
const currentIdx = sequence.findIndex((s) => s.stageKey === currentStageKey);
|
|
12
|
-
if (currentIdx < 0) {
|
|
13
|
-
throw new Error(`Stage "${currentStageKey}" is not present in the supplied workflow stage sequence`);
|
|
14
|
-
}
|
|
15
|
-
for (let i = currentIdx + 1; i < sequence.length; i++) {
|
|
16
|
-
const candidate = sequence[i];
|
|
17
|
-
if (candidate === undefined) {
|
|
18
|
-
continue;
|
|
19
|
-
}
|
|
20
|
-
if (!deliveryScope ||
|
|
21
|
-
candidate.category === WorkflowStageCategory.Lifecycle ||
|
|
22
|
-
deliveryScope.includes(candidate.stageKey)) {
|
|
23
|
-
return candidate.stageKey;
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
return undefined;
|
|
27
|
-
}
|
|
28
|
-
//# sourceMappingURL=workflow-stage.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"workflow-stage.js","sourceRoot":"","sources":["../../../src/workflow/lib/workflow-stage.ts"],"names":[],"mappings":";;;AA+DA,kDAyBC;AA5DD,IAAY,qBAGX;AAHD,WAAY,qBAAqB;IAC/B,gDAAuB,CAAA;IACvB,8CAAqB,CAAA;AACvB,CAAC,EAHW,qBAAqB,qCAArB,qBAAqB,QAGhC;AAgCD,SAAgB,mBAAmB,CACjC,QAA+B,EAC/B,eAAuB,EACvB,aAAiC;IAEjC,MAAM,UAAU,GAAG,QAAQ,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,KAAK,eAAe,CAAC,CAAC;IAC7E,IAAI,UAAU,GAAG,CAAC,EAAE,CAAC;QACnB,MAAM,IAAI,KAAK,CACb,UAAU,eAAe,0DAA0D,CACpF,CAAC;IACJ,CAAC;IACD,KAAK,IAAI,CAAC,GAAG,UAAU,GAAG,CAAC,EAAE,CAAC,GAAG,QAAQ,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;QACtD,MAAM,SAAS,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC;QAC9B,IAAI,SAAS,KAAK,SAAS,EAAE,CAAC;YAC5B,SAAS;QACX,CAAC;QACD,IACE,CAAC,aAAa;YACd,SAAS,CAAC,QAAQ,KAAK,qBAAqB,CAAC,SAAS;YACtD,aAAa,CAAC,QAAQ,CAAC,SAAS,CAAC,QAAQ,CAAC,EAC1C,CAAC;YACD,OAAO,SAAS,CAAC,QAAQ,CAAC;QAC5B,CAAC;IACH,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC"}
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import { AllocationScope, AllocationStatus, AttachmentKind, PoolStatus, StorageDriverKind } from './enums';
|
|
3
|
-
export declare const attachmentKindSchema: z.ZodEnum<typeof AttachmentKind>;
|
|
4
|
-
export declare const storageDriverKindSchema: z.ZodEnum<typeof StorageDriverKind>;
|
|
5
|
-
export declare const poolStatusSchema: z.ZodEnum<typeof PoolStatus>;
|
|
6
|
-
export declare const allocationScopeSchema: z.ZodEnum<typeof AllocationScope>;
|
|
7
|
-
export declare const allocationStatusSchema: z.ZodEnum<typeof AllocationStatus>;
|
|
8
|
-
export declare const abstractMountSchema: z.ZodObject<{
|
|
9
|
-
poolId: z.ZodString;
|
|
10
|
-
subPath: z.ZodString;
|
|
11
|
-
mountPath: z.ZodString;
|
|
12
|
-
readOnly: z.ZodOptional<z.ZodBoolean>;
|
|
13
|
-
driverHandle: z.ZodString;
|
|
14
|
-
}, z.core.$strip>;
|
|
15
|
-
export declare const poolSpecSchema: z.ZodObject<{
|
|
16
|
-
slug: z.ZodString;
|
|
17
|
-
driverKind: z.ZodEnum<typeof StorageDriverKind>;
|
|
18
|
-
driverConfig: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
19
|
-
capacityBytes: z.ZodBigInt;
|
|
20
|
-
region: z.ZodString;
|
|
21
|
-
environment: z.ZodOptional<z.ZodString>;
|
|
22
|
-
costClass: z.ZodOptional<z.ZodString>;
|
|
23
|
-
}, z.core.$strip>;
|
|
24
|
-
export declare const ensuredPoolSchema: z.ZodObject<{
|
|
25
|
-
poolId: z.ZodString;
|
|
26
|
-
pvcName: z.ZodString;
|
|
27
|
-
pvcNamespace: z.ZodString;
|
|
28
|
-
status: z.ZodEnum<typeof PoolStatus>;
|
|
29
|
-
}, z.core.$strip>;
|
|
30
|
-
export declare const storagePoolSchema: z.ZodObject<{
|
|
31
|
-
id: z.ZodString;
|
|
32
|
-
slug: z.ZodString;
|
|
33
|
-
driverKind: z.ZodEnum<typeof StorageDriverKind>;
|
|
34
|
-
region: z.ZodString;
|
|
35
|
-
environment: z.ZodOptional<z.ZodString>;
|
|
36
|
-
capacityBytes: z.ZodBigInt;
|
|
37
|
-
costClass: z.ZodOptional<z.ZodString>;
|
|
38
|
-
status: z.ZodEnum<typeof PoolStatus>;
|
|
39
|
-
createdAt: z.ZodString;
|
|
40
|
-
updatedAt: z.ZodString;
|
|
41
|
-
}, z.core.$strip>;
|
|
42
|
-
export declare const storageAllocationSchema: z.ZodObject<{
|
|
43
|
-
id: z.ZodString;
|
|
44
|
-
poolId: z.ZodString;
|
|
45
|
-
scope: z.ZodEnum<typeof AllocationScope>;
|
|
46
|
-
orgId: z.ZodOptional<z.ZodString>;
|
|
47
|
-
projectId: z.ZodOptional<z.ZodString>;
|
|
48
|
-
sessionId: z.ZodOptional<z.ZodString>;
|
|
49
|
-
region: z.ZodString;
|
|
50
|
-
subPath: z.ZodString;
|
|
51
|
-
bytesUsed: z.ZodBigInt;
|
|
52
|
-
status: z.ZodEnum<typeof AllocationStatus>;
|
|
53
|
-
lastTouchedAt: z.ZodString;
|
|
54
|
-
createdAt: z.ZodString;
|
|
55
|
-
}, z.core.$strip>;
|
|
56
|
-
//# sourceMappingURL=schemas.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../../src/workspace-storage/lib/schemas.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EACL,eAAe,EACf,gBAAgB,EAChB,cAAc,EACd,UAAU,EACV,iBAAiB,EAClB,MAAM,SAAS,CAAC;AAEjB,eAAO,MAAM,oBAAoB,kCAA+B,CAAC;AACjE,eAAO,MAAM,uBAAuB,qCAAkC,CAAC;AACvE,eAAO,MAAM,gBAAgB,8BAA2B,CAAC;AACzD,eAAO,MAAM,qBAAqB,mCAAgC,CAAC;AACnE,eAAO,MAAM,sBAAsB,oCAAiC,CAAC;AAErE,eAAO,MAAM,mBAAmB;;;;;;iBAM9B,CAAC;AAEH,eAAO,MAAM,cAAc;;;;;;;;iBAQzB,CAAC;AAEH,eAAO,MAAM,iBAAiB;;;;;iBAK5B,CAAC;AAEH,eAAO,MAAM,iBAAiB;;;;;;;;;;;iBAW5B,CAAC;AAEH,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;iBAalC,CAAC"}
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.storageAllocationSchema = exports.storagePoolSchema = exports.ensuredPoolSchema = exports.poolSpecSchema = exports.abstractMountSchema = exports.allocationStatusSchema = exports.allocationScopeSchema = exports.poolStatusSchema = exports.storageDriverKindSchema = exports.attachmentKindSchema = void 0;
|
|
4
|
-
const zod_1 = require("zod");
|
|
5
|
-
const enums_1 = require("./enums");
|
|
6
|
-
exports.attachmentKindSchema = zod_1.z.nativeEnum(enums_1.AttachmentKind);
|
|
7
|
-
exports.storageDriverKindSchema = zod_1.z.nativeEnum(enums_1.StorageDriverKind);
|
|
8
|
-
exports.poolStatusSchema = zod_1.z.nativeEnum(enums_1.PoolStatus);
|
|
9
|
-
exports.allocationScopeSchema = zod_1.z.nativeEnum(enums_1.AllocationScope);
|
|
10
|
-
exports.allocationStatusSchema = zod_1.z.nativeEnum(enums_1.AllocationStatus);
|
|
11
|
-
exports.abstractMountSchema = zod_1.z.object({
|
|
12
|
-
poolId: zod_1.z.string().min(1),
|
|
13
|
-
subPath: zod_1.z.string().min(1),
|
|
14
|
-
mountPath: zod_1.z.string().min(1),
|
|
15
|
-
readOnly: zod_1.z.boolean().optional(),
|
|
16
|
-
driverHandle: zod_1.z.string().min(1),
|
|
17
|
-
});
|
|
18
|
-
exports.poolSpecSchema = zod_1.z.object({
|
|
19
|
-
slug: zod_1.z.string().min(1),
|
|
20
|
-
driverKind: exports.storageDriverKindSchema,
|
|
21
|
-
driverConfig: zod_1.z.record(zod_1.z.string(), zod_1.z.unknown()),
|
|
22
|
-
capacityBytes: zod_1.z.bigint().nonnegative(),
|
|
23
|
-
region: zod_1.z.string().min(1),
|
|
24
|
-
environment: zod_1.z.string().min(1).optional(),
|
|
25
|
-
costClass: zod_1.z.string().min(1).optional(),
|
|
26
|
-
});
|
|
27
|
-
exports.ensuredPoolSchema = zod_1.z.object({
|
|
28
|
-
poolId: zod_1.z.string().min(1),
|
|
29
|
-
pvcName: zod_1.z.string().min(1),
|
|
30
|
-
pvcNamespace: zod_1.z.string().min(1),
|
|
31
|
-
status: exports.poolStatusSchema,
|
|
32
|
-
});
|
|
33
|
-
exports.storagePoolSchema = zod_1.z.object({
|
|
34
|
-
id: zod_1.z.string().min(1),
|
|
35
|
-
slug: zod_1.z.string().min(1),
|
|
36
|
-
driverKind: exports.storageDriverKindSchema,
|
|
37
|
-
region: zod_1.z.string().min(1),
|
|
38
|
-
environment: zod_1.z.string().min(1).optional(),
|
|
39
|
-
capacityBytes: zod_1.z.bigint().nonnegative(),
|
|
40
|
-
costClass: zod_1.z.string().min(1).optional(),
|
|
41
|
-
status: exports.poolStatusSchema,
|
|
42
|
-
createdAt: zod_1.z.string().min(1),
|
|
43
|
-
updatedAt: zod_1.z.string().min(1),
|
|
44
|
-
});
|
|
45
|
-
exports.storageAllocationSchema = zod_1.z.object({
|
|
46
|
-
id: zod_1.z.string().min(1),
|
|
47
|
-
poolId: zod_1.z.string().min(1),
|
|
48
|
-
scope: exports.allocationScopeSchema,
|
|
49
|
-
orgId: zod_1.z.string().min(1).optional(),
|
|
50
|
-
projectId: zod_1.z.string().min(1).optional(),
|
|
51
|
-
sessionId: zod_1.z.string().min(1).optional(),
|
|
52
|
-
region: zod_1.z.string().min(1),
|
|
53
|
-
subPath: zod_1.z.string().min(1),
|
|
54
|
-
bytesUsed: zod_1.z.bigint().nonnegative(),
|
|
55
|
-
status: exports.allocationStatusSchema,
|
|
56
|
-
lastTouchedAt: zod_1.z.string().min(1),
|
|
57
|
-
createdAt: zod_1.z.string().min(1),
|
|
58
|
-
});
|
|
59
|
-
//# sourceMappingURL=schemas.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"schemas.js","sourceRoot":"","sources":["../../../src/workspace-storage/lib/schemas.ts"],"names":[],"mappings":";;;AAOA,6BAAwB;AAExB,mCAMiB;AAEJ,QAAA,oBAAoB,GAAG,OAAC,CAAC,UAAU,CAAC,sBAAc,CAAC,CAAC;AACpD,QAAA,uBAAuB,GAAG,OAAC,CAAC,UAAU,CAAC,yBAAiB,CAAC,CAAC;AAC1D,QAAA,gBAAgB,GAAG,OAAC,CAAC,UAAU,CAAC,kBAAU,CAAC,CAAC;AAC5C,QAAA,qBAAqB,GAAG,OAAC,CAAC,UAAU,CAAC,uBAAe,CAAC,CAAC;AACtD,QAAA,sBAAsB,GAAG,OAAC,CAAC,UAAU,CAAC,wBAAgB,CAAC,CAAC;AAExD,QAAA,mBAAmB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC1C,MAAM,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACzB,OAAO,EAAE,OAAC,CAAC,MAAM,EAAE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O,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAC1B,SAAS,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,WAAW,EAAE;IACnC,MAAM,EAAE,8BAAsB;IAC9B,aAAa,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAChC,SAAS,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;CAC7B,CAAC,CAAC"}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* `BiomeApiManifest` — one entry of the biome manifest's `ships.apis[]`
|
|
5
|
-
* array (plan §25.1). A biome may ship zero, one, or many NestJS
|
|
6
|
-
* services; each becomes its own Helm sub-chart, its own Docker image,
|
|
7
|
-
* its own subdomain (`<biomeId>.<name>.api.<domain>`), and its own
|
|
8
|
-
* capability namespace (`biome:<biomeId>.<apiName>.<verb>@1`).
|
|
9
|
-
*
|
|
10
|
-
* `scopes` is the closed list of capability verb scopes this API
|
|
11
|
-
* advertises. Strings are intentional here (not a TS enum) because the
|
|
12
|
-
* value space is biome-author-defined; the kernel only validates the
|
|
13
|
-
* outer shape.
|
|
14
|
-
*/
|
|
15
|
-
export interface BiomeApiManifest {
|
|
16
|
-
name: string;
|
|
17
|
-
basePath: string;
|
|
18
|
-
image: {
|
|
19
|
-
package: string;
|
|
20
|
-
port: number;
|
|
21
|
-
};
|
|
22
|
-
scopes: readonly string[];
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
export const BiomeApiManifestSchema = z.object({
|
|
26
|
-
name: z.string().min(1),
|
|
27
|
-
basePath: z.string().min(1),
|
|
28
|
-
image: z.object({
|
|
29
|
-
package: z.string().min(1),
|
|
30
|
-
port: z.number().int().positive(),
|
|
31
|
-
}),
|
|
32
|
-
scopes: z.array(z.string().min(1)).readonly(),
|
|
33
|
-
}) as z.ZodType<BiomeApiManifest>;
|
|
@@ -1,153 +0,0 @@
|
|
|
1
|
-
// =============================================================================
|
|
2
|
-
// -- Sampling Profiles — Semantic Task-Type Classification --
|
|
3
|
-
//
|
|
4
|
-
// Defines semantic task-type profiles that classify WHAT an agent does.
|
|
5
|
-
// These profiles are used for:
|
|
6
|
-
// 1. Documentation — communicate intent to human readers
|
|
7
|
-
// 2. LLM Registry model strategy — the registry can map profile → model tier
|
|
8
|
-
//
|
|
9
|
-
// IMPORTANT: For OpenCode SDK mode, temperature/sampling is handled by
|
|
10
|
-
// OpenCode itself via its ProviderTransform (model-specific defaults) and
|
|
11
|
-
// agent config (temperature field in .md frontmatter / opencode.jsonc).
|
|
12
|
-
//
|
|
13
|
-
// OpenCode's built-in model-specific defaults (from ProviderTransform):
|
|
14
|
-
// - Qwen: temperature=0.55, topP=1
|
|
15
|
-
// - Gemini: temperature=1.0, topP=0.95, topK=64
|
|
16
|
-
// - Claude: undefined (uses agent config if set, else provider default)
|
|
17
|
-
// - Kimi K2 (thinking): temperature=1.0, topP=0.95
|
|
18
|
-
//
|
|
19
|
-
// We only set explicit temperature in agent configs for deterministic agents
|
|
20
|
-
// (temperature=0.0) where we want zero randomness regardless of model.
|
|
21
|
-
// For all other agents, we omit temperature and let OpenCode choose based
|
|
22
|
-
// on the model's ProviderTransform.
|
|
23
|
-
// =============================================================================
|
|
24
|
-
|
|
25
|
-
/**
|
|
26
|
-
* Semantic sampling profiles — describe WHAT the agent does, not HOW the model
|
|
27
|
-
* should behave. Used for documentation and LLM Registry model strategy mapping.
|
|
28
|
-
*
|
|
29
|
-
* All pipeline agents run through the OpenCode SDK. OpenCode's ProviderTransform
|
|
30
|
-
* handles model-specific sampling parameters (temperature, topP, topK) automatically.
|
|
31
|
-
* We only set temperature=0.0 in agent configs for deterministic agents.
|
|
32
|
-
*/
|
|
33
|
-
export enum SamplingProfile {
|
|
34
|
-
/**
|
|
35
|
-
* Classification, routing, merge validation, yes/no decisions.
|
|
36
|
-
* Maximum reproducibility — single correct answer expected.
|
|
37
|
-
* Agent config: temperature=0.0 (explicit override).
|
|
38
|
-
*/
|
|
39
|
-
Deterministic = 'deterministic',
|
|
40
|
-
|
|
41
|
-
/**
|
|
42
|
-
* Code generation, structured JSON output, data transformations, backlog creation.
|
|
43
|
-
* Near-deterministic with a tiny margin to avoid degenerate repetition loops.
|
|
44
|
-
* Agent config: no temperature set — OpenCode's model-specific default applies.
|
|
45
|
-
*/
|
|
46
|
-
Precise = 'precise',
|
|
47
|
-
|
|
48
|
-
/**
|
|
49
|
-
* Analysis, reasoning, planning, requirements elicitation, design decisions.
|
|
50
|
-
* Enough randomness for nuanced reasoning and varied phrasing.
|
|
51
|
-
* Agent config: no temperature set — OpenCode's model-specific default applies.
|
|
52
|
-
*/
|
|
53
|
-
Analytical = 'analytical',
|
|
54
|
-
|
|
55
|
-
/**
|
|
56
|
-
* Design System Builder, document drafting, creative writing, prompt enrichment.
|
|
57
|
-
* High diversity, reduced repetition for longer outputs.
|
|
58
|
-
* Agent config: no temperature set — OpenCode's model-specific default applies.
|
|
59
|
-
*/
|
|
60
|
-
Creative = 'creative',
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
/**
|
|
64
|
-
* Sampling parameters that can be sent to an LLM provider.
|
|
65
|
-
* All fields are optional — providers ignore unsupported params.
|
|
66
|
-
*/
|
|
67
|
-
export interface SamplingParams {
|
|
68
|
-
/** Controls randomness. Range depends on provider (0–1 for Anthropic, 0–2 for others). */
|
|
69
|
-
temperature: number;
|
|
70
|
-
|
|
71
|
-
/** Nucleus sampling — cumulative probability threshold. Universal. */
|
|
72
|
-
topP?: number;
|
|
73
|
-
|
|
74
|
-
/** Limits token candidates. Not supported by OpenAI. */
|
|
75
|
-
topK?: number;
|
|
76
|
-
|
|
77
|
-
/** Penalizes tokens already in the output. OpenAI, Google, Qwen only. */
|
|
78
|
-
presencePenalty?: number;
|
|
79
|
-
|
|
80
|
-
/** Penalizes based on token frequency. OpenAI, Google, Qwen only. */
|
|
81
|
-
frequencyPenalty?: number;
|
|
82
|
-
|
|
83
|
-
/** Multiplicative repetition penalty. Qwen and open-source only (mutually exclusive with presence/frequency penalties). */
|
|
84
|
-
repetitionPenalty?: number;
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
/**
|
|
88
|
-
* Reference parameters per profile.
|
|
89
|
-
*
|
|
90
|
-
* In OpenCode SDK mode (all current agents), these are NOT used at runtime —
|
|
91
|
-
* OpenCode's ProviderTransform handles model-specific tuning automatically.
|
|
92
|
-
* These serve as documentation and as a reference for the LLM Registry
|
|
93
|
-
* when configuring model strategy entries.
|
|
94
|
-
*/
|
|
95
|
-
export const SAMPLING_PROFILE_DEFAULTS: Record<SamplingProfile, SamplingParams> = {
|
|
96
|
-
[SamplingProfile.Deterministic]: {
|
|
97
|
-
temperature: 0.0,
|
|
98
|
-
topP: 0.95,
|
|
99
|
-
},
|
|
100
|
-
[SamplingProfile.Precise]: {
|
|
101
|
-
temperature: 0.15,
|
|
102
|
-
topP: 0.95,
|
|
103
|
-
},
|
|
104
|
-
[SamplingProfile.Analytical]: {
|
|
105
|
-
temperature: 0.6,
|
|
106
|
-
topP: 0.95,
|
|
107
|
-
},
|
|
108
|
-
[SamplingProfile.Creative]: {
|
|
109
|
-
temperature: 0.85,
|
|
110
|
-
topP: 0.95,
|
|
111
|
-
},
|
|
112
|
-
};
|
|
113
|
-
|
|
114
|
-
/**
|
|
115
|
-
* Resolve sampling parameters for a given profile.
|
|
116
|
-
*
|
|
117
|
-
* Priority: registryOverride > profile defaults
|
|
118
|
-
*
|
|
119
|
-
* @param profile - The semantic sampling profile
|
|
120
|
-
* @param registryOverride - Optional per-model override from the LLM Registry
|
|
121
|
-
* @returns Merged sampling parameters
|
|
122
|
-
*/
|
|
123
|
-
export function resolveSamplingParams(
|
|
124
|
-
profile: SamplingProfile,
|
|
125
|
-
registryOverride?: Partial<SamplingParams>,
|
|
126
|
-
): SamplingParams {
|
|
127
|
-
const defaults = SAMPLING_PROFILE_DEFAULTS[profile];
|
|
128
|
-
if (!registryOverride) return { ...defaults };
|
|
129
|
-
|
|
130
|
-
const merged: SamplingParams = {
|
|
131
|
-
temperature: registryOverride.temperature ?? defaults.temperature,
|
|
132
|
-
};
|
|
133
|
-
const topP = registryOverride.topP ?? defaults.topP;
|
|
134
|
-
if (topP !== undefined) merged.topP = topP;
|
|
135
|
-
if (registryOverride.topK !== undefined) merged.topK = registryOverride.topK;
|
|
136
|
-
if (registryOverride.presencePenalty !== undefined) merged.presencePenalty = registryOverride.presencePenalty;
|
|
137
|
-
if (registryOverride.frequencyPenalty !== undefined) merged.frequencyPenalty = registryOverride.frequencyPenalty;
|
|
138
|
-
if (registryOverride.repetitionPenalty !== undefined) merged.repetitionPenalty = registryOverride.repetitionPenalty;
|
|
139
|
-
return merged;
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
/**
|
|
143
|
-
* Extract temperature from a profile.
|
|
144
|
-
*
|
|
145
|
-
* Only returns a value for Deterministic (0.0) since that's the only
|
|
146
|
-
* profile where we explicitly override the model default. For all other
|
|
147
|
-
* profiles, returns undefined to let the runtime adapter's
|
|
148
|
-
* provider-specific defaults apply.
|
|
149
|
-
*/
|
|
150
|
-
export function profileTemperature(profile: SamplingProfile): number | undefined {
|
|
151
|
-
if (profile === SamplingProfile.Deterministic) return 0.0;
|
|
152
|
-
return undefined;
|
|
153
|
-
}
|
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
// ═══════════════════════════════════════════════════════════════════════════
|
|
2
|
-
// ── Workflow Stage — Generic Ordered-Stage Contract ──
|
|
3
|
-
//
|
|
4
|
-
// The kernel knows ONLY that a workflow run can be partitioned into an
|
|
5
|
-
// ordered sequence of named stages. It carries ZERO domain knowledge: the
|
|
6
|
-
// concrete stage list (software-delivery's `clarification → requirements →
|
|
7
|
-
// … → deployment`, a content pipeline's stages, etc.) is owned by the
|
|
8
|
-
// sub-app biome that defines the workflow, never by this kernel package.
|
|
9
|
-
//
|
|
10
|
-
// A stage is identified by a free-form `stageKey` string. The artifact
|
|
11
|
-
// natural key already `_`-encodes this value (`{kind}:{workflowRunId}:
|
|
12
|
-
// {stageKey|_}:{scope|_}:{slug}`), and the workflow engine sequences jobs
|
|
13
|
-
// via explicit `needs:` dependency edges — neither needs a closed enum.
|
|
14
|
-
//
|
|
15
|
-
// Biomes that DO define an ordered stage list (e.g. for a phase rail or a
|
|
16
|
-
// per-stage gate-reviewer map) ship it as biome content and load it at
|
|
17
|
-
// runtime; see `biomes/platform/software-dev/workflow-config/phase-config.json`.
|
|
18
|
-
// ═══════════════════════════════════════════════════════════════════════════
|
|
19
|
-
|
|
20
|
-
/**
|
|
21
|
-
* How the execution engine treats a stage:
|
|
22
|
-
* - `lifecycle`: a meta-stage that shapes the run but does not produce a
|
|
23
|
-
* gated deliverable (e.g. a clarification/intake stage).
|
|
24
|
-
* - `delivery`: produces artifacts and flows through gate progression.
|
|
25
|
-
*
|
|
26
|
-
* This is the one generic, closed property every ordered-stage model
|
|
27
|
-
* shares. The stage *keys* themselves stay free-form and biome-owned.
|
|
28
|
-
*/
|
|
29
|
-
export enum WorkflowStageCategory {
|
|
30
|
-
Lifecycle = 'lifecycle',
|
|
31
|
-
Delivery = 'delivery',
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
/**
|
|
35
|
-
* A single ordered workflow stage. `stageKey` is the value that flows onto
|
|
36
|
-
* a job's `stageKey` and into the artifact natural key — a free-form
|
|
37
|
-
* string the kernel never validates against a closed set.
|
|
38
|
-
*/
|
|
39
|
-
export interface WorkflowStage {
|
|
40
|
-
/** Free-form stage identifier (e.g. `requirements`, `engineering`). */
|
|
41
|
-
readonly stageKey: string;
|
|
42
|
-
/** Whether the engine treats this stage as lifecycle or delivery. */
|
|
43
|
-
readonly category: WorkflowStageCategory;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
/**
|
|
47
|
-
* An ordered list of workflow stages, as defined by a workflow/sub-app.
|
|
48
|
-
* The kernel offers this shape so a biome-supplied stage list has a
|
|
49
|
-
* typed home; the kernel never instantiates one.
|
|
50
|
-
*/
|
|
51
|
-
export type WorkflowStageSequence = readonly WorkflowStage[];
|
|
52
|
-
|
|
53
|
-
/**
|
|
54
|
-
* Compute the next stage after `currentStageKey` within an ordered
|
|
55
|
-
* sequence, optionally restricted to an in-scope subset of delivery
|
|
56
|
-
* stages. Lifecycle stages are always in scope; delivery stages must
|
|
57
|
-
* appear in `deliveryScope` when one is supplied.
|
|
58
|
-
*
|
|
59
|
-
* Returns `undefined` when `currentStageKey` is terminal within the
|
|
60
|
-
* (optionally scoped) sequence.
|
|
61
|
-
*
|
|
62
|
-
* @throws Error if `currentStageKey` is not present in `sequence`.
|
|
63
|
-
*/
|
|
64
|
-
export function nextStageInSequence(
|
|
65
|
-
sequence: WorkflowStageSequence,
|
|
66
|
-
currentStageKey: string,
|
|
67
|
-
deliveryScope?: readonly string[],
|
|
68
|
-
): string | undefined {
|
|
69
|
-
const currentIdx = sequence.findIndex((s) => s.stageKey === currentStageKey);
|
|
70
|
-
if (currentIdx < 0) {
|
|
71
|
-
throw new Error(
|
|
72
|
-
`Stage "${currentStageKey}" is not present in the supplied workflow stage sequence`,
|
|
73
|
-
);
|
|
74
|
-
}
|
|
75
|
-
for (let i = currentIdx + 1; i < sequence.length; i++) {
|
|
76
|
-
const candidate = sequence[i];
|
|
77
|
-
if (candidate === undefined) {
|
|
78
|
-
continue;
|
|
79
|
-
}
|
|
80
|
-
if (
|
|
81
|
-
!deliveryScope ||
|
|
82
|
-
candidate.category === WorkflowStageCategory.Lifecycle ||
|
|
83
|
-
deliveryScope.includes(candidate.stageKey)
|
|
84
|
-
) {
|
|
85
|
-
return candidate.stageKey;
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
return undefined;
|
|
89
|
-
}
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
// ═══════════════════════════════════════════════════════════════════════════
|
|
2
|
-
// ── Workspace storage — zod schemas ──
|
|
3
|
-
//
|
|
4
|
-
// Runtime validators mirroring the enums and DTOs in this package. Kept in
|
|
5
|
-
// a separate file so type-only consumers can tree-shake them out.
|
|
6
|
-
// ═══════════════════════════════════════════════════════════════════════════
|
|
7
|
-
|
|
8
|
-
import { z } from 'zod';
|
|
9
|
-
|
|
10
|
-
import {
|
|
11
|
-
AllocationScope,
|
|
12
|
-
AllocationStatus,
|
|
13
|
-
AttachmentKind,
|
|
14
|
-
PoolStatus,
|
|
15
|
-
StorageDriverKind,
|
|
16
|
-
} from './enums';
|
|
17
|
-
|
|
18
|
-
export const attachmentKindSchema = z.nativeEnum(AttachmentKind);
|
|
19
|
-
export const storageDriverKindSchema = z.nativeEnum(StorageDriverKind);
|
|
20
|
-
export const poolStatusSchema = z.nativeEnum(PoolStatus);
|
|
21
|
-
export const allocationScopeSchema = z.nativeEnum(AllocationScope);
|
|
22
|
-
export const allocationStatusSchema = z.nativeEnum(AllocationStatus);
|
|
23
|
-
|
|
24
|
-
export const abstractMountSchema = z.object({
|
|
25
|
-
poolId: z.string().min(1),
|
|
26
|
-
subPath: z.string().min(1),
|
|
27
|
-
mountPath: z.string().min(1),
|
|
28
|
-
readOnly: z.boolean().optional(),
|
|
29
|
-
driverHandle: z.string().min(1),
|
|
30
|
-
});
|
|
31
|
-
|
|
32
|
-
export const poolSpecSchema = z.object({
|
|
33
|
-
slug: z.string().min(1),
|
|
34
|
-
driverKind: storageDriverKindSchema,
|
|
35
|
-
driverConfig: z.record(z.string(), z.unknown()),
|
|
36
|
-
capacityBytes: z.bigint().nonnegative(),
|
|
37
|
-
region: z.string().min(1),
|
|
38
|
-
environment: z.string().min(1).optional(),
|
|
39
|
-
costClass: z.string().min(1).optional(),
|
|
40
|
-
});
|
|
41
|
-
|
|
42
|
-
export const ensuredPoolSchema = z.object({
|
|
43
|
-
poolId: z.string().min(1),
|
|
44
|
-
pvcName: z.string().min(1),
|
|
45
|
-
pvcNamespace: z.string().min(1),
|
|
46
|
-
status: poolStatusSchema,
|
|
47
|
-
});
|
|
48
|
-
|
|
49
|
-
export const storagePoolSchema = z.object({
|
|
50
|
-
id: z.string().min(1),
|
|
51
|
-
slug: z.string().min(1),
|
|
52
|
-
driverKind: storageDriverKindSchema,
|
|
53
|
-
region: z.string().min(1),
|
|
54
|
-
environment: z.string().min(1).optional(),
|
|
55
|
-
capacityBytes: z.bigint().nonnegative(),
|
|
56
|
-
costClass: z.string().min(1).optional(),
|
|
57
|
-
status: poolStatusSchema,
|
|
58
|
-
createdAt: z.string().min(1),
|
|
59
|
-
updatedAt: z.string().min(1),
|
|
60
|
-
});
|
|
61
|
-
|
|
62
|
-
export const storageAllocationSchema = z.object({
|
|
63
|
-
id: z.string().min(1),
|
|
64
|
-
poolId: z.string().min(1),
|
|
65
|
-
scope: allocationScopeSchema,
|
|
66
|
-
orgId: z.string().min(1).optional(),
|
|
67
|
-
projectId: z.string().min(1).optional(),
|
|
68
|
-
sessionId: z.string().min(1).optional(),
|
|
69
|
-
region: z.string().min(1),
|
|
70
|
-
subPath: z.string().min(1),
|
|
71
|
-
bytesUsed: z.bigint().nonnegative(),
|
|
72
|
-
status: allocationStatusSchema,
|
|
73
|
-
lastTouchedAt: z.string().min(1),
|
|
74
|
-
createdAt: z.string().min(1),
|
|
75
|
-
});
|
|
File without changes
|
|
File without changes
|