@theokit/tauri 1.0.0-next.1 → 1.0.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/CHANGELOG.md CHANGED
@@ -1,5 +1,76 @@
1
1
  # Changelog — @theokit/tauri
2
2
 
3
+ ## 1.0.0
4
+
5
+ ### Minor Changes
6
+
7
+ - ecda4ae: The agent-module parameter names what it accepts, so a wrong shape fails at compile time
8
+
9
+ `streamAgentTurnInProcess` and `compileAgentModule` took `mod: unknown`, so the contract lived only
10
+ in the runtime guard. A consumer whose producer became `async` handed a `Promise` straight through
11
+ and shipped two releases in which no turn could run — with typecheck, 1213 tests, lint and twelve CI
12
+ checks green. The runtime was never wrong: it refused the Promise and threw a typed error. What
13
+ failed was the moment.
14
+
15
+ Both now take `AgentModule`, exported alongside them and re-exported from `theokit/server/agent`.
16
+ The type mirrors the runtime guard rather than the fuller `CompiledAgentOptions` — an array under
17
+ `tools`, an object under `agents` — so it refuses nothing that compiled before.
18
+
19
+ `@theokit/tauri/sidecar`'s `runTurnToJsonl` is narrowed too: a desktop sidecar imports its agent
20
+ module statically, which is exactly where a type catches the mistake.
21
+
22
+ Entry points that receive a module from a path discovered at runtime keep taking `unknown`, and now
23
+ say so by calling the new `compileLoadedAgentModule`. Their `unknown` has a reason; before this, the
24
+ boundary that had one was indistinguishable from the one that did not.
25
+
26
+ Closes usetheokit/theokit#663.
27
+
28
+ ### Patch Changes
29
+
30
+ - 3162888: **Released because its peer requirement moved, not because this package changed.**
31
+
32
+ Nothing inside `@theokit/tauri` changed in this release. It ships because `theokit` moved and this
33
+ package peers it, so the peer range it declares moved with it — from the 0.64 line to
34
+ `>=0.65.0-next.0`. For a consumer that is a real, breaking difference even though no code here
35
+ differs: a project pinned to `theokit@0.64.x` cannot install this version.
36
+
37
+ The version number says the same thing less clearly. A peer range that excludes versions it used to
38
+ admit is a breaking change to whoever installs it, which is why the bump is a major rather than a
39
+ patch — the code is untouched and the contract is not.
40
+
41
+ **What to do:** upgrade `theokit` to `>=0.65.0` alongside this package, or stay on the previous
42
+ `@theokit/tauri` while you stay on the 0.64 line. Nothing else about the Tauri glue — the
43
+ Channel/invoke transport, the JSONL sidecar — behaves differently.
44
+
45
+ This entry exists because the release would otherwise carry an empty section
46
+ ([#653](https://github.com/usetheokit/theokit/issues/653)), and an empty section is
47
+ indistinguishable from "nothing user-visible changed" — a claim nobody made about a major bump.
48
+
49
+ ## 1.0.0-next.2
50
+
51
+ ### Minor Changes
52
+
53
+ - ecda4ae: The agent-module parameter names what it accepts, so a wrong shape fails at compile time
54
+
55
+ `streamAgentTurnInProcess` and `compileAgentModule` took `mod: unknown`, so the contract lived only
56
+ in the runtime guard. A consumer whose producer became `async` handed a `Promise` straight through
57
+ and shipped two releases in which no turn could run — with typecheck, 1213 tests, lint and twelve CI
58
+ checks green. The runtime was never wrong: it refused the Promise and threw a typed error. What
59
+ failed was the moment.
60
+
61
+ Both now take `AgentModule`, exported alongside them and re-exported from `theokit/server/agent`.
62
+ The type mirrors the runtime guard rather than the fuller `CompiledAgentOptions` — an array under
63
+ `tools`, an object under `agents` — so it refuses nothing that compiled before.
64
+
65
+ `@theokit/tauri/sidecar`'s `runTurnToJsonl` is narrowed too: a desktop sidecar imports its agent
66
+ module statically, which is exactly where a type catches the mistake.
67
+
68
+ Entry points that receive a module from a path discovered at runtime keep taking `unknown`, and now
69
+ say so by calling the new `compileLoadedAgentModule`. Their `unknown` has a reason; before this, the
70
+ boundary that had one was indistinguishable from the one that did not.
71
+
72
+ Closes usetheokit/theokit#663.
73
+
3
74
  ## 1.0.0-next.1
4
75
 
5
76
  ### Patch Changes
package/dist/sidecar.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { InProcessAwaitApproval } from 'theokit/server/agent';
1
+ import { InProcessAwaitApproval, AgentModule } from 'theokit/server/agent';
2
2
 
3
3
  /** Writes one JSONL line (the sidecar's stdout `write`). */
4
4
  type WriteLine = (line: string) => void;
@@ -16,6 +16,6 @@ type SidecarAwaitApproval = InProcessAwaitApproval;
16
16
  * surfaced as a trailing `{type:'error'}` line, never swallowed (Rule 8). HITL: a gated tool pauses; the
17
17
  * caller resolves `awaitApproval` (typically after the Rust shell forwards the webview's decision on stdin).
18
18
  */
19
- declare function runTurnToJsonl(mod: unknown, apiKey: string, message: string, write: WriteLine, awaitApproval?: SidecarAwaitApproval): Promise<void>;
19
+ declare function runTurnToJsonl(mod: AgentModule, apiKey: string, message: string, write: WriteLine, awaitApproval?: SidecarAwaitApproval): Promise<void>;
20
20
 
21
21
  export { type SidecarAwaitApproval, type WriteLine, runTurnToJsonl };
package/dist/sidecar.js CHANGED
@@ -1,6 +1,8 @@
1
1
  // src/sidecar.ts
2
2
  import { randomUUID } from "crypto";
3
- import { streamAgentTurnInProcess } from "theokit/server/agent";
3
+ import {
4
+ streamAgentTurnInProcess
5
+ } from "theokit/server/agent";
4
6
  async function runTurnToJsonl(mod, apiKey, message, write, awaitApproval) {
5
7
  try {
6
8
  for await (const chunk of streamAgentTurnInProcess(mod, apiKey, {
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/sidecar.ts"],"mappings":";AAAA,SAAS,kBAAkB;AAE3B,SAAS,gCAA6D;AAoBtE,eAAsB,eACpB,KACA,QACA,SACA,OACA,eACe;AACf,MAAI;AACF,qBAAiB,SAAS,yBAAyB,KAAK,QAAQ;AAAA,MAC9D;AAAA,MACA,WAAW,WAAW,WAAW,CAAC;AAAA,MAClC;AAAA,IACF,CAAC,GAAG;AACF,YAAM,GAAG,KAAK,UAAU,KAAK,CAAC;AAAA,CAAI;AAAA,IACpC;AAAA,EACF,SAAS,KAAK;AACZ,UAAM,YAAY,eAAe,QAAQ,IAAI,UAAU,OAAO,GAAG;AACjE,UAAM,GAAG,KAAK,UAAU,EAAE,MAAM,SAAS,UAAU,CAAC,CAAC;AAAA,CAAI;AAAA,EAC3D;AACF;","names":[]}
1
+ {"version":3,"sources":["../src/sidecar.ts"],"mappings":";AAAA,SAAS,kBAAkB;AAE3B;AAAA,EACE;AAAA,OAGK;AAoBP,eAAsB,eAKpB,KACA,QACA,SACA,OACA,eACe;AACf,MAAI;AACF,qBAAiB,SAAS,yBAAyB,KAAK,QAAQ;AAAA,MAC9D;AAAA,MACA,WAAW,WAAW,WAAW,CAAC;AAAA,MAClC;AAAA,IACF,CAAC,GAAG;AACF,YAAM,GAAG,KAAK,UAAU,KAAK,CAAC;AAAA,CAAI;AAAA,IACpC;AAAA,EACF,SAAS,KAAK;AACZ,UAAM,YAAY,eAAe,QAAQ,IAAI,UAAU,OAAO,GAAG;AACjE,UAAM,GAAG,KAAK,UAAU,EAAE,MAAM,SAAS,UAAU,CAAC,CAAC;AAAA,CAAI;AAAA,EAC3D;AACF;","names":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@theokit/tauri",
3
- "version": "1.0.0-next.1",
3
+ "version": "1.0.0",
4
4
  "description": "Tauri desktop glue for TheoKit agents — the Channel/invoke transport source (webview) + the JSONL sidecar (node), over the unified client. UI is @theokit/ui; the runtime is @theokit/sdk.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -39,8 +39,8 @@
39
39
  }
40
40
  },
41
41
  "devDependencies": {
42
- "@theokit/presenter": "0.9.0-next.0",
43
- "theokit": "0.65.0-next.2"
42
+ "@theokit/presenter": "0.9.0",
43
+ "theokit": "0.65.0"
44
44
  },
45
45
  "publishConfig": {
46
46
  "provenance": true,