@compilr-dev/sdk 0.9.28 → 0.9.30

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.
Files changed (2) hide show
  1. package/dist/config.d.ts +8 -5
  2. package/package.json +1 -1
package/dist/config.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * SDK configuration types
3
3
  */
4
- import type { LLMProvider, Message, Tool, ToolPermission, HooksConfig, AnchorInput, AgentEvent, ToolExecutionResult, DelegationConfig, ObservationMaskConfig, WindowingConfig } from '@compilr-dev/agents';
4
+ import type { LLMProvider, Message, Tool, ToolPermission, HooksConfig, AnchorInput, AgentEvent, ToolExecutionResult, DelegationConfig, ObservationMaskConfig, WindowingConfig, ContentBlock } from '@compilr-dev/agents';
5
5
  import type { Preset } from './presets/types.js';
6
6
  import type { ToolProfile } from './team/tool-config.js';
7
7
  import type { ConditionalModule } from './capabilities/hook.js';
@@ -73,7 +73,10 @@ export interface ToolConfig {
73
73
  export type PermissionCallback = (request: {
74
74
  toolName: string;
75
75
  input: Record<string, unknown>;
76
- }) => Promise<boolean>;
76
+ }) => Promise<boolean | {
77
+ allowed: boolean;
78
+ reason?: string;
79
+ }>;
77
80
  /**
78
81
  * Guardrail configuration
79
82
  */
@@ -296,11 +299,11 @@ export interface CompilrAgentConfig {
296
299
  */
297
300
  export interface CompilrAgent {
298
301
  /** Run the agent with a message and return the result */
299
- run(message: string, options?: RunOptions): Promise<RunResult>;
302
+ run(message: string | ContentBlock[], options?: RunOptions): Promise<RunResult>;
300
303
  /** Stream agent events */
301
- stream(message: string, options?: RunOptions): AsyncIterable<AgentEvent>;
304
+ stream(message: string | ContentBlock[], options?: RunOptions): AsyncIterable<AgentEvent>;
302
305
  /** Multi-turn chat (alias for run, keeps history) */
303
- chat(message: string, options?: RunOptions): Promise<RunResult>;
306
+ chat(message: string | ContentBlock[], options?: RunOptions): Promise<RunResult>;
304
307
  /** Add a tool at runtime */
305
308
  addTool(tool: Tool): this;
306
309
  /** Add a pin (critical info that survives compaction) */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@compilr-dev/sdk",
3
- "version": "0.9.28",
3
+ "version": "0.9.30",
4
4
  "description": "Universal agent runtime for building AI-powered applications",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",