@outputai/core 0.15.1-dev.096a11c.0 → 0.15.1-dev.de5fa8c.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/credentials/index.d.ts +1 -1
- package/dist/credentials/types.d.ts +4 -4
- package/dist/evals/aggregate.d.ts +2 -0
- package/dist/evals/aggregate.js +11 -0
- package/dist/evals/eval_workflow.d.ts +20 -0
- package/dist/evals/eval_workflow.js +98 -0
- package/dist/evals/index.d.ts +7 -0
- package/dist/evals/index.js +4 -0
- package/dist/evals/interpret.d.ts +3 -0
- package/dist/evals/interpret.js +40 -0
- package/dist/evals/schemas.d.ts +96 -0
- package/dist/evals/schemas.js +60 -0
- package/dist/evals/verdict.d.ts +27 -0
- package/dist/evals/verdict.js +109 -0
- package/dist/evals/verify.d.ts +42 -0
- package/dist/evals/verify.js +19 -0
- package/package.json +64 -14
- package/src/consts.d.ts +2 -0
- package/src/helpers/fetch.js +21 -9
- package/src/helpers/path.js +34 -0
- package/src/helpers/redact.js +2 -1
- package/src/http/config.js +10 -0
- package/src/http/cost.d.ts +20 -0
- package/src/http/cost.js +41 -0
- package/src/http/fetch/events.js +10 -0
- package/src/http/fetch/index.d.ts +24 -0
- package/src/http/fetch/index.js +78 -0
- package/src/http/fetch/logger.d.ts +10 -0
- package/src/http/fetch/logger.js +56 -0
- package/src/http/index.d.ts +28 -0
- package/src/http/index.js +9 -0
- package/src/http/ky/index.d.ts +25 -0
- package/src/http/ky/index.js +10 -0
- package/src/http/request_tag.js +30 -0
- package/src/interface/index.d.ts +1 -0
- package/src/llm/agent.js +147 -0
- package/src/llm/ai_provider.js +131 -0
- package/src/llm/ai_sdk_options.js +126 -0
- package/src/llm/consts.js +6 -0
- package/src/llm/deprecated_provider_aliases.js +8 -0
- package/src/llm/generate.js +98 -0
- package/src/llm/index.d.ts +697 -0
- package/src/llm/index.js +6 -0
- package/src/llm/judge.js +48 -0
- package/src/llm/prompt/content.js +70 -0
- package/src/llm/prompt/interpolations.js +58 -0
- package/src/llm/prompt/loader.js +67 -0
- package/src/llm/prompt/markup/attributes.js +52 -0
- package/src/llm/prompt/markup/nodes.js +71 -0
- package/src/llm/prompt/markup/tokenizer.js +3 -0
- package/src/llm/prompt/markup/tokens.js +26 -0
- package/src/llm/prompt/validations.js +129 -0
- package/src/llm/utils/cost.js +267 -0
- package/src/llm/utils/error_handler.js +53 -0
- package/src/llm/utils/file.js +42 -0
- package/src/llm/utils/google_vertex_auth.js +31 -0
- package/src/llm/utils/image.js +37 -0
- package/src/llm/utils/legacy_cost_attribute.js +75 -0
- package/src/llm/utils/metering.js +139 -0
- package/src/llm/utils/models.js +15 -0
- package/src/llm/utils/models_pricing.js +96 -0
- package/src/llm/utils/models_pricing_snapshot.json +4711 -0
- package/src/llm/utils/skills.js +74 -0
- package/src/llm/utils/sources.js +73 -0
- package/src/llm/utils/stream.js +75 -0
- package/src/llm/utils/tools.js +62 -0
- package/src/llm/utils/usage.js +155 -0
- package/src/llm/utils/usage_tools.js +23 -0
- package/src/llm/utils/web_search.js +155 -0
- package/src/llm/utils/wrap.js +279 -0
- package/src/llm/validations.js +234 -0
- package/src/tracing/trace_attribute.d.ts +0 -17
- package/src/tracing/trace_attribute.js +1 -29
- package/src/worker/bundler_options.js +1 -9
- package/src/worker/configs.js +23 -4
- package/src/worker/index.js +16 -47
- package/src/worker/interceptors/activity.js +0 -1
- package/src/worker/interceptors/workflow.js +0 -1
- package/src/worker/loader/workflows.js +16 -2
- package/src/worker/telemetry.js +122 -2
- package/src/worker/webpack_loaders/workflow_rewriter/index.mjs +3 -7
- package/src/worker/webpack_loaders/workflow_rewriter/rewrite_activity_calls.js +27 -7
- package/src/worker/webpack_loaders/workflow_validator/npm_workflow_export_resolve.js +5 -6
- package/src/worker/worker_options.js +43 -0
- package/src/sdk/README.md +0 -47
- package/src/sdk/helpers/component_metadata.d.ts +0 -17
- package/src/sdk/helpers/component_metadata.js +0 -6
- package/src/sdk/helpers/index.d.ts +0 -12
- package/src/sdk/helpers/index.js +0 -3
- package/src/sdk/helpers/objects.d.ts +0 -56
- package/src/sdk/helpers/objects.js +0 -8
- package/src/sdk/helpers/path.d.ts +0 -11
- package/src/sdk/helpers/path.js +0 -32
- package/src/sdk/runtime/context.d.ts +0 -30
- package/src/sdk/runtime/context.js +0 -15
- package/src/sdk/runtime/events.d.ts +0 -13
- package/src/sdk/runtime/events.js +0 -5
- package/src/sdk/runtime/index.d.ts +0 -12
- package/src/sdk/runtime/index.js +0 -3
- package/src/sdk/runtime/tracing.d.ts +0 -48
- package/src/sdk/runtime/tracing.js +0 -11
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import type { Info } from '@temporalio/activity';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Context object
|
|
5
|
-
*/
|
|
6
|
-
export type Context = {
|
|
7
|
-
/** Temporal info about the current activity */
|
|
8
|
-
activityInfo: Info,
|
|
9
|
-
/** Path of the workflow file */
|
|
10
|
-
workflowFilename: string
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* Tools to interact with Runtime context
|
|
15
|
-
*/
|
|
16
|
-
export declare const Context: {
|
|
17
|
-
|
|
18
|
-
/**
|
|
19
|
-
* Returns information about the current Temporal execution.
|
|
20
|
-
*
|
|
21
|
-
* Only available when called from within a step or evaluator (Temporal Activities) running in the Temporal runtime.
|
|
22
|
-
*
|
|
23
|
-
* @remarks
|
|
24
|
-
* - Returns `null` when not called inside a Temporal Activity (steps/evaluators);
|
|
25
|
-
* - Returns `null` when not called from within a running Temporal worker, like in unit tests environment;
|
|
26
|
-
*
|
|
27
|
-
* @returns The workflow context, or `null` if unavailable or incomplete.
|
|
28
|
-
*/
|
|
29
|
-
getActivityContext(): Context | null;
|
|
30
|
-
};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { Storage } from '#async_storage';
|
|
2
|
-
|
|
3
|
-
export const Context = {
|
|
4
|
-
getActivityContext: () => {
|
|
5
|
-
const ctx = Storage.load();
|
|
6
|
-
if ( !ctx ) {
|
|
7
|
-
return null;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
return {
|
|
11
|
-
workflowFilename: ctx.workflowFilename,
|
|
12
|
-
activityInfo: ctx.activityInfo
|
|
13
|
-
};
|
|
14
|
-
}
|
|
15
|
-
};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Tools to interact with Events
|
|
3
|
-
*/
|
|
4
|
-
export declare const Event: {
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* Emits an event on step message bus.
|
|
8
|
-
*
|
|
9
|
-
* @param eventName - The name of the event to emit
|
|
10
|
-
* @param payload - An optional payload to send to the event.
|
|
11
|
-
*/
|
|
12
|
-
emit( eventName: string, payload?: object ): boolean;
|
|
13
|
-
};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* > [!WARNING]
|
|
3
|
-
* > **Internal use only.** Not part of the public API; may change without notice.
|
|
4
|
-
*
|
|
5
|
-
* These are helpers for other SDK modules integration.
|
|
6
|
-
* These need Temporal activity runtime to work, as they access state, emit events and use node:* modules.
|
|
7
|
-
*
|
|
8
|
-
* @packageDocumentation
|
|
9
|
-
*/
|
|
10
|
-
export * from './context.js';
|
|
11
|
-
export * from './events.js';
|
|
12
|
-
export * from './tracing.js';
|
package/src/sdk/runtime/index.js
DELETED
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import { Attribute } from '#trace_attribute';
|
|
2
|
-
|
|
3
|
-
export type BaseAttribute = InstanceType<typeof Attribute.BaseAttribute>;
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* Tools to interact with Tracing
|
|
7
|
-
*/
|
|
8
|
-
export declare const Tracing: {
|
|
9
|
-
Attribute: typeof Attribute;
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* Creates a new event.
|
|
13
|
-
*
|
|
14
|
-
* @param args
|
|
15
|
-
* @param args.id - A unique id for the Event.
|
|
16
|
-
* @param args.kind - The kind of Event, like HTTP, DiskWrite, DBOp, etc.
|
|
17
|
-
* @param args.name - The human-friendly name of the Event: query, request, create.
|
|
18
|
-
* @param args.details - Arbitrary data to add to this event, it will be used as the "input" field.
|
|
19
|
-
*/
|
|
20
|
-
addEventStart( args: { id: string; kind: string; name: string; details: unknown } ): void;
|
|
21
|
-
|
|
22
|
-
/**
|
|
23
|
-
* Concludes an event.
|
|
24
|
-
*
|
|
25
|
-
* @param args
|
|
26
|
-
* @param args.id - The id of the event to conclude.
|
|
27
|
-
* @param args.details - Arbitrary data to add to this event, it will be used as the "output" field.
|
|
28
|
-
*/
|
|
29
|
-
addEventEnd( args: { id: string; details: unknown } ): void;
|
|
30
|
-
|
|
31
|
-
/**
|
|
32
|
-
* Concludes an event with an error.
|
|
33
|
-
*
|
|
34
|
-
* @param args
|
|
35
|
-
* @param args.id - The id of the event to conclude.
|
|
36
|
-
* @param args.details - Arbitrary data to add to this event, it will be used as the "error" field.
|
|
37
|
-
*/
|
|
38
|
-
addEventError( args: { id: string; details: unknown } ): void;
|
|
39
|
-
|
|
40
|
-
/**
|
|
41
|
-
* Adds an attribute to an event.
|
|
42
|
-
*
|
|
43
|
-
* @param args
|
|
44
|
-
* @param args.eventId - The id of the event to attach the attribute to.
|
|
45
|
-
* @param args.attribute - The attribute to attach to the event.
|
|
46
|
-
*/
|
|
47
|
-
addEventAttribute( args: { eventId: string; attribute: Attribute.Instance } ): void;
|
|
48
|
-
};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { addEventActionWithContext as send, EventAction } from '#tracing';
|
|
2
|
-
|
|
3
|
-
import { Attribute } from '#trace_attribute';
|
|
4
|
-
|
|
5
|
-
export const Tracing = {
|
|
6
|
-
Attribute,
|
|
7
|
-
addEventStart: ( { id, kind, name, details } ) => send( EventAction.START, { kind, name, details, id } ),
|
|
8
|
-
addEventEnd: ( { id, details } ) => send( EventAction.END, { id, details } ),
|
|
9
|
-
addEventError: ( { id, details } ) => send( EventAction.ERROR, { id, details } ),
|
|
10
|
-
addEventAttribute: ( { eventId, attribute } ) => send( EventAction.ADD_ATTR, { id: eventId, details: attribute } )
|
|
11
|
-
};
|