khala-cli 0.4.4 → 0.4.5
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/dist/{chunk-LN3G2LJV.mjs → chunk-6LC66VHK.mjs} +5 -5
- package/dist/{chunk-ENPBK5W2.mjs → chunk-7G2G4E4U.mjs} +84 -35
- package/dist/{chunk-LQ6KNUNN.mjs → chunk-EW22K3JO.mjs} +393 -160
- package/dist/{chunk-GE3RXO2X.mjs → chunk-EXHCVFVH.mjs} +2 -2
- package/dist/{chunk-MU4FUENP.mjs → chunk-H46OG22B.mjs} +20 -5
- package/dist/{chunk-LHAMBQK7.mjs → chunk-HB3UGIZG.mjs} +3 -3
- package/dist/{chunk-DC3OX6F4.mjs → chunk-IR3VN2ID.mjs} +1 -1
- package/dist/{chunk-XEYKJMZL.mjs → chunk-KCJFSVDN.mjs} +54 -3
- package/dist/{chunk-6OADQWV7.mjs → chunk-MBLP7LQJ.mjs} +93 -32
- package/dist/{chunk-ZRFXZK72.mjs → chunk-OLZ62X7S.mjs} +1 -1
- package/dist/{chunk-ZKDDKUUA.mjs → chunk-PXKGKVGW.mjs} +1 -1
- package/dist/{chunk-AK74S7EN.mjs → chunk-RSDOTTZQ.mjs} +2 -2
- package/dist/{chunk-7CVU5OZ7.mjs → chunk-SQXDATEC.mjs} +1 -1
- package/dist/chunk-T7YRVE43.mjs +238 -0
- package/dist/{chunk-OS2JLDL7.mjs → chunk-TZKEQIHP.mjs} +4 -2
- package/dist/{chunk-PJ3E3IVH.mjs → chunk-V4Y26O4R.mjs} +7 -7
- package/dist/{chunk-FA6Z65DW.mjs → chunk-V7M27QLT.mjs} +6 -4
- package/dist/{chunk-MZS7XFMC.mjs → chunk-Y2DRTRBJ.mjs} +2 -2
- package/dist/{chunk-FUU775QM.mjs → chunk-Y4WVILEJ.mjs} +14 -1
- package/dist/khala.mjs +10 -10
- package/dist/web/assets/local-C1vz22ps.js +9 -0
- package/dist/web/assets/local-DdjwMERJ.css +1 -0
- package/dist/web/index.html +2 -2
- package/package.json +1 -1
- package/dist/chunk-N5VYKQMR.mjs +0 -108
- package/dist/web/assets/local-Bk8hMIT-.js +0 -9
- package/dist/web/assets/local-vdvavyq0.css +0 -1
|
@@ -27,12 +27,14 @@ import {
|
|
|
27
27
|
|
|
28
28
|
// src/client.ts
|
|
29
29
|
var KhalaClientError = class extends Error {
|
|
30
|
-
code
|
|
31
|
-
constructor(code, message) {
|
|
30
|
+
constructor(code, message, extra) {
|
|
32
31
|
super(message ?? code);
|
|
32
|
+
this.extra = extra;
|
|
33
33
|
this.name = "KhalaClientError";
|
|
34
34
|
this.code = code;
|
|
35
35
|
}
|
|
36
|
+
extra;
|
|
37
|
+
code;
|
|
36
38
|
};
|
|
37
39
|
|
|
38
40
|
// ../contracts/src/m1/colors.ts
|
|
@@ -3,14 +3,14 @@ import {
|
|
|
3
3
|
ensureHelper,
|
|
4
4
|
helperPaths,
|
|
5
5
|
readHelperFile
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-HB3UGIZG.mjs";
|
|
7
7
|
import {
|
|
8
8
|
parseChannelLink,
|
|
9
9
|
resolveLocalOwnerName
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-Y2DRTRBJ.mjs";
|
|
11
11
|
import {
|
|
12
12
|
KHALA_AGENT_VERSION
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-SQXDATEC.mjs";
|
|
14
14
|
import {
|
|
15
15
|
LOCAL_AGENT_DEVICE_PREFIX,
|
|
16
16
|
LOCAL_IDLE_EXIT_MS,
|
|
@@ -35,10 +35,10 @@ import {
|
|
|
35
35
|
newLocalEventId,
|
|
36
36
|
newLocalRoomId,
|
|
37
37
|
normalizeInitials
|
|
38
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-TZKEQIHP.mjs";
|
|
39
39
|
import {
|
|
40
40
|
bundle
|
|
41
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-OLZ62X7S.mjs";
|
|
42
42
|
import "./chunk-5GLTKWJ5.mjs";
|
|
43
43
|
import {
|
|
44
44
|
CHANNEL_EVENT_TYPE,
|
|
@@ -51,7 +51,7 @@ import {
|
|
|
51
51
|
ensureStateDir,
|
|
52
52
|
readJson,
|
|
53
53
|
writeJsonAtomic
|
|
54
|
-
} from "./chunk-
|
|
54
|
+
} from "./chunk-KCJFSVDN.mjs";
|
|
55
55
|
import {
|
|
56
56
|
DEFAULT_LISTENING_MODE,
|
|
57
57
|
LISTENING_MODE_COMMAND_TYPE,
|
|
@@ -69,7 +69,7 @@ import {
|
|
|
69
69
|
validAgentRejoinSecret,
|
|
70
70
|
validAgentSessionId
|
|
71
71
|
} from "./chunk-SN3STAO2.mjs";
|
|
72
|
-
import "./chunk-
|
|
72
|
+
import "./chunk-PXKGKVGW.mjs";
|
|
73
73
|
|
|
74
74
|
// src/local/cli.ts
|
|
75
75
|
import { setTimeout as sleepDefault } from "node:timers/promises";
|
|
@@ -1,17 +1,19 @@
|
|
|
1
1
|
import { createRequire as __khalaCreateRequire } from 'node:module'; const require = __khalaCreateRequire(import.meta.url);
|
|
2
2
|
import {
|
|
3
|
+
WATCH_USAGE,
|
|
3
4
|
mentions,
|
|
4
5
|
monitorArmed,
|
|
5
6
|
run,
|
|
6
7
|
watchSession
|
|
7
|
-
} from "./chunk-
|
|
8
|
-
import "./chunk-
|
|
8
|
+
} from "./chunk-7G2G4E4U.mjs";
|
|
9
|
+
import "./chunk-T7YRVE43.mjs";
|
|
9
10
|
import "./chunk-VUE2DDYY.mjs";
|
|
10
|
-
import "./chunk-
|
|
11
|
+
import "./chunk-KCJFSVDN.mjs";
|
|
11
12
|
import "./chunk-AUJEUKVM.mjs";
|
|
12
13
|
import "./chunk-SN3STAO2.mjs";
|
|
13
|
-
import "./chunk-
|
|
14
|
+
import "./chunk-PXKGKVGW.mjs";
|
|
14
15
|
export {
|
|
16
|
+
WATCH_USAGE,
|
|
15
17
|
run as default,
|
|
16
18
|
mentions,
|
|
17
19
|
monitorArmed,
|
|
@@ -4,13 +4,13 @@ import {
|
|
|
4
4
|
MODEL_NAMES,
|
|
5
5
|
checkName,
|
|
6
6
|
isDefaultAgentName
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-TZKEQIHP.mjs";
|
|
8
8
|
import {
|
|
9
9
|
StateError,
|
|
10
10
|
readJson,
|
|
11
11
|
stateRoot,
|
|
12
12
|
writeJsonAtomic
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-KCJFSVDN.mjs";
|
|
14
14
|
import {
|
|
15
15
|
HARNESSES,
|
|
16
16
|
validateAgentName
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
memberListeningMode
|
|
12
12
|
} from "./chunk-AUJEUKVM.mjs";
|
|
13
13
|
import "./chunk-SN3STAO2.mjs";
|
|
14
|
-
import "./chunk-
|
|
14
|
+
import "./chunk-PXKGKVGW.mjs";
|
|
15
15
|
|
|
16
16
|
// src/matrix/session.ts
|
|
17
17
|
import { createClient, ClientEvent, RoomEvent, MatrixEventEvent, SyncState, Direction, Method, EventType } from "matrix-js-sdk";
|
|
@@ -308,6 +308,19 @@ async function createAgentMatrixSession(creds, opts) {
|
|
|
308
308
|
}
|
|
309
309
|
if (event.getType() === "m.room.encrypted" || event.isDecryptionFailure()) {
|
|
310
310
|
undecryptable++;
|
|
311
|
+
const eventId = event.getId(), sender = event.getSender();
|
|
312
|
+
if (eventId && sender && eventId !== before) {
|
|
313
|
+
const body = "[Encrypted message unavailable: this device does not have its key. Messages from before joining may not have been shared.]";
|
|
314
|
+
messages.push({
|
|
315
|
+
eventId,
|
|
316
|
+
roomId,
|
|
317
|
+
sender,
|
|
318
|
+
ts: event.getTs(),
|
|
319
|
+
type: "m.room.message",
|
|
320
|
+
body,
|
|
321
|
+
content: { msgtype: "m.notice", body, "com.khala.unavailable": true }
|
|
322
|
+
});
|
|
323
|
+
}
|
|
311
324
|
continue;
|
|
312
325
|
}
|
|
313
326
|
const m = message(event);
|
package/dist/khala.mjs
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
import { createRequire as __khalaCreateRequire } from 'node:module'; const require = __khalaCreateRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
4
|
KHALA_AGENT_VERSION
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
5
|
+
} from "./chunk-SQXDATEC.mjs";
|
|
6
|
+
import "./chunk-OLZ62X7S.mjs";
|
|
7
|
+
import "./chunk-PXKGKVGW.mjs";
|
|
8
8
|
|
|
9
9
|
// src/cli.ts
|
|
10
10
|
var HOOK_NAME = /^[a-z][a-z0-9-]{0,31}$/;
|
|
@@ -78,14 +78,14 @@ async function runCli(argv, modules) {
|
|
|
78
78
|
|
|
79
79
|
// src/cli-bundle.ts
|
|
80
80
|
var hooks = {
|
|
81
|
-
"session-start": () => import("./chunk-
|
|
82
|
-
deliver: () => import("./chunk-
|
|
83
|
-
"claude-wake": () => import("./chunk-
|
|
81
|
+
"session-start": () => import("./chunk-EXHCVFVH.mjs"),
|
|
82
|
+
deliver: () => import("./chunk-MBLP7LQJ.mjs"),
|
|
83
|
+
"claude-wake": () => import("./chunk-H46OG22B.mjs")
|
|
84
84
|
};
|
|
85
85
|
process.exitCode = await runCli(process.argv.slice(2), {
|
|
86
|
-
mcp: () => () => import("./chunk-
|
|
87
|
-
watch: () => () => import("./chunk-
|
|
88
|
-
local: () => () => import("./chunk-
|
|
89
|
-
install: () => () => import("./chunk-
|
|
86
|
+
mcp: () => () => import("./chunk-EW22K3JO.mjs"),
|
|
87
|
+
watch: () => () => import("./chunk-V7M27QLT.mjs"),
|
|
88
|
+
local: () => () => import("./chunk-V4Y26O4R.mjs"),
|
|
89
|
+
install: () => () => import("./chunk-RSDOTTZQ.mjs"),
|
|
90
90
|
hook: (name) => Object.hasOwn(hooks, name) ? hooks[name] : void 0
|
|
91
91
|
});
|