@bakers-build/core 0.11.1-next.3 → 0.11.1-next.5
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.
|
@@ -12,6 +12,21 @@ export interface MachineAgentPolicy {
|
|
|
12
12
|
enabled?: string[];
|
|
13
13
|
disabled?: string[];
|
|
14
14
|
routes?: AgentRoutes;
|
|
15
|
+
/** `(aliases, ticket) => alias`; replaces the default agent order. */
|
|
16
|
+
select?: (candidates: string[], ticket: unknown) => string;
|
|
17
|
+
}
|
|
18
|
+
/** Where runs start: runtime entries chosen per ticket. */
|
|
19
|
+
export interface MachineRuntimePolicy {
|
|
20
|
+
catalog?: {
|
|
21
|
+
alias: string;
|
|
22
|
+
use: string;
|
|
23
|
+
with?: unknown;
|
|
24
|
+
}[];
|
|
25
|
+
routes?: AgentRoutes;
|
|
26
|
+
/** `(aliases, ticket) => alias`; replaces the default runtime order. */
|
|
27
|
+
select?: (candidates: string[], ticket: unknown) => string;
|
|
28
|
+
/** Lets a label choose a runtime that does not isolate. */
|
|
29
|
+
allow_unsandboxed?: boolean;
|
|
15
30
|
}
|
|
16
31
|
/** Local host identity, display label and shared capacity. */
|
|
17
32
|
export interface MachineContext {
|
|
@@ -22,6 +37,8 @@ export interface MachineContext {
|
|
|
22
37
|
connection_url?: string | null;
|
|
23
38
|
/** Optional selection policy for the agents the machine `addons[]` contribute. */
|
|
24
39
|
agents?: MachineAgentPolicy;
|
|
40
|
+
/** Runtime catalog, routes and selection; absent keeps the addon runtime. */
|
|
41
|
+
runtime?: MachineRuntimePolicy;
|
|
25
42
|
/**
|
|
26
43
|
* This host's addons, the same entry shape as a project conductor config's
|
|
27
44
|
* `addons[]`. Each addon declares whether it may be listed here (its preset
|
|
@@ -100,6 +100,11 @@ export interface ProjectConfig {
|
|
|
100
100
|
/** Function choosing the agent for a ticket; replaces the shipped selection. */
|
|
101
101
|
select_agent?: (...args: never[]) => unknown;
|
|
102
102
|
runtime?: {
|
|
103
|
+
/** Machine runtime aliases this project may use; absent allows all. */
|
|
104
|
+
enabled?: Array<string>;
|
|
105
|
+
/** Runtime alias for tickets no label or machine route places. */
|
|
106
|
+
default?: string;
|
|
107
|
+
/** Under an isolating runtime: worktree-relative paths the run sees read-only and may not change in a commit. Host commands must start in one of them. .bakers is always protected. */
|
|
103
108
|
read_only?: Array<string>;
|
|
104
109
|
};
|
|
105
110
|
}
|
|
@@ -130,6 +135,28 @@ export interface MachineConfig {
|
|
|
130
135
|
[key: string]: string;
|
|
131
136
|
};
|
|
132
137
|
};
|
|
138
|
+
/** Function (aliases, ticket) => alias replacing the default agent order. */
|
|
139
|
+
select?: (...args: never[]) => unknown;
|
|
140
|
+
};
|
|
141
|
+
/** Where agent runs start, chosen per ticket. Absent: the addon runtime, else the host (system). */
|
|
142
|
+
runtime?: {
|
|
143
|
+
/** Runtime entries; the alias system is the host and always present. */
|
|
144
|
+
catalog?: Array<{
|
|
145
|
+
alias: string;
|
|
146
|
+
use: string;
|
|
147
|
+
/** The runtime addon's options. */
|
|
148
|
+
with?: unknown;
|
|
149
|
+
}>;
|
|
150
|
+
/** Named routes from states (or *) to aliases; routes.default is the automatic one. */
|
|
151
|
+
routes?: {
|
|
152
|
+
[key: string]: {
|
|
153
|
+
[key: string]: string;
|
|
154
|
+
};
|
|
155
|
+
};
|
|
156
|
+
/** Function (aliases, ticket) => alias replacing the default runtime order. */
|
|
157
|
+
select?: (...args: never[]) => unknown;
|
|
158
|
+
/** Let a runtime:<alias> label choose a runtime that does not isolate. Default false. */
|
|
159
|
+
allow_unsandboxed?: boolean;
|
|
133
160
|
};
|
|
134
161
|
/** Addons this machine uses. */
|
|
135
162
|
addons?: Array<string | {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bakers-build/core",
|
|
3
|
-
"version": "0.11.1-next.
|
|
3
|
+
"version": "0.11.1-next.5",
|
|
4
4
|
"description": "bakers.build surface-agnostic kernel: host contract, split-config helpers, addon preset/discovery machinery, shared primitives.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"yaml": "^2.7.0"
|
|
41
41
|
},
|
|
42
42
|
"bakersBuild": {
|
|
43
|
-
"commit": "
|
|
43
|
+
"commit": "d7535c4db571b4de2a9929185070384a00907595",
|
|
44
44
|
"channel": "next"
|
|
45
45
|
}
|
|
46
46
|
}
|
|
@@ -42,15 +42,45 @@
|
|
|
42
42
|
"enabled": { "$ref": "#/$defs/alias_list" },
|
|
43
43
|
"disabled": { "$ref": "#/$defs/alias_list" },
|
|
44
44
|
"routes": {
|
|
45
|
-
"
|
|
46
|
-
"description": "Named routes from states (or *) to aliases; routes.default is the automatic one."
|
|
47
|
-
|
|
45
|
+
"$ref": "#/$defs/routes",
|
|
46
|
+
"description": "Named routes from states (or *) to aliases; routes.default is the automatic one."
|
|
47
|
+
},
|
|
48
|
+
"select": {
|
|
49
|
+
"function": true,
|
|
50
|
+
"description": "Function (aliases, ticket) => alias replacing the default agent order."
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
"additionalProperties": false
|
|
54
|
+
},
|
|
55
|
+
"runtime": {
|
|
56
|
+
"type": "object",
|
|
57
|
+
"description": "Where agent runs start, chosen per ticket. Absent: the addon runtime, else the host (system).",
|
|
58
|
+
"properties": {
|
|
59
|
+
"catalog": {
|
|
60
|
+
"type": "array",
|
|
61
|
+
"description": "Runtime entries; the alias system is the host and always present.",
|
|
62
|
+
"items": {
|
|
48
63
|
"type": "object",
|
|
49
|
-
"
|
|
50
|
-
|
|
51
|
-
"$ref": "project.schema.json#/$defs/nonempty"
|
|
52
|
-
|
|
64
|
+
"properties": {
|
|
65
|
+
"alias": { "$ref": "project.schema.json#/$defs/nonempty" },
|
|
66
|
+
"use": { "$ref": "project.schema.json#/$defs/nonempty" },
|
|
67
|
+
"with": { "description": "The runtime addon's options." }
|
|
68
|
+
},
|
|
69
|
+
"required": ["alias", "use"],
|
|
70
|
+
"additionalProperties": false
|
|
53
71
|
}
|
|
72
|
+
},
|
|
73
|
+
"routes": {
|
|
74
|
+
"$ref": "#/$defs/routes",
|
|
75
|
+
"description": "Named routes from states (or *) to aliases; routes.default is the automatic one."
|
|
76
|
+
},
|
|
77
|
+
"select": {
|
|
78
|
+
"function": true,
|
|
79
|
+
"description": "Function (aliases, ticket) => alias replacing the default runtime order."
|
|
80
|
+
},
|
|
81
|
+
"allow_unsandboxed": {
|
|
82
|
+
"type": "boolean",
|
|
83
|
+
"description": "Let a runtime:<alias> label choose a runtime that does not isolate. Default false."
|
|
54
84
|
}
|
|
55
85
|
},
|
|
56
86
|
"additionalProperties": false
|
|
@@ -73,6 +103,16 @@
|
|
|
73
103
|
"required": ["machine_id", "label"],
|
|
74
104
|
"additionalProperties": false,
|
|
75
105
|
"$defs": {
|
|
106
|
+
"routes": {
|
|
107
|
+
"type": "object",
|
|
108
|
+
"additionalProperties": {
|
|
109
|
+
"type": "object",
|
|
110
|
+
"minProperties": 1,
|
|
111
|
+
"additionalProperties": {
|
|
112
|
+
"$ref": "project.schema.json#/$defs/nonempty"
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
},
|
|
76
116
|
"alias_list": {
|
|
77
117
|
"type": "array",
|
|
78
118
|
"items": { "$ref": "project.schema.json#/$defs/nonempty" }
|
|
@@ -295,8 +295,20 @@
|
|
|
295
295
|
"runtime": {
|
|
296
296
|
"type": "object",
|
|
297
297
|
"properties": {
|
|
298
|
+
"enabled": {
|
|
299
|
+
"type": "array",
|
|
300
|
+
"description": "Machine runtime aliases this project may use; absent allows all.",
|
|
301
|
+
"items": {
|
|
302
|
+
"$ref": "#/$defs/nonempty"
|
|
303
|
+
}
|
|
304
|
+
},
|
|
305
|
+
"default": {
|
|
306
|
+
"$ref": "#/$defs/nonempty",
|
|
307
|
+
"description": "Runtime alias for tickets no label or machine route places."
|
|
308
|
+
},
|
|
298
309
|
"read_only": {
|
|
299
310
|
"type": "array",
|
|
311
|
+
"description": "Under an isolating runtime: worktree-relative paths the run sees read-only and may not change in a commit. Host commands must start in one of them. .bakers is always protected.",
|
|
300
312
|
"items": {
|
|
301
313
|
"type": "string",
|
|
302
314
|
"pattern": "^(?:(?!/)(?!.*(?:^|/)\\.{1,2}(?:/|$))(?!.*//)(?!.*?/$)[^\\\\:\\u0000$]+)$"
|
|
@@ -304,7 +316,7 @@
|
|
|
304
316
|
}
|
|
305
317
|
},
|
|
306
318
|
"additionalProperties": false,
|
|
307
|
-
"description": "
|
|
319
|
+
"description": "The project's runtime restrictions and protected paths."
|
|
308
320
|
}
|
|
309
321
|
}
|
|
310
322
|
}
|