scream-code 0.6.6 → 0.6.8

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.
@@ -0,0 +1,52 @@
1
+ #!/usr/bin/env node
2
+ import { fileURLToPath as __cjsShimFileURLToPath } from 'node:url';
3
+ import { dirname as __cjsShimDirname } from 'node:path';
4
+ const __filename = __cjsShimFileURLToPath(import.meta.url);
5
+ const __dirname = __cjsShimDirname(__filename);
6
+ //#region src/utils/suppress-sqlite-warning.ts
7
+ /**
8
+ * Suppress Node's ExperimentalWarning for the built-in `node:sqlite` module.
9
+ *
10
+ * Node emits this warning while `node:sqlite` is loaded as a transitive
11
+ * dependency during ESM module evaluation, before any app code can intercept
12
+ * it via `process.emitWarning` or `process.on('warning')`. We filter the known
13
+ * warning text from stderr to keep startup output clean.
14
+ */
15
+ const originalWrite = process.stderr.write.bind(process.stderr);
16
+ let expectingTraceSuggestion = false;
17
+ function isSQLiteExperimentalWarning(line) {
18
+ return /^\(node:\d+\) ExperimentalWarning: SQLite is an experimental feature/.test(line);
19
+ }
20
+ function isTraceSuggestion(line) {
21
+ return line.startsWith("(Use `node --trace-warnings");
22
+ }
23
+ process.stderr.write = (chunk, ...args) => {
24
+ const lines = (typeof chunk === "string" ? chunk : Buffer.from(chunk).toString("utf8")).split("\n");
25
+ let changed = false;
26
+ const kept = [];
27
+ for (const line of lines) {
28
+ if (isSQLiteExperimentalWarning(line)) {
29
+ expectingTraceSuggestion = true;
30
+ changed = true;
31
+ continue;
32
+ }
33
+ if (expectingTraceSuggestion && isTraceSuggestion(line)) {
34
+ expectingTraceSuggestion = false;
35
+ changed = true;
36
+ continue;
37
+ }
38
+ expectingTraceSuggestion = false;
39
+ kept.push(line);
40
+ }
41
+ if (changed) {
42
+ const filtered = kept.join("\n");
43
+ if (filtered.length === 0) {
44
+ args.find((a) => typeof a === "function")?.();
45
+ return true;
46
+ }
47
+ return originalWrite(filtered, ...args);
48
+ }
49
+ return originalWrite(chunk, ...args);
50
+ };
51
+ //#endregion
52
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "scream-code",
3
- "version": "0.6.6",
3
+ "version": "0.6.8",
4
4
  "description": "A terminal-native AI agent for builders",
5
5
  "license": "MIT",
6
6
  "author": "ScreamCli",
@@ -40,7 +40,21 @@
40
40
  },
41
41
  "publishConfig": {
42
42
  "access": "public",
43
- "provenance": false
43
+ "provenance": true
44
+ },
45
+ "scripts": {
46
+ "build": "tsdown",
47
+ "dev": "node scripts/dev.mjs",
48
+ "dev:cli-only": "tsx --import ../../build/register-raw-text-loader.mjs ./src/main.ts",
49
+ "dev:prod": "node dist/main.mjs",
50
+ "clean": "rm -rf dist",
51
+ "typecheck": "tsc -p tsconfig.json --noEmit",
52
+ "test": "pnpm -w run build:packages && vitest run",
53
+ "e2e": "pnpm -w run build:packages && SCREAM_E2E=1 vitest run test/e2e",
54
+ "e2e:real": "pnpm -w run build:packages && SCREAM_E2E_REAL=1 vitest run test/e2e/real-llm-smoke.e2e.test.ts",
55
+ "preinstall": "node -e \"console.log('\\n📦 正在安装 scream-code,请稍候...\\n')\"",
56
+ "postinstall": "node scripts/postinstall.mjs",
57
+ "smoke": "node dist/main.mjs --version"
44
58
  },
45
59
  "dependencies": {
46
60
  "@earendil-works/pi-tui": "^0.78.1",
@@ -54,29 +68,15 @@
54
68
  },
55
69
  "devDependencies": {
56
70
  "@modelcontextprotocol/sdk": "^1.29.0",
71
+ "@scream-cli/agent-core": "workspace:^",
72
+ "@scream-cli/config": "workspace:^",
73
+ "@scream-cli/migration-legacy": "workspace:^",
74
+ "@scream-cli/scream-code-sdk": "workspace:^",
75
+ "@scream-code/memory": "workspace:*",
57
76
  "@types/semver": "^7.7.0",
58
- "tsx": "^4.21.0",
59
- "@scream-cli/agent-core": "^0.6.6",
60
- "@scream-cli/migration-legacy": "^0.6.6",
61
- "@scream-code/memory": "0.6.6",
62
- "@scream-cli/scream-code-sdk": "^0.6.6",
63
- "@scream-cli/config": "^0.6.6"
77
+ "tsx": "^4.21.0"
64
78
  },
65
79
  "engines": {
66
80
  "node": ">=22.19.0"
67
- },
68
- "scripts": {
69
- "build": "tsdown",
70
- "dev": "node scripts/dev.mjs",
71
- "dev:cli-only": "tsx --import ../../build/register-raw-text-loader.mjs ./src/main.ts",
72
- "dev:prod": "node dist/main.mjs",
73
- "clean": "rm -rf dist",
74
- "typecheck": "tsc -p tsconfig.json --noEmit",
75
- "test": "pnpm -w run build:packages && vitest run",
76
- "e2e": "pnpm -w run build:packages && SCREAM_E2E=1 vitest run test/e2e",
77
- "e2e:real": "pnpm -w run build:packages && SCREAM_E2E_REAL=1 vitest run test/e2e/real-llm-smoke.e2e.test.ts",
78
- "preinstall": "node -e \"console.log('\\n📦 正在安装 scream-code,请稍候...\\n')\"",
79
- "postinstall": "node scripts/postinstall.mjs",
80
- "smoke": "node dist/main.mjs --version"
81
81
  }
82
- }
82
+ }