@noetic-tools/types 1.0.1 → 1.0.2

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.
@@ -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;
@@ -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,12 @@ 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;
59
65
  }
60
66
  /** @public Request shape when tools are provided — ctx is required for tool execution callbacks. */
61
67
  interface CallModelRequestWithTools extends CallModelRequestBase {
@@ -224,6 +230,8 @@ export interface AgentHarnessContract<TParams extends Record<string, unknown> =
224
230
  checkpoint(ctx: Context): Promise<void>;
225
231
  restore(executionId: string): Promise<Context | null>;
226
232
  cancel(ctx: Context, reason?: string): Promise<void>;
233
+ /** Trace exporter spans are flushed to. Defaults to a no-op exporter. */
234
+ readonly traceExporter: TraceExporter;
227
235
  createSpan(name: string, parent: Span | null): Span;
228
236
  getLayerState<T>(executionId: string, layerId: string): T | undefined;
229
237
  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.1",
3
+ "version": "1.0.2",
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",