@botconnector/bccli 0.4.1 → 0.4.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.
Files changed (69) hide show
  1. package/dist/{acp-3PHBAI64.js → acp-UYC6APR5.js} +30 -6
  2. package/dist/acp.d.ts +1 -0
  3. package/dist/agent.d.ts +5 -1
  4. package/dist/args-NRTZWWEV.js +13 -0
  5. package/dist/args.d.ts +2 -0
  6. package/dist/checkpoints.d.ts +1 -0
  7. package/dist/{chunk-BKGFA2PT.js → chunk-266SY3MC.js} +1 -1
  8. package/dist/{chunk-MFHCQQEN.js → chunk-3I5BW3ZT.js} +3 -2
  9. package/dist/{chunk-UZWJQF67.js → chunk-3WHI4LN3.js} +2 -1
  10. package/dist/{chunk-WNACAUDK.js → chunk-5YJ3ZQVR.js} +66 -9
  11. package/dist/{chunk-24JN75FZ.js → chunk-6M55UPES.js} +2 -2
  12. package/dist/{chunk-XV7ZVL4J.js → chunk-6UO5GX55.js} +26 -12
  13. package/dist/{chunk-R5RE46CW.js → chunk-C64KM37J.js} +36 -6
  14. package/dist/{chunk-GN4W3T6E.js → chunk-H7XJDKJY.js} +4 -4
  15. package/dist/{chunk-JHPGOAXU.js → chunk-HQW4BROS.js} +4 -5
  16. package/dist/{chunk-75BECX4F.js → chunk-IYR5PYA3.js} +4 -4
  17. package/dist/{chunk-45SDLMTV.js → chunk-JXM6REER.js} +1 -1
  18. package/dist/{chunk-BLOYFIAD.js → chunk-KPTML72Q.js} +1 -1
  19. package/dist/{chunk-WI22M2ID.js → chunk-NQOGVP3I.js} +2 -2
  20. package/dist/{chunk-QZKLZELZ.js → chunk-OK2USAXX.js} +28 -4
  21. package/dist/{chunk-PZRKU4UM.js → chunk-R72OV7RF.js} +421 -108
  22. package/dist/{chunk-FLQPE4S5.js → chunk-RX4UQX43.js} +4 -1
  23. package/dist/{chunk-BC7UXFE4.js → chunk-SVD4LHJC.js} +64 -3
  24. package/dist/{chunk-BXQQCUAC.js → chunk-TIMSYZIR.js} +7 -7
  25. package/dist/{chunk-MHIYLXJC.js → chunk-WFZKJY3R.js} +8 -4
  26. package/dist/{chunk-BGXNR74O.js → chunk-ZEPTUKNW.js} +119 -31
  27. package/dist/cli.js +60 -43
  28. package/dist/{completion-HPPFDAPB.js → completion-D2BSBTQO.js} +1 -1
  29. package/dist/{config-DIDLDONU.js → config-ENDRMOTP.js} +3 -3
  30. package/dist/{config-IU76CPK2.js → config-LAINORU5.js} +2 -2
  31. package/dist/config.d.ts +2 -0
  32. package/dist/{ghBotCli-E3VPHNZY.js → ghBotCli-TSLRORJJ.js} +21 -20
  33. package/dist/{integrationCli-Q2YPDTPG.js → integrationCli-HXCSEWH2.js} +2 -2
  34. package/dist/{login-FP3BB44A.js → login-RYESFZG6.js} +4 -4
  35. package/dist/lsp.d.ts +3 -0
  36. package/dist/mcp/manager.d.ts +18 -0
  37. package/dist/{mcpCli-SNBDUWJN.js → mcpCli-SETTCL3K.js} +6 -6
  38. package/dist/{modelsCli-CZ2HNGKR.js → modelsCli-OP7CDZC7.js} +6 -6
  39. package/dist/{oauthLogin-6FWQABJ7.js → oauthLogin-XWY7OHCG.js} +1 -1
  40. package/dist/{pluginsCli-LPIUUDWB.js → pluginsCli-ZQNKWZHJ.js} +2 -2
  41. package/dist/{prCli-5IMV3VNQ.js → prCli-6PUWTMTP.js} +20 -4
  42. package/dist/prCli.d.ts +13 -0
  43. package/dist/print.d.ts +2 -0
  44. package/dist/provider.d.ts +5 -0
  45. package/dist/providerCli-5OZI2GQQ.js +15 -0
  46. package/dist/sdk.d.ts +5 -1
  47. package/dist/sdk.js +733 -176
  48. package/dist/{serve-X2ZV4S5U.js → serve-4J7HA4JO.js} +17 -17
  49. package/dist/{serve-KWOECK5W.js → serve-K5AH4MGO.js} +3 -3
  50. package/dist/session-YQXCCKXI.js +12 -0
  51. package/dist/session.d.ts +3 -0
  52. package/dist/setup-S4AJT6XE.js +24 -0
  53. package/dist/slash/info.d.ts +1 -0
  54. package/dist/{statsCli-CF3R7ATL.js → statsCli-XR6BEZQQ.js} +2 -2
  55. package/dist/tokenBudget.d.ts +1 -1
  56. package/dist/tools/edit.d.ts +7 -2
  57. package/dist/tools/grep.d.ts +14 -2
  58. package/dist/tools/ignore.d.ts +2 -2
  59. package/dist/tools/paths.d.ts +2 -0
  60. package/dist/{transferCli-YUFPI6AH.js → transferCli-R2KEIWQR.js} +8 -6
  61. package/dist/ui/complete.d.ts +5 -0
  62. package/dist/ui/vim.d.ts +1 -1
  63. package/dist/{ui-IVIFNUCC.js → ui-36ZEK65V.js} +177 -54
  64. package/dist/{update-TZ2G6KQ3.js → update-FSS7X5WV.js} +2 -2
  65. package/package.json +1 -1
  66. package/dist/args-W6BNKY7K.js +0 -13
  67. package/dist/providerCli-NMUFXAAS.js +0 -15
  68. package/dist/session-GKEXDJKZ.js +0 -12
  69. package/dist/setup-OV3NWQN5.js +0 -24
@@ -1,14 +1,14 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  createRuntime
4
- } from "./chunk-PZRKU4UM.js";
5
- import "./chunk-QZKLZELZ.js";
6
- import "./chunk-BGXNR74O.js";
7
- import "./chunk-45SDLMTV.js";
4
+ } from "./chunk-R72OV7RF.js";
5
+ import "./chunk-OK2USAXX.js";
6
+ import "./chunk-ZEPTUKNW.js";
7
+ import "./chunk-JXM6REER.js";
8
8
  import "./chunk-PSO7R5AD.js";
9
9
  import {
10
10
  VERSION
11
- } from "./chunk-BKGFA2PT.js";
11
+ } from "./chunk-266SY3MC.js";
12
12
  import {
13
13
  LOOPBACK_BIND,
14
14
  MAX_FRAME_BYTES,
@@ -17,25 +17,25 @@ import {
17
17
  parseClientFrame,
18
18
  randomToken,
19
19
  trustFence
20
- } from "./chunk-XV7ZVL4J.js";
21
- import "./chunk-MHIYLXJC.js";
22
- import "./chunk-GN4W3T6E.js";
20
+ } from "./chunk-6UO5GX55.js";
21
+ import "./chunk-WFZKJY3R.js";
22
+ import "./chunk-H7XJDKJY.js";
23
23
  import {
24
24
  listAllModels
25
- } from "./chunk-75BECX4F.js";
26
- import "./chunk-JHPGOAXU.js";
27
- import "./chunk-MFHCQQEN.js";
25
+ } from "./chunk-IYR5PYA3.js";
26
+ import "./chunk-HQW4BROS.js";
27
+ import "./chunk-3I5BW3ZT.js";
28
28
  import {
29
29
  Session
30
- } from "./chunk-BC7UXFE4.js";
31
- import "./chunk-WNACAUDK.js";
32
- import "./chunk-BLOYFIAD.js";
33
- import "./chunk-24JN75FZ.js";
30
+ } from "./chunk-SVD4LHJC.js";
31
+ import "./chunk-5YJ3ZQVR.js";
32
+ import "./chunk-KPTML72Q.js";
33
+ import "./chunk-6M55UPES.js";
34
34
  import {
35
35
  bccliHome,
36
36
  loadConfig
37
- } from "./chunk-FLQPE4S5.js";
38
- import "./chunk-UZWJQF67.js";
37
+ } from "./chunk-RX4UQX43.js";
38
+ import "./chunk-3WHI4LN3.js";
39
39
 
40
40
  // src/serve.ts
41
41
  import { randomBytes } from "crypto";
@@ -3,15 +3,15 @@ import {
3
3
  createFetchTool,
4
4
  createWebSearchTool,
5
5
  isPrivateHost
6
- } from "./chunk-45SDLMTV.js";
6
+ } from "./chunk-JXM6REER.js";
7
7
  import "./chunk-PSO7R5AD.js";
8
8
  import {
9
9
  loadConfig,
10
10
  readCredentials
11
- } from "./chunk-FLQPE4S5.js";
11
+ } from "./chunk-RX4UQX43.js";
12
12
  import {
13
13
  t
14
- } from "./chunk-UZWJQF67.js";
14
+ } from "./chunk-3WHI4LN3.js";
15
15
 
16
16
  // src/mcpServer/serve.ts
17
17
  import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
@@ -0,0 +1,12 @@
1
+ #!/usr/bin/env node
2
+ import {
3
+ Session,
4
+ pruneSessions
5
+ } from "./chunk-SVD4LHJC.js";
6
+ import "./chunk-5YJ3ZQVR.js";
7
+ import "./chunk-KPTML72Q.js";
8
+ import "./chunk-3WHI4LN3.js";
9
+ export {
10
+ Session,
11
+ pruneSessions
12
+ };
package/dist/session.d.ts CHANGED
@@ -2,6 +2,7 @@ import { type ChatMessage, type Usage } from './provider';
2
2
  export declare class Session {
3
3
  readonly file: string;
4
4
  constructor(file: string);
5
+ get id(): string;
5
6
  static create(home: string, cwd: string, now?: Date): Session;
6
7
  static list(home: string, cwd: string): {
7
8
  session: Session;
@@ -20,6 +21,8 @@ export declare class Session {
20
21
  load(): ChatMessage[];
21
22
  /** Model of the most recent turn that recorded usage — serve attach continues a session with its own model. */
22
23
  lastModel(): string | undefined;
24
+ /** Accumulated token usage since the last non-compaction reset. */
25
+ totalUsage(): Usage;
23
26
  /**
24
27
  * What the user sees on resume: the whole conversation. Compaction only shrinks what the model is sent, so
25
28
  * its reset does not hide the older turns here. A real reset (/clear, rewind) still starts over, the
@@ -0,0 +1,24 @@
1
+ #!/usr/bin/env node
2
+ import {
3
+ createRuntime,
4
+ lunaPtcAutoEnabled
5
+ } from "./chunk-R72OV7RF.js";
6
+ import "./chunk-OK2USAXX.js";
7
+ import "./chunk-ZEPTUKNW.js";
8
+ import "./chunk-JXM6REER.js";
9
+ import "./chunk-PSO7R5AD.js";
10
+ import "./chunk-WFZKJY3R.js";
11
+ import "./chunk-H7XJDKJY.js";
12
+ import "./chunk-IYR5PYA3.js";
13
+ import "./chunk-HQW4BROS.js";
14
+ import "./chunk-3I5BW3ZT.js";
15
+ import "./chunk-SVD4LHJC.js";
16
+ import "./chunk-5YJ3ZQVR.js";
17
+ import "./chunk-KPTML72Q.js";
18
+ import "./chunk-6M55UPES.js";
19
+ import "./chunk-RX4UQX43.js";
20
+ import "./chunk-3WHI4LN3.js";
21
+ export {
22
+ createRuntime,
23
+ lunaPtcAutoEnabled
24
+ };
@@ -17,6 +17,7 @@ export interface StatusInput {
17
17
  cacheWriteTokens?: number;
18
18
  };
19
19
  lastInputTokens: number;
20
+ contextWindow?: number;
20
21
  }
21
22
  export declare function statusText(s: StatusInput): string;
22
23
  export declare function agentsText(defs: {
@@ -1,10 +1,10 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  estimateTokens
4
- } from "./chunk-QZKLZELZ.js";
4
+ } from "./chunk-OK2USAXX.js";
5
5
  import {
6
6
  t
7
- } from "./chunk-UZWJQF67.js";
7
+ } from "./chunk-3WHI4LN3.js";
8
8
 
9
9
  // src/statsCli.ts
10
10
  import { existsSync, readdirSync, readFileSync, statSync } from "fs";
@@ -1,7 +1,7 @@
1
1
  import type { ChatMessage } from './provider';
2
2
  /** ~4 chars per token, the same conservative estimate the usage fallback uses. */
3
3
  export declare const estimateTokens: (text: string) => number;
4
- export declare const estimateMessages: (messages: ChatMessage[]) => number;
4
+ export declare function estimateMessages(messages: ChatMessage[]): number;
5
5
  /**
6
6
  * Drops whole oldest turns (everything up to the next user message) until the history fits the
7
7
  * budget. Cutting only at turn boundaries keeps assistant tool_calls paired with their tool
@@ -1,7 +1,12 @@
1
1
  import { z } from 'zod';
2
2
  export declare const editTool: import("./types").Tool<z.ZodObject<{
3
3
  path: z.ZodString;
4
- old_string: z.ZodString;
5
- new_string: z.ZodString;
4
+ old_string: z.ZodOptional<z.ZodString>;
5
+ new_string: z.ZodOptional<z.ZodString>;
6
6
  replace_all: z.ZodOptional<z.ZodBoolean>;
7
+ edits: z.ZodOptional<z.ZodArray<z.ZodObject<{
8
+ old_string: z.ZodString;
9
+ new_string: z.ZodString;
10
+ replace_all: z.ZodOptional<z.ZodBoolean>;
11
+ }, z.core.$strip>>>;
7
12
  }, z.core.$strip>>;
@@ -1,13 +1,25 @@
1
1
  import { z } from 'zod';
2
- export declare function grepJs(pattern: string, opts: {
2
+ export interface GrepOptions {
3
3
  root: string;
4
+ projectRoot?: string;
4
5
  glob?: string;
5
6
  ignoreCase?: boolean;
7
+ literal?: boolean;
8
+ context?: number;
9
+ outputMode?: 'content' | 'files_with_matches' | 'count';
6
10
  signal?: AbortSignal;
7
- }): Promise<string[]>;
11
+ }
12
+ export declare function grepJs(pattern: string, opts: GrepOptions): Promise<string[]>;
8
13
  export declare const grepTool: import("./types").Tool<z.ZodObject<{
9
14
  pattern: z.ZodString;
10
15
  path: z.ZodOptional<z.ZodString>;
11
16
  glob: z.ZodOptional<z.ZodString>;
12
17
  ignore_case: z.ZodOptional<z.ZodBoolean>;
18
+ literal: z.ZodOptional<z.ZodBoolean>;
19
+ context: z.ZodOptional<z.ZodNumber>;
20
+ output_mode: z.ZodOptional<z.ZodEnum<{
21
+ content: "content";
22
+ count: "count";
23
+ files_with_matches: "files_with_matches";
24
+ }>>;
13
25
  }, z.core.$strip>>;
@@ -1,2 +1,2 @@
1
- /** Native glob exclude patterns: node_modules, .git, and simple root .gitignore entries. */
2
- export declare function ignorePatterns(root: string): string[];
1
+ /** Native glob exclude patterns: node_modules, .git, and .gitignore entries up to projectRoot. */
2
+ export declare function ignorePatterns(root: string, projectRoot?: string): string[];
@@ -1,2 +1,4 @@
1
1
  export declare function resolvePath(cwd: string, path: string): string;
2
2
  export declare function errorCode(error: unknown): string;
3
+ export declare function recordFileMtime(readFiles: Set<string>, abs: string): void;
4
+ export declare function isFileModifiedSinceRead(readFiles: Set<string>, abs: string): boolean;
@@ -1,21 +1,23 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  Session
4
- } from "./chunk-BC7UXFE4.js";
5
- import "./chunk-WNACAUDK.js";
6
- import "./chunk-BLOYFIAD.js";
4
+ } from "./chunk-SVD4LHJC.js";
5
+ import "./chunk-5YJ3ZQVR.js";
6
+ import "./chunk-KPTML72Q.js";
7
7
  import {
8
8
  t
9
- } from "./chunk-UZWJQF67.js";
9
+ } from "./chunk-3WHI4LN3.js";
10
10
 
11
11
  // src/transferCli.ts
12
12
  import { copyFileSync, existsSync, mkdirSync, readdirSync, readFileSync, statSync, writeFileSync } from "fs";
13
- import { dirname, join } from "path";
13
+ import { dirname, join, resolve } from "path";
14
14
  function runExportCommand(args, deps) {
15
15
  const first = (args.subArgs[0] ?? "").trim();
16
16
  let source;
17
17
  let dest;
18
- if (first.endsWith(".jsonl") && existsSync(first) && statSync(first).isFile()) {
18
+ const sessionsRoot = resolve(args.home, "sessions");
19
+ const isSourceSession = first.endsWith(".jsonl") && existsSync(first) && statSync(first).isFile() && (args.subArgs.length >= 2 || resolve(first).startsWith(sessionsRoot));
20
+ if (isSourceSession) {
19
21
  source = first;
20
22
  dest = args.subArgs[1];
21
23
  } else {
@@ -1 +1,6 @@
1
1
  export declare function completeFile(value: string, cwd: string): string;
2
+ /**
3
+ * Pre-attaches small non-secret project files referenced via `@path/to/file` in a user prompt,
4
+ * and records them in `readFiles` so the model can inspect or edit them without an extra tool turn.
5
+ */
6
+ export declare function expandAtFileMentions(prompt: string, cwd: string, readFiles?: Set<string>): string;
package/dist/ui/vim.d.ts CHANGED
@@ -15,7 +15,7 @@ export interface VimKey {
15
15
  export interface VimResult {
16
16
  state: LineState;
17
17
  mode: VimMode;
18
- /** Set by "d" so the next key picks the text object (dd, dw). */
18
+ /** Set by "d" or "c" so the next key picks the text object (dd, dw, cc, cw). */
19
19
  pending?: string;
20
20
  handled: boolean;
21
21
  }