@costrict/cs 2.0.0 → 2.0.3

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.
@@ -74,3 +74,8 @@ toolName = "get_info_from_user"
74
74
  decision = "allow"
75
75
  priority = 900
76
76
 
77
+ [[rule]]
78
+ toolName = "checkpoint"
79
+ decision = "allow"
80
+ priority = 900
81
+
@@ -29,3 +29,4 @@
29
29
  decision = "allow"
30
30
  priority = 999
31
31
  modes = ["yolo"]
32
+ allow_redirection = true
@@ -40127,6 +40127,23 @@ var DebugLogger = class {
40127
40127
  if (this.logStream) {
40128
40128
  const formattedArgs = args2.map((arg) => {
40129
40129
  if (typeof arg === "object" && arg !== null) {
40130
+ if (arg instanceof Error) {
40131
+ const errorObj = {
40132
+ name: arg.name,
40133
+ message: arg.message,
40134
+ stack: arg.stack
40135
+ };
40136
+ for (const key in arg) {
40137
+ if (Object.prototype.hasOwnProperty.call(arg, key)) {
40138
+ errorObj[key] = arg[key];
40139
+ }
40140
+ }
40141
+ try {
40142
+ return JSON.stringify(errorObj, null, 2);
40143
+ } catch (_e) {
40144
+ return util.format(arg);
40145
+ }
40146
+ }
40130
40147
  try {
40131
40148
  return JSON.stringify(arg, null, 2);
40132
40149
  } catch (_e) {
@@ -40145,19 +40162,19 @@ var DebugLogger = class {
40145
40162
  log(...args2) {
40146
40163
  this.writeToFile("LOG", args2);
40147
40164
  if (this.debugEnabled) {
40148
- console.log(...args2);
40165
+ console.debug(...args2);
40149
40166
  }
40150
40167
  }
40151
40168
  warn(...args2) {
40152
40169
  this.writeToFile("WARN", args2);
40153
40170
  if (this.debugEnabled) {
40154
- console.warn(...args2);
40171
+ console.debug(...args2);
40155
40172
  }
40156
40173
  }
40157
40174
  error(...args2) {
40158
40175
  this.writeToFile("ERROR", args2);
40159
40176
  if (this.debugEnabled) {
40160
- console.error(...args2);
40177
+ console.debug(...args2);
40161
40178
  }
40162
40179
  }
40163
40180
  debug(...args2) {
@@ -40877,6 +40877,23 @@ var DebugLogger = class {
40877
40877
  if (this.logStream) {
40878
40878
  const formattedArgs = args2.map((arg) => {
40879
40879
  if (typeof arg === "object" && arg !== null) {
40880
+ if (arg instanceof Error) {
40881
+ const errorObj = {
40882
+ name: arg.name,
40883
+ message: arg.message,
40884
+ stack: arg.stack
40885
+ };
40886
+ for (const key in arg) {
40887
+ if (Object.prototype.hasOwnProperty.call(arg, key)) {
40888
+ errorObj[key] = arg[key];
40889
+ }
40890
+ }
40891
+ try {
40892
+ return JSON.stringify(errorObj, null, 2);
40893
+ } catch (_e) {
40894
+ return util.format(arg);
40895
+ }
40896
+ }
40880
40897
  try {
40881
40898
  return JSON.stringify(arg, null, 2);
40882
40899
  } catch (_e) {
@@ -40895,19 +40912,19 @@ var DebugLogger = class {
40895
40912
  log(...args2) {
40896
40913
  this.writeToFile("LOG", args2);
40897
40914
  if (this.debugEnabled) {
40898
- console.log(...args2);
40915
+ console.debug(...args2);
40899
40916
  }
40900
40917
  }
40901
40918
  warn(...args2) {
40902
40919
  this.writeToFile("WARN", args2);
40903
40920
  if (this.debugEnabled) {
40904
- console.warn(...args2);
40921
+ console.debug(...args2);
40905
40922
  }
40906
40923
  }
40907
40924
  error(...args2) {
40908
40925
  this.writeToFile("ERROR", args2);
40909
40926
  if (this.debugEnabled) {
40910
- console.error(...args2);
40927
+ console.debug(...args2);
40911
40928
  }
40912
40929
  }
40913
40930
  debug(...args2) {
@@ -40101,6 +40101,23 @@ var DebugLogger = class {
40101
40101
  if (this.logStream) {
40102
40102
  const formattedArgs = args2.map((arg) => {
40103
40103
  if (typeof arg === "object" && arg !== null) {
40104
+ if (arg instanceof Error) {
40105
+ const errorObj = {
40106
+ name: arg.name,
40107
+ message: arg.message,
40108
+ stack: arg.stack
40109
+ };
40110
+ for (const key in arg) {
40111
+ if (Object.prototype.hasOwnProperty.call(arg, key)) {
40112
+ errorObj[key] = arg[key];
40113
+ }
40114
+ }
40115
+ try {
40116
+ return JSON.stringify(errorObj, null, 2);
40117
+ } catch (_e) {
40118
+ return util.format(arg);
40119
+ }
40120
+ }
40104
40121
  try {
40105
40122
  return JSON.stringify(arg, null, 2);
40106
40123
  } catch (_e) {
@@ -40119,19 +40136,19 @@ var DebugLogger = class {
40119
40136
  log(...args2) {
40120
40137
  this.writeToFile("LOG", args2);
40121
40138
  if (this.debugEnabled) {
40122
- console.log(...args2);
40139
+ console.debug(...args2);
40123
40140
  }
40124
40141
  }
40125
40142
  warn(...args2) {
40126
40143
  this.writeToFile("WARN", args2);
40127
40144
  if (this.debugEnabled) {
40128
- console.warn(...args2);
40145
+ console.debug(...args2);
40129
40146
  }
40130
40147
  }
40131
40148
  error(...args2) {
40132
40149
  this.writeToFile("ERROR", args2);
40133
40150
  if (this.debugEnabled) {
40134
- console.error(...args2);
40151
+ console.debug(...args2);
40135
40152
  }
40136
40153
  }
40137
40154
  debug(...args2) {
@@ -41959,6 +41959,23 @@ var DebugLogger = class {
41959
41959
  if (this.logStream) {
41960
41960
  const formattedArgs = args2.map((arg) => {
41961
41961
  if (typeof arg === "object" && arg !== null) {
41962
+ if (arg instanceof Error) {
41963
+ const errorObj = {
41964
+ name: arg.name,
41965
+ message: arg.message,
41966
+ stack: arg.stack
41967
+ };
41968
+ for (const key in arg) {
41969
+ if (Object.prototype.hasOwnProperty.call(arg, key)) {
41970
+ errorObj[key] = arg[key];
41971
+ }
41972
+ }
41973
+ try {
41974
+ return JSON.stringify(errorObj, null, 2);
41975
+ } catch (_e) {
41976
+ return util.format(arg);
41977
+ }
41978
+ }
41962
41979
  try {
41963
41980
  return JSON.stringify(arg, null, 2);
41964
41981
  } catch (_e) {
@@ -41977,19 +41994,19 @@ var DebugLogger = class {
41977
41994
  log(...args2) {
41978
41995
  this.writeToFile("LOG", args2);
41979
41996
  if (this.debugEnabled) {
41980
- console.log(...args2);
41997
+ console.debug(...args2);
41981
41998
  }
41982
41999
  }
41983
42000
  warn(...args2) {
41984
42001
  this.writeToFile("WARN", args2);
41985
42002
  if (this.debugEnabled) {
41986
- console.warn(...args2);
42003
+ console.debug(...args2);
41987
42004
  }
41988
42005
  }
41989
42006
  error(...args2) {
41990
42007
  this.writeToFile("ERROR", args2);
41991
42008
  if (this.debugEnabled) {
41992
- console.error(...args2);
42009
+ console.debug(...args2);
41993
42010
  }
41994
42011
  }
41995
42012
  debug(...args2) {
@@ -42507,6 +42507,23 @@ var DebugLogger = class {
42507
42507
  if (this.logStream) {
42508
42508
  const formattedArgs = args2.map((arg) => {
42509
42509
  if (typeof arg === "object" && arg !== null) {
42510
+ if (arg instanceof Error) {
42511
+ const errorObj = {
42512
+ name: arg.name,
42513
+ message: arg.message,
42514
+ stack: arg.stack
42515
+ };
42516
+ for (const key in arg) {
42517
+ if (Object.prototype.hasOwnProperty.call(arg, key)) {
42518
+ errorObj[key] = arg[key];
42519
+ }
42520
+ }
42521
+ try {
42522
+ return JSON.stringify(errorObj, null, 2);
42523
+ } catch (_e) {
42524
+ return util.format(arg);
42525
+ }
42526
+ }
42510
42527
  try {
42511
42528
  return JSON.stringify(arg, null, 2);
42512
42529
  } catch (_e) {
@@ -42525,19 +42542,19 @@ var DebugLogger = class {
42525
42542
  log(...args2) {
42526
42543
  this.writeToFile("LOG", args2);
42527
42544
  if (this.debugEnabled) {
42528
- console.log(...args2);
42545
+ console.debug(...args2);
42529
42546
  }
42530
42547
  }
42531
42548
  warn(...args2) {
42532
42549
  this.writeToFile("WARN", args2);
42533
42550
  if (this.debugEnabled) {
42534
- console.warn(...args2);
42551
+ console.debug(...args2);
42535
42552
  }
42536
42553
  }
42537
42554
  error(...args2) {
42538
42555
  this.writeToFile("ERROR", args2);
42539
42556
  if (this.debugEnabled) {
42540
- console.error(...args2);
42557
+ console.debug(...args2);
42541
42558
  }
42542
42559
  }
42543
42560
  debug(...args2) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@costrict/cs",
3
- "version": "2.0.0",
3
+ "version": "2.0.3",
4
4
  "engines": {
5
5
  "node": ">=20.0.0"
6
6
  },
@@ -18,6 +18,7 @@
18
18
  },
19
19
  "scripts": {
20
20
  "prebuild": "node scripts/prebuild-native.js",
21
+ "download:ripgrep": "node scripts/download-ripgrep.js",
21
22
  "start": "cross-env NODE_ENV=development node scripts/start.js",
22
23
  "start:a2a-server": "CODER_AGENT_PORT=41242 npm run start --workspace @costrict/cs-a2a-server",
23
24
  "debug": "cross-env DEBUG=1 node scripts/start.js",
@@ -38,7 +39,7 @@
38
39
  "build:all": "npm run build && npm run build:sandbox && npm run build:vscode",
39
40
  "build:packages": "npm run build --workspaces",
40
41
  "build:sandbox": "node scripts/build_sandbox.js",
41
- "bundle": "npm run generate && node esbuild.config.js && node scripts/copy_bundle_assets.js",
42
+ "bundle": "npm run generate && npm run download:ripgrep && node esbuild.config.js && node scripts/copy_bundle_assets.js",
42
43
  "test": "npm run test --workspaces --if-present",
43
44
  "test:ci": "npm run test:ci --workspaces --if-present && npm run test:scripts",
44
45
  "test:scripts": "vitest run --config ./scripts/tests/vitest.config.ts",
@@ -47,13 +48,13 @@
47
48
  "test:integration:sandbox:none": "cross-env GEMINI_SANDBOX=false vitest run --root ./integration-tests",
48
49
  "test:integration:sandbox:docker": "cross-env GEMINI_SANDBOX=docker npm run build:sandbox && cross-env GEMINI_SANDBOX=docker vitest run --root ./integration-tests",
49
50
  "test:integration:sandbox:podman": "cross-env GEMINI_SANDBOX=podman vitest run --root ./integration-tests",
50
- "lint": "eslint . --ext .ts,.tsx && eslint integration-tests && eslint scripts",
51
+ "lint": "eslint . --cache",
51
52
  "lint:fix": "eslint . --fix --ext .ts,.tsx && eslint integration-tests --fix && eslint scripts --fix && npm run format",
52
53
  "lint:ci": "npm run lint:all",
53
54
  "lint:all": "node scripts/lint.js",
54
55
  "format": "prettier --experimental-cli --write .",
55
56
  "typecheck": "npm run typecheck --workspaces --if-present",
56
- "preflight": "npm run clean && npm ci && npm run format && npm run lint:ci && npm run build && npm run typecheck && npm run test:ci",
57
+ "preflight": "npm run clean && npm ci && npm run format && npm run build && npm run lint:ci && npm run typecheck && npm run test:ci",
57
58
  "prepare": "husky && npm run bundle",
58
59
  "prepare:package": "node scripts/prepare-package.js",
59
60
  "release:version": "node scripts/version.js",
@@ -63,7 +64,7 @@
63
64
  "pre-commit": "node scripts/pre-commit.js"
64
65
  },
65
66
  "overrides": {
66
- "ink": "npm:@jrichman/ink@6.4.6",
67
+ "ink": "npm:@jrichman/ink@6.4.7",
67
68
  "wrap-ansi": "9.0.2",
68
69
  "cliui": {
69
70
  "wrap-ansi": "7.0.0"
@@ -89,6 +90,7 @@
89
90
  "@types/shell-quote": "^1.7.5",
90
91
  "@vitest/coverage-v8": "^3.1.1",
91
92
  "@vitest/eslint-plugin": "^1.3.4",
93
+ "adm-zip": "^0.5.16",
92
94
  "cross-env": "^7.0.3",
93
95
  "esbuild": "^0.25.0",
94
96
  "esbuild-plugin-wasm": "^1.1.0",
@@ -114,13 +116,15 @@
114
116
  "react-devtools-core": "^6.1.2",
115
117
  "semver": "^7.7.2",
116
118
  "strip-ansi": "^7.1.2",
119
+ "tar": "^7.5.2",
117
120
  "tsx": "^4.20.3",
118
121
  "typescript-eslint": "^8.30.1",
119
122
  "vitest": "^3.2.4",
120
123
  "yargs": "^17.7.2"
121
124
  },
122
125
  "dependencies": {
123
- "ink": "npm:@jrichman/ink@6.4.6",
126
+ "find-up-simple": "^1.0.1",
127
+ "ink": "npm:@jrichman/ink@6.4.7",
124
128
  "latest-version": "^9.0.0",
125
129
  "openai": "^6.10.0",
126
130
  "simple-git": "^3.28.0"
@@ -132,6 +136,7 @@
132
136
  "@lydell/node-pty-linux-x64": "1.1.0",
133
137
  "@lydell/node-pty-win32-arm64": "1.1.0",
134
138
  "@lydell/node-pty-win32-x64": "1.1.0",
139
+ "keytar": "^7.9.0",
135
140
  "node-pty": "^1.0.0"
136
141
  },
137
142
  "lint-staged": {