@procedures/s3 0.1.0 → 0.2.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.
package/dist/index.d.ts CHANGED
@@ -10,7 +10,7 @@
10
10
  * - AWS_REGION (optional, defaults to us-east-1)
11
11
  * - S3_ENDPOINT (optional, for MinIO/LocalStack)
12
12
  */
13
- import "./register.js";
13
+ export * from "./module.js";
14
14
  export type { S3Config, S3UploadInput, S3UploadOutput, S3DownloadInput, S3DownloadOutput, S3ListInput, S3ListOutput, S3ListObject, S3ListAllInput, S3ListAllOutput, S3DeleteInput, S3DeleteOutput, S3MultipartInitInput, S3MultipartInitOutput, S3MultipartUploadInput, S3MultipartUploadOutput, S3MultipartCompleteInput, S3MultipartCompleteOutput, S3MultipartAbortInput, S3MultipartAbortOutput, } from "./types.js";
15
15
  export { S3UploadInputSchema, S3DownloadInputSchema, S3ListInputSchema, S3ListAllInputSchema, S3DeleteInputSchema, S3MultipartInitInputSchema, S3MultipartUploadInputSchema, S3MultipartCompleteInputSchema, S3MultipartAbortInputSchema, } from "./types.js";
16
16
  export { getS3Config, createS3Client, getS3Client, resetS3Client, } from "./s3-client.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAGH,OAAO,eAAe,CAAC;AAGvB,YAAY,EACV,QAAQ,EACR,aAAa,EACb,cAAc,EACd,eAAe,EACf,gBAAgB,EAChB,WAAW,EACX,YAAY,EACZ,YAAY,EACZ,cAAc,EACd,eAAe,EACf,aAAa,EACb,cAAc,EACd,oBAAoB,EACpB,qBAAqB,EACrB,sBAAsB,EACtB,uBAAuB,EACvB,wBAAwB,EACxB,yBAAyB,EACzB,qBAAqB,EACrB,sBAAsB,GACvB,MAAM,YAAY,CAAC;AAGpB,OAAO,EACL,mBAAmB,EACnB,qBAAqB,EACrB,iBAAiB,EACjB,oBAAoB,EACpB,mBAAmB,EACnB,0BAA0B,EAC1B,4BAA4B,EAC5B,8BAA8B,EAC9B,2BAA2B,GAC5B,MAAM,YAAY,CAAC;AAGpB,OAAO,EACL,WAAW,EACX,cAAc,EACd,WAAW,EACX,aAAa,GACd,MAAM,gBAAgB,CAAC;AAGxB,OAAO,EACL,QAAQ,EACR,UAAU,EACV,MAAM,EACN,SAAS,EACT,QAAQ,EACR,eAAe,EACf,iBAAiB,EACjB,mBAAmB,EACnB,gBAAgB,GACjB,MAAM,0BAA0B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,cAAc,aAAa,CAAC;AAG5B,YAAY,EACV,QAAQ,EACR,aAAa,EACb,cAAc,EACd,eAAe,EACf,gBAAgB,EAChB,WAAW,EACX,YAAY,EACZ,YAAY,EACZ,cAAc,EACd,eAAe,EACf,aAAa,EACb,cAAc,EACd,oBAAoB,EACpB,qBAAqB,EACrB,sBAAsB,EACtB,uBAAuB,EACvB,wBAAwB,EACxB,yBAAyB,EACzB,qBAAqB,EACrB,sBAAsB,GACvB,MAAM,YAAY,CAAC;AAGpB,OAAO,EACL,mBAAmB,EACnB,qBAAqB,EACrB,iBAAiB,EACjB,oBAAoB,EACpB,mBAAmB,EACnB,0BAA0B,EAC1B,4BAA4B,EAC5B,8BAA8B,EAC9B,2BAA2B,GAC5B,MAAM,YAAY,CAAC;AAGpB,OAAO,EACL,WAAW,EACX,cAAc,EACd,WAAW,EACX,aAAa,GACd,MAAM,gBAAgB,CAAC;AAGxB,OAAO,EACL,QAAQ,EACR,UAAU,EACV,MAAM,EACN,SAAS,EACT,QAAQ,EACR,eAAe,EACf,iBAAiB,EACjB,mBAAmB,EACnB,gBAAgB,GACjB,MAAM,0BAA0B,CAAC"}
package/dist/index.js CHANGED
@@ -10,8 +10,7 @@
10
10
  * - AWS_REGION (optional, defaults to us-east-1)
11
11
  * - S3_ENDPOINT (optional, for MinIO/LocalStack)
12
12
  */
13
- // Importing the package registers its procedures, as in the other client packages (BUGS-2026-07 H18)
14
- import "./register.js";
13
+ export * from "./module.js";
15
14
  // Re-export schemas for external use
16
15
  export { S3UploadInputSchema, S3DownloadInputSchema, S3ListInputSchema, S3ListAllInputSchema, S3DeleteInputSchema, S3MultipartInitInputSchema, S3MultipartUploadInputSchema, S3MultipartCompleteInputSchema, S3MultipartAbortInputSchema, } from "./types.js";
17
16
  // Re-export S3 client utilities
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,qGAAqG;AACrG,OAAO,eAAe,CAAC;AA0BvB,qCAAqC;AACrC,OAAO,EACL,mBAAmB,EACnB,qBAAqB,EACrB,iBAAiB,EACjB,oBAAoB,EACpB,mBAAmB,EACnB,0BAA0B,EAC1B,4BAA4B,EAC5B,8BAA8B,EAC9B,2BAA2B,GAC5B,MAAM,YAAY,CAAC;AAEpB,gCAAgC;AAChC,OAAO,EACL,WAAW,EACX,cAAc,EACd,WAAW,EACX,aAAa,GACd,MAAM,gBAAgB,CAAC;AAExB,qDAAqD;AACrD,OAAO,EACL,QAAQ,EACR,UAAU,EACV,MAAM,EACN,SAAS,EACT,QAAQ,EACR,eAAe,EACf,iBAAiB,EACjB,mBAAmB,EACnB,gBAAgB,GACjB,MAAM,0BAA0B,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,cAAc,aAAa,CAAC;AA0B5B,qCAAqC;AACrC,OAAO,EACL,mBAAmB,EACnB,qBAAqB,EACrB,iBAAiB,EACjB,oBAAoB,EACpB,mBAAmB,EACnB,0BAA0B,EAC1B,4BAA4B,EAC5B,8BAA8B,EAC9B,2BAA2B,GAC5B,MAAM,YAAY,CAAC;AAEpB,gCAAgC;AAChC,OAAO,EACL,WAAW,EACX,cAAc,EACd,WAAW,EACX,aAAa,GACd,MAAM,gBAAgB,CAAC;AAExB,qDAAqD;AACrD,OAAO,EACL,QAAQ,EACR,UAAU,EACV,MAAM,EACN,SAAS,EACT,QAAQ,EACR,eAAe,EACf,iBAAiB,EACjB,mBAAmB,EACnB,gBAAgB,GACjB,MAAM,0BAA0B,CAAC"}
package/dist/module.d.ts CHANGED
@@ -6,11 +6,17 @@
6
6
  * Provides s3.upload, s3.download, s3.list, s3.delete, and s3.multipart.* procedures.
7
7
  * Credentials are loaded from environment variables (AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY).
8
8
  */
9
- import { type ProcedureModule } from "@procedures/client";
9
+ import { type ProcedureModule, type ProcedureRegistry } from "@procedures/client";
10
10
  /**
11
11
  * The module of this package, for `createRegistry()`: its procedures as data. Importing this
12
12
  * file registers nothing. (`register.ts` registers the same procedures in the global registry.)
13
13
  */
14
14
  export declare const s3Module: ProcedureModule;
15
15
  export default s3Module;
16
+ /**
17
+ * This function registers the procedures of @procedures/s3, and of the modules that it requires, in
18
+ * a registry. The default is the global registry. Importing this file registers nothing: the
19
+ * `./register` entry starts this function (ARCHITECTURE-PROPOSALS-2026-10, P9).
20
+ */
21
+ export declare function registerS3Procedures(registry?: ProcedureRegistry): void;
16
22
  //# sourceMappingURL=module.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"module.d.ts","sourceRoot":"","sources":["../src/module.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAA6C,KAAK,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAyLrG;;;GAGG;AACH,eAAO,MAAM,QAAQ,EAAE,eAUnB,CAAC;eAEU,QAAQ"}
1
+ {"version":3,"file":"module.d.ts","sourceRoot":"","sources":["../src/module.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAA6C,KAAK,eAAe,EAAuC,KAAK,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAuMlK;;;GAGG;AACH,eAAO,MAAM,QAAQ,EAAE,eAUnB,CAAC;eAEU,QAAQ;AAEvB;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,QAAQ,GAAE,iBAAsC,GAAG,IAAI,CAE3F"}
package/dist/module.js CHANGED
@@ -6,7 +6,7 @@
6
6
  * Provides s3.upload, s3.download, s3.list, s3.delete, and s3.multipart.* procedures.
7
7
  * Credentials are loaded from environment variables (AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY).
8
8
  */
9
- import { createProcedure, zodAdapter, defineModule } from "@procedures/client";
9
+ import { createProcedure, zodAdapter, defineModule, PROCEDURE_REGISTRY, registerModules } from "@procedures/client";
10
10
  import { s3Upload, s3Download, s3List, s3ListAll, s3Delete, s3MultipartInit, s3MultipartUpload, s3MultipartComplete, s3MultipartAbort, } from "./procedures/s3/index.js";
11
11
  import { S3UploadInputSchema, S3DownloadInputSchema, S3ListInputSchema, S3ListAllInputSchema, S3DeleteInputSchema, S3MultipartInitInputSchema, S3MultipartUploadInputSchema, S3MultipartCompleteInputSchema, S3MultipartAbortInputSchema, S3UploadOutputSchema, S3DownloadOutputSchema, S3ListOutputSchema, S3ListAllOutputSchema, S3DeleteOutputSchema, S3MultipartInitOutputSchema, S3MultipartUploadOutputSchema, S3MultipartCompleteOutputSchema, S3MultipartAbortOutputSchema, } from "./types.js";
12
12
  // =============================================================================
@@ -18,6 +18,8 @@ const s3UploadProcedure = createProcedure()
18
18
  .output(zodAdapter(S3UploadOutputSchema))
19
19
  .meta({
20
20
  description: "Upload content to S3 bucket",
21
+ // A put replaces the object of an existing key
22
+ effects: { reads: ["s3", "network"], writes: ["s3", "network"] },
21
23
  shorts: { bucket: "b", key: "k" },
22
24
  output: "json",
23
25
  })
@@ -31,6 +33,8 @@ const s3DownloadProcedure = createProcedure()
31
33
  .output(zodAdapter(S3DownloadOutputSchema))
32
34
  .meta({
33
35
  description: "Download content from S3 bucket",
36
+ // With destPath, it replaces the file at that path
37
+ effects: { reads: ["s3", "network"], writes: ["fs"], idempotent: true },
34
38
  shorts: { bucket: "b", key: "k", encoding: "e" },
35
39
  output: "json",
36
40
  })
@@ -44,6 +48,7 @@ const s3ListProcedure = createProcedure()
44
48
  .output(zodAdapter(S3ListOutputSchema))
45
49
  .meta({
46
50
  description: "List objects in S3 bucket",
51
+ effects: { reads: ["s3", "network"], writes: [] },
47
52
  shorts: { bucket: "b", prefix: "p", maxKeys: "n" },
48
53
  output: "json",
49
54
  })
@@ -57,6 +62,7 @@ const s3ListAllProcedure = createProcedure()
57
62
  .output(zodAdapter(S3ListAllOutputSchema))
58
63
  .meta({
59
64
  description: "List ALL objects in S3 bucket, following continuation tokens (unbounded by 1000)",
65
+ effects: { reads: ["s3", "network"], writes: [] },
60
66
  shorts: { bucket: "b", prefix: "p", maxKeys: "n" },
61
67
  output: "json",
62
68
  })
@@ -70,6 +76,7 @@ const s3DeleteProcedure = createProcedure()
70
76
  .output(zodAdapter(S3DeleteOutputSchema))
71
77
  .meta({
72
78
  description: "Delete object from S3 bucket",
79
+ effects: { reads: ["s3", "network"], writes: ["s3", "network"] },
73
80
  shorts: { bucket: "b", key: "k" },
74
81
  output: "json",
75
82
  })
@@ -83,6 +90,8 @@ const s3MultipartInitProcedure = createProcedure()
83
90
  .output(zodAdapter(S3MultipartInitOutputSchema))
84
91
  .meta({
85
92
  description: "Initialize multipart upload for large files",
93
+ // It starts a new upload: the object of the key does not change before the completion
94
+ effects: { reads: ["s3", "network"], writes: ["s3", "network"], destructive: false },
86
95
  shorts: { bucket: "b", key: "k" },
87
96
  output: "json",
88
97
  })
@@ -96,6 +105,8 @@ const s3MultipartUploadProcedure = createProcedure()
96
105
  .output(zodAdapter(S3MultipartUploadOutputSchema))
97
106
  .meta({
98
107
  description: "Upload a part in multipart upload",
108
+ // A part replaces the earlier part with the same number
109
+ effects: { reads: ["s3", "network"], writes: ["s3", "network"], idempotent: true },
99
110
  shorts: { bucket: "b", key: "k", partNumber: "n" },
100
111
  output: "json",
101
112
  })
@@ -109,6 +120,8 @@ const s3MultipartCompleteProcedure = createProcedure()
109
120
  .output(zodAdapter(S3MultipartCompleteOutputSchema))
110
121
  .meta({
111
122
  description: "Complete multipart upload by assembling parts",
123
+ // The assembled object replaces the object of an existing key
124
+ effects: { reads: ["s3", "network"], writes: ["s3", "network"] },
112
125
  shorts: { bucket: "b", key: "k" },
113
126
  output: "json",
114
127
  })
@@ -122,6 +135,7 @@ const s3MultipartAbortProcedure = createProcedure()
122
135
  .output(zodAdapter(S3MultipartAbortOutputSchema))
123
136
  .meta({
124
137
  description: "Abort multipart upload and clean up parts",
138
+ effects: { reads: ["s3", "network"], writes: ["s3", "network"] },
125
139
  shorts: { bucket: "b", key: "k" },
126
140
  output: "json",
127
141
  })
@@ -148,4 +162,12 @@ export const s3Module = defineModule("@procedures/s3", [
148
162
  s3MultipartAbortProcedure,
149
163
  ]);
150
164
  export default s3Module;
165
+ /**
166
+ * This function registers the procedures of @procedures/s3, and of the modules that it requires, in
167
+ * a registry. The default is the global registry. Importing this file registers nothing: the
168
+ * `./register` entry starts this function (ARCHITECTURE-PROPOSALS-2026-10, P9).
169
+ */
170
+ export function registerS3Procedures(registry = PROCEDURE_REGISTRY) {
171
+ registerModules(registry, [s3Module]);
172
+ }
151
173
  //# sourceMappingURL=module.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"module.js","sourceRoot":"","sources":["../src/module.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,YAAY,EAAwB,MAAM,oBAAoB,CAAC;AACrG,OAAO,EACL,QAAQ,EACR,UAAU,EACV,MAAM,EACN,SAAS,EACT,QAAQ,EACR,eAAe,EACf,iBAAiB,EACjB,mBAAmB,EACnB,gBAAgB,GACjB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,mBAAmB,EACnB,qBAAqB,EACrB,iBAAiB,EACjB,oBAAoB,EACpB,mBAAmB,EACnB,0BAA0B,EAC1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,EAAE,MAAM,EAAE,CAAC,IAAI,EAAE,SAAS,CAAC,EAAE;IAChE,MAAM,EAAE,EAAE,MAAM,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE;IACjC,MAAM,EAAE,MAAM;CACf,CAAC;KACD,OAAO,CAAC,KAAK,EAAE,KAA4B,EAAmC,EAAE;IAC/E,OAAO,gBAAgB,CAAC,KAAK,CAAC,CAAC;AACjC,CAAC,CAAC;KACD,KAAK,EAAE,CAAC;AAEX,gFAAgF;AAChF,eAAe;AACf,gFAAgF;AAEhF;;;GAGG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAoB,YAAY,CAAC,gBAAgB,EAAE;IACpE,iBAAiB;IACjB,mBAAmB;IACnB,eAAe;IACf,kBAAkB;IAClB,iBAAiB;IACjB,wBAAwB;IACxB,0BAA0B;IAC1B,4BAA4B;IAC5B,yBAAyB;CAC1B,CAAC,CAAC;AAEL,eAAe,QAAQ,CAAC;AAExB;;;;GAIG;AACH,MAAM,UAAU,oBAAoB,CAAC,QAAQ,GAAsB,kBAAkB;IACnF,eAAe,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC;AACxC,CAAC"}
@@ -1,8 +1,7 @@
1
1
  /**
2
- * Importing this file registers the procedures of @procedures/s3 in the global registry
3
- * (DECISIONS-2026-10, "Every package root registers its procedures"). The procedures as data
4
- * are in `module.ts`, which registers nothing: a host with its own registry uses that one.
2
+ * Importing this file registers the procedures of @procedures/s3, and of the modules that it
3
+ * requires, in the global registry: `import "@procedures/s3/register"`. The package root and the
4
+ * `./module` entry register nothing (ARCHITECTURE-PROPOSALS-2026-10, P9).
5
5
  */
6
6
  export * from "./module.js";
7
- export declare function registerS3Procedures(): void;
8
7
  //# sourceMappingURL=register.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"register.d.ts","sourceRoot":"","sources":["../src/register.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAKH,cAAc,aAAa,CAAC;AAE5B,wBAAgB,oBAAoB,IAAI,IAAI,CAE3C"}
1
+ {"version":3,"file":"register.d.ts","sourceRoot":"","sources":["../src/register.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,cAAc,aAAa,CAAC"}
package/dist/register.js CHANGED
@@ -1,14 +1,9 @@
1
1
  /**
2
- * Importing this file registers the procedures of @procedures/s3 in the global registry
3
- * (DECISIONS-2026-10, "Every package root registers its procedures"). The procedures as data
4
- * are in `module.ts`, which registers nothing: a host with its own registry uses that one.
2
+ * Importing this file registers the procedures of @procedures/s3, and of the modules that it
3
+ * requires, in the global registry: `import "@procedures/s3/register"`. The package root and the
4
+ * `./module` entry register nothing (ARCHITECTURE-PROPOSALS-2026-10, P9).
5
5
  */
6
- import { registerProcedures } from "@procedures/client";
7
- import { s3Module } from "./module.js";
6
+ import { registerS3Procedures } from "./module.js";
8
7
  export * from "./module.js";
9
- export function registerS3Procedures() {
10
- registerProcedures(s3Module.procedures);
11
- }
12
- // Auto-register when this module is loaded
13
8
  registerS3Procedures();
14
9
  //# sourceMappingURL=register.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"register.js","sourceRoot":"","sources":["../src/register.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAEvC,cAAc,aAAa,CAAC;AAE5B,MAAM,UAAU,oBAAoB;IAClC,kBAAkB,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC;AAC1C,CAAC;AAED,2CAA2C;AAC3C,oBAAoB,EAAE,CAAC"}
1
+ {"version":3,"file":"register.js","sourceRoot":"","sources":["../src/register.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAEnD,cAAc,aAAa,CAAC;AAE5B,oBAAoB,EAAE,CAAC"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/package",
3
3
  "name": "@procedures/s3",
4
- "version": "0.1.0",
4
+ "version": "0.2.0",
5
5
  "description": "AWS S3 as typed procedures: upload, download with safe part files, list, delete and multipart uploads.",
6
6
  "keywords": [
7
7
  "s3",
@@ -33,6 +33,10 @@
33
33
  "types": "./dist/module.d.ts",
34
34
  "import": "./dist/module.js"
35
35
  },
36
+ "./register": {
37
+ "types": "./dist/register.d.ts",
38
+ "import": "./dist/register.js"
39
+ },
36
40
  "./register.js": {
37
41
  "import": "./dist/register.js"
38
42
  }
@@ -46,7 +50,6 @@
46
50
  "CHANGELOG.md"
47
51
  ],
48
52
  "sideEffects": [
49
- "./dist/index.js",
50
53
  "./dist/register.js"
51
54
  ],
52
55
  "engines": {
@@ -58,7 +61,7 @@
58
61
  },
59
62
  "dependencies": {
60
63
  "@aws-sdk/client-s3": "^3.705.0",
61
- "@procedures/client": "0.1.0",
64
+ "@procedures/client": "0.2.0",
62
65
  "zod": "^4.6.5"
63
66
  },
64
67
  "devDependencies": {
package/src/index.ts CHANGED
@@ -11,8 +11,7 @@
11
11
  * - S3_ENDPOINT (optional, for MinIO/LocalStack)
12
12
  */
13
13
 
14
- // Importing the package registers its procedures, as in the other client packages (BUGS-2026-07 H18)
15
- import "./register.js";
14
+ export * from "./module.js";
16
15
 
17
16
  // Re-export types
18
17
  export type {
package/src/module.ts CHANGED
@@ -7,7 +7,7 @@
7
7
  * Credentials are loaded from environment variables (AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY).
8
8
  */
9
9
 
10
- import { createProcedure, zodAdapter, defineModule, type ProcedureModule } from "@procedures/client";
10
+ import { createProcedure, zodAdapter, defineModule, type ProcedureModule, PROCEDURE_REGISTRY, registerModules, type ProcedureRegistry } from "@procedures/client";
11
11
  import {
12
12
  s3Upload,
13
13
  s3Download,
@@ -68,6 +68,8 @@ const s3UploadProcedure = createProcedure()
68
68
  .output(zodAdapter<S3UploadOutput>(S3UploadOutputSchema))
69
69
  .meta({
70
70
  description: "Upload content to S3 bucket",
71
+ // A put replaces the object of an existing key
72
+ effects: { reads: ["s3", "network"], writes: ["s3", "network"] },
71
73
  shorts: { bucket: "b", key: "k" },
72
74
  output: "json",
73
75
  })
@@ -82,6 +84,8 @@ const s3DownloadProcedure = createProcedure()
82
84
  .output(zodAdapter<S3DownloadOutput>(S3DownloadOutputSchema))
83
85
  .meta({
84
86
  description: "Download content from S3 bucket",
87
+ // With destPath, it replaces the file at that path
88
+ effects: { reads: ["s3", "network"], writes: ["fs"], idempotent: true },
85
89
  shorts: { bucket: "b", key: "k", encoding: "e" },
86
90
  output: "json",
87
91
  })
@@ -96,6 +100,7 @@ const s3ListProcedure = createProcedure()
96
100
  .output(zodAdapter<S3ListOutput>(S3ListOutputSchema))
97
101
  .meta({
98
102
  description: "List objects in S3 bucket",
103
+ effects: { reads: ["s3", "network"], writes: [] },
99
104
  shorts: { bucket: "b", prefix: "p", maxKeys: "n" },
100
105
  output: "json",
101
106
  })
@@ -110,6 +115,7 @@ const s3ListAllProcedure = createProcedure()
110
115
  .output(zodAdapter<S3ListAllOutput>(S3ListAllOutputSchema))
111
116
  .meta({
112
117
  description: "List ALL objects in S3 bucket, following continuation tokens (unbounded by 1000)",
118
+ effects: { reads: ["s3", "network"], writes: [] },
113
119
  shorts: { bucket: "b", prefix: "p", maxKeys: "n" },
114
120
  output: "json",
115
121
  })
@@ -124,6 +130,7 @@ const s3DeleteProcedure = createProcedure()
124
130
  .output(zodAdapter<S3DeleteOutput>(S3DeleteOutputSchema))
125
131
  .meta({
126
132
  description: "Delete object from S3 bucket",
133
+ effects: { reads: ["s3", "network"], writes: ["s3", "network"] },
127
134
  shorts: { bucket: "b", key: "k" },
128
135
  output: "json",
129
136
  })
@@ -138,6 +145,8 @@ const s3MultipartInitProcedure = createProcedure()
138
145
  .output(zodAdapter<S3MultipartInitOutput>(S3MultipartInitOutputSchema))
139
146
  .meta({
140
147
  description: "Initialize multipart upload for large files",
148
+ // It starts a new upload: the object of the key does not change before the completion
149
+ effects: { reads: ["s3", "network"], writes: ["s3", "network"], destructive: false },
141
150
  shorts: { bucket: "b", key: "k" },
142
151
  output: "json",
143
152
  })
@@ -152,6 +161,8 @@ const s3MultipartUploadProcedure = createProcedure()
152
161
  .output(zodAdapter<S3MultipartUploadOutput>(S3MultipartUploadOutputSchema))
153
162
  .meta({
154
163
  description: "Upload a part in multipart upload",
164
+ // A part replaces the earlier part with the same number
165
+ effects: { reads: ["s3", "network"], writes: ["s3", "network"], idempotent: true },
155
166
  shorts: { bucket: "b", key: "k", partNumber: "n" },
156
167
  output: "json",
157
168
  })
@@ -166,6 +177,8 @@ const s3MultipartCompleteProcedure = createProcedure()
166
177
  .output(zodAdapter<S3MultipartCompleteOutput>(S3MultipartCompleteOutputSchema))
167
178
  .meta({
168
179
  description: "Complete multipart upload by assembling parts",
180
+ // The assembled object replaces the object of an existing key
181
+ effects: { reads: ["s3", "network"], writes: ["s3", "network"] },
169
182
  shorts: { bucket: "b", key: "k" },
170
183
  output: "json",
171
184
  })
@@ -180,6 +193,7 @@ const s3MultipartAbortProcedure = createProcedure()
180
193
  .output(zodAdapter<S3MultipartAbortOutput>(S3MultipartAbortOutputSchema))
181
194
  .meta({
182
195
  description: "Abort multipart upload and clean up parts",
196
+ effects: { reads: ["s3", "network"], writes: ["s3", "network"] },
183
197
  shorts: { bucket: "b", key: "k" },
184
198
  output: "json",
185
199
  })
@@ -209,3 +223,12 @@ export const s3Module: ProcedureModule = defineModule("@procedures/s3", [
209
223
  ]);
210
224
 
211
225
  export default s3Module;
226
+
227
+ /**
228
+ * This function registers the procedures of @procedures/s3, and of the modules that it requires, in
229
+ * a registry. The default is the global registry. Importing this file registers nothing: the
230
+ * `./register` entry starts this function (ARCHITECTURE-PROPOSALS-2026-10, P9).
231
+ */
232
+ export function registerS3Procedures(registry: ProcedureRegistry = PROCEDURE_REGISTRY): void {
233
+ registerModules(registry, [s3Module]);
234
+ }
package/src/register.ts CHANGED
@@ -1,17 +1,11 @@
1
1
  /**
2
- * Importing this file registers the procedures of @procedures/s3 in the global registry
3
- * (DECISIONS-2026-10, "Every package root registers its procedures"). The procedures as data
4
- * are in `module.ts`, which registers nothing: a host with its own registry uses that one.
2
+ * Importing this file registers the procedures of @procedures/s3, and of the modules that it
3
+ * requires, in the global registry: `import "@procedures/s3/register"`. The package root and the
4
+ * `./module` entry register nothing (ARCHITECTURE-PROPOSALS-2026-10, P9).
5
5
  */
6
6
 
7
- import { registerProcedures } from "@procedures/client";
8
- import { s3Module } from "./module.js";
7
+ import { registerS3Procedures } from "./module.js";
9
8
 
10
9
  export * from "./module.js";
11
10
 
12
- export function registerS3Procedures(): void {
13
- registerProcedures(s3Module.procedures);
14
- }
15
-
16
- // Auto-register when this module is loaded
17
11
  registerS3Procedures();