chatccc 0.2.240 → 0.2.242

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 (58) hide show
  1. package/bin/cccagent.mjs +1 -1
  2. package/deepccc-agent/LICENSE +201 -0
  3. package/deepccc-agent/README.md +291 -0
  4. package/deepccc-agent/bin/deepccc.mjs +26 -0
  5. package/deepccc-agent/docs/cache-hit-rate-1.jpg +0 -0
  6. package/deepccc-agent/docs/cache-hit-rate-2.jpg +0 -0
  7. package/deepccc-agent/package-lock.json +1959 -0
  8. package/deepccc-agent/package.json +62 -0
  9. package/deepccc-agent/src/__tests__/chat-session.test.ts +522 -0
  10. package/deepccc-agent/src/__tests__/cli-json.test.ts +49 -0
  11. package/deepccc-agent/src/__tests__/config.test.ts +26 -0
  12. package/deepccc-agent/src/__tests__/context.test.ts +319 -0
  13. package/deepccc-agent/src/__tests__/file-tools.test.ts +240 -0
  14. package/deepccc-agent/src/__tests__/permissions.test.ts +195 -0
  15. package/deepccc-agent/src/__tests__/privacy.test.ts +311 -0
  16. package/deepccc-agent/src/__tests__/progress-reducer.test.ts +121 -0
  17. package/deepccc-agent/src/__tests__/session-search.test.ts +262 -0
  18. package/deepccc-agent/src/__tests__/session-select.test.ts +116 -0
  19. package/deepccc-agent/src/__tests__/sigint.test.ts +56 -0
  20. package/deepccc-agent/src/__tests__/skills.test.ts +284 -0
  21. package/deepccc-agent/src/__tests__/terminal-renderer.test.ts +247 -0
  22. package/deepccc-agent/src/__tests__/web-tools.test.ts +220 -0
  23. package/{src/builtin → deepccc-agent/src}/index.ts +25 -11
  24. package/deepccc-agent/tsconfig.build.json +13 -0
  25. package/deepccc-agent/tsconfig.json +13 -0
  26. package/deepccc-agent/vitest.config.ts +7 -0
  27. package/package.json +73 -71
  28. package/src/__tests__/builtin-chat-session.test.ts +53 -16
  29. package/src/__tests__/builtin-config.test.ts +2 -2
  30. package/src/__tests__/builtin-context.test.ts +1 -1
  31. package/src/__tests__/builtin-file-tools.test.ts +1 -1
  32. package/src/__tests__/builtin-permissions.test.ts +4 -4
  33. package/src/__tests__/builtin-session-search.test.ts +1 -1
  34. package/src/__tests__/builtin-session-select.test.ts +2 -2
  35. package/src/__tests__/builtin-sigint.test.ts +1 -1
  36. package/src/__tests__/builtin-skills.test.ts +1 -1
  37. package/src/__tests__/builtin-web-tools.test.ts +1 -1
  38. package/src/__tests__/progress-reducer.test.ts +1 -1
  39. package/src/adapters/ccc-adapter.ts +2 -2
  40. package/src/progress/reducer.ts +1 -1
  41. /package/{src/builtin → deepccc-agent/src}/cli.ts +0 -0
  42. /package/{src/builtin → deepccc-agent/src}/config.ts +0 -0
  43. /package/{src/builtin → deepccc-agent/src}/context.ts +0 -0
  44. /package/{src/builtin → deepccc-agent/src}/file-log.ts +0 -0
  45. /package/{src/builtin → deepccc-agent/src}/file-tools.ts +0 -0
  46. /package/{src/builtin → deepccc-agent/src}/permissions.ts +0 -0
  47. /package/{src/builtin → deepccc-agent/src}/privacy.ts +0 -0
  48. /package/{src/builtin → deepccc-agent/src}/proc-tree-kill.ts +0 -0
  49. /package/{src/builtin → deepccc-agent/src}/progress/cards-helpers.ts +0 -0
  50. /package/{src/builtin → deepccc-agent/src}/progress/reducer.ts +0 -0
  51. /package/{src/builtin → deepccc-agent/src}/progress/terminal-renderer.ts +0 -0
  52. /package/{src/builtin → deepccc-agent/src}/progress/view.ts +0 -0
  53. /package/{src/builtin → deepccc-agent/src}/raw-stream-log.ts +0 -0
  54. /package/{src/builtin → deepccc-agent/src}/session-search.ts +0 -0
  55. /package/{src/builtin → deepccc-agent/src}/session-select.ts +0 -0
  56. /package/{src/builtin → deepccc-agent/src}/sigint.ts +0 -0
  57. /package/{src/builtin → deepccc-agent/src}/skills.ts +0 -0
  58. /package/{src/builtin → deepccc-agent/src}/web-tools.ts +0 -0
@@ -31,7 +31,7 @@ vi.mock("ai", () => ({
31
31
  tool: vi.fn((definition: unknown) => definition),
32
32
  }));
33
33
 
34
- vi.mock("../builtin/raw-stream-log.ts", () => ({
34
+ vi.mock("../../deepccc-agent/src/raw-stream-log.ts", () => ({
35
35
  createRawStreamLog: vi.fn().mockResolvedValue(null),
36
36
  }));
37
37
 
@@ -41,9 +41,9 @@ import {
41
41
  isDangerousCommand,
42
42
  matchRule,
43
43
  reloadAllowRules,
44
- } from "../builtin/permissions.ts";
45
- import { createBuiltinFileTools } from "../builtin/file-tools.ts";
46
- import { ChatSession } from "../builtin/index.ts";
44
+ } from "../../deepccc-agent/src/permissions.ts";
45
+ import { createBuiltinFileTools } from "../../deepccc-agent/src/file-tools.ts";
46
+ import { ChatSession } from "../../deepccc-agent/src/index.ts";
47
47
 
48
48
  const streamTextMock = aiMocks.streamText;
49
49
  const generateTextMock = aiMocks.generateText;
@@ -5,7 +5,7 @@ import { gzipSync } from "node:zlib";
5
5
 
6
6
  import { describe, expect, it } from "vitest";
7
7
 
8
- import { searchBuiltinSessions } from "../builtin/session-search.ts";
8
+ import { searchBuiltinSessions } from "../../deepccc-agent/src/session-search.ts";
9
9
 
10
10
  interface TestMessage {
11
11
  role: "user" | "assistant";
@@ -4,8 +4,8 @@ import { join } from "node:path";
4
4
 
5
5
  import { describe, expect, it } from "vitest";
6
6
 
7
- import { defaultBuiltinSessionId } from "../builtin/context.ts";
8
- import { resolveBuiltinSession } from "../builtin/session-select.ts";
7
+ import { defaultBuiltinSessionId } from "../../deepccc-agent/src/context.ts";
8
+ import { resolveBuiltinSession } from "../../deepccc-agent/src/session-select.ts";
9
9
 
10
10
  async function writeSession(
11
11
  contextDir: string,
@@ -1,6 +1,6 @@
1
1
  import { describe, expect, it } from "vitest";
2
2
 
3
- import { createCtrlCState } from "../builtin/sigint.ts";
3
+ import { createCtrlCState } from "../../deepccc-agent/src/sigint.ts";
4
4
 
5
5
  describe("builtin CLI Ctrl+C state", () => {
6
6
  it("requires two presses to interrupt an active generation", () => {
@@ -13,7 +13,7 @@ import {
13
13
  type SkillDirSpec,
14
14
  type SkillSource,
15
15
  type SkillScope,
16
- } from "../builtin/skills.ts";
16
+ } from "../../deepccc-agent/src/skills.ts";
17
17
 
18
18
  let tempRoot: string;
19
19
 
@@ -8,7 +8,7 @@ import {
8
8
  webFetchForTool,
9
9
  webSearchForTool,
10
10
  type FetchLike,
11
- } from "../builtin/web-tools.ts";
11
+ } from "../../deepccc-agent/src/web-tools.ts";
12
12
 
13
13
  const DDG_HTML = `<!DOCTYPE html>
14
14
  <html>
@@ -1,6 +1,6 @@
1
1
  import { describe, expect, it } from "vitest";
2
2
 
3
- import type { ChatEvent } from "../builtin/index.ts";
3
+ import type { ChatEvent } from "../../deepccc-agent/src/index.ts";
4
4
  import { reduceProgress, summarizeToolInput, summarizeToolResult } from "../progress/reducer.ts";
5
5
  import { progressView } from "../progress/view.ts";
6
6
 
@@ -1,9 +1,9 @@
1
- import { ChatSession, type ChatSessionConfig, type ChatSessionOptions } from "../builtin/index.ts";
1
+ import { ChatSession, type ChatSessionConfig, type ChatSessionOptions } from "../../deepccc-agent/src/index.ts";
2
2
  import {
3
3
  getBuiltinContextSession,
4
4
  newBuiltinSessionId,
5
5
  normalizeBuiltinSessionId,
6
- } from "../builtin/context.ts";
6
+ } from "../../deepccc-agent/src/context.ts";
7
7
  import { config, CCC_SESSION_PREFIX } from "../config.ts";
8
8
  import type {
9
9
  CreateSessionResult,
@@ -7,7 +7,7 @@
7
7
  * 看到的过程状态(正文累积、工具调用、终态判定)完全一致。
8
8
  */
9
9
 
10
- import type { ChatEvent } from "../builtin/index.ts";
10
+ import type { ChatEvent } from "../../deepccc-agent/src/index.ts";
11
11
  import {
12
12
  withProgressView,
13
13
  type ProgressToolCall,
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes