khala-cli 0.4.10 → 0.4.12
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-CKLCR5G4.mjs → chunk-25N4V2LE.mjs} +12 -12
- package/dist/{chunk-JKOJQTFT.mjs → chunk-2MEWZ7PJ.mjs} +2 -2
- package/dist/{chunk-EVT2DWNZ.mjs → chunk-374APJUQ.mjs} +1 -1
- package/dist/{chunk-VDZK4LW3.mjs → chunk-56GZYKLK.mjs} +3 -3
- package/dist/{chunk-ARIDZOTI.mjs → chunk-5HDFP7EB.mjs} +225 -70
- package/dist/{chunk-XR625T3I.mjs → chunk-6H34GNLY.mjs} +2 -2
- package/dist/{chunk-OEV5DFLW.mjs → chunk-757A5TML.mjs} +5 -3
- package/dist/chunk-7CKX3Q7L.mjs +27 -0
- package/dist/{chunk-VAC3JTAV.mjs → chunk-7GMBN2XQ.mjs} +12 -12
- package/dist/{chunk-CHC4VZF5.mjs → chunk-7YXXLBQW.mjs} +7 -7
- package/dist/{chunk-6AQVW5W7.mjs → chunk-C53OOWTD.mjs} +2 -2
- package/dist/{chunk-OIZ4R5H7.mjs → chunk-CKLFGEDW.mjs} +6 -6
- package/dist/{chunk-WUDXHF2Q.mjs → chunk-CYJZXNTH.mjs} +2 -2
- package/dist/{chunk-4BP7V3OP.mjs → chunk-EGMBLNRJ.mjs} +2 -2
- package/dist/{chunk-SRZTHCXP.mjs → chunk-G2RJ4C3T.mjs} +5 -5
- package/dist/{chunk-6J2PUM7L.mjs → chunk-IV5R3D2G.mjs} +6 -6
- package/dist/{chunk-UX34IVN5.mjs → chunk-JDKPAIJX.mjs} +2 -2
- package/dist/{chunk-C2WEDMAF.mjs → chunk-KI2MRAEE.mjs} +1 -1
- package/dist/{chunk-2AMWQ7RB.mjs → chunk-LPJQCFRQ.mjs} +98 -73
- package/dist/{chunk-G3NMB4PY.mjs → chunk-MNN5BRU5.mjs} +1 -1
- package/dist/{chunk-3E5DH3Y6.mjs → chunk-PAFNLPIE.mjs} +3 -3
- package/dist/{chunk-HHEZVPRR.mjs → chunk-QXL6ALYP.mjs} +1 -1
- package/dist/{chunk-PN25BUQ4.mjs → chunk-R3TTOYPJ.mjs} +1 -1
- package/dist/chunk-RGQPDR53.mjs +19 -0
- package/dist/{chunk-FJVVSKZ3.mjs → chunk-RL7VBTAR.mjs} +2 -2
- package/dist/chunk-SICAKRPY.mjs +20 -0
- package/dist/{chunk-4BZQ4GVW.mjs → chunk-SPGPUO3H.mjs} +3 -3
- package/dist/{chunk-QDPJ4VT2.mjs → chunk-TBQNSDP7.mjs} +10 -10
- package/dist/{chunk-ZSKLNZWZ.mjs → chunk-WWFOB6XW.mjs} +1 -1
- package/dist/{chunk-W6HM6F2U.mjs → chunk-XMNU4QC5.mjs} +6 -6
- package/dist/{chunk-PJKI7SRI.mjs → chunk-YK3LMWRB.mjs} +49 -10
- package/dist/{chunk-NDMFD5IM.mjs → chunk-YLEJQZFS.mjs} +8 -8
- package/dist/{chunk-WPNMWNCL.mjs → chunk-ZK6QVJ5Q.mjs} +9 -9
- package/dist/{chunk-5JSGA6OB.mjs → chunk-ZOUDN7LE.mjs} +16 -16
- package/dist/khala.mjs +11 -11
- package/dist/web/assets/local-CLw1_1-V.js +11 -0
- package/dist/web/assets/local-qpo5wk6U.css +1 -0
- package/dist/web/index.html +2 -2
- package/package.json +1 -1
- package/dist/chunk-6SUV3EW6.mjs +0 -27
- package/dist/chunk-TSK3HJEG.mjs +0 -20
- package/dist/chunk-WZJ6DQJV.mjs +0 -19
- package/dist/web/assets/local-CSPuGnH2.css +0 -1
- package/dist/web/assets/local-Dtyxaacx.js +0 -9
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { createRequire as __khalaCreateRequire } from 'node:module'; const require = __khalaCreateRequire(import.meta.url);
|
|
2
2
|
import {
|
|
3
3
|
bundle
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-MNN5BRU5.mjs";
|
|
5
5
|
import {
|
|
6
6
|
init_define_KHALA_BUNDLE
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-374APJUQ.mjs";
|
|
8
8
|
|
|
9
9
|
// src/version.ts
|
|
10
10
|
init_define_KHALA_BUNDLE();
|
|
@@ -2,7 +2,7 @@ import { createRequire as __khalaCreateRequire } from 'node:module'; const requi
|
|
|
2
2
|
import {
|
|
3
3
|
decodeChannelEvent,
|
|
4
4
|
formatChannelEventLine
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-2MEWZ7PJ.mjs";
|
|
6
6
|
import {
|
|
7
7
|
StateError,
|
|
8
8
|
channelFiles,
|
|
@@ -14,10 +14,10 @@ import {
|
|
|
14
14
|
stateKey,
|
|
15
15
|
writeJsonAtomic,
|
|
16
16
|
writeStateFile
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-R3TTOYPJ.mjs";
|
|
18
18
|
import {
|
|
19
19
|
init_define_KHALA_BUNDLE
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-374APJUQ.mjs";
|
|
21
21
|
|
|
22
22
|
// src/events/receive.ts
|
|
23
23
|
init_define_KHALA_BUNDLE();
|
|
@@ -50,7 +50,9 @@ function createEventKeyFilter() {
|
|
|
50
50
|
function isWakeEntry(entry) {
|
|
51
51
|
return entry.kind === "message" || entry.mention === true;
|
|
52
52
|
}
|
|
53
|
+
var agentGroupMention = /(?<![\p{L}\p{N}_@])@(?:channel|agents)(?![\p{L}\p{N}_])/iu;
|
|
53
54
|
function mentions(entry, name) {
|
|
55
|
+
if (entry.kind === "message" && agentGroupMention.test(entry.body)) return true;
|
|
54
56
|
if (!name) return false;
|
|
55
57
|
const escaped = name.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
56
58
|
return new RegExp(`(?<![\\p{L}\\p{N}_])@?${escaped}(?![\\p{L}\\p{N}_])`, "iu").test(entry.body);
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { createRequire as __khalaCreateRequire } from 'node:module'; const require = __khalaCreateRequire(import.meta.url);
|
|
2
|
+
import {
|
|
3
|
+
WAKE_USAGE,
|
|
4
|
+
cli_default,
|
|
5
|
+
consentLine,
|
|
6
|
+
runWake,
|
|
7
|
+
sessionIds,
|
|
8
|
+
setWake
|
|
9
|
+
} from "./chunk-CKLFGEDW.mjs";
|
|
10
|
+
import "./chunk-XMNU4QC5.mjs";
|
|
11
|
+
import "./chunk-ZOUDN7LE.mjs";
|
|
12
|
+
import "./chunk-C53OOWTD.mjs";
|
|
13
|
+
import "./chunk-LPJQCFRQ.mjs";
|
|
14
|
+
import "./chunk-EGMBLNRJ.mjs";
|
|
15
|
+
import "./chunk-757A5TML.mjs";
|
|
16
|
+
import "./chunk-2MEWZ7PJ.mjs";
|
|
17
|
+
import "./chunk-R3TTOYPJ.mjs";
|
|
18
|
+
import "./chunk-WWFOB6XW.mjs";
|
|
19
|
+
import "./chunk-374APJUQ.mjs";
|
|
20
|
+
export {
|
|
21
|
+
WAKE_USAGE,
|
|
22
|
+
consentLine,
|
|
23
|
+
cli_default as default,
|
|
24
|
+
runWake,
|
|
25
|
+
sessionIds,
|
|
26
|
+
setWake
|
|
27
|
+
};
|
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
import { createRequire as __khalaCreateRequire } from 'node:module'; const require = __khalaCreateRequire(import.meta.url);
|
|
2
2
|
import {
|
|
3
3
|
sessionStartWakeChannels
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-SPGPUO3H.mjs";
|
|
5
5
|
import {
|
|
6
6
|
adapterFor
|
|
7
|
-
} from "./chunk-
|
|
8
|
-
import "./chunk-
|
|
7
|
+
} from "./chunk-ZOUDN7LE.mjs";
|
|
8
|
+
import "./chunk-C53OOWTD.mjs";
|
|
9
9
|
import {
|
|
10
10
|
driverAllowed,
|
|
11
11
|
readListeningMode
|
|
12
|
-
} from "./chunk-
|
|
13
|
-
import "./chunk-
|
|
12
|
+
} from "./chunk-LPJQCFRQ.mjs";
|
|
13
|
+
import "./chunk-EGMBLNRJ.mjs";
|
|
14
14
|
import {
|
|
15
15
|
wakesAgent
|
|
16
|
-
} from "./chunk-
|
|
17
|
-
import "./chunk-
|
|
16
|
+
} from "./chunk-757A5TML.mjs";
|
|
17
|
+
import "./chunk-2MEWZ7PJ.mjs";
|
|
18
18
|
import {
|
|
19
19
|
filesForDir,
|
|
20
20
|
readJson,
|
|
21
21
|
resolveStateDir,
|
|
22
22
|
stateRoot
|
|
23
|
-
} from "./chunk-
|
|
24
|
-
import "./chunk-
|
|
23
|
+
} from "./chunk-R3TTOYPJ.mjs";
|
|
24
|
+
import "./chunk-WWFOB6XW.mjs";
|
|
25
25
|
import {
|
|
26
26
|
init_define_KHALA_BUNDLE
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-374APJUQ.mjs";
|
|
28
28
|
|
|
29
29
|
// hooks/claude-wake.ts
|
|
30
30
|
init_define_KHALA_BUNDLE();
|
|
@@ -80,7 +80,7 @@ async function unreadMessages(dir) {
|
|
|
80
80
|
}
|
|
81
81
|
let messages = 0;
|
|
82
82
|
for (const directory of directories) {
|
|
83
|
-
if (
|
|
83
|
+
if (await readListeningMode(filesForDir(directory)) === "async") continue;
|
|
84
84
|
messages += await unreadChannelMessages(directory);
|
|
85
85
|
}
|
|
86
86
|
return messages;
|
|
@@ -145,7 +145,7 @@ async function watch(stdin, _argv, io = { stderr: process.stderr, env: process.e
|
|
|
145
145
|
if (input.hook_event_name !== "SessionStart") return unreadMessages(dir);
|
|
146
146
|
let messages = 0;
|
|
147
147
|
for (const channel of await sessionStartWakeChannels(filesForDir(dir), io.env)) {
|
|
148
|
-
if (channel.connected &&
|
|
148
|
+
if (channel.connected && await readListeningMode(channel.files) !== "async") messages += await unreadChannelMessages(channel.files.dir);
|
|
149
149
|
}
|
|
150
150
|
return messages;
|
|
151
151
|
};
|
|
@@ -5,13 +5,13 @@ import {
|
|
|
5
5
|
monitorOwner,
|
|
6
6
|
run,
|
|
7
7
|
watchSession
|
|
8
|
-
} from "./chunk-
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
14
|
-
import "./chunk-
|
|
8
|
+
} from "./chunk-LPJQCFRQ.mjs";
|
|
9
|
+
import "./chunk-EGMBLNRJ.mjs";
|
|
10
|
+
import "./chunk-757A5TML.mjs";
|
|
11
|
+
import "./chunk-2MEWZ7PJ.mjs";
|
|
12
|
+
import "./chunk-R3TTOYPJ.mjs";
|
|
13
|
+
import "./chunk-WWFOB6XW.mjs";
|
|
14
|
+
import "./chunk-374APJUQ.mjs";
|
|
15
15
|
export {
|
|
16
16
|
WATCH_USAGE,
|
|
17
17
|
run as default,
|
|
@@ -4,10 +4,10 @@ import {
|
|
|
4
4
|
readJson,
|
|
5
5
|
readProcess,
|
|
6
6
|
writeJsonAtomic
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-R3TTOYPJ.mjs";
|
|
8
8
|
import {
|
|
9
9
|
init_define_KHALA_BUNDLE
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-374APJUQ.mjs";
|
|
11
11
|
|
|
12
12
|
// src/wake/terminal/capture.ts
|
|
13
13
|
init_define_KHALA_BUNDLE();
|
|
@@ -3,27 +3,27 @@ import {
|
|
|
3
3
|
WAKE_HARNESSES,
|
|
4
4
|
wakeDrivers,
|
|
5
5
|
wakeStatus
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-XMNU4QC5.mjs";
|
|
7
7
|
import {
|
|
8
8
|
adapterFor,
|
|
9
9
|
registerAntigravityWake,
|
|
10
10
|
resolveSources
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-ZOUDN7LE.mjs";
|
|
12
12
|
import {
|
|
13
13
|
CURSOR_DEFAULT_SESSION,
|
|
14
14
|
updateWakeSettings
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-LPJQCFRQ.mjs";
|
|
16
16
|
import {
|
|
17
17
|
SESSION_ID_PATTERN,
|
|
18
18
|
filesForDir,
|
|
19
19
|
stateRoot
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-R3TTOYPJ.mjs";
|
|
21
21
|
import {
|
|
22
22
|
resetWakeDriver
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-WWFOB6XW.mjs";
|
|
24
24
|
import {
|
|
25
25
|
init_define_KHALA_BUNDLE
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-374APJUQ.mjs";
|
|
27
27
|
|
|
28
28
|
// src/wake/cli.ts
|
|
29
29
|
init_define_KHALA_BUNDLE();
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { createRequire as __khalaCreateRequire } from 'node:module'; const require = __khalaCreateRequire(import.meta.url);
|
|
2
2
|
import {
|
|
3
3
|
init_define_KHALA_BUNDLE
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-374APJUQ.mjs";
|
|
5
5
|
|
|
6
6
|
// src/transport.ts
|
|
7
7
|
init_define_KHALA_BUNDLE();
|
|
8
8
|
var RESTORE_HISTORY_MAX_PAGES = 20;
|
|
9
|
-
var startChannelSession = async (creds, options) => creds.transport === "local" ? (await import("./chunk-
|
|
9
|
+
var startChannelSession = async (creds, options) => creds.transport === "local" ? (await import("./chunk-YLEJQZFS.mjs")).createLocalSession(creds) : (await import("./chunk-YK3LMWRB.mjs")).createAgentMatrixSession(creds, options);
|
|
10
10
|
|
|
11
11
|
export {
|
|
12
12
|
RESTORE_HISTORY_MAX_PAGES,
|
|
@@ -5,10 +5,10 @@ import {
|
|
|
5
5
|
object,
|
|
6
6
|
readMatrixUserId,
|
|
7
7
|
version
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-R3TTOYPJ.mjs";
|
|
9
9
|
import {
|
|
10
10
|
init_define_KHALA_BUNDLE
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-374APJUQ.mjs";
|
|
12
12
|
|
|
13
13
|
// ../contracts/src/m1/listening-mode.ts
|
|
14
14
|
init_define_KHALA_BUNDLE();
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { createRequire as __khalaCreateRequire } from 'node:module'; const require = __khalaCreateRequire(import.meta.url);
|
|
2
2
|
import {
|
|
3
3
|
KHALA_AGENT_VERSION
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-6H34GNLY.mjs";
|
|
5
5
|
import {
|
|
6
6
|
bundle
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-MNN5BRU5.mjs";
|
|
8
8
|
import {
|
|
9
9
|
LISTENING_MODES
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-EGMBLNRJ.mjs";
|
|
11
11
|
import {
|
|
12
12
|
HARNESS_REGISTRY,
|
|
13
13
|
M1_LABEL_MAX_BYTES,
|
|
@@ -35,10 +35,10 @@ import {
|
|
|
35
35
|
utcTimestamp,
|
|
36
36
|
utf8Length,
|
|
37
37
|
version
|
|
38
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-R3TTOYPJ.mjs";
|
|
39
39
|
import {
|
|
40
40
|
init_define_KHALA_BUNDLE
|
|
41
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-374APJUQ.mjs";
|
|
42
42
|
|
|
43
43
|
// src/client.ts
|
|
44
44
|
init_define_KHALA_BUNDLE();
|
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
import { createRequire as __khalaCreateRequire } from 'node:module'; const require = __khalaCreateRequire(import.meta.url);
|
|
2
2
|
import {
|
|
3
3
|
sessionStartWakeChannels
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-SPGPUO3H.mjs";
|
|
5
5
|
import {
|
|
6
6
|
capturePane
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-C53OOWTD.mjs";
|
|
8
8
|
import {
|
|
9
9
|
listChannels,
|
|
10
10
|
writeActivity
|
|
11
|
-
} from "./chunk-
|
|
12
|
-
import "./chunk-
|
|
11
|
+
} from "./chunk-757A5TML.mjs";
|
|
12
|
+
import "./chunk-2MEWZ7PJ.mjs";
|
|
13
13
|
import {
|
|
14
14
|
TERMINAL_SESSION_DETAILS,
|
|
15
15
|
openSessionDir,
|
|
16
16
|
readJson
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-R3TTOYPJ.mjs";
|
|
18
18
|
import {
|
|
19
19
|
init_define_KHALA_BUNDLE
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-374APJUQ.mjs";
|
|
21
21
|
|
|
22
22
|
// hooks/session-start.ts
|
|
23
23
|
init_define_KHALA_BUNDLE();
|
|
@@ -2,10 +2,10 @@ import { createRequire as __khalaCreateRequire } from 'node:module'; const requi
|
|
|
2
2
|
import {
|
|
3
3
|
adapterFor,
|
|
4
4
|
resolveSources
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-ZOUDN7LE.mjs";
|
|
6
6
|
import {
|
|
7
7
|
init_define_KHALA_BUNDLE
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-374APJUQ.mjs";
|
|
9
9
|
|
|
10
10
|
// src/mcp/session-id.ts
|
|
11
11
|
init_define_KHALA_BUNDLE();
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createRequire as __khalaCreateRequire } from 'node:module'; const require = __khalaCreateRequire(import.meta.url);
|
|
2
2
|
import {
|
|
3
3
|
init_define_KHALA_BUNDLE
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-374APJUQ.mjs";
|
|
5
5
|
|
|
6
6
|
// src/matrix/decryption-retry.ts
|
|
7
7
|
init_define_KHALA_BUNDLE();
|