@substrat-run/contracts 0.30.0 → 0.31.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.
@@ -51,4 +51,31 @@ export type PlatformRequest = z.infer<typeof platformRequest>;
51
51
  * the drain. Shared by every adapter so the limit can't drift between them.
52
52
  */
53
53
  export declare const MAX_PENDING_PLATFORM_REQUESTS = 32;
54
+ /**
55
+ * The `provision-sibling` intent kind (multi-scope-manyfold.md M3) — a vertical asking the platform
56
+ * to provision a new sibling scope of the one that enqueued it (a new Manyfold "site"). Shared
57
+ * vocabulary: the vertical builds this payload, the platform's drain handler validates it. `owner`
58
+ * is the vertical-domain principal to seat as the new scope's owner. The parent scope and the
59
+ * tenant are NOT in the payload — the platform derives them from the scope the intent lives in.
60
+ */
61
+ export declare const provisionSiblingPayload: z.ZodObject<{
62
+ slug: z.ZodString;
63
+ name: z.ZodString;
64
+ owner: z.ZodString;
65
+ }, z.core.$strip>;
66
+ export type ProvisionSiblingPayload = z.infer<typeof provisionSiblingPayload>;
67
+ /** The well-known intent kind string for `provisionSiblingPayload`. */
68
+ export declare const PROVISION_SIBLING_KIND = "provision-sibling";
69
+ /**
70
+ * The `archive-scope` intent kind (multi-scope-manyfold.md) — a vertical asking the platform to
71
+ * archive a sibling scope (retiring a Manyfold "site"). The target must belong to the same tenant
72
+ * and vertical as the scope that enqueued the intent; the platform verifies that against its
73
+ * directory before archiving, so a vertical can only ever archive its own tenant's scopes.
74
+ */
75
+ export declare const archiveScopePayload: z.ZodObject<{
76
+ scopeId: z.core.$ZodBranded<z.ZodString, "ScopeId", "out">;
77
+ }, z.core.$strip>;
78
+ export type ArchiveScopePayload = z.infer<typeof archiveScopePayload>;
79
+ /** The well-known intent kind string for `archiveScopePayload`. */
80
+ export declare const ARCHIVE_SCOPE_KIND = "archive-scope";
54
81
  //# sourceMappingURL=platform-request.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"platform-request.d.ts","sourceRoot":"","sources":["../src/platform-request.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB;;;;;;GAMG;AAEH,eAAO,MAAM,qBAAqB;;;;EAAwC,CAAC;AAC3E,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAE1E;;;;;GAKG;AACH,eAAO,MAAM,oBAAoB;;;iBAG/B,CAAC;AACH,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAExE,+FAA+F;AAC/F,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;iBAW1B,CAAC;AACH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AAE9D;;;;GAIG;AACH,eAAO,MAAM,6BAA6B,KAAK,CAAC"}
1
+ {"version":3,"file":"platform-request.d.ts","sourceRoot":"","sources":["../src/platform-request.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB;;;;;;GAMG;AAEH,eAAO,MAAM,qBAAqB;;;;EAAwC,CAAC;AAC3E,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAE1E;;;;;GAKG;AACH,eAAO,MAAM,oBAAoB;;;iBAG/B,CAAC;AACH,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAExE,+FAA+F;AAC/F,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;iBAW1B,CAAC;AACH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AAE9D;;;;GAIG;AACH,eAAO,MAAM,6BAA6B,KAAK,CAAC;AAEhD;;;;;;GAMG;AACH,eAAO,MAAM,uBAAuB;;;;iBAIlC,CAAC;AACH,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAE9E,uEAAuE;AACvE,eAAO,MAAM,sBAAsB,sBAAsB,CAAC;AAE1D;;;;;GAKG;AACH,eAAO,MAAM,mBAAmB;;iBAAwB,CAAC;AACzD,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAEtE,mEAAmE;AACnE,eAAO,MAAM,kBAAkB,kBAAkB,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import { z } from 'zod';
2
- import { instant, platformRequestId } from './ids.js';
2
+ import { instant, platformRequestId, scopeId } from './ids.js';
3
3
  import { actor } from './events.js';
4
4
  /**
5
5
  * Platform intents (docs/design/platform-intents.md) — how a sandbox-clean vertical asks the
@@ -38,4 +38,27 @@ export const platformRequest = z.object({
38
38
  * the drain. Shared by every adapter so the limit can't drift between them.
39
39
  */
40
40
  export const MAX_PENDING_PLATFORM_REQUESTS = 32;
41
+ /**
42
+ * The `provision-sibling` intent kind (multi-scope-manyfold.md M3) — a vertical asking the platform
43
+ * to provision a new sibling scope of the one that enqueued it (a new Manyfold "site"). Shared
44
+ * vocabulary: the vertical builds this payload, the platform's drain handler validates it. `owner`
45
+ * is the vertical-domain principal to seat as the new scope's owner. The parent scope and the
46
+ * tenant are NOT in the payload — the platform derives them from the scope the intent lives in.
47
+ */
48
+ export const provisionSiblingPayload = z.object({
49
+ slug: z.string().min(1),
50
+ name: z.string().min(1),
51
+ owner: z.string().min(1),
52
+ });
53
+ /** The well-known intent kind string for `provisionSiblingPayload`. */
54
+ export const PROVISION_SIBLING_KIND = 'provision-sibling';
55
+ /**
56
+ * The `archive-scope` intent kind (multi-scope-manyfold.md) — a vertical asking the platform to
57
+ * archive a sibling scope (retiring a Manyfold "site"). The target must belong to the same tenant
58
+ * and vertical as the scope that enqueued the intent; the platform verifies that against its
59
+ * directory before archiving, so a vertical can only ever archive its own tenant's scopes.
60
+ */
61
+ export const archiveScopePayload = z.object({ scopeId });
62
+ /** The well-known intent kind string for `archiveScopePayload`. */
63
+ export const ARCHIVE_SCOPE_KIND = 'archive-scope';
41
64
  //# sourceMappingURL=platform-request.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"platform-request.js","sourceRoot":"","sources":["../src/platform-request.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AACtD,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAEpC;;;;;;GAMG;AAEH,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC;AAG3E;;;;;GAKG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC3C,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACvB,OAAO,EAAE,CAAC,CAAC,OAAO,EAAE;CACrB,CAAC,CAAC;AAGH,+FAA+F;AAC/F,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,CAAC,MAAM,CAAC;IACtC,EAAE,EAAE,iBAAiB;IACrB,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACvB,OAAO,EAAE,CAAC,CAAC,OAAO,EAAE;IACpB,WAAW,EAAE,KAAK,EAAE,kFAAkF;IACtG,MAAM,EAAE,qBAAqB;IAC7B,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,WAAW,EAAE;IACxC,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAChC,MAAM,EAAE,CAAC,CAAC,OAAO,EAAE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AC,OAAO,EAAE,CAAC,QAAQ,EAAE;IAC9B,WAAW,EAAE,OAAO,EAAE,sBAAsB;IAC5C,SAAS,EAAE,OAAO,CAAC,QAAQ,EAAE;CAC9B,CAAC,CAAC;AAGH;;;;GAIG;AACH,MAAM,CAAC,MAAM,6BAA6B,GAAG,EAAE,CAAC;AAEhD;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC9C,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACvB,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACvB,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;CACzB,CAAC,CAAC;AAGH,uEAAuE;AACvE,MAAM,CAAC,MAAM,sBAAsB,GAAG,mBAAmB,CAAC;AAE1D;;;;;GAKG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC;AAGzD,mEAAmE;AACnE,MAAM,CAAC,MAAM,kBAAkB,GAAG,eAAe,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@substrat-run/contracts",
3
- "version": "0.30.0",
3
+ "version": "0.31.0",
4
4
  "description": "Substrat kernel contract schemas — Zod is the source of truth (master plan D-22); OAS/JSON Schema are emitted artifacts",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {