@theokit/tauri 1.0.0 → 1.1.1
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 +14 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +9 -3
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# Changelog — @theokit/tauri
|
|
2
2
|
|
|
3
|
+
## 1.1.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 01df0e8: Raise the `theokit` peer floor to `>=0.65.0`. `@theokit/tauri/sidecar` imports `AgentModule` from `theokit/server/agent`, which `0.65.0-next.0` does not export, so the declared floor could not build.
|
|
8
|
+
|
|
9
|
+
## 1.1.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- 966a3d4: `createTauriChannelSource` and `createTauriAgentClient` take an optional `cancelCommand`. When it is set, aborting a desktop turn invokes that Tauri command (the desktop template's `cancel_turn`), so a stop button stops the turn instead of waiting for the next message. A rejected cancel command reaches the turn's `onError`; the abort itself never throws. Without the option the abort does nothing, as before. (B-376)
|
|
14
|
+
|
|
15
|
+
The `create-theokit` desktop template ships a `cancel_turn` command that kills the in-flight sidecar, registers it beside `run_turn` and `approve`, and its webview passes `cancelCommand: 'cancel_turn'`. (B-376) A scaffolded desktop app now depends on `@theokit/tauri` `^1.1.0`, the release that carries `cancelCommand`; it was `^0.1.1`, which never resolved to 1.x.
|
|
16
|
+
|
|
3
17
|
## 1.0.0
|
|
4
18
|
|
|
5
19
|
### Minor Changes
|
package/dist/index.d.ts
CHANGED
|
@@ -23,6 +23,12 @@ interface TauriChannelSourceOptions {
|
|
|
23
23
|
runCommand?: string;
|
|
24
24
|
/** The Rust `#[tauri::command]` that settles a HITL approval (default `approve`). */
|
|
25
25
|
approveCommand?: string;
|
|
26
|
+
/**
|
|
27
|
+
* The Rust `#[tauri::command]` the abort invokes to stop the in-flight turn (the desktop template's
|
|
28
|
+
* `cancel_turn` kills the sidecar). Unset, the abort does nothing and the shell kills the prior
|
|
29
|
+
* sidecar on the next run.
|
|
30
|
+
*/
|
|
31
|
+
cancelCommand?: string;
|
|
26
32
|
}
|
|
27
33
|
/**
|
|
28
34
|
* Build a {@link ChannelPushSource} bridging a Tauri `run_turn` `Channel` + `approve` `invoke` (ADR-0045 D3).
|
package/dist/index.js
CHANGED
|
@@ -6,6 +6,7 @@ import {
|
|
|
6
6
|
function createTauriChannelSource(core, options = {}) {
|
|
7
7
|
const runCommand = options.runCommand ?? "run_turn";
|
|
8
8
|
const approveCommand = options.approveCommand ?? "approve";
|
|
9
|
+
const { cancelCommand } = options;
|
|
9
10
|
return {
|
|
10
11
|
start(turn, { onLine, onClose, onError }) {
|
|
11
12
|
const channel = new core.Channel();
|
|
@@ -18,7 +19,12 @@ function createTauriChannelSource(core, options = {}) {
|
|
|
18
19
|
void core.invoke(runCommand, { message: turn.message, context: turn.context, onChunk: channel }).then(onClose, (err) => {
|
|
19
20
|
onError?.(err instanceof Error ? err : new Error(String(err)));
|
|
20
21
|
});
|
|
21
|
-
return () => void 0;
|
|
22
|
+
if (cancelCommand === void 0) return () => void 0;
|
|
23
|
+
return () => {
|
|
24
|
+
core.invoke(cancelCommand).catch((err) => {
|
|
25
|
+
onError?.(err instanceof Error ? err : new Error(String(err)));
|
|
26
|
+
});
|
|
27
|
+
};
|
|
22
28
|
},
|
|
23
29
|
settle: async (approvalId, decision) => {
|
|
24
30
|
await core.invoke(approveCommand, { approvalId, approved: decision.approved });
|
|
@@ -26,8 +32,8 @@ function createTauriChannelSource(core, options = {}) {
|
|
|
26
32
|
};
|
|
27
33
|
}
|
|
28
34
|
function createTauriAgentClient(core, options = {}) {
|
|
29
|
-
const { runCommand, approveCommand, ...clientOptions } = options;
|
|
30
|
-
const source = createTauriChannelSource(core, { runCommand, approveCommand });
|
|
35
|
+
const { runCommand, approveCommand, cancelCommand, ...clientOptions } = options;
|
|
36
|
+
const source = createTauriChannelSource(core, { runCommand, approveCommand, cancelCommand });
|
|
31
37
|
return createAgentClient(new ChannelTransport({ source }), clientOptions);
|
|
32
38
|
}
|
|
33
39
|
export {
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"mappings":";AAAA;AAAA,EACE;AAAA,EACA;AAAA,OAKK;
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"mappings":";AAAA;AAAA,EACE;AAAA,EACA;AAAA,OAKK;AAyCA,SAAS,yBACd,MACA,UAAqC,CAAC,GACnB;AACnB,QAAM,aAAa,QAAQ,cAAc;AACzC,QAAM,iBAAiB,QAAQ,kBAAkB;AACjD,QAAM,EAAE,cAAc,IAAI;AAE1B,SAAO;AAAA,IACL,MAAM,MAAM,EAAE,QAAQ,SAAS,QAAQ,GAAG;AACxC,YAAM,UAAU,IAAI,KAAK,QAAQ;AACjC,cAAQ,YAAY,CAAC,SAAiB;AAEpC,mBAAW,QAAQ,KAAK,MAAM,IAAI,GAAG;AACnC,gBAAM,UAAU,KAAK,KAAK;AAC1B,cAAI,QAAS,QAAO,OAAO;AAAA,QAC7B;AAAA,MACF;AAGA,WAAK,KACF,OAAO,YAAY,EAAE,SAAS,KAAK,SAAS,SAAS,KAAK,SAAS,SAAS,QAAQ,CAAC,EACrF,KAAK,SAAS,CAAC,QAAiB;AAE/B,kBAAU,eAAe,QAAQ,MAAM,IAAI,MAAM,OAAO,GAAG,CAAC,CAAC;AAAA,MAC/D,CAAC;AAEH,UAAI,kBAAkB,OAAW,QAAO,MAAM;AAE9C,aAAO,MAAM;AACX,aAAK,OAAO,aAAa,EAAE,MAAM,CAAC,QAAiB;AACjD,oBAAU,eAAe,QAAQ,MAAM,IAAI,MAAM,OAAO,GAAG,CAAC,CAAC;AAAA,QAC/D,CAAC;AAAA,MACH;AAAA,IACF;AAAA,IACA,QAAQ,OAAO,YAAoB,aAA+B;AAChE,YAAM,KAAK,OAAO,gBAAgB,EAAE,YAAY,UAAU,SAAS,SAAS,CAAC;AAAA,IAC/E;AAAA,EACF;AACF;AAQO,SAAS,uBACd,MACA,UAAgE,CAAC,GACtC;AAC3B,QAAM,EAAE,YAAY,gBAAgB,eAAe,GAAG,cAAc,IAAI;AACxE,QAAM,SAAS,yBAAyB,MAAM,EAAE,YAAY,gBAAgB,cAAc,CAAC;AAC3F,SAAO,kBAA0B,IAAI,iBAAiB,EAAE,OAAO,CAAC,GAAG,aAAa;AAClF;","names":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@theokit/tauri",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.1.1",
|
|
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",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"CHANGELOG.md"
|
|
31
31
|
],
|
|
32
32
|
"peerDependencies": {
|
|
33
|
-
"theokit": ">=0.65.0
|
|
33
|
+
"theokit": ">=0.65.0",
|
|
34
34
|
"@tauri-apps/api": ">=2.0.0"
|
|
35
35
|
},
|
|
36
36
|
"peerDependenciesMeta": {
|
|
@@ -39,8 +39,8 @@
|
|
|
39
39
|
}
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
|
-
"@theokit/presenter": "0.
|
|
43
|
-
"theokit": "0.
|
|
42
|
+
"@theokit/presenter": "0.14.0",
|
|
43
|
+
"theokit": "0.82.0"
|
|
44
44
|
},
|
|
45
45
|
"publishConfig": {
|
|
46
46
|
"provenance": true,
|