@theokit/tauri 1.0.0-next.0 → 1.0.0-next.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/CHANGELOG.md CHANGED
@@ -1,5 +1,53 @@
1
1
  # Changelog — @theokit/tauri
2
2
 
3
+ ## 1.0.0-next.2
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
+ ## 1.0.0-next.1
29
+
30
+ ### Patch Changes
31
+
32
+ - 3162888: **Released because its peer requirement moved, not because this package changed.**
33
+
34
+ Nothing inside `@theokit/tauri` changed in this release. It ships because `theokit` moved and this
35
+ package peers it, so the peer range it declares moved with it — from the 0.64 line to
36
+ `>=0.65.0-next.0`. For a consumer that is a real, breaking difference even though no code here
37
+ differs: a project pinned to `theokit@0.64.x` cannot install this version.
38
+
39
+ The version number says the same thing less clearly. A peer range that excludes versions it used to
40
+ admit is a breaking change to whoever installs it, which is why the bump is a major rather than a
41
+ patch — the code is untouched and the contract is not.
42
+
43
+ **What to do:** upgrade `theokit` to `>=0.65.0` alongside this package, or stay on the previous
44
+ `@theokit/tauri` while you stay on the 0.64 line. Nothing else about the Tauri glue — the
45
+ Channel/invoke transport, the JSONL sidecar — behaves differently.
46
+
47
+ This entry exists because the release would otherwise carry an empty section
48
+ ([#653](https://github.com/usetheokit/theokit/issues/653)), and an empty section is
49
+ indistinguishable from "nothing user-visible changed" — a claim nobody made about a major bump.
50
+
3
51
  ## 1.0.0-next.0
4
52
 
5
53
  ### 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.0",
3
+ "version": "1.0.0-next.2",
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",
@@ -22,7 +22,8 @@
22
22
  "./sidecar": {
23
23
  "types": "./dist/sidecar.d.ts",
24
24
  "import": "./dist/sidecar.js"
25
- }
25
+ },
26
+ "./package.json": "./package.json"
26
27
  },
27
28
  "files": [
28
29
  "dist",
@@ -38,8 +39,8 @@
38
39
  }
39
40
  },
40
41
  "devDependencies": {
41
- "theokit": "0.65.0-next.0",
42
- "@theokit/presenter": "0.8.0"
42
+ "@theokit/presenter": "0.9.0-next.0",
43
+ "theokit": "0.65.0-next.3"
43
44
  },
44
45
  "publishConfig": {
45
46
  "provenance": true,
@@ -48,6 +49,16 @@
48
49
  "engines": {
49
50
  "node": ">=22.12.0"
50
51
  },
52
+ "keywords": [
53
+ "theokit",
54
+ "tauri",
55
+ "desktop",
56
+ "glue",
57
+ "agents",
58
+ "channel",
59
+ "invoke",
60
+ "transport"
61
+ ],
51
62
  "scripts": {
52
63
  "build": "tsup",
53
64
  "test": "vitest run",