@costrict/csc 4.2.0 → 4.2.2-beta
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/cli.js +169855 -134824
- package/dist/services/rawDump/batchWorker.js +47 -4
- package/package.json +56 -52
|
@@ -477,8 +477,8 @@ async function saveCoStrictCredentials(credentials) {
|
|
|
477
477
|
import { createRequire } from "module";
|
|
478
478
|
function getVersion() {
|
|
479
479
|
try {
|
|
480
|
-
if (typeof MACRO !== "undefined" && "4.2.
|
|
481
|
-
return "4.2.
|
|
480
|
+
if (typeof MACRO !== "undefined" && "4.2.2-beta")
|
|
481
|
+
return "4.2.2-beta";
|
|
482
482
|
} catch {}
|
|
483
483
|
try {
|
|
484
484
|
const require2 = createRequire(import.meta.url);
|
|
@@ -2680,9 +2680,22 @@ if (scriptPath2.endsWith("timerWorker.ts") || scriptPath2.endsWith("timerWorker.
|
|
|
2680
2680
|
var log6 = createLogger("batch");
|
|
2681
2681
|
var PARENT_PID = process.ppid;
|
|
2682
2682
|
var IS_WORKER_PROCESS = process.argv[1]?.includes("batchWorker") || false;
|
|
2683
|
+
function isParentAlive() {
|
|
2684
|
+
if (!IS_WORKER_PROCESS)
|
|
2685
|
+
return true;
|
|
2686
|
+
try {
|
|
2687
|
+
process.kill(PARENT_PID, 0);
|
|
2688
|
+
return true;
|
|
2689
|
+
} catch {
|
|
2690
|
+
return false;
|
|
2691
|
+
}
|
|
2692
|
+
}
|
|
2693
|
+
var stateLoaded = false;
|
|
2683
2694
|
function startBatchWorker() {
|
|
2684
2695
|
log6.info("batch worker started");
|
|
2685
|
-
loadAllState().
|
|
2696
|
+
loadAllState().then(() => {
|
|
2697
|
+
stateLoaded = true;
|
|
2698
|
+
}).catch((err) => {
|
|
2686
2699
|
log6.error("failed to load state", {
|
|
2687
2700
|
error: err instanceof Error ? err.message : String(err)
|
|
2688
2701
|
});
|
|
@@ -2704,6 +2717,36 @@ function startBatchWorker() {
|
|
|
2704
2717
|
}
|
|
2705
2718
|
});
|
|
2706
2719
|
startTimerWorker();
|
|
2720
|
+
startParentWatchdog();
|
|
2721
|
+
}
|
|
2722
|
+
function startParentWatchdog() {
|
|
2723
|
+
if (!IS_WORKER_PROCESS)
|
|
2724
|
+
return;
|
|
2725
|
+
const intervalMs = 5000;
|
|
2726
|
+
const maxParentGoneAliveMs = 60000;
|
|
2727
|
+
let parentGoneAt = null;
|
|
2728
|
+
setInterval(() => {
|
|
2729
|
+
if (isParentAlive()) {
|
|
2730
|
+
parentGoneAt = null;
|
|
2731
|
+
return;
|
|
2732
|
+
}
|
|
2733
|
+
if (parentGoneAt === null) {
|
|
2734
|
+
parentGoneAt = Date.now();
|
|
2735
|
+
}
|
|
2736
|
+
const goneMs = Date.now() - parentGoneAt;
|
|
2737
|
+
const canExitSafely = stateLoaded && state_task.incomplete === 0;
|
|
2738
|
+
const graceExpired = goneMs >= maxParentGoneAliveMs;
|
|
2739
|
+
if (canExitSafely || graceExpired) {
|
|
2740
|
+
log6.info("parent process gone, exiting batch worker", {
|
|
2741
|
+
parentPid: PARENT_PID,
|
|
2742
|
+
workerPid: process.pid,
|
|
2743
|
+
reason: canExitSafely ? "no incomplete tasks" : "grace period expired",
|
|
2744
|
+
goneMs,
|
|
2745
|
+
incompleteTasks: state_task.incomplete
|
|
2746
|
+
});
|
|
2747
|
+
process.exit(0);
|
|
2748
|
+
}
|
|
2749
|
+
}, intervalMs);
|
|
2707
2750
|
}
|
|
2708
2751
|
var scriptPath3 = process.argv[1] || "";
|
|
2709
2752
|
if (scriptPath3.endsWith("batchWorker.ts") || scriptPath3.endsWith("batchWorker.js")) {
|
|
@@ -2713,5 +2756,5 @@ export {
|
|
|
2713
2756
|
startBatchWorker
|
|
2714
2757
|
};
|
|
2715
2758
|
|
|
2716
|
-
//# debugId=
|
|
2759
|
+
//# debugId=DF24D3CD08C2E4CE64756E2164756E21
|
|
2717
2760
|
//# sourceMappingURL=batchWorker.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@costrict/csc",
|
|
3
|
-
"version": "4.2.
|
|
3
|
+
"version": "4.2.2-beta",
|
|
4
4
|
"description": "costrict",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"author": "costrict",
|
|
@@ -82,18 +82,18 @@
|
|
|
82
82
|
"security:scan": "bun run scripts/security-scan.ts"
|
|
83
83
|
},
|
|
84
84
|
"dependencies": {
|
|
85
|
-
"@agentclientprotocol/sdk": "^0.19.
|
|
86
|
-
"@anthropic-ai/sandbox-runtime": "0.0.
|
|
87
|
-
"@claude-code-best/mcp-chrome-bridge": "^2.0.
|
|
85
|
+
"@agentclientprotocol/sdk": "^0.19.2",
|
|
86
|
+
"@anthropic-ai/sandbox-runtime": "^0.0.54",
|
|
87
|
+
"@claude-code-best/mcp-chrome-bridge": "^2.0.9",
|
|
88
88
|
"@protobufjs/utf8": "1.1.1",
|
|
89
89
|
"baseline-browser-mapping": "2.10.29",
|
|
90
90
|
"gray-matter": "^4.0.3",
|
|
91
|
-
"hono": "^4.12.
|
|
91
|
+
"hono": "^4.12.25",
|
|
92
92
|
"partial-json": "^0.1.7",
|
|
93
93
|
"pngjs": "5.0.0",
|
|
94
|
-
"semver": "^7.
|
|
95
|
-
"undici": "^7.
|
|
96
|
-
"ws": "^8.
|
|
94
|
+
"semver": "^7.8.4",
|
|
95
|
+
"undici": "^7.27.2",
|
|
96
|
+
"ws": "^8.21.0"
|
|
97
97
|
},
|
|
98
98
|
"devDependencies": {
|
|
99
99
|
"@alcalzone/ansi-tokenize": "^0.3.0",
|
|
@@ -103,58 +103,58 @@
|
|
|
103
103
|
"@costrict/computer-use-swift": "workspace:*",
|
|
104
104
|
"@costrict/model-provider": "workspace:*",
|
|
105
105
|
"@anthropic-ai/bedrock-sdk": "^0.26.4",
|
|
106
|
-
"@anthropic-ai/claude-agent-sdk": "^0.2.
|
|
107
|
-
"@anthropic-ai/foundry-sdk": "^0.2.
|
|
106
|
+
"@anthropic-ai/claude-agent-sdk": "^0.2.141",
|
|
107
|
+
"@anthropic-ai/foundry-sdk": "^0.2.4",
|
|
108
108
|
"@anthropic-ai/mcpb": "^2.1.2",
|
|
109
109
|
"@anthropic-ai/sdk": "^0.80.0",
|
|
110
110
|
"@anthropic-ai/vertex-sdk": "^0.14.4",
|
|
111
111
|
"@costrict/ink": "workspace:*",
|
|
112
|
-
"@aws-sdk/client-bedrock": "^3.
|
|
113
|
-
"@aws-sdk/client-bedrock-runtime": "^3.
|
|
114
|
-
"@aws-sdk/client-sts": "^3.
|
|
115
|
-
"@aws-sdk/credential-provider-node": "^3.972.
|
|
116
|
-
"@aws-sdk/credential-providers": "^3.
|
|
112
|
+
"@aws-sdk/client-bedrock": "^3.1065.0",
|
|
113
|
+
"@aws-sdk/client-bedrock-runtime": "^3.1065.0",
|
|
114
|
+
"@aws-sdk/client-sts": "^3.1065.0",
|
|
115
|
+
"@aws-sdk/credential-provider-node": "^3.972.54",
|
|
116
|
+
"@aws-sdk/credential-providers": "^3.1065.0",
|
|
117
117
|
"@azure/identity": "^4.13.1",
|
|
118
|
-
"@biomejs/biome": "^2.4.
|
|
118
|
+
"@biomejs/biome": "^2.4.16",
|
|
119
119
|
"@costrict/agent-tools": "workspace:*",
|
|
120
120
|
"@costrict/builtin-tools": "workspace:*",
|
|
121
121
|
"@costrict/mcp-client": "workspace:*",
|
|
122
122
|
"@commander-js/extra-typings": "^14.0.0",
|
|
123
123
|
"@growthbook/growthbook": "^1.6.5",
|
|
124
|
-
"@langfuse/otel": "^5.1
|
|
125
|
-
"@langfuse/tracing": "^5.1
|
|
124
|
+
"@langfuse/otel": "^5.4.1",
|
|
125
|
+
"@langfuse/tracing": "^5.4.1",
|
|
126
126
|
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
127
127
|
"@opentelemetry/api": "^1.9.1",
|
|
128
128
|
"@opentelemetry/api-logs": "^0.214.0",
|
|
129
|
-
"@opentelemetry/core": "^2.
|
|
129
|
+
"@opentelemetry/core": "^2.7.1",
|
|
130
130
|
"@opentelemetry/exporter-logs-otlp-grpc": "^0.214.0",
|
|
131
131
|
"@opentelemetry/exporter-logs-otlp-http": "^0.214.0",
|
|
132
132
|
"@opentelemetry/exporter-logs-otlp-proto": "^0.214.0",
|
|
133
133
|
"@opentelemetry/exporter-metrics-otlp-grpc": "^0.214.0",
|
|
134
134
|
"@opentelemetry/exporter-metrics-otlp-http": "^0.214.0",
|
|
135
135
|
"@opentelemetry/exporter-metrics-otlp-proto": "^0.214.0",
|
|
136
|
-
"@opentelemetry/exporter-prometheus": "^0.
|
|
136
|
+
"@opentelemetry/exporter-prometheus": "^0.218.0",
|
|
137
137
|
"@opentelemetry/exporter-trace-otlp-grpc": "^0.214.0",
|
|
138
138
|
"@opentelemetry/exporter-trace-otlp-http": "^0.214.0",
|
|
139
139
|
"@opentelemetry/exporter-trace-otlp-proto": "^0.214.0",
|
|
140
|
-
"@opentelemetry/resources": "^2.
|
|
140
|
+
"@opentelemetry/resources": "^2.7.1",
|
|
141
141
|
"@opentelemetry/sdk-logs": "^0.214.0",
|
|
142
|
-
"@opentelemetry/sdk-metrics": "^2.
|
|
143
|
-
"@opentelemetry/sdk-trace-base": "^2.
|
|
144
|
-
"@opentelemetry/semantic-conventions": "^1.
|
|
145
|
-
"@sentry/node": "^10.
|
|
146
|
-
"@smithy/core": "^3.
|
|
147
|
-
"@smithy/node-http-handler": "^4.
|
|
148
|
-
"@types/bun": "^1.3.
|
|
142
|
+
"@opentelemetry/sdk-metrics": "^2.7.1",
|
|
143
|
+
"@opentelemetry/sdk-trace-base": "^2.7.1",
|
|
144
|
+
"@opentelemetry/semantic-conventions": "^1.41.1",
|
|
145
|
+
"@sentry/node": "^10.57.0",
|
|
146
|
+
"@smithy/core": "^3.24.6",
|
|
147
|
+
"@smithy/node-http-handler": "^4.7.7",
|
|
148
|
+
"@types/bun": "^1.3.14",
|
|
149
149
|
"@types/cacache": "^20.0.1",
|
|
150
150
|
"@types/he": "^1.2.3",
|
|
151
151
|
"@types/lodash-es": "^4.17.12",
|
|
152
|
-
"@types/node": "^25.
|
|
152
|
+
"@types/node": "^25.9.2",
|
|
153
153
|
"@types/picomatch": "^4.0.3",
|
|
154
154
|
"@types/plist": "^3.0.5",
|
|
155
155
|
"@types/proper-lockfile": "^4.1.4",
|
|
156
156
|
"@types/qrcode": "^1.5.6",
|
|
157
|
-
"@types/react": "^19.2.
|
|
157
|
+
"@types/react": "^19.2.17",
|
|
158
158
|
"@types/react-reconciler": "^0.33.0",
|
|
159
159
|
"@types/semver": "^7.7.1",
|
|
160
160
|
"@types/sharp": "^0.32.0",
|
|
@@ -162,11 +162,11 @@
|
|
|
162
162
|
"@types/stack-utils": "^2.0.3",
|
|
163
163
|
"@types/turndown": "^5.0.6",
|
|
164
164
|
"@types/ws": "^8.18.1",
|
|
165
|
-
"ajv": "^8.
|
|
165
|
+
"ajv": "^8.20.0",
|
|
166
166
|
"asciichart": "^1.5.25",
|
|
167
167
|
"audio-capture-napi": "workspace:*",
|
|
168
168
|
"auto-bind": "^5.0.1",
|
|
169
|
-
"axios": "^1.
|
|
169
|
+
"axios": "^1.17.0",
|
|
170
170
|
"bidi-js": "^1.0.3",
|
|
171
171
|
"cacache": "^20.0.4",
|
|
172
172
|
"chalk": "^5.6.2",
|
|
@@ -179,11 +179,11 @@
|
|
|
179
179
|
"emoji-regex": "^10.6.0",
|
|
180
180
|
"env-paths": "^4.0.0",
|
|
181
181
|
"execa": "^9.6.1",
|
|
182
|
-
"fflate": "^0.8.
|
|
182
|
+
"fflate": "^0.8.3",
|
|
183
183
|
"figures": "^6.1.0",
|
|
184
|
-
"fuse.js": "^7.
|
|
185
|
-
"get-east-asian-width": "^1.
|
|
186
|
-
"google-auth-library": "^10.
|
|
184
|
+
"fuse.js": "^7.4.2",
|
|
185
|
+
"get-east-asian-width": "^1.6.0",
|
|
186
|
+
"google-auth-library": "^10.7.0",
|
|
187
187
|
"he": "^1.2.0",
|
|
188
188
|
"highlight.js": "^11.11.1",
|
|
189
189
|
"https-proxy-agent": "^8.0.0",
|
|
@@ -192,39 +192,43 @@
|
|
|
192
192
|
"image-processor-napi": "workspace:*",
|
|
193
193
|
"indent-string": "^5.0.0",
|
|
194
194
|
"jsonc-parser": "^3.3.1",
|
|
195
|
-
"knip": "^6.
|
|
196
|
-
"lodash-es": "^4.
|
|
197
|
-
"lru-cache": "^11.
|
|
198
|
-
"marked": "^17.0.
|
|
195
|
+
"knip": "^6.16.1",
|
|
196
|
+
"lodash-es": "^4.18.1",
|
|
197
|
+
"lru-cache": "^11.5.1",
|
|
198
|
+
"marked": "^17.0.6",
|
|
199
199
|
"modifiers-napi": "workspace:*",
|
|
200
|
-
"openai": "^6.
|
|
200
|
+
"openai": "^6.42.0",
|
|
201
201
|
"p-map": "^7.0.4",
|
|
202
202
|
"picomatch": "^4.0.4",
|
|
203
|
-
"plist": "^3.1.
|
|
203
|
+
"plist": "^3.1.1",
|
|
204
204
|
"proper-lockfile": "^4.1.2",
|
|
205
205
|
"qrcode": "^1.5.4",
|
|
206
|
-
"react": "^19.2.
|
|
206
|
+
"react": "^19.2.7",
|
|
207
207
|
"react-compiler-runtime": "^1.0.0",
|
|
208
208
|
"react-reconciler": "^0.33.0",
|
|
209
|
-
"rollup": "^4.
|
|
209
|
+
"rollup": "^4.61.1",
|
|
210
210
|
"sharp": "^0.34.5",
|
|
211
|
-
"shell-quote": "^1.8.
|
|
211
|
+
"shell-quote": "^1.8.4",
|
|
212
212
|
"signal-exit": "^4.1.0",
|
|
213
213
|
"stack-utils": "^2.0.6",
|
|
214
214
|
"strip-ansi": "^7.2.0",
|
|
215
215
|
"supports-hyperlinks": "^4.4.0",
|
|
216
216
|
"tree-kill": "^1.2.2",
|
|
217
|
-
"turndown": "^7.2.
|
|
218
|
-
"type-fest": "^5.
|
|
217
|
+
"turndown": "^7.2.4",
|
|
218
|
+
"type-fest": "^5.7.0",
|
|
219
219
|
"url-handler-napi": "workspace:*",
|
|
220
220
|
"usehooks-ts": "^3.1.1",
|
|
221
|
-
"vite": "^8.0.
|
|
221
|
+
"vite": "^8.0.16",
|
|
222
222
|
"vscode-jsonrpc": "^8.2.1",
|
|
223
|
-
"vscode-languageserver-protocol": "^3.
|
|
224
|
-
"vscode-languageserver-types": "^3.
|
|
223
|
+
"vscode-languageserver-protocol": "^3.18.0",
|
|
224
|
+
"vscode-languageserver-types": "^3.18.0",
|
|
225
225
|
"wrap-ansi": "^10.0.0",
|
|
226
226
|
"xss": "^1.0.15",
|
|
227
|
-
"yaml": "^2.
|
|
228
|
-
"zod": "^4.3
|
|
227
|
+
"yaml": "^2.9.0",
|
|
228
|
+
"zod": "^4.4.3"
|
|
229
|
+
},
|
|
230
|
+
"overrides": {
|
|
231
|
+
"tmp": "^0.2.7",
|
|
232
|
+
"@grpc/grpc-js": "^1.14.4"
|
|
229
233
|
}
|
|
230
234
|
}
|