@runtypelabs/cloudflare-agents 0.1.8 → 0.1.9
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/durable-object.cjs
CHANGED
|
@@ -2,7 +2,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
|
2
2
|
const require_identity = require("./chunk-C3x60FnC.cjs");
|
|
3
3
|
let cloudflare_workers = require("cloudflare:workers");
|
|
4
4
|
// package.json
|
|
5
|
-
var version = "0.1.
|
|
5
|
+
var version = "0.1.9";
|
|
6
6
|
// src/otlp.ts
|
|
7
7
|
function otlpValue(value) {
|
|
8
8
|
if (typeof value === "string") return { stringValue: value };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as AdapterToolStartedObservation,
|
|
1
|
+
import { a as AdapterToolStartedObservation, l as RunIdentity, n as AdapterModelStepObservation, r as AdapterObservation, t as AdapterModelInputObservation } from "./observer-CECV5VJd.cjs";
|
|
2
2
|
import { DurableObject } from "cloudflare:workers";
|
|
3
3
|
interface AdapterSpan {
|
|
4
4
|
traceId: string;
|
package/dist/durable-object.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { n as operationSpanId, t as createRunIdentity } from "./chunk-CRTW4njP.mjs";
|
|
2
2
|
import { DurableObject } from "cloudflare:workers";
|
|
3
3
|
// package.json
|
|
4
|
-
var version = "0.1.
|
|
4
|
+
var version = "0.1.9";
|
|
5
5
|
// src/otlp.ts
|
|
6
6
|
function otlpValue(value) {
|
|
7
7
|
if (typeof value === "string") return { stringValue: value };
|
package/dist/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as
|
|
1
|
+
import { _ as captureContent, c as observeStreamTextOptions, d as createRunIdentity, f as operationSpanId, g as ContentPolicy, h as ContentKind, i as AdapterObserver, l as RunIdentity, m as ContentDiagnostic, o as AdapterTurn, p as CapturedJson, r as AdapterObservation, s as ObserveStreamTextOptions, u as SubmissionIdentity } from "./observer-CECV5VJd.cjs";
|
|
2
2
|
interface DurableObservationSink {
|
|
3
3
|
observe(observation: AdapterObservation): Promise<{
|
|
4
4
|
accepted: boolean;
|
|
@@ -1,17 +1,4 @@
|
|
|
1
1
|
import { streamText } from "ai";
|
|
2
|
-
interface SubmissionIdentity {
|
|
3
|
-
agentId: string;
|
|
4
|
-
submissionId: string;
|
|
5
|
-
conversationId: string;
|
|
6
|
-
}
|
|
7
|
-
interface RunIdentity extends SubmissionIdentity {
|
|
8
|
-
traceId: string;
|
|
9
|
-
rootSpanId: string;
|
|
10
|
-
}
|
|
11
|
-
/** Stable producer identity, independent of native traces and export partitioning. */
|
|
12
|
-
declare function createRunIdentity(input: SubmissionIdentity): Promise<RunIdentity>;
|
|
13
|
-
/** The same operation is encoded with the same span ID on every delivery attempt. */
|
|
14
|
-
declare function operationSpanId(traceId: string, operationId: string): Promise<string>;
|
|
15
2
|
type ContentKind = 'messages' | 'instructions' | 'tools' | 'error';
|
|
16
3
|
type CapturedJson = null | boolean | number | string | CapturedJson[] | {
|
|
17
4
|
[key: string]: CapturedJson;
|
|
@@ -31,6 +18,19 @@ interface ContentPolicy {
|
|
|
31
18
|
}
|
|
32
19
|
/** Applies privacy policy before a content value can enter telemetry storage. */
|
|
33
20
|
declare function captureContent(policy: ContentPolicy, kind: ContentKind, value: unknown): CapturedJson | undefined;
|
|
21
|
+
interface SubmissionIdentity {
|
|
22
|
+
agentId: string;
|
|
23
|
+
submissionId: string;
|
|
24
|
+
conversationId: string;
|
|
25
|
+
}
|
|
26
|
+
interface RunIdentity extends SubmissionIdentity {
|
|
27
|
+
traceId: string;
|
|
28
|
+
rootSpanId: string;
|
|
29
|
+
}
|
|
30
|
+
/** Stable producer identity, independent of native traces and export partitioning. */
|
|
31
|
+
declare function createRunIdentity(input: SubmissionIdentity): Promise<RunIdentity>;
|
|
32
|
+
/** The same operation is encoded with the same span ID on every delivery attempt. */
|
|
33
|
+
declare function operationSpanId(traceId: string, operationId: string): Promise<string>;
|
|
34
34
|
interface AdapterTurn {
|
|
35
35
|
submissionId: string;
|
|
36
36
|
conversationId: string;
|
|
@@ -111,5 +111,5 @@ interface ObserveStreamTextOptions {
|
|
|
111
111
|
}
|
|
112
112
|
/** Adds bounded observation callbacks without reading or replacing the response stream. */
|
|
113
113
|
declare function observeStreamTextOptions<Options extends StreamTextOptions>(options: Options, observation: ObserveStreamTextOptions): Promise<Options>;
|
|
114
|
-
export {
|
|
114
|
+
export { captureContent as _, AdapterToolStartedObservation as a, observeStreamTextOptions as c, createRunIdentity as d, operationSpanId as f, ContentPolicy as g, ContentKind as h, AdapterObserver as i, RunIdentity as l, ContentDiagnostic as m, AdapterModelStepObservation as n, AdapterTurn as o, CapturedJson as p, AdapterObservation as r, ObserveStreamTextOptions as s, AdapterModelInputObservation as t, SubmissionIdentity as u };
|
|
115
115
|
export {}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@runtypelabs/cloudflare-agents",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.9",
|
|
4
4
|
"description": "Durable application telemetry for Cloudflare Agents SDK runs in Runtype.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -30,9 +30,9 @@
|
|
|
30
30
|
"devDependencies": {
|
|
31
31
|
"@cloudflare/workers-types": "^5.20261101.1",
|
|
32
32
|
"ai": "6.0.277",
|
|
33
|
-
"tsdown": "^0.23.
|
|
33
|
+
"tsdown": "^0.23.7",
|
|
34
34
|
"typescript": "^6.0.3",
|
|
35
|
-
"vitest": "^5.0
|
|
35
|
+
"vitest": "^5.1.0"
|
|
36
36
|
},
|
|
37
37
|
"peerDependencies": {
|
|
38
38
|
"ai": "6.0.277"
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"scripts": {
|
|
51
51
|
"build": "tsdown",
|
|
52
52
|
"typecheck": "tsrs --noEmit && tsrs -p tsconfig.tests.json --noEmit",
|
|
53
|
-
"test": "vitest run",
|
|
53
|
+
"test": "vitest run --passWithNoTests",
|
|
54
54
|
"lint": "oxlint . --max-warnings 0"
|
|
55
55
|
}
|
|
56
56
|
}
|