@smazzinni/sdk 0.4.1
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/README.md +167 -0
- package/dist/cjs/config.d.ts +27 -0
- package/dist/cjs/config.d.ts.map +1 -0
- package/dist/cjs/config.js +118 -0
- package/dist/cjs/config.js.map +1 -0
- package/dist/cjs/context.d.ts +16 -0
- package/dist/cjs/context.d.ts.map +1 -0
- package/dist/cjs/context.js +159 -0
- package/dist/cjs/context.js.map +1 -0
- package/dist/cjs/cost.d.ts +25 -0
- package/dist/cjs/cost.d.ts.map +1 -0
- package/dist/cjs/cost.js +49 -0
- package/dist/cjs/cost.js.map +1 -0
- package/dist/cjs/index.d.ts +32 -0
- package/dist/cjs/index.d.ts.map +1 -0
- package/dist/cjs/index.js +50 -0
- package/dist/cjs/index.js.map +1 -0
- package/dist/cjs/package.json +1 -0
- package/dist/cjs/redact.d.ts +12 -0
- package/dist/cjs/redact.d.ts.map +1 -0
- package/dist/cjs/redact.js +64 -0
- package/dist/cjs/redact.js.map +1 -0
- package/dist/cjs/session.d.ts +32 -0
- package/dist/cjs/session.d.ts.map +1 -0
- package/dist/cjs/session.js +65 -0
- package/dist/cjs/session.js.map +1 -0
- package/dist/cjs/steps.d.ts +12 -0
- package/dist/cjs/steps.d.ts.map +1 -0
- package/dist/cjs/steps.js +60 -0
- package/dist/cjs/steps.js.map +1 -0
- package/dist/cjs/store.d.ts +38 -0
- package/dist/cjs/store.d.ts.map +1 -0
- package/dist/cjs/store.js +125 -0
- package/dist/cjs/store.js.map +1 -0
- package/dist/cjs/types.d.ts +124 -0
- package/dist/cjs/types.d.ts.map +1 -0
- package/dist/cjs/types.js +6 -0
- package/dist/cjs/types.js.map +1 -0
- package/dist/config.d.ts +27 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +110 -0
- package/dist/config.js.map +1 -0
- package/dist/context.d.ts +16 -0
- package/dist/context.d.ts.map +1 -0
- package/dist/context.js +153 -0
- package/dist/context.js.map +1 -0
- package/dist/cost.d.ts +25 -0
- package/dist/cost.d.ts.map +1 -0
- package/dist/cost.js +43 -0
- package/dist/cost.js.map +1 -0
- package/dist/index.d.ts +32 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +33 -0
- package/dist/index.js.map +1 -0
- package/dist/redact.d.ts +12 -0
- package/dist/redact.d.ts.map +1 -0
- package/dist/redact.js +59 -0
- package/dist/redact.js.map +1 -0
- package/dist/session.d.ts +32 -0
- package/dist/session.d.ts.map +1 -0
- package/dist/session.js +61 -0
- package/dist/session.js.map +1 -0
- package/dist/steps.d.ts +12 -0
- package/dist/steps.d.ts.map +1 -0
- package/dist/steps.js +56 -0
- package/dist/steps.js.map +1 -0
- package/dist/store.d.ts +38 -0
- package/dist/store.d.ts.map +1 -0
- package/dist/store.js +118 -0
- package/dist/store.js.map +1 -0
- package/dist/types.d.ts +124 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +5 -0
- package/dist/types.js.map +1 -0
- package/package.json +59 -0
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// ReplayAI TypeScript SDK — public entry point.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.redactOptional = exports.redactText = exports.estimateStepCost = exports.estimateCost = exports.getLastFlushResult = exports.flushSession = exports.ReplaySession = exports.currentSession = exports.resetConfig = exports.getConfig = exports.configure = exports.recordStepSync = exports.recordStep = exports.withTrace = exports.trace = exports.VERSION = void 0;
|
|
5
|
+
const config_js_1 = require("./config.js");
|
|
6
|
+
Object.defineProperty(exports, "configure", { enumerable: true, get: function () { return config_js_1.configure; } });
|
|
7
|
+
Object.defineProperty(exports, "getConfig", { enumerable: true, get: function () { return config_js_1.getConfig; } });
|
|
8
|
+
Object.defineProperty(exports, "resetConfig", { enumerable: true, get: function () { return config_js_1.resetConfig; } });
|
|
9
|
+
const context_js_1 = require("./context.js");
|
|
10
|
+
Object.defineProperty(exports, "currentSession", { enumerable: true, get: function () { return context_js_1.currentSession; } });
|
|
11
|
+
Object.defineProperty(exports, "trace", { enumerable: true, get: function () { return context_js_1.trace; } });
|
|
12
|
+
Object.defineProperty(exports, "withTrace", { enumerable: true, get: function () { return context_js_1.withTrace; } });
|
|
13
|
+
const steps_js_1 = require("./steps.js");
|
|
14
|
+
Object.defineProperty(exports, "recordStep", { enumerable: true, get: function () { return steps_js_1.recordStep; } });
|
|
15
|
+
Object.defineProperty(exports, "recordStepSync", { enumerable: true, get: function () { return steps_js_1.recordStepSync; } });
|
|
16
|
+
const session_js_1 = require("./session.js");
|
|
17
|
+
Object.defineProperty(exports, "ReplaySession", { enumerable: true, get: function () { return session_js_1.ReplaySession; } });
|
|
18
|
+
const store_js_1 = require("./store.js");
|
|
19
|
+
Object.defineProperty(exports, "flushSession", { enumerable: true, get: function () { return store_js_1.flushSession; } });
|
|
20
|
+
Object.defineProperty(exports, "getLastFlushResult", { enumerable: true, get: function () { return store_js_1.getLastFlushResult; } });
|
|
21
|
+
const cost_js_1 = require("./cost.js");
|
|
22
|
+
Object.defineProperty(exports, "estimateCost", { enumerable: true, get: function () { return cost_js_1.estimateCost; } });
|
|
23
|
+
Object.defineProperty(exports, "estimateStepCost", { enumerable: true, get: function () { return cost_js_1.estimateStepCost; } });
|
|
24
|
+
const redact_js_1 = require("./redact.js");
|
|
25
|
+
Object.defineProperty(exports, "redactText", { enumerable: true, get: function () { return redact_js_1.redactText; } });
|
|
26
|
+
Object.defineProperty(exports, "redactOptional", { enumerable: true, get: function () { return redact_js_1.redactOptional; } });
|
|
27
|
+
/** SDK version. */
|
|
28
|
+
exports.VERSION = "0.4.1";
|
|
29
|
+
// Default export is a namespace object — handy for CJS consumers and as a
|
|
30
|
+
// single `import replayai from "@replayai/sdk"` import.
|
|
31
|
+
const replayai = {
|
|
32
|
+
VERSION: exports.VERSION,
|
|
33
|
+
trace: context_js_1.trace,
|
|
34
|
+
withTrace: context_js_1.withTrace,
|
|
35
|
+
recordStep: steps_js_1.recordStep,
|
|
36
|
+
recordStepSync: steps_js_1.recordStepSync,
|
|
37
|
+
configure: config_js_1.configure,
|
|
38
|
+
getConfig: config_js_1.getConfig,
|
|
39
|
+
resetConfig: config_js_1.resetConfig,
|
|
40
|
+
currentSession: context_js_1.currentSession,
|
|
41
|
+
ReplaySession: session_js_1.ReplaySession,
|
|
42
|
+
flushSession: store_js_1.flushSession,
|
|
43
|
+
getLastFlushResult: store_js_1.getLastFlushResult,
|
|
44
|
+
estimateCost: cost_js_1.estimateCost,
|
|
45
|
+
estimateStepCost: cost_js_1.estimateStepCost,
|
|
46
|
+
redactText: redact_js_1.redactText,
|
|
47
|
+
redactOptional: redact_js_1.redactOptional,
|
|
48
|
+
};
|
|
49
|
+
exports.default = replayai;
|
|
50
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AAAA,gDAAgD;;;AAEhD,2CAAgE;AAgC9D,0FAhCO,qBAAS,OAgCP;AACT,0FAjCkB,qBAAS,OAiClB;AACT,4FAlC6B,uBAAW,OAkC7B;AAjCb,6CAAgE;AAkC9D,+FAlCO,2BAAc,OAkCP;AAPd,sFA3BuB,kBAAK,OA2BvB;AACL,0FA5B8B,sBAAS,OA4B9B;AA3BX,yCAAwD;AA4BtD,2FA5BO,qBAAU,OA4BP;AACV,+FA7BmB,yBAAc,OA6BnB;AA5BhB,6CAA6C;AAiC3C,8FAjCO,0BAAa,OAiCP;AAhCf,yCAA8D;AAiC5D,6FAjCO,uBAAY,OAiCP;AACZ,mGAlCqB,6BAAkB,OAkCrB;AAjCpB,uCAA2D;AAkCzD,6FAlCO,sBAAY,OAkCP;AACZ,iGAnCqB,0BAAgB,OAmCrB;AAlClB,2CAAyD;AAmCvD,2FAnCO,sBAAU,OAmCP;AACV,+FApCmB,0BAAc,OAoCnB;AAlBhB,mBAAmB;AACN,QAAA,OAAO,GAAG,OAAO,CAAC;AAqC/B,0EAA0E;AAC1E,wDAAwD;AACxD,MAAM,QAAQ,GAAG;IACf,OAAO,EAAP,eAAO;IACP,KAAK,EAAL,kBAAK;IACL,SAAS,EAAT,sBAAS;IACT,UAAU,EAAV,qBAAU;IACV,cAAc,EAAd,yBAAc;IACd,SAAS,EAAT,qBAAS;IACT,SAAS,EAAT,qBAAS;IACT,WAAW,EAAX,uBAAW;IACX,cAAc,EAAd,2BAAc;IACd,aAAa,EAAb,0BAAa;IACb,YAAY,EAAZ,uBAAY;IACZ,kBAAkB,EAAlB,6BAAkB;IAClB,YAAY,EAAZ,sBAAY;IACZ,gBAAgB,EAAhB,0BAAgB;IAChB,UAAU,EAAV,sBAAU;IACV,cAAc,EAAd,0BAAc;CACf,CAAC;AAEF,kBAAe,QAAQ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"type":"commonjs"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare const REDACTED = "[REDACTED]";
|
|
2
|
+
/**
|
|
3
|
+
* Redact secrets from any value, returning a string.
|
|
4
|
+
*
|
|
5
|
+
* Non-string inputs are first stringified (JSON for objects) so nested
|
|
6
|
+
* secrets are scanned too. Each configured regex pattern is applied in
|
|
7
|
+
* order; matches are replaced with `[REDACTED]`.
|
|
8
|
+
*/
|
|
9
|
+
export declare function redactText(value: unknown): string;
|
|
10
|
+
/** Redact an optional string. `null`/`undefined` pass through unchanged. */
|
|
11
|
+
export declare function redactOptional(value: string | null | undefined): string | null;
|
|
12
|
+
//# sourceMappingURL=redact.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"redact.d.ts","sourceRoot":"","sources":["../../src/redact.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,QAAQ,eAAe,CAAC;AAsBrC;;;;;;GAMG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAejD;AAED,4EAA4E;AAC5E,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,MAAM,GAAG,IAAI,CAG9E"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// ReplayAI TypeScript SDK — redaction.
|
|
3
|
+
// Secrets are scrubbed from step input/output before they're persisted.
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.REDACTED = void 0;
|
|
6
|
+
exports.redactText = redactText;
|
|
7
|
+
exports.redactOptional = redactOptional;
|
|
8
|
+
const config_js_1 = require("./config.js");
|
|
9
|
+
exports.REDACTED = "[REDACTED]";
|
|
10
|
+
function stringify(value) {
|
|
11
|
+
if (value === null || value === undefined)
|
|
12
|
+
return "";
|
|
13
|
+
if (typeof value === "string")
|
|
14
|
+
return value;
|
|
15
|
+
if (typeof value === "number" || typeof value === "boolean" || typeof value === "bigint") {
|
|
16
|
+
return String(value);
|
|
17
|
+
}
|
|
18
|
+
if (typeof value === "object") {
|
|
19
|
+
try {
|
|
20
|
+
return JSON.stringify(value);
|
|
21
|
+
}
|
|
22
|
+
catch {
|
|
23
|
+
try {
|
|
24
|
+
return String(value);
|
|
25
|
+
}
|
|
26
|
+
catch {
|
|
27
|
+
return "[unserializable]";
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
return String(value);
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Redact secrets from any value, returning a string.
|
|
35
|
+
*
|
|
36
|
+
* Non-string inputs are first stringified (JSON for objects) so nested
|
|
37
|
+
* secrets are scanned too. Each configured regex pattern is applied in
|
|
38
|
+
* order; matches are replaced with `[REDACTED]`.
|
|
39
|
+
*/
|
|
40
|
+
function redactText(value) {
|
|
41
|
+
let text = stringify(value);
|
|
42
|
+
if (!text)
|
|
43
|
+
return "";
|
|
44
|
+
const cfg = (0, config_js_1.getConfig)();
|
|
45
|
+
for (const re of cfg.redactPatterns) {
|
|
46
|
+
// Each call needs a fresh lastIndex since these regexes have the `g` flag.
|
|
47
|
+
re.lastIndex = 0;
|
|
48
|
+
try {
|
|
49
|
+
text = text.replace(re, exports.REDACTED);
|
|
50
|
+
}
|
|
51
|
+
catch {
|
|
52
|
+
// Malformed user-supplied patterns shouldn't crash the agent.
|
|
53
|
+
continue;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
return text;
|
|
57
|
+
}
|
|
58
|
+
/** Redact an optional string. `null`/`undefined` pass through unchanged. */
|
|
59
|
+
function redactOptional(value) {
|
|
60
|
+
if (value === null || value === undefined)
|
|
61
|
+
return null;
|
|
62
|
+
return redactText(value);
|
|
63
|
+
}
|
|
64
|
+
//# sourceMappingURL=redact.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"redact.js","sourceRoot":"","sources":["../../src/redact.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,wEAAwE;;;AAiCxE,gCAeC;AAGD,wCAGC;AApDD,2CAAwC;AAE3B,QAAA,QAAQ,GAAG,YAAY,CAAC;AAErC,SAAS,SAAS,CAAC,KAAc;IAC/B,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,SAAS;QAAE,OAAO,EAAE,CAAC;IACrD,IAAI,OAAO,KAAK,KAAK,QAAQ;QAAE,OAAO,KAAK,CAAC;IAC5C,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,OAAO,KAAK,KAAK,SAAS,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;QACzF,OAAO,MAAM,CAAC,KAAK,CAAC,CAAC;IACvB,CAAC;IACD,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;QAC9B,IAAI,CAAC;YACH,OAAO,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;QAC/B,CAAC;QAAC,MAAM,CAAC;YACP,IAAI,CAAC;gBACH,OAAO,MAAM,CAAC,KAAK,CAAC,CAAC;YACvB,CAAC;YAAC,MAAM,CAAC;gBACP,OAAO,kBAAkB,CAAC;YAC5B,CAAC;QACH,CAAC;IACH,CAAC;IACD,OAAO,MAAM,CAAC,KAAK,CAAC,CAAC;AACvB,CAAC;AAED;;;;;;GAMG;AACH,SAAgB,UAAU,CAAC,KAAc;IACvC,IAAI,IAAI,GAAG,SAAS,CAAC,KAAK,CAAC,CAAC;IAC5B,IAAI,CAAC,IAAI;QAAE,OAAO,EAAE,CAAC;IACrB,MAAM,GAAG,GAAG,IAAA,qBAAS,GAAE,CAAC;IACxB,KAAK,MAAM,EAAE,IAAI,GAAG,CAAC,cAAc,EAAE,CAAC;QACpC,2EAA2E;QAC3E,EAAE,CAAC,SAAS,GAAG,CAAC,CAAC;QACjB,IAAI,CAAC;YACH,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,EAAE,EAAE,gBAAQ,CAAC,CAAC;QACpC,CAAC;QAAC,MAAM,CAAC;YACP,8DAA8D;YAC9D,SAAS;QACX,CAAC;IACH,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AAED,4EAA4E;AAC5E,SAAgB,cAAc,CAAC,KAAgC;IAC7D,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,SAAS;QAAE,OAAO,IAAI,CAAC;IACvD,OAAO,UAAU,CAAC,KAAK,CAAC,CAAC;AAC3B,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { ExportLang, ReplaySessionOptions, RunOptions, Trace } from "./types.js";
|
|
2
|
+
/**
|
|
3
|
+
* ReplaySession — load a previously-recorded session from the API and either
|
|
4
|
+
* re-run it (returning a `Trace`) or export it as a pytest/jest test.
|
|
5
|
+
*
|
|
6
|
+
* ```ts
|
|
7
|
+
* const replay = new ReplaySession("ses_8fa1", { liveLlm: false });
|
|
8
|
+
* replay.mock("issue_refund", JSON.stringify({ refund_id: "ref_3391" }));
|
|
9
|
+
* const trace = await replay.run({ agent: "support-agent-v3", framework: "LangChain" });
|
|
10
|
+
* console.log(trace.stepCount, trace.status);
|
|
11
|
+
* const code = await replay.export("pytest");
|
|
12
|
+
* ```
|
|
13
|
+
*/
|
|
14
|
+
export declare class ReplaySession {
|
|
15
|
+
readonly sessionId: string;
|
|
16
|
+
readonly liveLlm: boolean;
|
|
17
|
+
/** fnName → canned response (JSON string). */
|
|
18
|
+
readonly mocks: Record<string, string>;
|
|
19
|
+
constructor(sessionId: string, opts?: ReplaySessionOptions);
|
|
20
|
+
/** Register a canned response for a mocked function call. */
|
|
21
|
+
mock(fnName: string, response: string | object): void;
|
|
22
|
+
/**
|
|
23
|
+
* Fetch the session and return a `Trace` view of it.
|
|
24
|
+
*
|
|
25
|
+
* The `agent`/`framework` opts are accepted for API parity with the Python
|
|
26
|
+
* SDK; the session's stored agent/framework take precedence.
|
|
27
|
+
*/
|
|
28
|
+
run(opts: RunOptions): Promise<Trace>;
|
|
29
|
+
/** Fetch the session exported as a pytest or jest test source string. */
|
|
30
|
+
export(lang?: ExportLang): Promise<string>;
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=session.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"session.d.ts","sourceRoot":"","sources":["../../src/session.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAEV,UAAU,EACV,oBAAoB,EACpB,UAAU,EAGV,KAAK,EACN,MAAM,YAAY,CAAC;AAEpB;;;;;;;;;;;GAWG;AACH,qBAAa,aAAa;IACxB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,8CAA8C;IAC9C,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAM;gBAEhC,SAAS,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,oBAAoB;IAK1D,6DAA6D;IAC7D,IAAI,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI;IAIrD;;;;;OAKG;IACG,GAAG,CAAC,IAAI,EAAE,UAAU,GAAG,OAAO,CAAC,KAAK,CAAC;IAwB3C,yEAAyE;IACnE,MAAM,CAAC,IAAI,GAAE,UAAqB,GAAG,OAAO,CAAC,MAAM,CAAC;CAG3D"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// ReplayAI TypeScript SDK — ReplaySession: replay a recorded session and
|
|
3
|
+
// export it as a test. Wraps GET /api/sessions/:id and /export.
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.ReplaySession = void 0;
|
|
6
|
+
const store_js_1 = require("./store.js");
|
|
7
|
+
/**
|
|
8
|
+
* ReplaySession — load a previously-recorded session from the API and either
|
|
9
|
+
* re-run it (returning a `Trace`) or export it as a pytest/jest test.
|
|
10
|
+
*
|
|
11
|
+
* ```ts
|
|
12
|
+
* const replay = new ReplaySession("ses_8fa1", { liveLlm: false });
|
|
13
|
+
* replay.mock("issue_refund", JSON.stringify({ refund_id: "ref_3391" }));
|
|
14
|
+
* const trace = await replay.run({ agent: "support-agent-v3", framework: "LangChain" });
|
|
15
|
+
* console.log(trace.stepCount, trace.status);
|
|
16
|
+
* const code = await replay.export("pytest");
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
19
|
+
class ReplaySession {
|
|
20
|
+
sessionId;
|
|
21
|
+
liveLlm;
|
|
22
|
+
/** fnName → canned response (JSON string). */
|
|
23
|
+
mocks = {};
|
|
24
|
+
constructor(sessionId, opts) {
|
|
25
|
+
this.sessionId = sessionId;
|
|
26
|
+
this.liveLlm = opts?.liveLlm ?? false;
|
|
27
|
+
}
|
|
28
|
+
/** Register a canned response for a mocked function call. */
|
|
29
|
+
mock(fnName, response) {
|
|
30
|
+
this.mocks[fnName] = typeof response === "string" ? response : JSON.stringify(response);
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Fetch the session and return a `Trace` view of it.
|
|
34
|
+
*
|
|
35
|
+
* The `agent`/`framework` opts are accepted for API parity with the Python
|
|
36
|
+
* SDK; the session's stored agent/framework take precedence.
|
|
37
|
+
*/
|
|
38
|
+
async run(opts) {
|
|
39
|
+
const result = await (0, store_js_1.fetchSession)(this.sessionId);
|
|
40
|
+
if (!result.ok) {
|
|
41
|
+
throw new Error(`ReplaySession.run: GET /api/sessions/${this.sessionId} → ${result.status} ${result.body}`);
|
|
42
|
+
}
|
|
43
|
+
const payload = result.session;
|
|
44
|
+
const session = payload.session;
|
|
45
|
+
if (!session) {
|
|
46
|
+
throw new Error(`ReplaySession.run: API response missing \`session\` field`);
|
|
47
|
+
}
|
|
48
|
+
const steps = session.steps ?? [];
|
|
49
|
+
return {
|
|
50
|
+
stepCount: steps.length ?? session.stepCount ?? 0,
|
|
51
|
+
status: session.status,
|
|
52
|
+
steps,
|
|
53
|
+
durationMs: session.durationMs,
|
|
54
|
+
tokenTotal: session.tokenTotal,
|
|
55
|
+
costUsd: session.costUsd,
|
|
56
|
+
sessionId: session.id,
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
/** Fetch the session exported as a pytest or jest test source string. */
|
|
60
|
+
async export(lang = "pytest") {
|
|
61
|
+
return (0, store_js_1.fetchExport)(this.sessionId, lang);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
exports.ReplaySession = ReplaySession;
|
|
65
|
+
//# sourceMappingURL=session.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"session.js","sourceRoot":"","sources":["../../src/session.ts"],"names":[],"mappings":";AAAA,yEAAyE;AACzE,gEAAgE;;;AAEhE,yCAAuD;AAWvD;;;;;;;;;;;GAWG;AACH,MAAa,aAAa;IACf,SAAS,CAAS;IAClB,OAAO,CAAU;IAC1B,8CAA8C;IACrC,KAAK,GAA2B,EAAE,CAAC;IAE5C,YAAY,SAAiB,EAAE,IAA2B;QACxD,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAC3B,IAAI,CAA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AAA,sBAAW,EAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;IAC3C,CAAC;CACF;AAlDD,sCAkDC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { RecordStepInput } from "./types.js";
|
|
2
|
+
/**
|
|
3
|
+
* Record a step into the current trace session.
|
|
4
|
+
*
|
|
5
|
+
* No-op when called outside a `withTrace()`/`trace()` context (unless strict
|
|
6
|
+
* mode is on, in which case it warns). Inputs and outputs are redacted with
|
|
7
|
+
* the configured patterns before persistence.
|
|
8
|
+
*/
|
|
9
|
+
export declare function recordStep(input: RecordStepInput): Promise<void>;
|
|
10
|
+
/** Sync variant — same as `recordStep()` but without the await ceremony. */
|
|
11
|
+
export declare function recordStepSync(input: RecordStepInput): void;
|
|
12
|
+
//# sourceMappingURL=steps.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"steps.d.ts","sourceRoot":"","sources":["../../src/steps.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,eAAe,EAAqC,MAAM,YAAY,CAAC;AAerF;;;;;;GAMG;AACH,wBAAsB,UAAU,CAAC,KAAK,EAAE,eAAe,GAAG,OAAO,CAAC,IAAI,CAAC,CAetE;AAED,4EAA4E;AAC5E,wBAAgB,cAAc,CAAC,KAAK,EAAE,eAAe,GAAG,IAAI,CAe3D"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// ReplayAI TypeScript SDK — manual step recording.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.recordStep = recordStep;
|
|
5
|
+
exports.recordStepSync = recordStepSync;
|
|
6
|
+
const context_js_1 = require("./context.js");
|
|
7
|
+
const redact_js_1 = require("./redact.js");
|
|
8
|
+
const VALID_TYPES = ["llm_call", "tool_call", "retrieval", "decision", "error"];
|
|
9
|
+
const VALID_STATUSES = ["success", "failed", "running", "warning"];
|
|
10
|
+
function coerceType(v) {
|
|
11
|
+
if (v && VALID_TYPES.includes(v))
|
|
12
|
+
return v;
|
|
13
|
+
return "llm_call";
|
|
14
|
+
}
|
|
15
|
+
function coerceStatus(v) {
|
|
16
|
+
if (v && VALID_STATUSES.includes(v))
|
|
17
|
+
return v;
|
|
18
|
+
return "success";
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Record a step into the current trace session.
|
|
22
|
+
*
|
|
23
|
+
* No-op when called outside a `withTrace()`/`trace()` context (unless strict
|
|
24
|
+
* mode is on, in which case it warns). Inputs and outputs are redacted with
|
|
25
|
+
* the configured patterns before persistence.
|
|
26
|
+
*/
|
|
27
|
+
async function recordStep(input) {
|
|
28
|
+
const step = {
|
|
29
|
+
type: coerceType(input.type),
|
|
30
|
+
name: input.name,
|
|
31
|
+
model: input.model ?? null,
|
|
32
|
+
tokensIn: input.tokensIn ?? 0,
|
|
33
|
+
tokensOut: input.tokensOut ?? 0,
|
|
34
|
+
input: (0, redact_js_1.redactText)(input.input),
|
|
35
|
+
output: (0, redact_js_1.redactText)(input.output),
|
|
36
|
+
status: coerceStatus(input.status),
|
|
37
|
+
t: input.t ?? input.offsetMs,
|
|
38
|
+
offsetMs: input.offsetMs ?? input.t,
|
|
39
|
+
durationMs: input.durationMs ?? 0,
|
|
40
|
+
};
|
|
41
|
+
(0, context_js_1.appendStep)(step);
|
|
42
|
+
}
|
|
43
|
+
/** Sync variant — same as `recordStep()` but without the await ceremony. */
|
|
44
|
+
function recordStepSync(input) {
|
|
45
|
+
const step = {
|
|
46
|
+
type: coerceType(input.type),
|
|
47
|
+
name: input.name,
|
|
48
|
+
model: input.model ?? null,
|
|
49
|
+
tokensIn: input.tokensIn ?? 0,
|
|
50
|
+
tokensOut: input.tokensOut ?? 0,
|
|
51
|
+
input: (0, redact_js_1.redactText)(input.input),
|
|
52
|
+
output: (0, redact_js_1.redactText)(input.output),
|
|
53
|
+
status: coerceStatus(input.status),
|
|
54
|
+
t: input.t ?? input.offsetMs,
|
|
55
|
+
offsetMs: input.offsetMs ?? input.t,
|
|
56
|
+
durationMs: input.durationMs ?? 0,
|
|
57
|
+
};
|
|
58
|
+
(0, context_js_1.appendStep)(step);
|
|
59
|
+
}
|
|
60
|
+
//# sourceMappingURL=steps.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"steps.js","sourceRoot":"","sources":["../../src/steps.ts"],"names":[],"mappings":";AAAA,mDAAmD;;AA0BnD,gCAeC;AAGD,wCAeC;AAzDD,6CAA0C;AAC1C,2CAAyC;AAGzC,MAAM,WAAW,GAAe,CAAC,UAAU,EAAE,WAAW,EAAE,WAAW,EAAE,UAAU,EAAE,OAAO,CAAC,CAAC;AAC5F,MAAM,cAAc,GAAiB,CAAC,SAAS,EAAE,QAAQ,EAAE,SAAS,EAAE,SAAS,CAAC,CAAC;AAEjF,SAAS,UAAU,CAAC,CAAqB;IACvC,IAAI,CAAC,IAAK,WAAwB,CAAC,QAAQ,CAAC,CAAC,CAAC;QAAE,OAAO,CAAa,CAAC;IACrE,OAAO,UAAU,CAAC;AACpB,CAAC;AAED,SAAS,YAAY,CAAC,CAAqB;IACzC,IAAI,CAAC,IAAK,cAA2B,CAAC,QAAQ,CAAC,CAAC,CAAC;QAAE,OAAO,CAAe,CAAC;IAC1E,OAAO,SAAS,CAAC;AACnB,CAAC;AAED;;;;;;GAMG;AACI,KAAK,UAAU,UAAU,CAAC,KAAsB;IACrD,MAAM,IAAI,GAAgB;QACxB,IAAI,EAAE,UAAU,CAAC,KAAK,CAAC,IAAI,CAAC;QAC5B,IAAI,EAAE,KAAK,CAAC,IAAI;QAChB,KAAK,EAAE,KAAK,CAAC,KAAK,IAAI,IAAI;QAC1B,QAAQ,EAAE,KAAK,CAAC,QAAQ,IAAI,CAAC;QAC7B,SAAS,EAAE,KAAK,CAAC,SAAS,IAAI,CAAC;QAC/B,KAAK,EAAE,IAAA,sBAAU,EAAC,KAAK,CAAC,KAAK,CAAC;QAC9B,MAAM,EAAE,IAAA,sBAAU,EAAC,KAAK,CAAC,MAAM,CAAC;QAChC,MAAM,EAAE,YAAY,CAAC,KAAK,CAAC,MAAM,CAAC;QAClC,CAAC,EAAE,KAAK,CAAC,CAAC,IAAI,KAAK,CAAC,QAAQ;QAC5B,QAAQ,EAAE,KAAK,CAAC,QAAQ,IAAI,KAAK,CAAC,CAAC;QACnC,UAAU,EAAE,KAAK,CAAC,UAAU,IAAI,CAAC;KAClC,CAAC;IACF,IAAA,uBAAU,EAAC,IAAI,CAAC,CAAC;AACnB,CAAC;AAED,4EAA4E;AAC5E,SAAgB,cAAc,CAAC,KAAsB;IACnD,MAAM,IAAI,GAAgB;QACxB,IAAI,EAAE,UAAU,CAAC,KAAK,CAAC,IAAI,CAAC;QAC5B,IAAI,EAAE,KAAK,CAAC,IAAI;QAChB,KAAK,EAAE,KAAK,CAAC,KAAK,IAAI,IAAI;QAC1B,QAAQ,EAAE,KAAK,CAAC,QAAQ,IAAI,CAAC;QAC7B,SAAS,EAAE,KAAK,CAAC,SAAS,IAAI,CAAC;QAC/B,KAAK,EAAE,IAAA,sBAAU,EAAC,KAAK,CAAC,KAAK,CAAC;QAC9B,MAAM,EAAE,IAAA,sBAAU,EAAC,KAAK,CAAC,MAAM,CAAC;QAChC,MAAM,EAAE,YAAY,CAAC,KAAK,CAAC,MAAM,CAAC;QAClC,CAAC,EAAE,KAAK,CAAC,CAAC,IAAI,KAAK,CAAC,QAAQ;QAC5B,QAAQ,EAAE,KAAK,CAAC,QAAQ,IAAI,KAAK,CAAC,CAAC;QACnC,UAAU,EAAE,KAAK,CAAC,UAAU,IAAI,CAAC;KAClC,CAAC;IACF,IAAA,uBAAU,EAAC,IAAI,CAAC,CAAC;AACnB,CAAC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { SessionStatus, SessionStep } from "./types.js";
|
|
2
|
+
export interface FlushPayload {
|
|
3
|
+
/** Local correlation id (UUIDv4); the API assigns the canonical id. */
|
|
4
|
+
sessionId: string;
|
|
5
|
+
name: string;
|
|
6
|
+
agent: string;
|
|
7
|
+
project?: string;
|
|
8
|
+
framework: string;
|
|
9
|
+
tags: string[];
|
|
10
|
+
startedAt: Date;
|
|
11
|
+
durationMs: number;
|
|
12
|
+
status: SessionStatus;
|
|
13
|
+
tokenTotal: number;
|
|
14
|
+
costUsd: number;
|
|
15
|
+
steps: SessionStep[];
|
|
16
|
+
}
|
|
17
|
+
export interface FlushResult {
|
|
18
|
+
ok: boolean;
|
|
19
|
+
sessionId?: string;
|
|
20
|
+
url?: string;
|
|
21
|
+
error?: string;
|
|
22
|
+
}
|
|
23
|
+
export declare function getLastFlushResult(): FlushResult | null;
|
|
24
|
+
export declare function _resetLastFlushResult(): void;
|
|
25
|
+
/** POST a recorded session to `${apiUrl}/api/sessions`. */
|
|
26
|
+
export declare function flushSession(payload: FlushPayload): Promise<FlushResult>;
|
|
27
|
+
/** GET `/api/sessions/${id}` — used by `ReplaySession.run()`. */
|
|
28
|
+
export declare function fetchSession(sessionId: string): Promise<{
|
|
29
|
+
ok: true;
|
|
30
|
+
session: unknown;
|
|
31
|
+
} | {
|
|
32
|
+
ok: false;
|
|
33
|
+
status: number;
|
|
34
|
+
body: string;
|
|
35
|
+
}>;
|
|
36
|
+
/** GET `/api/sessions/${id}/export?lang=...` — used by `ReplaySession.export()`. */
|
|
37
|
+
export declare function fetchExport(sessionId: string, lang: "pytest" | "jest"): Promise<string>;
|
|
38
|
+
//# sourceMappingURL=store.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"store.d.ts","sourceRoot":"","sources":["../../src/store.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAE7D,MAAM,WAAW,YAAY;IAC3B,uEAAuE;IACvE,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,SAAS,EAAE,IAAI,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,aAAa,CAAC;IACtB,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,WAAW,EAAE,CAAC;CACtB;AAED,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,OAAO,CAAC;IACZ,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAOD,wBAAgB,kBAAkB,IAAI,WAAW,GAAG,IAAI,CAEvD;AAED,wBAAgB,qBAAqB,IAAI,IAAI,CAE5C;AA8BD,2DAA2D;AAC3D,wBAAsB,YAAY,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,WAAW,CAAC,CA2C9E;AAED,iEAAiE;AACjE,wBAAsB,YAAY,CAChC,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,OAAO,EAAE,OAAO,CAAA;CAAE,GAAG;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC,CAYvF;AAED,oFAAoF;AACpF,wBAAsB,WAAW,CAC/B,SAAS,EAAE,MAAM,EACjB,IAAI,EAAE,QAAQ,GAAG,MAAM,GACtB,OAAO,CAAC,MAAM,CAAC,CAajB"}
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// ReplayAI TypeScript SDK — store.
|
|
3
|
+
// POSTs a recorded session to the ReplayAI API. Swallows errors in non-strict
|
|
4
|
+
// mode so instrumented agents never break.
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.getLastFlushResult = getLastFlushResult;
|
|
7
|
+
exports._resetLastFlushResult = _resetLastFlushResult;
|
|
8
|
+
exports.flushSession = flushSession;
|
|
9
|
+
exports.fetchSession = fetchSession;
|
|
10
|
+
exports.fetchExport = fetchExport;
|
|
11
|
+
const config_js_1 = require("./config.js");
|
|
12
|
+
// Module-level record of the most recent flush. Used by demos / callers that
|
|
13
|
+
// want the URL after `withTrace` completes (the documented `withTrace`
|
|
14
|
+
// signature returns the wrapped fn's value, not the session info).
|
|
15
|
+
let lastFlushResult = null;
|
|
16
|
+
function getLastFlushResult() {
|
|
17
|
+
return lastFlushResult;
|
|
18
|
+
}
|
|
19
|
+
function _resetLastFlushResult() {
|
|
20
|
+
lastFlushResult = null;
|
|
21
|
+
}
|
|
22
|
+
function buildBody(payload) {
|
|
23
|
+
return {
|
|
24
|
+
projectSlug: payload.project,
|
|
25
|
+
name: payload.name,
|
|
26
|
+
agent: payload.agent,
|
|
27
|
+
framework: payload.framework,
|
|
28
|
+
status: payload.status,
|
|
29
|
+
startedAt: payload.startedAt.toISOString(),
|
|
30
|
+
durationMs: payload.durationMs,
|
|
31
|
+
tokenTotal: payload.tokenTotal,
|
|
32
|
+
costUsd: payload.costUsd,
|
|
33
|
+
tags: payload.tags,
|
|
34
|
+
steps: payload.steps.map((s) => ({
|
|
35
|
+
type: s.type,
|
|
36
|
+
name: s.name,
|
|
37
|
+
t: s.t ?? s.offsetMs ?? 0,
|
|
38
|
+
offsetMs: s.offsetMs ?? s.t ?? 0,
|
|
39
|
+
durationMs: s.durationMs ?? 0,
|
|
40
|
+
status: s.status,
|
|
41
|
+
model: s.model ?? undefined,
|
|
42
|
+
tokensIn: s.tokensIn ?? undefined,
|
|
43
|
+
tokensOut: s.tokensOut ?? undefined,
|
|
44
|
+
input: s.input ?? "",
|
|
45
|
+
output: s.output ?? "",
|
|
46
|
+
})),
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
/** POST a recorded session to `${apiUrl}/api/sessions`. */
|
|
50
|
+
async function flushSession(payload) {
|
|
51
|
+
const cfg = (0, config_js_1.getConfig)();
|
|
52
|
+
const url = `${cfg.apiUrl}/api/sessions`;
|
|
53
|
+
const body = buildBody(payload);
|
|
54
|
+
const headers = {
|
|
55
|
+
"content-type": "application/json",
|
|
56
|
+
"user-agent": `@replayai/sdk ts/0.4.1`,
|
|
57
|
+
};
|
|
58
|
+
if (cfg.token)
|
|
59
|
+
headers.authorization = `Bearer ${cfg.token}`;
|
|
60
|
+
try {
|
|
61
|
+
const res = await fetch(url, {
|
|
62
|
+
method: "POST",
|
|
63
|
+
headers,
|
|
64
|
+
body: JSON.stringify(body),
|
|
65
|
+
});
|
|
66
|
+
if (!res.ok) {
|
|
67
|
+
const text = await res.text().catch(() => "");
|
|
68
|
+
const msg = `ReplayAI flush failed: ${res.status} ${res.statusText}${text ? ` — ${text}` : ""}`;
|
|
69
|
+
if (cfg.strict)
|
|
70
|
+
throw new Error(msg);
|
|
71
|
+
console.warn(`[replayai] ${msg}`);
|
|
72
|
+
const result = { ok: false, error: msg };
|
|
73
|
+
lastFlushResult = result;
|
|
74
|
+
return result;
|
|
75
|
+
}
|
|
76
|
+
const json = (await res.json());
|
|
77
|
+
const sid = json.session?.id;
|
|
78
|
+
const result = {
|
|
79
|
+
ok: true,
|
|
80
|
+
sessionId: sid,
|
|
81
|
+
url: sid ? `${cfg.dashboardUrl}/?s=${sid}` : undefined,
|
|
82
|
+
};
|
|
83
|
+
lastFlushResult = result;
|
|
84
|
+
return result;
|
|
85
|
+
}
|
|
86
|
+
catch (err) {
|
|
87
|
+
const msg = err instanceof Error ? err.message : String(err);
|
|
88
|
+
if (cfg.strict)
|
|
89
|
+
throw err;
|
|
90
|
+
console.warn(`[replayai] flush error: ${msg}`);
|
|
91
|
+
const result = { ok: false, error: msg };
|
|
92
|
+
lastFlushResult = result;
|
|
93
|
+
return result;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
/** GET `/api/sessions/${id}` — used by `ReplaySession.run()`. */
|
|
97
|
+
async function fetchSession(sessionId) {
|
|
98
|
+
const cfg = (0, config_js_1.getConfig)();
|
|
99
|
+
const url = `${cfg.apiUrl}/api/sessions/${encodeURIComponent(sessionId)}`;
|
|
100
|
+
const headers = {};
|
|
101
|
+
if (cfg.token)
|
|
102
|
+
headers.authorization = `Bearer ${cfg.token}`;
|
|
103
|
+
const res = await fetch(url, { headers });
|
|
104
|
+
if (!res.ok) {
|
|
105
|
+
const body = await res.text().catch(() => "");
|
|
106
|
+
return { ok: false, status: res.status, body };
|
|
107
|
+
}
|
|
108
|
+
const json = await res.json();
|
|
109
|
+
return { ok: true, session: json };
|
|
110
|
+
}
|
|
111
|
+
/** GET `/api/sessions/${id}/export?lang=...` — used by `ReplaySession.export()`. */
|
|
112
|
+
async function fetchExport(sessionId, lang) {
|
|
113
|
+
const cfg = (0, config_js_1.getConfig)();
|
|
114
|
+
const url = `${cfg.apiUrl}/api/sessions/${encodeURIComponent(sessionId)}/export?lang=${encodeURIComponent(lang)}`;
|
|
115
|
+
const headers = {};
|
|
116
|
+
if (cfg.token)
|
|
117
|
+
headers.authorization = `Bearer ${cfg.token}`;
|
|
118
|
+
const res = await fetch(url, { headers });
|
|
119
|
+
if (!res.ok) {
|
|
120
|
+
const body = await res.text().catch(() => "");
|
|
121
|
+
throw new Error(`ReplaySession.export: GET ${url} → ${res.status} ${res.statusText}${body ? ` — ${body}` : ""}`);
|
|
122
|
+
}
|
|
123
|
+
return await res.text();
|
|
124
|
+
}
|
|
125
|
+
//# sourceMappingURL=store.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"store.js","sourceRoot":"","sources":["../../src/store.ts"],"names":[],"mappings":";AAAA,mCAAmC;AACnC,8EAA8E;AAC9E,2CAA2C;;AAiC3C,gDAEC;AAED,sDAEC;AA+BD,oCA2CC;AAGD,oCAcC;AAGD,kCAgBC;AAnJD,2CAAwC;AA0BxC,6EAA6E;AAC7E,uEAAuE;AACvE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AC;IACJ,CAAC;IACD,OAAO,MAAM,GAAG,CAAC,IAAI,EAAE,CAAC;AAC1B,CAAC"}
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
export type StepType = "llm_call" | "tool_call" | "retrieval" | "decision" | "error";
|
|
2
|
+
export type StepStatus = "success" | "failed" | "running" | "warning";
|
|
3
|
+
export type SessionStatus = "success" | "failed" | "running";
|
|
4
|
+
/** A single recorded step inside a session. Mirrors the API's SessionStep. */
|
|
5
|
+
export interface SessionStep {
|
|
6
|
+
id?: string;
|
|
7
|
+
type: StepType;
|
|
8
|
+
name: string;
|
|
9
|
+
/** ms offset from session start (alias of offsetMs) */
|
|
10
|
+
t?: number;
|
|
11
|
+
offsetMs?: number;
|
|
12
|
+
durationMs?: number;
|
|
13
|
+
status: StepStatus;
|
|
14
|
+
model?: string | null;
|
|
15
|
+
tokensIn?: number | null;
|
|
16
|
+
tokensOut?: number | null;
|
|
17
|
+
input?: string;
|
|
18
|
+
output?: string;
|
|
19
|
+
}
|
|
20
|
+
/** A full agent session as returned by the API. */
|
|
21
|
+
export interface AgentSession {
|
|
22
|
+
id: string;
|
|
23
|
+
projectId?: string;
|
|
24
|
+
name: string;
|
|
25
|
+
agent: string;
|
|
26
|
+
framework: string;
|
|
27
|
+
status: SessionStatus;
|
|
28
|
+
startedAt: string;
|
|
29
|
+
durationMs: number;
|
|
30
|
+
tokenTotal: number;
|
|
31
|
+
costUsd: number;
|
|
32
|
+
tags: string[];
|
|
33
|
+
steps: SessionStep[];
|
|
34
|
+
/** Present on list responses. */
|
|
35
|
+
stepCount?: number;
|
|
36
|
+
/** Present when joined with project on the detail endpoint. */
|
|
37
|
+
project?: AgentProject;
|
|
38
|
+
}
|
|
39
|
+
export interface AgentProject {
|
|
40
|
+
id: string;
|
|
41
|
+
name: string;
|
|
42
|
+
slug: string;
|
|
43
|
+
framework: string;
|
|
44
|
+
description?: string | null;
|
|
45
|
+
createdAt: string;
|
|
46
|
+
sessionCount?: number;
|
|
47
|
+
}
|
|
48
|
+
/** Options accepted by `trace()` and `withTrace()`. */
|
|
49
|
+
export interface TraceOptions {
|
|
50
|
+
/** Project slug or id. Falls back to REPLAYAI_PROJECT env var. */
|
|
51
|
+
project?: string;
|
|
52
|
+
tags?: string[];
|
|
53
|
+
framework?: string;
|
|
54
|
+
startedAt?: Date;
|
|
55
|
+
/** Agent name (defaults to the trace name). */
|
|
56
|
+
agent?: string;
|
|
57
|
+
/** Per-call override of the sample rate (0.0–1.0). */
|
|
58
|
+
sampleRate?: number;
|
|
59
|
+
}
|
|
60
|
+
/** Lightweight view of a recorded/replayed trace. */
|
|
61
|
+
export interface Trace {
|
|
62
|
+
stepCount: number;
|
|
63
|
+
status: SessionStatus;
|
|
64
|
+
steps: SessionStep[];
|
|
65
|
+
durationMs?: number;
|
|
66
|
+
tokenTotal?: number;
|
|
67
|
+
costUsd?: number;
|
|
68
|
+
sessionId?: string;
|
|
69
|
+
sessionUrl?: string;
|
|
70
|
+
}
|
|
71
|
+
export interface ReplaySessionOptions {
|
|
72
|
+
liveLlm?: boolean;
|
|
73
|
+
}
|
|
74
|
+
export interface RunOptions {
|
|
75
|
+
agent: string;
|
|
76
|
+
framework?: string;
|
|
77
|
+
}
|
|
78
|
+
export interface RecordStepInput {
|
|
79
|
+
type?: StepType;
|
|
80
|
+
name: string;
|
|
81
|
+
model?: string | null;
|
|
82
|
+
tokensIn?: number;
|
|
83
|
+
tokensOut?: number;
|
|
84
|
+
input?: unknown;
|
|
85
|
+
output?: unknown;
|
|
86
|
+
status?: StepStatus;
|
|
87
|
+
/** ms offset from session start; inferred if omitted. */
|
|
88
|
+
offsetMs?: number;
|
|
89
|
+
/** alias for offsetMs */
|
|
90
|
+
t?: number;
|
|
91
|
+
durationMs?: number;
|
|
92
|
+
}
|
|
93
|
+
export interface ConfigOptions {
|
|
94
|
+
project?: string;
|
|
95
|
+
token?: string;
|
|
96
|
+
storage?: "local" | "cloud" | "both";
|
|
97
|
+
storagePath?: string;
|
|
98
|
+
apiUrl?: string;
|
|
99
|
+
dashboardUrl?: string;
|
|
100
|
+
sampleRate?: number;
|
|
101
|
+
strict?: boolean;
|
|
102
|
+
redactPatterns?: Array<string | RegExp>;
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* Internal representation of a session being recorded. Populated by
|
|
106
|
+
* `withTrace()`/`trace()` and flushed by `store.flushSession()`.
|
|
107
|
+
*/
|
|
108
|
+
export interface InternalSession {
|
|
109
|
+
id: string;
|
|
110
|
+
name: string;
|
|
111
|
+
agent: string;
|
|
112
|
+
project?: string;
|
|
113
|
+
framework: string;
|
|
114
|
+
tags: string[];
|
|
115
|
+
startedAt: Date;
|
|
116
|
+
/** wall-clock ms captured on enter — used for offset inference */
|
|
117
|
+
__startMs: number;
|
|
118
|
+
steps: SessionStep[];
|
|
119
|
+
status: SessionStatus;
|
|
120
|
+
error?: unknown;
|
|
121
|
+
endAt?: Date;
|
|
122
|
+
}
|
|
123
|
+
export type ExportLang = "pytest" | "jest";
|
|
124
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,QAAQ,GAChB,UAAU,GACV,WAAW,GACX,WAAW,GACX,UAAU,GACV,OAAO,CAAC;AAEZ,MAAM,MAAM,UAAU,GAAG,SAAS,GAAG,QAAQ,GAAG,SAAS,GAAG,SAAS,CAAC;AACtE,MAAM,MAAM,aAAa,GAAG,SAAS,GAAG,QAAQ,GAAG,SAAS,CAAC;AAE7D,8EAA8E;AAC9E,MAAM,WAAW,WAAW;IAC1B,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,QAAQ,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,uDAAuD;IACvD,CAAC,CAAC,EAAE,MAAM,CAAC;IACX,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EA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