@miadi/tide-contract 0.3.0 → 0.3.2

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/README.md CHANGED
@@ -1,33 +1,65 @@
1
1
  # @miadi/tide-contract
2
2
 
3
- Schema-first contract for the Tide operator cockpit boundary.
3
+ The shared schema for steering agents in terminals: what the `tide` runtime answers and what a
4
+ client can expect back.
4
5
 
5
- This package is the shared covenant between:
6
+ In the Miadi stack, `@miadi/tide` reads and steers the agents working in tmux or herdr panes,
7
+ and the `tide` runtime (the `ironsilk` Python package) does the work on the machine. This
8
+ package is the agreement between the two: one JSON Schema, and TypeScript types that follow
9
+ it. A Python runtime validates against the schema, a TypeScript client compiles against the
10
+ types, and a change to either shows up as a difference here first.
6
11
 
7
- - the IronSilk `tide` runtime,
8
- - the `@miadi/tide` TypeScript client,
9
- - the `/api/tide/*` Next.js routes,
10
- - and the cockpit UI at `/tide`.
12
+ Works with:
11
13
 
12
- ## Current shape
14
+ - `@miadi/tide`: the TypeScript client, whose verbs return these types.
15
+ - the `tide` CLI and daemon from `ironsilk`: the runtime these shapes describe.
13
16
 
14
- - `schema/tide-api.schema.json` is the planned source of truth.
15
- - `src/index.ts` carries hand-written TypeScript types for this scaffold, edited in lockstep with the schema (guarded by `npm test`, `test/schema-patterns.test.ts`).
16
- - 0.2.0 adds the `multiplexer` discriminator (`"tmux" | "herdr"`, absent ⇒ `"tmux"`), pane targets in both formats, optional `pane_label`, the `TideSendKeysResult` discriminated union, and optional `agent_status` on `EpisodeLane` / `TidePendingApproval`.
17
- - 0.2.1 corrects the herdr pane-id story from the EP137 live smoke (herdr 0.7.4): real ids are `w1:p2` (legacy `1-2` still accepted), **session-scoped and monotonic** — they do not compact or get reused when panes close, a stale id fails loudly with `pane_not_found`, and `pane rename` sets the `label` field that label→id resolution matches at action time.
18
- - 0.2.2 types the remaining live-verified herdr envelopes: `TideHerdrPaneInfo` (`pane list` rows), `TideHerdrWaitOutputResult` (`wait output` hit), and `TideHerdrAgentStatusEvent` (`wait agent-status` hits print an EVENT envelope, not a result envelope).
19
- - 0.2.3 adds the one-call inventory snapshot `TideHerdrInventory` (+ `TideHerdrWorkspaceInfo`/`TideHerdrTabInfo`) behind `getHerdrInventory()`, and widens every pane-id pattern to ALPHANUMERIC segments — live herdr allocates pane suffixes past `p9` as letters (`w2:pE` observed 2026-07-18), which the digits-only patterns rejected.
20
- - 0.2.4 (unpublished) covenants the peek response from live EP152 cockpit receipts — the previously documented `pane?`/`lines?` fields were fiction; `TidePeekResult` is now the `TideTmuxPeekResult` (`{target, resolved, content}`) / `TideHerdrPeekResult` (`{multiplexer, pane, lines, text}`) union — and lands the deterministic schema→TS drift gate (see Drift posture).
21
- - Runtime identity constants are exported from `src/index.ts` and mirrored in the schema `x-tide` metadata: `tide`, `MIADI_HOME`, `~/.miadi/navigator`, and `miadi.tide.daemon.v2`.
22
- - Future work should generate the TypeScript types from the schema and validate IronSilk runtime payloads with Python `jsonschema`.
17
+ ## Install
23
18
 
24
- ## Drift posture
19
+ ```bash
20
+ npm i @miadi/tide-contract
21
+ ```
25
22
 
26
- Steps 1–2 of the intended CI shape are live in `npm test` (jgwill/Miadi#378):
23
+ ```ts
24
+ import type { ContextSnapshot, TidePeekResult, TideSendKeysResult } from "@miadi/tide-contract"
25
+ import { TIDE_DAEMON_CONTRACT_VERSION } from "@miadi/tide-contract"
26
+ import schema from "@miadi/tide-contract/schema/tide-api.schema.json" with { type: "json" }
27
+ ```
27
28
 
28
- 1. **Done** — `scripts/generate-schema-reference.mjs` deterministically emits reference types from `schema/tide-api.schema.json` into `test/schema-reference.generated.ts` (committed; regenerate with `npm run generate:reference`).
29
- 2. **Done** — `test/drift-gate.test.ts` byte-checks the committed reference (`npm run drift:check`) and compile-asserts exact assignability between every public export and its reference type. Pre-existing divergences sit in explicit waiver sections whose pins fail the build once reconciled. **Layered claims (post-W11):** the byte-check is the schema-movement tripwire — constraint-only edits (pattern/bounds) reach it via the emitted `SCHEMA_CONSTRAINTS` manifest, and unknown or co-occurring schema constructs make generation throw; the type layer proves hand-written parity at assignability granularity only (an optional field added over a loose shape's index signature is byte-layer-visible, not type-layer-visible). Review discipline: a `.generated.ts` diff *is* the schema change — read it.
30
- 3. Validate runtime fixture JSON from IronSilk.
31
- 4. Fail when the contract, client, routes, and runtime drift.
29
+ ## What it describes
32
30
 
33
- Ref: jgwill/Miadi#378
31
+ | area | types |
32
+ |---|---|
33
+ | live context | `ContextSnapshot`, `TerminalContext`, `TidePaneAgent`, `TidePaneAgentState`, `WindowEvent`, `TideHealthResult` |
34
+ | terminals and detection | `TideTerminalsResult`, `TideTerminalTarget`, `TideDetectResult`, `TideDetectMatch` |
35
+ | reading and steering a pane | `TidePeekResult`, `TideSteerResult`, `TideSendResult`, `TideSendKeysResult` |
36
+ | herdr | `TideHerdrPaneInfo`, `TideHerdrInventory`, `TideHerdrWorkspaceInfo`, `TideHerdrTabInfo`, `TideHerdrWaitOutputResult`, `TideHerdrAgentStatusEvent` |
37
+ | agent lanes in an episode | `EpisodeLane`, `EpisodeLaneTopology`, `TideLaneCheckpoint`, `TideResumeLink`, `TideAudioManifestLink`, `TidePendingApproval`, `ObserverControllerPosture` |
38
+
39
+ A terminal carries its `window_index`, `pane_index` and `agent` from ironsilk 0.9.35 on: the
40
+ agent that runs, or ran, in the pane (`running`, `exited` or `lost`), or `null`. All three are
41
+ optional, so snapshots from older runtimes stay valid.
42
+
43
+ Results that differ by multiplexer are unions discriminated by `multiplexer` (`"tmux"` or
44
+ `"herdr"`; absent means `"tmux"`). A peek is `{ target, resolved, content }` on tmux and
45
+ `{ multiplexer, pane, lines, text }` on herdr.
46
+
47
+ herdr pane ids look like `w1:p2`. Both segments are alphanumeric, because herdr allocates
48
+ letters past `p9` (`w2:pE`). The legacy form `1-2` is still accepted. Ids are scoped to a herdr
49
+ session: they are never reused while it runs and do not survive a restart. A stale id fails
50
+ with `pane_not_found`, and a pane `label` set with `herdr pane rename` is what a client matches
51
+ to find the current id.
52
+
53
+ ## Runtime constants
54
+
55
+ Exported from the package and mirrored in the schema's `x-tide` metadata:
56
+
57
+ | constant | value |
58
+ |---|---|
59
+ | `TIDE_CLI_COMMAND` | `tide` |
60
+ | `TIDE_STATE_ROOT_ENV` | `MIADI_HOME` |
61
+ | `TIDE_DEFAULT_STATE_ROOT` | `~/.miadi/navigator` |
62
+ | `TIDE_DAEMON_CONTRACT_VERSION` | `miadi.tide.daemon.v2` |
63
+
64
+ The TypeScript types are written by hand and checked against the schema by a test that fails
65
+ when the two drift apart. Generating them from the schema is planned.
package/dist/index.d.ts CHANGED
@@ -14,10 +14,64 @@ export type Multiplexer = "tmux" | "herdr";
14
14
  * but that pane has not been looked at yet.
15
15
  */
16
16
  export type TideAgentStatus = "idle" | "working" | "blocked" | "done" | "unknown";
17
+ /**
18
+ * State of the agent in a pane. `running`: its process is in the pane now.
19
+ * `exited`: its last binding line since the tmux server started is `session.end`.
20
+ * `lost`: any other last line, with no live process.
21
+ */
22
+ export type TidePaneAgentState = "running" | "exited" | "lost";
23
+ /**
24
+ * The agent that runs, or ran, in one tmux pane (ironsilk 0.9.35+). Running claude
25
+ * agents come from `~/.claude/sessions/<pid>.json`, the others from the binding
26
+ * lines under `<sessiondata>/data/terminal_bindings.jsonl`, so the optional
27
+ * fields differ by source.
28
+ */
29
+ export interface TidePaneAgent {
30
+ /** Agent program: claude, hermes, pi, … */
31
+ kind: string;
32
+ state: TidePaneAgentState;
33
+ session_id: string;
34
+ /** Session name (`/rename`); empty when unnamed. */
35
+ name?: string;
36
+ name_source?: string;
37
+ /** Claude Code's own status for a running session. */
38
+ status?: string;
39
+ /** Last activity: epoch milliseconds from Claude Code, epoch seconds from a binding line, or null. */
40
+ updated_at?: number | string | null;
41
+ pid?: number;
42
+ cwd?: string;
43
+ argv?: string[];
44
+ /** Shell alias the agent was launched with (`MIADI_LAUNCH_ALIAS`); empty when unknown. */
45
+ launch_alias?: string;
46
+ /** Timestamp of the binding line this record came from. */
47
+ at?: string;
48
+ /** Source of the binding line. */
49
+ reason?: string;
50
+ [key: string]: unknown;
51
+ }
17
52
  export interface TerminalContext {
18
53
  multiplexer?: Multiplexer;
19
54
  /** Pane id in the owning multiplexer: tmux (e.g. "%56") or herdr (e.g. "w1:p2" as of herdr 0.7; legacy "1-2" accepted). Field name is historical. */
20
55
  tmux_pane: string;
56
+ /**
57
+ * Name of the owning tmux session (`#{session_name}`) — the human-readable
58
+ * half of a pane's identity. OPTIONAL, and the optionality is load-bearing:
59
+ * a producer older than this field omits it, so a consumer falls back to the
60
+ * pane id rather than rendering an empty title.
61
+ */
62
+ session_name?: string;
63
+ /** Name of the owning tmux window (`#{window_name}`). Optional for the same reason as `session_name`. */
64
+ window_name?: string;
65
+ /**
66
+ * tmux window index (`#{window_index}`). With `session_name` and `pane_index` it
67
+ * addresses a pane across tmux server restarts, which renumber pane ids.
68
+ * Optional: producers before ironsilk 0.9.35 omit it.
69
+ */
70
+ window_index?: number | null;
71
+ /** tmux pane index (`#{pane_index}`). Optional for the same reason as `window_index`. */
72
+ pane_index?: number | null;
73
+ /** The agent in this pane, or null for a pane with no agent. Optional: producers before ironsilk 0.9.35 omit it. */
74
+ agent?: TidePaneAgent | null;
21
75
  pid: number;
22
76
  cwd: string;
23
77
  domain_id: string | null;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,kBAAkB,mDAAmD,CAAA;AAClF,eAAO,MAAM,gBAAgB,SAAS,CAAA;AACtC,eAAO,MAAM,mBAAmB,eAAe,CAAA;AAC/C,eAAO,MAAM,uBAAuB,uBAAuB,CAAA;AAC3D,eAAO,MAAM,4BAA4B,yBAAyB,CAAA;AAIlE;;;;GAIG;AACH,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,OAAO,CAAA;AAE1C;;;GAGG;AACH,MAAM,MAAM,eAAe,GAAG,MAAM,GAAG,SAAS,GAAG,SAAS,GAAG,M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,GAAG,IAAI,CAAA;IAC1B,YAAY,CAAC,EAAE,eAAe,CAAA;IAC9B,WAAW,EAAE,MAAM,CAAA;IACnB,aAAa,EAAE,MAAM,GAAG,IAAI,CAAA;IAC5B,mBAAmB,EAAE,OAAO,CAAA;IAC5B,UAAU,EAAE,MAAM,CAAA;CACnB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@miadi/tide-contract",
3
- "version": "0.3.0",
3
+ "version": "0.3.2",
4
4
  "description": "Schema-first Tide API contract shared by Miadi and the IronSilk tide runtime.",
5
5
  "license": "MIT",
6
6
  "publishConfig": {
@@ -132,6 +132,32 @@
132
132
  "created_at": { "type": "string" }
133
133
  }
134
134
  },
135
+ "paneAgentState": {
136
+ "type": "string",
137
+ "enum": ["running", "exited", "lost"],
138
+ "description": "running: the agent's process is in the pane now. exited: its last binding line since the tmux server started is session.end. lost: any other last line, with no live process."
139
+ },
140
+ "paneAgent": {
141
+ "type": "object",
142
+ "additionalProperties": true,
143
+ "description": "The agent that runs, or ran, in one tmux pane (ironsilk 0.9.35+, tide_runtime/pane_agents.py). Running claude agents are read from ~/.claude/sessions/<pid>.json, the others from the binding lines under <sessiondata>/data/terminal_bindings.jsonl, so the optional fields differ by source.",
144
+ "required": ["kind", "state", "session_id"],
145
+ "properties": {
146
+ "kind": { "type": "string", "description": "Agent program: claude, hermes, pi, …" },
147
+ "state": { "$ref": "#/$defs/paneAgentState" },
148
+ "session_id": { "type": "string" },
149
+ "name": { "type": "string", "description": "Session name (/rename); empty when unnamed." },
150
+ "name_source": { "type": "string" },
151
+ "status": { "type": "string", "description": "Claude Code's own status for a running session." },
152
+ "updated_at": { "type": ["number", "string", "null"], "description": "Last activity: epoch milliseconds from Claude Code, epoch seconds from a binding line, or null." },
153
+ "pid": { "type": "integer" },
154
+ "cwd": { "type": "string" },
155
+ "argv": { "type": "array", "items": { "type": "string" } },
156
+ "launch_alias": { "type": "string", "description": "Shell alias the agent was launched with (MIADI_LAUNCH_ALIAS); empty when unknown." },
157
+ "at": { "type": "string", "description": "Timestamp of the binding line this record came from." },
158
+ "reason": { "type": "string", "description": "Source of the binding line." }
159
+ }
160
+ },
135
161
  "terminalContext": {
136
162
  "type": "object",
137
163
  "additionalProperties": false,
@@ -148,6 +174,11 @@
148
174
  "properties": {
149
175
  "multiplexer": { "$ref": "#/$defs/multiplexer" },
150
176
  "tmux_pane": { "type": "string", "pattern": "^(%?[0-9]+|[0-9]+-[0-9]+|w[0-9A-Za-z]+:p[0-9A-Za-z]+)$", "description": "Pane id in the owning multiplexer: tmux (e.g., '%56') or herdr (e.g., 'w1:p2' as of herdr 0.7; legacy '1-2' accepted). Field name is historical." },
177
+ "session_name": { "type": "string", "description": "Name of the owning tmux session (#{session_name}) — the human-readable half of a pane's identity, which the pane id alone does not carry. OPTIONAL: a producer older than this field omits it, and a consumer must fall back to the pane id rather than render an empty title." },
178
+ "window_name": { "type": "string", "description": "Name of the owning tmux window (#{window_name}). Optional for the same reason as session_name." },
179
+ "window_index": { "type": ["integer", "null"], "description": "tmux window index (#{window_index}). With session_name and pane_index it addresses a pane across tmux server restarts, which renumber pane ids. Optional: producers before ironsilk 0.9.35 omit it." },
180
+ "pane_index": { "type": ["integer", "null"], "description": "tmux pane index (#{pane_index}). Optional for the same reason as window_index." },
181
+ "agent": { "oneOf": [{ "$ref": "#/$defs/paneAgent" }, { "type": "null" }], "description": "The agent in this pane, or null for a pane with no agent. Optional: producers before ironsilk 0.9.35 omit it." },
151
182
  "pid": { "type": "integer" },
152
183
  "cwd": { "type": "string" },
153
184
  "domain_id": { "type": ["string", "null"] },