agentledger-runtime 1.0.2 → 1.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.
|
@@ -11,8 +11,7 @@
|
|
|
11
11
|
|
|
12
12
|
import { createInterface } from 'node:readline';
|
|
13
13
|
import {
|
|
14
|
-
Runtime, JSONStore, LocalBlobStore,
|
|
15
|
-
BudgetLimits, RetryableAgentError,
|
|
14
|
+
Runtime, JSONStore, LocalBlobStore, RetryableAgentError,
|
|
16
15
|
exportEvidence, replay, costAttribution,
|
|
17
16
|
} from '../../src/index.js';
|
|
18
17
|
|
|
@@ -139,7 +138,7 @@ function showRows(label, headers, rows, color = C.C) {
|
|
|
139
138
|
|
|
140
139
|
function showDB(store, runID) {
|
|
141
140
|
// Runs
|
|
142
|
-
const runData = store.
|
|
141
|
+
const runData = store.run(runID);
|
|
143
142
|
const runRows = [];
|
|
144
143
|
if (runData) {
|
|
145
144
|
const shortID = runData.run_id.length > 24 ? runData.run_id.slice(0, 24) + '...' : runData.run_id;
|
package/package.json
CHANGED
package/src/cli.js
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { existsSync, readFileSync } from 'node:fs';
|
|
2
|
+
import { existsSync, readFileSync, realpathSync } from 'node:fs';
|
|
3
3
|
import { mkdtemp, rm } from 'node:fs/promises';
|
|
4
4
|
import { dirname, join } from 'node:path';
|
|
5
5
|
import { tmpdir } from 'node:os';
|
|
6
6
|
import process from 'node:process';
|
|
7
|
+
import { fileURLToPath } from 'node:url';
|
|
7
8
|
import { FunctionAdapter, InMemoryMCPContextServer, InMemoryMCPToolServer, JSONStore, LocalBlobStore, LocalWorker, MCPContextAdapter, MCPToolAdapter, MethodFrameworkAdapter, RetryableAgentError, Runtime, RuntimeScheduler, WorkerService, checkBackupReadiness, costAttribution, debugHTML, ddlFor, debugSummary, diffEvidence, divergenceReport, exportEvidence, failureAttribution, latestSchemaVersion, migrationsFor, otlpTraceJSON, planRetention, replay, simpleRun, traceJSONL, traceSpans, scanBoundarySource, adversarialReview, evaluateEvidence, evaluateEvidenceRegression, runFailureInjectionSuite, diffStates, shadowReport, builtinGoldenNames, builtinGoldenEvidence, goldenRegression, timeTravel, timeTravelHTML, optionalAdapterCapabilities, PostgresAdapter, S3BlobStoreAdapter, OTLPTransport, DockerSandboxAdapter } from './index.js';
|
|
8
9
|
|
|
9
10
|
const FIXTURE_CHECKS = {
|
|
@@ -193,7 +194,7 @@ export function validateFixtures() {
|
|
|
193
194
|
}
|
|
194
195
|
|
|
195
196
|
function usage() {
|
|
196
|
-
return `AgentLedger TypeScript Runtime 1.0.
|
|
197
|
+
return `AgentLedger TypeScript Runtime 1.0.3\n\nUsage:\n agentledger-ts doctor\n agentledger-ts version\n agentledger-ts quickstart\n agentledger-ts conformance\n agentledger-ts contract validate\n agentledger-ts contract export\n\nProject: https://github.com/yaogdu/AgentLedger`;
|
|
197
198
|
}
|
|
198
199
|
|
|
199
200
|
export async function runRuntimeSmoke() {
|
|
@@ -576,11 +577,11 @@ export async function main(args = process.argv.slice(2)) {
|
|
|
576
577
|
return 0;
|
|
577
578
|
}
|
|
578
579
|
if (args.length === 1 && args[0] === 'version') {
|
|
579
|
-
console.log('agentledger-ts 1.0.
|
|
580
|
+
console.log('agentledger-ts 1.0.3');
|
|
580
581
|
return 0;
|
|
581
582
|
}
|
|
582
583
|
if (args.length === 1 && args[0] === 'doctor') {
|
|
583
|
-
console.log(JSON.stringify({ language: 'typescript', version: '1.0.
|
|
584
|
+
console.log(JSON.stringify({ language: 'typescript', version: '1.0.3', status: 'ok', runtime_core_parity: true }, null, 2));
|
|
584
585
|
return 0;
|
|
585
586
|
}
|
|
586
587
|
if (args.length === 1 && args[0] === 'quickstart') {
|
|
@@ -606,7 +607,16 @@ export async function main(args = process.argv.slice(2)) {
|
|
|
606
607
|
return 1;
|
|
607
608
|
}
|
|
608
609
|
|
|
609
|
-
|
|
610
|
+
function isDirectCLIEntry() {
|
|
611
|
+
if (!process.argv[1]) return false;
|
|
612
|
+
try {
|
|
613
|
+
return realpathSync(process.argv[1]) === realpathSync(fileURLToPath(import.meta.url));
|
|
614
|
+
} catch {
|
|
615
|
+
return import.meta.url === `file://${process.argv[1]}`;
|
|
616
|
+
}
|
|
617
|
+
}
|
|
618
|
+
|
|
619
|
+
if (isDirectCLIEntry()) {
|
|
610
620
|
try {
|
|
611
621
|
process.exitCode = await main();
|
|
612
622
|
} catch (error) {
|