ticlawk 0.1.15 → 0.1.16-dev.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/README.md +96 -212
- package/bin/ticlawk.mjs +228 -46
- package/package.json +2 -5
- package/src/adapters/ticlawk/api.mjs +303 -26
- package/src/adapters/ticlawk/credentials.mjs +1 -2
- package/src/adapters/ticlawk/index.mjs +273 -77
- package/src/cli/agent-commands.mjs +829 -0
- package/src/core/adapter-registry.mjs +12 -28
- package/src/core/agent-cli-handlers.mjs +704 -0
- package/src/core/agent-home.mjs +89 -0
- package/src/core/config.mjs +0 -15
- package/src/core/http.mjs +204 -18
- package/src/core/reminder-ticker.mjs +70 -0
- package/src/core/runtime-contract.mjs +1 -1
- package/src/core/runtime-env.mjs +41 -5
- package/src/core/runtime-support.mjs +47 -30
- package/src/core/ticlawk-control.mjs +7 -6
- package/src/migrate/write-initial-memory.mjs +101 -0
- package/src/runtimes/_shared/standing-prompt.mjs +290 -0
- package/src/runtimes/claude-code/index.mjs +34 -34
- package/src/runtimes/claude-code/session.mjs +15 -7
- package/src/runtimes/codex/index.mjs +31 -36
- package/src/runtimes/codex/session.mjs +9 -5
- package/src/runtimes/openclaw/index.mjs +56 -16
- package/src/runtimes/openclaw/target.mjs +0 -30
- package/src/runtimes/opencode/index.mjs +30 -35
- package/src/runtimes/opencode/session.mjs +11 -2
- package/src/runtimes/pi/index.mjs +30 -36
- package/src/runtimes/pi/session.mjs +8 -2
- package/ticlawk.mjs +37 -10
- package/assets/ticlawk-concept.svg +0 -137
- package/src/adapters/telegram/index.mjs +0 -359
|
@@ -3,48 +3,32 @@ import {
|
|
|
3
3
|
getTiclawkAuthHelp,
|
|
4
4
|
runTiclawkAuth,
|
|
5
5
|
} from '../adapters/ticlawk/index.mjs';
|
|
6
|
-
import {
|
|
7
|
-
createTelegramAdapter,
|
|
8
|
-
getTelegramAuthHelp,
|
|
9
|
-
runTelegramAuth,
|
|
10
|
-
} from '../adapters/telegram/index.mjs';
|
|
11
6
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
7
|
+
/**
|
|
8
|
+
* Ticlawk has a single adapter: ticlawk itself. The registry shape is kept
|
|
9
|
+
* so callers can still depend on a stable surface (createAdapter, etc.)
|
|
10
|
+
* without branching on adapter ids.
|
|
11
|
+
*/
|
|
16
12
|
|
|
17
|
-
const
|
|
18
|
-
ticlawk: {
|
|
19
|
-
help: getTiclawkAuthHelp,
|
|
20
|
-
run: runTiclawkAuth,
|
|
21
|
-
},
|
|
22
|
-
telegram: {
|
|
23
|
-
help: getTelegramAuthHelp,
|
|
24
|
-
run: runTelegramAuth,
|
|
25
|
-
},
|
|
26
|
-
};
|
|
13
|
+
const ADAPTER_ID = 'ticlawk';
|
|
27
14
|
|
|
28
15
|
export function createAdapter(adapterId, ctx) {
|
|
29
|
-
|
|
30
|
-
if (!factory) {
|
|
16
|
+
if (adapterId !== ADAPTER_ID) {
|
|
31
17
|
throw new Error(`unsupported adapter: ${adapterId}`);
|
|
32
18
|
}
|
|
33
|
-
return
|
|
19
|
+
return createTiclawkAdapter(ctx);
|
|
34
20
|
}
|
|
35
21
|
|
|
36
22
|
export function getAdapterAuthHelp(adapterId) {
|
|
37
|
-
|
|
38
|
-
if (!handler?.help) {
|
|
23
|
+
if (adapterId !== ADAPTER_ID) {
|
|
39
24
|
throw new Error(`unsupported adapter: ${adapterId}`);
|
|
40
25
|
}
|
|
41
|
-
return
|
|
26
|
+
return getTiclawkAuthHelp();
|
|
42
27
|
}
|
|
43
28
|
|
|
44
29
|
export async function runAdapterAuth(adapterId, rawArgs) {
|
|
45
|
-
|
|
46
|
-
if (!handler?.run) {
|
|
30
|
+
if (adapterId !== ADAPTER_ID) {
|
|
47
31
|
throw new Error(`unsupported adapter: ${adapterId}`);
|
|
48
32
|
}
|
|
49
|
-
return
|
|
33
|
+
return runTiclawkAuth(rawArgs);
|
|
50
34
|
}
|