@h-rig/contracts 0.0.6-alpha.16 → 0.0.6-alpha.161
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 +3280 -0
- package/dist/index.mjs +3239 -0
- package/dist/src/agent-roles.d.ts +8 -0
- package/dist/src/artifact.d.ts +13 -0
- package/dist/src/artifact.js +3 -0
- package/dist/src/baseSchemas.d.ts +63 -0
- package/dist/src/baseSchemas.js +6 -0
- package/dist/src/browser.d.ts +80 -0
- package/dist/src/browser.js +13 -0
- package/dist/src/capability-id.d.ts +22 -0
- package/dist/src/capability-id.js +8 -0
- package/dist/src/cli-output.d.ts +348 -0
- package/dist/src/cli-output.js +190 -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 +551 -0
- package/dist/src/config.js +765 -162
- package/dist/src/control-plane-types.d.ts +323 -0
- package/dist/src/control-plane-types.js +13 -0
- package/dist/src/conversation.d.ts +50 -0
- package/dist/src/conversation.js +3 -0
- package/dist/src/dependency-preflight.d.ts +43 -0
- package/dist/src/dependency-preflight.js +13 -0
- package/dist/src/doctor.d.ts +90 -0
- package/dist/src/doctor.js +13 -0
- package/dist/src/drift.d.ts +28 -0
- package/dist/src/drift.js +69 -0
- package/dist/src/editor.d.ts +25 -0
- package/dist/src/editor.js +3 -0
- package/dist/src/errors.d.ts +13 -0
- package/dist/src/errors.js +17 -0
- package/dist/src/git.d.ts +144 -0
- package/dist/src/git.js +3 -0
- package/dist/src/github.d.ts +146 -0
- package/dist/src/github.js +17 -0
- package/dist/src/graph.d.ts +360 -0
- package/dist/src/graph.js +137 -1
- 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 +41 -0
- package/dist/src/help-catalog.js +13 -0
- 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 +77 -0
- package/dist/src/index.js +2661 -3970
- package/dist/src/isolation.d.ts +213 -0
- package/dist/src/isolation.js +13 -0
- package/dist/src/kernel.d.ts +200 -0
- package/dist/src/kernel.js +261 -0
- package/dist/src/keybindings.d.ts +71 -0
- package/dist/src/keybindings.js +3 -0
- package/dist/src/layout.d.ts +49 -0
- package/dist/src/layout.js +10 -0
- package/dist/src/lifecycle-capabilities.d.ts +128 -0
- package/dist/src/lifecycle-capabilities.js +25 -0
- package/dist/src/managed-repos.d.ts +136 -0
- package/dist/src/managed-repos.js +17 -0
- package/dist/src/memory.d.ts +199 -0
- package/dist/src/memory.js +15 -0
- package/dist/src/model.d.ts +77 -0
- package/dist/src/notify.d.ts +46 -0
- package/dist/src/notify.js +13 -0
- package/dist/src/orchestration.d.ts +43 -0
- package/dist/src/orchestration.js +28 -961
- package/dist/src/panel-protocol.d.ts +17 -0
- package/dist/src/panel-protocol.js +10 -0
- package/dist/src/pi-session.d.ts +113 -0
- package/dist/src/pi-session.js +1 -0
- package/dist/src/planning.d.ts +64 -0
- package/dist/src/planning.js +90 -0
- package/dist/src/plugin-hooks.d.ts +51 -0
- package/dist/src/plugin-hooks.js +386 -0
- package/dist/src/plugin.d.ts +476 -0
- package/dist/src/plugin.js +346 -64
- package/dist/src/policy.d.ts +16 -0
- package/dist/src/policy.js +3 -0
- package/dist/src/project.d.ts +71 -0
- package/dist/src/project.js +3 -0
- package/dist/src/prompt.d.ts +29 -0
- package/dist/src/prompt.js +13 -0
- package/dist/src/protocol-version.d.ts +21 -0
- package/dist/src/protocol-version.js +6 -0
- package/dist/src/provider-instructions.d.ts +41 -0
- package/dist/src/provider-instructions.js +13 -0
- package/dist/src/provider.d.ts +105 -0
- package/dist/src/provider.js +4 -824
- package/dist/src/remote.d.ts +318 -0
- package/dist/src/remote.js +238 -1078
- package/dist/src/review.d.ts +18 -0
- package/dist/src/review.js +3 -0
- package/dist/src/rollups.d.ts +41 -0
- package/dist/src/rollups.js +70 -0
- 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 +694 -0
- package/dist/src/run-journal.js +569 -0
- 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 +45 -0
- package/dist/src/run-record.js +1 -0
- 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 +69 -0
- package/dist/src/run-session-journal.js +78 -0
- package/dist/src/run-status.d.ts +10 -0
- package/dist/src/run-status.js +27 -0
- package/dist/src/run-timeline.d.ts +7 -0
- package/dist/src/run-timeline.js +1 -0
- package/dist/src/runtime-task-context.d.ts +82 -0
- package/dist/src/runtime-task-context.js +1 -0
- package/dist/src/runtime.d.ts +103 -0
- package/dist/src/runtime.js +73 -906
- 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/stage.d.ts +245 -0
- package/dist/src/stage.js +169 -0
- package/dist/src/supervisor-journal.d.ts +204 -0
- package/dist/src/supervisor-journal.js +334 -0
- 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 +47 -0
- package/dist/src/task-graph-primitives.js +1 -0
- package/dist/src/task-source.d.ts +102 -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/terminal.d.ts +130 -0
- package/dist/src/terminal.js +3 -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/validation.d.ts +14 -0
- package/dist/src/validation.js +3 -0
- package/dist/src/workflow-journal.d.ts +92 -0
- package/dist/src/workflow-journal.js +18 -0
- package/dist/src/workspace-config.d.ts +18 -0
- package/dist/src/workspace-config.js +13 -0
- package/dist/src/workspace.d.ts +204 -0
- package/dist/src/workspace.js +76 -911
- package/package.json +51 -4
- package/dist/src/engine.js +0 -2278
- package/dist/src/providerRuntime.js +0 -1630
- package/dist/src/rig.js +0 -2374
- package/dist/src/server.js +0 -1053
- package/dist/src/serviceFabric.js +0 -1066
- package/dist/src/ws.js +0 -2968
- /package/dist/src/{ipc.js → agent-roles.js} +0 -0
|
@@ -0,0 +1,239 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The TASK-DATA capability seam.
|
|
3
|
+
*
|
|
4
|
+
* Floor-neutral vocab + a single `CapabilityId<TaskDataService>` describing the
|
|
5
|
+
* task-DATA reads and task-command behaviours the lifecycle, scheduler,
|
|
6
|
+
* isolation provisioning, repos, workspace, and CLI surfaces consume. The
|
|
7
|
+
* READ/normalize/validate POLICY behind each method (synchronize task-config,
|
|
8
|
+
* strip metadata, tracker projection, validator dispatch, artifact IO) is owned
|
|
9
|
+
* by `@rig/task-sources-plugin`, which `defineCapability(TASK_DATA_SERVICE_CAPABILITY).provide`s
|
|
10
|
+
* the impl. Consumers `resolve`/`require` it off a built plugin host (or read the
|
|
11
|
+
* boot-installed singleton) WITHOUT importing the provider plugin — this is the
|
|
12
|
+
* seam that replaces the cross-plugin `import("@rig/task-sources-plugin/...")`
|
|
13
|
+
* impl imports (SEAM-ONLY §6.4).
|
|
14
|
+
*
|
|
15
|
+
* Pure: types + one branded id, no behaviour.
|
|
16
|
+
*/
|
|
17
|
+
import type { CapabilityId } from "./capability-id";
|
|
18
|
+
import type { TaskConfigEntry, TaskRecord, RegisteredTaskSource, TaskSourceUpdate } from "./task-source";
|
|
19
|
+
import type { TaskRecordReader } from "./isolation";
|
|
20
|
+
import type { RuntimeInstructionProvider } from "./provider-instructions";
|
|
21
|
+
import type { CanonicalTaskLifecycleStatus, TaskStateMetadataEnvelope } from "./task-state-metadata";
|
|
22
|
+
/** Result of a bounded artifact-file read (preview + truncation metadata). */
|
|
23
|
+
export type TaskArtifactReadResult = {
|
|
24
|
+
path: string;
|
|
25
|
+
sizeBytes: number;
|
|
26
|
+
contents: string;
|
|
27
|
+
truncated: boolean;
|
|
28
|
+
maxBytes: number;
|
|
29
|
+
};
|
|
30
|
+
/** One validation category outcome inside a {@link TaskValidationSummary}. */
|
|
31
|
+
export type TaskValidationCategoryResult = {
|
|
32
|
+
category: string;
|
|
33
|
+
status: "pass" | "fail";
|
|
34
|
+
exit_code?: number;
|
|
35
|
+
duration_seconds: number;
|
|
36
|
+
};
|
|
37
|
+
/**
|
|
38
|
+
* The aggregate task-validation outcome a task closeout reads/accepts (the
|
|
39
|
+
* category-rollup shape written to `validation-summary.json` by `taskValidate`).
|
|
40
|
+
* Distinct from the schema-typed run-level `ValidationSummary` in `./validation`.
|
|
41
|
+
*/
|
|
42
|
+
export type TaskValidationSummary = {
|
|
43
|
+
status: "pass" | "fail" | "skipped";
|
|
44
|
+
total: number;
|
|
45
|
+
passed: number;
|
|
46
|
+
failed: number;
|
|
47
|
+
categories: TaskValidationCategoryResult[];
|
|
48
|
+
};
|
|
49
|
+
/** A `bd-`/source-id lifecycle status projected from the synced tracker. */
|
|
50
|
+
export type SyncedTrackerStatus = CanonicalTaskLifecycleStatus | "unknown";
|
|
51
|
+
export type SyncedTrackerDependency = {
|
|
52
|
+
issueId: string | null;
|
|
53
|
+
dependsOnId: string | null;
|
|
54
|
+
id?: string | null;
|
|
55
|
+
type: string | null;
|
|
56
|
+
};
|
|
57
|
+
export type SyncedTrackerIssue = {
|
|
58
|
+
id: string;
|
|
59
|
+
title: string | null;
|
|
60
|
+
description: string | null;
|
|
61
|
+
acceptanceCriteria: string | null;
|
|
62
|
+
issueType: string | null;
|
|
63
|
+
status: SyncedTrackerStatus;
|
|
64
|
+
rawStatus: string | null;
|
|
65
|
+
priority: number | null;
|
|
66
|
+
dependencies: SyncedTrackerDependency[];
|
|
67
|
+
};
|
|
68
|
+
export type SyncedTrackerSnapshot = {
|
|
69
|
+
source: "remote" | "local";
|
|
70
|
+
baseOid: string | null;
|
|
71
|
+
issues: SyncedTrackerIssue[];
|
|
72
|
+
taskState: TaskStateMetadataEnvelope;
|
|
73
|
+
};
|
|
74
|
+
/** Optional fallback toggle for synced-tracker reads. */
|
|
75
|
+
export type ReadSyncedTrackerOptions = {
|
|
76
|
+
allowLocalFallback?: boolean;
|
|
77
|
+
};
|
|
78
|
+
/** Result of resolving a single task through the configured task source. */
|
|
79
|
+
export type TaskSourceTaskReadResult = {
|
|
80
|
+
configured: boolean;
|
|
81
|
+
sourceKind: string | null;
|
|
82
|
+
task: TaskRecord | null;
|
|
83
|
+
};
|
|
84
|
+
/** Summary of a `task reopen` operation. */
|
|
85
|
+
export type TaskReopenSummary = {
|
|
86
|
+
mode: "all" | "single";
|
|
87
|
+
requestedTaskId: string | null;
|
|
88
|
+
dryRun: boolean;
|
|
89
|
+
closedFound: number;
|
|
90
|
+
reopened: string[];
|
|
91
|
+
failed: string[];
|
|
92
|
+
skipped: string[];
|
|
93
|
+
};
|
|
94
|
+
/** Identity fields used to resolve a task's source issue. */
|
|
95
|
+
export type SourceTaskIdentity = {
|
|
96
|
+
id?: unknown;
|
|
97
|
+
sourceIssueId?: unknown;
|
|
98
|
+
source_issue_id?: unknown;
|
|
99
|
+
};
|
|
100
|
+
/** Result of pushing a task lifecycle update through the configured source. */
|
|
101
|
+
export type TaskSourceLifecycleUpdateResult = {
|
|
102
|
+
taskId: string;
|
|
103
|
+
updated: boolean;
|
|
104
|
+
source: "plugin" | "compat" | "none" | "server";
|
|
105
|
+
sourceKind: string | null;
|
|
106
|
+
status: unknown;
|
|
107
|
+
projectSync?: unknown;
|
|
108
|
+
};
|
|
109
|
+
/** Input for rendering a task-run lifecycle status comment. */
|
|
110
|
+
export type TaskRunLifecycleCommentInput = {
|
|
111
|
+
runId: string;
|
|
112
|
+
status: string;
|
|
113
|
+
summary: string;
|
|
114
|
+
runtimeWorkspace?: string | null;
|
|
115
|
+
logsDir?: string | null;
|
|
116
|
+
sessionDir?: string | null;
|
|
117
|
+
errorText?: string | null;
|
|
118
|
+
};
|
|
119
|
+
/** Boundary subset of the source-aware task-config reader options. */
|
|
120
|
+
export type SourceAwareTaskConfigReadOptions = {
|
|
121
|
+
configPath?: string;
|
|
122
|
+
allowLocalTaskConfigStatusFallback?: boolean;
|
|
123
|
+
};
|
|
124
|
+
/**
|
|
125
|
+
* The lifecycle status values a run reflects to the task source.
|
|
126
|
+
* Mirrors the type defined in @rig/task-sources-plugin/source-lifecycle —
|
|
127
|
+
* lives here so @rig/run-exec can use it through the TaskDataService seam
|
|
128
|
+
* without a cross-plugin impl import.
|
|
129
|
+
*/
|
|
130
|
+
export type RunTaskSourceLifecycleStatus = "running" | "under_review" | "ci_fixing" | "merging" | "closed" | "cancelled" | "needs_attention";
|
|
131
|
+
/**
|
|
132
|
+
* The run identity fields passed when reflecting a run lifecycle event to the
|
|
133
|
+
* task source.
|
|
134
|
+
*/
|
|
135
|
+
export type RunTaskSourceLifecycleRun = {
|
|
136
|
+
runId?: string | null;
|
|
137
|
+
taskId?: string | null;
|
|
138
|
+
sourceTask?: unknown;
|
|
139
|
+
worktreePath?: string | null;
|
|
140
|
+
logRoot?: string | null;
|
|
141
|
+
sessionPath?: string | null;
|
|
142
|
+
errorText?: string | null;
|
|
143
|
+
};
|
|
144
|
+
/** Optional overrides for a run lifecycle update. */
|
|
145
|
+
export type RunTaskSourceLifecycleOptions = {
|
|
146
|
+
errorText?: string | null;
|
|
147
|
+
};
|
|
148
|
+
/** Context for building a plugin-backed task-record reader. */
|
|
149
|
+
export type PluginTaskRecordReaderContext = {
|
|
150
|
+
taskSourceRegistry: {
|
|
151
|
+
list(): readonly RegisteredTaskSource[];
|
|
152
|
+
resolveById(id: string): RegisteredTaskSource;
|
|
153
|
+
resolveByKind(kind: string): RegisteredTaskSource;
|
|
154
|
+
};
|
|
155
|
+
};
|
|
156
|
+
/** Options selecting a source for a plugin-backed task-record reader. */
|
|
157
|
+
export type PluginTaskRecordReaderOptions = {
|
|
158
|
+
projectRoot: string;
|
|
159
|
+
sourceId?: string;
|
|
160
|
+
sourceKind?: string;
|
|
161
|
+
};
|
|
162
|
+
/**
|
|
163
|
+
* The task-DATA service contributed by `@rig/task-sources-plugin`. Every method
|
|
164
|
+
* is keyed by `projectRoot` (the service is stateless), so it is safe to install
|
|
165
|
+
* as a boot singleton and read synchronously by substrate consumers.
|
|
166
|
+
*/
|
|
167
|
+
export interface TaskDataService {
|
|
168
|
+
currentTaskId(projectRoot: string): string;
|
|
169
|
+
readTaskConfig(projectRoot: string): Record<string, TaskConfigEntry>;
|
|
170
|
+
readSourceTaskConfig(projectRoot: string): Record<string, TaskConfigEntry>;
|
|
171
|
+
lookupTask(projectRoot: string, input: string): string;
|
|
172
|
+
artifactDirForId(projectRoot: string, id: string): string;
|
|
173
|
+
taskInfo(projectRoot: string, taskId?: string, runtimeProviderOverride?: RuntimeInstructionProvider): Promise<void>;
|
|
174
|
+
taskDeps(projectRoot: string, taskId?: string): Promise<void>;
|
|
175
|
+
taskStatus(projectRoot: string): void;
|
|
176
|
+
taskScope(projectRoot: string, expandFiles: boolean, taskId?: string): Promise<void>;
|
|
177
|
+
taskReady(projectRoot: string): Promise<void>;
|
|
178
|
+
taskLookup(projectRoot: string, id: string): string;
|
|
179
|
+
taskRecord(projectRoot: string, type: "decision" | "failure", text: string, taskId?: string): void;
|
|
180
|
+
taskReopen(projectRoot: string, options: {
|
|
181
|
+
all: boolean;
|
|
182
|
+
taskId?: string;
|
|
183
|
+
dryRun?: boolean;
|
|
184
|
+
}): TaskReopenSummary;
|
|
185
|
+
taskValidate(projectRoot: string, taskId?: string, validatorRegistry?: unknown): Promise<boolean>;
|
|
186
|
+
taskArtifacts(projectRoot: string, taskId?: string): void;
|
|
187
|
+
taskArtifactDir(projectRoot: string, taskId?: string): string;
|
|
188
|
+
taskArtifactWrite(projectRoot: string, filename: string, content: string, taskId?: string): void;
|
|
189
|
+
taskArtifactRead(projectRoot: string, filename: string, options?: {
|
|
190
|
+
taskId?: string;
|
|
191
|
+
maxBytes?: number;
|
|
192
|
+
}): TaskArtifactReadResult;
|
|
193
|
+
taskDependencyIds(projectRoot: string, taskId: string): string[];
|
|
194
|
+
changedFilesForTask(projectRoot: string, taskId: string, scoped: boolean): string[];
|
|
195
|
+
pendingFilesForTask(projectRoot: string, taskId: string, scoped: boolean): string[];
|
|
196
|
+
readSourceAwareTaskStatus(projectRoot: string, taskId: string, options?: SourceAwareTaskConfigReadOptions): Promise<unknown>;
|
|
197
|
+
readConfiguredTaskSourceTask(projectRoot: string, taskId: string): Promise<TaskSourceTaskReadResult>;
|
|
198
|
+
updateConfiguredTaskSourceTask(projectRoot: string, input: {
|
|
199
|
+
taskId: string;
|
|
200
|
+
sourceTask?: SourceTaskIdentity | null;
|
|
201
|
+
update: TaskSourceUpdate;
|
|
202
|
+
}): Promise<TaskSourceLifecycleUpdateResult>;
|
|
203
|
+
buildTaskRunLifecycleComment(input: TaskRunLifecycleCommentInput): string;
|
|
204
|
+
/**
|
|
205
|
+
* Compat fallback: push an update to a github-issues-backed task by parsing
|
|
206
|
+
* its `owner/repo#n` source-issue id. Returns false when the id does not match
|
|
207
|
+
* the taskId. Exposed on the seam so the kernel agent-launch executor can apply
|
|
208
|
+
* the source-aware compatibility update without importing the provider plugin.
|
|
209
|
+
*/
|
|
210
|
+
updateGithubIssueTaskBySourceIssueId(sourceIssueId: string | null | undefined, taskId: string, update: TaskSourceUpdate): boolean;
|
|
211
|
+
/**
|
|
212
|
+
* Compat fallback: push a status/comment update through the source-aware
|
|
213
|
+
* task-config (github-issues, files, or legacy task-config). Returns false when
|
|
214
|
+
* no writable source is configured. Seam-exposed for the kernel executor.
|
|
215
|
+
*/
|
|
216
|
+
updateSourceAwareTaskConfigTask(projectRoot: string, taskId: string, update: TaskSourceUpdate): boolean;
|
|
217
|
+
/**
|
|
218
|
+
* Reflect a run lifecycle event (start/stop/closeout) to the configured task
|
|
219
|
+
* source. Returns null when no taskId is present or no source is configured.
|
|
220
|
+
* Exposed on the seam so @rig/run-exec can call it without importing
|
|
221
|
+
* @rig/task-sources-plugin impl files directly (SEAM-ONLY §6.4).
|
|
222
|
+
*/
|
|
223
|
+
updateRunTaskSourceLifecycle(projectRoot: string, run: RunTaskSourceLifecycleRun, status: RunTaskSourceLifecycleStatus, summary: string, options?: RunTaskSourceLifecycleOptions): Promise<TaskSourceLifecycleUpdateResult | null>;
|
|
224
|
+
createLegacyTaskConfigRecordReader(projectRoot: string, options?: {
|
|
225
|
+
configPath?: string;
|
|
226
|
+
}): TaskRecordReader;
|
|
227
|
+
createSourceAwareTaskConfigRecordReader(projectRoot: string, options?: SourceAwareTaskConfigReadOptions): TaskRecordReader;
|
|
228
|
+
createPluginTaskRecordReader(context: PluginTaskRecordReaderContext, options: PluginTaskRecordReaderOptions): TaskRecordReader;
|
|
229
|
+
readSyncedTrackerState(projectRoot: string, deps?: unknown, options?: ReadSyncedTrackerOptions): SyncedTrackerSnapshot;
|
|
230
|
+
listReadyTaskIdsFromTracker(snapshot: SyncedTrackerSnapshot): string[];
|
|
231
|
+
normalizeTaskLifecycleStatus(status: unknown): CanonicalTaskLifecycleStatus | null;
|
|
232
|
+
}
|
|
233
|
+
/** Stable id string for the task-data service capability. */
|
|
234
|
+
export declare const TASK_DATA_SERVICE_CAPABILITY_ID = "task-sources.task-data";
|
|
235
|
+
/**
|
|
236
|
+
* The branded task-data capability id. `defineCapability(TASK_DATA_SERVICE_CAPABILITY)`
|
|
237
|
+
* (provider and consumers, independently) resolves to a `TaskDataService`.
|
|
238
|
+
*/
|
|
239
|
+
export declare const TASK_DATA_SERVICE_CAPABILITY: CapabilityId<TaskDataService>;
|
|
@@ -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/task-data.ts
|
|
8
|
+
var TASK_DATA_SERVICE_CAPABILITY_ID = "task-sources.task-data";
|
|
9
|
+
var TASK_DATA_SERVICE_CAPABILITY = makeCapabilityId(TASK_DATA_SERVICE_CAPABILITY_ID);
|
|
10
|
+
export {
|
|
11
|
+
TASK_DATA_SERVICE_CAPABILITY_ID,
|
|
12
|
+
TASK_DATA_SERVICE_CAPABILITY
|
|
13
|
+
};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import type { TaskSummary } from "./graph";
|
|
2
|
+
export type TaskDependencyProjection = Pick<TaskSummary, "id" | "status" | "priority" | "metadata"> & Partial<Pick<TaskSummary, "externalId" | "sourceIssueId" | "dependencies" | "parentChildDeps" | "createdAt" | "updatedAt" | "role" | "scope" | "validationKeys">> & {
|
|
3
|
+
readonly title?: string | null;
|
|
4
|
+
};
|
|
5
|
+
export type ClientTaskProjection = TaskDependencyProjection & {
|
|
6
|
+
readonly title?: string | null;
|
|
7
|
+
readonly assignees?: readonly string[] | null;
|
|
8
|
+
readonly assignedTo?: string | readonly string[] | null;
|
|
9
|
+
readonly labels?: readonly string[] | null;
|
|
10
|
+
};
|
|
11
|
+
export type TaskProjectionInput = {
|
|
12
|
+
readonly id: string;
|
|
13
|
+
readonly title?: string | null;
|
|
14
|
+
readonly status?: string | null;
|
|
15
|
+
readonly source?: string | null;
|
|
16
|
+
readonly url?: string | null;
|
|
17
|
+
readonly body?: string | null;
|
|
18
|
+
readonly priority?: number | string | null;
|
|
19
|
+
readonly assignedTo?: string | readonly string[] | null;
|
|
20
|
+
readonly assignees?: readonly string[] | null;
|
|
21
|
+
readonly dependencies?: readonly string[] | null;
|
|
22
|
+
readonly parentChildDeps?: readonly string[] | null;
|
|
23
|
+
readonly metadata?: Record<string, unknown> | null;
|
|
24
|
+
readonly [key: string]: unknown;
|
|
25
|
+
};
|
|
26
|
+
export type TaskDependencyBadgeKind = "blocked" | "ready" | "dependency";
|
|
27
|
+
export interface TaskDependencyBadge {
|
|
28
|
+
readonly kind: TaskDependencyBadgeKind;
|
|
29
|
+
readonly label: string;
|
|
30
|
+
readonly description: string;
|
|
31
|
+
readonly count?: number;
|
|
32
|
+
readonly taskIds?: readonly string[];
|
|
33
|
+
}
|
|
34
|
+
export interface TaskDependencyBadgeSummary {
|
|
35
|
+
readonly taskId: string;
|
|
36
|
+
readonly blockingDepth: number;
|
|
37
|
+
readonly dependencyIds: readonly string[];
|
|
38
|
+
readonly unresolvedDependencyRefs: readonly string[];
|
|
39
|
+
readonly blockedBy: readonly string[];
|
|
40
|
+
readonly blocks: readonly string[];
|
|
41
|
+
readonly blocked: boolean;
|
|
42
|
+
readonly ready: boolean;
|
|
43
|
+
readonly dependencyCount: number;
|
|
44
|
+
readonly dependentCount: number;
|
|
45
|
+
readonly badges: readonly TaskDependencyBadge[];
|
|
46
|
+
}
|
|
47
|
+
export type TaskScopeInput = readonly string[] | TaskDependencyProjection;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
// @bun
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import type { CapabilityId } from "./capability-id";
|
|
2
|
+
import type { TaskSourceRegistration } from "./plugin";
|
|
3
|
+
import type { TaskBrowserConfig } from "./browser";
|
|
4
|
+
/**
|
|
5
|
+
* A single entry in the on-disk task-config map (`.rig/task-config.json`).
|
|
6
|
+
* Floor-neutral DATA shape. The READ/normalize POLICY (synchronize, strip
|
|
7
|
+
* metadata, validation-description extraction) is owned by
|
|
8
|
+
* @rig/task-sources-plugin (`task-state`), NOT the floor.
|
|
9
|
+
*/
|
|
10
|
+
export type TaskConfigEntry = {
|
|
11
|
+
title?: string;
|
|
12
|
+
status?: string;
|
|
13
|
+
role?: string;
|
|
14
|
+
description?: string;
|
|
15
|
+
acceptance_criteria?: string;
|
|
16
|
+
scope?: string[];
|
|
17
|
+
validation?: string[];
|
|
18
|
+
browser?: TaskBrowserConfig;
|
|
19
|
+
repo_pins?: Record<string, string>;
|
|
20
|
+
criticality?: "core" | "high" | "normal";
|
|
21
|
+
queue_weight?: number;
|
|
22
|
+
creates_repo?: boolean;
|
|
23
|
+
auto_synced?: boolean;
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* A single task record returned by a task source adapter.
|
|
27
|
+
* Open-ended to allow adapters to include source-specific fields.
|
|
28
|
+
*/
|
|
29
|
+
export interface TaskRecord {
|
|
30
|
+
id: string;
|
|
31
|
+
deps: readonly string[];
|
|
32
|
+
status: "ready" | "in_progress" | "closed" | "blocked" | "open" | string;
|
|
33
|
+
[extra: string]: unknown;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* The NORMALIZED, surface-facing task shape (the projection consumers read).
|
|
37
|
+
* The TYPE is floor-neutral vocab and lives here in contracts; the
|
|
38
|
+
* normalization POLICY that produces it (field-mapping a raw `TaskRecord` into
|
|
39
|
+
* this shape — title/body/url/dependency fallback chains) is owned by
|
|
40
|
+
* @rig/task-sources-plugin (`toRigTask`), NOT by the floor.
|
|
41
|
+
*/
|
|
42
|
+
export type RigTask = {
|
|
43
|
+
readonly id: string;
|
|
44
|
+
readonly title?: string | null;
|
|
45
|
+
readonly status?: string | null;
|
|
46
|
+
readonly source?: string | null;
|
|
47
|
+
readonly url?: string | null;
|
|
48
|
+
readonly body?: string | null;
|
|
49
|
+
readonly priority?: number | string | null;
|
|
50
|
+
readonly assignedTo?: string | readonly string[] | null;
|
|
51
|
+
readonly assignees?: readonly string[] | null;
|
|
52
|
+
readonly dependencies?: readonly string[] | null;
|
|
53
|
+
readonly parentChildDeps?: readonly string[] | null;
|
|
54
|
+
readonly metadata?: Record<string, unknown> | null;
|
|
55
|
+
readonly [key: string]: unknown;
|
|
56
|
+
};
|
|
57
|
+
/** Alias retained for call sites that accept any task-like projection. */
|
|
58
|
+
export type TaskLike = RigTask;
|
|
59
|
+
/**
|
|
60
|
+
* A registered task source adapter — combines the plugin-level registration
|
|
61
|
+
* metadata with the runtime-callable interface.
|
|
62
|
+
*/
|
|
63
|
+
export interface TaskSourceUpdate {
|
|
64
|
+
status?: TaskRecord["status"];
|
|
65
|
+
title?: string;
|
|
66
|
+
body?: string;
|
|
67
|
+
comment?: string;
|
|
68
|
+
metadata?: Record<string, unknown>;
|
|
69
|
+
}
|
|
70
|
+
export interface TaskSourceCreateInput {
|
|
71
|
+
title: string;
|
|
72
|
+
body: string;
|
|
73
|
+
deps?: readonly string[];
|
|
74
|
+
parents?: readonly string[];
|
|
75
|
+
metadata?: Record<string, unknown>;
|
|
76
|
+
}
|
|
77
|
+
export type TaskSourceCreateResult = TaskRecord;
|
|
78
|
+
export interface RegisteredTaskSource extends TaskSourceRegistration {
|
|
79
|
+
list(): Promise<readonly TaskRecord[]>;
|
|
80
|
+
get?(id: string): Promise<TaskRecord | undefined>;
|
|
81
|
+
updateStatus?(id: string, status: TaskRecord["status"]): Promise<void>;
|
|
82
|
+
updateTask?(id: string, update: TaskSourceUpdate): Promise<void>;
|
|
83
|
+
create?(input: TaskSourceCreateInput): Promise<TaskSourceCreateResult>;
|
|
84
|
+
}
|
|
85
|
+
export type TaskIoCreateResult = {
|
|
86
|
+
readonly taskId: string | null;
|
|
87
|
+
readonly source: string;
|
|
88
|
+
readonly result: unknown;
|
|
89
|
+
};
|
|
90
|
+
/**
|
|
91
|
+
* Source-owned task IO projection seam. Providers normalize raw task-source
|
|
92
|
+
* records into RigTask and adapt generic task creation payloads to the
|
|
93
|
+
* configured source; consumers resolve this instead of importing @rig/core
|
|
94
|
+
* task-source glue.
|
|
95
|
+
*/
|
|
96
|
+
export interface TaskIoService {
|
|
97
|
+
listTasks(projectRoot: string): Promise<readonly RigTask[]>;
|
|
98
|
+
getTask(projectRoot: string, taskId: string): Promise<RigTask | null>;
|
|
99
|
+
createTask(projectRoot: string, task: Record<string, unknown>): Promise<TaskIoCreateResult>;
|
|
100
|
+
}
|
|
101
|
+
export declare const TASK_IO_SERVICE_CAPABILITY_ID = "task-sources.task-io";
|
|
102
|
+
export declare const TASK_IO_SERVICE_CAPABILITY: CapabilityId<TaskIoService>;
|
package/dist/src/task-source.js
CHANGED
|
@@ -1 +1,13 @@
|
|
|
1
1
|
// @bun
|
|
2
|
+
// packages/contracts/src/capability-id.ts
|
|
3
|
+
function makeCapabilityId(id) {
|
|
4
|
+
return id;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
// packages/contracts/src/task-source.ts
|
|
8
|
+
var TASK_IO_SERVICE_CAPABILITY_ID = "task-sources.task-io";
|
|
9
|
+
var TASK_IO_SERVICE_CAPABILITY = makeCapabilityId(TASK_IO_SERVICE_CAPABILITY_ID);
|
|
10
|
+
export {
|
|
11
|
+
TASK_IO_SERVICE_CAPABILITY_ID,
|
|
12
|
+
TASK_IO_SERVICE_CAPABILITY
|
|
13
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export type CanonicalTaskLifecycleStatus = "draft" | "open" | "ready" | "queued" | "in_progress" | "under_review" | "blocked" | "completed" | "cancelled";
|
|
2
|
+
export type TaskStateMetadata = {
|
|
3
|
+
claimId?: string;
|
|
4
|
+
status: CanonicalTaskLifecycleStatus;
|
|
5
|
+
ownerId?: string;
|
|
6
|
+
claimedAt?: string;
|
|
7
|
+
lastEvidenceAt?: string;
|
|
8
|
+
runId?: string;
|
|
9
|
+
branchName?: string;
|
|
10
|
+
prNumber?: number;
|
|
11
|
+
prUrl?: string;
|
|
12
|
+
reviewState?: string;
|
|
13
|
+
blockerReason?: string;
|
|
14
|
+
sourceCommit?: string;
|
|
15
|
+
};
|
|
16
|
+
export type TaskStateMetadataEnvelope = {
|
|
17
|
+
schemaVersion: number;
|
|
18
|
+
supported: boolean;
|
|
19
|
+
baseTrackerCommit: string | null;
|
|
20
|
+
tasks: Record<string, TaskStateMetadata>;
|
|
21
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
// @bun
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
import { Schema } from "effect";
|
|
2
|
+
export declare const DEFAULT_TERMINAL_ID = "default";
|
|
3
|
+
export declare const TerminalThreadInput: Schema.Struct<{
|
|
4
|
+
readonly threadId: Schema.Trim;
|
|
5
|
+
}>;
|
|
6
|
+
export type TerminalThreadInput = Schema.Codec.Encoded<typeof TerminalThreadInput>;
|
|
7
|
+
declare const TerminalSessionInput: Schema.Struct<{
|
|
8
|
+
readonly terminalId: Schema.withDecodingDefault<Schema.Trim>;
|
|
9
|
+
readonly threadId: Schema.Trim;
|
|
10
|
+
}>;
|
|
11
|
+
export type TerminalSessionInput = Schema.Codec.Encoded<typeof TerminalSessionInput>;
|
|
12
|
+
export declare const TerminalOpenInput: Schema.Struct<{
|
|
13
|
+
readonly cwd: Schema.Trim;
|
|
14
|
+
readonly cols: Schema.optional<Schema.Int>;
|
|
15
|
+
readonly rows: Schema.optional<Schema.Int>;
|
|
16
|
+
readonly env: Schema.optional<Schema.$Record<Schema.String, Schema.String>>;
|
|
17
|
+
readonly terminalId: Schema.withDecodingDefault<Schema.Trim>;
|
|
18
|
+
readonly threadId: Schema.Trim;
|
|
19
|
+
}>;
|
|
20
|
+
export type TerminalOpenInput = Schema.Codec.Encoded<typeof TerminalOpenInput>;
|
|
21
|
+
export declare const TerminalWriteInput: Schema.Struct<{
|
|
22
|
+
readonly data: Schema.String;
|
|
23
|
+
readonly terminalId: Schema.withDecodingDefault<Schema.Trim>;
|
|
24
|
+
readonly threadId: Schema.Trim;
|
|
25
|
+
}>;
|
|
26
|
+
export type TerminalWriteInput = Schema.Codec.Encoded<typeof TerminalWriteInput>;
|
|
27
|
+
export declare const TerminalResizeInput: Schema.Struct<{
|
|
28
|
+
readonly cols: Schema.Int;
|
|
29
|
+
readonly rows: Schema.Int;
|
|
30
|
+
readonly terminalId: Schema.withDecodingDefault<Schema.Trim>;
|
|
31
|
+
readonly threadId: Schema.Trim;
|
|
32
|
+
}>;
|
|
33
|
+
export type TerminalResizeInput = Schema.Codec.Encoded<typeof TerminalResizeInput>;
|
|
34
|
+
export declare const TerminalClearInput: Schema.Struct<{
|
|
35
|
+
readonly terminalId: Schema.withDecodingDefault<Schema.Trim>;
|
|
36
|
+
readonly threadId: Schema.Trim;
|
|
37
|
+
}>;
|
|
38
|
+
export type TerminalClearInput = Schema.Codec.Encoded<typeof TerminalClearInput>;
|
|
39
|
+
export declare const TerminalRestartInput: Schema.Struct<{
|
|
40
|
+
readonly cwd: Schema.Trim;
|
|
41
|
+
readonly cols: Schema.Int;
|
|
42
|
+
readonly rows: Schema.Int;
|
|
43
|
+
readonly env: Schema.optional<Schema.$Record<Schema.String, Schema.String>>;
|
|
44
|
+
readonly threadId: Schema.Trim;
|
|
45
|
+
}>;
|
|
46
|
+
export declare const TerminalCloseInput: Schema.Struct<{
|
|
47
|
+
readonly terminalId: Schema.optional<Schema.Trim>;
|
|
48
|
+
readonly deleteHistory: Schema.optional<Schema.Boolean>;
|
|
49
|
+
readonly threadId: Schema.Trim;
|
|
50
|
+
}>;
|
|
51
|
+
export type TerminalCloseInput = Schema.Codec.Encoded<typeof TerminalCloseInput>;
|
|
52
|
+
export declare const TerminalSessionStatus: Schema.Literals<readonly ["starting", "running", "exited", "error"]>;
|
|
53
|
+
export type TerminalSessionStatus = typeof TerminalSessionStatus.Type;
|
|
54
|
+
export declare const TerminalSessionSnapshot: Schema.Struct<{
|
|
55
|
+
readonly threadId: Schema.String;
|
|
56
|
+
readonly terminalId: Schema.String;
|
|
57
|
+
readonly cwd: Schema.String;
|
|
58
|
+
readonly status: Schema.Literals<readonly ["starting", "running", "exited", "error"]>;
|
|
59
|
+
readonly pid: Schema.NullOr<Schema.Int>;
|
|
60
|
+
readonly history: Schema.String;
|
|
61
|
+
readonly exitCode: Schema.NullOr<Schema.Int>;
|
|
62
|
+
readonly exitSignal: Schema.NullOr<Schema.String>;
|
|
63
|
+
readonly updatedAt: Schema.String;
|
|
64
|
+
}>;
|
|
65
|
+
export type TerminalSessionSnapshot = typeof TerminalSessionSnapshot.Type;
|
|
66
|
+
export declare const TerminalEvent: Schema.Union<readonly [Schema.Struct<{
|
|
67
|
+
readonly type: Schema.Literal<"started">;
|
|
68
|
+
readonly snapshot: Schema.Struct<{
|
|
69
|
+
readonly threadId: Schema.String;
|
|
70
|
+
readonly terminalId: Schema.String;
|
|
71
|
+
readonly cwd: Schema.String;
|
|
72
|
+
readonly status: Schema.Literals<readonly ["starting", "running", "exited", "error"]>;
|
|
73
|
+
readonly pid: Schema.NullOr<Schema.Int>;
|
|
74
|
+
readonly history: Schema.String;
|
|
75
|
+
readonly exitCode: Schema.NullOr<Schema.Int>;
|
|
76
|
+
readonly exitSignal: Schema.NullOr<Schema.String>;
|
|
77
|
+
readonly updatedAt: Schema.String;
|
|
78
|
+
}>;
|
|
79
|
+
readonly threadId: Schema.String;
|
|
80
|
+
readonly terminalId: Schema.String;
|
|
81
|
+
readonly createdAt: Schema.String;
|
|
82
|
+
}>, Schema.Struct<{
|
|
83
|
+
readonly type: Schema.Literal<"output">;
|
|
84
|
+
readonly data: Schema.String;
|
|
85
|
+
readonly threadId: Schema.String;
|
|
86
|
+
readonly terminalId: Schema.String;
|
|
87
|
+
readonly createdAt: Schema.String;
|
|
88
|
+
}>, Schema.Struct<{
|
|
89
|
+
readonly type: Schema.Literal<"exited">;
|
|
90
|
+
readonly exitCode: Schema.NullOr<Schema.Int>;
|
|
91
|
+
readonly exitSignal: Schema.NullOr<Schema.String>;
|
|
92
|
+
readonly threadId: Schema.String;
|
|
93
|
+
readonly terminalId: Schema.String;
|
|
94
|
+
readonly createdAt: Schema.String;
|
|
95
|
+
}>, Schema.Struct<{
|
|
96
|
+
readonly type: Schema.Literal<"error">;
|
|
97
|
+
readonly message: Schema.String;
|
|
98
|
+
readonly threadId: Schema.String;
|
|
99
|
+
readonly terminalId: Schema.String;
|
|
100
|
+
readonly createdAt: Schema.String;
|
|
101
|
+
}>, Schema.Struct<{
|
|
102
|
+
readonly type: Schema.Literal<"cleared">;
|
|
103
|
+
readonly threadId: Schema.String;
|
|
104
|
+
readonly terminalId: Schema.String;
|
|
105
|
+
readonly createdAt: Schema.String;
|
|
106
|
+
}>, Schema.Struct<{
|
|
107
|
+
readonly type: Schema.Literal<"restarted">;
|
|
108
|
+
readonly snapshot: Schema.Struct<{
|
|
109
|
+
readonly threadId: Schema.String;
|
|
110
|
+
readonly terminalId: Schema.String;
|
|
111
|
+
readonly cwd: Schema.String;
|
|
112
|
+
readonly status: Schema.Literals<readonly ["starting", "running", "exited", "error"]>;
|
|
113
|
+
readonly pid: Schema.NullOr<Schema.Int>;
|
|
114
|
+
readonly history: Schema.String;
|
|
115
|
+
readonly exitCode: Schema.NullOr<Schema.Int>;
|
|
116
|
+
readonly exitSignal: Schema.NullOr<Schema.String>;
|
|
117
|
+
readonly updatedAt: Schema.String;
|
|
118
|
+
}>;
|
|
119
|
+
readonly threadId: Schema.String;
|
|
120
|
+
readonly terminalId: Schema.String;
|
|
121
|
+
readonly createdAt: Schema.String;
|
|
122
|
+
}>, Schema.Struct<{
|
|
123
|
+
readonly type: Schema.Literal<"activity">;
|
|
124
|
+
readonly hasRunningSubprocess: Schema.Boolean;
|
|
125
|
+
readonly threadId: Schema.String;
|
|
126
|
+
readonly terminalId: Schema.String;
|
|
127
|
+
readonly createdAt: Schema.String;
|
|
128
|
+
}>]>;
|
|
129
|
+
export type TerminalEvent = typeof TerminalEvent.Type;
|
|
130
|
+
export {};
|
package/dist/src/terminal.js
CHANGED
|
@@ -16,6 +16,9 @@ var WorkspaceId = makeEntityId("WorkspaceId");
|
|
|
16
16
|
var GraphId = makeEntityId("GraphId");
|
|
17
17
|
var TaskId = makeEntityId("TaskId");
|
|
18
18
|
var RunId = makeEntityId("RunId");
|
|
19
|
+
var SafePathSegment = TrimmedNonEmptyString.check(Schema.isPattern(/^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$/)).pipe(Schema.brand("SafePathSegment"));
|
|
20
|
+
var SafeRunId = TrimmedNonEmptyString.check(Schema.isPattern(/^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$/)).pipe(Schema.brand("SafeRunId"));
|
|
21
|
+
var SafeGitRefComponent = TrimmedNonEmptyString.check(Schema.isPattern(/^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$/)).pipe(Schema.brand("SafeGitRefComponent"));
|
|
19
22
|
var EngineRuntimeId = makeEntityId("EngineRuntimeId");
|
|
20
23
|
var ConversationId = makeEntityId("ConversationId");
|
|
21
24
|
var ActionId = makeEntityId("ActionId");
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tool-materializer capability seam.
|
|
3
|
+
*
|
|
4
|
+
* Defines the TOOL_MATERIALIZER service port that @rig/isolation-plugin
|
|
5
|
+
* consumes to build the runtime tool binaries (tool gateway, file tools,
|
|
6
|
+
* claude router, browser tools) without importing @rig/provider-plugin impl
|
|
7
|
+
* files directly. @rig/provider-plugin provides the capability; isolation-plugin
|
|
8
|
+
* resolves it via requireInstalledCapability — the SEAM-ONLY replacement for
|
|
9
|
+
* the four cross-plugin impl imports (§6.4).
|
|
10
|
+
*
|
|
11
|
+
* Pure: types + one branded id, no behaviour.
|
|
12
|
+
*/
|
|
13
|
+
import type { CapabilityId } from "./capability-id";
|
|
14
|
+
/**
|
|
15
|
+
* The tool-materializer service: builds provider-plugin-owned runtime tool
|
|
16
|
+
* binaries into the given bin directory.
|
|
17
|
+
*/
|
|
18
|
+
export interface ToolMaterializerService {
|
|
19
|
+
/** Materialize the runtime tool gateway binary. Returns the path. */
|
|
20
|
+
materializeRuntimeToolGateway(binDir: string): Promise<string>;
|
|
21
|
+
/** Materialize the runtime file-tools binary. Returns the path. */
|
|
22
|
+
materializeRuntimeFileTools(targetDir: string): Promise<string>;
|
|
23
|
+
/** Materialize the Claude tool-router binary. Returns the path. */
|
|
24
|
+
materializeClaudeToolRouterBinary(projectRoot: string, targetDir: string): Promise<string>;
|
|
25
|
+
/** Materialize the runtime browser-tools binary. Returns the path. */
|
|
26
|
+
materializeRuntimeBrowserTools(targetDir: string): Promise<string>;
|
|
27
|
+
/** Synchronously resolve the runtime browser-tool binary name. */
|
|
28
|
+
runtimeBrowserToolBinaryName(): string;
|
|
29
|
+
}
|
|
30
|
+
/** Stable id string for the tool-materializer service capability. */
|
|
31
|
+
export declare const TOOL_MATERIALIZER_CAPABILITY_ID = "provider.tool-materializer";
|
|
32
|
+
/**
|
|
33
|
+
* The branded tool-materializer capability id. `defineCapability(TOOL_MATERIALIZER)`
|
|
34
|
+
* (provider and consumers independently) resolves to a `ToolMaterializerService`.
|
|
35
|
+
*/
|
|
36
|
+
export declare const TOOL_MATERIALIZER: CapabilityId<ToolMaterializerService>;
|
|
@@ -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/tool-materializer.ts
|
|
8
|
+
var TOOL_MATERIALIZER_CAPABILITY_ID = "provider.tool-materializer";
|
|
9
|
+
var TOOL_MATERIALIZER = makeCapabilityId(TOOL_MATERIALIZER_CAPABILITY_ID);
|
|
10
|
+
export {
|
|
11
|
+
TOOL_MATERIALIZER_CAPABILITY_ID,
|
|
12
|
+
TOOL_MATERIALIZER
|
|
13
|
+
};
|