@xemahq/platform-common 0.8.0 → 0.9.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/dist/lib/biome-database.d.ts +1 -0
- package/dist/lib/biome-database.d.ts.map +1 -1
- package/dist/lib/biome-database.js +55 -3
- package/dist/lib/biome-database.js.map +1 -1
- package/dist/lib/session-event-payloads/error-codes.d.ts +3 -2
- package/dist/lib/session-event-payloads/error-codes.d.ts.map +1 -1
- package/dist/lib/session-event-payloads/error-codes.js +2 -0
- package/dist/lib/session-event-payloads/error-codes.js.map +1 -1
- package/dist/lib/session-event-payloads/validation.d.ts +2 -2
- package/package.json +7 -8
|
@@ -9,5 +9,6 @@ export interface BiomeDatabaseUrlParts {
|
|
|
9
9
|
}
|
|
10
10
|
export declare function composeBiomeDatabaseUrl(parts: BiomeDatabaseUrlParts): string | null;
|
|
11
11
|
export declare function composeBiomeDatabaseUrlFromEnv(env?: NodeJS.ProcessEnv): string | null;
|
|
12
|
+
export declare const BIOME_DB_SESSION_TIMEZONE = "UTC";
|
|
12
13
|
export declare function ensureBiomeDbSearchPath(connectionString: string): string;
|
|
13
14
|
//# sourceMappingURL=biome-database.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"biome-database.d.ts","sourceRoot":"","sources":["../../src/lib/biome-database.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"biome-database.d.ts","sourceRoot":"","sources":["../../src/lib/biome-database.ts"],"names":[],"mappings":"AA+BA,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAE3B,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IAEzB,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;CAC7B;AAQD,wBAAgB,uBAAuB,CACrC,KAAK,EAAE,qBAAqB,GAC3B,MAAM,GAAG,IAAI,CAWf;AAMD,wBAAgB,8BAA8B,CAC5C,GAAG,GAAE,MAAM,CAAC,UAAwB,GACnC,MAAM,GAAG,IAAI,CAUf;AAUD,eAAO,MAAM,yBAAyB,QAAQ,CAAC;AAgI/C,wBAAgB,uBAAuB,CAAC,gBAAgB,EAAE,MAAM,GAAG,MAAM,CAyCxE"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BIOME_DB_SESSION_TIMEZONE = void 0;
|
|
3
4
|
exports.composeBiomeDatabaseUrl = composeBiomeDatabaseUrl;
|
|
4
5
|
exports.composeBiomeDatabaseUrlFromEnv = composeBiomeDatabaseUrlFromEnv;
|
|
5
6
|
exports.ensureBiomeDbSearchPath = ensureBiomeDbSearchPath;
|
|
@@ -24,13 +25,64 @@ function composeBiomeDatabaseUrlFromEnv(env = process.env) {
|
|
|
24
25
|
sslParams: env.DB_SSL_PARAMS,
|
|
25
26
|
});
|
|
26
27
|
}
|
|
28
|
+
exports.BIOME_DB_SESSION_TIMEZONE = 'UTC';
|
|
29
|
+
function parseLibpqSettings(options) {
|
|
30
|
+
const settings = new Map();
|
|
31
|
+
const tokens = options.split(/(?<!\\)\s+/u).filter((t) => t.length > 0);
|
|
32
|
+
for (let i = 0; i < tokens.length; i += 1) {
|
|
33
|
+
const token = tokens[i];
|
|
34
|
+
let declaration;
|
|
35
|
+
if (token === '-c') {
|
|
36
|
+
declaration = tokens[i + 1];
|
|
37
|
+
i += 1;
|
|
38
|
+
}
|
|
39
|
+
else if (token.startsWith('-c') && token.length > 2) {
|
|
40
|
+
declaration = token.slice(2);
|
|
41
|
+
}
|
|
42
|
+
if (declaration === undefined) {
|
|
43
|
+
continue;
|
|
44
|
+
}
|
|
45
|
+
const equals = declaration.indexOf('=');
|
|
46
|
+
if (equals <= 0) {
|
|
47
|
+
continue;
|
|
48
|
+
}
|
|
49
|
+
settings.set(declaration.slice(0, equals).toLowerCase(), declaration.slice(equals + 1));
|
|
50
|
+
}
|
|
51
|
+
return settings;
|
|
52
|
+
}
|
|
53
|
+
function serializeWithEncodedOptionSeparators(url) {
|
|
54
|
+
return url
|
|
55
|
+
.toString()
|
|
56
|
+
.replace(/([?&]options=)([^&#]*)/u, (_match, prefix, value) => `${prefix}${value.replace(/\+/gu, '%20')}`);
|
|
57
|
+
}
|
|
27
58
|
function ensureBiomeDbSearchPath(connectionString) {
|
|
28
59
|
const url = new URL(connectionString);
|
|
29
60
|
const schema = url.searchParams.get('schema');
|
|
30
|
-
|
|
61
|
+
const existingOptions = url.searchParams.get('options') ?? '';
|
|
62
|
+
const declared = parseLibpqSettings(existingOptions);
|
|
63
|
+
const declaredTimezone = declared.get('timezone');
|
|
64
|
+
if (declaredTimezone !== undefined &&
|
|
65
|
+
declaredTimezone.toUpperCase() !== exports.BIOME_DB_SESSION_TIMEZONE) {
|
|
66
|
+
throw new Error(`Biome database connection declares options "-c timezone=${declaredTimezone}", ` +
|
|
67
|
+
`but a biome database session must run in ${exports.BIOME_DB_SESSION_TIMEZONE}: ` +
|
|
68
|
+
`@prisma/adapter-pg puts no offset on the wire, so under any other zone ` +
|
|
69
|
+
`Prisma and Postgres disagree about every instant by that offset. Remove ` +
|
|
70
|
+
`the timezone option from the connection string.`);
|
|
71
|
+
}
|
|
72
|
+
const additions = [];
|
|
73
|
+
if (!declared.has('search_path') &&
|
|
74
|
+
schema !== null &&
|
|
75
|
+
schema !== '' &&
|
|
76
|
+
schema !== 'public') {
|
|
77
|
+
additions.push(`-c search_path=${schema},public`);
|
|
78
|
+
}
|
|
79
|
+
if (declaredTimezone === undefined) {
|
|
80
|
+
additions.push(`-c timezone=${exports.BIOME_DB_SESSION_TIMEZONE}`);
|
|
81
|
+
}
|
|
82
|
+
if (additions.length === 0) {
|
|
31
83
|
return connectionString;
|
|
32
84
|
}
|
|
33
|
-
url.searchParams.set('options',
|
|
34
|
-
return url
|
|
85
|
+
url.searchParams.set('options', [existingOptions, ...additions].filter((part) => part.length > 0).join(' '));
|
|
86
|
+
return serializeWithEncodedOptionSeparators(url);
|
|
35
87
|
}
|
|
36
88
|
//# sourceMappingURL=biome-database.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"biome-database.js","sourceRoot":"","sources":["../../src/lib/biome-database.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"biome-database.js","sourceRoot":"","sources":["../../src/lib/biome-database.ts"],"names":[],"mappings":";;;AAiDA,0DAaC;AAMD,wEAYC;AA0ID,0DAyCC;AAlND,SAAgB,uBAAuB,CACrC,KAA4B;IAE5B,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,GAAG,KAAK,CAAC;IAC1E,IAAI,CAAC,IAAI,IAAI,CAAC,QAAQ,IAAI,CAAC,IAAI,IAAI,CAAC,IAAI,IAAI,CAAC,QAAQ,EAAE,CAAC;QACtD,OAAO,IAAI,CAAC;IACd,CAAC;IACD,MAAM,IAAI,GAAG,gBAAgB,IAAI,IAAI,kBAAkB,CACrD,QAAQ,CACT,IAAI,IAAI,IAAI,IAAI,IAAI,QAAQ,EAAE,CAAC;IAChC,MAAM,UAAU,GAAG,MAAM,CAAC,CAAC,CAAC,UAAU,MAAM,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC;IACtD,MAAM,KAAK,GAAG,CAAC,UAAU,EAAE,SAAS,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAChE,OAAO,KAAK,CAAC,CAAC,CAAC,GAAG,IAAI,IAAI,KAAK,EAA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AiD,CACpD,CAAC;IACJ,CAAC;IAED,MAAM,SAAS,GAAa,EAAE,CAAC;IAC/B,IACE,CAAC,QAAQ,CAAC,GAAG,CAAC,aAAa,CAAC;QAC5B,MAAM,KAAK,IAAI;QACf,MAAM,KAAK,EAAE;QACb,MAAM,KAAK,QAAQ,EACnB,CAAC;QACD,SAAS,CAAC,IAAI,CAAC,kBAAkB,MAAM,SAAS,CAAC,CAAC;IACpD,CAAC;IACD,IAAI,gBAAgB,KAAK,SAAS,EAAE,CAAC;QACnC,SAAS,CAAC,IAAI,CAAC,eAAe,iCAAyB,EAAE,CAAC,CAAC;IAC7D,CAAC;IACD,IAAI,SAAS,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC3B,OAAO,gBAAgB,CAAC;IAC1B,CAAC;IAED,GAAG,CAAC,YAAY,CAAC,GAAG,CAClB,SAAS,EACT,CAAC,eAAe,EAAE,GAAG,SAAS,CAAC,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAC5E,CAAC;IACF,OAAO,oCAAoC,CAAC,GAAG,CAAC,CAAC;AACnD,CAAC"}
|
|
@@ -20,6 +20,7 @@ export declare enum SessionErrorCode {
|
|
|
20
20
|
LaunchBootstrapFailed = "bootstrap_failed",
|
|
21
21
|
LaunchBootstrapContractBroken = "bootstrap_contract_broken",
|
|
22
22
|
LaunchProvisionFailed = "provision_failed",
|
|
23
|
+
LaunchStepUnreachable = "step_unreachable",
|
|
23
24
|
LaunchUnclassifiedFailure = "launch_unclassified",
|
|
24
25
|
LaunchWorkspaceRestoreFailed = "workspace_restore_failed",
|
|
25
26
|
LaunchFinalizeFailed = "finalize_failed",
|
|
@@ -32,8 +33,8 @@ export declare enum SessionErrorCode {
|
|
|
32
33
|
}
|
|
33
34
|
export type SessionTurnErrorCode = SessionErrorCode.ThreadBusy | SessionErrorCode.TurnFailed | SessionErrorCode.ConsentResumeFailed | SessionErrorCode.ToolIterationLimit | SessionErrorCode.NoTerminalFrame | SessionErrorCode.WorkerTurnFailed;
|
|
34
35
|
export declare const SESSION_TURN_ERROR_CODES: readonly [SessionErrorCode.ThreadBusy, SessionErrorCode.TurnFailed, SessionErrorCode.ConsentResumeFailed, SessionErrorCode.ToolIterationLimit, SessionErrorCode.NoTerminalFrame, SessionErrorCode.WorkerTurnFailed];
|
|
35
|
-
export type SessionLaunchErrorCode = SessionErrorCode.LaunchConfigResolutionFailed | SessionErrorCode.LaunchSelectionInvalid | SessionErrorCode.LaunchWorkerAcquireTimeout | SessionErrorCode.LaunchWorkerAcquireRejected | SessionErrorCode.LaunchWorkerAllocationLost | SessionErrorCode.LaunchControlBundleFailed | SessionErrorCode.LaunchControlBundleRejected | SessionErrorCode.LaunchBootstrapFailed | SessionErrorCode.LaunchBootstrapContractBroken | SessionErrorCode.LaunchProvisionFailed | SessionErrorCode.LaunchUnclassifiedFailure | SessionErrorCode.LaunchWorkspaceRestoreFailed | SessionErrorCode.LaunchFinalizeFailed | SessionErrorCode.LaunchFinalizeReadinessFailed | SessionErrorCode.LaunchNoUsableProvider | SessionErrorCode.LaunchAgentUnavailable | SessionErrorCode.LaunchDeadlineExceeded | SessionErrorCode.LaunchIllegalTransition | SessionErrorCode.LaunchAbandoned;
|
|
36
|
-
export declare const SESSION_LAUNCH_ERROR_CODES: readonly [SessionErrorCode.LaunchConfigResolutionFailed, SessionErrorCode.LaunchSelectionInvalid, SessionErrorCode.LaunchWorkerAcquireTimeout, SessionErrorCode.LaunchWorkerAcquireRejected, SessionErrorCode.LaunchWorkerAllocationLost, SessionErrorCode.LaunchControlBundleFailed, SessionErrorCode.LaunchControlBundleRejected, SessionErrorCode.LaunchBootstrapFailed, SessionErrorCode.LaunchBootstrapContractBroken, SessionErrorCode.LaunchProvisionFailed, SessionErrorCode.LaunchUnclassifiedFailure, SessionErrorCode.LaunchWorkspaceRestoreFailed, SessionErrorCode.LaunchFinalizeFailed, SessionErrorCode.LaunchFinalizeReadinessFailed, SessionErrorCode.LaunchNoUsableProvider, SessionErrorCode.LaunchAgentUnavailable, SessionErrorCode.LaunchDeadlineExceeded, SessionErrorCode.LaunchIllegalTransition, SessionErrorCode.LaunchAbandoned];
|
|
36
|
+
export type SessionLaunchErrorCode = SessionErrorCode.LaunchConfigResolutionFailed | SessionErrorCode.LaunchSelectionInvalid | SessionErrorCode.LaunchWorkerAcquireTimeout | SessionErrorCode.LaunchWorkerAcquireRejected | SessionErrorCode.LaunchWorkerAllocationLost | SessionErrorCode.LaunchControlBundleFailed | SessionErrorCode.LaunchControlBundleRejected | SessionErrorCode.LaunchBootstrapFailed | SessionErrorCode.LaunchBootstrapContractBroken | SessionErrorCode.LaunchProvisionFailed | SessionErrorCode.LaunchStepUnreachable | SessionErrorCode.LaunchUnclassifiedFailure | SessionErrorCode.LaunchWorkspaceRestoreFailed | SessionErrorCode.LaunchFinalizeFailed | SessionErrorCode.LaunchFinalizeReadinessFailed | SessionErrorCode.LaunchNoUsableProvider | SessionErrorCode.LaunchAgentUnavailable | SessionErrorCode.LaunchDeadlineExceeded | SessionErrorCode.LaunchIllegalTransition | SessionErrorCode.LaunchAbandoned;
|
|
37
|
+
export declare const SESSION_LAUNCH_ERROR_CODES: readonly [SessionErrorCode.LaunchConfigResolutionFailed, SessionErrorCode.LaunchSelectionInvalid, SessionErrorCode.LaunchWorkerAcquireTimeout, SessionErrorCode.LaunchWorkerAcquireRejected, SessionErrorCode.LaunchWorkerAllocationLost, SessionErrorCode.LaunchControlBundleFailed, SessionErrorCode.LaunchControlBundleRejected, SessionErrorCode.LaunchBootstrapFailed, SessionErrorCode.LaunchBootstrapContractBroken, SessionErrorCode.LaunchProvisionFailed, SessionErrorCode.LaunchStepUnreachable, SessionErrorCode.LaunchUnclassifiedFailure, SessionErrorCode.LaunchWorkspaceRestoreFailed, SessionErrorCode.LaunchFinalizeFailed, SessionErrorCode.LaunchFinalizeReadinessFailed, SessionErrorCode.LaunchNoUsableProvider, SessionErrorCode.LaunchAgentUnavailable, SessionErrorCode.LaunchDeadlineExceeded, SessionErrorCode.LaunchIllegalTransition, SessionErrorCode.LaunchAbandoned];
|
|
37
38
|
export declare const SESSION_LAUNCH_FAILURE_CODES: Readonly<Record<string, SessionLaunchErrorCode>>;
|
|
38
39
|
export declare function mapLaunchFailureToSessionErrorCode(launchFailureKind: string): SessionLaunchErrorCode;
|
|
39
40
|
//# sourceMappingURL=error-codes.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"error-codes.d.ts","sourceRoot":"","sources":["../../../src/lib/session-event-payloads/error-codes.ts"],"names":[],"mappings":"AA4BA,oBAAY,iBAAiB;IAC3B,IAAI,SAAS;IACb,MAAM,WAAW;IACjB,YAAY,iBAAiB;CAC9B;AA6BD,oBAAY,gBAAgB;IAM1B,UAAU,uBAAuB;IAMjC,UAAU,uBAAuB;IAUjC,mBAAmB,yBAAyB;IAO5C,kBAAkB,gCAAgC;IAKlD,eAAe,6BAA6B;IAU5C,gBAAgB,+BAA+B;IAkB/C,4BAA4B,6BAA6B;IAOzD,sBAAsB,6BAA6B;IAEnD,0BAA0B,2BAA2B;IAErD,2BAA2B,4BAA4B;IAWvD,0BAA0B,2BAA2B;IAQrD,yBAAyB,0BAA0B;IAenD,2BAA2B,4BAA4B;IAEvD,qBAAqB,qBAAqB;IAa1C,6BAA6B,8BAA8B;IAkB3D,qBAAqB,qBAAqB;
|
|
1
|
+
{"version":3,"file":"error-codes.d.ts","sourceRoot":"","sources":["../../../src/lib/session-event-payloads/error-codes.ts"],"names":[],"mappings":"AA4BA,oBAAY,iBAAiB;IAC3B,IAAI,SAAS;IACb,MAAM,WAAW;IACjB,YAAY,iBAAiB;CAC9B;AA6BD,oBAAY,gBAAgB;IAM1B,UAAU,uBAAuB;IAMjC,UAAU,uBAAuB;IAUjC,mBAAmB,yBAAyB;IAO5C,kBAAkB,gCAAgC;IAKlD,eAAe,6BAA6B;IAU5C,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AgB,CAAC,sBAAsB,GACvC,gBAAgB,CAAC,sBAAsB,GACvC,gBAAgB,CAAC,sBAAsB,GACvC,gBAAgB,CAAC,uBAAuB,GACxC,gBAAgB,CAAC,eAAe,CAAC;AAGrC,eAAO,MAAM,0BAA0B,s2BAqBe,CAAC;AAiBvD,eAAO,MAAM,4BAA4B,EAAE,QAAQ,CACjD,MAAM,CAAC,MAAM,EAAE,sBAAsB,CAAC,CAKvC,CAAC;AAuBF,wBAAgB,kCAAkC,CAChD,iBAAiB,EAAE,MAAM,GACxB,sBAAsB,CAWxB"}
|
|
@@ -26,6 +26,7 @@ var SessionErrorCode;
|
|
|
26
26
|
SessionErrorCode["LaunchBootstrapFailed"] = "bootstrap_failed";
|
|
27
27
|
SessionErrorCode["LaunchBootstrapContractBroken"] = "bootstrap_contract_broken";
|
|
28
28
|
SessionErrorCode["LaunchProvisionFailed"] = "provision_failed";
|
|
29
|
+
SessionErrorCode["LaunchStepUnreachable"] = "step_unreachable";
|
|
29
30
|
SessionErrorCode["LaunchUnclassifiedFailure"] = "launch_unclassified";
|
|
30
31
|
SessionErrorCode["LaunchWorkspaceRestoreFailed"] = "workspace_restore_failed";
|
|
31
32
|
SessionErrorCode["LaunchFinalizeFailed"] = "finalize_failed";
|
|
@@ -55,6 +56,7 @@ exports.SESSION_LAUNCH_ERROR_CODES = [
|
|
|
55
56
|
SessionErrorCode.LaunchBootstrapFailed,
|
|
56
57
|
SessionErrorCode.LaunchBootstrapContractBroken,
|
|
57
58
|
SessionErrorCode.LaunchProvisionFailed,
|
|
59
|
+
SessionErrorCode.LaunchStepUnreachable,
|
|
58
60
|
SessionErrorCode.LaunchUnclassifiedFailure,
|
|
59
61
|
SessionErrorCode.LaunchWorkspaceRestoreFailed,
|
|
60
62
|
SessionErrorCode.LaunchFinalizeFailed,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"error-codes.js","sourceRoot":"","sources":["../../../src/lib/session-event-payloads/error-codes.ts"],"names":[],"mapp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,gBAAgB,CAAC,0BAA0B;IAC3C,gBAAgB,CAAC,2BAA2B;IAC5C,gBAAgB,CAAC,0BAA0B;IAC3C,gBAAgB,CAAC,yBAAyB;IAC1C,gBAAgB,CAAC,2BAA2B;IAC5C,gBAAgB,CAAC,qBAAqB;IACtC,gBAAgB,CAAC,6BAA6B;IAC9C,gBAAgB,CAAC,qBAAqB;IACtC,gBAAgB,CAAC,qBAAqB;IACtC,gBAAgB,CAAC,yBAAyB;IAC1C,gBAAgB,CAAC,4BAA4B;IAC7C,gBAAgB,CAAC,oBAAoB;IACrC,gBAAgB,CAAC,6BAA6B;IAC9C,gBAAgB,CAAC,sBAAsB;IACvC,gBAAgB,CAAC,sBAAsB;IACvC,gBAAgB,CAAC,sBAAsB;IACvC,gBAAgB,CAAC,uBAAuB;IACxC,gBAAgB,CAAC,eAAe;CACoB,CAAC;AAiB1C,QAAA,4BAA4B,GAErC,MAAM,CAAC,MAAM,CACf,MAAM,CAAC,WAAW,CAChB,kCAA0B,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,IAAc,EAAE,IAAI,CAAC,CAAC,CACvB,CAC5C,CAAC;AAuBF,SAAgB,kCAAkC,CAChD,iBAAyB;IAEzB,MAAM,IAAI,GAAG,oCAA4B,CAAC,iBAAiB,CAAC,CAAC;IAC7D,IAAI,IAAI,KAAK,SAAS,EAAE,CAAC;QACvB,MAAM,IAAI,SAAS,CACjB,wBAAwB,iBAAiB,6BAA6B;YACpE,qEAAqE;YACrE,iDAAiD;YACjD,6BAA6B,CAChC,CAAC;IACJ,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC"}
|
|
@@ -63,12 +63,12 @@ export declare const SESSION_EVENT_PAYLOAD_SCHEMAS: {
|
|
|
63
63
|
detail: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
64
64
|
}, z.core.$strict>, z.ZodObject<{
|
|
65
65
|
phase: z.ZodLiteral<SessionErrorPhase.Resume>;
|
|
66
|
-
code: z.ZodLiteral<import("./error-codes").SessionErrorCode.LaunchConfigResolutionFailed | import("./error-codes").SessionErrorCode.LaunchSelectionInvalid | import("./error-codes").SessionErrorCode.LaunchWorkerAcquireTimeout | import("./error-codes").SessionErrorCode.LaunchWorkerAcquireRejected | import("./error-codes").SessionErrorCode.LaunchWorkerAllocationLost | import("./error-codes").SessionErrorCode.LaunchControlBundleFailed | import("./error-codes").SessionErrorCode.LaunchControlBundleRejected | import("./error-codes").SessionErrorCode.LaunchBootstrapFailed | import("./error-codes").SessionErrorCode.LaunchBootstrapContractBroken | import("./error-codes").SessionErrorCode.LaunchProvisionFailed | import("./error-codes").SessionErrorCode.LaunchUnclassifiedFailure | import("./error-codes").SessionErrorCode.LaunchWorkspaceRestoreFailed | import("./error-codes").SessionErrorCode.LaunchFinalizeFailed | import("./error-codes").SessionErrorCode.LaunchFinalizeReadinessFailed | import("./error-codes").SessionErrorCode.LaunchNoUsableProvider | import("./error-codes").SessionErrorCode.LaunchAgentUnavailable | import("./error-codes").SessionErrorCode.LaunchDeadlineExceeded | import("./error-codes").SessionErrorCode.LaunchIllegalTransition | import("./error-codes").SessionErrorCode.LaunchAbandoned>;
|
|
66
|
+
code: z.ZodLiteral<import("./error-codes").SessionErrorCode.LaunchConfigResolutionFailed | import("./error-codes").SessionErrorCode.LaunchSelectionInvalid | import("./error-codes").SessionErrorCode.LaunchWorkerAcquireTimeout | import("./error-codes").SessionErrorCode.LaunchWorkerAcquireRejected | import("./error-codes").SessionErrorCode.LaunchWorkerAllocationLost | import("./error-codes").SessionErrorCode.LaunchControlBundleFailed | import("./error-codes").SessionErrorCode.LaunchControlBundleRejected | import("./error-codes").SessionErrorCode.LaunchBootstrapFailed | import("./error-codes").SessionErrorCode.LaunchBootstrapContractBroken | import("./error-codes").SessionErrorCode.LaunchProvisionFailed | import("./error-codes").SessionErrorCode.LaunchStepUnreachable | import("./error-codes").SessionErrorCode.LaunchUnclassifiedFailure | import("./error-codes").SessionErrorCode.LaunchWorkspaceRestoreFailed | import("./error-codes").SessionErrorCode.LaunchFinalizeFailed | import("./error-codes").SessionErrorCode.LaunchFinalizeReadinessFailed | import("./error-codes").SessionErrorCode.LaunchNoUsableProvider | import("./error-codes").SessionErrorCode.LaunchAgentUnavailable | import("./error-codes").SessionErrorCode.LaunchDeadlineExceeded | import("./error-codes").SessionErrorCode.LaunchIllegalTransition | import("./error-codes").SessionErrorCode.LaunchAbandoned>;
|
|
67
67
|
message: z.ZodString;
|
|
68
68
|
agentSlug: z.ZodOptional<z.ZodString>;
|
|
69
69
|
}, z.core.$strict>, z.ZodObject<{
|
|
70
70
|
phase: z.ZodLiteral<SessionErrorPhase.Provisioning>;
|
|
71
|
-
code: z.ZodLiteral<import("./error-codes").SessionErrorCode.LaunchConfigResolutionFailed | import("./error-codes").SessionErrorCode.LaunchSelectionInvalid | import("./error-codes").SessionErrorCode.LaunchWorkerAcquireTimeout | import("./error-codes").SessionErrorCode.LaunchWorkerAcquireRejected | import("./error-codes").SessionErrorCode.LaunchWorkerAllocationLost | import("./error-codes").SessionErrorCode.LaunchControlBundleFailed | import("./error-codes").SessionErrorCode.LaunchControlBundleRejected | import("./error-codes").SessionErrorCode.LaunchBootstrapFailed | import("./error-codes").SessionErrorCode.LaunchBootstrapContractBroken | import("./error-codes").SessionErrorCode.LaunchProvisionFailed | import("./error-codes").SessionErrorCode.LaunchUnclassifiedFailure | import("./error-codes").SessionErrorCode.LaunchWorkspaceRestoreFailed | import("./error-codes").SessionErrorCode.LaunchFinalizeFailed | import("./error-codes").SessionErrorCode.LaunchFinalizeReadinessFailed | import("./error-codes").SessionErrorCode.LaunchNoUsableProvider | import("./error-codes").SessionErrorCode.LaunchAgentUnavailable | import("./error-codes").SessionErrorCode.LaunchDeadlineExceeded | import("./error-codes").SessionErrorCode.LaunchIllegalTransition | import("./error-codes").SessionErrorCode.LaunchAbandoned>;
|
|
71
|
+
code: z.ZodLiteral<import("./error-codes").SessionErrorCode.LaunchConfigResolutionFailed | import("./error-codes").SessionErrorCode.LaunchSelectionInvalid | import("./error-codes").SessionErrorCode.LaunchWorkerAcquireTimeout | import("./error-codes").SessionErrorCode.LaunchWorkerAcquireRejected | import("./error-codes").SessionErrorCode.LaunchWorkerAllocationLost | import("./error-codes").SessionErrorCode.LaunchControlBundleFailed | import("./error-codes").SessionErrorCode.LaunchControlBundleRejected | import("./error-codes").SessionErrorCode.LaunchBootstrapFailed | import("./error-codes").SessionErrorCode.LaunchBootstrapContractBroken | import("./error-codes").SessionErrorCode.LaunchProvisionFailed | import("./error-codes").SessionErrorCode.LaunchStepUnreachable | import("./error-codes").SessionErrorCode.LaunchUnclassifiedFailure | import("./error-codes").SessionErrorCode.LaunchWorkspaceRestoreFailed | import("./error-codes").SessionErrorCode.LaunchFinalizeFailed | import("./error-codes").SessionErrorCode.LaunchFinalizeReadinessFailed | import("./error-codes").SessionErrorCode.LaunchNoUsableProvider | import("./error-codes").SessionErrorCode.LaunchAgentUnavailable | import("./error-codes").SessionErrorCode.LaunchDeadlineExceeded | import("./error-codes").SessionErrorCode.LaunchIllegalTransition | import("./error-codes").SessionErrorCode.LaunchAbandoned>;
|
|
72
72
|
message: z.ZodString;
|
|
73
73
|
}, z.core.$strict>], "phase">;
|
|
74
74
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xemahq/platform-common",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.1",
|
|
4
4
|
"description": "Shared NestJS building blocks for Xema services — auth guards, response redaction, CORS configuration, and crypto helpers.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "Neuralchowder Inc. <developer@xema.dev> (https://xema.dev)",
|
|
@@ -38,19 +38,18 @@
|
|
|
38
38
|
}
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"cloudevents": "^8.0.2",
|
|
42
41
|
"jwks-rsa": "^3.2.2",
|
|
43
42
|
"undici": "^7.22.0",
|
|
44
43
|
"zod": "^4.3.6",
|
|
45
44
|
"@xemahq/oidc-guard": "0.3.1"
|
|
46
45
|
},
|
|
47
46
|
"devDependencies": {
|
|
48
|
-
"@nestjs/common": "11.1.
|
|
49
|
-
"@nestjs/config": "4.0.
|
|
50
|
-
"@nestjs/core": "11.1.
|
|
51
|
-
"@nestjs/platform-express": "11.1.
|
|
47
|
+
"@nestjs/common": "11.1.18",
|
|
48
|
+
"@nestjs/config": "4.0.4",
|
|
49
|
+
"@nestjs/core": "11.1.18",
|
|
50
|
+
"@nestjs/platform-express": "11.1.28",
|
|
52
51
|
"@nestjs/swagger": "11.2.6",
|
|
53
|
-
"@nestjs/testing": "11.1.
|
|
52
|
+
"@nestjs/testing": "11.1.18",
|
|
54
53
|
"@types/express": "5.0.3",
|
|
55
54
|
"@types/jest": "^30.0.0",
|
|
56
55
|
"@types/node": "25.2.3",
|
|
@@ -63,7 +62,7 @@
|
|
|
63
62
|
"rxjs": "7.8.2",
|
|
64
63
|
"ts-jest": "^29.4.9",
|
|
65
64
|
"typescript": "5.9.3",
|
|
66
|
-
"@xemahq/kernel-contracts": "^
|
|
65
|
+
"@xemahq/kernel-contracts": "^11.0.0"
|
|
67
66
|
},
|
|
68
67
|
"exports": {
|
|
69
68
|
".": {
|