@re-cinq/floor-contracts 0.3.0 → 0.5.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.
- package/dist/index.d.ts +1 -1
- package/dist/wire.d.ts +74 -3
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export type { AgentDefinitionBody, AgentSettings, Brief, Item, ItemKind, LineArgSpec, LineBody, LineEdge, LineNode, LineNodeReport, LineStart, ModelPrice, NeedSpec, ProduceSpec, Report, ScheduleBody, StationBody, StationKind, WhenValue, } from "./definitions.js";
|
|
2
|
-
export type { BlobRef, BriefConversation, BriefNeed, BriefSettings, ClaimedEvent, DefinitionKind, ExecutorSettings, FileNeed, GitCredential, GitNeed, McpServerSettings, PodResources, MigrationBody, Problem, PutResult, ValueNeed, VisitBrief, } from "./wire.js";
|
|
2
|
+
export type { AgentPresence, AgentRecipes, BlobRef, BriefConversation, BriefNeed, BriefSettings, ClaimedEvent, ClusterHolding, ClusterPresence, ClusterRegistration, ClusterVersions, DefinitionKind, ExecutorSettings, FileNeed, GitCredential, GitNeed, McpServerSettings, PodResources, PresenceState, MigrationBody, Problem, PutResult, SubsystemVersions, ValueNeed, VisitBrief, } from "./wire.js";
|
|
3
3
|
export type { CostsRow, DefinitionRowFields, DefinitionRowView, FloorEventFields, FloorEventView, FloorFrame, LiveFrame, RecordKind, RunFields, RunView, StationRunRecordFields, StationRunRecordView, VisitFields, VisitView, } from "./views.js";
|
package/dist/wire.d.ts
CHANGED
|
@@ -46,6 +46,14 @@ export interface McpServerSettings {
|
|
|
46
46
|
args?: string[];
|
|
47
47
|
url?: string;
|
|
48
48
|
headersSecret?: string;
|
|
49
|
+
/** http and sse: headers whose values the pod reads from the cluster's agent-secrets, by key. */
|
|
50
|
+
headers?: SecretRef[];
|
|
51
|
+
/** stdio: env vars of the server process, valued the same way. */
|
|
52
|
+
env?: SecretRef[];
|
|
53
|
+
}
|
|
54
|
+
export interface SecretRef {
|
|
55
|
+
name: string;
|
|
56
|
+
ref: string;
|
|
49
57
|
}
|
|
50
58
|
/** An agent definition's `config`, under the names the wire uses rather than the snake_case a definition is authored in. */
|
|
51
59
|
export interface ExecutorSettings {
|
|
@@ -63,10 +71,12 @@ export interface PodResources {
|
|
|
63
71
|
requests?: Record<string, string>;
|
|
64
72
|
limits?: Record<string, string>;
|
|
65
73
|
}
|
|
74
|
+
/** `timeoutMinutes` is the definition's own work budget, the same for every visit; `VisitBrief.deadlineMinutes` is what is left of this visit's. */
|
|
66
75
|
export type BriefSettings = ExecutorSettings & {
|
|
67
76
|
model?: string;
|
|
68
77
|
prompt: string;
|
|
69
78
|
image: string;
|
|
79
|
+
timeoutMinutes?: number;
|
|
70
80
|
};
|
|
71
81
|
/** `GET /station-runs/:id/brief`: everything an executor needs to run one visit, and a token that reaches only this visit. */
|
|
72
82
|
export interface VisitBrief {
|
|
@@ -87,15 +97,75 @@ export interface VisitBrief {
|
|
|
87
97
|
conversation: BriefConversation;
|
|
88
98
|
modelSecretKey?: string;
|
|
89
99
|
}
|
|
90
|
-
|
|
91
|
-
export interface ClaimedEvent {
|
|
100
|
+
interface ClaimedFields {
|
|
92
101
|
id: string;
|
|
102
|
+
tags: string[];
|
|
103
|
+
attempts: number;
|
|
104
|
+
}
|
|
105
|
+
/** `POST /events/claim` answers only what a worker may take: a visit to dispatch or abort, or an agent definition whose latest version this cluster should hold. */
|
|
106
|
+
export type ClaimedEvent = (ClaimedFields & {
|
|
93
107
|
name: "station_run.dispatch" | "station_run.abort";
|
|
94
108
|
payload: {
|
|
95
109
|
visitId: string;
|
|
96
110
|
};
|
|
111
|
+
}) | (ClaimedFields & {
|
|
112
|
+
name: "agent_definition.changed";
|
|
113
|
+
payload: {
|
|
114
|
+
id: string;
|
|
115
|
+
hash: string;
|
|
116
|
+
};
|
|
117
|
+
});
|
|
118
|
+
/** all: every live cluster holds the latest version. some: a cluster holds a version, but not every one the latest. none: no cluster holds any. */
|
|
119
|
+
export type PresenceState = "all" | "some" | "none";
|
|
120
|
+
export interface ClusterPresence {
|
|
121
|
+
id: string;
|
|
122
|
+
/** The version this cluster's kube holds; null when it holds none. */
|
|
123
|
+
hash: string | null;
|
|
124
|
+
current: boolean;
|
|
125
|
+
}
|
|
126
|
+
/** `GET /agent-definitions/presence`, by agent definition id. */
|
|
127
|
+
export interface AgentPresence {
|
|
128
|
+
state: PresenceState;
|
|
129
|
+
latest: string;
|
|
130
|
+
clusters: ClusterPresence[];
|
|
131
|
+
}
|
|
132
|
+
/** The agent subsystem a cluster runs, as its `agent-subsystem-versions` ConfigMap says: its release and the CLI each vendor's pod runs, by vendor (`claude`, `codex`, `gemini`, `opencode`). */
|
|
133
|
+
export interface SubsystemVersions {
|
|
134
|
+
version: string;
|
|
135
|
+
clis: Record<string, string>;
|
|
136
|
+
}
|
|
137
|
+
/** `PUT /clusters/{id}`: what a cluster agent sends each time it registers. `build` and `subsystem` are absent from an older agent; `subsystem` is null when the cluster's ConfigMap could not be read. */
|
|
138
|
+
export interface ClusterRegistration {
|
|
97
139
|
tags: string[];
|
|
98
|
-
|
|
140
|
+
build?: string;
|
|
141
|
+
subsystem?: SubsystemVersions | null;
|
|
142
|
+
}
|
|
143
|
+
/** One live cluster on `GET /version`: the cluster agent's build and the subsystem it last reported. */
|
|
144
|
+
export interface ClusterVersions {
|
|
145
|
+
id: string;
|
|
146
|
+
build: string | null;
|
|
147
|
+
subsystem: SubsystemVersions | null;
|
|
148
|
+
lastSeenAt: string;
|
|
149
|
+
}
|
|
150
|
+
/** `GET /agent-definitions/{id}/clusters`: what one cluster read back out of its kube. */
|
|
151
|
+
export interface ClusterHolding<Body = unknown> {
|
|
152
|
+
clusterId: string;
|
|
153
|
+
hash: string;
|
|
154
|
+
body: Body;
|
|
155
|
+
appliedAt: string;
|
|
156
|
+
}
|
|
157
|
+
/** `GET /agent-definitions/{id}/recipes`: the latest version, and the settings a visit of each variant is briefed with. `variant` null is the base. */
|
|
158
|
+
export interface AgentRecipes<Body = unknown> {
|
|
159
|
+
id: string;
|
|
160
|
+
hash: string;
|
|
161
|
+
body: Body;
|
|
162
|
+
/** The floor as a pod reaches it, as a visit's brief says it. */
|
|
163
|
+
floorBaseUrl: string;
|
|
164
|
+
recipes: {
|
|
165
|
+
variant: string | null;
|
|
166
|
+
settings: BriefSettings;
|
|
167
|
+
modelSecretKey?: string;
|
|
168
|
+
}[];
|
|
99
169
|
}
|
|
100
170
|
/** What a floor answers for bytes it now keeps: `POST /blobs`, and a saved conversation. */
|
|
101
171
|
export interface BlobRef {
|
|
@@ -117,3 +187,4 @@ export interface GitCredential {
|
|
|
117
187
|
username: string;
|
|
118
188
|
password: string;
|
|
119
189
|
}
|
|
190
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@re-cinq/floor-contracts",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"description": "The floor's wire, as types: what its HTTP routes and its live socket take and answer, and nothing else. No runtime, no dependencies.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|