@aexhq/sdk 0.46.4-canary → 0.50.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 (337) hide show
  1. package/LICENSE +201 -0
  2. package/NOTICE +38 -0
  3. package/README.md +23 -31
  4. package/dist/client/aex.d.ts +33 -0
  5. package/dist/client/aex.js +98 -0
  6. package/dist/client/aex.js.map +1 -0
  7. package/dist/client/credentials.d.ts +25 -0
  8. package/dist/client/credentials.js +97 -0
  9. package/dist/client/credentials.js.map +1 -0
  10. package/dist/client/routing.d.ts +7 -0
  11. package/dist/client/routing.js +29 -0
  12. package/dist/client/routing.js.map +1 -0
  13. package/dist/downloads/download.d.ts +25 -0
  14. package/dist/downloads/download.js +53 -0
  15. package/dist/downloads/download.js.map +1 -0
  16. package/dist/generated/errors.d.ts +12 -0
  17. package/dist/generated/errors.js +81 -0
  18. package/dist/generated/errors.js.map +1 -0
  19. package/dist/generated/resources.d.ts +730 -0
  20. package/dist/generated/resources.js +606 -0
  21. package/dist/generated/resources.js.map +1 -0
  22. package/dist/generated/routes.d.ts +42 -0
  23. package/dist/generated/routes.js +2101 -0
  24. package/dist/generated/routes.js.map +1 -0
  25. package/dist/index.d.ts +20 -50
  26. package/dist/index.js +11 -62
  27. package/dist/index.js.map +1 -1
  28. package/dist/observations/stream.d.ts +1 -0
  29. package/dist/observations/stream.js +18 -0
  30. package/dist/observations/stream.js.map +1 -0
  31. package/dist/transport/errors.d.ts +60 -0
  32. package/dist/transport/errors.js +107 -0
  33. package/dist/transport/errors.js.map +1 -0
  34. package/dist/transport/pagination.d.ts +8 -0
  35. package/dist/transport/pagination.js +34 -0
  36. package/dist/transport/pagination.js.map +1 -0
  37. package/dist/transport/retry.d.ts +21 -0
  38. package/dist/transport/retry.js +37 -0
  39. package/dist/transport/retry.js.map +1 -0
  40. package/dist/transport/transport.d.ts +25 -0
  41. package/dist/transport/transport.js +28 -0
  42. package/dist/transport/transport.js.map +1 -0
  43. package/package.json +63 -30
  44. package/dist/_contracts/account-operations.d.ts +0 -101
  45. package/dist/_contracts/account-operations.js +0 -242
  46. package/dist/_contracts/account-types.d.ts +0 -461
  47. package/dist/_contracts/account-types.js +0 -1
  48. package/dist/_contracts/api-key.d.ts +0 -61
  49. package/dist/_contracts/api-key.js +0 -101
  50. package/dist/_contracts/api-routes.d.ts +0 -20
  51. package/dist/_contracts/api-routes.js +0 -109
  52. package/dist/_contracts/archive-limits.d.ts +0 -3
  53. package/dist/_contracts/archive-limits.js +0 -23
  54. package/dist/_contracts/asset-authoring.d.ts +0 -22
  55. package/dist/_contracts/asset-authoring.js +0 -106
  56. package/dist/_contracts/asset-bundle.d.ts +0 -64
  57. package/dist/_contracts/asset-bundle.js +0 -263
  58. package/dist/_contracts/asset-upload-helper.d.ts +0 -31
  59. package/dist/_contracts/asset-upload-helper.js +0 -84
  60. package/dist/_contracts/billing-admission.d.ts +0 -29
  61. package/dist/_contracts/billing-admission.js +0 -28
  62. package/dist/_contracts/bundle-manifest.d.ts +0 -89
  63. package/dist/_contracts/bundle-manifest.js +0 -158
  64. package/dist/_contracts/canonical-sha256.d.ts +0 -8
  65. package/dist/_contracts/canonical-sha256.js +0 -8
  66. package/dist/_contracts/connection-ticket.d.ts +0 -22
  67. package/dist/_contracts/connection-ticket.js +0 -54
  68. package/dist/_contracts/continuation-event.d.ts +0 -31
  69. package/dist/_contracts/continuation-event.js +0 -6
  70. package/dist/_contracts/contract-parse-error.d.ts +0 -12
  71. package/dist/_contracts/contract-parse-error.js +0 -51
  72. package/dist/_contracts/error-codes.d.ts +0 -26
  73. package/dist/_contracts/error-codes.js +0 -116
  74. package/dist/_contracts/error-factory.d.ts +0 -32
  75. package/dist/_contracts/error-factory.js +0 -174
  76. package/dist/_contracts/event-envelope.d.ts +0 -471
  77. package/dist/_contracts/event-envelope.js +0 -501
  78. package/dist/_contracts/event-stream-client.d.ts +0 -122
  79. package/dist/_contracts/event-stream-client.js +0 -445
  80. package/dist/_contracts/event-view.d.ts +0 -44
  81. package/dist/_contracts/event-view.js +0 -69
  82. package/dist/_contracts/failure-class.d.ts +0 -29
  83. package/dist/_contracts/failure-class.js +0 -73
  84. package/dist/_contracts/http.d.ts +0 -135
  85. package/dist/_contracts/http.js +0 -434
  86. package/dist/_contracts/ids.d.ts +0 -66
  87. package/dist/_contracts/ids.js +0 -119
  88. package/dist/_contracts/index.d.ts +0 -42
  89. package/dist/_contracts/index.js +0 -52
  90. package/dist/_contracts/internal.d.ts +0 -55
  91. package/dist/_contracts/internal.js +0 -113
  92. package/dist/_contracts/models.d.ts +0 -30
  93. package/dist/_contracts/models.js +0 -28
  94. package/dist/_contracts/operation-core.d.ts +0 -36
  95. package/dist/_contracts/operation-core.js +0 -70
  96. package/dist/_contracts/operations.d.ts +0 -218
  97. package/dist/_contracts/operations.js +0 -1496
  98. package/dist/_contracts/otlp-projection.d.ts +0 -78
  99. package/dist/_contracts/otlp-projection.js +0 -171
  100. package/dist/_contracts/post-hook.d.ts +0 -31
  101. package/dist/_contracts/post-hook.js +0 -61
  102. package/dist/_contracts/provider-fault.d.ts +0 -34
  103. package/dist/_contracts/provider-fault.js +0 -68
  104. package/dist/_contracts/retry-core.d.ts +0 -29
  105. package/dist/_contracts/retry-core.js +0 -79
  106. package/dist/_contracts/runner-event.d.ts +0 -117
  107. package/dist/_contracts/runner-event.js +0 -172
  108. package/dist/_contracts/runtime-kind.d.ts +0 -60
  109. package/dist/_contracts/runtime-kind.js +0 -70
  110. package/dist/_contracts/runtime-manifest.d.ts +0 -121
  111. package/dist/_contracts/runtime-manifest.js +0 -83
  112. package/dist/_contracts/runtime-security-profile.d.ts +0 -26
  113. package/dist/_contracts/runtime-security-profile.js +0 -73
  114. package/dist/_contracts/runtime-sizes.d.ts +0 -104
  115. package/dist/_contracts/runtime-sizes.js +0 -111
  116. package/dist/_contracts/runtime-types.d.ts +0 -618
  117. package/dist/_contracts/runtime-types.js +0 -58
  118. package/dist/_contracts/schemas/asset-bundle.d.ts +0 -70
  119. package/dist/_contracts/schemas/asset-bundle.js +0 -107
  120. package/dist/_contracts/schemas/asset-ref.d.ts +0 -61
  121. package/dist/_contracts/schemas/asset-ref.js +0 -118
  122. package/dist/_contracts/schemas/bundle-manifest.d.ts +0 -66
  123. package/dist/_contracts/schemas/bundle-manifest.js +0 -77
  124. package/dist/_contracts/schemas/index.d.ts +0 -32
  125. package/dist/_contracts/schemas/index.js +0 -30
  126. package/dist/_contracts/schemas/mcp-server.d.ts +0 -99
  127. package/dist/_contracts/schemas/mcp-server.js +0 -209
  128. package/dist/_contracts/schemas/models.d.ts +0 -29
  129. package/dist/_contracts/schemas/models.js +0 -51
  130. package/dist/_contracts/schemas/numeric.d.ts +0 -18
  131. package/dist/_contracts/schemas/numeric.js +0 -28
  132. package/dist/_contracts/schemas/post-hook.d.ts +0 -45
  133. package/dist/_contracts/schemas/post-hook.js +0 -68
  134. package/dist/_contracts/schemas/response-assets.d.ts +0 -75
  135. package/dist/_contracts/schemas/response-assets.js +0 -81
  136. package/dist/_contracts/schemas/response-billing.d.ts +0 -208
  137. package/dist/_contracts/schemas/response-billing.js +0 -139
  138. package/dist/_contracts/schemas/response-common.d.ts +0 -132
  139. package/dist/_contracts/schemas/response-common.js +0 -162
  140. package/dist/_contracts/schemas/response-identity.d.ts +0 -648
  141. package/dist/_contracts/schemas/response-identity.js +0 -131
  142. package/dist/_contracts/schemas/response-mcp-servers.d.ts +0 -51
  143. package/dist/_contracts/schemas/response-mcp-servers.js +0 -32
  144. package/dist/_contracts/schemas/response-secrets.d.ts +0 -50
  145. package/dist/_contracts/schemas/response-secrets.js +0 -32
  146. package/dist/_contracts/schemas/response-sessions-internal.d.ts +0 -200
  147. package/dist/_contracts/schemas/response-sessions-internal.js +0 -142
  148. package/dist/_contracts/schemas/response-sessions.d.ts +0 -1598
  149. package/dist/_contracts/schemas/response-sessions.js +0 -377
  150. package/dist/_contracts/schemas/response-webhooks.d.ts +0 -76
  151. package/dist/_contracts/schemas/response-webhooks.js +0 -42
  152. package/dist/_contracts/schemas/response-workspace.d.ts +0 -225
  153. package/dist/_contracts/schemas/response-workspace.js +0 -99
  154. package/dist/_contracts/schemas/runtime-kind.d.ts +0 -31
  155. package/dist/_contracts/schemas/runtime-kind.js +0 -29
  156. package/dist/_contracts/schemas/runtime-security-profile.d.ts +0 -28
  157. package/dist/_contracts/schemas/runtime-security-profile.js +0 -26
  158. package/dist/_contracts/schemas/runtime-sizes.d.ts +0 -70
  159. package/dist/_contracts/schemas/runtime-sizes.js +0 -127
  160. package/dist/_contracts/schemas/session-limits.d.ts +0 -34
  161. package/dist/_contracts/schemas/session-limits.js +0 -39
  162. package/dist/_contracts/schemas/session-machine.d.ts +0 -23
  163. package/dist/_contracts/schemas/session-machine.js +0 -24
  164. package/dist/_contracts/schemas/session-request-config.d.ts +0 -58
  165. package/dist/_contracts/schemas/session-request-config.js +0 -134
  166. package/dist/_contracts/schemas/session-webhook.d.ts +0 -11
  167. package/dist/_contracts/schemas/session-webhook.js +0 -38
  168. package/dist/_contracts/schemas/side-effect-audit.d.ts +0 -98
  169. package/dist/_contracts/schemas/side-effect-audit.js +0 -102
  170. package/dist/_contracts/schemas/submission-assets.d.ts +0 -117
  171. package/dist/_contracts/schemas/submission-assets.js +0 -147
  172. package/dist/_contracts/schemas/submission-body.d.ts +0 -251
  173. package/dist/_contracts/schemas/submission-body.js +0 -378
  174. package/dist/_contracts/schemas/submission-environment.d.ts +0 -79
  175. package/dist/_contracts/schemas/submission-environment.js +0 -179
  176. package/dist/_contracts/schemas/submission-request.d.ts +0 -158
  177. package/dist/_contracts/schemas/submission-request.js +0 -49
  178. package/dist/_contracts/schemas/submission-secrets.d.ts +0 -47
  179. package/dist/_contracts/schemas/submission-secrets.js +0 -108
  180. package/dist/_contracts/schemas/wire.d.ts +0 -118
  181. package/dist/_contracts/schemas/wire.js +0 -171
  182. package/dist/_contracts/schemas/workspace-resources.d.ts +0 -50
  183. package/dist/_contracts/schemas/workspace-resources.js +0 -87
  184. package/dist/_contracts/sdk-errors.d.ts +0 -212
  185. package/dist/_contracts/sdk-errors.js +0 -313
  186. package/dist/_contracts/sdk-secrets.d.ts +0 -67
  187. package/dist/_contracts/sdk-secrets.js +0 -427
  188. package/dist/_contracts/session-archive.d.ts +0 -16
  189. package/dist/_contracts/session-archive.js +0 -92
  190. package/dist/_contracts/session-artifacts.d.ts +0 -189
  191. package/dist/_contracts/session-artifacts.js +0 -264
  192. package/dist/_contracts/session-config.d.ts +0 -373
  193. package/dist/_contracts/session-config.js +0 -562
  194. package/dist/_contracts/session-cost-types.d.ts +0 -211
  195. package/dist/_contracts/session-cost-types.js +0 -69
  196. package/dist/_contracts/session-cost.d.ts +0 -8
  197. package/dist/_contracts/session-cost.js +0 -582
  198. package/dist/_contracts/session-custody.d.ts +0 -165
  199. package/dist/_contracts/session-custody.js +0 -345
  200. package/dist/_contracts/session-file-query.d.ts +0 -14
  201. package/dist/_contracts/session-file-query.js +0 -178
  202. package/dist/_contracts/session-record.d.ts +0 -112
  203. package/dist/_contracts/session-record.js +0 -165
  204. package/dist/_contracts/session-retention.d.ts +0 -201
  205. package/dist/_contracts/session-retention.js +0 -450
  206. package/dist/_contracts/side-effect-audit.d.ts +0 -126
  207. package/dist/_contracts/side-effect-audit.js +0 -520
  208. package/dist/_contracts/sse.d.ts +0 -74
  209. package/dist/_contracts/sse.js +0 -227
  210. package/dist/_contracts/stable.d.ts +0 -45
  211. package/dist/_contracts/stable.js +0 -62
  212. package/dist/_contracts/status.d.ts +0 -25
  213. package/dist/_contracts/status.js +0 -57
  214. package/dist/_contracts/submission-limits.d.ts +0 -61
  215. package/dist/_contracts/submission-limits.js +0 -60
  216. package/dist/_contracts/submission.d.ts +0 -547
  217. package/dist/_contracts/submission.js +0 -812
  218. package/dist/_contracts/suggest.d.ts +0 -15
  219. package/dist/_contracts/suggest.js +0 -53
  220. package/dist/_contracts/testing/response-bindings.d.ts +0 -45
  221. package/dist/_contracts/testing/response-bindings.js +0 -256
  222. package/dist/_contracts/testing/wire-conformance-entry.d.ts +0 -10
  223. package/dist/_contracts/testing/wire-conformance-entry.js +0 -8
  224. package/dist/_contracts/testing/wire-conformance.d.ts +0 -169
  225. package/dist/_contracts/testing/wire-conformance.js +0 -276
  226. package/dist/_contracts/turn-trace.d.ts +0 -28
  227. package/dist/_contracts/turn-trace.js +0 -1
  228. package/dist/_contracts/unknown-field-error.d.ts +0 -13
  229. package/dist/_contracts/unknown-field-error.js +0 -21
  230. package/dist/_contracts/value-guards.d.ts +0 -20
  231. package/dist/_contracts/value-guards.js +0 -34
  232. package/dist/_contracts/webhook-verify.d.ts +0 -34
  233. package/dist/_contracts/webhook-verify.js +0 -93
  234. package/dist/_contracts/wire-observer.d.ts +0 -49
  235. package/dist/_contracts/wire-observer.js +0 -34
  236. package/dist/_contracts/workflow-status.d.ts +0 -7
  237. package/dist/_contracts/workflow-status.js +0 -43
  238. package/dist/_contracts/workspace-resources.d.ts +0 -98
  239. package/dist/_contracts/workspace-resources.js +0 -39
  240. package/dist/archive-limits.d.ts +0 -1
  241. package/dist/archive-limits.js +0 -2
  242. package/dist/archive-limits.js.map +0 -1
  243. package/dist/asset-upload.d.ts +0 -47
  244. package/dist/asset-upload.js +0 -269
  245. package/dist/asset-upload.js.map +0 -1
  246. package/dist/bundle.d.ts +0 -9
  247. package/dist/bundle.js +0 -20
  248. package/dist/bundle.js.map +0 -1
  249. package/dist/canonical-zip.d.ts +0 -68
  250. package/dist/canonical-zip.js +0 -355
  251. package/dist/canonical-zip.js.map +0 -1
  252. package/dist/cli.mjs +0 -12048
  253. package/dist/cli.mjs.sha256 +0 -1
  254. package/dist/client-types.d.ts +0 -192
  255. package/dist/client-types.js +0 -2
  256. package/dist/client-types.js.map +0 -1
  257. package/dist/client.d.ts +0 -464
  258. package/dist/client.js +0 -1207
  259. package/dist/client.js.map +0 -1
  260. package/dist/event-projection.d.ts +0 -22
  261. package/dist/event-projection.js +0 -380
  262. package/dist/event-projection.js.map +0 -1
  263. package/dist/fetch-archive.d.ts +0 -16
  264. package/dist/fetch-archive.js +0 -252
  265. package/dist/fetch-archive.js.map +0 -1
  266. package/dist/file.d.ts +0 -96
  267. package/dist/file.js +0 -272
  268. package/dist/file.js.map +0 -1
  269. package/dist/instructions.d.ts +0 -20
  270. package/dist/instructions.js +0 -40
  271. package/dist/instructions.js.map +0 -1
  272. package/dist/legacy-session-provider-fault.d.ts +0 -7
  273. package/dist/legacy-session-provider-fault.js +0 -38
  274. package/dist/legacy-session-provider-fault.js.map +0 -1
  275. package/dist/mcp-server.d.ts +0 -84
  276. package/dist/mcp-server.js +0 -117
  277. package/dist/mcp-server.js.map +0 -1
  278. package/dist/node-fs.d.ts +0 -29
  279. package/dist/node-fs.js +0 -19
  280. package/dist/node-fs.js.map +0 -1
  281. package/dist/node-walk.d.ts +0 -69
  282. package/dist/node-walk.js +0 -151
  283. package/dist/node-walk.js.map +0 -1
  284. package/dist/path-basename.d.ts +0 -5
  285. package/dist/path-basename.js +0 -9
  286. package/dist/path-basename.js.map +0 -1
  287. package/dist/retry.d.ts +0 -70
  288. package/dist/retry.js +0 -155
  289. package/dist/retry.js.map +0 -1
  290. package/dist/secret.d.ts +0 -65
  291. package/dist/secret.js +0 -110
  292. package/dist/secret.js.map +0 -1
  293. package/dist/session-validate.d.ts +0 -100
  294. package/dist/session-validate.js +0 -303
  295. package/dist/session-validate.js.map +0 -1
  296. package/dist/skill.d.ts +0 -99
  297. package/dist/skill.js +0 -169
  298. package/dist/skill.js.map +0 -1
  299. package/dist/submission-wire.d.ts +0 -13
  300. package/dist/submission-wire.js +0 -69
  301. package/dist/submission-wire.js.map +0 -1
  302. package/dist/tool.d.ts +0 -41
  303. package/dist/tool.js +0 -76
  304. package/dist/tool.js.map +0 -1
  305. package/dist/version.d.ts +0 -9
  306. package/dist/version.js +0 -10
  307. package/dist/version.js.map +0 -1
  308. package/docs/authentication.md +0 -125
  309. package/docs/billing.md +0 -164
  310. package/docs/cleanup.md +0 -27
  311. package/docs/concepts/agent-tools.md +0 -47
  312. package/docs/concepts/composition.md +0 -60
  313. package/docs/concepts/providers-and-runtimes.md +0 -121
  314. package/docs/concepts/sessions.md +0 -51
  315. package/docs/concepts/subagents.md +0 -35
  316. package/docs/credentials.md +0 -116
  317. package/docs/defaults.md +0 -51
  318. package/docs/errors.md +0 -258
  319. package/docs/events.md +0 -143
  320. package/docs/files.md +0 -130
  321. package/docs/limits-and-quotas.md +0 -114
  322. package/docs/limits.md +0 -51
  323. package/docs/mcp.md +0 -47
  324. package/docs/networking.md +0 -114
  325. package/docs/provider-runtime-capabilities.md +0 -32
  326. package/docs/public-surface.json +0 -73
  327. package/docs/quickstart.md +0 -135
  328. package/docs/release.md +0 -44
  329. package/docs/retries.md +0 -108
  330. package/docs/secrets.md +0 -141
  331. package/docs/session-config.md +0 -51
  332. package/docs/session-record.md +0 -58
  333. package/docs/skills.md +0 -65
  334. package/docs/telemetry.md +0 -66
  335. package/docs/testing.md +0 -35
  336. package/docs/vision-skills.md +0 -94
  337. package/docs/webhooks.md +0 -143
@@ -1,98 +0,0 @@
1
- import type { ToolInputSchema } from "./session-config.js";
2
- /**
3
- * Persisted workspace file resource names accepted by the public wire boundary.
4
- *
5
- * This is deliberately separate from filename validation and from the SDK's
6
- * filename-to-storage-slug derivation. Equal syntax with instruction names
7
- * today does not make those resource domains one contract.
8
- */
9
- export declare const WORKSPACE_FILE_RESOURCE_NAME_PATTERN: RegExp;
10
- /**
11
- * Persisted workspace instruction resource names accepted by the public wire
12
- * boundary. Callers supply these names directly; consumers must not normalize,
13
- * lowercase, trim, or otherwise rewrite an accepted value.
14
- */
15
- export declare const WORKSPACE_INSTRUCTION_RESOURCE_NAME_PATTERN: RegExp;
16
- /** Assert a directly supplied persisted workspace file resource name. */
17
- export declare function assertWorkspaceFileResourceName(value: unknown, path: string): asserts value is string;
18
- /** Assert a directly supplied persisted workspace instruction resource name. */
19
- export declare function assertWorkspaceInstructionResourceName(value: unknown, path: string): asserts value is string;
20
- /** Immutable bytes in the workspace content-addressed asset store. */
21
- export interface AssetIdentity {
22
- readonly assetId: string;
23
- /** Canonical `sha256:<hex>` digest of the asset bytes. */
24
- readonly contentHash: string;
25
- readonly sizeBytes: number;
26
- readonly contentType: string;
27
- }
28
- interface WorkspaceResourceRefBase {
29
- /** Stable logical resource id. */
30
- readonly resourceId: string;
31
- /** Immutable positive version of the logical resource. */
32
- readonly version: number;
33
- readonly assetId: string;
34
- readonly contentHash: string;
35
- }
36
- /** A reusable file input pinned to immutable bytes and a workspace version. */
37
- export interface WorkspaceFileRef extends WorkspaceResourceRefBase {
38
- readonly kind: "file";
39
- readonly name: string;
40
- readonly mountPath: string;
41
- }
42
- /** A reusable skill input pinned to immutable bytes and a workspace version. */
43
- export interface WorkspaceSkillRef extends WorkspaceResourceRefBase {
44
- readonly kind: "skill";
45
- readonly name: string;
46
- readonly description: string;
47
- }
48
- /** A reusable custom tool input pinned to immutable bytes and a workspace version. */
49
- export interface WorkspaceToolRef extends WorkspaceResourceRefBase {
50
- readonly kind: "tool";
51
- readonly name: string;
52
- readonly description: string;
53
- readonly input_schema: ToolInputSchema;
54
- readonly entry: string;
55
- }
56
- /** Versioned instruction context backed by immutable asset bytes. */
57
- export interface WorkspaceInstructionRef extends WorkspaceResourceRefBase {
58
- readonly kind: "instruction";
59
- readonly name: string;
60
- }
61
- export type WorkspaceResourceRef = WorkspaceFileRef | WorkspaceSkillRef | WorkspaceToolRef | WorkspaceInstructionRef;
62
- /** The only resource-bearing section of a session submission. */
63
- export interface SubmissionAssets {
64
- readonly files: readonly WorkspaceFileRef[];
65
- readonly skills: readonly WorkspaceSkillRef[];
66
- readonly tools: readonly WorkspaceToolRef[];
67
- readonly instructions: readonly WorkspaceInstructionRef[];
68
- }
69
- interface WorkspaceResourceRecordFields {
70
- readonly createdAt: string;
71
- readonly updatedAt?: string;
72
- readonly sizeBytes: number;
73
- readonly contentType: string;
74
- }
75
- export type WorkspaceFileRecord = WorkspaceFileRef & WorkspaceResourceRecordFields;
76
- export type WorkspaceSkillRecord = WorkspaceSkillRef & WorkspaceResourceRecordFields;
77
- export type WorkspaceToolRecord = WorkspaceToolRef & WorkspaceResourceRecordFields;
78
- export type WorkspaceInstructionRecord = WorkspaceInstructionRef & WorkspaceResourceRecordFields;
79
- export interface WorkspaceResourcePage<T> {
80
- readonly resources: readonly T[];
81
- readonly nextCursor?: string;
82
- }
83
- export interface WorkspaceResourceListQuery {
84
- /** Opaque cursor returned by the previous page. */
85
- readonly cursor?: string;
86
- /** Page size. Defaults to 100 and must be an integer from 1 through 100. */
87
- readonly limit?: number;
88
- }
89
- /**
90
- * Validate the immutable identity fields common to every submitted resource.
91
- *
92
- * The canonical digest grammar is passed to the schema rather than imported by
93
- * it: `canonical-sha256.ts` declares that grammar once and this module is its
94
- * declared consumer, which is the arrangement `canonical-sha256-ownership.test.ts`
95
- * pins.
96
- */
97
- export declare function assertPinnedWorkspaceResource(value: WorkspaceResourceRef, path: string): void;
98
- export {};
@@ -1,39 +0,0 @@
1
- import { CANONICAL_SHA256_DIGEST_PATTERN } from "./canonical-sha256.js";
2
- import { pinnedWorkspaceResourceSchema, workspaceResourceNameSchema } from "./schemas/workspace-resources.js";
3
- import { parseWire } from "./schemas/wire.js";
4
- /**
5
- * Persisted workspace file resource names accepted by the public wire boundary.
6
- *
7
- * This is deliberately separate from filename validation and from the SDK's
8
- * filename-to-storage-slug derivation. Equal syntax with instruction names
9
- * today does not make those resource domains one contract.
10
- */
11
- export const WORKSPACE_FILE_RESOURCE_NAME_PATTERN = /^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$/;
12
- /**
13
- * Persisted workspace instruction resource names accepted by the public wire
14
- * boundary. Callers supply these names directly; consumers must not normalize,
15
- * lowercase, trim, or otherwise rewrite an accepted value.
16
- */
17
- export const WORKSPACE_INSTRUCTION_RESOURCE_NAME_PATTERN = /^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$/;
18
- /** Assert a directly supplied persisted workspace file resource name. */
19
- export function assertWorkspaceFileResourceName(value, path) {
20
- assertWorkspaceResourceName(value, path, WORKSPACE_FILE_RESOURCE_NAME_PATTERN);
21
- }
22
- /** Assert a directly supplied persisted workspace instruction resource name. */
23
- export function assertWorkspaceInstructionResourceName(value, path) {
24
- assertWorkspaceResourceName(value, path, WORKSPACE_INSTRUCTION_RESOURCE_NAME_PATTERN);
25
- }
26
- function assertWorkspaceResourceName(value, path, pattern) {
27
- parseWire(workspaceResourceNameSchema(path, pattern), value);
28
- }
29
- /**
30
- * Validate the immutable identity fields common to every submitted resource.
31
- *
32
- * The canonical digest grammar is passed to the schema rather than imported by
33
- * it: `canonical-sha256.ts` declares that grammar once and this module is its
34
- * declared consumer, which is the arrangement `canonical-sha256-ownership.test.ts`
35
- * pins.
36
- */
37
- export function assertPinnedWorkspaceResource(value, path) {
38
- parseWire(pinnedWorkspaceResourceSchema(path, CANONICAL_SHA256_DIGEST_PATTERN), value);
39
- }
@@ -1 +0,0 @@
1
- export { assertArchiveCompressedSize, assertArchiveEntryCount, assertArchiveExpandedSize } from "./_contracts/internal.js";
@@ -1,2 +0,0 @@
1
- export { assertArchiveCompressedSize, assertArchiveEntryCount, assertArchiveExpandedSize } from "./_contracts/internal.js";
2
- //# sourceMappingURL=archive-limits.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"archive-limits.js","sourceRoot":"","sources":["../src/archive-limits.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,2BAA2B,EAC3B,uBAAuB,EACvB,yBAAyB,EAC1B,MAAM,2BAA2B,CAAC"}
@@ -1,47 +0,0 @@
1
- /**
2
- * Asset materialization for the SDK run / session path.
3
- *
4
- * Every inline `Skill` / `Tool` / `Instructions` / `File` draft is materialized
5
- * to the hosted API's content-addressable asset store before the session
6
- * starts, so the wire submission carries only storage-neutral refs.
7
- *
8
- * Upload is direct-to-storage (no bytes through the hosted API, so bundle size
9
- * is bounded by the object store rather than by the API's memory /
10
- * request-payload limits):
11
- *
12
- * 1. POST /api/assets/presign -> { exists } | { uploadUrl, requiredHeaders }
13
- * - `exists:true` is a dedup hit; we're done.
14
- * - otherwise the hosted API mints a presigned PUT scoped to the exact
15
- * content-addressed key and signs `x-amz-checksum-sha256` so the object
16
- * store enforces integrity server-side.
17
- * 2. PUT the bytes straight to `uploadUrl` with `requiredHeaders` (the signed
18
- * checksum). The store rejects a byte mismatch — a 2xx proves bytes == hash.
19
- * 3. POST /api/assets/finalize -> confirms the object exists (HEAD only).
20
- *
21
- */
22
- import { type AssetFetch, type AssetUploadRetryOptions, type AssetsHttpClient, type UploadedAsset } from "./_contracts/internal.js";
23
- import type { ByteSink } from "./canonical-zip.js";
24
- export { uploadAsset } from "./_contracts/internal.js";
25
- export type { AssetFetch, AssetsHttpClient, UploadAssetArgs, UploadedAsset } from "./_contracts/internal.js";
26
- /** Default multipart part size for runtime input archives. */
27
- export declare const DEFAULT_MULTIPART_PART_SIZE: number;
28
- /** Default in-flight part concurrency. */
29
- export declare const DEFAULT_MULTIPART_CONCURRENCY = 4;
30
- /**
31
- * Drives the canonical-zip framer, pushing every zip byte into `sink` in order.
32
- * Called TWICE (pass 1 hash, pass 2 upload); the framer is deterministic so both
33
- * passes emit byte-identical streams.
34
- */
35
- export type ZipStreamDriver = (sink: ByteSink) => Promise<void>;
36
- export interface UploadAssetStreamArgs {
37
- readonly http: AssetsHttpClient;
38
- /** Re-openable, deterministic canonical-zip stream driver (pass-1 hash == pass-2 bytes). */
39
- readonly drive: ZipStreamDriver;
40
- readonly contentType?: string;
41
- readonly fetch?: AssetFetch;
42
- readonly retry?: AssetUploadRetryOptions;
43
- readonly partSize?: number;
44
- readonly partConcurrency?: number;
45
- }
46
- /** Stream a large asset to the content store via the two-pass multipart flow. */
47
- export declare function uploadAssetMultipart(args: UploadAssetStreamArgs): Promise<UploadedAsset>;
@@ -1,269 +0,0 @@
1
- /**
2
- * Asset materialization for the SDK run / session path.
3
- *
4
- * Every inline `Skill` / `Tool` / `Instructions` / `File` draft is materialized
5
- * to the hosted API's content-addressable asset store before the session
6
- * starts, so the wire submission carries only storage-neutral refs.
7
- *
8
- * Upload is direct-to-storage (no bytes through the hosted API, so bundle size
9
- * is bounded by the object store rather than by the API's memory /
10
- * request-payload limits):
11
- *
12
- * 1. POST /api/assets/presign -> { exists } | { uploadUrl, requiredHeaders }
13
- * - `exists:true` is a dedup hit; we're done.
14
- * - otherwise the hosted API mints a presigned PUT scoped to the exact
15
- * content-addressed key and signs `x-amz-checksum-sha256` so the object
16
- * store enforces integrity server-side.
17
- * 2. PUT the bytes straight to `uploadUrl` with `requiredHeaders` (the signed
18
- * checksum). The store rejects a byte mismatch — a 2xx proves bytes == hash.
19
- * 3. POST /api/assets/finalize -> confirms the object exists (HEAD only).
20
- *
21
- */
22
- import { directUploadNetworkError, directUploadResponseError, isRetryableUploadError, isRetryableUploadStatus, tryParseRetryAfterMs } from "./_contracts/internal.js";
23
- import { nextHttpRetryDelayMs, resolveHttpRetryDeps, resolveHttpRetryPolicy } from "./_contracts/index.js";
24
- export { uploadAsset } from "./_contracts/internal.js";
25
- // ---------------------------------------------------------------------------
26
- // Internal helpers
27
- // ---------------------------------------------------------------------------
28
- function assetIdFromContentHash(contentHash) {
29
- const hex = contentHash.startsWith("sha256:") ? contentHash.slice("sha256:".length) : contentHash;
30
- return `asset_${hex}`;
31
- }
32
- // ===========================================================================
33
- // Multipart streaming upload (large assets — the "kill the in-memory ceiling"
34
- // path). Two-pass over a re-openable, DETERMINISTIC canonical-zip byte stream:
35
- // pass 1 — stream → running SHA-256 → presign BY HASH (dedup still short-
36
- // circuits `exists:true` with zero bytes uploaded);
37
- // pass 2 — re-stream → chunk into parts → S3 multipart UploadPart (bounded
38
- // concurrency + per-part retry, only the failed part re-sent) →
39
- // CompleteMultipartUpload (server validates the full-object SHA-256).
40
- // A failure after presign aborts the multipart upload so no orphaned parts bill.
41
- // ===========================================================================
42
- /** Default multipart part size for runtime input archives. */
43
- export const DEFAULT_MULTIPART_PART_SIZE = 16 * 1024 * 1024;
44
- /** Default in-flight part concurrency. */
45
- export const DEFAULT_MULTIPART_CONCURRENCY = 4;
46
- /** Stream a large asset to the content store via the two-pass multipart flow. */
47
- export async function uploadAssetMultipart(args) {
48
- const partSize = args.partSize ?? DEFAULT_MULTIPART_PART_SIZE;
49
- const concurrency = Math.max(1, args.partConcurrency ?? DEFAULT_MULTIPART_CONCURRENCY);
50
- const doFetch = args.fetch ?? globalThis.fetch;
51
- // ---- Pass 1: stream → running SHA-256 + byte count ----
52
- const { hashHex, sizeBytes } = await hashAndSizeViaDrive(args.drive);
53
- const contentHashHeader = `sha256:${hashHex}`;
54
- const contentType = args.contentType ?? "application/zip";
55
- // ---- Presign (multipart) — dedup short-circuits before any bytes move ----
56
- const presign = await args.http.request("/api/assets/presign", {
57
- method: "POST",
58
- headers: { "content-type": "application/json" },
59
- body: JSON.stringify({ hash: contentHashHeader, sizeBytes, contentType, multipart: true, partSize })
60
- });
61
- if (presign.exists) {
62
- const contentHash = presign.contentHash ?? contentHashHeader;
63
- return {
64
- assetId: presign.assetId ?? assetIdFromContentHash(contentHash),
65
- contentHash,
66
- sizeBytes: presign.sizeBytes ?? sizeBytes,
67
- contentType: presign.contentType ?? contentType,
68
- exists: true
69
- };
70
- }
71
- const mp = presign.multipart;
72
- if (!mp || !mp.uploadId || !mp.key || !Array.isArray(mp.partUrls)) {
73
- throw new Error("uploadAssetMultipart: presign returned no multipart plan and exists:false");
74
- }
75
- // ---- Pass 2: re-stream → parts → UploadPart (bounded concurrency + retry) ----
76
- const urlByPart = new Map();
77
- for (const p of mp.partUrls)
78
- urlByPart.set(p.partNumber, p.url);
79
- const parts = [];
80
- const inflight = new Set();
81
- let failed;
82
- const refreshPartUrl = async (partNumber) => {
83
- const res = await args.http.request("/api/assets/mpu/presign-parts", {
84
- method: "POST",
85
- headers: { "content-type": "application/json" },
86
- body: JSON.stringify({ uploadId: mp.uploadId, key: mp.key, partNumbers: [partNumber] })
87
- });
88
- const fresh = res.partUrls?.find((p) => p.partNumber === partNumber)?.url;
89
- if (!fresh)
90
- throw new Error(`uploadAssetMultipart: could not refresh URL for part ${partNumber}`);
91
- urlByPart.set(partNumber, fresh);
92
- return fresh;
93
- };
94
- const uploadOnePart = async (partNumber, bytes) => {
95
- let url = urlByPart.get(partNumber);
96
- if (!url)
97
- url = await refreshPartUrl(partNumber);
98
- const etag = await putPartWithRetry(doFetch, url, bytes, contentType, () => refreshPartUrl(partNumber), args.retry);
99
- if (!etag) {
100
- throw new Error(`uploadAssetMultipart: part ${partNumber} PUT succeeded without an ETag header`);
101
- }
102
- parts.push({ partNumber, etag });
103
- };
104
- const submitPart = async (partNumber, bytes) => {
105
- while (inflight.size >= concurrency)
106
- await Promise.race(inflight);
107
- if (failed !== undefined)
108
- throw failed;
109
- const tracked = uploadOnePart(partNumber, bytes)
110
- .catch((err) => {
111
- failed ??= err;
112
- })
113
- .finally(() => {
114
- inflight.delete(tracked);
115
- });
116
- inflight.add(tracked);
117
- };
118
- try {
119
- let partNumber = 0;
120
- const chunker = makePartChunker(partSize, async (bytes) => {
121
- partNumber += 1;
122
- await submitPart(partNumber, bytes);
123
- });
124
- await args.drive(async (chunk) => {
125
- await chunker.push(chunk);
126
- if (failed !== undefined)
127
- throw failed;
128
- });
129
- await chunker.flush();
130
- await Promise.all(inflight);
131
- if (failed !== undefined)
132
- throw failed;
133
- if (partNumber === 0) {
134
- // Zero-length streams cannot happen for a real zip (EOCD is always emitted),
135
- // but guard so a bug fails loud rather than completing an empty MPU.
136
- throw new Error("uploadAssetMultipart: no parts produced from the zip stream");
137
- }
138
- parts.sort((a, b) => a.partNumber - b.partNumber);
139
- const fin = await args.http.request("/api/assets/finalize", {
140
- method: "POST",
141
- headers: { "content-type": "application/json" },
142
- body: JSON.stringify({ hash: contentHashHeader, sizeBytes, uploadId: mp.uploadId, key: mp.key, parts })
143
- });
144
- const contentHash = fin.contentHash ?? contentHashHeader;
145
- return {
146
- assetId: fin.assetId ?? assetIdFromContentHash(contentHash),
147
- contentHash,
148
- sizeBytes: fin.sizeBytes ?? sizeBytes,
149
- contentType: fin.contentType ?? presign.contentType ?? contentType,
150
- exists: false
151
- };
152
- }
153
- catch (err) {
154
- // Abort so orphaned parts don't bill silently (backed by the S3 lifecycle rule too).
155
- await args.http
156
- .request("/api/assets/mpu/abort", {
157
- method: "POST",
158
- headers: { "content-type": "application/json" },
159
- body: JSON.stringify({ uploadId: mp.uploadId, key: mp.key })
160
- })
161
- .catch(() => undefined);
162
- throw err;
163
- }
164
- }
165
- /** Drive the framer through SHA-256, returning the hex digest + total byte count. Node/Bun only. */
166
- async function hashAndSizeViaDrive(drive) {
167
- const { createHash } = await import("node:crypto");
168
- const hash = createHash("sha256");
169
- let sizeBytes = 0;
170
- // NO per-chunk compressed-size gate here (review-2026-07-25 plan 04): the
171
- // multipart machine exists for 10,000 x 5 MiB parts, so the archive ceiling
172
- // trips before part 4 and every larger upload this path was BUILT for was
173
- // unreachable. Admission owns the size decision; this function hashes.
174
- await drive((chunk) => {
175
- sizeBytes += chunk.length;
176
- hash.update(chunk);
177
- });
178
- return { hashHex: hash.digest("hex"), sizeBytes };
179
- }
180
- /**
181
- * Repackage an arbitrary-boundary byte stream into fixed `partSize` parts (the
182
- * last may be smaller), invoking `emit` once per full part. Efficient: front-of-
183
- * queue splitting, no O(n²) buffer growth.
184
- */
185
- function makePartChunker(partSize, emit) {
186
- const chunks = [];
187
- let buffered = 0;
188
- const emitPart = async (size) => {
189
- const part = new Uint8Array(size);
190
- let off = 0;
191
- while (off < size) {
192
- const head = chunks[0];
193
- const take = Math.min(head.length, size - off);
194
- part.set(head.subarray(0, take), off);
195
- off += take;
196
- if (take === head.length)
197
- chunks.shift();
198
- else
199
- chunks[0] = head.subarray(take);
200
- }
201
- buffered -= size;
202
- await emit(part);
203
- };
204
- return {
205
- push: async (chunk) => {
206
- if (chunk.length === 0)
207
- return;
208
- chunks.push(chunk);
209
- buffered += chunk.length;
210
- while (buffered >= partSize)
211
- await emitPart(partSize);
212
- },
213
- flush: async () => {
214
- if (buffered > 0)
215
- await emitPart(buffered);
216
- }
217
- };
218
- }
219
- /** PUT one part with bounded retry; refreshes the URL once on a 403 (expiry). Returns the ETag. */
220
- async function putPartWithRetry(fetchImpl, url, bytes, contentType, refreshUrl, retryOptions) {
221
- let currentUrl = url;
222
- let refreshed = false;
223
- const policy = resolveHttpRetryPolicy(retryOptions);
224
- const deps = resolveHttpRetryDeps(retryOptions);
225
- const startedAtMs = deps.now();
226
- for (let attempt = 1; attempt <= policy.maxAttempts; attempt++) {
227
- let response;
228
- try {
229
- response = await fetchImpl(currentUrl, {
230
- method: "PUT",
231
- headers: { "content-type": contentType ?? "application/zip" },
232
- body: bytes
233
- });
234
- }
235
- catch (err) {
236
- const delayMs = isRetryableUploadError(err)
237
- ? nextHttpRetryDelayMs({ policy, attempt, startedAtMs, deps })
238
- : undefined;
239
- if (delayMs === undefined)
240
- throw directUploadNetworkError(currentUrl, err, attempt);
241
- await deps.sleep(delayMs);
242
- continue;
243
- }
244
- if (response.ok) {
245
- const etag = response.headers?.get?.("etag") ?? response.headers?.get?.("ETag") ?? "";
246
- return etag.replace(/"/g, "");
247
- }
248
- // A 403 mid-upload is a presign-expiry; refresh the URL once and retry.
249
- if (response.status === 403 && !refreshed && attempt < policy.maxAttempts) {
250
- refreshed = true;
251
- await response.text().catch(() => "");
252
- currentUrl = await refreshUrl();
253
- continue;
254
- }
255
- const retryAfterMs = tryParseRetryAfterMs(response.headers?.get("retry-after"), deps.now());
256
- const delayMs = isRetryableUploadStatus(response.status)
257
- ? nextHttpRetryDelayMs({ policy, attempt, startedAtMs, deps, retryAfterMs })
258
- : undefined;
259
- if (delayMs !== undefined) {
260
- await response.text().catch(() => "");
261
- await deps.sleep(delayMs);
262
- continue;
263
- }
264
- const detail = await response.text().catch(() => "");
265
- throw directUploadResponseError(currentUrl, response.status, detail, attempt);
266
- }
267
- throw directUploadResponseError(currentUrl, 0, "exhausted retries", policy.maxAttempts);
268
- }
269
- //# sourceMappingURL=asset-upload.js.map
@@ -1 +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illBundleMetadata } from "./_contracts/internal.js";
3
- export type { BundledSkill, BundledTool, BundleMeta, ParsedSkillBundle, SkillFiles, ToolBundleManifest } from "./_contracts/internal.js";
4
- /** Preserve the established SDK signature while delegating to the shared owner. */
5
- export declare function bundleSkillFiles(files: SkillFiles, meta?: BundleMeta): BundledSkill;
6
- /** Preserve the established SDK signature while delegating to the shared owner. */
7
- export declare function bundleToolFiles(files: SkillFiles, manifest: ToolBundleManifest, meta?: BundleMeta): BundledTool;
8
- /** Preserve the established SDK signature while delegating to the shared owner. */
9
- export declare function hashSkillBundle(zipBytes: Uint8Array): Promise<string>;
package/dist/bundle.js DELETED
@@ -1,20 +0,0 @@
1
- /**
2
- * SDK-private compatibility adapter for the dependency-light canonical asset
3
- * bundle owner. Keep callers on this module while the implementation remains
4
- * single-sourced in `@aexhq/contracts/internal`.
5
- */
6
- import { bundleSkillFiles as bundleSkillFilesInternal, bundleToolFiles as bundleToolFilesInternal, hashSkillBundle as hashSkillBundleInternal } from "./_contracts/internal.js";
7
- export { splitSkillBundleMetadata } from "./_contracts/internal.js";
8
- /** Preserve the established SDK signature while delegating to the shared owner. */
9
- export function bundleSkillFiles(files, meta) {
10
- return bundleSkillFilesInternal(files, meta);
11
- }
12
- /** Preserve the established SDK signature while delegating to the shared owner. */
13
- export function bundleToolFiles(files, manifest, meta) {
14
- return bundleToolFilesInternal(files, manifest, meta);
15
- }
16
- /** Preserve the established SDK signature while delegating to the shared owner. */
17
- export function hashSkillBundle(zipBytes) {
18
- return hashSkillBundleInternal(zipBytes);
19
- }
20
- //# sourceMappingURL=bundle.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"bundle.js","sourceRoot":"","sources":["../src/bundle.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EACL,gBAAgB,IAAI,wBAAwB,EAC5C,eAAe,IAAI,uBAAuB,EAC1C,eAAe,IAAI,uBAAuB,EAC3C,MAAM,2BAA2B,CAAC;AASnC,OAAO,EAAE,wBAAwB,EAAE,MAAM,2BAA2B,CAAC;AAUrE,mFAAmF;AACnF,MAAM,UAAU,gBAAgB,CAAC,KAAiB,EAAE,IAAiB;IACnE,OAAO,wBAAwB,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;AAC/C,CAAC;AAED,mFAAmF;AACnF,MAAM,UAAU,eAAe,CAC7B,KAAiB,EACjB,QAA4B,EAC5B,IAAiB;IAEjB,OAAO,uBAAuB,CAAC,KAAK,EAAE,QAAQ,EAAE,IAAI,CAAC,CAAC;AACxD,CAAC;AAED,mFAAmF;AACnF,MAAM,UAAU,eAAe,CAAC,QAAoB;IAClD,OAAO,uBAAuB,CAAC,QAAQ,CAAC,CAAC;AAC3C,CAAC"}
@@ -1,68 +0,0 @@
1
- /**
2
- * Canonical zip framer — the deterministic, content-addressed zip layer the
3
- * asset upload path dedups on. Two canonical forms, both byte-stable:
4
- *
5
- * Canonical A (the ~99% case: every entry ≤ {@link ENTRY_RAM_CAP}) — a custom
6
- * per-entry framer that reproduces fflate's `zipSync(..., {level:6})` output
7
- * BYTE-FOR-BYTE (sorted entries, epoch mtime, per-entry crc32, per-entry
8
- * one-shot `deflateSync` level 6, real sizes in a flag-0 local header) while
9
- * holding only ONE entry in memory at a time. Because it equals `zipSync`, a
10
- * streamed large bundle dedups against a small in-memory bundle of the same
11
- * content — no dedup seam. Pinned forever by a golden byte-identity test.
12
- *
13
- * Canonical B (a bundle containing ANY entry > {@link ENTRY_RAM_CAP}, e.g. a
14
- * lone multi-GB dataset file) — fflate's streaming `Zip`/`ZipDeflate` driven
15
- * with a PINNED {@link CANONICAL_B_PUSH_BYTES} push size. It does NOT equal
16
- * `zipSync` (it emits streaming data descriptors, GP-flag bit 3), but it IS
17
- * internally deterministic: same input → same bytes every time (pinned chunk
18
- * size + pinned fflate version). Its own second canonical / dedup namespace,
19
- * pinned by its own golden determinism test. A single giant entry cannot be
20
- * both `zipSync`-identical AND framed in O(part) memory, so this is the
21
- * accepted tradeoff (such a file has no small twin to dedup against).
22
- *
23
- * Browser-safe: this module imports ONLY fflate (no `node:*`). The node-only
24
- * streaming SHA-256 + multipart sink live in the callers (file.ts / asset-upload).
25
- */
26
- /** Epoch every entry mtime is pinned to (matches the pre-streaming `zipSync` path). */
27
- export declare const ZIP_EPOCH: Date;
28
- /**
29
- * Per-entry raw-byte ceiling for Canonical A. A single entry above this cannot be
30
- * one-shot `deflateSync`-ed within a bounded memory budget, so a bundle carrying
31
- * any such entry falls to Canonical B. A memory-budget knob, NOT a correctness
32
- * boundary (the golden tests pin both forms).
33
- */
34
- export declare const ENTRY_RAM_CAP: number;
35
- /** Pinned push size for Canonical B's streaming deflate. LOAD-BEARING for determinism. */
36
- export declare const CANONICAL_B_PUSH_BYTES: number;
37
- /** One-shot CRC-32 over `bytes`. */
38
- export declare function crc32(bytes: Uint8Array): number;
39
- /** A byte sink; may apply backpressure (pass-2 multipart) or run sync (pass-1 hash). */
40
- export type ByteSink = (chunk: Uint8Array) => void | Promise<void>;
41
- /**
42
- * One bundle entry to frame, in FINAL canonical order. `name` is the forward-slash
43
- * bundle-relative path; `size` its raw byte length (from `stat` or the in-memory
44
- * bytes). `read()` yields the whole entry (Canonical A / small); `openStream()` is
45
- * required only when `size > ENTRY_RAM_CAP` (Canonical B).
46
- */
47
- export interface ZipEntrySource {
48
- readonly name: string;
49
- readonly size: number;
50
- read(): Uint8Array | Promise<Uint8Array>;
51
- openStream?(): AsyncIterable<Uint8Array>;
52
- }
53
- /** True when the bundle must use Canonical B (some entry exceeds the RAM cap). */
54
- export declare function bundleNeedsCanonicalB(entries: readonly {
55
- readonly size: number;
56
- }[]): boolean;
57
- /**
58
- * Stream the canonical zip of `entries` (FINAL canonical order) into `sink`.
59
- * Picks Canonical A (byte-identical to `zipSync`) unless an entry exceeds
60
- * {@link ENTRY_RAM_CAP}, in which case the whole bundle uses Canonical B.
61
- */
62
- export declare function streamBundleZip(entries: readonly ZipEntrySource[], sink: ByteSink): Promise<void>;
63
- /**
64
- * Synchronous Canonical-A convenience — frame an ordered `[name, bytes]` list to
65
- * a single buffer. Used by the golden byte-identity test (`=== zipSync`) and by
66
- * callers that already hold all bytes in memory. NOT for giant entries.
67
- */
68
- export declare function frameCanonicalZipSync(entries: ReadonlyArray<readonly [string, Uint8Array]>): Uint8Array;