norns-sdk 0.3.0 → 0.4.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.d.cts CHANGED
@@ -480,6 +480,7 @@ interface ToolDefinition<I = unknown> {
480
480
  */
481
481
  declare function tool<S extends ToolInputSchema>(options: ToolOptions<S>): ToolDefinition<InferToolInput<S>>;
482
482
 
483
+ /** @deprecated Norns never read it; a conversation starts from a `conversationKey` on the message. */
483
484
  type AgentMode = "task" | "conversation";
484
485
  type CheckpointPolicy = "every_step" | "on_tool_call" | "manual";
485
486
  type ContextStrategy = "sliding_window" | "none";
@@ -510,6 +511,7 @@ interface AgentOptions {
510
511
  systemPrompt?: string;
511
512
  /** What this worker serves for the agent (see `allowedTools` for what it is offered). */
512
513
  tools?: ToolDefinition[];
514
+ /** @deprecated Ignored. Norns never read it; send a message with a `conversationKey` instead. */
513
515
  mode?: AgentMode;
514
516
  checkpointPolicy?: CheckpointPolicy;
515
517
  contextStrategy?: ContextStrategy;
@@ -540,7 +542,6 @@ interface AgentDefinition {
540
542
  readonly model: string;
541
543
  readonly systemPrompt: string;
542
544
  readonly tools: readonly ToolDefinition[];
543
- readonly mode: AgentMode;
544
545
  readonly checkpointPolicy: CheckpointPolicy;
545
546
  readonly contextStrategy: ContextStrategy;
546
547
  readonly contextWindow: number;
package/dist/index.d.ts CHANGED
@@ -480,6 +480,7 @@ interface ToolDefinition<I = unknown> {
480
480
  */
481
481
  declare function tool<S extends ToolInputSchema>(options: ToolOptions<S>): ToolDefinition<InferToolInput<S>>;
482
482
 
483
+ /** @deprecated Norns never read it; a conversation starts from a `conversationKey` on the message. */
483
484
  type AgentMode = "task" | "conversation";
484
485
  type CheckpointPolicy = "every_step" | "on_tool_call" | "manual";
485
486
  type ContextStrategy = "sliding_window" | "none";
@@ -510,6 +511,7 @@ interface AgentOptions {
510
511
  systemPrompt?: string;
511
512
  /** What this worker serves for the agent (see `allowedTools` for what it is offered). */
512
513
  tools?: ToolDefinition[];
514
+ /** @deprecated Ignored. Norns never read it; send a message with a `conversationKey` instead. */
513
515
  mode?: AgentMode;
514
516
  checkpointPolicy?: CheckpointPolicy;
515
517
  contextStrategy?: ContextStrategy;
@@ -540,7 +542,6 @@ interface AgentDefinition {
540
542
  readonly model: string;
541
543
  readonly systemPrompt: string;
542
544
  readonly tools: readonly ToolDefinition[];
543
- readonly mode: AgentMode;
544
545
  readonly checkpointPolicy: CheckpointPolicy;
545
546
  readonly contextStrategy: ContextStrategy;
546
547
  readonly contextWindow: number;
package/dist/index.js CHANGED
@@ -34,7 +34,6 @@ function defineAgent(options) {
34
34
  model: options.model ?? DEFAULT_MODEL,
35
35
  systemPrompt: options.systemPrompt ?? "",
36
36
  tools: Object.freeze([...tools]),
37
- mode: options.mode ?? "task",
38
37
  checkpointPolicy: options.checkpointPolicy ?? "on_tool_call",
39
38
  contextStrategy: options.contextStrategy ?? "sliding_window",
40
39
  contextWindow: options.contextWindow ?? 20,
@@ -49,7 +48,6 @@ function defineAgent(options) {
49
48
  }
50
49
  function agentBody(agent) {
51
50
  const modelConfig = {
52
- mode: agent.mode,
53
51
  checkpoint_policy: agent.checkpointPolicy,
54
52
  context_strategy: agent.contextStrategy,
55
53
  context_window: agent.contextWindow,