stitchkit 0.53.2 → 0.55.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.
Files changed (125) hide show
  1. package/README.md +4 -1
  2. package/dist/browser/socket-io.d.ts +11 -1
  3. package/dist/browser/socket-io.d.ts.map +1 -1
  4. package/dist/cli.d.ts +2 -1
  5. package/dist/cli.d.ts.map +1 -1
  6. package/dist/cli.js +15 -8
  7. package/dist/contract/define.d.ts +27 -0
  8. package/dist/contract/define.d.ts.map +1 -1
  9. package/dist/contract/file-ref.d.ts +13 -0
  10. package/dist/contract/file-ref.d.ts.map +1 -0
  11. package/dist/contract/index.d.ts +2 -1
  12. package/dist/contract/index.d.ts.map +1 -1
  13. package/dist/contract/index.js +21 -17
  14. package/dist/files/boundary.d.ts +52 -0
  15. package/dist/files/boundary.d.ts.map +1 -0
  16. package/dist/files.d.ts +3 -0
  17. package/dist/files.d.ts.map +1 -0
  18. package/dist/files.js +16 -0
  19. package/dist/{index-c78w2y09.js → index-0gv7k0ra.js} +515 -156
  20. package/dist/index-1bx83sw4.js +4 -0
  21. package/dist/index-1k16zv57.js +269 -0
  22. package/dist/index-6k1937bx.js +20 -0
  23. package/dist/{index-bmnhqtya.js → index-7eq9va6e.js} +1 -4
  24. package/dist/{index-yxpe3phd.js → index-cby4ar3v.js} +1 -18
  25. package/dist/index-h60df7rj.js +110 -0
  26. package/dist/{index-yez419px.js → index-js7yexng.js} +19 -6
  27. package/dist/index-k4dftwf7.js +66 -0
  28. package/dist/{index-pdv1mjjr.js → index-npye5kt7.js} +30 -59
  29. package/dist/{index-yydqk4fh.js → index-pzc32v75.js} +90 -3
  30. package/dist/{index-e1es808r.js → index-qh4xevf5.js} +1 -1
  31. package/dist/{index-gvha32jh.js → index-qx84bqzk.js} +2 -2
  32. package/dist/{index-pfqjb5xy.js → index-rgd18hx3.js} +23 -5
  33. package/dist/index-sbdmyz75.js +18 -0
  34. package/dist/{index-173tvqcp.js → index-v4bbq3p4.js} +9 -114
  35. package/dist/index.js +162 -35
  36. package/dist/node.js +30 -27
  37. package/dist/observability/event.d.ts +2 -16
  38. package/dist/observability/event.d.ts.map +1 -1
  39. package/dist/observability/index.js +28 -25
  40. package/dist/react.js +2 -2
  41. package/dist/realtime/contract.d.ts +9 -0
  42. package/dist/realtime/contract.d.ts.map +1 -1
  43. package/dist/realtime/index.d.ts +2 -1
  44. package/dist/realtime/index.d.ts.map +1 -1
  45. package/dist/realtime/request.d.ts +21 -0
  46. package/dist/realtime/request.d.ts.map +1 -0
  47. package/dist/realtime/socket.d.ts +3 -0
  48. package/dist/realtime/socket.d.ts.map +1 -1
  49. package/dist/remote.d.ts +9 -0
  50. package/dist/remote.d.ts.map +1 -0
  51. package/dist/remote.js +79 -0
  52. package/dist/server/context-contribution.d.ts +10 -0
  53. package/dist/server/context-contribution.d.ts.map +1 -0
  54. package/dist/server/context.d.ts.map +1 -1
  55. package/dist/server/index.d.ts +2 -1
  56. package/dist/server/index.d.ts.map +1 -1
  57. package/dist/server/index.js +133 -88
  58. package/dist/server/lifecycle.d.ts +4 -0
  59. package/dist/server/lifecycle.d.ts.map +1 -0
  60. package/dist/server/middleware/auth.d.ts +35 -7
  61. package/dist/server/middleware/auth.d.ts.map +1 -1
  62. package/dist/server/process-signal-common.d.ts +6 -0
  63. package/dist/server/process-signal-common.d.ts.map +1 -0
  64. package/dist/server/process-signals.d.ts.map +1 -1
  65. package/dist/server/types.d.ts +1 -1
  66. package/dist/server/types.d.ts.map +1 -1
  67. package/dist/testing/surface-conformance.d.ts +47 -0
  68. package/dist/testing/surface-conformance.d.ts.map +1 -0
  69. package/dist/testing/surface-manifest.d.ts +156 -0
  70. package/dist/testing/surface-manifest.d.ts.map +1 -0
  71. package/dist/testing.d.ts +2 -0
  72. package/dist/testing.d.ts.map +1 -1
  73. package/dist/testing.js +366 -3
  74. package/dist/tools/agent.d.ts.map +1 -1
  75. package/dist/tools/async-operation.d.ts +168 -0
  76. package/dist/tools/async-operation.d.ts.map +1 -0
  77. package/dist/tools/cli-args.d.ts +1 -1
  78. package/dist/tools/cli-args.d.ts.map +1 -1
  79. package/dist/tools/cli-command.d.ts +29 -0
  80. package/dist/tools/cli-command.d.ts.map +1 -0
  81. package/dist/tools/cli-format.d.ts +2 -2
  82. package/dist/tools/cli-format.d.ts.map +1 -1
  83. package/dist/tools/cli-wait.d.ts +11 -2
  84. package/dist/tools/cli-wait.d.ts.map +1 -1
  85. package/dist/tools/cli.d.ts +13 -6
  86. package/dist/tools/cli.d.ts.map +1 -1
  87. package/dist/tools/define-download-tool.d.ts +18 -0
  88. package/dist/tools/define-download-tool.d.ts.map +1 -0
  89. package/dist/tools/define-upload-tool.d.ts +16 -0
  90. package/dist/tools/define-upload-tool.d.ts.map +1 -0
  91. package/dist/tools/define-view-file-tool.d.ts +10 -0
  92. package/dist/tools/define-view-file-tool.d.ts.map +1 -0
  93. package/dist/tools/define-wait-tool.d.ts +22 -0
  94. package/dist/tools/define-wait-tool.d.ts.map +1 -0
  95. package/dist/tools/download-core.d.ts +20 -0
  96. package/dist/tools/download-core.d.ts.map +1 -0
  97. package/dist/tools/execute.d.ts +3 -1
  98. package/dist/tools/execute.d.ts.map +1 -1
  99. package/dist/tools/lifecycle.d.ts +4 -0
  100. package/dist/tools/lifecycle.d.ts.map +1 -0
  101. package/dist/tools/mcp-round.d.ts +0 -1
  102. package/dist/tools/mcp-round.d.ts.map +1 -1
  103. package/dist/tools/mcp-stdio-signals.d.ts +33 -0
  104. package/dist/tools/mcp-stdio-signals.d.ts.map +1 -0
  105. package/dist/tools/mount-download.d.ts +10 -4
  106. package/dist/tools/mount-download.d.ts.map +1 -1
  107. package/dist/tools/mount-upload.d.ts +4 -2
  108. package/dist/tools/mount-upload.d.ts.map +1 -1
  109. package/dist/tools/mount-wait.d.ts.map +1 -1
  110. package/dist/tools/native-definition.d.ts +15 -0
  111. package/dist/tools/native-definition.d.ts.map +1 -0
  112. package/dist/tools/runtime-tool.d.ts +5 -4
  113. package/dist/tools/runtime-tool.d.ts.map +1 -1
  114. package/dist/tools/surface.d.ts.map +1 -1
  115. package/dist/tools/upload-core.d.ts +4 -0
  116. package/dist/tools/upload-core.d.ts.map +1 -0
  117. package/dist/tools/view-file.d.ts +84 -23
  118. package/dist/tools/view-file.d.ts.map +1 -1
  119. package/dist/tools/wait-core.d.ts +16 -2
  120. package/dist/tools/wait-core.d.ts.map +1 -1
  121. package/dist/tools.d.ts +12 -3
  122. package/dist/tools.d.ts.map +1 -1
  123. package/dist/tools.js +827 -495
  124. package/llms-full.txt +720 -53
  125. package/package.json +10 -2
@@ -0,0 +1,156 @@
1
+ import { type ZodObject, type ZodType, z } from 'zod';
2
+ import type { EndpointToolAnnotations, HttpMethod } from '../contract';
3
+ import type { RouteGroup, ServiceDef } from '../server/types';
4
+ import type { CliCommandDefinition } from '../tools/cli-command';
5
+ export declare const SurfaceSchemaDigestsSchema: ZodObject<{
6
+ params: z.ZodNullable<z.ZodString>;
7
+ input: z.ZodNullable<z.ZodString>;
8
+ output: z.ZodNullable<z.ZodString>;
9
+ multipart: z.ZodNullable<z.ZodString>;
10
+ }, z.core.$strip>;
11
+ export declare const SurfaceManifestOperationSchema: ZodObject<{
12
+ kind: z.ZodEnum<{
13
+ contract: "contract";
14
+ runtime: "runtime";
15
+ }>;
16
+ service: z.ZodString;
17
+ action: z.ZodString;
18
+ method: z.ZodEnum<{
19
+ DELETE: "DELETE";
20
+ GET: "GET";
21
+ HEAD: "HEAD";
22
+ PATCH: "PATCH";
23
+ POST: "POST";
24
+ PUT: "PUT";
25
+ }>;
26
+ scope: z.ZodNullable<z.ZodString>;
27
+ description: z.ZodString;
28
+ schemas: ZodObject<{
29
+ params: z.ZodNullable<z.ZodString>;
30
+ input: z.ZodNullable<z.ZodString>;
31
+ output: z.ZodNullable<z.ZodString>;
32
+ multipart: z.ZodNullable<z.ZodString>;
33
+ }, z.core.$strip>;
34
+ http: z.ZodArray<ZodObject<{
35
+ method: z.ZodEnum<{
36
+ DELETE: "DELETE";
37
+ GET: "GET";
38
+ HEAD: "HEAD";
39
+ PATCH: "PATCH";
40
+ POST: "POST";
41
+ PUT: "PUT";
42
+ }>;
43
+ path: z.ZodString;
44
+ }, z.core.$strip>>;
45
+ tools: z.ZodRecord<z.ZodEnum<{
46
+ AGENT: "AGENT";
47
+ CLI: "CLI";
48
+ MCP: "MCP";
49
+ }> & z.core.$partial, z.ZodString>;
50
+ }, z.core.$strip>;
51
+ export declare const SurfaceManifestCliCommandSchema: ZodObject<{
52
+ name: z.ZodString;
53
+ description: z.ZodString;
54
+ input: z.ZodString;
55
+ output: z.ZodNullable<z.ZodString>;
56
+ }, z.core.$strip>;
57
+ export declare const SurfaceManifestExtensionSchema: ZodObject<{
58
+ name: z.ZodString;
59
+ transport: z.ZodEnum<{
60
+ AGENT: "AGENT";
61
+ CLI: "CLI";
62
+ HTTP: "HTTP";
63
+ MCP: "MCP";
64
+ }>;
65
+ }, z.core.$strip>;
66
+ export declare const SurfaceManifestSchema: ZodObject<{
67
+ manifestVersion: z.ZodLiteral<1>;
68
+ digestVersion: z.ZodLiteral<1>;
69
+ operations: z.ZodArray<ZodObject<{
70
+ kind: z.ZodEnum<{
71
+ contract: "contract";
72
+ runtime: "runtime";
73
+ }>;
74
+ service: z.ZodString;
75
+ action: z.ZodString;
76
+ method: z.ZodEnum<{
77
+ DELETE: "DELETE";
78
+ GET: "GET";
79
+ HEAD: "HEAD";
80
+ PATCH: "PATCH";
81
+ POST: "POST";
82
+ PUT: "PUT";
83
+ }>;
84
+ scope: z.ZodNullable<z.ZodString>;
85
+ description: z.ZodString;
86
+ schemas: ZodObject<{
87
+ params: z.ZodNullable<z.ZodString>;
88
+ input: z.ZodNullable<z.ZodString>;
89
+ output: z.ZodNullable<z.ZodString>;
90
+ multipart: z.ZodNullable<z.ZodString>;
91
+ }, z.core.$strip>;
92
+ http: z.ZodArray<ZodObject<{
93
+ method: z.ZodEnum<{
94
+ DELETE: "DELETE";
95
+ GET: "GET";
96
+ HEAD: "HEAD";
97
+ PATCH: "PATCH";
98
+ POST: "POST";
99
+ PUT: "PUT";
100
+ }>;
101
+ path: z.ZodString;
102
+ }, z.core.$strip>>;
103
+ tools: z.ZodRecord<z.ZodEnum<{
104
+ AGENT: "AGENT";
105
+ CLI: "CLI";
106
+ MCP: "MCP";
107
+ }> & z.core.$partial, z.ZodString>;
108
+ }, z.core.$strip>>;
109
+ cliOnly: z.ZodArray<ZodObject<{
110
+ name: z.ZodString;
111
+ description: z.ZodString;
112
+ input: z.ZodString;
113
+ output: z.ZodNullable<z.ZodString>;
114
+ }, z.core.$strip>>;
115
+ extensions: z.ZodArray<ZodObject<{
116
+ name: z.ZodString;
117
+ transport: z.ZodEnum<{
118
+ AGENT: "AGENT";
119
+ CLI: "CLI";
120
+ HTTP: "HTTP";
121
+ MCP: "MCP";
122
+ }>;
123
+ }, z.core.$strip>>;
124
+ }, z.core.$strip>;
125
+ export type SurfaceManifest = z.infer<typeof SurfaceManifestSchema>;
126
+ export type SurfaceManifestOperation = z.infer<typeof SurfaceManifestOperationSchema>;
127
+ export type SurfaceManifestExtension = z.infer<typeof SurfaceManifestExtensionSchema>;
128
+ /** Peer-free structural subset needed to describe a pathless runtime operation. */
129
+ export interface SurfaceRuntimeToolDefinition {
130
+ name: string;
131
+ description: string;
132
+ identity: {
133
+ serviceName: string;
134
+ action: string;
135
+ method: HttpMethod;
136
+ scope?: string;
137
+ };
138
+ input: ZodObject;
139
+ output?: ZodType;
140
+ transports?: readonly ('MCP' | 'AGENT' | 'CLI')[];
141
+ annotations?: EndpointToolAnnotations;
142
+ }
143
+ export interface SurfaceManifestConfig {
144
+ services?: readonly ServiceDef[];
145
+ groups?: readonly Pick<RouteGroup, 'pathPrefix' | 'services'>[];
146
+ scopePrefixes?: Readonly<Record<string, string>>;
147
+ runtimeTools?: readonly SurfaceRuntimeToolDefinition[];
148
+ cliCommands?: readonly CliCommandDefinition[];
149
+ extensions?: readonly SurfaceManifestExtension[];
150
+ }
151
+ /** Canonical bytes used by snapshots and schema digests. Arrays retain order. */
152
+ export declare function serializeSurfaceValue(value: unknown): string;
153
+ /** Build one versioned snapshot of the declared HTTP/tool/CLI surface. */
154
+ export declare function buildSurfaceManifest(config: SurfaceManifestConfig): SurfaceManifest;
155
+ export declare function assertSurfaceManifestSnapshot(manifest: SurfaceManifest, snapshot: SurfaceManifest): void;
156
+ //# sourceMappingURL=surface-manifest.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"surface-manifest.d.ts","sourceRoot":"","sources":["../../src/testing/surface-manifest.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,SAAS,EAAE,KAAK,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACtD,OAAO,KAAK,EAAE,uBAAuB,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEvE,OAAO,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC9D,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAOjE,eAAO,MAAM,0BAA0B;;;;;iBAKrC,CAAC;AAEH,eAAO,MAAM,8BAA8B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAUzC,CAAC;AAEH,eAAO,MAAM,+BAA+B;;;;;iBAK1C,CAAC;AAEH,eAAO,MAAM,8BAA8B;;;;;;;;iBAGzC,CAAC;AAEH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAMhC,CAAC;AAEH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AACpE,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,8BAA8B,CAAC,CAAC;AACtF,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,8BAA8B,CAAC,CAAC;AAEtF,mFAAmF;AACnF,MAAM,WAAW,4BAA4B;IAC3C,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE;QACR,WAAW,EAAE,MAAM,CAAC;QACpB,MAAM,EAAE,MAAM,CAAC;QACf,MAAM,EAAE,UAAU,CAAC;QACnB,KAAK,CAAC,EAAE,MAAM,CAAC;KAChB,CAAC;IACF,KAAK,EAAE,SAAS,CAAC;IACjB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,UAAU,CAAC,EAAE,SAAS,CAAC,KAAK,GAAG,OAAO,GAAG,KAAK,CAAC,EAAE,CAAC;IAClD,WAAW,CAAC,EAAE,uBAAuB,CAAC;CACvC;AAED,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,EAAE,SAAS,UAAU,EAAE,CAAC;IACjC,MAAM,CAAC,EAAE,SAAS,IAAI,CAAC,UAAU,EAAE,YAAY,GAAG,UAAU,CAAC,EAAE,CAAC;IAChE,aAAa,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IACjD,YAAY,CAAC,EAAE,SAAS,4BAA4B,EAAE,CAAC;IACvD,WAAW,CAAC,EAAE,SAAS,oBAAoB,EAAE,CAAC;IAC9C,UAAU,CAAC,EAAE,SAAS,wBAAwB,EAAE,CAAC;CAClD;AAkBD,iFAAiF;AACjF,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAE5D;AAoDD,0EAA0E;AAC1E,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,qBAAqB,GAAG,eAAe,CA0InF;AAED,wBAAgB,6BAA6B,CAC3C,QAAQ,EAAE,eAAe,EACzB,QAAQ,EAAE,eAAe,GACxB,IAAI,CAQN"}
package/dist/testing.d.ts CHANGED
@@ -31,4 +31,6 @@ export declare function createHandlerTestClient<T extends Record<string, Endpoin
31
31
  export declare function createHandlerTestClients<T extends Record<string, ContractDef<Record<string, EndpointDef>, string>>, TServer = unknown, const K extends string = never>(config: HandlerTestClientsConfig<T, TServer, K>): {
32
32
  [P in keyof T]: ScopedHttpClient<T[P]['endpoints'], ScopedKeys<K>>;
33
33
  };
34
+ export { assertSurfaceDiscovery, type ConformanceTransport, type RunSurfaceProbesConfig, runSurfaceProbes, type SurfaceDiscoveryObservation, type SurfaceProbe, type SurfaceProbeDriver, type TransportObservation, TransportObservationSchema, } from './testing/surface-conformance';
35
+ export { assertSurfaceManifestSnapshot, buildSurfaceManifest, type SurfaceManifest, type SurfaceManifestConfig, type SurfaceManifestExtension, SurfaceManifestExtensionSchema, type SurfaceManifestOperation, SurfaceManifestOperationSchema, SurfaceManifestSchema, type SurfaceRuntimeToolDefinition, SurfaceSchemaDigestsSchema, serializeSurfaceValue, } from './testing/surface-manifest';
34
36
  //# sourceMappingURL=testing.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"testing.d.ts","sourceRoot":"","sources":["../src/testing.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACL,KAAK,YAAY,EAEjB,KAAK,oBAAoB,EAGzB,KAAK,UAAU,EAChB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAC7E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAEnD,MAAM,MAAM,yBAAyB,GAAG,IAAI,CAAC,YAAY,EAAE,SAAS,GAAG,OAAO,CAAC,CAAC;AAEhF,MAAM,WAAW,0BAA0B,CAAC,OAAO;IACjD,OAAO,EAAE,YAAY,CAAC,OAAO,CAAC,CAAC;IAC/B,2DAA2D;IAC3D,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,qFAAqF;IACrF,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,6EAA6E;IAC7E,MAAM,CAAC,EAAE,yBAAyB,CAAC;IACnC,2DAA2D;IAC3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A0B,GAC3B,MAAM,+BAA+B,CAAC;AACvC,OAAO,EACL,6BAA6B,EAC7B,oBAAoB,EACpB,KAAK,eAAe,EACpB,KAAK,qBAAqB,EAC1B,KAAK,wBAAwB,EAC7B,8BAA8B,EAC9B,KAAK,wBAAwB,EAC7B,8BAA8B,EAC9B,qBAAqB,EACrB,KAAK,4BAA4B,EACjC,0BAA0B,EAC1B,qBAAqB,GACtB,MAAM,4BAA4B,CAAC"}
package/dist/testing.js CHANGED
@@ -1,9 +1,362 @@
1
+ import {
2
+ assertToolName,
3
+ assertUniqueToolName,
4
+ toToolName
5
+ } from "./index-k4dftwf7.js";
6
+ import {
7
+ toJsonSchema
8
+ } from "./index-cby4ar3v.js";
1
9
  import {
2
10
  createClient,
3
11
  createClients
4
- } from "./index-e1es808r.js";
12
+ } from "./index-qh4xevf5.js";
5
13
  import"./index-48ffdxgk.js";
6
- import"./index-bmnhqtya.js";
14
+ import {
15
+ isRecord
16
+ } from "./index-7eq9va6e.js";
17
+ import"./index-1bx83sw4.js";
18
+
19
+ // src/testing/surface-conformance.ts
20
+ import { z as z2 } from "zod";
21
+
22
+ // src/testing/surface-manifest.ts
23
+ import { createHash } from "node:crypto";
24
+ import { z } from "zod";
25
+ var HttpMethodSchema = z.enum(["GET", "POST", "PUT", "PATCH", "DELETE", "HEAD"]);
26
+ var ToolTransportSchema = z.enum(["MCP", "AGENT", "CLI"]);
27
+ var SurfaceSchemaDigestsSchema = z.object({
28
+ params: z.string().nullable(),
29
+ input: z.string().nullable(),
30
+ output: z.string().nullable(),
31
+ multipart: z.string().nullable()
32
+ });
33
+ var SurfaceManifestOperationSchema = z.object({
34
+ kind: z.enum(["contract", "runtime"]),
35
+ service: z.string(),
36
+ action: z.string(),
37
+ method: HttpMethodSchema,
38
+ scope: z.string().nullable(),
39
+ description: z.string(),
40
+ schemas: SurfaceSchemaDigestsSchema,
41
+ http: z.array(z.object({ method: HttpMethodSchema, path: z.string() })),
42
+ tools: z.partialRecord(ToolTransportSchema, z.string())
43
+ });
44
+ var SurfaceManifestCliCommandSchema = z.object({
45
+ name: z.string(),
46
+ description: z.string(),
47
+ input: z.string(),
48
+ output: z.string().nullable()
49
+ });
50
+ var SurfaceManifestExtensionSchema = z.object({
51
+ name: z.string(),
52
+ transport: z.enum(["HTTP", "MCP", "AGENT", "CLI"])
53
+ });
54
+ var SurfaceManifestSchema = z.object({
55
+ manifestVersion: z.literal(1),
56
+ digestVersion: z.literal(1),
57
+ operations: z.array(SurfaceManifestOperationSchema),
58
+ cliOnly: z.array(SurfaceManifestCliCommandSchema),
59
+ extensions: z.array(SurfaceManifestExtensionSchema)
60
+ });
61
+ function compareCodepoints(left, right) {
62
+ if (left < right)
63
+ return -1;
64
+ if (left > right)
65
+ return 1;
66
+ return 0;
67
+ }
68
+ function canonicalValue(value) {
69
+ if (Array.isArray(value))
70
+ return value.map(canonicalValue);
71
+ if (!isRecord(value))
72
+ return value;
73
+ const result = {};
74
+ for (const key of Object.keys(value).sort(compareCodepoints)) {
75
+ result[key] = canonicalValue(value[key]);
76
+ }
77
+ return result;
78
+ }
79
+ function serializeSurfaceValue(value) {
80
+ return JSON.stringify(canonicalValue(value));
81
+ }
82
+ function digestValue(value) {
83
+ return createHash("sha256").update(serializeSurfaceValue(value)).digest("hex").slice(0, 16);
84
+ }
85
+ function canonicalSchemaValue(value, parentKey) {
86
+ if (Array.isArray(value)) {
87
+ const entries = value.map((entry) => canonicalSchemaValue(entry));
88
+ return parentKey === "required" && entries.every((entry) => typeof entry === "string") ? entries.sort((left, right) => compareCodepoints(String(left), String(right))) : entries;
89
+ }
90
+ if (!isRecord(value))
91
+ return value;
92
+ const result = {};
93
+ for (const key of Object.keys(value).sort(compareCodepoints)) {
94
+ result[key] = canonicalSchemaValue(value[key], key);
95
+ }
96
+ return result;
97
+ }
98
+ function schemaDigest(schema, io) {
99
+ if (!schema)
100
+ return null;
101
+ return digestValue(canonicalSchemaValue(toJsonSchema(schema, io, "any")));
102
+ }
103
+ function multipartDigest(value) {
104
+ return value === undefined ? null : digestValue(value);
105
+ }
106
+ function joinPath(...parts) {
107
+ const joined = parts.filter((part) => Boolean(part)).map((part) => part.replace(/^\/+|\/+$/g, "")).filter(Boolean).join("/");
108
+ return `/${joined}`;
109
+ }
110
+ function operationKey(kind, service, action) {
111
+ return `${kind}\x00${service}\x00${action}`;
112
+ }
113
+ function uniqueToolServices(config) {
114
+ const services = new Set;
115
+ for (const service of config.services ?? [])
116
+ services.add(service);
117
+ for (const group of config.groups ?? []) {
118
+ for (const service of group.services)
119
+ services.add(service);
120
+ }
121
+ return [...services];
122
+ }
123
+ function buildSurfaceManifest(config) {
124
+ const operations = new Map;
125
+ const addContract = (service, prefix) => {
126
+ for (const method of Object.values(service.methods)) {
127
+ const key = operationKey("contract", service.name, method.key);
128
+ const existing = operations.get(key);
129
+ const http = !method.expose || method.expose.includes("HTTP") ? [{ method: method.method, path: joinPath(prefix, service.prefix, method.path) }] : [];
130
+ if (existing) {
131
+ existing.http.push(...http);
132
+ continue;
133
+ }
134
+ operations.set(key, {
135
+ kind: "contract",
136
+ service: service.name,
137
+ action: method.key,
138
+ method: method.method,
139
+ scope: method.scope ?? service.scope ?? null,
140
+ description: method.desc,
141
+ schemas: {
142
+ params: schemaDigest(method.paramsSchema, "input"),
143
+ input: schemaDigest(method.inputSchema, "input"),
144
+ output: schemaDigest(method.outputSchema, "output"),
145
+ multipart: multipartDigest(method.multipart)
146
+ },
147
+ http,
148
+ tools: {}
149
+ });
150
+ }
151
+ };
152
+ for (const service of config.services ?? []) {
153
+ addContract(service, config.scopePrefixes?.[service.scope] ?? "");
154
+ }
155
+ for (const group of config.groups ?? []) {
156
+ for (const service of group.services)
157
+ addContract(service, group.pathPrefix ?? "");
158
+ }
159
+ for (const definition of config.runtimeTools ?? []) {
160
+ const identity = definition.identity;
161
+ const key = operationKey("runtime", identity.serviceName, identity.action);
162
+ if (operations.has(key)) {
163
+ throw new Error(`Duplicate runtime operation identity ${identity.serviceName}.${identity.action}`);
164
+ }
165
+ operations.set(key, {
166
+ kind: "runtime",
167
+ service: identity.serviceName,
168
+ action: identity.action,
169
+ method: identity.method,
170
+ scope: identity.scope ?? null,
171
+ description: definition.description,
172
+ schemas: {
173
+ params: null,
174
+ input: schemaDigest(definition.input, "input"),
175
+ output: schemaDigest(definition.output, "output"),
176
+ multipart: null
177
+ },
178
+ http: [],
179
+ tools: {}
180
+ });
181
+ }
182
+ const usedNames = {
183
+ MCP: new Set,
184
+ AGENT: new Set,
185
+ CLI: new Set
186
+ };
187
+ const addTool = (operation, name, transport) => {
188
+ if (transport !== "CLI")
189
+ assertToolName(name, operation.service, operation.action);
190
+ const surface = transport === "CLI" ? "CLI command" : transport === "MCP" ? "MCP tool name" : "agent tool name";
191
+ assertUniqueToolName(name, usedNames[transport].has(name), surface);
192
+ usedNames[transport].add(name);
193
+ operation.tools[transport] = name;
194
+ };
195
+ for (const service of uniqueToolServices(config)) {
196
+ for (const method of Object.values(service.methods)) {
197
+ if (method.multipart || method.rawBody || method.rawResponse || method.responseMeta)
198
+ continue;
199
+ const operation = operations.get(operationKey("contract", service.name, method.key));
200
+ if (!operation)
201
+ continue;
202
+ const name = method.toolName ?? toToolName(service.name, method.key);
203
+ if (!method.expose || method.expose.includes("MCP"))
204
+ addTool(operation, name, "MCP");
205
+ if (!method.expose || method.expose.includes("AGENT"))
206
+ addTool(operation, name, "AGENT");
207
+ if (method.expose?.includes("CLI"))
208
+ addTool(operation, name, "CLI");
209
+ }
210
+ }
211
+ for (const definition of config.runtimeTools ?? []) {
212
+ const operation = operations.get(operationKey("runtime", definition.identity.serviceName, definition.identity.action));
213
+ if (!operation)
214
+ continue;
215
+ const transports = definition.transports ?? [
216
+ "MCP",
217
+ "AGENT"
218
+ ];
219
+ for (const transport of transports)
220
+ addTool(operation, definition.name, transport);
221
+ }
222
+ const cliOnly = (config.cliCommands ?? []).map((command) => ({
223
+ name: command.name,
224
+ description: command.description,
225
+ input: schemaDigest(command.input, "input") ?? digestValue({}),
226
+ output: schemaDigest(command.output, "output")
227
+ })).sort((left, right) => compareCodepoints(left.name, right.name));
228
+ return SurfaceManifestSchema.parse({
229
+ manifestVersion: 1,
230
+ digestVersion: 1,
231
+ operations: [...operations.values()].sort((left, right) => compareCodepoints(left.service, right.service) || compareCodepoints(left.action, right.action) || compareCodepoints(left.kind, right.kind)),
232
+ cliOnly,
233
+ extensions: [...config.extensions ?? []].sort((left, right) => compareCodepoints(left.transport, right.transport) || compareCodepoints(left.name, right.name))
234
+ });
235
+ }
236
+ function assertSurfaceManifestSnapshot(manifest, snapshot) {
237
+ const actual = serializeSurfaceValue(SurfaceManifestSchema.parse(manifest));
238
+ const expected = serializeSurfaceValue(SurfaceManifestSchema.parse(snapshot));
239
+ if (actual !== expected) {
240
+ throw new Error(`Surface manifest diverged from its committed snapshot
241
+ expected: ${expected}
242
+ actual: ${actual}`);
243
+ }
244
+ }
245
+
246
+ // src/testing/surface-conformance.ts
247
+ var ProbeOutcomeSchema = z2.enum(["success", "validation_error", "domain_error", "aborted"]);
248
+ var TransportObservationSchema = z2.object({
249
+ outcome: ProbeOutcomeSchema,
250
+ code: z2.string().optional(),
251
+ data: z2.unknown().optional(),
252
+ diagnostic: z2.string().optional()
253
+ });
254
+ function sorted(values) {
255
+ return [...values].sort((left, right) => left < right ? -1 : left > right ? 1 : 0);
256
+ }
257
+ function assertSameSet(label, expectedValues, actualValues) {
258
+ const expected = sorted(expectedValues);
259
+ const actual = sorted(actualValues);
260
+ if (serializeSurfaceValue(expected) === serializeSurfaceValue(actual))
261
+ return;
262
+ throw new Error(`${label} mismatch
263
+ expected: ${expected.join(", ") || "(empty)"}
264
+ actual: ${actual.join(", ") || "(empty)"}`);
265
+ }
266
+ function openApiOperations(document) {
267
+ return Object.entries(document.paths).flatMap(([path, item]) => Object.keys(item).filter((method) => ["get", "post", "put", "patch", "delete", "head"].includes(method)).map((method) => `${method.toUpperCase()}:${path}`));
268
+ }
269
+ function expectedToolNames(operations, transport) {
270
+ return operations.flatMap((operation) => {
271
+ const name = operation.tools[transport];
272
+ return name ? [name] : [];
273
+ });
274
+ }
275
+ function assertSurfaceDiscovery(manifest, observed) {
276
+ if (observed.openApi) {
277
+ assertSameSet("HTTP/OpenAPI", manifest.operations.flatMap((operation) => operation.http.map((entry) => `${entry.method}:${entry.path.replace(/:([^/]+)/g, "{$1}")}`)), openApiOperations(observed.openApi));
278
+ }
279
+ for (const transport of ["MCP", "AGENT", "CLI"]) {
280
+ const names = observed[transport];
281
+ if (names)
282
+ assertSameSet(`${transport} discovery`, expectedToolNames(manifest.operations, transport), names);
283
+ }
284
+ if (observed.cliOnly) {
285
+ assertSameSet("CLI-only discovery", manifest.cliOnly.map((command) => command.name), observed.cliOnly);
286
+ }
287
+ for (const transport of ["HTTP", "MCP", "AGENT", "CLI"]) {
288
+ const names = observed.extensions?.[transport];
289
+ if (!names)
290
+ continue;
291
+ assertSameSet(`${transport} extension discovery`, manifest.extensions.filter((extension) => extension.transport === transport).map((extension) => extension.name), names);
292
+ }
293
+ }
294
+ function boundedObservation(observation, maxDiagnosticBytes) {
295
+ const parsed = TransportObservationSchema.parse(observation);
296
+ if (!parsed.diagnostic)
297
+ return parsed;
298
+ const bytes = new TextEncoder().encode(parsed.diagnostic);
299
+ if (bytes.byteLength <= maxDiagnosticBytes)
300
+ return parsed;
301
+ return {
302
+ ...parsed,
303
+ diagnostic: new TextDecoder().decode(bytes.slice(0, maxDiagnosticBytes))
304
+ };
305
+ }
306
+ async function invokeBounded(driver, fixture, signal) {
307
+ signal.throwIfAborted();
308
+ let removeAbortListener = () => {
309
+ return;
310
+ };
311
+ const aborted = new Promise((_resolve, reject) => {
312
+ const onAbort = () => reject(signal.reason);
313
+ signal.addEventListener("abort", onAbort, { once: true });
314
+ removeAbortListener = () => signal.removeEventListener("abort", onAbort);
315
+ });
316
+ try {
317
+ return await Promise.race([driver.invoke(fixture, signal), aborted]);
318
+ } finally {
319
+ removeAbortListener();
320
+ }
321
+ }
322
+ async function runSurfaceProbes({
323
+ probes,
324
+ drivers,
325
+ signal,
326
+ timeoutMs = 1e4,
327
+ maxDiagnosticBytes = 4096
328
+ }) {
329
+ if (!Number.isFinite(timeoutMs) || timeoutMs <= 0) {
330
+ throw new TypeError("Surface probe timeoutMs must be a finite positive number");
331
+ }
332
+ if (!Number.isInteger(maxDiagnosticBytes) || maxDiagnosticBytes <= 0) {
333
+ throw new TypeError("Surface probe maxDiagnosticBytes must be a positive integer");
334
+ }
335
+ for (const probe of probes) {
336
+ await probe.setup?.();
337
+ try {
338
+ for (const transport of probe.transports) {
339
+ const driver = drivers[transport];
340
+ if (!driver)
341
+ throw new Error(`Surface probe "${probe.name}" has no ${transport} driver`);
342
+ const timeoutSignal = AbortSignal.timeout(timeoutMs);
343
+ const invokeSignal = signal ? AbortSignal.any([signal, timeoutSignal]) : timeoutSignal;
344
+ const actual = boundedObservation(await invokeBounded(driver, probe.fixture, invokeSignal), maxDiagnosticBytes);
345
+ const expected = probe.expected[transport];
346
+ if (!expected) {
347
+ throw new Error(`Surface probe "${probe.name}" has no ${transport} expectation`);
348
+ }
349
+ if (serializeSurfaceValue(actual) !== serializeSurfaceValue(expected)) {
350
+ throw new Error(`Surface probe "${probe.name}" ${transport} mismatch
351
+ expected: ${serializeSurfaceValue(expected)}
352
+ actual: ${serializeSurfaceValue(actual)}`);
353
+ }
354
+ }
355
+ } finally {
356
+ await probe.teardown?.();
357
+ }
358
+ }
359
+ }
7
360
 
8
361
  // src/testing.ts
9
362
  function resolveTestBaseUrl(origin, pathPrefix) {
@@ -31,6 +384,16 @@ function createHandlerTestClients(config) {
31
384
  return createClients(config.contracts, createTestClientConfig(config), config.contractConfig);
32
385
  }
33
386
  export {
387
+ SurfaceManifestExtensionSchema,
388
+ SurfaceManifestOperationSchema,
389
+ SurfaceManifestSchema,
390
+ SurfaceSchemaDigestsSchema,
391
+ TransportObservationSchema,
392
+ assertSurfaceDiscovery,
393
+ assertSurfaceManifestSnapshot,
394
+ buildSurfaceManifest,
395
+ createHandlerTestClient,
34
396
  createHandlerTestClients,
35
- createHandlerTestClient
397
+ runSurfaceProbes,
398
+ serializeSurfaceValue
36
399
  };
@@ -1 +1 @@
1
- {"version":3,"file":"agent.d.ts","sourceRoot":"","sources":["../../src/tools/agent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,IAAI,CAAC;AAGlC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EACL,KAAK,WAAW,EAChB,KAAK,aAAa,EAClB,KAAK,aAAa,EAEnB,MAAM,WAAW,CAAC;AACnB,OAAO,EAAqC,KAAK,UAAU,EAAE,MAAM,SAAS,CAAC;AAC7E,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;AAG5D,MAAM,WAAW,YAAY;IAC3B,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAED,MAAM,WAAW,gBAAgB;IAC/B,OAAO,CAAC,EAAE,YAAY,CAAC;IACvB,qCAAqC;IACrC,KAAK,CAAC,EAAE,aAAa,CAAC;IACtB;;;;OAIG;IACH,SAAS,CAAC,EAAE,aAAa,CAAC;IAC1B,MAAM,CAAC,EAAE,UAAU,CAAC;IACpB,+EAA+E;IAC/E,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,mEAAmE;IACnE,aAAa,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;IAC5D,+EAA+E;IAC/E,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,gEAAgE;IAChE,SAAS,CAAC,EAAE,WAAW,CAAC;IACxB,2EAA2E;IAC3E,YAAY,CAAC,EAAE,SAAS,qBAAqB,EAAE,CAAC;CACjD;AAED,wBAAgB,UAAU,CACxB,QAAQ,EAAE,UAAU,GAAG,UAAU,EAAE,EACnC,MAAM,GAAE,gBAAqB,GAC5B,OAAO,CAwET"}
1
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