@finalai/agent-provider 0.12.0 → 0.13.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.
@@ -8,7 +8,6 @@ export * from "./client.mjs";
8
8
  export { createConfinedFileReader } from "./confined-files.mjs";
9
9
  export * from "./convenience.mjs";
10
10
  export * from "./mcp.mjs";
11
- export * from "./mcp-testing.mjs";
12
11
  export * from "./memory-sandbox.mjs";
13
12
  export { MAX_SANDBOX_SEED_BYTES, SANDBOX_SEED_MARKER, SANDBOX_SEED_PROTOCOL, materializeSandboxSeeds, sandboxPreparationInputs, sandboxSeedArtifact, sandboxSeedArtifactSchema, sandboxSeedFiles, sandboxSeedFilesForAttach, sandboxSeedFilesSchema, sandboxSeedIdentity, } from "./seeds.mjs";
14
13
  export * from "./server.mjs";
@@ -21,7 +21,6 @@ export * from "./client.mjs";
21
21
  import { createConfinedFileReader } from "./confined-files.mjs";
22
22
  export * from "./convenience.mjs";
23
23
  export * from "./mcp.mjs";
24
- export * from "./mcp-testing.mjs";
25
24
  export * from "./memory-sandbox.mjs";
26
25
  import {
27
26
  MAX_SANDBOX_SEED_BYTES,
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../src/sandbox/index.ts"],
4
- "sourcesContent": ["export {\n withSandboxExecutionGuard,\n SandboxExecutionOperation,\n type SandboxExecutionContextIface,\n type SandboxExecutionGuardOptionsIface,\n} from \"./execution-guard.mjs\";\nexport { withSandboxOverrides } from \"./overrides.mjs\";\nexport {\n createSandboxHandle,\n mapSandboxHandle,\n type CreateSandboxHandleOptionsIface,\n type SandboxExecutionPolicyIface,\n} from \"./handle.mjs\";\nexport { resolveSandboxToolPolicy } from \"./tool-policy.mjs\";\n\nexport {\n ProcessInspectionOperation,\n inspectedProcessSchema,\n processInspectionDetailSchema,\n processInspectionPageSchema,\n processInspectionRequestSchema,\n processInspectionResultSchema,\n type InspectedProcessIface,\n type ProcessInspectionDetailIface,\n type ProcessInspectionPageIface,\n type ProcessInspectionRequestIface,\n type ProcessInspectionResultIface,\n} from '@finalai/agent-protocol/process-inspection';\nexport { decodeSandboxText, encodeSandboxText } from \"./bytes.mjs\";\nexport * from \"./client.mjs\";\nexport { createConfinedFileReader } from \"./confined-files.mjs\";\nexport * from \"./convenience.mjs\";\nexport * from \"./mcp.mjs\";\nexport * from \"./mcp-testing.mjs\";\nexport * from \"./memory-sandbox.mjs\";\nexport {\n MAX_SANDBOX_SEED_BYTES,\n SANDBOX_SEED_MARKER,\n SANDBOX_SEED_PROTOCOL,\n materializeSandboxSeeds,\n sandboxPreparationInputs,\n sandboxSeedArtifact,\n sandboxSeedArtifactSchema,\n sandboxSeedFiles,\n sandboxSeedFilesForAttach,\n sandboxSeedFilesSchema,\n sandboxSeedIdentity,\n} from \"./seeds.mjs\";\nexport * from \"./server.mjs\";\nexport * from \"./testing.mjs\";\nexport * from \"./types.mjs\";\nexport * from \"./wire.mjs\";\nexport * from \"./grant.mjs\";\nexport * from \"./setup/index.mjs\";\nexport { mapSessionPath, withSessionWorkspaceRoot } from \"./workspace-root.mjs\";\nexport type { MapSessionPathArgsIface } from \"./workspace-root.mjs\";\n\nexport * from \"./snapshots.mjs\";\n\nexport {\n SandboxEditorOperation,\n sandboxEditorRequestSchema,\n sandboxEditorResultSchema,\n sandboxEditorSessionSchema,\n type SandboxEditorRequestIface,\n type SandboxEditorResultIface,\n type SandboxEditorSessionIface,\n} from \"./editor.mjs\";\n\nexport { createHttpMcpChannelEndpoint } from \"./mcp-channel.mjs\";\n"],
5
- "mappings": "AAAA;AAAA,EACE;AAAA,EACA;AAAA,OAGK;AACP,SAAS,4BAA4B;AACrC;AAAA,EACE;AAAA,EACA;AAAA,OAGK;AACP,SAAS,gCAAgC;AAEzC;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAMK;AACP,SAAS,mBAAmB,yBAAyB;AACrD,cAAc;AACd,SAAS,gCAAgC;AACzC,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,SAAS,gBAAgB,gCAAgC;AAGzD,cAAc;AAEd;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAIK;AAEP,SAAS,oCAAoC;",
4
+ "sourcesContent": ["export {\n withSandboxExecutionGuard,\n SandboxExecutionOperation,\n type SandboxExecutionContextIface,\n type SandboxExecutionGuardOptionsIface,\n} from \"./execution-guard.mjs\";\nexport { withSandboxOverrides } from \"./overrides.mjs\";\nexport {\n createSandboxHandle,\n mapSandboxHandle,\n type CreateSandboxHandleOptionsIface,\n type SandboxExecutionPolicyIface,\n} from \"./handle.mjs\";\nexport { resolveSandboxToolPolicy } from \"./tool-policy.mjs\";\n\nexport {\n ProcessInspectionOperation,\n inspectedProcessSchema,\n processInspectionDetailSchema,\n processInspectionPageSchema,\n processInspectionRequestSchema,\n processInspectionResultSchema,\n type InspectedProcessIface,\n type ProcessInspectionDetailIface,\n type ProcessInspectionPageIface,\n type ProcessInspectionRequestIface,\n type ProcessInspectionResultIface,\n} from '@finalai/agent-protocol/process-inspection';\nexport { decodeSandboxText, encodeSandboxText } from \"./bytes.mjs\";\nexport * from \"./client.mjs\";\nexport { createConfinedFileReader } from \"./confined-files.mjs\";\nexport * from \"./convenience.mjs\";\nexport * from \"./mcp.mjs\";\nexport * from \"./memory-sandbox.mjs\";\nexport {\n MAX_SANDBOX_SEED_BYTES,\n SANDBOX_SEED_MARKER,\n SANDBOX_SEED_PROTOCOL,\n materializeSandboxSeeds,\n sandboxPreparationInputs,\n sandboxSeedArtifact,\n sandboxSeedArtifactSchema,\n sandboxSeedFiles,\n sandboxSeedFilesForAttach,\n sandboxSeedFilesSchema,\n sandboxSeedIdentity,\n} from \"./seeds.mjs\";\nexport * from \"./server.mjs\";\nexport * from \"./testing.mjs\";\nexport * from \"./types.mjs\";\nexport * from \"./wire.mjs\";\nexport * from \"./grant.mjs\";\nexport * from \"./setup/index.mjs\";\nexport { mapSessionPath, withSessionWorkspaceRoot } from \"./workspace-root.mjs\";\nexport type { MapSessionPathArgsIface } from \"./workspace-root.mjs\";\n\nexport * from \"./snapshots.mjs\";\n\nexport {\n SandboxEditorOperation,\n sandboxEditorRequestSchema,\n sandboxEditorResultSchema,\n sandboxEditorSessionSchema,\n type SandboxEditorRequestIface,\n type SandboxEditorResultIface,\n type SandboxEditorSessionIface,\n} from \"./editor.mjs\";\n\nexport { createHttpMcpChannelEndpoint } from \"./mcp-channel.mjs\";\n"],
5
+ "mappings": "AAAA;AAAA,EACE;AAAA,EACA;AAAA,OAGK;AACP,SAAS,4BAA4B;AACrC;AAAA,EACE;AAAA,EACA;AAAA,OAGK;AACP,SAAS,gCAAgC;AAEzC;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAMK;AACP,SAAS,mBAAmB,yBAAyB;AACrD,cAAc;AACd,SAAS,gCAAgC;AACzC,cAAc;AACd,cAAc;AACd,cAAc;AACd;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,SAAS,gBAAgB,gCAAgC;AAGzD,cAAc;AAEd;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAIK;AAEP,SAAS,oCAAoC;",
6
6
  "names": []
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../src/sandbox/mcp-testing.ts"],
4
- "sourcesContent": ["import { InMemoryTransport, parseJSONRPCMessage } from '@modelcontextprotocol/client';\nimport { McpServer } from '@modelcontextprotocol/server';\nimport { jsonValueSchema, type JsonValue } from \"../json.mjs\";\nimport type { McpChannelEndpointIface, McpChannelIface } from \"./types.mjs\";\n\n// A sandbox-hosted MCP server as a channel endpoint backed by an in-process MCP\n// server, as a provider whose backend relays a pipe to the sandbox's server\n// would hand it over. For tests of hosts and providers.\n\nexport interface InProcessMcpChannelHooksIface {\n onConnect?: () => void;\n // Fails `receive` while it returns true (a broken pipe).\n failReceive?: () => boolean;\n}\n\nexport const createInProcessMcpChannelEndpoint = (args: {\n name: string;\n register: (server: McpServer) => void;\n hooks?: InProcessMcpChannelHooksIface;\n}): McpChannelEndpointIface => ({\n name: args.name,\n connect: async (): Promise<McpChannelIface> => {\n args.hooks?.onConnect?.();\n const server = new McpServer({ name: args.name, version: '1' });\n args.register(server);\n const [ours, theirs] = InMemoryTransport.createLinkedPair();\n await server.connect(theirs);\n const inbox: JsonValue[] = [];\n ours.onmessage = (message) => {\n inbox.push(jsonValueSchema.parse(JSON.parse(JSON.stringify(message))));\n };\n await ours.start();\n return {\n send: async (message) => ours.send(parseJSONRPCMessage(message)),\n receive: async () => {\n if (args.hooks?.failReceive?.() === true) throw new Error('the MCP pipe broke');\n return inbox.splice(0);\n },\n close: async () => {\n await ours.close();\n await server.close();\n },\n };\n },\n});\n"],
5
- "mappings": "AAAA,SAAS,mBAAmB,2BAA2B;AACvD,SAAS,iBAAiB;AAC1B,SAAS,uBAAuC;AAazC,MAAM,oCAAoC,CAAC,UAIlB;AAAA,EAC9B,MAAM,KAAK;AAAA,EACX,SAAS,YAAsC;AAC7C,SAAK,OAAO,YAAY;AACxB,UAAM,SAAS,IAAI,UAAU,EAAE,MAAM,KAAK,MAAM,SAAS,IAAI,CAAC;AAC9D,SAAK,SAAS,MAAM;AACpB,UAAM,CAAC,MAAM,MAAM,IAAI,kBAAkB,iBAAiB;AAC1D,UAAM,OAAO,QAAQ,MAAM;AAC3B,UAAM,QAAqB,CAAC;AAC5B,SAAK,YAAY,CAAC,YAAY;AAC5B,YAAM,KAAK,gBAAgB,MAAM,KAAK,MAAM,KAAK,UAAU,OAAO,CAAC,CAAC,CAAC;AAAA,IACvE;AACA,UAAM,KAAK,MAAM;AACjB,WAAO;AAAA,MACL,MAAM,OAAO,YAAY,KAAK,KAAK,oBAAoB,OAAO,CAAC;AAAA,MAC/D,SAAS,YAAY;AACnB,YAAI,KAAK,OAAO,cAAc,MAAM,KAAM,OAAM,IAAI,MAAM,oBAAoB;AAC9E,eAAO,MAAM,OAAO,CAAC;AAAA,MACvB;AAAA,MACA,OAAO,YAAY;AACjB,cAAM,KAAK,MAAM;AACjB,cAAM,OAAO,MAAM;AAAA,MACrB;AAAA,IACF;AAAA,EACF;AACF;",
4
+ "sourcesContent": ["import { InMemoryTransport, parseJSONRPCMessage } from '@modelcontextprotocol/client';\nimport { McpServer } from '@modelcontextprotocol/server';\nimport { jsonValueSchema, type JsonValue } from \"../json.mjs\";\nimport type { McpChannelEndpointIface, McpChannelIface } from \"./types.mjs\";\n\n// A sandbox-hosted MCP server as a channel endpoint backed by an in-process MCP\n// server, as a provider whose backend relays a pipe to the sandbox's server\n// would hand it over. For tests of hosts and providers, so it is exported as\n// `@finalai/agent-provider/testing/mcp` and not from the sandbox barrel.\n\nexport interface InProcessMcpChannelHooksIface {\n onConnect?: () => void;\n // Fails `receive` while it returns true (a broken pipe).\n failReceive?: () => boolean;\n}\n\nexport const createInProcessMcpChannelEndpoint = (args: {\n name: string;\n register: (server: McpServer) => void;\n hooks?: InProcessMcpChannelHooksIface;\n}): McpChannelEndpointIface => ({\n name: args.name,\n connect: async (): Promise<McpChannelIface> => {\n args.hooks?.onConnect?.();\n const server = new McpServer({ name: args.name, version: '1' });\n args.register(server);\n const [ours, theirs] = InMemoryTransport.createLinkedPair();\n await server.connect(theirs);\n const inbox: JsonValue[] = [];\n ours.onmessage = (message) => {\n inbox.push(jsonValueSchema.parse(JSON.parse(JSON.stringify(message))));\n };\n await ours.start();\n return {\n send: async (message) => ours.send(parseJSONRPCMessage(message)),\n receive: async () => {\n if (args.hooks?.failReceive?.() === true) throw new Error('the MCP pipe broke');\n return inbox.splice(0);\n },\n close: async () => {\n await ours.close();\n await server.close();\n },\n };\n },\n});\n"],
5
+ "mappings": "AAAA,SAAS,mBAAmB,2BAA2B;AACvD,SAAS,iBAAiB;AAC1B,SAAS,uBAAuC;AAczC,MAAM,oCAAoC,CAAC,UAIlB;AAAA,EAC9B,MAAM,KAAK;AAAA,EACX,SAAS,YAAsC;AAC7C,SAAK,OAAO,YAAY;AACxB,UAAM,SAAS,IAAI,UAAU,EAAE,MAAM,KAAK,MAAM,SAAS,IAAI,CAAC;AAC9D,SAAK,SAAS,MAAM;AACpB,UAAM,CAAC,MAAM,MAAM,IAAI,kBAAkB,iBAAiB;AAC1D,UAAM,OAAO,QAAQ,MAAM;AAC3B,UAAM,QAAqB,CAAC;AAC5B,SAAK,YAAY,CAAC,YAAY;AAC5B,YAAM,KAAK,gBAAgB,MAAM,KAAK,MAAM,KAAK,UAAU,OAAO,CAAC,CAAC,CAAC;AAAA,IACvE;AACA,UAAM,KAAK,MAAM;AACjB,WAAO;AAAA,MACL,MAAM,OAAO,YAAY,KAAK,KAAK,oBAAoB,OAAO,CAAC;AAAA,MAC/D,SAAS,YAAY;AACnB,YAAI,KAAK,OAAO,cAAc,MAAM,KAAM,OAAM,IAAI,MAAM,oBAAoB;AAC9E,eAAO,MAAM,OAAO,CAAC;AAAA,MACvB;AAAA,MACA,OAAO,YAAY;AACjB,cAAM,KAAK,MAAM;AACjB,cAAM,OAAO,MAAM;AAAA,MACrB;AAAA,IACF;AAAA,EACF;AACF;",
6
6
  "names": []
7
7
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@finalai/agent-provider",
3
- "version": "0.12.0",
3
+ "version": "0.13.0",
4
4
  "private": false,
5
5
  "description": "Provider contracts for the agent stack: the agent document, requirements and inference, harnesses, sandboxes (handle, wire, grants, setups, MCP projection), the code host, channels, and the conformance kit.",
6
6
  "license": "Apache-2.0",
@@ -94,6 +94,11 @@
94
94
  "import": "./dist/modules/sandbox/mcp.mjs",
95
95
  "default": "./dist/modules/sandbox/mcp.mjs"
96
96
  },
97
+ "./testing/mcp": {
98
+ "types": "./dist/modules/sandbox/mcp-testing.d.mts",
99
+ "import": "./dist/modules/sandbox/mcp-testing.mjs",
100
+ "default": "./dist/modules/sandbox/mcp-testing.mjs"
101
+ },
97
102
  "./sandbox/bytes": {
98
103
  "types": "./dist/modules/sandbox/bytes.d.mts",
99
104
  "import": "./dist/modules/sandbox/bytes.mjs",
@@ -232,8 +237,8 @@
232
237
  },
233
238
  "dependencies": {
234
239
  "@agentclientprotocol/sdk": "1.8.0",
235
- "@finalai/acp-session": "0.4.0",
236
- "@finalai/agent-protocol": "0.11.0",
240
+ "@finalai/acp-session": "0.5.0",
241
+ "@finalai/agent-protocol": "0.12.0",
237
242
  "@modelcontextprotocol/client": "^2.1.0",
238
243
  "@modelcontextprotocol/core": "^2.1.0",
239
244
  "@modelcontextprotocol/server": "^2.1.0",