@mesh-tech/mesh-cli 0.36.0 → 0.37.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 (103) hide show
  1. package/assets/docs-preview.css +1599 -0
  2. package/dist/bin/mesh.auth-preflight-JFKL4Y4X.js +48 -0
  3. package/dist/bin/mesh.auth-preflight-JFKL4Y4X.js.map +6 -0
  4. package/dist/bin/mesh.capture-history-A4IAVVIR.js +38 -0
  5. package/dist/bin/mesh.capture-history-A4IAVVIR.js.map +6 -0
  6. package/dist/bin/mesh.chunk-5A5OFSYR.js +187 -0
  7. package/dist/bin/mesh.chunk-5A5OFSYR.js.map +6 -0
  8. package/dist/bin/mesh.chunk-7DMAFUBQ.js +7715 -0
  9. package/dist/bin/mesh.chunk-7DMAFUBQ.js.map +6 -0
  10. package/dist/bin/mesh.chunk-A4DGMGHF.js +303 -0
  11. package/dist/bin/mesh.chunk-A4DGMGHF.js.map +6 -0
  12. package/dist/bin/mesh.chunk-CQ2IC4OP.js +217 -0
  13. package/dist/bin/mesh.chunk-CQ2IC4OP.js.map +6 -0
  14. package/dist/bin/mesh.chunk-F4654EPX.js +383 -0
  15. package/dist/bin/mesh.chunk-F4654EPX.js.map +6 -0
  16. package/dist/bin/mesh.chunk-IQOBTL42.js +60 -0
  17. package/dist/bin/mesh.chunk-IQOBTL42.js.map +6 -0
  18. package/dist/bin/mesh.chunk-J6DVWKRW.js +647 -0
  19. package/dist/bin/mesh.chunk-J6DVWKRW.js.map +6 -0
  20. package/dist/bin/mesh.chunk-JB7FWYSP.js +1751 -0
  21. package/dist/bin/mesh.chunk-JB7FWYSP.js.map +6 -0
  22. package/dist/bin/mesh.chunk-MCBMHWXP.js +837 -0
  23. package/dist/bin/mesh.chunk-MCBMHWXP.js.map +6 -0
  24. package/dist/bin/mesh.chunk-OW5EMVG5.js +507 -0
  25. package/dist/bin/mesh.chunk-OW5EMVG5.js.map +6 -0
  26. package/dist/bin/mesh.chunk-R5VVTXG4.js +10092 -0
  27. package/dist/bin/mesh.chunk-R5VVTXG4.js.map +6 -0
  28. package/dist/bin/mesh.chunk-VKV6Z3UI.js +1146 -0
  29. package/dist/bin/mesh.chunk-VKV6Z3UI.js.map +6 -0
  30. package/dist/bin/mesh.chunk-WFFDF346.js +59 -0
  31. package/dist/bin/mesh.chunk-WFFDF346.js.map +6 -0
  32. package/dist/bin/mesh.chunk-WOJOTUFZ.js +835 -0
  33. package/dist/bin/mesh.chunk-WOJOTUFZ.js.map +6 -0
  34. package/dist/bin/mesh.cli-reference-H3TOPIET.js +158 -0
  35. package/dist/bin/mesh.cli-reference-H3TOPIET.js.map +6 -0
  36. package/dist/bin/mesh.convert-KK6ZP256.js +274 -0
  37. package/dist/bin/mesh.convert-KK6ZP256.js.map +6 -0
  38. package/dist/bin/mesh.create-app-A5F45PWZ.js +39 -0
  39. package/dist/bin/mesh.create-app-A5F45PWZ.js.map +6 -0
  40. package/dist/bin/mesh.dev-token-server-GYDYPXYH.js +61 -0
  41. package/dist/bin/mesh.dev-token-server-GYDYPXYH.js.map +6 -0
  42. package/dist/bin/mesh.js +20 -26418
  43. package/dist/bin/mesh.js.map +3 -3
  44. package/dist/bin/mesh.login-JNHPVMCT.js +91 -0
  45. package/dist/bin/mesh.login-JNHPVMCT.js.map +6 -0
  46. package/dist/bin/mesh.platform-setup-EB64EFRN.js +37 -0
  47. package/dist/bin/mesh.platform-setup-EB64EFRN.js.map +6 -0
  48. package/dist/bin/mesh.preview-3IP34TDO.js +2410 -0
  49. package/dist/bin/mesh.preview-3IP34TDO.js.map +6 -0
  50. package/dist/bin/mesh.program-DWOKHNMQ.js +23 -0
  51. package/dist/bin/mesh.program-DWOKHNMQ.js.map +6 -0
  52. package/dist/bin/mesh.registry-OXF57OQW.js +47 -0
  53. package/dist/bin/mesh.registry-OXF57OQW.js.map +6 -0
  54. package/dist/bin/mesh.registry-identity-2HSGQGJC.js +42 -0
  55. package/dist/bin/mesh.registry-identity-2HSGQGJC.js.map +6 -0
  56. package/dist/bin/mesh.skills-MNDSMBIE.js +23 -0
  57. package/dist/bin/mesh.skills-MNDSMBIE.js.map +6 -0
  58. package/dist/bin/mesh.src-5D5DFSLX.js +1302 -0
  59. package/dist/bin/mesh.src-5D5DFSLX.js.map +6 -0
  60. package/dist/bin/mesh.src-G7TJBLNJ.js +40 -0
  61. package/dist/bin/mesh.src-G7TJBLNJ.js.map +6 -0
  62. package/dist/bin/mesh.stack-EFTFAOCV.js +64 -0
  63. package/dist/bin/mesh.stack-EFTFAOCV.js.map +6 -0
  64. package/dist/bin/mesh.start-ARIIY6CV.js +454 -0
  65. package/dist/bin/mesh.start-ARIIY6CV.js.map +6 -0
  66. package/dist/bin/mesh.wizard-ROAQAGSF.js +500 -0
  67. package/dist/bin/mesh.wizard-ROAQAGSF.js.map +6 -0
  68. package/dist/build-info.json +2 -2
  69. package/dist/src/commands/app-check.d.ts +2 -1
  70. package/dist/src/commands/app-check.js +32 -0
  71. package/dist/src/commands/dev.d.ts +6 -0
  72. package/dist/src/commands/dev.js +152 -3
  73. package/dist/src/commands/docs.js +33 -0
  74. package/dist/src/commands/local/act-as-local.d.ts +5 -0
  75. package/dist/src/commands/local/act-as-local.js +41 -0
  76. package/dist/src/commands/local/auth-provision.d.ts +1 -0
  77. package/dist/src/commands/local/auth-provision.js +1 -0
  78. package/dist/src/commands/local/index.js +4 -0
  79. package/dist/src/commands/local/local-api-key.d.ts +44 -0
  80. package/dist/src/commands/local/local-api-key.js +115 -0
  81. package/dist/src/commands/local/local-spicedb.d.ts +95 -0
  82. package/dist/src/commands/local/local-spicedb.js +304 -0
  83. package/dist/src/commands/local/publish-docs.d.ts +81 -0
  84. package/dist/src/commands/local/publish-docs.js +328 -0
  85. package/dist/src/commands/local/seed-zitadel.js +2 -0
  86. package/dist/src/commands/temporal.js +191 -61
  87. package/dist/src/commands/temporal.js.map +3 -3
  88. package/dist/src/docs/convert.d.ts +35 -0
  89. package/dist/src/docs/convert.js +276 -0
  90. package/dist/src/docs/preview-source.d.ts +13 -0
  91. package/dist/src/docs/preview-source.js +58 -0
  92. package/dist/src/docs/preview.d.ts +32 -0
  93. package/dist/src/docs/preview.js +279 -0
  94. package/fragments/agents/AGENTS.md.hbs +27 -27
  95. package/fragments/base/README.md.hbs +5 -2
  96. package/fragments/base/index.ts.hbs +17 -30
  97. package/fragments/base/package.json.hbs +4 -1
  98. package/fragments/service/api/openapi.json.hbs +1 -1
  99. package/fragments/service/docs/docs.yaml.hbs +10 -0
  100. package/fragments/service/docs/pages/getting-started.md.hbs +6 -9
  101. package/package.json +19 -3
  102. package/skills/mesh/SKILL.md +2 -2
  103. package/stack/docker-compose.hub.yml +6 -0
@@ -0,0 +1,304 @@
1
+ import { LOCAL_ENV } from "./seed.js";
2
+ import { isAwsErrorCode } from "../../utils/aws-errors.js";
3
+ import { LOCAL_STACK_NAME } from "./dev-local.js";
4
+ export const LOCAL_SPICEDB_INSTANCE_ID = "mesh-local";
5
+ export const LOCAL_SPICEDB_KEY = "local-dev-key";
6
+ export const LOCAL_SPICEDB_KEY_SECRET = "mesh/local/dev/spicedb/preshared-key";
7
+ const HOST_HTTP = "http://localhost:8443";
8
+ export function localSpicedbInstancePath(tenant) {
9
+ return `/mesh-platform/${tenant}/${LOCAL_ENV}/authz/spicedb-instances/${LOCAL_SPICEDB_INSTANCE_ID}`;
10
+ }
11
+ export function localSpicedbInstanceValue() {
12
+ return {
13
+ grpcEndpoint: "spicedb:50051",
14
+ httpEndpoint: "spicedb:8443",
15
+ namespace: "mesh-local",
16
+ presharedKeySecretName: LOCAL_SPICEDB_KEY_SECRET,
17
+ configSecretName: "",
18
+ owner: { kind: "shared-stack", name: "mesh-local" },
19
+ };
20
+ }
21
+ export function localSpicedbRef(tenant) {
22
+ return { tenant, env: LOCAL_ENV, instanceId: LOCAL_SPICEDB_INSTANCE_ID };
23
+ }
24
+ export function localAuthzServiceEnv(tenant, app) {
25
+ return {
26
+ SPICEDB_ENDPOINT: "localhost:50051",
27
+ SPICEDB_TOKEN: LOCAL_SPICEDB_KEY,
28
+ AUTHZ_METADATA_SSM_PATH: `/mesh-platform/${tenant}/${LOCAL_ENV}/apps/${app}/stacks/${LOCAL_STACK_NAME}/authz/metadata`,
29
+ };
30
+ }
31
+ function skipTrivia(schema, i) {
32
+ if (schema.startsWith("//", i)) {
33
+ const nl = schema.indexOf("\n", i);
34
+ return nl < 0 ? schema.length : nl + 1;
35
+ }
36
+ if (schema.startsWith("/*", i)) {
37
+ const close = schema.indexOf("*/", i + 2);
38
+ return close < 0 ? schema.length : close + 2;
39
+ }
40
+ const quote = schema[i];
41
+ if (quote === '"' || quote === "'" || quote === "`") {
42
+ let j = i + 1;
43
+ while (j < schema.length && schema[j] !== quote)
44
+ j += schema[j] === "\\" ? 2 : 1;
45
+ return Math.min(j + 1, schema.length);
46
+ }
47
+ return i;
48
+ }
49
+ export function parseZed(schema) {
50
+ const uses = [];
51
+ const blocks = [];
52
+ const word = /[A-Za-z_][A-Za-z0-9_]*/y;
53
+ const header = /\s+([A-Za-z0-9_/]+)/y;
54
+ let i = 0;
55
+ while (i < schema.length) {
56
+ const skipped = skipTrivia(schema, i);
57
+ if (skipped !== i) {
58
+ i = skipped;
59
+ continue;
60
+ }
61
+ word.lastIndex = i;
62
+ const keyword = /[A-Za-z0-9_]/.test(schema[i - 1] ?? "") ? null : word.exec(schema);
63
+ if (!keyword) {
64
+ i++;
65
+ continue;
66
+ }
67
+ const start = i;
68
+ i = word.lastIndex;
69
+ if (keyword[0] === "use") {
70
+ const nl = schema.indexOf("\n", i);
71
+ const line = schema.slice(start, nl < 0 ? schema.length : nl).replace(/\/\/.*$|\/\*.*$/, "").trim().replace(/\s+/g, " ");
72
+ if (/^use \S+$/.test(line) && !uses.includes(line))
73
+ uses.push(line);
74
+ i = nl < 0 ? schema.length : nl + 1;
75
+ continue;
76
+ }
77
+ if (keyword[0] !== "definition" && keyword[0] !== "caveat")
78
+ continue;
79
+ header.lastIndex = i;
80
+ const name = header.exec(schema);
81
+ if (!name)
82
+ continue;
83
+ let j = header.lastIndex;
84
+ let depth = 0;
85
+ let end = -1;
86
+ while (j < schema.length) {
87
+ const past = skipTrivia(schema, j);
88
+ if (past !== j) {
89
+ j = past;
90
+ continue;
91
+ }
92
+ if (schema[j] === "{")
93
+ depth++;
94
+ else if (schema[j] === "}" && depth > 0 && --depth === 0) {
95
+ end = j;
96
+ break;
97
+ }
98
+ j++;
99
+ }
100
+ if (end < 0)
101
+ break;
102
+ blocks.push({ name: name[1], text: schema.slice(start, end + 1).trim() });
103
+ i = end + 1;
104
+ }
105
+ return { uses, blocks };
106
+ }
107
+ export function zedBlocks(schema) {
108
+ return parseZed(schema).blocks;
109
+ }
110
+ export function mergeZedSchemas(existing, incoming) {
111
+ const before = parseZed(existing);
112
+ const after = parseZed(incoming);
113
+ const merged = new Map();
114
+ for (const block of before.blocks)
115
+ merged.set(block.name, block.text);
116
+ for (const block of after.blocks)
117
+ merged.set(block.name, block.text);
118
+ const uses = [...new Set([...before.uses, ...after.uses])];
119
+ return [...(uses.length ? [uses.join("\n")] : []), ...merged.values()].join("\n\n");
120
+ }
121
+ export const LOCAL_SPICEDB_OWNERS_SECRET = "mesh/local/dev/spicedb/schema-owners";
122
+ export function planLocalSpicedbSchema(input) {
123
+ const present = new Map(zedBlocks(input.existing).map((b) => [b.name, b.text]));
124
+ const incoming = zedBlocks(input.incoming);
125
+ const conflicts = [];
126
+ const shared = new Set();
127
+ for (const { name, text } of incoming) {
128
+ const owner = input.owners[name];
129
+ if (!owner || owner === input.app || !present.has(name))
130
+ continue;
131
+ if (sameDefinition(present.get(name), text) && !/\bops_/.test(text))
132
+ shared.add(name);
133
+ else
134
+ conflicts.push({ type: name, owner });
135
+ }
136
+ if (conflicts.length > 0)
137
+ return { ok: false, conflicts };
138
+ const owners = {};
139
+ for (const [name, owner] of Object.entries(input.owners))
140
+ if (present.has(name))
141
+ owners[name] = owner;
142
+ for (const { name } of incoming)
143
+ if (!shared.has(name))
144
+ owners[name] = input.app;
145
+ const schema = mergeZedSchemas(input.existing, input.incoming);
146
+ const changed = !input.existing || mergeZedSchemas("", input.existing) !== schema;
147
+ return { ok: true, schema, owners, changed };
148
+ }
149
+ function sameDefinition(a, b) {
150
+ return a.replace(/\s+/g, "") === b.replace(/\s+/g, "");
151
+ }
152
+ export class LocalSpicedbConflictError extends Error {
153
+ app;
154
+ conflicts;
155
+ constructor(app, conflicts) {
156
+ const types = conflicts.map((c) => `'${c.type}' (owned by ${c.owner})`).join(", ");
157
+ super(`${app}'s SpiceDB schema declares ${conflicts.length === 1 ? "a type" : "types"} another local app already owns on the local SpiceDB: ${types}. ` +
158
+ `It was not written, so ${app} keeps its own local fallback and local keys' bundle assignments do not reach it. ` +
159
+ `Rename the type in ${app}'s schema, or run one of these apps at a time (mesh stop --destroy clears the local SpiceDB).`);
160
+ this.app = app;
161
+ this.conflicts = conflicts;
162
+ this.name = "LocalSpicedbConflictError";
163
+ }
164
+ }
165
+ export function zedOf(value) {
166
+ const zed = typeof value === "string" ? value : value?.zed;
167
+ if (typeof zed !== "string" || !zed.trim())
168
+ throw new Error("the spicedbSchema export returned no zed schema");
169
+ return zed;
170
+ }
171
+ async function spicedbHttp(path, body) {
172
+ const res = await fetch(`${HOST_HTTP}${path}`, {
173
+ method: "POST",
174
+ headers: { Authorization: `Bearer ${LOCAL_SPICEDB_KEY}`, "Content-Type": "application/json" },
175
+ body: JSON.stringify(body),
176
+ });
177
+ const parsed = (await res.json().catch(() => ({})));
178
+ if (!res.ok)
179
+ throw Object.assign(new Error(`SpiceDB ${path}: ${res.status} ${parsed.message ?? ""}`.trim()), { status: res.status });
180
+ return parsed;
181
+ }
182
+ async function readLocalSpicedbSchema() {
183
+ try {
184
+ return (await spicedbHttp("/v1/schema/read", {})).schemaText ?? "";
185
+ }
186
+ catch (err) {
187
+ if (err.status !== 404)
188
+ throw err;
189
+ return "";
190
+ }
191
+ }
192
+ async function readLocalSpicedbOwners(awsConfig) {
193
+ const { SecretsManagerClient, GetSecretValueCommand } = await import("@aws-sdk/client-secrets-manager");
194
+ try {
195
+ const out = await new SecretsManagerClient(awsConfig).send(new GetSecretValueCommand({ SecretId: LOCAL_SPICEDB_OWNERS_SECRET }));
196
+ const parsed = JSON.parse(out.SecretString ?? "{}");
197
+ if (!parsed || typeof parsed !== "object" || Array.isArray(parsed))
198
+ return {};
199
+ return Object.fromEntries(Object.entries(parsed).filter((e) => typeof e[1] === "string"));
200
+ }
201
+ catch (err) {
202
+ if (isAwsErrorCode(err, "ResourceNotFoundException"))
203
+ return {};
204
+ throw err;
205
+ }
206
+ }
207
+ async function writeLocalSpicedbOwners(awsConfig, owners) {
208
+ const { SecretsManagerClient, CreateSecretCommand, PutSecretValueCommand } = await import("@aws-sdk/client-secrets-manager");
209
+ const sm = new SecretsManagerClient(awsConfig);
210
+ const secret = JSON.stringify(owners);
211
+ await sm
212
+ .send(new CreateSecretCommand({ Name: LOCAL_SPICEDB_OWNERS_SECRET, SecretString: secret }))
213
+ .catch(() => sm.send(new PutSecretValueCommand({ SecretId: LOCAL_SPICEDB_OWNERS_SECRET, SecretString: secret })));
214
+ }
215
+ export function localSpicedbIo(tenant, awsConfig) {
216
+ return {
217
+ readSchema: readLocalSpicedbSchema,
218
+ writeSchema: async (schema) => {
219
+ await spicedbHttp("/v1/schema/write", { schema });
220
+ },
221
+ readOwners: () => readLocalSpicedbOwners(awsConfig),
222
+ writeOwners: (owners) => writeLocalSpicedbOwners(awsConfig, owners),
223
+ writeSeed: writeLocalSpicedbSeed,
224
+ register: () => registerLocalSpicedb(tenant, awsConfig),
225
+ };
226
+ }
227
+ export async function writeLocalSpicedbSchema(app, zed, io) {
228
+ const [existing, owners] = await Promise.all([io.readSchema(), io.readOwners()]);
229
+ const plan = planLocalSpicedbSchema({ existing, incoming: zed, owners, app });
230
+ if (!plan.ok)
231
+ throw new LocalSpicedbConflictError(app, plan.conflicts);
232
+ if (plan.changed)
233
+ await io.writeSchema(plan.schema);
234
+ await io.writeOwners(plan.owners);
235
+ return plan.changed;
236
+ }
237
+ export async function connectLocalSpicedb(input) {
238
+ const { app, tenant, io } = input;
239
+ const notes = [];
240
+ try {
241
+ await writeLocalSpicedbSchema(app, zedOf(await input.schema()), io);
242
+ if (input.seed) {
243
+ const seed = seedUpdates(await input.seed());
244
+ notes.push(...seed.problems);
245
+ await io.writeSeed(seed.updates);
246
+ }
247
+ await io.register();
248
+ return { instanceRefs: [localSpicedbRef(tenant)], env: localAuthzServiceEnv(tenant, app), notes };
249
+ }
250
+ catch (err) {
251
+ notes.push(err instanceof LocalSpicedbConflictError
252
+ ? err.message
253
+ : `the app's SpiceDB schema was not written to the local SpiceDB (${err instanceof Error ? err.message : String(err)}), so local keys' bundle assignments do not reach the app`);
254
+ return { instanceRefs: [], env: {}, notes };
255
+ }
256
+ }
257
+ export async function registerLocalSpicedb(tenant, awsConfig) {
258
+ const { SSMClient, PutParameterCommand } = await import("@aws-sdk/client-ssm");
259
+ const { SecretsManagerClient, CreateSecretCommand, PutSecretValueCommand } = await import("@aws-sdk/client-secrets-manager");
260
+ const sm = new SecretsManagerClient(awsConfig);
261
+ const secret = JSON.stringify({ PRESHARED_KEY: LOCAL_SPICEDB_KEY });
262
+ await sm
263
+ .send(new CreateSecretCommand({ Name: LOCAL_SPICEDB_KEY_SECRET, SecretString: secret }))
264
+ .catch(() => sm.send(new PutSecretValueCommand({ SecretId: LOCAL_SPICEDB_KEY_SECRET, SecretString: secret })));
265
+ await new SSMClient(awsConfig).send(new PutParameterCommand({
266
+ Name: localSpicedbInstancePath(tenant),
267
+ Type: "String",
268
+ Overwrite: true,
269
+ Value: JSON.stringify(localSpicedbInstanceValue()),
270
+ }));
271
+ }
272
+ const OBJECT = /^([a-z][a-z0-9_/]*):([a-zA-Z0-9/_|\-=+*]+)$/;
273
+ export function seedUpdates(value) {
274
+ const problems = [];
275
+ const updates = [];
276
+ if (!Array.isArray(value))
277
+ return { updates, problems: ["the spicedbSeed export did not return a list of relationships"] };
278
+ for (const [i, entry] of value.entries()) {
279
+ const { resource, relation, subject } = (entry ?? {});
280
+ const [subjectObject, subjectRelation] = typeof subject === "string" ? subject.split("#") : [];
281
+ const res = typeof resource === "string" ? OBJECT.exec(resource) : null;
282
+ const sub = typeof subjectObject === "string" ? OBJECT.exec(subjectObject) : null;
283
+ if (!res || !sub || typeof relation !== "string" || !/^[a-z][a-z0-9_]*$/.test(relation)) {
284
+ problems.push(`spicedbSeed[${i}] is not { resource: "type:id", relation, subject: "type:id[#relation]" }`);
285
+ continue;
286
+ }
287
+ updates.push({
288
+ operation: "OPERATION_TOUCH",
289
+ relationship: {
290
+ resource: { objectType: res[1], objectId: res[2] },
291
+ relation,
292
+ subject: {
293
+ object: { objectType: sub[1], objectId: sub[2] },
294
+ ...(subjectRelation ? { optionalRelation: subjectRelation } : {}),
295
+ },
296
+ },
297
+ });
298
+ }
299
+ return { updates, problems };
300
+ }
301
+ export async function writeLocalSpicedbSeed(updates) {
302
+ if (updates.length > 0)
303
+ await spicedbHttp("/v1/relationships/write", { updates });
304
+ }
@@ -0,0 +1,81 @@
1
+ import { type ApiRegistryEntry, type DocsEventsCatalog, type OperationAvailability, type SandboxMode } from "@mesh-tech/api-registry";
2
+ export interface LocalDocsDeclaration {
3
+ config: string;
4
+ actAs: boolean;
5
+ sandbox?: SandboxMode;
6
+ local?: string;
7
+ service?: string;
8
+ integrationTryIt?: string[];
9
+ }
10
+ export interface LocalPublishDeclaration {
11
+ docs?: LocalDocsDeclaration;
12
+ authzMetadata?: string;
13
+ authzSpicedbSchema?: string;
14
+ authzSpicedbSeed?: string;
15
+ problems: string[];
16
+ }
17
+ export declare function readLocalPublishDeclaration(pkg: unknown, appRoot: string): LocalPublishDeclaration;
18
+ export declare function callExport(appRoot: string, spec: string, arg?: unknown): Promise<unknown>;
19
+ export declare function localDocsEntry(input: {
20
+ name: string;
21
+ title: string;
22
+ description?: string;
23
+ docs: {
24
+ url: string;
25
+ contentHash: string;
26
+ sourceUrl: string;
27
+ sourceContentHash: string;
28
+ };
29
+ httpPort: number;
30
+ namespace: string;
31
+ actAs: boolean;
32
+ integrations?: readonly string[];
33
+ sandbox?: SandboxMode;
34
+ eventsEntry?: string;
35
+ }): ApiRegistryEntry;
36
+ export declare const LOCAL_PLATFORM_NETWORK = "mesh-local_mesh_network";
37
+ export declare function aliasContainerArgs(input: {
38
+ name: string;
39
+ namespace: string;
40
+ port: number;
41
+ }): string[];
42
+ export declare function aliasContainerName(namespace: string): string;
43
+ export declare function removeAllAliasContainers(): string[];
44
+ export interface LocalDocsExport {
45
+ availability?: Record<string, OperationAvailability>;
46
+ events?: DocsEventsCatalog;
47
+ sandbox?: unknown;
48
+ env?: Record<string, string>;
49
+ }
50
+ export declare function resolveLocalSandbox(local: LocalDocsExport, declared: SandboxMode | undefined): {
51
+ sandbox: SandboxMode;
52
+ pins: Record<string, string>;
53
+ notes: string[];
54
+ };
55
+ export interface PublishLocalDocsInput {
56
+ appRoot: string;
57
+ tenant: string;
58
+ app: string;
59
+ httpPort: number;
60
+ serviceEnv: Record<string, string>;
61
+ zitadel?: {
62
+ projectId: string;
63
+ orgId: string;
64
+ issuer: string;
65
+ };
66
+ awsConfig: object;
67
+ declaration: LocalPublishDeclaration;
68
+ }
69
+ export interface PublishLocalDocsResult {
70
+ problems: string[];
71
+ notes: string[];
72
+ pins: Record<string, string>;
73
+ authzPublished: boolean;
74
+ authzEnv: Record<string, string>;
75
+ docsPublished: boolean;
76
+ sandbox?: SandboxMode;
77
+ actAs: boolean;
78
+ }
79
+ export declare function publishLocalDocs(input: PublishLocalDocsInput): Promise<PublishLocalDocsResult>;
80
+ export declare function localAuthzPointerPath(tenant: string, app: string): string;
81
+ export declare function unpublishLocalDocs(tenant: string, app: string, awsConfig: object): Promise<string[]>;