clanka 0.25.0 → 0.25.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/dist/bin/cli.mjs CHANGED
@@ -11246,6 +11246,11 @@ const AgentTools = make$16(make$17("changeDirectory", {
11246
11246
  }),
11247
11247
  success: NullOr(String$7),
11248
11248
  dependencies: [CurrentDirectory, ImageAttacher]
11249
+ }), make$17("run", {
11250
+ description: "Run a shell command and return its output. If it takes too long it will become a background task. Use 'bash' for more control.",
11251
+ parameters: String$7.annotate({ identifier: "command" }),
11252
+ success: String$7,
11253
+ dependencies: [CurrentDirectory]
11249
11254
  }), make$17("rg", {
11250
11255
  description: "Search for a pattern in files using ripgrep",
11251
11256
  parameters: Struct({
@@ -11265,55 +11270,12 @@ const AgentTools = make$16(make$17("changeDirectory", {
11265
11270
  success: Task,
11266
11271
  failure: String$7,
11267
11272
  dependencies: [AgentTaskExecutor]
11268
- }), make$17("messageAgent", {
11269
- description: "Send a message to one of your sub-agents.",
11270
- parameters: Struct({
11271
- id: String$7,
11272
- message: String$7
11273
- }),
11274
- failure: String$7,
11275
- dependencies: [AgentTaskExecutor]
11276
- }), make$17("glob", {
11277
- description: "Find files matching a glob pattern.",
11278
- parameters: String$7.annotate({ identifier: "pattern" }),
11279
- success: ArraySchema(String$7),
11280
- dependencies: [CurrentDirectory]
11281
11273
  }), make$17("gh", {
11282
11274
  description: "Use the GitHub CLI to run a command - use this instead of the bash tool.",
11283
11275
  parameters: ArraySchema(String$7).annotate({ identifier: "args" }),
11284
11276
  success: String$7,
11285
11277
  dependencies: [CurrentDirectory]
11286
- }), makeBashTool(defaultBashTimeout), make$17("run", {
11287
- description: "Run a bash command in the foreground and return its output. If it takes longer than 2 minutes it will become a background task.",
11288
- parameters: String$7.annotate({ identifier: "command" }),
11289
- success: String$7,
11290
- dependencies: [CurrentDirectory]
11291
- }), make$17("taskOutput", {
11292
- description: "Return the status and output so far of one of your tasks: a background bash command or a sub-agent.",
11293
- parameters: String$7.annotate({ identifier: "id" }),
11294
- success: Task,
11295
- failure: String$7,
11296
- dependencies: [AgentTaskExecutor]
11297
- }), make$17("waitTasks", {
11298
- description: "Wait until the given tasks have ended and return them, in the order given.",
11299
- parameters: Struct({
11300
- ids: ArraySchema(String$7),
11301
- timeoutMs: optional$2(Finite).annotate({ documentation: "How long to wait in ms (default and max: the bash command timeout)" })
11302
- }),
11303
- success: ArraySchema(Task),
11304
- failure: String$7,
11305
- dependencies: [AgentTaskExecutor]
11306
- }), make$17("stopTask", {
11307
- description: "Stop one of your tasks.",
11308
- parameters: String$7.annotate({ identifier: "id" }),
11309
- failure: String$7,
11310
- dependencies: [AgentTaskExecutor]
11311
- }), make$17("listTasks", {
11312
- description: "List the tasks you have started, with their status.",
11313
- parameters: Void,
11314
- success: ArraySchema(Task),
11315
- dependencies: [AgentTaskExecutor]
11316
- }), make$17("applyPatch", {
11278
+ }), makeBashTool(defaultBashTimeout), make$17("applyPatch", {
11317
11279
  description: "Add, update or remove multiple files with a git diff / unified diff / wrapped patch.",
11318
11280
  parameters: String$7.annotate({ identifier: "patch" }),
11319
11281
  success: String$7,
@@ -11352,6 +11314,39 @@ const AgentTools = make$16(make$17("changeDirectory", {
11352
11314
  }), make$17("sleep", {
11353
11315
  description: "Sleep for a specified number of milliseconds",
11354
11316
  parameters: Finite.annotate({ identifier: "ms" })
11317
+ }), make$17("taskOutput", {
11318
+ description: "Return the status and output so far of one of your tasks: a background bash command or a sub-agent.",
11319
+ parameters: String$7.annotate({ identifier: "id" }),
11320
+ success: Task,
11321
+ failure: String$7,
11322
+ dependencies: [AgentTaskExecutor]
11323
+ }), make$17("waitTasks", {
11324
+ description: "Wait until the given tasks have ended and return them, in the order given.",
11325
+ parameters: Struct({
11326
+ ids: ArraySchema(String$7),
11327
+ timeoutMs: optional$2(Finite).annotate({ documentation: "How long to wait in ms (default and max: the bash command timeout)" })
11328
+ }),
11329
+ success: ArraySchema(Task),
11330
+ failure: String$7,
11331
+ dependencies: [AgentTaskExecutor]
11332
+ }), make$17("stopTask", {
11333
+ description: "Stop one of your tasks.",
11334
+ parameters: String$7.annotate({ identifier: "id" }),
11335
+ failure: String$7,
11336
+ dependencies: [AgentTaskExecutor]
11337
+ }), make$17("listTasks", {
11338
+ description: "List the tasks you have started, with their status.",
11339
+ parameters: Void,
11340
+ success: ArraySchema(Task),
11341
+ dependencies: [AgentTaskExecutor]
11342
+ }), make$17("messageAgent", {
11343
+ description: "Send a message to one of your sub-agents.",
11344
+ parameters: Struct({
11345
+ id: String$7,
11346
+ message: String$7
11347
+ }),
11348
+ failure: String$7,
11349
+ dependencies: [AgentTaskExecutor]
11355
11350
  }), make$17("taskComplete", {
11356
11351
  description: "Only call this when the task is fully complete and you have a final output message to send.",
11357
11352
  parameters: String$7.annotate({ identifier: "output" }),
@@ -11563,11 +11558,6 @@ const AgentToolHandlersNoDeps = AgentToolsWithSearch.toLayer(gen(function* () {
11563
11558
  if (output.length > 0 || searchesIgnoredFiles || options.glob === void 0 || !globNamesDirectory(options.glob)) return output;
11564
11559
  return yield* run(args.slice(0, -1).concat("-uu", options.pattern));
11565
11560
  }),
11566
- glob: fn("AgentTools.glob")(function* (pattern) {
11567
- yield* logInfo(`Calling "glob"`).pipe(annotateLogs({ pattern }));
11568
- const cwd = yield* CurrentDirectory;
11569
- return yield* promise(() => import("./index.min-CuA3AuA-.mjs").then((Glob) => Glob.glob(pattern, { cwd })));
11570
- }),
11571
11561
  bash,
11572
11562
  run: fn("AgentTools.run")(function* (command) {
11573
11563
  return (yield* bash({
@@ -20112,9 +20102,7 @@ const summarizerPrompt = (options) => {
20112
20102
 
20113
20103
  Write the summary as a compact briefing. Include:
20114
20104
  - The user's goals, and any constraints or preferences they stated
20115
- - What has been done so far: concrete file paths, commands, and their results
20116
- - Key findings and decisions, with the reasons behind them
20117
- - Errors encountered and how they were resolved
20105
+ - What has been done so far with any key findings and decisions
20118
20106
  - What remains to be done, in order
20119
20107
 
20120
20108
  Be precise. Prefer exact identifiers (paths, symbols, commands) over prose. Do not include commentary about the summary itself.
@@ -28333,7 +28321,7 @@ const transformToolCallParams$1 = fnUntraced(function* (options, toolName, toolP
28333
28321
  return yield* decodeEffect(codec)(toolParams).pipe(flatMap$1((decoded) => encodeUnknownEffect(toCodecJson(tool.parametersSchema))(decoded)), orElseSucceed(() => toolParams));
28334
28322
  });
28335
28323
  // package.json
28336
- var version$1 = "0.25.0";
28324
+ var version$1 = "0.25.2";
28337
28325
  // src/ClaudeAgent.ts
28338
28326
  const minimumClaudeCodeVersion = "2.1.248";
28339
28327
  const serverName = "clanka";
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "clanka",
3
3
  "type": "module",
4
- "version": "0.25.0",
4
+ "version": "0.25.2",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
@@ -30,7 +30,6 @@
30
30
  "@silvia-odwyer/photon-node": "^0.3.4",
31
31
  "@vscode/ripgrep": "^1.18.0",
32
32
  "chalk": "^6.0.1",
33
- "glob": "^14.0.4",
34
33
  "sqlite-vec": "0.1.9",
35
34
  "tree-sitter": "^0.21.1",
36
35
  "tree-sitter-javascript": "^0.23.1",
@@ -45,14 +44,14 @@
45
44
  "effect": "^4.0.0"
46
45
  },
47
46
  "devDependencies": {
48
- "@anthropic-ai/sdk": "^1.7.0",
47
+ "@anthropic-ai/sdk": "^1.8.0",
49
48
  "@changesets/changelog-github": "^1.0.1",
50
49
  "@changesets/cli": "^3.0.3",
51
50
  "@effect/ai-openai": "4.1.3",
52
51
  "@effect/ai-openai-compat": "4.1.3",
53
52
  "@effect/platform-node": "4.1.3",
54
53
  "@effect/sql-sqlite-node": "4.1.3",
55
- "@effect/tsgo": "0.67.5",
54
+ "@effect/tsgo": "0.67.7",
56
55
  "@effect/vitest": "4.1.3",
57
56
  "@types/node": "^26.6.6",
58
57
  "@types/turndown": "^5.0.6",
package/src/AgentTools.ts CHANGED
@@ -370,6 +370,13 @@ export const AgentTools = Toolkit.make(
370
370
  success: Schema.NullOr(Schema.String),
371
371
  dependencies: [CurrentDirectory, ImageAttacher],
372
372
  }),
373
+ Tool.make("run", {
374
+ description:
375
+ "Run a shell command and return its output. If it takes too long it will become a background task. Use 'bash' for more control.",
376
+ parameters: Schema.String.annotate({ identifier: "command" }),
377
+ success: Schema.String,
378
+ dependencies: [CurrentDirectory],
379
+ }),
373
380
  Tool.make("rg", {
374
381
  description: "Search for a pattern in files using ripgrep",
375
382
  parameters: Schema.Struct({
@@ -399,23 +406,6 @@ export const AgentTools = Toolkit.make(
399
406
  failure: Schema.String,
400
407
  dependencies: [AgentTaskExecutor],
401
408
  }),
402
- Tool.make("messageAgent", {
403
- description: "Send a message to one of your sub-agents.",
404
- parameters: Schema.Struct({
405
- id: Schema.String,
406
- message: Schema.String,
407
- }),
408
- failure: Schema.String,
409
- dependencies: [AgentTaskExecutor],
410
- }),
411
- Tool.make("glob", {
412
- description: "Find files matching a glob pattern.",
413
- parameters: Schema.String.annotate({
414
- identifier: "pattern",
415
- }),
416
- success: Schema.Array(Schema.String),
417
- dependencies: [CurrentDirectory],
418
- }),
419
409
  Tool.make("gh", {
420
410
  description:
421
411
  "Use the GitHub CLI to run a command - use this instead of the bash tool.",
@@ -426,51 +416,6 @@ export const AgentTools = Toolkit.make(
426
416
  dependencies: [CurrentDirectory],
427
417
  }),
428
418
  makeBashTool(defaultBashTimeout),
429
- Tool.make("run", {
430
- description:
431
- "Run a bash command in the foreground and return its output. If it takes longer than 2 minutes it will become a background task.",
432
- parameters: Schema.String.annotate({ identifier: "command" }),
433
- success: Schema.String,
434
- dependencies: [CurrentDirectory],
435
- }),
436
- Tool.make("taskOutput", {
437
- description:
438
- "Return the status and output so far of one of your tasks: a background bash command or a sub-agent.",
439
- parameters: Schema.String.annotate({
440
- identifier: "id",
441
- }),
442
- success: Task,
443
- failure: Schema.String,
444
- dependencies: [AgentTaskExecutor],
445
- }),
446
- Tool.make("waitTasks", {
447
- description:
448
- "Wait until the given tasks have ended and return them, in the order given.",
449
- parameters: Schema.Struct({
450
- ids: Schema.Array(Schema.String),
451
- timeoutMs: Schema.optional(Schema.Finite).annotate({
452
- documentation:
453
- "How long to wait in ms (default and max: the bash command timeout)",
454
- }),
455
- }),
456
- success: Schema.Array(Task),
457
- failure: Schema.String,
458
- dependencies: [AgentTaskExecutor],
459
- }),
460
- Tool.make("stopTask", {
461
- description: "Stop one of your tasks.",
462
- parameters: Schema.String.annotate({
463
- identifier: "id",
464
- }),
465
- failure: Schema.String,
466
- dependencies: [AgentTaskExecutor],
467
- }),
468
- Tool.make("listTasks", {
469
- description: "List the tasks you have started, with their status.",
470
- parameters: Schema.Void,
471
- success: Schema.Array(Task),
472
- dependencies: [AgentTaskExecutor],
473
- }),
474
419
  Tool.make("applyPatch", {
475
420
  description:
476
421
  "Add, update or remove multiple files with a git diff / unified diff / wrapped patch.",
@@ -534,6 +479,53 @@ export const AgentTools = Toolkit.make(
534
479
  identifier: "ms",
535
480
  }),
536
481
  }),
482
+ Tool.make("taskOutput", {
483
+ description:
484
+ "Return the status and output so far of one of your tasks: a background bash command or a sub-agent.",
485
+ parameters: Schema.String.annotate({
486
+ identifier: "id",
487
+ }),
488
+ success: Task,
489
+ failure: Schema.String,
490
+ dependencies: [AgentTaskExecutor],
491
+ }),
492
+ Tool.make("waitTasks", {
493
+ description:
494
+ "Wait until the given tasks have ended and return them, in the order given.",
495
+ parameters: Schema.Struct({
496
+ ids: Schema.Array(Schema.String),
497
+ timeoutMs: Schema.optional(Schema.Finite).annotate({
498
+ documentation:
499
+ "How long to wait in ms (default and max: the bash command timeout)",
500
+ }),
501
+ }),
502
+ success: Schema.Array(Task),
503
+ failure: Schema.String,
504
+ dependencies: [AgentTaskExecutor],
505
+ }),
506
+ Tool.make("stopTask", {
507
+ description: "Stop one of your tasks.",
508
+ parameters: Schema.String.annotate({
509
+ identifier: "id",
510
+ }),
511
+ failure: Schema.String,
512
+ dependencies: [AgentTaskExecutor],
513
+ }),
514
+ Tool.make("listTasks", {
515
+ description: "List the tasks you have started, with their status.",
516
+ parameters: Schema.Void,
517
+ success: Schema.Array(Task),
518
+ dependencies: [AgentTaskExecutor],
519
+ }),
520
+ Tool.make("messageAgent", {
521
+ description: "Send a message to one of your sub-agents.",
522
+ parameters: Schema.Struct({
523
+ id: Schema.String,
524
+ message: Schema.String,
525
+ }),
526
+ failure: Schema.String,
527
+ dependencies: [AgentTaskExecutor],
528
+ }),
537
529
  Tool.make("taskComplete", {
538
530
  description:
539
531
  "Only call this when the task is fully complete and you have a final output message to send.",
@@ -936,15 +928,6 @@ export const AgentToolHandlersNoDeps = AgentToolsWithSearch.toLayer(
936
928
  }
937
929
  return yield* run(args.slice(0, -1).concat("-uu", options.pattern))
938
930
  }),
939
- glob: Effect.fn("AgentTools.glob")(function* (pattern) {
940
- yield* Effect.logInfo(`Calling "glob"`).pipe(
941
- Effect.annotateLogs({ pattern }),
942
- )
943
- const cwd = yield* CurrentDirectory
944
- return yield* Effect.promise(() =>
945
- import("glob").then((Glob) => Glob.glob(pattern, { cwd })),
946
- )
947
- }),
948
931
  bash,
949
932
  run: Effect.fn("AgentTools.run")(function* (command) {
950
933
  const task = yield* bash({ command, timeoutMs: 120_000 })
package/src/Compaction.ts CHANGED
@@ -721,9 +721,7 @@ ${summary}
721
721
 
722
722
  Write the summary as a compact briefing. Include:
723
723
  - The user's goals, and any constraints or preferences they stated
724
- - What has been done so far: concrete file paths, commands, and their results
725
- - Key findings and decisions, with the reasons behind them
726
- - Errors encountered and how they were resolved
724
+ - What has been done so far with any key findings and decisions
727
725
  - What remains to be done, in order
728
726
 
729
727
  Be precise. Prefer exact identifiers (paths, symbols, commands) over prose. Do not include commentary about the summary itself.