@wildo-ai/saas-technical-doc 1.1.1 → 1.1.2

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 (64) hide show
  1. package/dist/esm/companion/application-documentation/application-administration-documentation.d.ts +52 -0
  2. package/dist/esm/companion/application-documentation/application-administration-documentation.d.ts.map +1 -0
  3. package/dist/esm/companion/application-documentation/application-administration-documentation.js +58 -0
  4. package/dist/esm/companion/application-documentation/application-administration-documentation.js.map +1 -0
  5. package/dist/esm/companion/application-documentation/application-authentication-documentation.d.ts +76 -0
  6. package/dist/esm/companion/application-documentation/application-authentication-documentation.d.ts.map +1 -0
  7. package/dist/esm/companion/application-documentation/application-authentication-documentation.js +116 -0
  8. package/dist/esm/companion/application-documentation/application-authentication-documentation.js.map +1 -0
  9. package/dist/esm/companion/application-documentation/application-connection-documentation.d.ts +87 -0
  10. package/dist/esm/companion/application-documentation/application-connection-documentation.d.ts.map +1 -0
  11. package/dist/esm/companion/application-documentation/application-connection-documentation.js +138 -0
  12. package/dist/esm/companion/application-documentation/application-connection-documentation.js.map +1 -0
  13. package/dist/esm/companion/application-documentation/application-integration-documentation.d.ts +48 -0
  14. package/dist/esm/companion/application-documentation/application-integration-documentation.d.ts.map +1 -0
  15. package/dist/esm/companion/application-documentation/application-integration-documentation.js +63 -0
  16. package/dist/esm/companion/application-documentation/application-integration-documentation.js.map +1 -0
  17. package/dist/esm/companion/application-documentation/technical-documentation-engine-content-bundle.d.ts +21 -3
  18. package/dist/esm/companion/application-documentation/technical-documentation-engine-content-bundle.d.ts.map +1 -1
  19. package/dist/esm/companion/application-documentation/technical-documentation-engine-content-bundle.js +166 -10
  20. package/dist/esm/companion/application-documentation/technical-documentation-engine-content-bundle.js.map +1 -1
  21. package/dist/esm/companion/application-documentation/technical-documentation-private-derivation.d.ts +8 -0
  22. package/dist/esm/companion/application-documentation/technical-documentation-private-derivation.d.ts.map +1 -1
  23. package/dist/esm/companion/application-documentation/technical-documentation-private-derivation.js +8 -1
  24. package/dist/esm/companion/application-documentation/technical-documentation-private-derivation.js.map +1 -1
  25. package/dist/esm/companion/index.d.ts +4 -0
  26. package/dist/esm/companion/index.d.ts.map +1 -1
  27. package/dist/esm/companion/index.js +4 -0
  28. package/dist/esm/companion/index.js.map +1 -1
  29. package/dist/esm/companion/openapi-generator.d.ts.map +1 -1
  30. package/dist/esm/companion/openapi-generator.js +9 -7
  31. package/dist/esm/companion/openapi-generator.js.map +1 -1
  32. package/dist/esm/companion/rendering/technical-documentation-docusaurus-renderer.d.ts.map +1 -1
  33. package/dist/esm/companion/rendering/technical-documentation-docusaurus-renderer.js +10 -2
  34. package/dist/esm/companion/rendering/technical-documentation-docusaurus-renderer.js.map +1 -1
  35. package/dist/esm/companion/rendering/technical-documentation-markdown-links.d.ts +28 -0
  36. package/dist/esm/companion/rendering/technical-documentation-markdown-links.d.ts.map +1 -0
  37. package/dist/esm/companion/rendering/technical-documentation-markdown-links.js +52 -0
  38. package/dist/esm/companion/rendering/technical-documentation-markdown-links.js.map +1 -0
  39. package/dist/esm/companion/rendering/technical-documentation-markdown-renderer.d.ts.map +1 -1
  40. package/dist/esm/companion/rendering/technical-documentation-markdown-renderer.js +7 -2
  41. package/dist/esm/companion/rendering/technical-documentation-markdown-renderer.js.map +1 -1
  42. package/dist/esm/companion/rendering/technical-documentation-render-model.d.ts +1 -0
  43. package/dist/esm/companion/rendering/technical-documentation-render-model.d.ts.map +1 -1
  44. package/dist/esm/companion/rendering/technical-documentation-render-model.js +91 -84
  45. package/dist/esm/companion/rendering/technical-documentation-render-model.js.map +1 -1
  46. package/dist/esm/content/application-consumer-documentation-content.techdoc.d.ts +74 -69
  47. package/dist/esm/content/application-consumer-documentation-content.techdoc.d.ts.map +1 -1
  48. package/dist/esm/content/application-consumer-documentation-content.techdoc.js +654 -1120
  49. package/dist/esm/content/application-consumer-documentation-content.techdoc.js.map +1 -1
  50. package/dist/esm/runtime/decode-jwt-claims.d.ts +7 -4
  51. package/dist/esm/runtime/decode-jwt-claims.d.ts.map +1 -1
  52. package/dist/esm/runtime/decode-jwt-claims.js +7 -4
  53. package/dist/esm/runtime/decode-jwt-claims.js.map +1 -1
  54. package/dist/esm/runtime/docs-auth-session.schemas.d.ts +16 -5
  55. package/dist/esm/runtime/docs-auth-session.schemas.d.ts.map +1 -1
  56. package/dist/esm/runtime/docs-auth-session.schemas.js +16 -5
  57. package/dist/esm/runtime/docs-auth-session.schemas.js.map +1 -1
  58. package/dist/esm/runtime/use-docs-auth-session.d.ts +9 -7
  59. package/dist/esm/runtime/use-docs-auth-session.d.ts.map +1 -1
  60. package/dist/esm/runtime/use-docs-auth-session.js +9 -7
  61. package/dist/esm/runtime/use-docs-auth-session.js.map +1 -1
  62. package/dist/tsconfig.build.tsbuildinfo +1 -1
  63. package/package.json +5 -5
  64. package/dist/esm/.builder.pid +0 -9
@@ -0,0 +1 @@
1
+ {"version":3,"file":"application-connection-documentation.js","sourceRoot":"","sources":["../../../../../src/companion/application-documentation/application-connection-documentation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,6BAA6B,EAAE,wBAAwB,EAAE,MAAM,uBAAuB,CAAC;AAEpH;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,CAAC,MAAM,+CAA+C,GAAG,oDAA6D,CAAC;AAC7H,MAAM,CAAC,MAAM,mDAAmD,GAAG,CAAC,CAAC;AA0BrE,2FAA2F;AAC3F,MAAM,CAAN,IAAY,iCAcX;AAdD,WAAY,iCAAiC;IAC3C,uFAAuF;IACvF,6EAAwC,CAAA;IACxC,gFAAgF;IAChF,2DAAsB,CAAA;IACtB;;;;;OAKG;IACH,iEAA4B,CAAA;IAC5B,yFAAyF;IACzF,oEAA+B,CAAA;AACjC,CAAC,EAdW,iCAAiC,KAAjC,iCAAiC,QAc5C;AAED;;;GAGG;AACH,MAAM,CAAN,IAAY,gCASX;AATD,WAAY,gCAAgC;IAC1C,oGAAoG;IACpG,wDAAoB,CAAA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AAC,gCAAgC,CAAC,cAAc,CAAC,EAAE,GAAG,cAAc,CAAC,KAAK,CAAC,GAAG,eAAe,CAAC,wBAAwB,CAAC,cAAc,CAAC,EAAE;YACxI,CAAC,gCAAgC,CAAC,cAAc,CAAC,EAAE,GAAG,cAAc,CAAC,KAAK,CAAC,GAAG,eAAe,CAAC,wBAAwB,CAAC,SAAS,CAAC,EAAE;SACpI,CAAC;KACH,CAAC;AACJ,CAAC","sourcesContent":["import { MAIN_API_BASE_PATH, MANUAL_CONTROLLER_ROUTES_URLS, ManualControllerRouteKey } from '@wildo-ai/saas-models';\n\n/**\n * The application's own name and the addresses an integrator connects to.\n *\n * Engine documentation is written once for every generated application, so it\n * used to hedge everything an application knows about itself: \"the server origin\n * from this application's API reference\", \"the address published for this\n * environment\", \"the application\". Every one of those values is available to the\n * companion at derivation time, and this projection is how they reach the page.\n *\n * The split is deliberate. The APPLICATION supplies what only it knows — its\n * customer-facing name and the base URLs it publishes. The ENGINE supplies the\n * paths, because a route is the engine's own contract and an application that\n * restated it would hold a second copy that can drift (see\n * `MANUAL_CONTROLLER_ROUTES_URLS`, whose values are mounted under\n * `MAIN_API_BASE_PATH`). An endpoint appears only when the companion has\n * observed that the application configures that surface, so a page never\n * advertises a door this application does not open.\n */\nexport const APPLICATION_CONNECTION_DOCUMENTATION_SOURCE_REF = 'source:companion-projection:application-connection' as const;\nexport const APPLICATION_CONNECTION_DOCUMENTATION_SOURCE_VERSION = 1;\n\n/** One base URL an application publishes for an environment a reader may call. */\nexport interface ApplicationConnectionServer {\n readonly url: string;\n readonly description?: string;\n}\n\n/**\n * What the companion measures about this application. `surfaces` mirrors the\n * evidence the derivation already computes for applicability gating: the same\n * observation that decides whether the MCP pages are published decides whether\n * the MCP endpoint is printed, so a published address and a published page can\n * never disagree.\n */\nexport interface ApplicationConnectionDocumentationSource {\n /** The name customers see. The application's `displayName`, else its `appName`. */\n readonly applicationName: string;\n /** Base URLs the application publishes, in the order it authored them. Possibly empty. */\n readonly apiServers: readonly ApplicationConnectionServer[];\n readonly surfaces: {\n readonly mcpToolServer: boolean;\n readonly a2aAgent: boolean;\n };\n}\n\n/** Named presentations a page may request with `{{APPLICATION_CONNECTION:<selector>}}`. */\nexport enum ApplicationConnectionPresentation {\n /** Every connection detail as one table: base URLs, the API mount, agent endpoints. */\n CONNECTION_DETAILS = 'connectionDetails',\n /** The base URLs alone, for a page that only needs to say where requests go. */\n BASE_URLS = 'baseUrls',\n /**\n * The MCP endpoint sentence. Never empty: an application that exposes no MCP surface gets a\n * sentence saying so. Projection runs for every unit and gating happens afterwards, so a\n * presentation that rendered nothing would leave a blank where a suppressed page's prose was,\n * and would say nothing at all if the page were ever published without its gate.\n */\n MCP_ENDPOINT = 'mcpEndpoint',\n /** The A2A agent-card sentence. Never empty, for the same reason as the MCP endpoint. */\n A2A_AGENT_CARD = 'a2aAgentCard',\n}\n\n/**\n * Values a page substitutes INSIDE a sample — a JSON client configuration, an HTTP request line —\n * where a block presentation cannot go. Each is a single string, never markdown.\n */\nexport enum ApplicationConnectionInlineValue {\n /** The first base URL the application publishes, or an explicit stand-in when it publishes none. */\n BASE_URL = 'baseUrl',\n /** The full MCP endpoint URL a client configures. */\n MCP_ENDPOINT_URL = 'mcpEndpointUrl',\n /** The full agent-card URL an A2A peer fetches. */\n AGENT_CARD_URL = 'agentCardUrl',\n /** The full A2A task endpoint URL. */\n AGENT_TASK_URL = 'agentTaskUrl',\n}\n\nexport interface ApplicationConnectionDocumentationFact {\n readonly sourceRef: string;\n readonly sourceVersion: number;\n /** Substituted wherever a page writes the inline application-name token. */\n readonly applicationName: string;\n readonly presentations: Readonly<Record<ApplicationConnectionPresentation, string>>;\n readonly inlineValues: Readonly<Record<ApplicationConnectionInlineValue, string>>;\n}\n\n/** A manual route as a reader must call it: the mount plus the engine-owned path segment. */\nfunction publicRoutePath(routeKey: ManualControllerRouteKey): string {\n return `${MAIN_API_BASE_PATH}${MANUAL_CONTROLLER_ROUTES_URLS[routeKey]}`;\n}\n\nfunction baseUrlsMarkdown(source: ApplicationConnectionDocumentationSource): string {\n if (source.apiServers.length === 0) {\n // Honest rather than invented: an application that publishes no base URL cannot have one\n // printed for it, and the reader is told where the answer actually lives.\n return `${source.applicationName} does not publish its base URLs in this documentation. Read them from the **Servers** list at the top of the API reference, or ask whoever operates the environment you are calling.`;\n }\n const rows = source.apiServers\n .map((server) => `| \\`${server.url}\\` | ${server.description ?? 'Published base URL'} |`)\n .join('\\n');\n return `| Base URL | Environment |\\n| --- | --- |\\n${rows}`;\n}\n\nfunction mcpEndpointMarkdown(source: ApplicationConnectionDocumentationSource): string {\n if (!source.surfaces.mcpToolServer) return `${source.applicationName} does not publish a Model Context Protocol endpoint.`;\n return `${source.applicationName} serves its Model Context Protocol endpoint at \\`${publicRoutePath(ManualControllerRouteKey.MCP_ENDPOINT)}\\`, under the base URL of the environment you are connecting to.`;\n}\n\nfunction a2aAgentCardMarkdown(source: ApplicationConnectionDocumentationSource): string {\n if (!source.surfaces.a2aAgent) return `${source.applicationName} does not publish an agent card.`;\n return `${source.applicationName} publishes its agent card at \\`${publicRoutePath(ManualControllerRouteKey.A2A_AGENT_CARD)}\\` and accepts task calls at \\`${publicRoutePath(ManualControllerRouteKey.A2A_TASKS)}\\`, under the base URL of the environment you are connecting to.`;\n}\n\nfunction connectionDetailsMarkdown(source: ApplicationConnectionDocumentationSource): string {\n const rows: string[] = [];\n for (const server of source.apiServers) {\n rows.push(`| Base URL${server.description === undefined ? '' : ` (${server.description})`} | \\`${server.url}\\` |`);\n }\n rows.push(`| API mount | \\`${MAIN_API_BASE_PATH}\\` — every path in the API reference already includes it |`);\n if (source.surfaces.mcpToolServer) {\n rows.push(`| MCP endpoint | \\`${publicRoutePath(ManualControllerRouteKey.MCP_ENDPOINT)}\\` |`);\n }\n if (source.surfaces.a2aAgent) {\n rows.push(`| A2A agent card | \\`${publicRoutePath(ManualControllerRouteKey.A2A_AGENT_CARD)}\\` |`);\n rows.push(`| A2A task endpoint | \\`${publicRoutePath(ManualControllerRouteKey.A2A_TASKS)}\\` |`);\n }\n const table = `| What | Value |\\n| --- | --- |\\n${rows.join('\\n')}`;\n return source.apiServers.length > 0\n ? table\n : `${table}\\n\\nThis application publishes no base URL here; read it from the **Servers** list at the top of the API reference.`;\n}\n\n/**\n * The origin a sample should show. An application that publishes no base URL gets an explicit\n * stand-in rather than a fabricated host: the reader must substitute their own environment, and the\n * sample says so in the place where the value belongs.\n */\nfunction primaryBaseUrl(source: ApplicationConnectionDocumentationSource): string {\n const first = source.apiServers[0];\n return first === undefined ? 'https://your-environment.example' : first.url.replace(/\\/+$/, '');\n}\n\n/**\n * Projects the application's connection facts into the presentations a page may\n * request. Every presentation is a pure function of the source, so two runs over\n * the same application produce identical bytes.\n */\nexport function projectApplicationConnectionDocumentation(\n source: ApplicationConnectionDocumentationSource,\n): ApplicationConnectionDocumentationFact {\n const applicationName = source.applicationName.trim();\n if (applicationName.length === 0) throw new Error('application connection projection requires a customer-facing application name');\n for (const server of source.apiServers) {\n if (server.url.trim().length === 0) throw new Error('application connection projection received an empty base URL');\n }\n const named: ApplicationConnectionDocumentationSource = { ...source, applicationName };\n return {\n sourceRef: APPLICATION_CONNECTION_DOCUMENTATION_SOURCE_REF,\n sourceVersion: APPLICATION_CONNECTION_DOCUMENTATION_SOURCE_VERSION,\n applicationName,\n presentations: Object.freeze({\n [ApplicationConnectionPresentation.CONNECTION_DETAILS]: connectionDetailsMarkdown(named),\n [ApplicationConnectionPresentation.BASE_URLS]: baseUrlsMarkdown(named),\n [ApplicationConnectionPresentation.MCP_ENDPOINT]: mcpEndpointMarkdown(named),\n [ApplicationConnectionPresentation.A2A_AGENT_CARD]: a2aAgentCardMarkdown(named),\n }),\n inlineValues: Object.freeze({\n [ApplicationConnectionInlineValue.BASE_URL]: primaryBaseUrl(named),\n [ApplicationConnectionInlineValue.MCP_ENDPOINT_URL]: `${primaryBaseUrl(named)}${publicRoutePath(ManualControllerRouteKey.MCP_ENDPOINT)}`,\n [ApplicationConnectionInlineValue.AGENT_CARD_URL]: `${primaryBaseUrl(named)}${publicRoutePath(ManualControllerRouteKey.A2A_AGENT_CARD)}`,\n [ApplicationConnectionInlineValue.AGENT_TASK_URL]: `${primaryBaseUrl(named)}${publicRoutePath(ManualControllerRouteKey.A2A_TASKS)}`,\n }),\n };\n}\n"]}
@@ -0,0 +1,48 @@
1
+ /**
2
+ * The tools an MCP client will find, and the events a webhook receiver will be sent.
3
+ *
4
+ * Five webhook pages explained delivery, verification, retries and reconciliation without ever
5
+ * naming an event, and the MCP page described a catalogue without naming a tool in it. Both
6
+ * inventories were already being computed — as booleans, to decide whether those pages publish at
7
+ * all — so the reader was one projection away from the list the whole time.
8
+ *
9
+ * Names are the application's own: a tool is `<resource>__<operation>` exactly as an agent must
10
+ * type it, and an event names the resource and operation that produce it. Nothing here is
11
+ * humanized, because every one of these strings is a value someone matches on in code.
12
+ */
13
+ export declare const APPLICATION_INTEGRATION_DOCUMENTATION_SOURCE_REF: "source:companion-projection:application-integration";
14
+ export declare const APPLICATION_INTEGRATION_DOCUMENTATION_SOURCE_VERSION = 1;
15
+ export interface ApplicationMcpToolSource {
16
+ /** The exact name an agent calls, `<resource>__<operation>`. */
17
+ readonly toolName: string;
18
+ readonly resourceIdentifier: string;
19
+ readonly operationIdentifier: string;
20
+ }
21
+ export interface ApplicationWebhookEventSource {
22
+ readonly resourceIdentifier: string;
23
+ readonly operationIdentifier: string;
24
+ /** The notification channel that carries it, which is also its delivery scope. */
25
+ readonly channel: string;
26
+ }
27
+ export interface ApplicationIntegrationDocumentationSource {
28
+ readonly mcpTools: readonly ApplicationMcpToolSource[];
29
+ readonly webhookEvents: readonly ApplicationWebhookEventSource[];
30
+ }
31
+ /** Named presentations a page may request with `{{APPLICATION_INTEGRATION:<selector>}}`. */
32
+ export declare enum ApplicationIntegrationPresentation {
33
+ /** Every tool this application publishes to MCP clients. */
34
+ MCP_TOOLS = "mcpTools",
35
+ /** Every resource operation that produces an outbound webhook delivery. */
36
+ WEBHOOK_EVENTS = "webhookEvents"
37
+ }
38
+ export interface ApplicationIntegrationDocumentationFact {
39
+ readonly sourceRef: string;
40
+ readonly sourceVersion: number;
41
+ readonly presentations: Readonly<Record<ApplicationIntegrationPresentation, string>>;
42
+ }
43
+ /**
44
+ * Projects both integration inventories. A pure function of the source, so two runs over the same
45
+ * application produce identical bytes.
46
+ */
47
+ export declare function projectApplicationIntegrationDocumentation(source: ApplicationIntegrationDocumentationSource): ApplicationIntegrationDocumentationFact;
48
+ //# sourceMappingURL=application-integration-documentation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"application-integration-documentation.d.ts","sourceRoot":"","sources":["../../../../../src/companion/application-documentation/application-integration-documentation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,gDAAgD,EAAG,qDAA8D,CAAC;AAC/H,eAAO,MAAM,oDAAoD,IAAI,CAAC;AAEtE,MAAM,WAAW,wBAAwB;IACvC,gEAAgE;IAChE,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,kBAAkB,EAAE,MAAM,CAAC;IACpC,QAAQ,CAAC,mBAAmB,EAAE,MAAM,CAAC;CACtC;AAED,MAAM,WAAW,6BAA6B;IAC5C,QAAQ,CAAC,kBAAkB,EAAE,MAAM,CAAC;IACpC,QAAQ,CAAC,mBAAmB,EAAE,MAAM,CAAC;IACrC,kFAAkF;IAClF,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CAC1B;AAED,MAAM,WAAW,yCAAyC;IACxD,QAAQ,CAAC,QAAQ,EAAE,SAAS,wBAAwB,EAAE,CAAC;IACvD,QAAQ,CAAC,aAAa,EAAE,SAAS,6BAA6B,EAAE,CAAC;CAClE;AAED,4FAA4F;AAC5F,oBAAY,kCAAkC;IAC5C,4DAA4D;IAC5D,SAAS,aAAa;IACtB,2EAA2E;IAC3E,cAAc,kBAAkB;CACjC;AAED,MAAM,WAAW,uCAAuC;IACtD,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;IAC/B,QAAQ,CAAC,aAAa,EAAE,QAAQ,CAAC,MAAM,CAAC,kCAAkC,EAAE,MAAM,CAAC,CAAC,CAAC;CACtF;AAsBD;;;GAGG;AACH,wBAAgB,0CAA0C,CACxD,MAAM,EAAE,yCAAyC,GAChD,uCAAuC,CAezC"}
@@ -0,0 +1,63 @@
1
+ /**
2
+ * The tools an MCP client will find, and the events a webhook receiver will be sent.
3
+ *
4
+ * Five webhook pages explained delivery, verification, retries and reconciliation without ever
5
+ * naming an event, and the MCP page described a catalogue without naming a tool in it. Both
6
+ * inventories were already being computed — as booleans, to decide whether those pages publish at
7
+ * all — so the reader was one projection away from the list the whole time.
8
+ *
9
+ * Names are the application's own: a tool is `<resource>__<operation>` exactly as an agent must
10
+ * type it, and an event names the resource and operation that produce it. Nothing here is
11
+ * humanized, because every one of these strings is a value someone matches on in code.
12
+ */
13
+ export const APPLICATION_INTEGRATION_DOCUMENTATION_SOURCE_REF = 'source:companion-projection:application-integration';
14
+ export const APPLICATION_INTEGRATION_DOCUMENTATION_SOURCE_VERSION = 1;
15
+ /** Named presentations a page may request with `{{APPLICATION_INTEGRATION:<selector>}}`. */
16
+ export var ApplicationIntegrationPresentation;
17
+ (function (ApplicationIntegrationPresentation) {
18
+ /** Every tool this application publishes to MCP clients. */
19
+ ApplicationIntegrationPresentation["MCP_TOOLS"] = "mcpTools";
20
+ /** Every resource operation that produces an outbound webhook delivery. */
21
+ ApplicationIntegrationPresentation["WEBHOOK_EVENTS"] = "webhookEvents";
22
+ })(ApplicationIntegrationPresentation || (ApplicationIntegrationPresentation = {}));
23
+ function mcpToolsMarkdown(source) {
24
+ if (source.mcpTools.length === 0) {
25
+ return 'This application publishes no MCP tools, so a connected client will find an empty catalogue.';
26
+ }
27
+ const rows = source.mcpTools
28
+ .map((tool) => `| \`${tool.toolName}\` | ${tool.resourceIdentifier} | ${tool.operationIdentifier} |`)
29
+ .join('\n');
30
+ return `| Tool | Resource | Operation |\n| --- | --- | --- |\n${rows}\n\nThese are the tools the application publishes. What YOU see is the subset your credential is allowed to call, so a shorter catalogue is an authorization result and not a fault. The API reference carries each operation's exact arguments and response.`;
31
+ }
32
+ function webhookEventsMarkdown(source) {
33
+ if (source.webhookEvents.length === 0) {
34
+ return 'This application declares no outbound webhook events, so an endpoint would receive nothing even when one is configured and enabled.';
35
+ }
36
+ const rows = source.webhookEvents
37
+ .map((event) => `| ${event.resourceIdentifier} | ${event.operationIdentifier} | \`${event.channel}\` |`)
38
+ .join('\n');
39
+ return `| Resource | Operation that fires it | Channel |\n| --- | --- | --- |\n${rows}\n\nEvery enabled endpoint on the matching channel receives every event on that channel: an endpoint is not subscribed to a subset. Route on the signed \`resourceIdentifier\` and \`operationIdentifier\` claims rather than on the destination URL, and ignore an event your receiver does not handle.`;
40
+ }
41
+ /**
42
+ * Projects both integration inventories. A pure function of the source, so two runs over the same
43
+ * application produce identical bytes.
44
+ */
45
+ export function projectApplicationIntegrationDocumentation(source) {
46
+ for (const tool of source.mcpTools) {
47
+ if (tool.toolName.trim().length === 0)
48
+ throw new Error('application integration projection received an MCP tool with no name');
49
+ }
50
+ for (const event of source.webhookEvents) {
51
+ if (event.channel.trim().length === 0)
52
+ throw new Error('application integration projection received a webhook event with no channel');
53
+ }
54
+ return {
55
+ sourceRef: APPLICATION_INTEGRATION_DOCUMENTATION_SOURCE_REF,
56
+ sourceVersion: APPLICATION_INTEGRATION_DOCUMENTATION_SOURCE_VERSION,
57
+ presentations: Object.freeze({
58
+ [ApplicationIntegrationPresentation.MCP_TOOLS]: mcpToolsMarkdown(source),
59
+ [ApplicationIntegrationPresentation.WEBHOOK_EVENTS]: webhookEventsMarkdown(source),
60
+ }),
61
+ };
62
+ }
63
+ //# sourceMappingURL=application-integration-documentation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"application-integration-documentation.js","sourceRoot":"","sources":["../../../../../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jD,KAAK,MAAM,IAAI,IAAI,MAAM,CAAC,QAAQ,EAAE,CAAC;QACnC,IAAI,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC,MAAM,KAAK,CAAC;YAAE,MAAM,IAAI,KAAK,CAAC,sEAAsE,CAAC,CAAC;IACjI,CAAC;IACD,KAAK,MAAM,KAAK,IAAI,MAAM,CAAC,aAAa,EAAE,CAAC;QACzC,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC,MAAM,KAAK,CAAC;YAAE,MAAM,IAAI,KAAK,CAAC,6EAA6E,CAAC,CAAC;IACxI,CAAC;IACD,OAAO;QACL,SAAS,EAAE,gDAAgD;QAC3D,aAAa,EAAE,oDAAoD;QACnE,aAAa,EAAE,MAAM,CAAC,MAAM,CAAC;YAC3B,CAAC,kCAAkC,CAAC,SAAS,CAAC,EAAE,gBAAgB,CAAC,MAAM,CAAC;YACxE,CAAC,kCAAkC,CAAC,cAAc,CAAC,EAAE,qBAAqB,CAAC,MAAM,CAAC;SACnF,CAAC;KACH,CAAC;AACJ,CAAC","sourcesContent":["/**\n * The tools an MCP client will find, and the events a webhook receiver will be sent.\n *\n * Five webhook pages explained delivery, verification, retries and reconciliation without ever\n * naming an event, and the MCP page described a catalogue without naming a tool in it. Both\n * inventories were already being computed — as booleans, to decide whether those pages publish at\n * all — so the reader was one projection away from the list the whole time.\n *\n * Names are the application's own: a tool is `<resource>__<operation>` exactly as an agent must\n * type it, and an event names the resource and operation that produce it. Nothing here is\n * humanized, because every one of these strings is a value someone matches on in code.\n */\nexport const APPLICATION_INTEGRATION_DOCUMENTATION_SOURCE_REF = 'source:companion-projection:application-integration' as const;\nexport const APPLICATION_INTEGRATION_DOCUMENTATION_SOURCE_VERSION = 1;\n\nexport interface ApplicationMcpToolSource {\n /** The exact name an agent calls, `<resource>__<operation>`. */\n readonly toolName: string;\n readonly resourceIdentifier: string;\n readonly operationIdentifier: string;\n}\n\nexport interface ApplicationWebhookEventSource {\n readonly resourceIdentifier: string;\n readonly operationIdentifier: string;\n /** The notification channel that carries it, which is also its delivery scope. */\n readonly channel: string;\n}\n\nexport interface ApplicationIntegrationDocumentationSource {\n readonly mcpTools: readonly ApplicationMcpToolSource[];\n readonly webhookEvents: readonly ApplicationWebhookEventSource[];\n}\n\n/** Named presentations a page may request with `{{APPLICATION_INTEGRATION:<selector>}}`. */\nexport enum ApplicationIntegrationPresentation {\n /** Every tool this application publishes to MCP clients. */\n MCP_TOOLS = 'mcpTools',\n /** Every resource operation that produces an outbound webhook delivery. */\n WEBHOOK_EVENTS = 'webhookEvents',\n}\n\nexport interface ApplicationIntegrationDocumentationFact {\n readonly sourceRef: string;\n readonly sourceVersion: number;\n readonly presentations: Readonly<Record<ApplicationIntegrationPresentation, string>>;\n}\n\nfunction mcpToolsMarkdown(source: ApplicationIntegrationDocumentationSource): string {\n if (source.mcpTools.length === 0) {\n return 'This application publishes no MCP tools, so a connected client will find an empty catalogue.';\n }\n const rows = source.mcpTools\n .map((tool) => `| \\`${tool.toolName}\\` | ${tool.resourceIdentifier} | ${tool.operationIdentifier} |`)\n .join('\\n');\n return `| Tool | Resource | Operation |\\n| --- | --- | --- |\\n${rows}\\n\\nThese are the tools the application publishes. What YOU see is the subset your credential is allowed to call, so a shorter catalogue is an authorization result and not a fault. The API reference carries each operation's exact arguments and response.`;\n}\n\nfunction webhookEventsMarkdown(source: ApplicationIntegrationDocumentationSource): string {\n if (source.webhookEvents.length === 0) {\n return 'This application declares no outbound webhook events, so an endpoint would receive nothing even when one is configured and enabled.';\n }\n const rows = source.webhookEvents\n .map((event) => `| ${event.resourceIdentifier} | ${event.operationIdentifier} | \\`${event.channel}\\` |`)\n .join('\\n');\n return `| Resource | Operation that fires it | Channel |\\n| --- | --- | --- |\\n${rows}\\n\\nEvery enabled endpoint on the matching channel receives every event on that channel: an endpoint is not subscribed to a subset. Route on the signed \\`resourceIdentifier\\` and \\`operationIdentifier\\` claims rather than on the destination URL, and ignore an event your receiver does not handle.`;\n}\n\n/**\n * Projects both integration inventories. A pure function of the source, so two runs over the same\n * application produce identical bytes.\n */\nexport function projectApplicationIntegrationDocumentation(\n source: ApplicationIntegrationDocumentationSource,\n): ApplicationIntegrationDocumentationFact {\n for (const tool of source.mcpTools) {\n if (tool.toolName.trim().length === 0) throw new Error('application integration projection received an MCP tool with no name');\n }\n for (const event of source.webhookEvents) {\n if (event.channel.trim().length === 0) throw new Error('application integration projection received a webhook event with no channel');\n }\n return {\n sourceRef: APPLICATION_INTEGRATION_DOCUMENTATION_SOURCE_REF,\n sourceVersion: APPLICATION_INTEGRATION_DOCUMENTATION_SOURCE_VERSION,\n presentations: Object.freeze({\n [ApplicationIntegrationPresentation.MCP_TOOLS]: mcpToolsMarkdown(source),\n [ApplicationIntegrationPresentation.WEBHOOK_EVENTS]: webhookEventsMarkdown(source),\n }),\n };\n}\n"]}
@@ -1,3 +1,7 @@
1
+ import { type ApplicationConnectionDocumentationFact } from './application-connection-documentation';
2
+ import { type ApplicationAuthenticationDocumentationFact } from './application-authentication-documentation';
3
+ import { type ApplicationIntegrationDocumentationFact } from './application-integration-documentation';
4
+ import { type ApplicationAdministrationDocumentationFact } from './application-administration-documentation';
1
5
  import { TechnicalDocumentationAccessClass, TechnicalDocumentationReaderAudience, TechnicalDocumentationUnitKind, type TechnicalDocumentationApplicabilityRequirementV1, type TechnicalDocumentationApiReferenceTargetV1, type TechnicalDocumentationUnitV1 } from '@wildo-ai/saas-specifications/technical-documentation';
2
6
  import { type EngineDocumentationSpecificationCatalogV1 } from '@wildo-ai/saas-specifications/companion';
3
7
  import type { LoadedApplicationConsumerDocumentationContentBundleV1 } from '../content/application-consumer-documentation-content-loader';
@@ -30,8 +34,22 @@ export interface ApplicationOrganizationRolesDocumentationFact {
30
34
  */
31
35
  export declare const ENGINE_CONTENT_UNIT_DEFINITIONS: Readonly<Record<string, EngineContentUnitDefinition>>;
32
36
  /**
33
- * Compiles verified engine content and the two explicit application facts
34
- * (organization roles and unit-aware resources) into private documentation.
37
+ * The facts only the application knows, which the companion measures and passes in.
38
+ *
39
+ * A record rather than a positional list: each is optional because a page declares what it uses,
40
+ * and the set grows as the documentation learns to say more about the application it ships with.
41
+ */
42
+ export interface ApplicationDocumentationFacts {
43
+ readonly organizationRoles?: ApplicationOrganizationRolesDocumentationFact;
44
+ readonly organizationUnitResources?: ApplicationOrganizationUnitResourcesDocumentationFact;
45
+ readonly connection?: ApplicationConnectionDocumentationFact;
46
+ readonly authentication?: ApplicationAuthenticationDocumentationFact;
47
+ readonly administration?: ApplicationAdministrationDocumentationFact;
48
+ readonly integration?: ApplicationIntegrationDocumentationFact;
49
+ }
50
+ /**
51
+ * Compiles verified engine content and the application's own facts (organization roles,
52
+ * unit-aware resources, name and connection details) into private documentation.
35
53
  */
36
- export declare function projectEngineApplicationConsumerContentBundle(bundle: LoadedApplicationConsumerDocumentationContentBundleV1, engineSpecificationCatalog: EngineDocumentationSpecificationCatalogV1, unitDefinitions?: Readonly<Record<string, EngineContentUnitDefinition>>, applicationOrganizationRolesFact?: ApplicationOrganizationRolesDocumentationFact, applicationOrganizationUnitResourcesFact?: ApplicationOrganizationUnitResourcesDocumentationFact): TechnicalDocumentationUnitV1[];
54
+ export declare function projectEngineApplicationConsumerContentBundle(bundle: LoadedApplicationConsumerDocumentationContentBundleV1, engineSpecificationCatalog: EngineDocumentationSpecificationCatalogV1, unitDefinitions?: Readonly<Record<string, EngineContentUnitDefinition>>, applicationFacts?: ApplicationDocumentationFacts): TechnicalDocumentationUnitV1[];
37
55
  //# sourceMappingURL=technical-documentation-engine-content-bundle.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"technical-documentation-engine-content-bundle.d.ts","sourceRoot":"","sources":["../../../../../src/companion/application-documentation/technical-documentation-engine-content-bundle.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,iCAAiC,EAQjC,oCAAoC,EAGpC,8BAA8B,EAE9B,KAAK,gDAAgD,EACrD,KAAK,0CAA0C,EAG/C,KAAK,4BAA4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,gCAAgC,CAAC,EAAE,6CAA6C,EAChF,wCAAwC,CAAC,EAAE,qDAAqD,GAC/F,4BAA4B,EAAE,CAmGhC"}
1
+ {"version":3,"file":"technical-documentation-engine-content-bundle.d.ts","sourceRoot":"","sources":["../../../../../src/companion/application-documentation/technical-documentation-engine-content-bundle.ts"],"names":[],"mappings":"AACA,OAAO,EAIL,KAAK,sCAAsC,EAC5C,MAAM,wCAAwC,CAAC;AAChD,OAAO,EAGL,KAAK,0CAA0C,EAChD,MAAM,4CAA4C,CAAC;AACpD,OAAO,EAGL,KAAK,uCAAuC,EAC7C,MAAM,yCAAyC,CAAC;AACjD,OAAO,EAGL,KAAK,0CAA0C,EAChD,MAAM,4CAA4C,CAAC;AACpD,OAAO,EAEL,iCAAiC,EAQjC,oCAAoC,EAGpC,8BAA8B,EAE9B,KAAK,gDAAgD,EACrD,KAAK,0CAA0C,EAG/C,KAAK,4BAA4B,EAClC,MAAM,uDAAuD,CAAC;AAC/D,OAAO,EAGL,KAAK,yCAAyC,EAC/C,MAAM,yCAAyC,CAAC;AAEjD,OAAO,KAAK,EAAE,qDAAqD,EAAE,MAAM,8DAA8D,CAAC;AAC1I,OAAO,EACL,qEAAqE,EAGtE,MAAM,2EAA2E,CAAC;AAEnF,OAAO,EAEL,KAAK,qDAAqD,EAC3D,MAAM,wDAAwD,CAAC;AAEhE,MAAM,WAAW,2BAA2B;IAC1C,QAAQ,CAAC,IAAI,EAAE,8BAA8B,CAAC;IAC9C,QAAQ,CAAC,eAAe,EAAE,SAAS,oCAAoC,EAAE,CAAC;IAC1E,QAAQ,CAAC,WAAW,EAAE,iCAAiC,CAAC;IACxD,QAAQ,CAAC,yBAAyB,EAAE,SAAS,gDAAgD,EAAE,CAAC;IAChG,QAAQ,CAAC,eAAe,EAAE,SAAS,MAAM,EAAE,CAAC;IAC5C,QAAQ,CAAC,mBAAmB,CAAC,EAAE,SAAS;QAAE,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,MAAM,EAAE,0CAA0C,CAAA;KAAE,EAAE,CAAC;CACnI;AAsED,sFAAsF;AACtF,MAAM,WAAW,6CAA6C;IAC5D,QAAQ,CAAC,SAAS,EAAE,GAAG,OAAO,qEAAqE,GAAG,MAAM,EAAE,CAAC;IAC/G,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;CAChC;AAoFD;;;;;;;GAOG;AACH,eAAO,MAAM,+BAA+B,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,2BAA2B,CAAC,CAm8ChG,CAAC;AAwWH;;;;;GAKG;AACH,MAAM,WAAW,6BAA6B;IAC5C,QAAQ,CAAC,iBAAiB,CAAC,EAAE,6CAA6C,CAAC;IAC3E,QAAQ,CAAC,yBAAyB,CAAC,EAAE,qDAAqD,CAAC;IAC3F,QAAQ,CAAC,UAAU,CAAC,EAAE,sCAAsC,CAAC;IAC7D,QAAQ,CAAC,cAAc,CAAC,EAAE,0CAA0C,CAAC;IACrE,QAAQ,CAAC,cAAc,CAAC,EAAE,0CAA0C,CAAC;IACrE,QAAQ,CAAC,WAAW,CAAC,EAAE,uCAAuC,CAAC;CAChE;AAED;;;GAGG;AACH,wBAAgB,6CAA6C,CAC3D,MAAM,EAAE,qDAAqD,EAC7D,0BAA0B,EAAE,yCAAyC,EACrE,eAAe,GAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,2BAA2B,CAAC,CAAmC,EACxG,gBAAgB,GAAE,6BAAkC,GACnD,4BAA4B,EAAE,CAiIhC"}
@@ -1,3 +1,8 @@
1
+ import { IMPLICIT_LEAD_SECTION_HEADING } from '../rendering/technical-documentation-markdown-links.js';
2
+ import { APPLICATION_CONNECTION_DOCUMENTATION_SOURCE_REF, } from './application-connection-documentation.js';
3
+ import { APPLICATION_AUTHENTICATION_DOCUMENTATION_SOURCE_REF, } from './application-authentication-documentation.js';
4
+ import { APPLICATION_INTEGRATION_DOCUMENTATION_SOURCE_REF, } from './application-integration-documentation.js';
5
+ import { APPLICATION_ADMINISTRATION_DOCUMENTATION_SOURCE_REF, } from './application-administration-documentation.js';
1
6
  import { canonicalizeTechnicalDocumentationJson, TechnicalDocumentationAccessClass, TechnicalDocumentationApiReferenceSection, TechnicalDocumentationApiReferenceTargetKind, TechnicalDocumentationApplicabilityEvidenceAxis, TechnicalDocumentationApplicabilityEvidenceStatus, TechnicalDocumentationEditorialStatus, TechnicalDocumentationEvidenceSubjectRef, TechnicalDocumentationLinkKind, TechnicalDocumentationReaderAudience, TechnicalDocumentationSourceClassification, TechnicalDocumentationSourceOwnership, TechnicalDocumentationUnitKind, createTechnicalDocumentationUnitV1, } from '@wildo-ai/saas-specifications/technical-documentation';
2
7
  import { EngineDocumentationSpecificationFamilyRef, } from '@wildo-ai/saas-specifications/companion';
3
8
  import { APPLICATION_CONSUMER_DOCUMENTATION_CONSUMER_FACT_SOURCE_PREFIX, APPLICATION_CONSUMER_DOCUMENTATION_ENGINE_CONTENT_SOURCE_PREFIX, } from '../../content/application-consumer-documentation-content-manifest.schemas.js';
@@ -50,6 +55,20 @@ const A2A_INTEGRATION_APPLICABILITY_REQUIREMENTS = [{
50
55
  const CONSUMER_FACT_TOKEN_PATTERN = /\{\{CONSUMER_FACT:([^#}]+)#([^}]+)\}\}/g;
51
56
  const APPLICATION_ORGANIZATION_ROLES_TOKEN = '{{APPLICATION_ORGANIZATION_ROLES}}';
52
57
  const APPLICATION_ORGANIZATION_UNIT_RESOURCES_TOKEN = '{{APPLICATION_ORGANIZATION_UNIT_RESOURCES}}';
58
+ /** Inline, and deliberately repeatable: a page names the product as often as its prose needs it. */
59
+ const APPLICATION_NAME_TOKEN = '{{APPLICATION_NAME}}';
60
+ /** Block, one per requested presentation — `{{APPLICATION_CONNECTION:baseUrls}}` and siblings. */
61
+ // A selector may carry digits (`a2aAgentCard`), which an alphabetic-only class silently refuses:
62
+ // the token then matches nothing and its page reads as declaring a projection it never used.
63
+ const APPLICATION_CONNECTION_TOKEN_PATTERN = /\{\{APPLICATION_CONNECTION:([A-Za-z0-9]+)\}\}/g;
64
+ /** Inline connection values, for use inside a sample where a block cannot go. */
65
+ const APPLICATION_CONNECTION_VALUE_TOKEN_PATTERN = /\{\{APPLICATION_CONNECTION_VALUE:([A-Za-z0-9]+)\}\}/g;
66
+ /** Same shape for the application's authentication policy. */
67
+ const APPLICATION_AUTHENTICATION_TOKEN_PATTERN = /\{\{APPLICATION_AUTHENTICATION:([A-Za-z0-9]+)\}\}/g;
68
+ /** Same shape again for who may perform each administrative action. */
69
+ const APPLICATION_ADMINISTRATION_TOKEN_PATTERN = /\{\{APPLICATION_ADMINISTRATION:([A-Za-z0-9]+)\}\}/g;
70
+ /** Same shape again for the tools and events this application publishes. */
71
+ const APPLICATION_INTEGRATION_TOKEN_PATTERN = /\{\{APPLICATION_INTEGRATION:([A-Za-z0-9]+)\}\}/g;
53
72
  /**
54
73
  * Build one semantic guide-to-reference link without embedding a Docusaurus
55
74
  * route. The verified OpenAPI link index resolves the resource only when the
@@ -1357,6 +1376,7 @@ export const ENGINE_CONTENT_UNIT_DEFINITIONS = Object.freeze({
1357
1376
  accessClass: TechnicalDocumentationAccessClass.PUBLIC,
1358
1377
  applicabilityRequirements: [],
1359
1378
  relatedUnitRefs: [
1379
+ 'technical-documentation:unit/rest-api-conventions',
1360
1380
  'technical-documentation:unit/send-api-request',
1361
1381
  'technical-documentation:unit/work-with-api-collections',
1362
1382
  'technical-documentation:unit/write-and-reconcile-api-changes',
@@ -1370,6 +1390,29 @@ export const ENGINE_CONTENT_UNIT_DEFINITIONS = Object.freeze({
1370
1390
  },
1371
1391
  }],
1372
1392
  },
1393
+ 'technical-documentation:unit/rest-api-conventions': {
1394
+ kind: TechnicalDocumentationUnitKind.REFERENCE,
1395
+ readerAudiences: [
1396
+ TechnicalDocumentationReaderAudience.CONSUMING_INTERNAL_SERVICE,
1397
+ TechnicalDocumentationReaderAudience.EXTERNAL_INTEGRATION_DEVELOPER,
1398
+ TechnicalDocumentationReaderAudience.ORGANIZATION_INTEGRATION_DEVELOPER,
1399
+ ],
1400
+ accessClass: TechnicalDocumentationAccessClass.PUBLIC,
1401
+ applicabilityRequirements: [],
1402
+ relatedUnitRefs: [
1403
+ 'technical-documentation:unit/common-rest-api',
1404
+ 'technical-documentation:unit/send-api-request',
1405
+ 'technical-documentation:unit/write-and-reconcile-api-changes',
1406
+ 'technical-documentation:unit/troubleshoot-api-request',
1407
+ ],
1408
+ apiReferenceTargets: [{
1409
+ label: 'API reference',
1410
+ target: {
1411
+ section: TechnicalDocumentationApiReferenceSection.API_REFERENCE,
1412
+ kind: TechnicalDocumentationApiReferenceTargetKind.ROOT,
1413
+ },
1414
+ }],
1415
+ },
1373
1416
  'technical-documentation:unit/send-api-request': {
1374
1417
  kind: TechnicalDocumentationUnitKind.QUICKSTART,
1375
1418
  readerAudiences: [
@@ -1564,7 +1607,7 @@ function parseEngineMarkdown(markdown, unitRef) {
1564
1607
  throw new Error(`engine content ${unitRef} must begin with exactly one H1 title`);
1565
1608
  const title = titleLine.slice(2).trim();
1566
1609
  const sections = [];
1567
- let heading = 'Overview';
1610
+ let heading = IMPLICIT_LEAD_SECTION_HEADING;
1568
1611
  let body = [];
1569
1612
  const flush = () => {
1570
1613
  const bodyMarkdown = body.join('\n').trim();
@@ -1591,7 +1634,7 @@ function parseEngineMarkdown(markdown, unitRef) {
1591
1634
  // An explicit H2 is not rewritten: its author chose a real section and may
1592
1635
  // intentionally need the opening paragraph in its body.
1593
1636
  const [firstSection, ...remainingSections] = sections;
1594
- if (firstSection !== undefined && firstSection.heading === 'Overview') {
1637
+ if (firstSection !== undefined && firstSection.heading === IMPLICIT_LEAD_SECTION_HEADING) {
1595
1638
  const overviewRemainder = firstSection.bodyMarkdown.replace(/^.*?(?:\n\s*\n|$)/s, '').trim();
1596
1639
  return {
1597
1640
  title,
@@ -1733,6 +1776,105 @@ function resolveConsumerFactMarkdown(markdown, declaredSourceRefs, catalog) {
1733
1776
  entriesBySourceRef: new Map([...resolvedFactRefs].map((sourceRef) => [sourceRef, catalogEntriesBySourceRef.get(sourceRef)])),
1734
1777
  };
1735
1778
  }
1779
+ /**
1780
+ * Substitutes a companion projection that offers NAMED PRESENTATIONS, and optionally one inline
1781
+ * value repeated as often as the prose needs it.
1782
+ *
1783
+ * Shared by the connection and authentication projections because both have the same shape and the
1784
+ * same three failure modes: a page that uses a token without declaring the source, a page that
1785
+ * declares the source and uses no token, and a page that asks for a presentation the projection
1786
+ * does not offer. Each must fail the publication rather than render something plausible.
1787
+ */
1788
+ function resolveSelectorProjectionMarkdown(input) {
1789
+ const { markdown, declaredSourceRefs, sourceRef, label, fact, selectorPattern, presentationFor, inline, inlineSelector } = input;
1790
+ const declaredRefs = declaredSourceRefs.filter((candidate) => candidate === sourceRef);
1791
+ const inlineCount = inline === undefined ? 0 : markdown.split(inline.token).length - 1;
1792
+ const selectorCount = [...markdown.matchAll(selectorPattern)].length;
1793
+ const inlineSelectorCount = inlineSelector === undefined ? 0 : [...markdown.matchAll(inlineSelector.pattern)].length;
1794
+ if (inlineCount === 0 && selectorCount === 0 && inlineSelectorCount === 0) {
1795
+ if (declaredRefs.length > 0)
1796
+ throw new Error(`engine content declares an unused ${label} projection: ${declaredRefs.join(', ')}`);
1797
+ return { markdown, fact: undefined };
1798
+ }
1799
+ if (declaredRefs.length !== 1 || fact === undefined || declaredRefs[0] !== fact.sourceRef) {
1800
+ throw new Error(`engine content ${label} projection must declare and resolve exactly one matching companion source`);
1801
+ }
1802
+ const withInline = inline === undefined ? markdown : markdown.split(inline.token).join(inline.valueFor(fact));
1803
+ const withInlineSelectors = inlineSelector === undefined ? withInline : withInline.replace(inlineSelector.pattern, (_token, selector) => {
1804
+ const value = inlineSelector.valueFor(fact, selector);
1805
+ if (value === undefined || value.trim().length === 0) {
1806
+ throw new Error(`engine content requests an unknown or empty ${label} inline value: ${selector}`);
1807
+ }
1808
+ return value;
1809
+ });
1810
+ const rendered = withInlineSelectors.replace(selectorPattern, (_token, selector) => {
1811
+ const presentation = presentationFor(fact, selector);
1812
+ if (presentation === undefined) {
1813
+ throw new Error(`engine content requests an unknown ${label} presentation: ${selector}`);
1814
+ }
1815
+ if (presentation.trim().length === 0) {
1816
+ throw new Error(`${label} presentation ${selector} rendered empty; every presentation must say something true even when the subject is absent`);
1817
+ }
1818
+ return presentation;
1819
+ });
1820
+ return { markdown: rendered, fact };
1821
+ }
1822
+ /**
1823
+ * The application's own name and connection details. The name is inline and repeatable — a page
1824
+ * names the product as often as its prose needs it — while a connection table is a block.
1825
+ */
1826
+ function resolveApplicationConnectionMarkdown(markdown, declaredSourceRefs, fact) {
1827
+ return resolveSelectorProjectionMarkdown({
1828
+ markdown,
1829
+ declaredSourceRefs,
1830
+ sourceRef: APPLICATION_CONNECTION_DOCUMENTATION_SOURCE_REF,
1831
+ label: 'application-connection',
1832
+ fact,
1833
+ selectorPattern: APPLICATION_CONNECTION_TOKEN_PATTERN,
1834
+ presentationFor: (resolved, selector) => resolved.presentations[selector],
1835
+ inline: { token: APPLICATION_NAME_TOKEN, valueFor: (resolved) => resolved.applicationName },
1836
+ inlineSelector: {
1837
+ pattern: APPLICATION_CONNECTION_VALUE_TOKEN_PATTERN,
1838
+ valueFor: (resolved, selector) => resolved.inlineValues[selector],
1839
+ },
1840
+ });
1841
+ }
1842
+ /** What this application actually asks of a person signing in. Presentations only. */
1843
+ function resolveApplicationAuthenticationMarkdown(markdown, declaredSourceRefs, fact) {
1844
+ return resolveSelectorProjectionMarkdown({
1845
+ markdown,
1846
+ declaredSourceRefs,
1847
+ sourceRef: APPLICATION_AUTHENTICATION_DOCUMENTATION_SOURCE_REF,
1848
+ label: 'application-authentication',
1849
+ fact,
1850
+ selectorPattern: APPLICATION_AUTHENTICATION_TOKEN_PATTERN,
1851
+ presentationFor: (resolved, selector) => resolved.presentations[selector],
1852
+ });
1853
+ }
1854
+ /** The tools and events this application publishes. Presentations only. */
1855
+ function resolveApplicationIntegrationMarkdown(markdown, declaredSourceRefs, fact) {
1856
+ return resolveSelectorProjectionMarkdown({
1857
+ markdown,
1858
+ declaredSourceRefs,
1859
+ sourceRef: APPLICATION_INTEGRATION_DOCUMENTATION_SOURCE_REF,
1860
+ label: 'application-integration',
1861
+ fact,
1862
+ selectorPattern: APPLICATION_INTEGRATION_TOKEN_PATTERN,
1863
+ presentationFor: (resolved, selector) => resolved.presentations[selector],
1864
+ });
1865
+ }
1866
+ /** Who may perform each administrative action here. Presentations only. */
1867
+ function resolveApplicationAdministrationMarkdown(markdown, declaredSourceRefs, fact) {
1868
+ return resolveSelectorProjectionMarkdown({
1869
+ markdown,
1870
+ declaredSourceRefs,
1871
+ sourceRef: APPLICATION_ADMINISTRATION_DOCUMENTATION_SOURCE_REF,
1872
+ label: 'application-administration',
1873
+ fact,
1874
+ selectorPattern: APPLICATION_ADMINISTRATION_TOKEN_PATTERN,
1875
+ presentationFor: (resolved, selector) => resolved.presentations[selector],
1876
+ });
1877
+ }
1736
1878
  function resolveApplicationOrganizationRolesMarkdown(markdown, declaredSourceRefs, fact) {
1737
1879
  const declaredRefs = declaredSourceRefs.filter((sourceRef) => sourceRef === APPLICATION_ORGANIZATION_ROLES_DOCUMENTATION_SOURCE_REF);
1738
1880
  const tokenCount = markdown.split(APPLICATION_ORGANIZATION_ROLES_TOKEN).length - 1;
@@ -1764,10 +1906,10 @@ function resolveApplicationOrganizationUnitResourcesMarkdown(markdown, declaredS
1764
1906
  return { markdown: markdown.replace(APPLICATION_ORGANIZATION_UNIT_RESOURCES_TOKEN, fact.markdown), fact };
1765
1907
  }
1766
1908
  /**
1767
- * Compiles verified engine content and the two explicit application facts
1768
- * (organization roles and unit-aware resources) into private documentation.
1909
+ * Compiles verified engine content and the application's own facts (organization roles,
1910
+ * unit-aware resources, name and connection details) into private documentation.
1769
1911
  */
1770
- export function projectEngineApplicationConsumerContentBundle(bundle, engineSpecificationCatalog, unitDefinitions = ENGINE_CONTENT_UNIT_DEFINITIONS, applicationOrganizationRolesFact, applicationOrganizationUnitResourcesFact) {
1912
+ export function projectEngineApplicationConsumerContentBundle(bundle, engineSpecificationCatalog, unitDefinitions = ENGINE_CONTENT_UNIT_DEFINITIONS, applicationFacts = {}) {
1771
1913
  const manifestRefs = bundle.manifest.units.map((unit) => unit.unitRef).sort();
1772
1914
  const definitionRefs = Object.keys(unitDefinitions).sort();
1773
1915
  if (manifestRefs.join('\0') !== definitionRefs.join('\0')) {
@@ -1778,13 +1920,21 @@ export function projectEngineApplicationConsumerContentBundle(bundle, engineSpec
1778
1920
  throw new Error(`engine content unit ${identity.unitRef} must resolve to exactly one Markdown source`);
1779
1921
  const authoredMarkdown = new TextDecoder('utf-8', { fatal: true }).decode(bundle.readManagedBytes(identity.managedPaths[0]));
1780
1922
  const resolvedConsumerFacts = resolveConsumerFactMarkdown(authoredMarkdown, identity.sourceRefs, engineSpecificationCatalog);
1781
- const resolvedApplicationOrganizationRoles = resolveApplicationOrganizationRolesMarkdown(resolvedConsumerFacts.markdown, identity.sourceRefs, applicationOrganizationRolesFact);
1782
- const resolvedApplicationOrganizationUnitResources = resolveApplicationOrganizationUnitResourcesMarkdown(resolvedApplicationOrganizationRoles.markdown, identity.sourceRefs, applicationOrganizationUnitResourcesFact);
1923
+ const resolvedApplicationOrganizationRoles = resolveApplicationOrganizationRolesMarkdown(resolvedConsumerFacts.markdown, identity.sourceRefs, applicationFacts.organizationRoles);
1924
+ const resolvedApplicationOrganizationUnitResources = resolveApplicationOrganizationUnitResourcesMarkdown(resolvedApplicationOrganizationRoles.markdown, identity.sourceRefs, applicationFacts.organizationUnitResources);
1925
+ const resolvedApplicationConnection = resolveApplicationConnectionMarkdown(resolvedApplicationOrganizationUnitResources.markdown, identity.sourceRefs, applicationFacts.connection);
1926
+ const resolvedApplicationAuthentication = resolveApplicationAuthenticationMarkdown(resolvedApplicationConnection.markdown, identity.sourceRefs, applicationFacts.authentication);
1927
+ const resolvedApplicationAdministration = resolveApplicationAdministrationMarkdown(resolvedApplicationAuthentication.markdown, identity.sourceRefs, applicationFacts.administration);
1928
+ const resolvedApplicationIntegration = resolveApplicationIntegrationMarkdown(resolvedApplicationAdministration.markdown, identity.sourceRefs, applicationFacts.integration);
1783
1929
  return [identity.unitRef, {
1784
- parsed: parseEngineMarkdown(resolvedApplicationOrganizationUnitResources.markdown, identity.unitRef),
1930
+ parsed: parseEngineMarkdown(resolvedApplicationIntegration.markdown, identity.unitRef),
1785
1931
  resolvedConsumerFacts,
1786
1932
  resolvedApplicationOrganizationRoles,
1787
1933
  resolvedApplicationOrganizationUnitResources,
1934
+ resolvedApplicationConnection,
1935
+ resolvedApplicationAuthentication,
1936
+ resolvedApplicationAdministration,
1937
+ resolvedApplicationIntegration,
1788
1938
  }];
1789
1939
  }));
1790
1940
  const relatedTargetByUnitRef = new Map(bundle.manifest.units.map((identity) => {
@@ -1813,7 +1963,7 @@ export function projectEngineApplicationConsumerContentBundle(bundle, engineSpec
1813
1963
  const content = parsedContentByUnitRef.get(identity.unitRef);
1814
1964
  if (content === undefined)
1815
1965
  throw new Error(`engine content ${identity.unitRef} has no parsed content`);
1816
- const { parsed, resolvedConsumerFacts, resolvedApplicationOrganizationRoles, resolvedApplicationOrganizationUnitResources } = content;
1966
+ const { parsed, resolvedConsumerFacts, resolvedApplicationOrganizationRoles, resolvedApplicationOrganizationUnitResources, resolvedApplicationConnection, resolvedApplicationAuthentication, resolvedApplicationAdministration, resolvedApplicationIntegration } = content;
1817
1967
  const unitSlug = identity.unitRef.slice(identity.unitRef.lastIndexOf('/') + 1);
1818
1968
  const relatedTargets = resolveRelatedUnitLinkTargets(identity.unitRef, definition.relatedUnitRefs, relatedTargetByUnitRef);
1819
1969
  const ownProvenance = identity.sourceRefs.map((sourceRef) => {
@@ -1822,7 +1972,13 @@ export function projectEngineApplicationConsumerContentBundle(bundle, engineSpec
1822
1972
  ? resolvedApplicationOrganizationRoles.fact
1823
1973
  : resolvedApplicationOrganizationUnitResources.fact?.sourceRef === sourceRef
1824
1974
  ? resolvedApplicationOrganizationUnitResources.fact
1825
- : undefined;
1975
+ : resolvedApplicationConnection.fact?.sourceRef === sourceRef
1976
+ ? resolvedApplicationConnection.fact
1977
+ : resolvedApplicationAuthentication.fact?.sourceRef === sourceRef
1978
+ ? resolvedApplicationAuthentication.fact
1979
+ : resolvedApplicationAdministration.fact?.sourceRef === sourceRef
1980
+ ? resolvedApplicationAdministration.fact
1981
+ : undefined;
1826
1982
  return {
1827
1983
  sourceRef,
1828
1984
  ownership: applicationProjection === undefined