@procedures/procedure 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.
@@ -5,7 +5,7 @@
5
5
  * Enables procedure-as-data patterns, remote registration, and persistence.
6
6
  */
7
7
 
8
- import { defineProcedure, PROCEDURE_REGISTRY, pathToKey, keyToPath } from "@procedures/client";
8
+ import { defineProcedure, PROCEDURE_REGISTRY, REGISTRY_READ_EFFECTS, pathToKey, keyToPath } from "@procedures/client";
9
9
  import type { AnyProcedure, ProcedurePath } from "@procedures/client";
10
10
  import { z } from "zod";
11
11
 
@@ -57,6 +57,7 @@ export const procedureExportProcedure: AnyProcedure = defineProcedure({
57
57
  metadata: {
58
58
  description: "Export a procedure definition as JSON",
59
59
  tags: ["procedure", "registry"],
60
+ effects: REGISTRY_READ_EFFECTS,
60
61
  args: ["path"],
61
62
  shorts: {},
62
63
  output: "json",
package/src/register.ts CHANGED
@@ -1,19 +1,11 @@
1
1
  /**
2
- * Importing this file registers the procedures of @procedures/procedure in the global
3
- * registry (DECISIONS-2026-10, "Every package root registers its procedures"). The procedures as
4
- * data 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/procedure, and of the modules that it
3
+ * requires, in the global registry: `import "@procedures/procedure/register"`. The package root and the
4
+ * `./module` entry register nothing (ARCHITECTURE-PROPOSALS-2026-10, P9).
5
5
  */
6
6
 
7
- import { PROCEDURE_REGISTRY } from "@procedures/client";
8
- import { procedureModule } from "./module.js";
7
+ import { registerProcedureProcedures } from "./module.js";
9
8
 
10
9
  export * from "./module.js";
11
10
 
12
- export function registerProcedureProcedures(): void {
13
- // Override makes the registration idempotent. procedure.list and procedure.get are the core
14
- // ones: this package does not replace them (docs review DOC-6).
15
- PROCEDURE_REGISTRY.registerAll(procedureModule.procedures, { override: true });
16
- }
17
-
18
- // Auto-register
19
11
  registerProcedureProcedures();