@miadi/tide 0.1.2 → 0.1.3
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 +5 -6
- package/package.json +1 -1
- package/src/socket.ts +4 -4
- package/src/types.ts +1 -1
package/README.md
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
# `@miadi/tide`
|
|
2
2
|
|
|
3
|
-
Typed client boundary between Miadi and the **ironsilk `tide`** runtime
|
|
4
|
-
`hermes-navigator`). The single place the web app talks to `tide` — replacing the per-route
|
|
3
|
+
Typed client boundary between Miadi and the **ironsilk `tide`** runtime. The single place the web app talks to `tide` — replacing the per-route
|
|
5
4
|
`exec("/home/jgi/anaconda3/bin/tide …")` calls.
|
|
6
5
|
|
|
7
6
|
Grounded in `foundations/terminal-workspace-orchestration/` (Decision C) and
|
|
@@ -11,11 +10,11 @@ Grounded in `foundations/terminal-workspace-orchestration/` (Decision C) and
|
|
|
11
10
|
|
|
12
11
|
This package is a **client**; it does not bundle the runtime. The `tide` CLI is the
|
|
13
12
|
console entry point of the **`ironsilk`** PyPI package (`[project.scripts]`
|
|
14
|
-
`tide =
|
|
13
|
+
`tide = tide_runtime.cli:main`). Install / upgrade it in the Python env the
|
|
15
14
|
Next.js server can reach:
|
|
16
15
|
|
|
17
16
|
```bash
|
|
18
|
-
pip install -U ironsilk # provides the `tide` CLI (
|
|
17
|
+
pip install -U ironsilk # provides the `tide` CLI (0.9.27+)
|
|
19
18
|
tide --help # verify
|
|
20
19
|
```
|
|
21
20
|
|
|
@@ -83,7 +82,7 @@ is deferred to the runtime + a guarded route.
|
|
|
83
82
|
`detect`, not the operator mutation verbs. `sendKeys` is independent of both — it talks to `tmux` directly. They join the socket path when the runtime adds those
|
|
84
83
|
actions — verb signatures are the stable surface; only the transport underneath changes.
|
|
85
84
|
|
|
86
|
-
### Wire protocol (mirrors `
|
|
85
|
+
### Wire protocol (mirrors `tide_runtime/daemon.py`)
|
|
87
86
|
|
|
88
87
|
Newline-delimited JSON over a Unix socket. Request
|
|
89
88
|
`{contract_version:"hermes.navigator.daemon.v1", request_id, action, payload}` →
|
|
@@ -91,7 +90,7 @@ Newline-delimited JSON over a Unix socket. Request
|
|
|
91
90
|
|
|
92
91
|
### Socket path resolution
|
|
93
92
|
|
|
94
|
-
`TIDE_SOCKET` (explicit) → `${
|
|
93
|
+
`TIDE_SOCKET` (explicit) → `${MIADI_HOME || ~/.miadi/navigator}/daemon.sock`
|
|
95
94
|
(mirrors the runtime's `get_config_dir()`). Binary resolution for the CLI fallback:
|
|
96
95
|
`TIDE_BIN` → `which tide` → legacy `/home/jgi/anaconda3/bin/tide`.
|
|
97
96
|
|
package/package.json
CHANGED
package/src/socket.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// versioned Unix-domain-socket protocol so the web layer can read live context
|
|
3
3
|
// without paying a Python interpreter spawn per request.
|
|
4
4
|
//
|
|
5
|
-
// Wire protocol (mirrors
|
|
5
|
+
// Wire protocol (mirrors tide_runtime/daemon.py):
|
|
6
6
|
// contract: "hermes.navigator.daemon.v1"
|
|
7
7
|
// transport: newline-delimited JSON over a Unix domain socket
|
|
8
8
|
// request: {contract_version, request_id, action, payload}
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
//
|
|
13
13
|
// Socket path resolution mirrors the runtime's get_config_dir():
|
|
14
14
|
// TIDE_SOCKET (explicit full path)
|
|
15
|
-
// else ${
|
|
15
|
+
// else ${MIADI_HOME || ~/.miadi/navigator}/daemon.sock
|
|
16
16
|
//
|
|
17
17
|
// This module never throws synchronously for "daemon absent" — callers test
|
|
18
18
|
// `isSocketAvailable()` and fall back to the CLI transport (see client.ts).
|
|
@@ -33,11 +33,11 @@ function expandHome(p: string): string {
|
|
|
33
33
|
return p
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
-
/** Resolve the daemon socket path: `TIDE_SOCKET`
|
|
36
|
+
/** Resolve the daemon socket path: `TIDE_SOCKET` -> `${MIADI_HOME|~/.miadi/navigator}/daemon.sock`. */
|
|
37
37
|
export function resolveSocketPath(): string {
|
|
38
38
|
const explicit = process.env.TIDE_SOCKET?.trim()
|
|
39
39
|
if (explicit) return expandHome(explicit)
|
|
40
|
-
const home = process.env.
|
|
40
|
+
const home = process.env.MIADI_HOME?.trim()
|
|
41
41
|
const dir = home ? expandHome(home) : join(homedir(), ".miadi", "navigator")
|
|
42
42
|
return join(dir, "daemon.sock")
|
|
43
43
|
}
|
package/src/types.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Typed contract for the ironsilk `tide` runtime (`--format json` output).
|
|
2
2
|
//
|
|
3
|
-
// Source of truth today: runtime/
|
|
3
|
+
// Source of truth today: runtime/tide-runtime/tide_runtime/models.py
|
|
4
4
|
// (`ContextSnapshot.to_dict()`, `TerminalContext`). When the schema-first
|
|
5
5
|
// contract lands (`tide-api.schema.json`), these types are regenerated, not
|
|
6
6
|
// hand-edited. See README.md.
|