@kingsoftcloud/agentkit-harness-node 0.0.5 → 0.0.6
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/rpc-entry.mjs
CHANGED
|
@@ -5333,12 +5333,12 @@ function createNativeRpcServer({ startup, store, ledger, owner = startup.owner,
|
|
|
5333
5333
|
const row = ledger.lookupByRunKey(key);
|
|
5334
5334
|
if (row) ledger.complete(row.requestId, compactResponse(snap), key);
|
|
5335
5335
|
} catch (e) {
|
|
5336
|
-
process.stderr.write(`complete failed for ${runId}: ${e
|
|
5336
|
+
process.stderr.write(`complete failed for ${runId}: ${publicErrorMessage(e)}
|
|
5337
5337
|
`);
|
|
5338
5338
|
}
|
|
5339
5339
|
}
|
|
5340
5340
|
} catch (e) {
|
|
5341
|
-
process.stderr.write(`drive failed for ${runId}: ${e
|
|
5341
|
+
process.stderr.write(`drive failed for ${runId}: ${publicErrorMessage(e)}
|
|
5342
5342
|
`);
|
|
5343
5343
|
} finally {
|
|
5344
5344
|
resolveDone();
|
|
@@ -5380,7 +5380,7 @@ function createNativeRpcServer({ startup, store, ledger, owner = startup.owner,
|
|
|
5380
5380
|
if (e.code !== "run_not_found") throw e;
|
|
5381
5381
|
}
|
|
5382
5382
|
if (existing) {
|
|
5383
|
-
if (terminal3(existing.snapshot)) {
|
|
5383
|
+
if (terminal3(existing.snapshot.phase)) {
|
|
5384
5384
|
const response = compactResponse(existing.snapshot);
|
|
5385
5385
|
try {
|
|
5386
5386
|
ledger.complete(ledgerId(requestId), response, key);
|
|
@@ -5600,7 +5600,7 @@ async function main(argv = process.argv.slice(2)) {
|
|
|
5600
5600
|
try {
|
|
5601
5601
|
startup = buildStartup(args);
|
|
5602
5602
|
} catch (e) {
|
|
5603
|
-
process.stderr.write(`startup error: ${e
|
|
5603
|
+
process.stderr.write(`startup error: ${publicErrorMessage(e)}
|
|
5604
5604
|
`);
|
|
5605
5605
|
return process.exit(2);
|
|
5606
5606
|
}
|
|
@@ -5614,7 +5614,7 @@ async function main(argv = process.argv.slice(2)) {
|
|
|
5614
5614
|
try {
|
|
5615
5615
|
await server.dispose();
|
|
5616
5616
|
} catch (e) {
|
|
5617
|
-
process.stderr.write(`dispose error: ${e
|
|
5617
|
+
process.stderr.write(`dispose error: ${publicErrorMessage(e)}
|
|
5618
5618
|
`);
|
|
5619
5619
|
}
|
|
5620
5620
|
await Promise.allSettled(handlers);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kingsoftcloud/agentkit-harness-node",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.6",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "Standalone Native Harness Node adapters: a durable SQLite run store, a one-request model HTTP port, and a minimal versioned JSON-RPC 2.0 over NDJSON process entry. Reuses the shared Native adapter implementations and externalizes @kingsoftcloud/agentkit-harness-core; depends on no Studio/DSH code at runtime.",
|
|
@@ -137,7 +137,7 @@
|
|
|
137
137
|
"src/package-integrity.mjs"
|
|
138
138
|
],
|
|
139
139
|
"dependencies": {
|
|
140
|
-
"@kingsoftcloud/agentkit-harness-core": "0.0.
|
|
140
|
+
"@kingsoftcloud/agentkit-harness-core": "0.0.6",
|
|
141
141
|
"@astral-sh/ruff-wasm-nodejs": "0.16.8",
|
|
142
142
|
"parse5": "7.3.0",
|
|
143
143
|
"playwright-core": "1.58.2",
|
|
@@ -138,7 +138,17 @@ export function tryLock(path, busyTimeoutMs = 0) {
|
|
|
138
138
|
try { createPrivate(path); } catch (error) { if (error.code !== 'EEXIST') throw error; }
|
|
139
139
|
}
|
|
140
140
|
const before = privateFile(path);
|
|
141
|
-
for (const suffix of ['-journal', '-wal', '-shm'])
|
|
141
|
+
for (const suffix of ['-journal', '-wal', '-shm']) {
|
|
142
|
+
try { privateFile(path + suffix, true); }
|
|
143
|
+
catch (error) {
|
|
144
|
+
// SQLite may unlink a sidecar while another owner checks its lstat.
|
|
145
|
+
// No lock has been acquired or effect dispatched: treat this transient
|
|
146
|
+
// tombstone as contention, then verify the next acquisition afresh.
|
|
147
|
+
// Main database drift, links and unsafe permissions remain hard errors.
|
|
148
|
+
if (error.code === 'background_state_changed') return null;
|
|
149
|
+
throw error;
|
|
150
|
+
}
|
|
151
|
+
}
|
|
142
152
|
let db;
|
|
143
153
|
try {
|
|
144
154
|
db = new DatabaseSync(path);
|