@kb-labs/infra-worker-core 2.104.0 → 2.105.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.
Files changed (2) hide show
  1. package/dist/manifest.v3.json +172 -0
  2. package/package.json +21 -21
@@ -0,0 +1,172 @@
1
+ {
2
+ "schema": "kb.plugin/3",
3
+ "id": "@kb-labs/infra-worker",
4
+ "version": "0.1.0",
5
+ "display": {
6
+ "name": "Infra Worker",
7
+ "description": "Provision infra capabilities for orchestrators",
8
+ "tags": [
9
+ "infra",
10
+ "workspace",
11
+ "environment",
12
+ "snapshot"
13
+ ]
14
+ },
15
+ "permissions": {
16
+ "platform": {
17
+ "environment": {
18
+ "create": true,
19
+ "read": true,
20
+ "destroy": true,
21
+ "renewLease": true,
22
+ "templates": [
23
+ "*"
24
+ ]
25
+ },
26
+ "workspace": {
27
+ "materialize": true,
28
+ "attach": true,
29
+ "release": true,
30
+ "read": true,
31
+ "sources": [
32
+ "*"
33
+ ],
34
+ "paths": [
35
+ "*"
36
+ ]
37
+ },
38
+ "snapshot": {
39
+ "capture": true,
40
+ "restore": true,
41
+ "delete": true,
42
+ "read": true,
43
+ "garbageCollect": true,
44
+ "namespaces": [
45
+ "*"
46
+ ]
47
+ }
48
+ }
49
+ },
50
+ "cli": {
51
+ "groupMeta": [
52
+ {
53
+ "path": "infra",
54
+ "describe": "Infrastructure provisioning commands"
55
+ },
56
+ {
57
+ "path": "infra snapshot",
58
+ "describe": "Workspace and environment snapshot management"
59
+ }
60
+ ],
61
+ "commands": [
62
+ {
63
+ "path": "infra prepare",
64
+ "operationType": "execute",
65
+ "describe": "Materialize workspace, optional environment, and optional snapshot.",
66
+ "handler": "./cli/commands/prepare-infra.js#default",
67
+ "flags": [
68
+ {
69
+ "name": "sourceRef",
70
+ "type": "string",
71
+ "description": "Workspace source reference (repo/branch/etc)"
72
+ },
73
+ {
74
+ "name": "basePath",
75
+ "type": "string",
76
+ "description": "Workspace base path"
77
+ },
78
+ {
79
+ "name": "createEnvironment",
80
+ "type": "boolean",
81
+ "default": false,
82
+ "description": "Provision environment after workspace materialize"
83
+ },
84
+ {
85
+ "name": "templateId",
86
+ "type": "string",
87
+ "description": "Environment template ID"
88
+ },
89
+ {
90
+ "name": "ttlMs",
91
+ "type": "number",
92
+ "description": "Environment lease TTL in milliseconds"
93
+ },
94
+ {
95
+ "name": "captureSnapshot",
96
+ "type": "boolean",
97
+ "default": false,
98
+ "description": "Capture snapshot after prepare"
99
+ },
100
+ {
101
+ "name": "namespace",
102
+ "type": "string",
103
+ "description": "Snapshot namespace"
104
+ }
105
+ ]
106
+ },
107
+ {
108
+ "path": "infra snapshot capture",
109
+ "operationType": "execute",
110
+ "describe": "Capture snapshot for workspace/environment.",
111
+ "handler": "./cli/commands/capture-snapshot.js#default",
112
+ "flags": [
113
+ {
114
+ "name": "workspaceId",
115
+ "type": "string",
116
+ "description": "Workspace ID"
117
+ },
118
+ {
119
+ "name": "environmentId",
120
+ "type": "string",
121
+ "description": "Environment ID"
122
+ },
123
+ {
124
+ "name": "namespace",
125
+ "type": "string",
126
+ "description": "Snapshot namespace"
127
+ },
128
+ {
129
+ "name": "sourcePath",
130
+ "type": "string",
131
+ "description": "Source path for snapshot"
132
+ }
133
+ ]
134
+ },
135
+ {
136
+ "path": "infra snapshot restore",
137
+ "operationType": "execute",
138
+ "describe": "Restore snapshot to workspace/environment target.",
139
+ "handler": "./cli/commands/restore-snapshot.js#default",
140
+ "flags": [
141
+ {
142
+ "name": "snapshotId",
143
+ "type": "string",
144
+ "description": "Snapshot ID to restore",
145
+ "required": true
146
+ },
147
+ {
148
+ "name": "workspaceId",
149
+ "type": "string",
150
+ "description": "Workspace ID target"
151
+ },
152
+ {
153
+ "name": "environmentId",
154
+ "type": "string",
155
+ "description": "Environment ID target"
156
+ },
157
+ {
158
+ "name": "targetPath",
159
+ "type": "string",
160
+ "description": "Restore target path"
161
+ },
162
+ {
163
+ "name": "overwrite",
164
+ "type": "boolean",
165
+ "default": false,
166
+ "description": "Overwrite existing files"
167
+ }
168
+ ]
169
+ }
170
+ ]
171
+ }
172
+ }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@kb-labs/infra-worker-core",
3
3
  "description": "Infra worker plugin core for workspace/environment/snapshot lifecycle operations.",
4
- "version": "2.104.0",
4
+ "version": "2.105.0",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
7
7
  "types": "./dist/index.d.ts",
@@ -22,23 +22,34 @@
22
22
  "README.md",
23
23
  "LICENSE"
24
24
  ],
25
+ "scripts": {
26
+ "build": "tsup --config tsup.config.ts",
27
+ "clean": "rimraf dist",
28
+ "dev": "tsup --config tsup.config.ts --watch",
29
+ "lint": "eslint src --ext .ts,.tsx",
30
+ "lint:fix": "eslint . --fix",
31
+ "pretype-check": "pnpm --filter @kb-labs/infra-worker-core build",
32
+ "test": "vitest run --passWithNoTests",
33
+ "test:watch": "vitest",
34
+ "type-check": "tsc --noEmit"
35
+ },
25
36
  "dependencies": {
37
+ "@kb-labs/infra-worker-contracts": "^2.105.0",
38
+ "@kb-labs/plugin-contracts": "^2.105.0",
39
+ "@kb-labs/sdk": "workspace:*",
26
40
  "react": "^19.0.0",
27
- "zod": "^3.25.76",
28
- "@kb-labs/plugin-contracts": "2.104.0",
29
- "@kb-labs/sdk": "2.22.0",
30
- "@kb-labs/infra-worker-contracts": "2.104.0"
41
+ "zod": "^3.25.76"
31
42
  },
32
43
  "devDependencies": {
44
+ "@kb-labs/devkit": "workspace:*",
45
+ "@kb-labs/plugin-runtime": "workspace:*",
33
46
  "@types/node": "^24.3.3",
34
47
  "@types/react": "^19.0.0",
35
48
  "@types/react-dom": "^19.0.0",
36
49
  "rimraf": "^6.0.1",
37
50
  "tsup": "^8.5.0",
38
51
  "typescript": "^5.6.3",
39
- "vitest": "^3.2.6",
40
- "@kb-labs/devkit": "2.104.0",
41
- "@kb-labs/plugin-runtime": "2.104.0"
52
+ "vitest": "^3.2.6"
42
53
  },
43
54
  "engines": {
44
55
  "node": ">=20.0.0",
@@ -47,16 +58,5 @@
47
58
  "kb": {
48
59
  "manifest": "./dist/manifest.v3.js"
49
60
  },
50
- "sideEffects": false,
51
- "scripts": {
52
- "build": "tsup --config tsup.config.ts",
53
- "clean": "rimraf dist",
54
- "dev": "tsup --config tsup.config.ts --watch",
55
- "lint": "eslint src --ext .ts,.tsx",
56
- "lint:fix": "eslint . --fix",
57
- "pretype-check": "pnpm --filter @kb-labs/infra-worker-core build",
58
- "test": "vitest run --passWithNoTests",
59
- "test:watch": "vitest",
60
- "type-check": "tsc --noEmit"
61
- }
62
- }
61
+ "sideEffects": false
62
+ }