@harness-gw/sdk 0.14.0 → 0.15.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.
package/README.md CHANGED
@@ -63,7 +63,7 @@ You need a running harness. Hermes is the primary one; see
63
63
  docker run --rm \
64
64
  -v "$PWD/config.yaml:/run/harness-gw/config.yaml:ro" \
65
65
  -v "$PWD/hermes-token:/run/secrets/hermes-token:ro" \
66
- ghcr.io/almogbaku/harness-gw:0.14.0 \
66
+ ghcr.io/almogbaku/harness-gw:0.15.1 \
67
67
  config check --config /run/harness-gw/config.yaml
68
68
  ```
69
69
 
@@ -73,7 +73,7 @@ You need a running harness. Hermes is the primary one; see
73
73
  docker run --rm -p 127.0.0.1:4100:4100 \
74
74
  -v "$PWD/config.yaml:/run/harness-gw/config.yaml:ro" \
75
75
  -v "$PWD/hermes-token:/run/secrets/hermes-token:ro" \
76
- ghcr.io/almogbaku/harness-gw:0.14.0 \
76
+ ghcr.io/almogbaku/harness-gw:0.15.1 \
77
77
  serve --config /run/harness-gw/config.yaml
78
78
  ```
79
79
 
@@ -118,11 +118,11 @@ await connection.prompt(sessionId, [{ type: "text", text: "Hello" }], {})
118
118
 
119
119
  The package has three entry points:
120
120
 
121
- | Import | What it holds |
122
- | -------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
123
- | `@harness-gw/sdk` | The ACP connection with reconnect and backoff, the workspace client (Agents, Sessions, read state, activity), approvals, questions, and `HgwRemoteClient` for the HTTP routes |
124
- | `@harness-gw/sdk/protocol` | The wire alone: `_hgw/*` method names, the `_meta.hgw` zod schemas and their types, route paths and `HGW_EXTENSION_VERSION`. It loads without the client |
125
- | `@harness-gw/sdk/node` | Server-only: `mcpAppStableOriginKey` and `artifactFileId`, the ids an MCP server derives as the gateway does. It needs Node's `crypto` |
121
+ | Import | What it holds |
122
+ | -------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
123
+ | `@harness-gw/sdk` | The ACP connection with reconnect and backoff, the workspace client (Agents, Sessions, read state, activity), approvals, questions, and `HgwRemoteClient` for the HTTP routes |
124
+ | `@harness-gw/sdk/protocol` | The wire alone: `_hgw/*` method names, the `_meta.hgw` zod schemas and their types, route paths and `HGW_EXTENSION_VERSION`. It loads without the client |
125
+ | `@harness-gw/sdk/node` | Server-only: `mcpAppStableOriginKey` and `artifactFileId`, the ids an MCP server derives as the gateway does, and `canonicalUrl`, a URL's WHATWG serialization with no trailing slash, the form the key hashes. It needs Node's `crypto` |
126
126
 
127
127
  The client checks the gateway's extension version during `initialize`. On a
128
128
  mismatch it fails `initialized` with both versions named and stops instead of
@@ -7,6 +7,8 @@ import { z as z2 } from "zod";
7
7
  // protocol/mcp-apps.ts
8
8
  import {
9
9
  CallToolResultSchema as CallToolResultSchema2,
10
+ ContentBlockSchema,
11
+ EmptyResultSchema as EmptyResultSchema2,
10
12
  ReadResourceResultSchema as ReadResourceResultSchema2
11
13
  } from "@modelcontextprotocol/core";
12
14
  import { z } from "zod";
@@ -78,6 +80,10 @@ var McpAppToolCallRequestSchema2 = z.strictObject({
78
80
  var McpAppResourceReadRequestSchema2 = z.strictObject({
79
81
  uri: z.string().min(1).max(2048)
80
82
  });
83
+ var McpAppModelContextRequestSchema2 = z.strictObject({
84
+ content: z.array(ContentBlockSchema).optional(),
85
+ structuredContent: z.record(z.string(), z.unknown()).optional()
86
+ });
81
87
  var MAX_MCP_APP_FILE_BYTES2 = 64 * 1024 * 1024;
82
88
  var McpAppFileReadFailureSchema2 = z.enum([
83
89
  "denied",
@@ -1283,4 +1289,4 @@ var PushUnregistrationSchema2 = z4.strictObject({
1283
1289
  endpoint: z4.string().max(2048)
1284
1290
  });
1285
1291
 
1286
- export { CallToolResultSchema2, ReadResourceResultSchema2, McpUiCspSchema2, isMcpAppCspDomain2, McpUiPermissionsSchema2, McpAppFilesSchema2, McpUiDomainSchema2, McpAppViewSchema2, viewerFileResult2, McpAppToolCallRequestSchema2, McpAppResourceReadRequestSchema2, MAX_MCP_APP_FILE_BYTES2, McpAppFileReadFailureSchema2, McpAppFileReadErrorDataSchema2, MCP_APP_SANDBOX_PATH2, isMcpAppPolicyOrigin2, appliedMcpAppCsp2, mcpAppSandboxPolicy2, SESSION_CATALOG_MAX_WINDOW2, RuntimeAuthStateSchema2, OperationCapabilitySchema2, RuntimeInfoSchema2, AgentAvatarSchema2, AgentCatalogEntrySchema2, AgentCatalogResponseSchema2, AgentUpdateFields2, writesAgentField2, AgentUpdateRequestSchema2, AgentUpdateResponseSchema2, SessionStatusSchema2, SessionPlatformSchema2, SessionSchema2, newestSessionFirst2, SessionCatalogResponseSchema2, StopReason2, ToolKind2, ToolLocationSchema2, DiffOperation2, DiffChangeSchema2, ToolDiffSchema2, SessionMessageErrorStatusSchema2, SessionMessageSchema2, SessionPlanActivityMessageSchema2, SessionCompactionActivityMessageSchema2, SessionChildActivityMessageSchema2, SessionActivityMessageSchema2, SessionHistoryResponseSchema2, SessionCreateRequestSchema2, SessionCreateResponseSchema2, SessionPatchRequestSchema2, TurnStopResponseSchema2, TurnSteerRequestSchema2, TurnSteerResponseSchema2, SlashCommandSchema2, MAX_SLASH_COMMANDS2, INTERACTION_PROTOCOL2, SessionWorkspaceCapabilitiesResponseSchema2, GuestRuntimeCapabilitiesResponseSchema2, SessionModelsResponseSchema2, SessionModelUpdateRequestSchema2, SessionModelUpdateResponseSchema2, SessionContextResponseSchema2, ArtifactDescriptorSchema2, SessionTodosResponseSchema2, SessionActivityResponseSchema2, SessionAttachmentStageRequestSchema2, SessionAttachmentStageResponseSchema2, SessionAudioResponseSchema2, SessionTranscriptionRequestSchema2, SessionTranscriptionResponseSchema2, SessionSpeechRequestSchema2, ErrorResponseSchema2, ACP_PROTOCOL_VERSION2, HGW_API_PREFIX2, HGW_ACP_PATH2, HGW_ACP_AGENTS_PATH2, hgwAcpAgentPath2, HGW_META_KEY2, HGW_EXTENSION_VERSION2, HGW_AUTH_METHOD_INVITE2, HGW_ATTACHMENT_URI_SCHEME2, HGW_ARTIFACT_URI_SCHEME2, HGW_METHODS2, HGW_PERMISSION_KIND_SESSION2, HGW_PLAN_ID2, HGW_JSONRPC_ERRORS2, HGW_MAX_FRAME_BYTES2, IdentifierSchema2, HgwExtensionsSchema2, HgwClientCapabilitiesMetaSchema2, HgwInitializeMetaSchema2, HgwLoginMetaSchema2, HgwSessionNewMetaSchema2, HgwSessionListMetaSchema2, HgwSessionSearchMetaSchema2, HgwSessionSearchResponseSchema2, HgwSessionInfoMetaSchema2, HgwSessionResumeMetaSchema2, HGW_REPLAY_POSITION2, HgwReplayPositionSchema2, HGW_REPLAY_BEFORE2, HgwReplayBeforeSchema2, HgwHistoryCursorSchema2, HgwHistoryPageResponseMetaSchema2, HgwHistoryPageTagSchema2, HgwSessionResumeResponseMetaSchema2, HgwPromptMetaSchema2, HgwSessionUpdateRequestSchema2, HgwSessionPartRequestSchema2, HgwSteerRequestSchema2, HgwSteerResponseSchema2, HgwFocusRequestSchema2, HgwAgentsListResponseSchema2, HgwAgentUpdateRequestSchema2, HgwAgentUpdateResponseSchema2, HgwTurnMetaSchema2, HgwNoticeMetaSchema2, HgwMessageMetaSchema2, HgwCostSchema2, HgwChildSessionMetaSchema2, HgwStateMetaSchema2, HgwChunkMetaSchema2, HgwToolCallMetaSchema2, HgwPlanMetaSchema2, HgwUsageMetaSchema2, HgwAvailableCommandsMetaSchema2, HgwPermissionMetaSchema2, HgwQuestionOptionSchema2, HgwQuestionSchema2, HgwElicitationMetaSchema2, HgwArtifactDescriptorSchema2, formatArtifactUri2, parseArtifactUri2, HgwComposerPrefillNotificationSchema2, HgwErrorNotificationSchema2, HGW_REQUEST_TEXT_MAX2, HgwActivityNotificationSchema2, PushCategorySchema2, categoryOf2, PushLocaleSchema2, PRESENCE_IDLE_MS2, PRESENCE_HEARTBEAT_MS2, PRESENCE_GRACE_MS2, PRESENCE_CLOSED_GRACE_MS2, COALESCE_WINDOW_MS2, PUSH_TEXT_LIMITS2, PushMessageSchema2, PushCategoriesSchema2, PushSubscriptionJsonSchema2, PushInfoSchema2, PushRegistrationSchema2, PushUnregistrationSchema2 };
1292
+ export { CallToolResultSchema2, EmptyResultSchema2, ReadResourceResultSchema2, McpUiCspSchema2, isMcpAppCspDomain2, McpUiPermissionsSchema2, McpAppFilesSchema2, McpUiDomainSchema2, McpAppViewSchema2, viewerFileResult2, McpAppToolCallRequestSchema2, McpAppResourceReadRequestSchema2, McpAppModelContextRequestSchema2, MAX_MCP_APP_FILE_BYTES2, McpAppFileReadFailureSchema2, McpAppFileReadErrorDataSchema2, MCP_APP_SANDBOX_PATH2, isMcpAppPolicyOrigin2, appliedMcpAppCsp2, mcpAppSandboxPolicy2, SESSION_CATALOG_MAX_WINDOW2, RuntimeAuthStateSchema2, OperationCapabilitySchema2, RuntimeInfoSchema2, AgentAvatarSchema2, AgentCatalogEntrySchema2, AgentCatalogResponseSchema2, AgentUpdateFields2, writesAgentField2, AgentUpdateRequestSchema2, AgentUpdateResponseSchema2, SessionStatusSchema2, SessionPlatformSchema2, SessionSchema2, newestSessionFirst2, SessionCatalogResponseSchema2, StopReason2, ToolKind2, ToolLocationSchema2, DiffOperation2, DiffChangeSchema2, ToolDiffSchema2, SessionMessageErrorStatusSchema2, SessionMessageSchema2, SessionPlanActivityMessageSchema2, SessionCompactionActivityMessageSchema2, SessionChildActivityMessageSchema2, SessionActivityMessageSchema2, SessionHistoryResponseSchema2, SessionCreateRequestSchema2, SessionCreateResponseSchema2, SessionPatchRequestSchema2, TurnStopResponseSchema2, TurnSteerRequestSchema2, TurnSteerResponseSchema2, SlashCommandSchema2, MAX_SLASH_COMMANDS2, INTERACTION_PROTOCOL2, SessionWorkspaceCapabilitiesResponseSchema2, GuestRuntimeCapabilitiesResponseSchema2, SessionModelsResponseSchema2, SessionModelUpdateRequestSchema2, SessionModelUpdateResponseSchema2, SessionContextResponseSchema2, ArtifactDescriptorSchema2, SessionTodosResponseSchema2, SessionActivityResponseSchema2, SessionAttachmentStageRequestSchema2, SessionAttachmentStageResponseSchema2, SessionAudioResponseSchema2, SessionTranscriptionRequestSchema2, SessionTranscriptionResponseSchema2, SessionSpeechRequestSchema2, ErrorResponseSchema2, ACP_PROTOCOL_VERSION2, HGW_API_PREFIX2, HGW_ACP_PATH2, HGW_ACP_AGENTS_PATH2, hgwAcpAgentPath2, HGW_META_KEY2, HGW_EXTENSION_VERSION2, HGW_AUTH_METHOD_INVITE2, HGW_ATTACHMENT_URI_SCHEME2, HGW_ARTIFACT_URI_SCHEME2, HGW_METHODS2, HGW_PERMISSION_KIND_SESSION2, HGW_PLAN_ID2, HGW_JSONRPC_ERRORS2, HGW_MAX_FRAME_BYTES2, IdentifierSchema2, HgwExtensionsSchema2, HgwClientCapabilitiesMetaSchema2, HgwInitializeMetaSchema2, HgwLoginMetaSchema2, HgwSessionNewMetaSchema2, HgwSessionListMetaSchema2, HgwSessionSearchMetaSchema2, HgwSessionSearchResponseSchema2, HgwSessionInfoMetaSchema2, HgwSessionResumeMetaSchema2, HGW_REPLAY_POSITION2, HgwReplayPositionSchema2, HGW_REPLAY_BEFORE2, HgwReplayBeforeSchema2, HgwHistoryCursorSchema2, HgwHistoryPageResponseMetaSchema2, HgwHistoryPageTagSchema2, HgwSessionResumeResponseMetaSchema2, HgwPromptMetaSchema2, HgwSessionUpdateRequestSchema2, HgwSessionPartRequestSchema2, HgwSteerRequestSchema2, HgwSteerResponseSchema2, HgwFocusRequestSchema2, HgwAgentsListResponseSchema2, HgwAgentUpdateRequestSchema2, HgwAgentUpdateResponseSchema2, HgwTurnMetaSchema2, HgwNoticeMetaSchema2, HgwMessageMetaSchema2, HgwCostSchema2, HgwChildSessionMetaSchema2, HgwStateMetaSchema2, HgwChunkMetaSchema2, HgwToolCallMetaSchema2, HgwPlanMetaSchema2, HgwUsageMetaSchema2, HgwAvailableCommandsMetaSchema2, HgwPermissionMetaSchema2, HgwQuestionOptionSchema2, HgwQuestionSchema2, HgwElicitationMetaSchema2, HgwArtifactDescriptorSchema2, formatArtifactUri2, parseArtifactUri2, HgwComposerPrefillNotificationSchema2, HgwErrorNotificationSchema2, HGW_REQUEST_TEXT_MAX2, HgwActivityNotificationSchema2, PushCategorySchema2, categoryOf2, PushLocaleSchema2, PRESENCE_IDLE_MS2, PRESENCE_HEARTBEAT_MS2, PRESENCE_GRACE_MS2, PRESENCE_CLOSED_GRACE_MS2, COALESCE_WINDOW_MS2, PUSH_TEXT_LIMITS2, PushMessageSchema2, PushCategoriesSchema2, PushSubscriptionJsonSchema2, PushInfoSchema2, PushRegistrationSchema2, PushUnregistrationSchema2 };
@@ -1,7 +1,7 @@
1
1
  import type { z } from "zod";
2
2
  import { SessionContextResponseSchema, SessionModelsResponseSchema, SessionWorkspaceCapabilitiesResponseSchema } from "../protocol/index.js";
3
3
  import { type PushRegistration } from "../protocol/push.js";
4
- import { type McpAppFileReadFailure, type McpAppResourceReadRequest, type McpAppToolCallRequest } from "../protocol/mcp-apps.js";
4
+ import { type McpAppFileReadFailure, type McpAppModelContextRequest, type McpAppResourceReadRequest, type McpAppToolCallRequest } from "../protocol/mcp-apps.js";
5
5
  import type { StagedAttachment } from "./workspace.js";
6
6
  export type HgwWorkspaceCapabilities = z.infer<typeof SessionWorkspaceCapabilitiesResponseSchema>;
7
7
  export type HgwModelChoices = z.infer<typeof SessionModelsResponseSchema>;
@@ -439,6 +439,30 @@ export declare class HgwRemoteClient {
439
439
  blob: string;
440
440
  })[];
441
441
  }>;
442
+ /**
443
+ * A view's `ui/update-model-context`, answered with its empty result: the
444
+ * model reads it once, in the Session's next turn, in place of what the view
445
+ * sent before. A runtime with nowhere to put it out of the transcript
446
+ * rejects it with code `unsupported`, a refusal no retry changes.
447
+ */
448
+ updateMcpAppModelContext(sessionId: string, toolCallId: string, request: McpAppModelContextRequest): Promise<{
449
+ _meta?: {
450
+ [x: string]: unknown;
451
+ "io.modelcontextprotocol/serverInfo"?: {
452
+ version: string;
453
+ websiteUrl?: string | undefined;
454
+ description?: string | undefined;
455
+ icons?: {
456
+ src: string;
457
+ mimeType?: string | undefined;
458
+ sizes?: string[] | undefined;
459
+ theme?: "dark" | "light" | undefined;
460
+ }[] | undefined;
461
+ name: string;
462
+ title?: string | undefined;
463
+ } | undefined;
464
+ } | undefined;
465
+ }>;
442
466
  transcribe(sessionId: string, audio: Blob, signal?: AbortSignal): Promise<string>;
443
467
  transcribeForAgent(agentId: string, audio: Blob, signal?: AbortSignal): Promise<string>;
444
468
  speak(sessionId: string, text: string, signal?: AbortSignal): Promise<Blob>;
@@ -1,10 +1,12 @@
1
1
  import {
2
2
  CallToolResultSchema2,
3
+ EmptyResultSchema2,
3
4
  ReadResourceResultSchema2,
4
5
  McpAppFilesSchema2,
5
6
  McpAppViewSchema2,
6
7
  McpAppToolCallRequestSchema2,
7
8
  McpAppResourceReadRequestSchema2,
9
+ McpAppModelContextRequestSchema2,
8
10
  RuntimeInfoSchema2,
9
11
  SessionAttachmentStageRequestSchema2,
10
12
  SessionAttachmentStageResponseSchema2,
@@ -2636,6 +2638,9 @@ class HgwRemoteClient {
2636
2638
  async readMcpAppResource(sessionId, subject, request) {
2637
2639
  return this.#postMcpApp(sessionId, subject, "/resources/read", McpAppResourceReadRequestSchema2.safeParse(request), ReadResourceResultSchema2);
2638
2640
  }
2641
+ async updateMcpAppModelContext(sessionId, toolCallId, request) {
2642
+ return this.#postMcpApp(sessionId, { toolCallId }, "/ui/update-model-context", McpAppModelContextRequestSchema2.safeParse(request), EmptyResultSchema2);
2643
+ }
2639
2644
  async transcribe(sessionId, audio, signal) {
2640
2645
  return this.transcribeForAgent(this.#owner(sessionId), audio, signal);
2641
2646
  }
@@ -1,4 +1,4 @@
1
- import { CallToolResultSchema, ReadResourceResultSchema } from "@modelcontextprotocol/core";
1
+ import { CallToolResultSchema, EmptyResultSchema, ReadResourceResultSchema } from "@modelcontextprotocol/core";
2
2
  import { z } from "zod";
3
3
  /**
4
4
  * MCP Apps (spec 2026-01-26) as the gateway hands them to the browser. A tool
@@ -6,7 +6,7 @@ import { z } from "zod";
6
6
  * resource server-side and the browser only ever sees the view below, keyed
7
7
  * by the tool call that opened it, never the resource URI.
8
8
  */
9
- export { CallToolResultSchema, ReadResourceResultSchema };
9
+ export { CallToolResultSchema, EmptyResultSchema, ReadResourceResultSchema };
10
10
  export type CallToolResult = z.infer<typeof CallToolResultSchema>;
11
11
  export type ReadResourceResult = z.infer<typeof ReadResourceResultSchema>;
12
12
  /** A UI resource's `_meta.ui.csp`: the origins its view may reach. */
@@ -212,6 +212,102 @@ export declare const McpAppResourceReadRequestSchema: z.ZodObject<{
212
212
  uri: z.ZodString;
213
213
  }, z.core.$strict>;
214
214
  export type McpAppResourceReadRequest = z.infer<typeof McpAppResourceReadRequestSchema>;
215
+ /**
216
+ * A view's `ui/update-model-context`, answered with an empty result: what the
217
+ * model reads of the view once, in the Session's next turn, in place of
218
+ * whatever the view sent before. An update carrying neither field clears it.
219
+ */
220
+ export declare const McpAppModelContextRequestSchema: z.ZodObject<{
221
+ content: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
222
+ type: z.ZodLiteral<"text">;
223
+ text: z.ZodString;
224
+ annotations: z.ZodOptional<z.ZodObject<{
225
+ audience: z.ZodOptional<z.ZodArray<z.ZodEnum<{
226
+ user: "user";
227
+ assistant: "assistant";
228
+ }>>>;
229
+ priority: z.ZodOptional<z.ZodNumber>;
230
+ lastModified: z.ZodOptional<z.ZodISODateTime>;
231
+ }, z.core.$strip>>;
232
+ _meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
233
+ }, z.core.$strip>, z.ZodObject<{
234
+ type: z.ZodLiteral<"image">;
235
+ data: z.ZodString;
236
+ mimeType: z.ZodString;
237
+ annotations: z.ZodOptional<z.ZodObject<{
238
+ audience: z.ZodOptional<z.ZodArray<z.ZodEnum<{
239
+ user: "user";
240
+ assistant: "assistant";
241
+ }>>>;
242
+ priority: z.ZodOptional<z.ZodNumber>;
243
+ lastModified: z.ZodOptional<z.ZodISODateTime>;
244
+ }, z.core.$strip>>;
245
+ _meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
246
+ }, z.core.$strip>, z.ZodObject<{
247
+ type: z.ZodLiteral<"audio">;
248
+ data: z.ZodString;
249
+ mimeType: z.ZodString;
250
+ annotations: z.ZodOptional<z.ZodObject<{
251
+ audience: z.ZodOptional<z.ZodArray<z.ZodEnum<{
252
+ user: "user";
253
+ assistant: "assistant";
254
+ }>>>;
255
+ priority: z.ZodOptional<z.ZodNumber>;
256
+ lastModified: z.ZodOptional<z.ZodISODateTime>;
257
+ }, z.core.$strip>>;
258
+ _meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
259
+ }, z.core.$strip>, z.ZodObject<{
260
+ uri: z.ZodString;
261
+ description: z.ZodOptional<z.ZodString>;
262
+ mimeType: z.ZodOptional<z.ZodString>;
263
+ size: z.ZodOptional<z.ZodNumber>;
264
+ annotations: z.ZodOptional<z.ZodObject<{
265
+ audience: z.ZodOptional<z.ZodArray<z.ZodEnum<{
266
+ user: "user";
267
+ assistant: "assistant";
268
+ }>>>;
269
+ priority: z.ZodOptional<z.ZodNumber>;
270
+ lastModified: z.ZodOptional<z.ZodISODateTime>;
271
+ }, z.core.$strip>>;
272
+ _meta: z.ZodOptional<z.ZodObject<{}, z.core.$loose>>;
273
+ icons: z.ZodOptional<z.ZodArray<z.ZodObject<{
274
+ src: z.ZodString;
275
+ mimeType: z.ZodOptional<z.ZodString>;
276
+ sizes: z.ZodOptional<z.ZodArray<z.ZodString>>;
277
+ theme: z.ZodOptional<z.ZodEnum<{
278
+ light: "light";
279
+ dark: "dark";
280
+ }>>;
281
+ }, z.core.$strip>>>;
282
+ name: z.ZodString;
283
+ title: z.ZodOptional<z.ZodString>;
284
+ type: z.ZodLiteral<"resource_link">;
285
+ }, z.core.$strip>, z.ZodObject<{
286
+ type: z.ZodLiteral<"resource">;
287
+ resource: z.ZodUnion<readonly [z.ZodObject<{
288
+ uri: z.ZodString;
289
+ mimeType: z.ZodOptional<z.ZodString>;
290
+ _meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
291
+ text: z.ZodString;
292
+ }, z.core.$strip>, z.ZodObject<{
293
+ uri: z.ZodString;
294
+ mimeType: z.ZodOptional<z.ZodString>;
295
+ _meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
296
+ blob: z.ZodString;
297
+ }, z.core.$strip>]>;
298
+ annotations: z.ZodOptional<z.ZodObject<{
299
+ audience: z.ZodOptional<z.ZodArray<z.ZodEnum<{
300
+ user: "user";
301
+ assistant: "assistant";
302
+ }>>>;
303
+ priority: z.ZodOptional<z.ZodNumber>;
304
+ lastModified: z.ZodOptional<z.ZodISODateTime>;
305
+ }, z.core.$strip>>;
306
+ _meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
307
+ }, z.core.$strip>]>>>;
308
+ structuredContent: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
309
+ }, z.core.$strict>;
310
+ export type McpAppModelContextRequest = z.infer<typeof McpAppModelContextRequestSchema>;
215
311
  /**
216
312
  * The most file content a view's read of its own file address answers: 64
217
313
  * MiB, so a base64 `blob` of at most 4·⌈64 MiB / 3⌉ characters.
@@ -1,5 +1,6 @@
1
1
  import {
2
2
  CallToolResultSchema2,
3
+ EmptyResultSchema2,
3
4
  ReadResourceResultSchema2,
4
5
  McpUiCspSchema2,
5
6
  isMcpAppCspDomain2,
@@ -10,6 +11,7 @@ import {
10
11
  viewerFileResult2,
11
12
  McpAppToolCallRequestSchema2,
12
13
  McpAppResourceReadRequestSchema2,
14
+ McpAppModelContextRequestSchema2,
13
15
  MAX_MCP_APP_FILE_BYTES2,
14
16
  McpAppFileReadFailureSchema2,
15
17
  McpAppFileReadErrorDataSchema2,
@@ -215,6 +217,7 @@ export {
215
217
  CallToolResultSchema2 as CallToolResultSchema,
216
218
  DiffChangeSchema2 as DiffChangeSchema,
217
219
  DiffOperation2 as DiffOperation,
220
+ EmptyResultSchema2 as EmptyResultSchema,
218
221
  ErrorResponseSchema2 as ErrorResponseSchema,
219
222
  GuestRuntimeCapabilitiesResponseSchema2 as GuestRuntimeCapabilitiesResponseSchema,
220
223
  HGW_ACP_AGENTS_PATH2 as HGW_ACP_AGENTS_PATH,
@@ -289,6 +292,7 @@ export {
289
292
  McpAppFileReadErrorDataSchema2 as McpAppFileReadErrorDataSchema,
290
293
  McpAppFileReadFailureSchema2 as McpAppFileReadFailureSchema,
291
294
  McpAppFilesSchema2 as McpAppFilesSchema,
295
+ McpAppModelContextRequestSchema2 as McpAppModelContextRequestSchema,
292
296
  McpAppResourceReadRequestSchema2 as McpAppResourceReadRequestSchema,
293
297
  McpAppToolCallRequestSchema2 as McpAppToolCallRequestSchema,
294
298
  McpAppViewSchema2 as McpAppViewSchema,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@harness-gw/sdk",
3
- "version": "0.14.0",
3
+ "version": "0.15.1",
4
4
  "description": "A gateway that puts Hermes, OpenClaw, and OpenCode behind one ACP WebSocket, and the browser client and protocol SDK for it.",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",