@re-cinq/floor-contracts 0.8.0 → 0.10.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 CHANGED
@@ -1,3 +1,11 @@
1
+ /**
2
+ * Floor contracts describe the data exchanged by its [HTTP API](/floor/reference/http-api/)
3
+ * and live connections. Use them to type your own integrations, from a visit report to a
4
+ * notification about an [assembly run](/floor/concepts/assembly-run/). The package exports
5
+ * TypeScript types only. The [Client SDK](/floor/sdk/client/) provides the HTTP and socket operations.
6
+ *
7
+ * @packageDocumentation
8
+ */
1
9
  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 { 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";
10
+ 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, ModelCatalogStatus, CatalogVendor, CatalogModel, ModelVendor, ValueNeed, VisitBrief, } from "./wire.js";
3
11
  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,11 +46,18 @@ export interface McpServerSettings {
46
46
  args?: string[];
47
47
  url?: string;
48
48
  headersSecret?: string;
49
+ /** http and sse: asks for a gateway token, and holds none. The floor signs one for each visit, a JWT for this server that arrives in `VisitBrief.serverTokens`, and the pod presents it in place of a header kept in a secret. Never beside `headersSecret`. Not the visit token (`VisitBrief.token`, `visitToken()` of `@re-cinq/floor-client`), the HMAC token a visit presents to the floor's own routes. */
50
+ visitToken?: GatewayTokenSettings;
49
51
  /** http and sse: headers whose values the pod reads from the cluster's agent-secrets, by key. */
50
52
  headers?: SecretRef[];
51
53
  /** stdio: env vars of the server process, valued the same way. */
52
54
  env?: SecretRef[];
53
55
  }
56
+ /** Who a gateway token is for, and what it may do there. Both are the server's own words: the floor signs them and reads neither. */
57
+ export interface GatewayTokenSettings {
58
+ audience: string;
59
+ scopes: string[];
60
+ }
54
61
  export interface SecretRef {
55
62
  name: string;
56
63
  ref: string;
@@ -96,6 +103,8 @@ export interface VisitBrief {
96
103
  produces: ProduceSpec[];
97
104
  conversation: BriefConversation;
98
105
  modelSecretKey?: string;
106
+ /** One gateway token for each MCP server whose settings carry `visitToken`, by the server's name. Absent when none asks. */
107
+ serverTokens?: Record<string, string>;
99
108
  }
100
109
  interface ClaimedFields {
101
110
  id: string;
@@ -128,23 +137,47 @@ export interface AgentPresence {
128
137
  state: PresenceState;
129
138
  latest: string;
130
139
  clusters: ClusterPresence[];
140
+ /** Whether the live clusters' model catalogs can run the definition's model; "unverified" when none can tell. */
141
+ modelAvailable: true | false | "unverified";
131
142
  }
132
143
  /** 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
144
  export interface SubsystemVersions {
134
145
  version: string;
135
146
  clis: Record<string, string>;
136
147
  }
148
+ /** A model vendor's name as the catalog keys it (`claude`, `codex`, `gemini`, `opencode`). */
149
+ export type ModelVendor = string;
150
+ export interface CatalogModel {
151
+ id: string;
152
+ displayName: string;
153
+ }
154
+ /** One vendor's slice of a cluster's model catalog: the models its key lists, or the `error` that stopped the listing. */
155
+ export interface CatalogVendor {
156
+ vendor: ModelVendor;
157
+ provider: string;
158
+ secretRefs: string[];
159
+ error: string;
160
+ models: CatalogModel[];
161
+ }
162
+ /** The status of the `ModelCatalog default` a cluster publishes. */
163
+ export interface ModelCatalogStatus {
164
+ refreshedAt: string;
165
+ vendors: CatalogVendor[];
166
+ }
137
167
  /** `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
168
  export interface ClusterRegistration {
139
169
  tags: string[];
140
170
  build?: string;
141
171
  subsystem?: SubsystemVersions | null;
172
+ models?: ModelCatalogStatus | null;
142
173
  }
143
174
  /** One live cluster on `GET /version`: the cluster agent's build and the subsystem it last reported. */
144
175
  export interface ClusterVersions {
145
176
  id: string;
146
177
  build: string | null;
147
178
  subsystem: SubsystemVersions | null;
179
+ /** The status of its subsystem's `ModelCatalog default`: the models it can run; null when the agent could not read it. */
180
+ models: ModelCatalogStatus | null;
148
181
  lastSeenAt: string;
149
182
  }
150
183
  /** `GET /agent-definitions/{id}/clusters`: what one cluster read back out of its kube. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@re-cinq/floor-contracts",
3
- "version": "0.8.0",
3
+ "version": "0.10.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": {