@theokit/tauri 1.0.0-next.1 → 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 +25 -0
- package/dist/sidecar.d.ts +2 -2
- package/dist/sidecar.js +3 -1
- package/dist/sidecar.js.map +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,30 @@
|
|
|
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
|
+
|
|
3
28
|
## 1.0.0-next.1
|
|
4
29
|
|
|
5
30
|
### 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:
|
|
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 {
|
|
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, {
|
package/dist/sidecar.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/sidecar.ts"],"mappings":";AAAA,SAAS,kBAAkB;AAE3B,
|
|
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.
|
|
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",
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"@theokit/presenter": "0.9.0-next.0",
|
|
43
|
-
"theokit": "0.65.0-next.
|
|
43
|
+
"theokit": "0.65.0-next.3"
|
|
44
44
|
},
|
|
45
45
|
"publishConfig": {
|
|
46
46
|
"provenance": true,
|