@h-rig/contracts 0.0.6-alpha.156 → 0.0.6-alpha.158
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/index.cjs +2340 -6832
- package/dist/index.mjs +2116 -6608
- package/dist/src/agent-roles.d.ts +8 -0
- package/dist/src/browser.d.ts +34 -4
- package/dist/src/browser.js +8 -1
- package/dist/src/capability-id.d.ts +22 -0
- package/dist/src/capability-id.js +8 -0
- package/dist/src/cli-output.d.ts +24 -0
- package/dist/src/cli-runner.d.ts +43 -0
- package/dist/src/cli-runner.js +13 -0
- package/dist/src/collab-session-viewer.d.ts +36 -0
- package/dist/src/collab-session-viewer.js +13 -0
- package/dist/src/config.d.ts +11 -0
- package/dist/src/config.js +279 -1098
- package/dist/src/control-plane-types.d.ts +41 -1
- package/dist/src/control-plane-types.js +9 -25
- package/dist/src/dependency-preflight.d.ts +43 -0
- package/dist/src/dependency-preflight.js +13 -0
- package/dist/src/doctor.d.ts +67 -4
- package/dist/src/doctor.js +8 -9
- package/dist/src/errors.d.ts +13 -0
- package/dist/src/errors.js +17 -0
- package/dist/src/github.d.ts +43 -0
- package/dist/src/github.js +12 -1
- package/dist/src/graph.d.ts +37 -0
- package/dist/src/graph.js +13 -0
- package/dist/src/guard.d.ts +111 -0
- package/dist/src/guard.js +6 -0
- package/dist/src/harness-events.d.ts +8 -0
- package/dist/src/harness-events.js +1 -0
- package/dist/src/help-catalog.d.ts +17 -10
- package/dist/src/help-catalog.js +9 -651
- package/dist/src/host.d.ts +41 -0
- package/dist/src/host.js +13 -0
- package/dist/src/identity.d.ts +44 -0
- package/dist/src/identity.js +1 -0
- package/dist/src/index.d.ts +27 -7
- package/dist/src/index.js +2116 -6608
- package/dist/src/isolation.d.ts +207 -15
- package/dist/src/isolation.js +8 -1
- package/dist/src/kernel.d.ts +11 -0
- package/dist/src/kernel.js +7 -0
- package/dist/src/layout.d.ts +49 -0
- package/dist/src/layout.js +10 -0
- package/dist/src/lifecycle-capabilities.d.ts +99 -0
- package/dist/src/lifecycle-capabilities.js +18 -1
- package/dist/src/managed-repos.d.ts +79 -16
- package/dist/src/managed-repos.js +12 -1
- package/dist/src/memory.d.ts +52 -4
- package/dist/src/memory.js +8 -1
- package/dist/src/notify.d.ts +46 -0
- package/dist/src/notify.js +13 -0
- package/dist/src/orchestration.d.ts +0 -3652
- package/dist/src/orchestration.js +28 -964
- package/dist/src/plugin-hooks.js +22 -3
- package/dist/src/plugin.d.ts +47 -0
- package/dist/src/plugin.js +24 -3
- package/dist/src/prompt.d.ts +29 -0
- package/dist/src/prompt.js +13 -0
- package/dist/src/provider-instructions.d.ts +26 -4
- package/dist/src/provider-instructions.js +8 -1
- package/dist/src/provider.js +1 -824
- package/dist/src/remote.d.ts +0 -8
- package/dist/src/remote.js +229 -1075
- package/dist/src/run-discovery.d.ts +79 -0
- package/dist/src/run-discovery.js +13 -0
- package/dist/src/run-dispatch.d.ts +34 -0
- package/dist/src/run-dispatch.js +13 -0
- package/dist/src/run-identity.d.ts +47 -0
- package/dist/src/run-identity.js +13 -0
- package/dist/src/run-journal.d.ts +0 -236
- package/dist/src/run-journal.js +249 -1321
- package/dist/src/run-read-model.d.ts +234 -0
- package/dist/src/run-read-model.js +13 -0
- package/dist/src/run-record.d.ts +0 -11
- package/dist/src/run-record.js +0 -16
- package/dist/src/run-registry-backbone.d.ts +56 -0
- package/dist/src/run-registry-backbone.js +13 -0
- package/dist/src/run-session-journal.d.ts +1 -25
- package/dist/src/run-session-journal.js +0 -1731
- package/dist/src/run-status.d.ts +0 -2
- package/dist/src/run-status.js +0 -11
- package/dist/src/run-timeline.d.ts +0 -3
- package/dist/src/run-timeline.js +0 -1498
- package/dist/src/runtime-task-context.d.ts +82 -0
- package/dist/src/runtime-task-context.js +1 -0
- package/dist/src/runtime.js +66 -904
- package/dist/src/session-asset-materializer.d.ts +35 -0
- package/dist/src/session-asset-materializer.js +13 -0
- package/dist/src/setup.d.ts +47 -0
- package/dist/src/setup.js +13 -0
- package/dist/src/supervisor-journal.js +117 -955
- package/dist/src/task-data.d.ts +239 -0
- package/dist/src/task-data.js +13 -0
- package/dist/src/task-graph-primitives.d.ts +0 -21
- package/dist/src/task-graph-primitives.js +0 -318
- package/dist/src/task-source.d.ts +65 -0
- package/dist/src/task-source.js +12 -0
- package/dist/src/task-state-metadata.d.ts +21 -0
- package/dist/src/task-state-metadata.js +1 -0
- package/dist/src/tool-materializer.d.ts +36 -0
- package/dist/src/tool-materializer.js +13 -0
- package/dist/src/tool-registry.d.ts +3 -0
- package/dist/src/tool-registry.js +58 -0
- package/dist/src/toolchain-sources.d.ts +54 -0
- package/dist/src/toolchain-sources.js +17 -0
- package/dist/src/workflow-journal.d.ts +0 -32
- package/dist/src/workflow-journal.js +0 -371
- package/dist/src/workspace-config.d.ts +18 -0
- package/dist/src/workspace-config.js +13 -0
- package/dist/src/workspace.js +73 -911
- package/package.json +1 -1
- package/dist/src/engine.d.ts +0 -2789
- package/dist/src/engine.js +0 -2392
- package/dist/src/ipc.d.ts +0 -248
- package/dist/src/providerRuntime.d.ts +0 -3949
- package/dist/src/providerRuntime.js +0 -1633
- package/dist/src/rig.d.ts +0 -783
- package/dist/src/rig.js +0 -2537
- package/dist/src/server.d.ts +0 -106
- package/dist/src/server.js +0 -1056
- package/dist/src/serviceFabric.d.ts +0 -62
- package/dist/src/serviceFabric.js +0 -1069
- package/dist/src/ws.d.ts +0 -747
- package/dist/src/ws.js +0 -3126
- /package/dist/src/{ipc.js → agent-roles.js} +0 -0
package/dist/src/plugin-hooks.js
CHANGED
|
@@ -45,6 +45,11 @@ var ApprovalRequestId = makeEntityId("ApprovalRequestId");
|
|
|
45
45
|
var CheckpointRef = makeEntityId("CheckpointRef");
|
|
46
46
|
var RemoteEndpointId = makeEntityId("RemoteEndpointId");
|
|
47
47
|
|
|
48
|
+
// packages/contracts/src/capability-id.ts
|
|
49
|
+
function makeCapabilityId(id) {
|
|
50
|
+
return id;
|
|
51
|
+
}
|
|
52
|
+
|
|
48
53
|
// packages/contracts/src/stage.ts
|
|
49
54
|
import { Schema as Schema2 } from "effect";
|
|
50
55
|
var StageKind = Schema2.Literals(["transform", "gate", "observe"]);
|
|
@@ -219,6 +224,7 @@ var JournalEvent = Schema3.Struct({
|
|
|
219
224
|
at: IsoDateTime,
|
|
220
225
|
payload: Schema3.Unknown
|
|
221
226
|
});
|
|
227
|
+
var PLACEMENT_RUN_TRANSPORT = makeCapabilityId("transport.placement-run");
|
|
222
228
|
|
|
223
229
|
// packages/contracts/src/plugin.ts
|
|
224
230
|
var ValidatorCategory = Schema4.Literals([
|
|
@@ -291,14 +297,19 @@ var CliCommandRegistration = Schema4.Struct({
|
|
|
291
297
|
description: Schema4.optional(Schema4.String),
|
|
292
298
|
usage: Schema4.optional(Schema4.String),
|
|
293
299
|
aliases: Schema4.optional(Schema4.Array(Schema4.String)),
|
|
294
|
-
projectRequired: Schema4.optional(Schema4.Boolean)
|
|
300
|
+
projectRequired: Schema4.optional(Schema4.Boolean),
|
|
301
|
+
rootDefault: Schema4.optional(Schema4.Boolean),
|
|
302
|
+
productRoot: Schema4.optional(Schema4.Boolean),
|
|
303
|
+
subcommands: Schema4.optional(Schema4.Array(Schema4.String))
|
|
295
304
|
});
|
|
305
|
+
var CapabilityRunSchema = Schema4.declare((u) => typeof u === "function", { identifier: "CapabilityRun" });
|
|
296
306
|
var ProductCapabilityRegistration = Schema4.Struct({
|
|
297
307
|
id: Schema4.String,
|
|
298
308
|
title: Schema4.String,
|
|
299
309
|
description: Schema4.optional(Schema4.String),
|
|
300
310
|
commandId: Schema4.optional(Schema4.String),
|
|
301
|
-
panelId: Schema4.optional(Schema4.String)
|
|
311
|
+
panelId: Schema4.optional(Schema4.String),
|
|
312
|
+
run: Schema4.optional(CapabilityRunSchema)
|
|
302
313
|
});
|
|
303
314
|
var PanelRegistration = Schema4.Struct({
|
|
304
315
|
id: Schema4.String,
|
|
@@ -318,6 +329,13 @@ var SessionExtensionRegistration = Schema4.Struct({
|
|
|
318
329
|
id: Schema4.String,
|
|
319
330
|
description: Schema4.optional(Schema4.String)
|
|
320
331
|
});
|
|
332
|
+
var SeedEntrypointRegistration = Schema4.Struct({
|
|
333
|
+
id: Schema4.String,
|
|
334
|
+
description: Schema4.optional(Schema4.String),
|
|
335
|
+
basename: Schema4.optional(Schema4.String),
|
|
336
|
+
workerArg: Schema4.optional(Schema4.String),
|
|
337
|
+
insidePty: Schema4.optional(Schema4.Boolean)
|
|
338
|
+
});
|
|
321
339
|
var PluginContributes = Schema4.Struct({
|
|
322
340
|
validators: Schema4.optional(Schema4.Array(ValidatorRegistration)),
|
|
323
341
|
hooks: Schema4.optional(Schema4.Array(HookRegistration)),
|
|
@@ -332,7 +350,8 @@ var PluginContributes = Schema4.Struct({
|
|
|
332
350
|
capabilities: Schema4.optional(Schema4.Array(ProductCapabilityRegistration)),
|
|
333
351
|
panels: Schema4.optional(Schema4.Array(PanelRegistration)),
|
|
334
352
|
blockerClassifiers: Schema4.optional(Schema4.Array(BlockerClassifierRegistration)),
|
|
335
|
-
sessionExtensions: Schema4.optional(Schema4.Array(SessionExtensionRegistration))
|
|
353
|
+
sessionExtensions: Schema4.optional(Schema4.Array(SessionExtensionRegistration)),
|
|
354
|
+
seedEntrypoints: Schema4.optional(Schema4.Array(SeedEntrypointRegistration))
|
|
336
355
|
});
|
|
337
356
|
var RigPlugin = Schema4.Struct({
|
|
338
357
|
name: Schema4.String,
|
package/dist/src/plugin.d.ts
CHANGED
|
@@ -92,14 +92,31 @@ export declare const CliCommandRegistration: Schema.Struct<{
|
|
|
92
92
|
readonly usage: Schema.optional<Schema.String>;
|
|
93
93
|
readonly aliases: Schema.optional<Schema.$Array<Schema.String>>;
|
|
94
94
|
readonly projectRequired: Schema.optional<Schema.Boolean>;
|
|
95
|
+
readonly rootDefault: Schema.optional<Schema.Boolean>;
|
|
96
|
+
readonly productRoot: Schema.optional<Schema.Boolean>;
|
|
97
|
+
readonly subcommands: Schema.optional<Schema.$Array<Schema.String>>;
|
|
95
98
|
}>;
|
|
96
99
|
export type CliCommandRegistration = typeof CliCommandRegistration.Type;
|
|
100
|
+
/**
|
|
101
|
+
* The executable resolver a capability provider contributes. ON-CONTRACT: this
|
|
102
|
+
* is the single capability channel — the impl no longer "rides alongside" the
|
|
103
|
+
* manifest, ignored by Schema decode. It is declared (not a serializable shape)
|
|
104
|
+
* because it carries a function; manifest validation accepts it, JSON
|
|
105
|
+
* serialization simply omits it (functions are not JSON), exactly mirroring the
|
|
106
|
+
* old strip-on-decode behaviour but with the field now part of the type.
|
|
107
|
+
*/
|
|
108
|
+
export interface CapabilityRun {
|
|
109
|
+
(input: unknown): Promise<unknown> | unknown;
|
|
110
|
+
}
|
|
111
|
+
/** Schema vocab for {@link CapabilityRun} — a type-guard refinement, no behaviour. */
|
|
112
|
+
export declare const CapabilityRunSchema: Schema.declare<CapabilityRun, CapabilityRun>;
|
|
97
113
|
export declare const ProductCapabilityRegistration: Schema.Struct<{
|
|
98
114
|
readonly id: Schema.String;
|
|
99
115
|
readonly title: Schema.String;
|
|
100
116
|
readonly description: Schema.optional<Schema.String>;
|
|
101
117
|
readonly commandId: Schema.optional<Schema.String>;
|
|
102
118
|
readonly panelId: Schema.optional<Schema.String>;
|
|
119
|
+
readonly run: Schema.optional<Schema.declare<CapabilityRun, CapabilityRun>>;
|
|
103
120
|
}>;
|
|
104
121
|
export type ProductCapabilityRegistration = typeof ProductCapabilityRegistration.Type;
|
|
105
122
|
export declare const PanelRegistration: Schema.Struct<{
|
|
@@ -123,6 +140,14 @@ export declare const SessionExtensionRegistration: Schema.Struct<{
|
|
|
123
140
|
readonly description: Schema.optional<Schema.String>;
|
|
124
141
|
}>;
|
|
125
142
|
export type SessionExtensionRegistration = typeof SessionExtensionRegistration.Type;
|
|
143
|
+
export declare const SeedEntrypointRegistration: Schema.Struct<{
|
|
144
|
+
readonly id: Schema.String;
|
|
145
|
+
readonly description: Schema.optional<Schema.String>;
|
|
146
|
+
readonly basename: Schema.optional<Schema.String>;
|
|
147
|
+
readonly workerArg: Schema.optional<Schema.String>;
|
|
148
|
+
readonly insidePty: Schema.optional<Schema.Boolean>;
|
|
149
|
+
}>;
|
|
150
|
+
export type SeedEntrypointRegistration = typeof SeedEntrypointRegistration.Type;
|
|
126
151
|
export declare const PluginContributes: Schema.Struct<{
|
|
127
152
|
readonly validators: Schema.optional<Schema.$Array<Schema.Struct<{
|
|
128
153
|
readonly id: Schema.String;
|
|
@@ -192,6 +217,9 @@ export declare const PluginContributes: Schema.Struct<{
|
|
|
192
217
|
readonly usage: Schema.optional<Schema.String>;
|
|
193
218
|
readonly aliases: Schema.optional<Schema.$Array<Schema.String>>;
|
|
194
219
|
readonly projectRequired: Schema.optional<Schema.Boolean>;
|
|
220
|
+
readonly rootDefault: Schema.optional<Schema.Boolean>;
|
|
221
|
+
readonly productRoot: Schema.optional<Schema.Boolean>;
|
|
222
|
+
readonly subcommands: Schema.optional<Schema.$Array<Schema.String>>;
|
|
195
223
|
}>>>;
|
|
196
224
|
readonly stages: Schema.optional<Schema.$Array<Schema.Struct<{
|
|
197
225
|
readonly id: Schema.brand<Schema.Trim, "StageId">;
|
|
@@ -249,6 +277,7 @@ export declare const PluginContributes: Schema.Struct<{
|
|
|
249
277
|
readonly description: Schema.optional<Schema.String>;
|
|
250
278
|
readonly commandId: Schema.optional<Schema.String>;
|
|
251
279
|
readonly panelId: Schema.optional<Schema.String>;
|
|
280
|
+
readonly run: Schema.optional<Schema.declare<CapabilityRun, CapabilityRun>>;
|
|
252
281
|
}>>>;
|
|
253
282
|
readonly panels: Schema.optional<Schema.$Array<Schema.Struct<{
|
|
254
283
|
readonly id: Schema.String;
|
|
@@ -268,6 +297,13 @@ export declare const PluginContributes: Schema.Struct<{
|
|
|
268
297
|
readonly id: Schema.String;
|
|
269
298
|
readonly description: Schema.optional<Schema.String>;
|
|
270
299
|
}>>>;
|
|
300
|
+
readonly seedEntrypoints: Schema.optional<Schema.$Array<Schema.Struct<{
|
|
301
|
+
readonly id: Schema.String;
|
|
302
|
+
readonly description: Schema.optional<Schema.String>;
|
|
303
|
+
readonly basename: Schema.optional<Schema.String>;
|
|
304
|
+
readonly workerArg: Schema.optional<Schema.String>;
|
|
305
|
+
readonly insidePty: Schema.optional<Schema.Boolean>;
|
|
306
|
+
}>>>;
|
|
271
307
|
}>;
|
|
272
308
|
export type PluginContributes = typeof PluginContributes.Type;
|
|
273
309
|
export declare const RigPlugin: Schema.Struct<{
|
|
@@ -348,6 +384,9 @@ export declare const RigPlugin: Schema.Struct<{
|
|
|
348
384
|
readonly usage: Schema.optional<Schema.String>;
|
|
349
385
|
readonly aliases: Schema.optional<Schema.$Array<Schema.String>>;
|
|
350
386
|
readonly projectRequired: Schema.optional<Schema.Boolean>;
|
|
387
|
+
readonly rootDefault: Schema.optional<Schema.Boolean>;
|
|
388
|
+
readonly productRoot: Schema.optional<Schema.Boolean>;
|
|
389
|
+
readonly subcommands: Schema.optional<Schema.$Array<Schema.String>>;
|
|
351
390
|
}>>>;
|
|
352
391
|
readonly stages: Schema.optional<Schema.$Array<Schema.Struct<{
|
|
353
392
|
readonly id: Schema.brand<Schema.Trim, "StageId">;
|
|
@@ -405,6 +444,7 @@ export declare const RigPlugin: Schema.Struct<{
|
|
|
405
444
|
readonly description: Schema.optional<Schema.String>;
|
|
406
445
|
readonly commandId: Schema.optional<Schema.String>;
|
|
407
446
|
readonly panelId: Schema.optional<Schema.String>;
|
|
447
|
+
readonly run: Schema.optional<Schema.declare<CapabilityRun, CapabilityRun>>;
|
|
408
448
|
}>>>;
|
|
409
449
|
readonly panels: Schema.optional<Schema.$Array<Schema.Struct<{
|
|
410
450
|
readonly id: Schema.String;
|
|
@@ -424,6 +464,13 @@ export declare const RigPlugin: Schema.Struct<{
|
|
|
424
464
|
readonly id: Schema.String;
|
|
425
465
|
readonly description: Schema.optional<Schema.String>;
|
|
426
466
|
}>>>;
|
|
467
|
+
readonly seedEntrypoints: Schema.optional<Schema.$Array<Schema.Struct<{
|
|
468
|
+
readonly id: Schema.String;
|
|
469
|
+
readonly description: Schema.optional<Schema.String>;
|
|
470
|
+
readonly basename: Schema.optional<Schema.String>;
|
|
471
|
+
readonly workerArg: Schema.optional<Schema.String>;
|
|
472
|
+
readonly insidePty: Schema.optional<Schema.Boolean>;
|
|
473
|
+
}>>>;
|
|
427
474
|
}>>;
|
|
428
475
|
}>;
|
|
429
476
|
export type RigPlugin = typeof RigPlugin.Type;
|
package/dist/src/plugin.js
CHANGED
|
@@ -42,6 +42,11 @@ var ApprovalRequestId = makeEntityId("ApprovalRequestId");
|
|
|
42
42
|
var CheckpointRef = makeEntityId("CheckpointRef");
|
|
43
43
|
var RemoteEndpointId = makeEntityId("RemoteEndpointId");
|
|
44
44
|
|
|
45
|
+
// packages/contracts/src/capability-id.ts
|
|
46
|
+
function makeCapabilityId(id) {
|
|
47
|
+
return id;
|
|
48
|
+
}
|
|
49
|
+
|
|
45
50
|
// packages/contracts/src/stage.ts
|
|
46
51
|
import { Schema as Schema2 } from "effect";
|
|
47
52
|
var StageKind = Schema2.Literals(["transform", "gate", "observe"]);
|
|
@@ -216,6 +221,7 @@ var JournalEvent = Schema3.Struct({
|
|
|
216
221
|
at: IsoDateTime,
|
|
217
222
|
payload: Schema3.Unknown
|
|
218
223
|
});
|
|
224
|
+
var PLACEMENT_RUN_TRANSPORT = makeCapabilityId("transport.placement-run");
|
|
219
225
|
|
|
220
226
|
// packages/contracts/src/plugin.ts
|
|
221
227
|
var ValidatorCategory = Schema4.Literals([
|
|
@@ -289,14 +295,19 @@ var CliCommandRegistration = Schema4.Struct({
|
|
|
289
295
|
description: Schema4.optional(Schema4.String),
|
|
290
296
|
usage: Schema4.optional(Schema4.String),
|
|
291
297
|
aliases: Schema4.optional(Schema4.Array(Schema4.String)),
|
|
292
|
-
projectRequired: Schema4.optional(Schema4.Boolean)
|
|
298
|
+
projectRequired: Schema4.optional(Schema4.Boolean),
|
|
299
|
+
rootDefault: Schema4.optional(Schema4.Boolean),
|
|
300
|
+
productRoot: Schema4.optional(Schema4.Boolean),
|
|
301
|
+
subcommands: Schema4.optional(Schema4.Array(Schema4.String))
|
|
293
302
|
});
|
|
303
|
+
var CapabilityRunSchema = Schema4.declare((u) => typeof u === "function", { identifier: "CapabilityRun" });
|
|
294
304
|
var ProductCapabilityRegistration = Schema4.Struct({
|
|
295
305
|
id: Schema4.String,
|
|
296
306
|
title: Schema4.String,
|
|
297
307
|
description: Schema4.optional(Schema4.String),
|
|
298
308
|
commandId: Schema4.optional(Schema4.String),
|
|
299
|
-
panelId: Schema4.optional(Schema4.String)
|
|
309
|
+
panelId: Schema4.optional(Schema4.String),
|
|
310
|
+
run: Schema4.optional(CapabilityRunSchema)
|
|
300
311
|
});
|
|
301
312
|
var PanelRegistration = Schema4.Struct({
|
|
302
313
|
id: Schema4.String,
|
|
@@ -316,6 +327,13 @@ var SessionExtensionRegistration = Schema4.Struct({
|
|
|
316
327
|
id: Schema4.String,
|
|
317
328
|
description: Schema4.optional(Schema4.String)
|
|
318
329
|
});
|
|
330
|
+
var SeedEntrypointRegistration = Schema4.Struct({
|
|
331
|
+
id: Schema4.String,
|
|
332
|
+
description: Schema4.optional(Schema4.String),
|
|
333
|
+
basename: Schema4.optional(Schema4.String),
|
|
334
|
+
workerArg: Schema4.optional(Schema4.String),
|
|
335
|
+
insidePty: Schema4.optional(Schema4.Boolean)
|
|
336
|
+
});
|
|
319
337
|
var PluginContributes = Schema4.Struct({
|
|
320
338
|
validators: Schema4.optional(Schema4.Array(ValidatorRegistration)),
|
|
321
339
|
hooks: Schema4.optional(Schema4.Array(HookRegistration)),
|
|
@@ -330,7 +348,8 @@ var PluginContributes = Schema4.Struct({
|
|
|
330
348
|
capabilities: Schema4.optional(Schema4.Array(ProductCapabilityRegistration)),
|
|
331
349
|
panels: Schema4.optional(Schema4.Array(PanelRegistration)),
|
|
332
350
|
blockerClassifiers: Schema4.optional(Schema4.Array(BlockerClassifierRegistration)),
|
|
333
|
-
sessionExtensions: Schema4.optional(Schema4.Array(SessionExtensionRegistration))
|
|
351
|
+
sessionExtensions: Schema4.optional(Schema4.Array(SessionExtensionRegistration)),
|
|
352
|
+
seedEntrypoints: Schema4.optional(Schema4.Array(SeedEntrypointRegistration))
|
|
334
353
|
});
|
|
335
354
|
var RigPlugin = Schema4.Struct({
|
|
336
355
|
name: Schema4.String,
|
|
@@ -348,6 +367,7 @@ export {
|
|
|
348
367
|
TaskFieldExtension,
|
|
349
368
|
SkillRegistration,
|
|
350
369
|
SessionExtensionRegistration,
|
|
370
|
+
SeedEntrypointRegistration,
|
|
351
371
|
RigPlugin,
|
|
352
372
|
RepoSourceRegistration,
|
|
353
373
|
ProductCapabilityRegistration,
|
|
@@ -357,6 +377,7 @@ export {
|
|
|
357
377
|
HookMatcher,
|
|
358
378
|
HookEvent,
|
|
359
379
|
CliCommandRegistration,
|
|
380
|
+
CapabilityRunSchema,
|
|
360
381
|
BlockerClassifierRegistration,
|
|
361
382
|
AgentSessionHookEvent,
|
|
362
383
|
AgentRoleRegistration
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* prompt.ts — pure capability vocabulary for agent prompt assembly.
|
|
3
|
+
*
|
|
4
|
+
* Moved here from `@rig/prompt-plugin` (where it was defined locally): the FLOOR
|
|
5
|
+
* cannot resolve a capability whose id/input type only exist inside a plugin
|
|
6
|
+
* without importing the plugin. The plugin OWNS the impl
|
|
7
|
+
* (`readPriorPrProgressPromptSection`, lazy-loaded inside `run()`) and registers
|
|
8
|
+
* it under this id; consumers resolve it off the host. Types only here.
|
|
9
|
+
*/
|
|
10
|
+
import type { CapabilityId } from "./capability-id";
|
|
11
|
+
/**
|
|
12
|
+
* Capability id: agent prompt assembly — the prior-progress section of what the
|
|
13
|
+
* agent is told for a re-dispatched task.
|
|
14
|
+
*/
|
|
15
|
+
export declare const PRIOR_PROGRESS_PROMPT_CAPABILITY_ID = "prompt.prior-progress";
|
|
16
|
+
/** Pure input: which workspace + task to assemble the prior-progress section for. */
|
|
17
|
+
export type PriorProgressPromptInput = {
|
|
18
|
+
readonly projectRoot: string;
|
|
19
|
+
readonly taskId: string;
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* The cohesive prompt-assembly operation: returns the prior-PR-progress prompt
|
|
23
|
+
* section, or null when there is no prior progress. Async (reads fs).
|
|
24
|
+
*/
|
|
25
|
+
export interface PriorProgressPromptService {
|
|
26
|
+
readPriorProgressSection(input: PriorProgressPromptInput): Promise<string | null>;
|
|
27
|
+
}
|
|
28
|
+
/** Typed capability id; string value is {@link PRIOR_PROGRESS_PROMPT_CAPABILITY_ID}. */
|
|
29
|
+
export declare const PRIOR_PROGRESS_PROMPT: CapabilityId<PriorProgressPromptService>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
// packages/contracts/src/capability-id.ts
|
|
3
|
+
function makeCapabilityId(id) {
|
|
4
|
+
return id;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
// packages/contracts/src/prompt.ts
|
|
8
|
+
var PRIOR_PROGRESS_PROMPT_CAPABILITY_ID = "prompt.prior-progress";
|
|
9
|
+
var PRIOR_PROGRESS_PROMPT = makeCapabilityId(PRIOR_PROGRESS_PROMPT_CAPABILITY_ID);
|
|
10
|
+
export {
|
|
11
|
+
PRIOR_PROGRESS_PROMPT_CAPABILITY_ID,
|
|
12
|
+
PRIOR_PROGRESS_PROMPT
|
|
13
|
+
};
|
|
@@ -7,13 +7,35 @@
|
|
|
7
7
|
* without a substrate->plugin import cycle. Carries no behaviour and imports
|
|
8
8
|
* nothing — exactly like `memory.ts` / `lifecycle-capabilities.ts`.
|
|
9
9
|
*
|
|
10
|
-
* The plugin registers its executable `RuntimeInstructionService` impl under
|
|
11
|
-
* {@link
|
|
12
|
-
*
|
|
13
|
-
* `pluginHost.listExecutableCapabilities()` via the
|
|
10
|
+
* The plugin registers its executable `RuntimeInstructionService` impl under the
|
|
11
|
+
* typed id {@link RUNTIME_INSTRUCTION} (whose string value is
|
|
12
|
+
* {@link RUNTIME_INSTRUCTION_SERVICE_CAPABILITY_ID}) via `*.provide`; the runtime
|
|
13
|
+
* resolves it by id from `pluginHost.listExecutableCapabilities()` via the
|
|
14
|
+
* `defineCapability` seam (`@rig/core/capability`), re-exported from the thin
|
|
14
15
|
* `@rig/runtime/control-plane/provider-instruction-port`.
|
|
15
16
|
*/
|
|
17
|
+
import type { CapabilityId } from "./capability-id";
|
|
16
18
|
/** Capability id the provider plugin registers its instruction service under. */
|
|
17
19
|
export declare const RUNTIME_INSTRUCTION_SERVICE_CAPABILITY_ID = "provider.runtime-instructions";
|
|
18
20
|
/** The agent harness adapter the runtime is currently wired to. */
|
|
19
21
|
export type RuntimeInstructionProvider = "pi";
|
|
22
|
+
/**
|
|
23
|
+
* The cohesive set of agent-harness instruction builders the runtime consumers
|
|
24
|
+
* depend on. This is pure capability VOCAB: the `@rig/provider-plugin` provides a
|
|
25
|
+
* concrete impl (statically checked against this interface via the typed
|
|
26
|
+
* capability seam), and the substrate only ever sees this contract — resolved by
|
|
27
|
+
* id off a plugin host with no `as unknown as` at any call site.
|
|
28
|
+
*/
|
|
29
|
+
export interface RuntimeInstructionService {
|
|
30
|
+
normalizeProvider(value: string | undefined | null): RuntimeInstructionProvider;
|
|
31
|
+
buildTaskRunInstructionLines(provider: RuntimeInstructionProvider): string[];
|
|
32
|
+
buildRuntimeContextLines(provider: RuntimeInstructionProvider): string[];
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* The typed capability id the provider plugin provides and consumers require.
|
|
36
|
+
* Phantom-typed with `RuntimeInstructionService` so `resolve(host)` returns a
|
|
37
|
+
* `RuntimeInstructionService` with no cast leaking to callers. Its string value
|
|
38
|
+
* is {@link RUNTIME_INSTRUCTION_SERVICE_CAPABILITY_ID}, so it indexes the same
|
|
39
|
+
* host entry.
|
|
40
|
+
*/
|
|
41
|
+
export declare const RUNTIME_INSTRUCTION: CapabilityId<RuntimeInstructionService>;
|
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
// @bun
|
|
2
|
+
// packages/contracts/src/capability-id.ts
|
|
3
|
+
function makeCapabilityId(id) {
|
|
4
|
+
return id;
|
|
5
|
+
}
|
|
6
|
+
|
|
2
7
|
// packages/contracts/src/provider-instructions.ts
|
|
3
8
|
var RUNTIME_INSTRUCTION_SERVICE_CAPABILITY_ID = "provider.runtime-instructions";
|
|
9
|
+
var RUNTIME_INSTRUCTION = makeCapabilityId(RUNTIME_INSTRUCTION_SERVICE_CAPABILITY_ID);
|
|
4
10
|
export {
|
|
5
|
-
RUNTIME_INSTRUCTION_SERVICE_CAPABILITY_ID
|
|
11
|
+
RUNTIME_INSTRUCTION_SERVICE_CAPABILITY_ID,
|
|
12
|
+
RUNTIME_INSTRUCTION
|
|
6
13
|
};
|