@noetic-tools/types 1.0.1 → 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.
- package/dist/types/context.d.ts +3 -1
- package/dist/types/runtime.d.ts +16 -1
- package/package.json +1 -1
package/dist/types/context.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ import type { FsAdapter } from './fs-adapter.js';
|
|
|
9
9
|
import type { HarnessResponse, StreamEvent, StreamingItem } from './harness-result.js';
|
|
10
10
|
import type { ExecuteInput } from './items.js';
|
|
11
11
|
import type { ContextMemory, MemoryLayer, ProjectionPolicy, StorageAdapter } from './memory.js';
|
|
12
|
-
import type { Span } from './observability.js';
|
|
12
|
+
import type { Span, TraceExporter } from './observability.js';
|
|
13
13
|
import type { ShellAdapter } from './shell-adapter.js';
|
|
14
14
|
import type { SteeringDecision } from './steering.js';
|
|
15
15
|
import type { SubprocessAdapter } from './subprocess-adapter.js';
|
|
@@ -152,6 +152,8 @@ export interface ContextHarness {
|
|
|
152
152
|
checkpoint(ctx: Context): Promise<void>;
|
|
153
153
|
restore(executionId: string): Promise<Context | null>;
|
|
154
154
|
cancel(ctx: Context, reason?: string): Promise<void>;
|
|
155
|
+
/** Trace exporter spans are flushed to. Defaults to a no-op exporter. */
|
|
156
|
+
readonly traceExporter: TraceExporter;
|
|
155
157
|
createSpan(name: string, parent: Span | null): Span;
|
|
156
158
|
abort(scope?: unknown): Promise<void>;
|
|
157
159
|
getStatus(scope?: unknown): ContextHarnessStatus;
|
package/dist/types/runtime.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ import type { FsAdapter } from './fs-adapter.js';
|
|
|
7
7
|
import type { HarnessResponse, StreamEvent, StreamingItem } from './harness-result.js';
|
|
8
8
|
import type { ExecuteInput, Item, ItemSchemaExtensions } from './items.js';
|
|
9
9
|
import type { ContextMemory, MemoryLayer, ProjectionPolicy, StorageAdapter } from './memory.js';
|
|
10
|
-
import type { Span } from './observability.js';
|
|
10
|
+
import type { Span, TraceExporter } from './observability.js';
|
|
11
11
|
import type { ShellAdapter } from './shell-adapter.js';
|
|
12
12
|
import type { SteeringDecision } from './steering.js';
|
|
13
13
|
import type { Step } from './step.js';
|
|
@@ -56,6 +56,19 @@ interface CallModelRequestBase {
|
|
|
56
56
|
emit?: boolean | ((eventType: string, data: Record<string, unknown>) => boolean);
|
|
57
57
|
/** Optional signal for cancelling the in-flight call (used by session abort). */
|
|
58
58
|
signal?: AbortSignal;
|
|
59
|
+
/**
|
|
60
|
+
* @internal Parent span for the model-call spans this request produces. When
|
|
61
|
+
* omitted, the caller falls back to `ctx.span`. Set by `parseAndRunWorkflow`
|
|
62
|
+
* so model/tool spans nest under the root `workflow.run` span.
|
|
63
|
+
*/
|
|
64
|
+
parentSpan?: Span;
|
|
65
|
+
/**
|
|
66
|
+
* @internal Id of the workflow node driving this call. Set by
|
|
67
|
+
* `parseAndRunWorkflow` (from the executing step's id) so the `llm.call` and
|
|
68
|
+
* `tool.call` spans this request produces carry `NoeticAttr.NODE_ID`, linking
|
|
69
|
+
* each span back to its node in the declared DAG.
|
|
70
|
+
*/
|
|
71
|
+
nodeId?: string;
|
|
59
72
|
}
|
|
60
73
|
/** @public Request shape when tools are provided — ctx is required for tool execution callbacks. */
|
|
61
74
|
interface CallModelRequestWithTools extends CallModelRequestBase {
|
|
@@ -224,6 +237,8 @@ export interface AgentHarnessContract<TParams extends Record<string, unknown> =
|
|
|
224
237
|
checkpoint(ctx: Context): Promise<void>;
|
|
225
238
|
restore(executionId: string): Promise<Context | null>;
|
|
226
239
|
cancel(ctx: Context, reason?: string): Promise<void>;
|
|
240
|
+
/** Trace exporter spans are flushed to. Defaults to a no-op exporter. */
|
|
241
|
+
readonly traceExporter: TraceExporter;
|
|
227
242
|
createSpan(name: string, parent: Span | null): Span;
|
|
228
243
|
getLayerState<T>(executionId: string, layerId: string): T | undefined;
|
|
229
244
|
setLayerState<T>(executionId: string, layerId: string, state: T): void;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@noetic-tools/types",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Foundational type contracts and primitives shared across the Noetic framework (items, LLM config, adapters, steering, errors).",
|
|
6
6
|
"license": "Apache-2.0",
|