@highstate/backend 0.9.21 → 0.9.23
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/{chunk-JNUJ4LTX.js → chunk-5LYHHLFW.js} +6 -9
- package/dist/chunk-5LYHHLFW.js.map +1 -0
- package/dist/index.js +42 -52
- package/dist/index.js.map +1 -1
- package/dist/library/package-resolution-worker.js +1 -1
- package/dist/library/package-resolution-worker.js.map +1 -1
- package/dist/shared/index.js +1 -1
- package/package.json +3 -3
- package/prisma/backend/postgresql/main.prisma +1 -1
- package/prisma/backend/sqlite/main.prisma +2 -2
- package/prisma/project/instance.prisma +5 -5
- package/prisma/project/main.prisma +2 -2
- package/prisma/project/migrations/20250921092621_b/migration.sql +33 -0
- package/prisma/project/migrations/20250921093911_b/migration.sql +1 -0
- package/prisma/project/operation.prisma +3 -0
- package/src/business/instance-state.ts +0 -3
- package/src/database/_generated/project/client.ts +89 -0
- package/src/database/_generated/project/internal/class.ts +3 -3
- package/src/database/_generated/project/internal/prismaNamespace.ts +3 -4
- package/src/database/_generated/project/models/ApiKey.ts +4 -0
- package/src/database/_generated/project/models/InstanceEvaluationState.ts +9 -0
- package/src/database/_generated/project/models/InstanceState.ts +175 -266
- package/src/database/_generated/project/models/Page.ts +8 -1
- package/src/database/_generated/project/models/Secret.ts +11 -0
- package/src/database/_generated/project/models/ServiceAccount.ts +5 -0
- package/src/database/_generated/project/models/Terminal.ts +10 -1
- package/src/database/_generated/project/models/TerminalSession.ts +2 -0
- package/src/database/_generated/project/models/TerminalSessionLog.ts +2 -0
- package/src/database/_generated/project/models/Trigger.ts +6 -1
- package/src/database/_generated/project/models/UnlockMethod.ts +12 -0
- package/src/database/_generated/project/models/Worker.ts +10 -1
- package/src/database/_generated/project/models/WorkerUnitRegistration.ts +8 -1
- package/src/database/_generated/project/models/WorkerVersion.ts +8 -0
- package/src/database/_generated/project/models/WorkerVersionLog.ts +3 -0
- package/src/library/local.ts +1 -5
- package/src/library/package-resolution-worker.ts +1 -1
- package/src/orchestrator/manager.ts +1 -2
- package/src/orchestrator/operation-context.ts +11 -10
- package/src/orchestrator/operation.ts +16 -6
- package/src/orchestrator/plan-test-builder.ts +0 -1
- package/src/project-model/backends/codebase.ts +1 -1
- package/src/project-model/backends/database.ts +1 -1
- package/src/runner/abstractions.ts +0 -5
- package/src/runner/local.ts +7 -21
- package/src/runner/pulumi.ts +0 -11
- package/src/shared/models/project/operation.ts +7 -5
- package/src/shared/models/project/terminal.ts +2 -1
- package/src/shared/resolvers/state.ts +1 -5
- package/dist/chunk-JNUJ4LTX.js.map +0 -1
|
@@ -21,7 +21,7 @@ for (const packageName of packageNames) {
|
|
|
21
21
|
});
|
|
22
22
|
} catch (error) {
|
|
23
23
|
logger.error({ error }, `failed to resolve package "%s"`, packageName);
|
|
24
|
-
if (error instanceof Error && error.message.includes(
|
|
24
|
+
if (error instanceof Error && error.message.includes(`Cannot find package '${packageName}'`)) {
|
|
25
25
|
results.push({
|
|
26
26
|
type: "not-found",
|
|
27
27
|
packageName
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/library/package-resolution-worker.ts"],"names":[],"mappings":";;;;;;;AA8BA,IAAM,EAAE,YAAA,EAAc,QAAA,EAAS,GAAI,UAAA;AAEnC,IAAM,MAAA,GAAS,KAAK,EAAE,IAAA,EAAM,4BAA4B,KAAA,EAAO,QAAA,IAAY,UAAU,CAAA;AAErF,IAAM,UAA2B,EAAC;AAElC,KAAA,MAAW,eAAe,YAAA,EAAc;AACtC,EAAA,IAAI;AACF,IAAA,MAAM,IAAA,GAAO,eAAA,CAAgB,WAAA,EAAa,MAAA,CAAA,IAAA,CAAY,GAAG,CAAA;AACzD,IAAA,IAAI,CAAC,IAAA,EAAM;AACT,MAAA,MAAM,IAAI,KAAA,CAAM,CAAA,SAAA,EAAY,WAAW,CAAA,WAAA,CAAa,CAAA;AAAA,IACtD;AAEA,IAAA,OAAA,CAAQ,IAAA,CAAK;AAAA,MACX,IAAA,EAAM,SAAA;AAAA,MACN,WAAA;AAAA,MACA,eAAA,EAAiB,MAAM,QAAA,CAAS,OAAA,CAAQ,IAAI,CAAC;AAAA,KAC9C,CAAA;AAAA,EACH,SAAS,KAAA,EAAO;AACd,IAAA,MAAA,CAAO,KAAA,CAAM,EAAE,KAAA,EAAM,EAAG,kCAAkC,WAAW,CAAA;AAErE,IAAA,IAAI,
|
|
1
|
+
{"version":3,"sources":["../../src/library/package-resolution-worker.ts"],"names":[],"mappings":";;;;;;;AA8BA,IAAM,EAAE,YAAA,EAAc,QAAA,EAAS,GAAI,UAAA;AAEnC,IAAM,MAAA,GAAS,KAAK,EAAE,IAAA,EAAM,4BAA4B,KAAA,EAAO,QAAA,IAAY,UAAU,CAAA;AAErF,IAAM,UAA2B,EAAC;AAElC,KAAA,MAAW,eAAe,YAAA,EAAc;AACtC,EAAA,IAAI;AACF,IAAA,MAAM,IAAA,GAAO,eAAA,CAAgB,WAAA,EAAa,MAAA,CAAA,IAAA,CAAY,GAAG,CAAA;AACzD,IAAA,IAAI,CAAC,IAAA,EAAM;AACT,MAAA,MAAM,IAAI,KAAA,CAAM,CAAA,SAAA,EAAY,WAAW,CAAA,WAAA,CAAa,CAAA;AAAA,IACtD;AAEA,IAAA,OAAA,CAAQ,IAAA,CAAK;AAAA,MACX,IAAA,EAAM,SAAA;AAAA,MACN,WAAA;AAAA,MACA,eAAA,EAAiB,MAAM,QAAA,CAAS,OAAA,CAAQ,IAAI,CAAC;AAAA,KAC9C,CAAA;AAAA,EACH,SAAS,KAAA,EAAO;AACd,IAAA,MAAA,CAAO,KAAA,CAAM,EAAE,KAAA,EAAM,EAAG,kCAAkC,WAAW,CAAA;AAErE,IAAA,IAAI,KAAA,YAAiB,SAAS,KAAA,CAAM,OAAA,CAAQ,SAAS,CAAA,qBAAA,EAAwB,WAAW,GAAG,CAAA,EAAG;AAC5F,MAAA,OAAA,CAAQ,IAAA,CAAK;AAAA,QACX,IAAA,EAAM,WAAA;AAAA,QACN;AAAA,OACD,CAAA;AAAA,IACH,CAAA,MAAO;AACL,MAAA,OAAA,CAAQ,IAAA,CAAK;AAAA,QACX,IAAA,EAAM,OAAA;AAAA,QACN,WAAA;AAAA,QACA,OAAO,KAAA,YAAiB,KAAA,GAAQ,KAAA,CAAM,OAAA,GAAU,OAAO,KAAK;AAAA,OAC7D,CAAA;AAAA,IACH;AAAA,EACF;AACF;AAEA,UAAA,EAAY,WAAA,CAAY;AAAA,EACtB,IAAA,EAAM,QAAA;AAAA,EACN;AACF,CAAC,CAAA","file":"package-resolution-worker.js","sourcesContent":["import { realpath } from \"node:fs/promises\"\nimport { findPackageJSON } from \"node:module\"\nimport { dirname } from \"node:path\"\nimport { parentPort, workerData } from \"node:worker_threads\"\nimport pino, { type Level } from \"pino\"\n\nexport type PackageResolutionWorkerData = {\n packageNames: string[]\n logLevel?: Level\n}\n\nexport type PackageResult = { packageName: string } & (\n | {\n type: \"success\"\n packageRootPath: string\n }\n | {\n type: \"not-found\"\n }\n | {\n type: \"error\"\n error: string\n }\n)\n\nexport type PackageResolutionResponse = {\n type: \"result\"\n results: PackageResult[]\n}\n\nconst { packageNames, logLevel } = workerData as PackageResolutionWorkerData\n\nconst logger = pino({ name: \"source-resolution-worker\", level: logLevel ?? \"silent\" })\n\nconst results: PackageResult[] = []\n\nfor (const packageName of packageNames) {\n try {\n const path = findPackageJSON(packageName, import.meta.url)\n if (!path) {\n throw new Error(`Package \"${packageName}\" not found`)\n }\n\n results.push({\n type: \"success\",\n packageName,\n packageRootPath: await realpath(dirname(path)),\n })\n } catch (error) {\n logger.error({ error }, `failed to resolve package \"%s\"`, packageName)\n\n if (error instanceof Error && error.message.includes(`Cannot find package '${packageName}'`)) {\n results.push({\n type: \"not-found\",\n packageName,\n })\n } else {\n results.push({\n type: \"error\",\n packageName,\n error: error instanceof Error ? error.message : String(error),\n })\n }\n }\n}\n\nparentPort?.postMessage({\n type: \"result\",\n results,\n})\n"]}
|
package/dist/shared/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { AccessError, BackendError, CannotDeleteLastUnlockMethodError, GraphResolver, InputHashResolver, InputResolver, InstanceLockLostError, InstanceLockedError, InstanceNotFoundError, InstanceStateNotFoundError, InvalidInstanceKindError, MAX_WORKER_START_ATTEMPTS, OperationNotFoundError, ProjectLockedError, ProjectNotFoundError, PromiseTracker, SystemSecretNames, ValidationResolver, WorkerVersionNotFoundError, apiKeyMetaSchema, apiKeyOutputSchema, apiKeyQuerySchema, applyLibraryUpdate, artifactOutputSchema, artifactQuerySchema, backendUnlockMethodSchema, codebaseLibrary, codebaseProjectModelStorage, collectionQueryResult, collectionQuerySchema, createAsyncBatcher, databaseProjectModelStorage, diffLibraries, extractDigestFromImage, finalInstanceOperationStatuses, finalOperationStatuses, forSchema, getAllDependents, getMatchedInjectionInstanceInputs, getResolvedHubInputs, getResolvedInjectionInstanceInputs, getResolvedInstanceInputs, getResolvedInstanceOutputs, getWorkerIdentity, globalProjectSpace, hasObjectMeta, hostPulumiBackend, instanceCustomStatusInputSchema, instanceLockEventSchema, instanceLockOutputSchema, instanceStateEventSchema, int32ToBytes, isFinalOperationStatus, isInstanceDeployed, isTransientInstanceOperationStatus, isTransientOperationStatus, isVirtualGhostInstance, librarySpecSchema, operationEventSchema, operationInputSchema, operationMetaSchema, operationOptionsSchema, operationOutputSchema, operationPhaseInstanceSchema, operationPhaseSchema, operationPhaseTypeSchema, operationStatusSchema, operationTypeSchema, pageDetailsOutputSchema, pageOutputSchema, pageQuerySchema, projectInputSchema, projectModelEventSchema, projectModelStorageSpecSchema, projectOutputSchema, projectUnlockStateSchema, projectUnlockSuiteSchema, pulumiBackendSpecSchema, resolverFactories, secretOutputSchema, secretQuerySchema, serviceAccountOutputSchema, serviceAccountQuerySchema, terminalDetailsOutputSchema, terminalOutputSchema, terminalQuerySchema, terminalSessionOutputSchema, terminalStatusSchema, toApiKeyOutput, toPageOutput, toSecretOutput, toTerminalDetailsOutput, toTerminalOutput, toTerminalSessionOutput, toWorkerOutput, toWorkerVersionOutput, triggerOutputSchema, triggerQuerySchema, unlockMethodInputSchema, unlockMethodMetaSchema, unlockMethodOutputSchema, unlockMethodType, waitAll, workerOutputSchema, workerQuerySchema, workerUnitRegistrationEventSchema, workerVersionOutputSchema, workerVersionStatusSchema } from '../chunk-
|
|
1
|
+
export { AccessError, BackendError, CannotDeleteLastUnlockMethodError, GraphResolver, InputHashResolver, InputResolver, InstanceLockLostError, InstanceLockedError, InstanceNotFoundError, InstanceStateNotFoundError, InvalidInstanceKindError, MAX_WORKER_START_ATTEMPTS, OperationNotFoundError, ProjectLockedError, ProjectNotFoundError, PromiseTracker, SystemSecretNames, ValidationResolver, WorkerVersionNotFoundError, apiKeyMetaSchema, apiKeyOutputSchema, apiKeyQuerySchema, applyLibraryUpdate, artifactOutputSchema, artifactQuerySchema, backendUnlockMethodSchema, codebaseLibrary, codebaseProjectModelStorage, collectionQueryResult, collectionQuerySchema, createAsyncBatcher, databaseProjectModelStorage, diffLibraries, extractDigestFromImage, finalInstanceOperationStatuses, finalOperationStatuses, forSchema, getAllDependents, getMatchedInjectionInstanceInputs, getResolvedHubInputs, getResolvedInjectionInstanceInputs, getResolvedInstanceInputs, getResolvedInstanceOutputs, getWorkerIdentity, globalProjectSpace, hasObjectMeta, hostPulumiBackend, instanceCustomStatusInputSchema, instanceLockEventSchema, instanceLockOutputSchema, instanceStateEventSchema, int32ToBytes, isFinalOperationStatus, isInstanceDeployed, isTransientInstanceOperationStatus, isTransientOperationStatus, isVirtualGhostInstance, librarySpecSchema, operationEventSchema, operationInputSchema, operationMetaSchema, operationOptionsSchema, operationOutputSchema, operationPhaseInstanceSchema, operationPhaseSchema, operationPhaseTypeSchema, operationStatusSchema, operationTypeSchema, pageDetailsOutputSchema, pageOutputSchema, pageQuerySchema, projectInputSchema, projectModelEventSchema, projectModelStorageSpecSchema, projectOutputSchema, projectUnlockStateSchema, projectUnlockSuiteSchema, pulumiBackendSpecSchema, resolverFactories, secretOutputSchema, secretQuerySchema, serviceAccountOutputSchema, serviceAccountQuerySchema, terminalDetailsOutputSchema, terminalOutputSchema, terminalQuerySchema, terminalSessionOutputSchema, terminalStatusSchema, toApiKeyOutput, toPageOutput, toSecretOutput, toTerminalDetailsOutput, toTerminalOutput, toTerminalSessionOutput, toWorkerOutput, toWorkerVersionOutput, triggerOutputSchema, triggerQuerySchema, unlockMethodInputSchema, unlockMethodMetaSchema, unlockMethodOutputSchema, unlockMethodType, waitAll, workerOutputSchema, workerQuerySchema, workerUnitRegistrationEventSchema, workerVersionOutputSchema, workerVersionStatusSchema } from '../chunk-5LYHHLFW.js';
|
|
2
2
|
import '../chunk-I7BWSAN6.js';
|
|
3
3
|
//# sourceMappingURL=index.js.map
|
|
4
4
|
//# sourceMappingURL=index.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@highstate/backend",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.23",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"highstate": {
|
|
6
6
|
"sourceHash": {
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
43
|
"@aws-crypto/crc32": "^5.2.0",
|
|
44
|
-
"@highstate/contract": "^0.9.
|
|
44
|
+
"@highstate/contract": "^0.9.23",
|
|
45
45
|
"@msgpack/msgpack": "^3.1.2",
|
|
46
46
|
"@napi-rs/keyring": "^1.1.8",
|
|
47
47
|
"@noble/ciphers": "^1.3.0",
|
|
@@ -98,5 +98,5 @@
|
|
|
98
98
|
"type-fest": "^4.41.0",
|
|
99
99
|
"vitest": "^3.2.4"
|
|
100
100
|
},
|
|
101
|
-
"gitHead": "
|
|
101
|
+
"gitHead": "389be30a2144dfb1499b02e8a1e71074c26a3f9f"
|
|
102
102
|
}
|
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
enum InstanceStatus {
|
|
2
2
|
/// The instance is exists in the model (resident or virtual), but not yet deployed or was completely destroyed.
|
|
3
3
|
///
|
|
4
|
-
/// "
|
|
4
|
+
/// "attempted", "deployed" and "failed" instances can be transitioned back to "undeployed" after
|
|
5
5
|
/// successful "destroy" operation.
|
|
6
6
|
undeployed
|
|
7
7
|
|
|
8
|
-
/// The instance is
|
|
8
|
+
/// The instance is attempted, but not yet fully deployed.
|
|
9
9
|
///
|
|
10
10
|
/// Normally, this status is very short-lived, and here to indicate that the instance
|
|
11
11
|
/// cannot be safely deleted from the the model until it will be completely destroyed.
|
|
12
|
-
|
|
12
|
+
attempted
|
|
13
13
|
|
|
14
14
|
/// The initial deployment of the instance was successful.
|
|
15
15
|
///
|
|
16
16
|
/// The transition of "deployed -> failed" is not possible, so consequent failed operations
|
|
17
17
|
/// will not affect this status.
|
|
18
18
|
///
|
|
19
|
-
/// Like "
|
|
19
|
+
/// Like "attempted", that instance cannot be safely deleted from the model until it will be completely destroyed.
|
|
20
20
|
deployed
|
|
21
21
|
|
|
22
22
|
/// The initial deployment of the instance failed.
|
|
23
23
|
/// It can still be transitioned to "deployed" by a successful operation
|
|
24
24
|
///
|
|
25
|
-
/// Like "
|
|
25
|
+
/// Like "attempted", that instance cannot be safely deleted from the model until it will be completely destroyed.
|
|
26
26
|
failed
|
|
27
27
|
}
|
|
28
28
|
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Warnings:
|
|
3
|
+
|
|
4
|
+
- You are about to drop the column `message` on the `InstanceState` table. All the data in the column will be lost.
|
|
5
|
+
|
|
6
|
+
*/
|
|
7
|
+
-- RedefineTables
|
|
8
|
+
PRAGMA defer_foreign_keys=ON;
|
|
9
|
+
PRAGMA foreign_keys=OFF;
|
|
10
|
+
CREATE TABLE "new_InstanceState" (
|
|
11
|
+
"id" TEXT NOT NULL PRIMARY KEY,
|
|
12
|
+
"instanceId" TEXT NOT NULL,
|
|
13
|
+
"status" TEXT NOT NULL,
|
|
14
|
+
"source" TEXT NOT NULL,
|
|
15
|
+
"kind" TEXT NOT NULL,
|
|
16
|
+
"parentId" TEXT,
|
|
17
|
+
"inputHashNonce" INTEGER,
|
|
18
|
+
"inputHash" INTEGER,
|
|
19
|
+
"outputHash" INTEGER,
|
|
20
|
+
"dependencyOutputHash" INTEGER,
|
|
21
|
+
"exportedArtifactIds" JSONB,
|
|
22
|
+
"model" JSONB,
|
|
23
|
+
"resolvedInputs" JSONB,
|
|
24
|
+
"currentResourceCount" INTEGER,
|
|
25
|
+
"statusFields" JSONB,
|
|
26
|
+
CONSTRAINT "InstanceState_parentId_fkey" FOREIGN KEY ("parentId") REFERENCES "InstanceState" ("id") ON DELETE SET NULL ON UPDATE CASCADE
|
|
27
|
+
);
|
|
28
|
+
INSERT INTO "new_InstanceState" ("currentResourceCount", "dependencyOutputHash", "exportedArtifactIds", "id", "inputHash", "inputHashNonce", "instanceId", "kind", "model", "outputHash", "parentId", "resolvedInputs", "source", "status", "statusFields") SELECT "currentResourceCount", "dependencyOutputHash", "exportedArtifactIds", "id", "inputHash", "inputHashNonce", "instanceId", "kind", "model", "outputHash", "parentId", "resolvedInputs", "source", "status", "statusFields" FROM "InstanceState";
|
|
29
|
+
DROP TABLE "InstanceState";
|
|
30
|
+
ALTER TABLE "new_InstanceState" RENAME TO "InstanceState";
|
|
31
|
+
CREATE UNIQUE INDEX "InstanceState_instanceId_key" ON "InstanceState"("instanceId");
|
|
32
|
+
PRAGMA foreign_keys=ON;
|
|
33
|
+
PRAGMA defer_foreign_keys=OFF;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
-- This is an empty migration.
|
|
@@ -136,6 +136,9 @@ model OperationLog {
|
|
|
136
136
|
/// Can be `null` if the log is not associated with any instance.
|
|
137
137
|
stateId String?
|
|
138
138
|
|
|
139
|
+
/// Whether this log is a system/runtime message (vs unit output).
|
|
140
|
+
isSystem Boolean @default(false)
|
|
141
|
+
|
|
139
142
|
/// The content of the log.
|
|
140
143
|
content String
|
|
141
144
|
|
|
@@ -92,7 +92,6 @@ export type ForgetInstanceStateOptions = {
|
|
|
92
92
|
export type InstanceStatePatch = Pick<
|
|
93
93
|
Partial<InstanceState>,
|
|
94
94
|
| "status"
|
|
95
|
-
| "message"
|
|
96
95
|
| "statusFields"
|
|
97
96
|
| "parentId"
|
|
98
97
|
| "lastOperationState"
|
|
@@ -308,7 +307,6 @@ export class InstanceStateService {
|
|
|
308
307
|
inputHash: null,
|
|
309
308
|
outputHash: null,
|
|
310
309
|
dependencyOutputHash: null,
|
|
311
|
-
message: null,
|
|
312
310
|
currentResourceCount: null,
|
|
313
311
|
model: null,
|
|
314
312
|
resolvedInputs: null,
|
|
@@ -370,7 +368,6 @@ export class InstanceStateService {
|
|
|
370
368
|
inputHash: null,
|
|
371
369
|
outputHash: null,
|
|
372
370
|
dependencyOutputHash: null,
|
|
373
|
-
message: null,
|
|
374
371
|
currentResourceCount: null,
|
|
375
372
|
model: DbNull,
|
|
376
373
|
resolvedInputs: DbNull,
|
|
@@ -40,7 +40,11 @@ export { Prisma }
|
|
|
40
40
|
|
|
41
41
|
/**
|
|
42
42
|
* Model ApiKey
|
|
43
|
+
* The API key provides authentication tokens for accessing the platform API.
|
|
43
44
|
*
|
|
45
|
+
* Each API key impersonates a service account, inheriting its permissions and access scope.
|
|
46
|
+
* Keys are automatically created for worker versions and can be manually created for
|
|
47
|
+
* external integrations. The token is a 32-byte random hex string that can be regenerated.
|
|
44
48
|
*/
|
|
45
49
|
export type ApiKey = Prisma.ApiKeyModel
|
|
46
50
|
/**
|
|
@@ -63,7 +67,16 @@ export type Artifact = Prisma.ArtifactModel
|
|
|
63
67
|
export type InstanceCustomStatus = Prisma.InstanceCustomStatusModel
|
|
64
68
|
/**
|
|
65
69
|
* Model InstanceEvaluationState
|
|
70
|
+
* The evaluation state tracks the result of evaluating composite instances to produce virtual instances.
|
|
66
71
|
*
|
|
72
|
+
* Composite instances are template components that generate other instances (virtual instances) when evaluated.
|
|
73
|
+
* The evaluation process executes the composite's create function with resolved inputs to produce a tree
|
|
74
|
+
* of child instances. These virtual instances exist in the source "virtual" state and can be units
|
|
75
|
+
* (mapping to Pulumi resources) or other composites (producing more virtual instances recursively).
|
|
76
|
+
*
|
|
77
|
+
* Evaluation happens automatically after project unlock and library reloads to keep virtual instances
|
|
78
|
+
* synchronized with their composite definitions. Evaluation state persists the produced instance model
|
|
79
|
+
* and tracks success/error status with descriptive messages showing the instance tree or error details.
|
|
67
80
|
*/
|
|
68
81
|
export type InstanceEvaluationState = Prisma.InstanceEvaluationStateModel
|
|
69
82
|
/**
|
|
@@ -117,62 +130,138 @@ export type InstanceOperationState = Prisma.InstanceOperationStateModel
|
|
|
117
130
|
export type OperationLog = Prisma.OperationLogModel
|
|
118
131
|
/**
|
|
119
132
|
* Model Page
|
|
133
|
+
* The page provides custom UI content for instances and service accounts.
|
|
120
134
|
*
|
|
135
|
+
* Pages can be created by units to display instance-specific information or by service accounts.
|
|
136
|
+
* The content consists of blocks that support markdown text, QR codes with optional content display,
|
|
137
|
+
* and file attachments (inline or artifact references). Instance pages are explicitly deleted
|
|
138
|
+
* when instances are destroyed.
|
|
121
139
|
*/
|
|
122
140
|
export type Page = Prisma.PageModel
|
|
123
141
|
/**
|
|
124
142
|
* Model Secret
|
|
143
|
+
* The secret stores sensitive configuration values for instances, service accounts, and system components.
|
|
144
|
+
*
|
|
145
|
+
* Secrets can be instance-owned (for unit configuration), service account-owned, or system-level
|
|
146
|
+
* (like Pulumi passwords).
|
|
147
|
+
*
|
|
148
|
+
* Secrets persist through normal destroy (recreate) operations
|
|
149
|
+
* and are only deleted when explicitly forgetting instance state with the deleteSecrets flag or when manually deleted.
|
|
125
150
|
*
|
|
151
|
+
* Secret updates invalidate instance input hashes via inputHashNonce, triggering re-execution
|
|
152
|
+
* during operations. But the content of the secrets itself do not contribute to the input hash.
|
|
153
|
+
*
|
|
154
|
+
* System secrets like Pulumi passwords are created on-demand and persist for the whole project lifetime.
|
|
126
155
|
*/
|
|
127
156
|
export type Secret = Prisma.SecretModel
|
|
128
157
|
/**
|
|
129
158
|
* Model ServiceAccount
|
|
159
|
+
* The service account represents an identity for non-human actors in the system.
|
|
130
160
|
*
|
|
161
|
+
* Service accounts are automatically created for workers and can be manually created
|
|
162
|
+
* for external integrations. They define the access scope for resources like artifacts,
|
|
163
|
+
* secrets, terminals, and pages. Multiple API keys can impersonate the same service account,
|
|
164
|
+
* allowing different authentication tokens to share the same permissions.
|
|
131
165
|
*/
|
|
132
166
|
export type ServiceAccount = Prisma.ServiceAccountModel
|
|
133
167
|
/**
|
|
134
168
|
* Model Terminal
|
|
169
|
+
* The terminal provides interactive shell access to infrastructure resources.
|
|
170
|
+
*
|
|
171
|
+
* Terminals can be created by units (owned by instances) or by service accounts.
|
|
172
|
+
* Each terminal maintains a specification for creating containers that power the terminal,
|
|
173
|
+
* including image, command, environment, and mounted files.
|
|
135
174
|
*
|
|
175
|
+
* Instance-owned terminals are marked unavailable when the instance is destroyed, preserving session history.
|
|
176
|
+
* Service account terminals persist independently.
|
|
136
177
|
*/
|
|
137
178
|
export type Terminal = Prisma.TerminalModel
|
|
138
179
|
/**
|
|
139
180
|
* Model TerminalSession
|
|
181
|
+
* The terminal session represents a single interactive connection to a terminal.
|
|
140
182
|
*
|
|
183
|
+
* Each session tracks when it started and finished. All session output is preserved in logs.
|
|
141
184
|
*/
|
|
142
185
|
export type TerminalSession = Prisma.TerminalSessionModel
|
|
143
186
|
/**
|
|
144
187
|
* Model TerminalSessionLog
|
|
188
|
+
* The terminal session log captures all input and output from a terminal session.
|
|
145
189
|
*
|
|
190
|
+
* Logs are stored with ULID identifiers for timestamp ordering.
|
|
146
191
|
*/
|
|
147
192
|
export type TerminalSessionLog = Prisma.TerminalSessionLogModel
|
|
148
193
|
/**
|
|
149
194
|
* Model Trigger
|
|
195
|
+
* The trigger defines automated actions that execute in response to specific events.
|
|
150
196
|
*
|
|
197
|
+
* Triggers are created by units to perform actions at defined points in the instance lifecycle
|
|
198
|
+
* or on schedule. The spec field determines the trigger type and behavior - currently supporting
|
|
199
|
+
* before-destroy triggers, with planned support for additional types like cron scheduling.
|
|
200
|
+
* Triggers are deleted along with their instance.
|
|
151
201
|
*/
|
|
152
202
|
export type Trigger = Prisma.TriggerModel
|
|
153
203
|
/**
|
|
154
204
|
* Model UnlockMethod
|
|
205
|
+
* The unlock method enables decryption of project databases through user authentication.
|
|
155
206
|
*
|
|
207
|
+
* Each project database is encrypted with a master key, which is then encrypted for each
|
|
208
|
+
* unlock method's recipient using AGE encryption. Users authenticate (password or passkey)
|
|
209
|
+
* to decrypt their specific AGE identity, which then decrypts the master key.
|
|
210
|
+
*
|
|
211
|
+
* Multiple unlock methods can exist per project, allowing different authentication paths
|
|
212
|
+
* to the same encrypted database. When unlock methods are added/removed, the master key
|
|
213
|
+
* is re-encrypted for the new set of recipients.
|
|
214
|
+
*
|
|
215
|
+
* The encryptedIdentity contains the AGE identity encrypted with the user's authentication
|
|
216
|
+
* method (password-derived key or WebAuthn), while the recipient is the public key
|
|
217
|
+
* corresponding to that identity.
|
|
156
218
|
*/
|
|
157
219
|
export type UnlockMethod = Prisma.UnlockMethodModel
|
|
158
220
|
/**
|
|
159
221
|
* Model Worker
|
|
222
|
+
* The worker represents a containerized application that extends unit capabilities beyond Pulumi execution.
|
|
223
|
+
*
|
|
224
|
+
* Workers enable units to perform runtime operations after Pulumi program completion,
|
|
225
|
+
* such as attaching custom statuses, monitoring resources, or triggering unit reconfigurations.
|
|
226
|
+
* Since Pulumi programs cannot affect instances after execution, workers bypass this limitation
|
|
227
|
+
* by providing persistent runtime behavior.
|
|
160
228
|
*
|
|
229
|
+
* The worker identity (fully qualified image name) indicates the same publisher/party and services as natural authentication mechanism.
|
|
230
|
+
* All versions of a worker share the same service account, meaning they operate over
|
|
231
|
+
* the same resources and have the same access scope within the platform.
|
|
161
232
|
*/
|
|
162
233
|
export type Worker = Prisma.WorkerModel
|
|
163
234
|
/**
|
|
164
235
|
* Model WorkerVersion
|
|
236
|
+
* The worker version represents a specific container image digest of a worker.
|
|
165
237
|
*
|
|
238
|
+
* Each version corresponds to an immutable container image identified by its SHA256 digest.
|
|
239
|
+
* Versions are automatically created when units reference new image digests and deleted
|
|
240
|
+
* when no longer referenced by any unit registrations.
|
|
241
|
+
*
|
|
242
|
+
* Each version has its own API key for isolation, but all versions of a worker
|
|
243
|
+
* share the same service account and thus the same access scope within the platform.
|
|
244
|
+
* The runtime starts containers when registrations exist and stops them when removed.
|
|
166
245
|
*/
|
|
167
246
|
export type WorkerVersion = Prisma.WorkerVersionModel
|
|
168
247
|
/**
|
|
169
248
|
* Model WorkerUnitRegistration
|
|
249
|
+
* The worker unit registration tracks which unit instances require specific worker versions.
|
|
250
|
+
*
|
|
251
|
+
* Units declare worker dependencies through their outputs, creating registrations that
|
|
252
|
+
* trigger the runtime to start corresponding worker containers. Each registration
|
|
253
|
+
* includes parameters passed to the worker for unit-specific configuration.
|
|
170
254
|
*
|
|
255
|
+
* Registrations are managed during operation execution - created when units declare workers
|
|
256
|
+
* and removed when units are destroyed. Worker versions without registrations are garbage collected.
|
|
171
257
|
*/
|
|
172
258
|
export type WorkerUnitRegistration = Prisma.WorkerUnitRegistrationModel
|
|
173
259
|
/**
|
|
174
260
|
* Model WorkerVersionLog
|
|
261
|
+
* The worker version log captures output from running worker containers.
|
|
175
262
|
*
|
|
263
|
+
* Logs include both worker-generated output and system messages from the runtime.
|
|
264
|
+
* The ULID identifier provides timestamp ordering. Logs are deleted with the worker version.
|
|
176
265
|
*/
|
|
177
266
|
export type WorkerVersionLog = Prisma.WorkerVersionLogModel
|
|
178
267
|
|