@poncho-ai/sdk 1.8.0 → 1.8.1

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.
@@ -1,14 +1,14 @@
1
1
 
2
- > @poncho-ai/sdk@1.7.1 build /Users/cesar/Dev/latitude/poncho-ai/packages/sdk
2
+ > @poncho-ai/sdk@1.8.1 build /home/runner/work/poncho-ai/poncho-ai/packages/sdk
3
3
  > tsup src/index.ts --format esm --dts
4
4
 
5
- CLI Building entry: src/index.ts
6
- CLI Using tsconfig: tsconfig.json
7
- CLI tsup v8.5.1
8
- CLI Target: es2022
9
- ESM Build start
10
- ESM dist/index.js 12.46 KB
11
- ESM ⚡️ Build success in 21ms
12
- DTS Build start
13
- DTS ⚡️ Build success in 1577ms
14
- DTS dist/index.d.ts 24.03 KB
5
+ CLI Building entry: src/index.ts
6
+ CLI Using tsconfig: tsconfig.json
7
+ CLI tsup v8.5.1
8
+ CLI Target: es2022
9
+ ESM Build start
10
+ ESM dist/index.js 12.46 KB
11
+ ESM ⚡️ Build success in 16ms
12
+ DTS Build start
13
+ DTS ⚡️ Build success in 1193ms
14
+ DTS dist/index.d.ts 24.92 KB
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @poncho-ai/sdk
2
2
 
3
+ ## 1.8.1
4
+
5
+ ### Patch Changes
6
+
7
+ - Add VfsAccess interface and expand ToolContext with optional `vfs` field for tenant-scoped virtual filesystem access in tool handlers.
8
+
3
9
  ## 1.8.0
4
10
 
5
11
  ### Minor Changes
package/dist/index.d.ts CHANGED
@@ -570,6 +570,27 @@ interface Message {
570
570
  }
571
571
  /** Extract the text content from a message, regardless of content format. */
572
572
  declare const getTextContent: (message: Message) => string;
573
+ /** Virtual filesystem scoped to the current tenant. Available when VFS is enabled. */
574
+ interface VfsAccess {
575
+ readFile(path: string): Promise<Uint8Array>;
576
+ readText(path: string): Promise<string>;
577
+ writeFile(path: string, content: Uint8Array, mimeType?: string): Promise<void>;
578
+ writeText(path: string, content: string): Promise<void>;
579
+ exists(path: string): Promise<boolean>;
580
+ stat(path: string): Promise<{
581
+ size: number;
582
+ isDirectory: boolean;
583
+ mimeType?: string;
584
+ updatedAt: number;
585
+ }>;
586
+ readdir(path: string): Promise<string[]>;
587
+ mkdir(path: string, options?: {
588
+ recursive?: boolean;
589
+ }): Promise<void>;
590
+ rm(path: string, options?: {
591
+ recursive?: boolean;
592
+ }): Promise<void>;
593
+ }
573
594
  interface ToolContext {
574
595
  runId: string;
575
596
  agentId: string;
@@ -580,6 +601,8 @@ interface ToolContext {
580
601
  conversationId?: string;
581
602
  /** The tenant ID when running in multi-tenant mode. */
582
603
  tenantId?: string;
604
+ /** Virtual filesystem scoped to the current tenant. Available when VFS is enabled. */
605
+ vfs?: VfsAccess;
583
606
  }
584
607
  type ToolHandler<TInput extends Record<string, unknown>, TOutput> = (input: TInput, context: ToolContext) => Promise<TOutput> | TOutput;
585
608
  interface ToolDefinition<TInput extends Record<string, unknown> = Record<string, unknown>, TOutput = unknown> {
@@ -685,6 +708,7 @@ type AgentEvent = {
685
708
  } | {
686
709
  type: "tool:completed";
687
710
  tool: string;
711
+ input?: unknown;
688
712
  output: unknown;
689
713
  duration: number;
690
714
  outputTokenEstimate?: number;
@@ -771,4 +795,4 @@ type AgentEvent = {
771
795
  reason: string;
772
796
  };
773
797
 
774
- export { type AgentEvent, type AgentFailure, type ContentPart, FEATURE_DOMAIN_ORDER, type FeatureDomain, type FileContentPart, type FileInput, type JsonSchema, type Message, ONBOARDING_FIELDS, type OnboardingField, type OnboardingFieldCondition, type OnboardingFieldKind, type OnboardingFieldTarget, type OnboardingOption, type OnboardingScope, type Role, type RunInput, type RunResult, type TextContentPart, type TokenUsage, type ToolContext, type ToolDefinition, type ToolHandler, defineTool, fieldsForScope, getTextContent };
798
+ export { type AgentEvent, type AgentFailure, type ContentPart, FEATURE_DOMAIN_ORDER, type FeatureDomain, type FileContentPart, type FileInput, type JsonSchema, type Message, ONBOARDING_FIELDS, type OnboardingField, type OnboardingFieldCondition, type OnboardingFieldKind, type OnboardingFieldTarget, type OnboardingOption, type OnboardingScope, type Role, type RunInput, type RunResult, type TextContentPart, type TokenUsage, type ToolContext, type ToolDefinition, type ToolHandler, type VfsAccess, defineTool, fieldsForScope, getTextContent };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@poncho-ai/sdk",
3
- "version": "1.8.0",
3
+ "version": "1.8.1",
4
4
  "description": "Core types and utilities for building Poncho skills",
5
5
  "repository": {
6
6
  "type": "git",
package/src/index.ts CHANGED
@@ -50,6 +50,24 @@ export const getTextContent = (message: Message): string => {
50
50
  .join("");
51
51
  };
52
52
 
53
+ /** Virtual filesystem scoped to the current tenant. Available when VFS is enabled. */
54
+ export interface VfsAccess {
55
+ readFile(path: string): Promise<Uint8Array>;
56
+ readText(path: string): Promise<string>;
57
+ writeFile(path: string, content: Uint8Array, mimeType?: string): Promise<void>;
58
+ writeText(path: string, content: string): Promise<void>;
59
+ exists(path: string): Promise<boolean>;
60
+ stat(path: string): Promise<{
61
+ size: number;
62
+ isDirectory: boolean;
63
+ mimeType?: string;
64
+ updatedAt: number;
65
+ }>;
66
+ readdir(path: string): Promise<string[]>;
67
+ mkdir(path: string, options?: { recursive?: boolean }): Promise<void>;
68
+ rm(path: string, options?: { recursive?: boolean }): Promise<void>;
69
+ }
70
+
53
71
  export interface ToolContext {
54
72
  runId: string;
55
73
  agentId: string;
@@ -60,6 +78,8 @@ export interface ToolContext {
60
78
  conversationId?: string;
61
79
  /** The tenant ID when running in multi-tenant mode. */
62
80
  tenantId?: string;
81
+ /** Virtual filesystem scoped to the current tenant. Available when VFS is enabled. */
82
+ vfs?: VfsAccess;
63
83
  }
64
84
 
65
85
  export type ToolHandler<TInput extends Record<string, unknown>, TOutput> = (
@@ -154,7 +174,7 @@ export type AgentEvent =
154
174
  | { type: "model:response"; usage: TokenUsage }
155
175
  | { type: "tool:generating"; tool: string; toolCallId: string }
156
176
  | { type: "tool:started"; tool: string; input: unknown }
157
- | { type: "tool:completed"; tool: string; output: unknown; duration: number; outputTokenEstimate?: number }
177
+ | { type: "tool:completed"; tool: string; input?: unknown; output: unknown; duration: number; outputTokenEstimate?: number }
158
178
  | { type: "tool:error"; tool: string; error: string; recoverable: boolean }
159
179
  | {
160
180
  type: "tool:approval:required";
@@ -1,6 +0,0 @@
1
-
2
- > @poncho-ai/sdk@0.6.0 lint /Users/cesar/Dev/latitude/poncho-ai/packages/sdk
3
- > eslint src/
4
-
5
- sh: eslint: command not found
6
-  ELIFECYCLE  Command failed.
File without changes