clanka 0.25.3 → 0.26.0
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/Acp.d.ts +5 -37
- package/dist/Acp.d.ts.map +1 -1
- package/dist/Acp.js +33 -48
- package/dist/Acp.js.map +1 -1
- package/dist/Acp.test.js +62 -1
- package/dist/Acp.test.js.map +1 -1
- package/dist/AcpImage.test.js +3 -2
- package/dist/AcpImage.test.js.map +1 -1
- package/dist/AcpSessionStore.d.ts +114 -0
- package/dist/AcpSessionStore.d.ts.map +1 -0
- package/dist/AcpSessionStore.js +327 -0
- package/dist/AcpSessionStore.js.map +1 -0
- package/dist/AcpSessionStore.test.d.ts +2 -0
- package/dist/AcpSessionStore.test.d.ts.map +1 -0
- package/dist/AcpSessionStore.test.js +135 -0
- package/dist/AcpSessionStore.test.js.map +1 -0
- package/dist/bin/{AiError-CsvdOsKR.mjs → AiError-DBaKz35C.mjs} +2 -2
- package/dist/bin/{Latch-B3e9629m.mjs → Latch-DOdbsGMQ.mjs} +1 -1
- package/dist/bin/{McpClient-BCxZZgnA.mjs → McpClient-B-FFG6Pg.mjs} +1 -1
- package/dist/bin/{OutputFormatter-ByMjyBhe.mjs → OutputFormatter-DhhP2i-7.mjs} +2 -2
- package/dist/bin/{Schema-BfUmMefy.mjs → Schema-CFdSO6iH.mjs} +11 -1
- package/dist/bin/{SemanticSearch-Cw10ozz8.mjs → SemanticSearch-C3a7LAQr.mjs} +2 -2
- package/dist/bin/cli.mjs +346 -142
- package/dist/bin/{upgrade-t590zYhO.mjs → upgrade-C4aOEWJH.mjs} +2 -2
- package/dist/cli.js +10 -3
- package/dist/cli.js.map +1 -1
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/Acp.test.ts +120 -1
- package/src/Acp.ts +41 -55
- package/src/AcpImage.test.ts +7 -2
- package/src/AcpSessionStore.test.ts +220 -0
- package/src/AcpSessionStore.ts +455 -0
- package/src/cli.ts +20 -9
- package/src/index.ts +5 -0
package/src/cli.ts
CHANGED
|
@@ -9,6 +9,7 @@ import * as NodeServices from "@effect/platform-node/NodeServices"
|
|
|
9
9
|
import * as NodeRuntime from "@effect/platform-node/NodeRuntime"
|
|
10
10
|
import * as GlobalWebSocket from "./GlobalWebSocket.ts"
|
|
11
11
|
import * as Acp from "./Acp.ts"
|
|
12
|
+
import * as AcpSessionStore from "./AcpSessionStore.ts"
|
|
12
13
|
import * as AgentExecutor from "./AgentExecutor.ts"
|
|
13
14
|
import * as Agent from "./Agent.ts"
|
|
14
15
|
import * as Compaction from "./Compaction.ts"
|
|
@@ -340,18 +341,27 @@ const mcpSummary = (
|
|
|
340
341
|
)
|
|
341
342
|
.join(", ")}`
|
|
342
343
|
|
|
344
|
+
const configDirectory = Effect.gen(function* () {
|
|
345
|
+
const path = yield* Path.Path
|
|
346
|
+
const configHome = yield* Config.NonEmptyString("XDG_CONFIG_HOME").pipe(
|
|
347
|
+
Config.orElse(() =>
|
|
348
|
+
Config.NonEmptyString("HOME").pipe(
|
|
349
|
+
Config.map((home) => path.join(home, ".config")),
|
|
350
|
+
),
|
|
351
|
+
),
|
|
352
|
+
)
|
|
353
|
+
return path.join(configHome, "clanka")
|
|
354
|
+
})
|
|
355
|
+
|
|
343
356
|
const Kvs = Layer.unwrap(
|
|
357
|
+
Effect.map(configDirectory, KeyValueStore.layerFileSystem),
|
|
358
|
+
).pipe(Layer.provide(NodeServices.layer))
|
|
359
|
+
|
|
360
|
+
const AcpSessions = Layer.unwrap(
|
|
344
361
|
Effect.gen(function* () {
|
|
345
362
|
const path = yield* Path.Path
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
Config.orElse(() =>
|
|
349
|
-
Config.NonEmptyString("HOME").pipe(
|
|
350
|
-
Config.map((home) => path.join(home, ".config")),
|
|
351
|
-
),
|
|
352
|
-
),
|
|
353
|
-
)
|
|
354
|
-
return KeyValueStore.layerFileSystem(path.join(configHome, "clanka"))
|
|
363
|
+
const directory = yield* configDirectory
|
|
364
|
+
return AcpSessionStore.layerFileSystem(path.join(directory, "sessions"))
|
|
355
365
|
}),
|
|
356
366
|
).pipe(Layer.provide(NodeServices.layer))
|
|
357
367
|
|
|
@@ -477,6 +487,7 @@ const acp = Command.make("acp", {
|
|
|
477
487
|
),
|
|
478
488
|
Command.provide((flags) =>
|
|
479
489
|
Layer.mergeAll(
|
|
490
|
+
AcpSessions,
|
|
480
491
|
Agent.ConversationMode.layer(false),
|
|
481
492
|
Layer.succeed(Logger.LogToStderr, true),
|
|
482
493
|
DeviceCodeHandler.layerLog,
|