@runtypelabs/sdk 11.10.0 → 11.11.0
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/index.cjs +64 -2
- package/dist/index.d.cts +1348 -142
- package/dist/index.d.ts +1348 -142
- package/dist/index.mjs +64 -2
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -8781,6 +8781,28 @@ var LogsEndpoint = class {
|
|
|
8781
8781
|
async traceConversation(conversationId) {
|
|
8782
8782
|
return this.client.get(`/logs/trace/conversation/${conversationId}`);
|
|
8783
8783
|
}
|
|
8784
|
+
/**
|
|
8785
|
+
* Filter runs and group them by one or two dimensions into aggregates (count, failure rate,
|
|
8786
|
+
* tokens, cost, duration, tool calls, signal fire rate), each with sample execution ids.
|
|
8787
|
+
* Model and tool-call metrics read spans, which caps the window at 7 days.
|
|
8788
|
+
*/
|
|
8789
|
+
async queryTraces(request = {}) {
|
|
8790
|
+
return this.client.post("/logs/trace/query", request);
|
|
8791
|
+
}
|
|
8792
|
+
/**
|
|
8793
|
+
* Read a bounded window of one trace: by span index range, span kind, tool name, or around
|
|
8794
|
+
* the first failed span. Content stays previews-only unless `includeContent` is set.
|
|
8795
|
+
*/
|
|
8796
|
+
async readTraceSlice(executionId, params) {
|
|
8797
|
+
return this.client.get(`/logs/trace/execution/${encodeURIComponent(executionId)}/slice`, params ? { ...params } : void 0);
|
|
8798
|
+
}
|
|
8799
|
+
/**
|
|
8800
|
+
* Compare two executions (tool-call alignment and first divergence) or two cohorts of runs
|
|
8801
|
+
* (failure rate, stop reasons, tool usage, signal rates).
|
|
8802
|
+
*/
|
|
8803
|
+
async compareTrace(request) {
|
|
8804
|
+
return this.client.post("/logs/trace/compare", request);
|
|
8805
|
+
}
|
|
8784
8806
|
};
|
|
8785
8807
|
/**
|
|
8786
8808
|
* Agent Versions endpoint handlers
|
|
@@ -9677,8 +9699,48 @@ function normalizeConfigForHash(config) {
|
|
|
9677
9699
|
}
|
|
9678
9700
|
return normalized;
|
|
9679
9701
|
}
|
|
9702
|
+
const CONDITIONAL_STEP_LIST_KEYS = [
|
|
9703
|
+
"trueSteps",
|
|
9704
|
+
"falseSteps",
|
|
9705
|
+
"true_steps",
|
|
9706
|
+
"false_steps",
|
|
9707
|
+
"otherwiseSteps"
|
|
9708
|
+
];
|
|
9709
|
+
function withoutStepIds(steps) {
|
|
9710
|
+
return steps.map((child) => {
|
|
9711
|
+
if (!isPlainObject$1(child)) return child;
|
|
9712
|
+
const { id: _id, ...rest } = child;
|
|
9713
|
+
return stripNestedStepIdsForHash(rest);
|
|
9714
|
+
});
|
|
9715
|
+
}
|
|
9716
|
+
/** Mirrors shared `stripNestedStepIds`: nested step ids are server-minted, so they are not content. */
|
|
9717
|
+
function stripNestedStepIdsForHash(step) {
|
|
9718
|
+
const config = step.config;
|
|
9719
|
+
if (!isPlainObject$1(config)) return step;
|
|
9720
|
+
if (step.type === "loop") return Array.isArray(config.steps) ? {
|
|
9721
|
+
...step,
|
|
9722
|
+
config: {
|
|
9723
|
+
...config,
|
|
9724
|
+
steps: withoutStepIds(config.steps)
|
|
9725
|
+
}
|
|
9726
|
+
} : step;
|
|
9727
|
+
if (step.type !== "conditional") return step;
|
|
9728
|
+
const next = { ...config };
|
|
9729
|
+
for (const key of CONDITIONAL_STEP_LIST_KEYS) {
|
|
9730
|
+
const list = config[key];
|
|
9731
|
+
if (Array.isArray(list)) next[key] = withoutStepIds(list);
|
|
9732
|
+
}
|
|
9733
|
+
if (Array.isArray(config.branches)) next.branches = config.branches.map((branch) => isPlainObject$1(branch) && Array.isArray(branch.steps) ? {
|
|
9734
|
+
...branch,
|
|
9735
|
+
steps: withoutStepIds(branch.steps)
|
|
9736
|
+
} : branch);
|
|
9737
|
+
return {
|
|
9738
|
+
...step,
|
|
9739
|
+
config: next
|
|
9740
|
+
};
|
|
9741
|
+
}
|
|
9680
9742
|
function normalizeStepForHash(step) {
|
|
9681
|
-
const stepObj = isPlainObject$1(step) ? step : {};
|
|
9743
|
+
const stepObj = isPlainObject$1(step) ? stripNestedStepIdsForHash(step) : {};
|
|
9682
9744
|
return {
|
|
9683
9745
|
type: typeof stepObj.type === "string" ? stepObj.type : "",
|
|
9684
9746
|
name: typeof stepObj.name === "string" ? stepObj.name : "",
|
|
@@ -14653,7 +14715,7 @@ function transformQueryParams(params) {
|
|
|
14653
14715
|
return result;
|
|
14654
14716
|
}
|
|
14655
14717
|
// src/version.ts
|
|
14656
|
-
const SDK_VERSION = "11.
|
|
14718
|
+
const SDK_VERSION = "11.11.0";
|
|
14657
14719
|
/**
|
|
14658
14720
|
* Canonical client identity the API uses for attribution
|
|
14659
14721
|
* (`detectActorSource` in apps/api/src/lib/audit-log.ts keys `'sdk'` off the
|