@aifabrix/builder 2.53.0 → 2.54.1

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 (321) hide show
  1. package/bin/aifabrix.js +2 -2
  2. package/lib/api/assistants.api.js +8 -5
  3. package/lib/api/channel-identity.api.js +41 -0
  4. package/lib/api/evidence-authoring.api.js +5 -1
  5. package/lib/api/evidence.api.js +2 -0
  6. package/lib/api/types/evidence.types.js +2 -0
  7. package/lib/api/work-search.api.js +136 -0
  8. package/lib/channels/add-channel.js +163 -126
  9. package/lib/channels/approval-guides/chatgpt.js +14 -18
  10. package/lib/channels/approval-guides/claude.js +29 -0
  11. package/lib/channels/approval-guides/index.js +88 -22
  12. package/lib/channels/approval-guides/mcp-client.js +27 -0
  13. package/lib/channels/approval-guides/microsoft-copilot.js +52 -3
  14. package/lib/channels/approval-guides/slack.js +10 -10
  15. package/lib/channels/approval-guides/teams-bot.js +8 -12
  16. package/lib/channels/channel-add-continuations.js +91 -0
  17. package/lib/channels/channel-add-ensure.js +124 -27
  18. package/lib/channels/channel-add-existing.js +160 -28
  19. package/lib/channels/channel-add-failure.js +60 -0
  20. package/lib/channels/channel-add-remaining.js +486 -0
  21. package/lib/channels/channel-add-tty.js +190 -0
  22. package/lib/channels/channel-add-wizard-config.js +138 -0
  23. package/lib/channels/channel-add-wizard.js +250 -0
  24. package/lib/channels/channel-artifact-generator.js +27 -13
  25. package/lib/channels/channel-cardinality.js +83 -0
  26. package/lib/channels/channel-catalog-icon.js +45 -0
  27. package/lib/channels/channel-cli-instructions.js +75 -0
  28. package/lib/channels/channel-configuration-map.js +213 -0
  29. package/lib/channels/channel-credential.js +11 -14
  30. package/lib/channels/channel-definition-project.js +101 -0
  31. package/lib/channels/channel-definition-registry.js +154 -0
  32. package/lib/channels/channel-description.js +59 -2
  33. package/lib/channels/channel-discovery.js +16 -2
  34. package/lib/channels/channel-external-system.js +86 -9
  35. package/lib/channels/channel-install-envelope-actions.js +88 -0
  36. package/lib/channels/channel-install-envelope-microsoft.js +155 -0
  37. package/lib/channels/channel-install-envelope.js +356 -0
  38. package/lib/channels/channel-install-help-md.js +172 -0
  39. package/lib/channels/channel-install-http-payload.js +62 -0
  40. package/lib/channels/channel-install-inventory.js +115 -0
  41. package/lib/channels/channel-install-profiles.js +90 -0
  42. package/lib/channels/channel-instance-collision.js +118 -0
  43. package/lib/channels/channel-instance-key.js +100 -0
  44. package/lib/channels/channel-instance-materialize.js +240 -0
  45. package/lib/channels/channel-integration-generator.js +16 -9
  46. package/lib/channels/channel-integration-template.js +101 -22
  47. package/lib/channels/channel-inventory-fetch.js +79 -0
  48. package/lib/channels/channel-oauth-preflight.js +104 -0
  49. package/lib/channels/channel-package-version.js +76 -0
  50. package/lib/channels/channel-predefined-client.js +154 -0
  51. package/lib/channels/channel-probe.js +7 -2
  52. package/lib/channels/channel-runtime-resolver.js +180 -72
  53. package/lib/channels/channel-status-display.js +86 -16
  54. package/lib/channels/channel-targets.js +106 -92
  55. package/lib/channels/chatgpt-callback.js +318 -0
  56. package/lib/channels/chatgpt-channel-add.js +229 -0
  57. package/lib/channels/chatgpt-preflight.js +396 -0
  58. package/lib/channels/chatgpt-runtime-contract.js +17 -0
  59. package/lib/channels/chatgpt-setup-values.js +124 -0
  60. package/lib/channels/claude-callback.js +67 -0
  61. package/lib/channels/claude-channel-add.js +254 -0
  62. package/lib/channels/claude-runtime-contract.js +40 -0
  63. package/lib/channels/claude-runtime.js +58 -0
  64. package/lib/channels/claude-setup-values.js +89 -0
  65. package/lib/channels/mcp-client/config-merge.js +148 -0
  66. package/lib/channels/mcp-client/ensure-client.js +231 -0
  67. package/lib/channels/mcp-client/paths.js +53 -0
  68. package/lib/channels/mcp-client/profiles.js +122 -0
  69. package/lib/channels/mcp-client/redirect-uris.js +99 -0
  70. package/lib/channels/mcp-client/runtime.js +59 -0
  71. package/lib/channels/mcp-client-channel-add.js +186 -0
  72. package/lib/channels/microsoft-copilot-channel-add.js +117 -7
  73. package/lib/channels/microsoft-copilot-entra-identifier-uris.js +187 -0
  74. package/lib/channels/microsoft-copilot-entra-sso-form.js +106 -18
  75. package/lib/channels/microsoft-copilot-entra-sso.js +31 -2
  76. package/lib/channels/microsoft-copilot-package-prior.js +107 -0
  77. package/lib/channels/microsoft-copilot-package.js +29 -28
  78. package/lib/channels/microsoft-provisioning/a365.js +80 -0
  79. package/lib/channels/microsoft-provisioning/auth-config.js +240 -0
  80. package/lib/channels/microsoft-provisioning/auth.js +179 -0
  81. package/lib/channels/microsoft-provisioning/cli.js +71 -0
  82. package/lib/channels/microsoft-provisioning/constants.js +75 -0
  83. package/lib/channels/microsoft-provisioning/errors.js +117 -0
  84. package/lib/channels/microsoft-provisioning/index.js +55 -0
  85. package/lib/channels/microsoft-provisioning/install-atk.js +158 -0
  86. package/lib/channels/microsoft-provisioning/install-teams.js +115 -0
  87. package/lib/channels/microsoft-provisioning/login-portal-device.js +236 -0
  88. package/lib/channels/microsoft-provisioning/login-portal-parse.js +71 -0
  89. package/lib/channels/microsoft-provisioning/login-portal-teams.js +193 -0
  90. package/lib/channels/microsoft-provisioning/login-portal.js +230 -0
  91. package/lib/channels/microsoft-provisioning/persist.js +110 -0
  92. package/lib/channels/microsoft-provisioning/teams-bot-args.js +119 -0
  93. package/lib/channels/microsoft-provisioning/teams-bot-controller.js +123 -0
  94. package/lib/channels/microsoft-provisioning/teams-bot-parse.js +134 -0
  95. package/lib/channels/microsoft-provisioning/teams-bot-persist.js +113 -0
  96. package/lib/channels/microsoft-provisioning/teams-bot-provision.js +234 -0
  97. package/lib/channels/microsoft-provisioning/teams-bot-secrets.js +45 -0
  98. package/lib/channels/microsoft-provisioning/teams-cli.js +82 -0
  99. package/lib/channels/runtime-tool-catalog.js +5 -2
  100. package/lib/channels/slack-channel-add-portal.js +130 -0
  101. package/lib/channels/slack-channel-add-tty-auth.js +95 -0
  102. package/lib/channels/slack-channel-add.js +258 -0
  103. package/lib/channels/slack-provisioning/apps.js +181 -0
  104. package/lib/channels/slack-provisioning/auth-store.js +110 -0
  105. package/lib/channels/slack-provisioning/auth-ticket.js +185 -0
  106. package/lib/channels/slack-provisioning/auth.js +115 -0
  107. package/lib/channels/slack-provisioning/callbacks.js +41 -0
  108. package/lib/channels/slack-provisioning/cli.js +226 -0
  109. package/lib/channels/slack-provisioning/constants.js +37 -0
  110. package/lib/channels/slack-provisioning/credentials.js +169 -0
  111. package/lib/channels/slack-provisioning/curl-shim.js +132 -0
  112. package/lib/channels/slack-provisioning/developer-install.js +118 -0
  113. package/lib/channels/slack-provisioning/env-file.js +120 -0
  114. package/lib/channels/slack-provisioning/errors.js +47 -0
  115. package/lib/channels/slack-provisioning/go-ca-bundle.js +137 -0
  116. package/lib/channels/slack-provisioning/index.js +250 -0
  117. package/lib/channels/slack-provisioning/install-cli.js +323 -0
  118. package/lib/channels/slack-provisioning/manifest.js +89 -0
  119. package/lib/channels/slack-provisioning/oauth-lock.js +33 -0
  120. package/lib/channels/slack-provisioning/offer-cli.js +113 -0
  121. package/lib/channels/slack-provisioning/onboard-members.js +122 -0
  122. package/lib/channels/slack-provisioning/onboard.js +89 -0
  123. package/lib/channels/slack-provisioning/persist.js +95 -0
  124. package/lib/channels/slack-provisioning/remaining-urls.js +158 -0
  125. package/lib/channels/slack-provisioning/with-curl-on-path.js +48 -0
  126. package/lib/channels/teams-bot-channel-add.js +94 -0
  127. package/lib/channels/vendor-dataplane-url.js +249 -0
  128. package/lib/cli/setup-certification.help.js +2 -0
  129. package/lib/cli/setup-external-system-help.js +2 -0
  130. package/lib/cli/setup-external-system.js +1 -1
  131. package/lib/commands/channel-add-help.js +366 -0
  132. package/lib/commands/channel-add-setup.js +162 -80
  133. package/lib/commands/channel-configure.js +118 -0
  134. package/lib/commands/channel.js +10 -1
  135. package/lib/commands/governance-upload-external.js +6 -3
  136. package/lib/commands/lifecycle-command-action.js +2 -5
  137. package/lib/commands/lifecycle-external.js +93 -21
  138. package/lib/commands/repair-datasource-test-payload.js +4 -2
  139. package/lib/commands/repair-datasource-webhooks-sync-bridge.js +23 -2
  140. package/lib/commands/repair-datasource.js +3 -0
  141. package/lib/commands/repair-external-run.js +59 -25
  142. package/lib/commands/repair-openapi-rest-runtime.js +127 -0
  143. package/lib/commands/repair-orchestration-tag-merge.js +339 -0
  144. package/lib/commands/repair-rbac-catalog-defaults.js +96 -0
  145. package/lib/commands/repair-rbac-platform-preset.js +26 -15
  146. package/lib/commands/repair-rbac-reader-roles.js +8 -21
  147. package/lib/commands/repair-rbac.js +10 -34
  148. package/lib/commands/repair-system-permissions.js +24 -22
  149. package/lib/commands/role-assistant-test-output.js +14 -0
  150. package/lib/commands/role-assistant.js +59 -21
  151. package/lib/commands/test-e2e-external.js +148 -21
  152. package/lib/commands/upload-credential-push-log.js +2 -1
  153. package/lib/commands/upload-publish-context.js +1 -1
  154. package/lib/commands/upload-role-assistant-shell.js +124 -0
  155. package/lib/commands/upload-sidecar-followups.js +6 -3
  156. package/lib/commands/upload.js +18 -3
  157. package/lib/core/secrets-docker-env.js +4 -1
  158. package/lib/core/secrets-env-content.js +17 -3
  159. package/lib/datasource/capability/capability-manifest.js +0 -3
  160. package/lib/datasource/capability/copy-test-payload.js +3 -0
  161. package/lib/external-system/deploy-helpers.js +26 -1
  162. package/lib/external-system/deploy.js +10 -6
  163. package/lib/external-system/download-helpers.js +29 -2
  164. package/lib/external-system/download-role-assistant.js +83 -4
  165. package/lib/external-system/download.js +40 -30
  166. package/lib/external-system/sync-deploy-manifest.js +3 -2
  167. package/lib/external-system/upload-identity.js +42 -0
  168. package/lib/generator/index.js +19 -15
  169. package/lib/generator/split.js +13 -2
  170. package/lib/lifecycle/role-assistant-governance.js +146 -0
  171. package/lib/lifecycle/scenario-upload.js +181 -30
  172. package/lib/programmatic/builder-api-cors.js +143 -0
  173. package/lib/programmatic/builder-api-request.js +6 -0
  174. package/lib/programmatic/builder-api-route-dispatch.js +56 -42
  175. package/lib/programmatic/builder-api-server.js +8 -1
  176. package/lib/programmatic/capability-registry.js +54 -0
  177. package/lib/programmatic/channel-install-help-resolve.js +359 -0
  178. package/lib/programmatic/channel-install-session.js +218 -0
  179. package/lib/programmatic/help-content/channel-onboarding.md +2 -0
  180. package/lib/programmatic/help-content/cip-overview.md +3 -1
  181. package/lib/programmatic/http-raw-response.js +62 -0
  182. package/lib/programmatic/openapi-channel-install-bindings.js +179 -0
  183. package/lib/programmatic/openapi-channel-install-schemas.js +286 -0
  184. package/lib/programmatic/openapi-component-schemas.js +18 -1
  185. package/lib/programmatic/openapi-description-enricher.js +3 -1
  186. package/lib/programmatic/openapi-descriptions.js +74 -3
  187. package/lib/programmatic/openapi-envelope-examples.js +117 -0
  188. package/lib/programmatic/openapi-operation-bindings.js +4 -1
  189. package/lib/programmatic/openapi-schema-descriptions-channel.js +316 -0
  190. package/lib/programmatic/openapi-spec.js +12 -8
  191. package/lib/programmatic/platform-rbac-catalog.js +36 -18
  192. package/lib/programmatic/route-handler-map.js +51 -1
  193. package/lib/programmatic/route-handlers-context.js +2 -1
  194. package/lib/programmatic/run-auth-permissions.js +54 -0
  195. package/lib/programmatic/run-channel-catalog.js +196 -0
  196. package/lib/programmatic/run-channel-install-artifacts.js +137 -0
  197. package/lib/programmatic/run-channel-install-copilot.js +353 -0
  198. package/lib/programmatic/run-channel-install-options.js +232 -0
  199. package/lib/programmatic/run-channel-install-teams-bot.js +204 -0
  200. package/lib/programmatic/run-channel-install.js +346 -0
  201. package/lib/programmatic/run-channel-package.js +87 -7
  202. package/lib/programmatic/workspace-context.js +2 -0
  203. package/lib/role-assistant/evidence-sync.js +4 -2
  204. package/lib/role-assistant/evidence-validation-issues.js +51 -0
  205. package/lib/role-assistant/knowledge-sync.js +10 -4
  206. package/lib/role-assistant/settings.js +49 -2
  207. package/lib/role-assistant/test-cases-evaluate.js +30 -2
  208. package/lib/role-assistant/test-cases-evidence.js +175 -0
  209. package/lib/role-assistant/test-cases-search.js +229 -0
  210. package/lib/role-assistant/test-cases.js +37 -4
  211. package/lib/role-assistant/test-runner-search.js +149 -0
  212. package/lib/role-assistant/test-runner-workhub-helpers.js +40 -2
  213. package/lib/role-assistant/test-runner-workhub-soft.js +9 -3
  214. package/lib/role-assistant/test-runner-workhub.js +29 -11
  215. package/lib/role-assistant/test-runner.js +16 -1
  216. package/lib/schema/external-datasource.schema.json +119 -16
  217. package/lib/schema/external-system.schema.json +159 -2
  218. package/lib/schema/mcp-client-profile.schema.json +103 -0
  219. package/lib/utils/app-path-resolve.js +4 -0
  220. package/lib/utils/authentication-env-template.js +44 -6
  221. package/lib/utils/credential-secrets-env.js +6 -1
  222. package/lib/utils/env-copy.js +19 -7
  223. package/lib/utils/external-env-template.js +20 -2
  224. package/lib/utils/paths.js +18 -1
  225. package/lib/utils/platform-shell-package.js +69 -0
  226. package/lib/utils/port-resolver.js +50 -1
  227. package/lib/utils/rewrite-name-flag.js +20 -0
  228. package/lib/utils/role-assistant-paths.js +13 -10
  229. package/lib/utils/schema-resolver.js +11 -1
  230. package/lib/utils/secrets-helpers.js +12 -21
  231. package/lib/utils/token-manager.js +10 -5
  232. package/lib/validation/validate.js +40 -0
  233. package/package.json +1 -1
  234. package/templates/README.md +1 -1
  235. package/templates/applications/builder-api/Dockerfile +1 -1
  236. package/templates/applications/builder-api/env.template +7 -0
  237. package/templates/applications/dataplane/application.yaml +6 -5
  238. package/templates/applications/dataplane/env.template +2 -2
  239. package/templates/applications/dataplane/rbac.yaml +7 -2
  240. package/templates/applications/keycloak/Dockerfile +30 -4
  241. package/templates/applications/keycloak/application.yaml +2 -2
  242. package/templates/applications/keycloak/cimd-lenient-parse/AbstractClientIdMetadataDocumentExecutor.java +896 -0
  243. package/templates/applications/keycloak/cimd-lenient-parse/SOURCE.md +19 -0
  244. package/templates/applications/keycloak/env.template +3 -0
  245. package/templates/applications/miso-controller/application.yaml +1 -2
  246. package/templates/applications/miso-controller/env.template +2 -0
  247. package/templates/channels/README.md +5 -5
  248. package/templates/channels/chatgpt/TROUBLESHOOTING.md +51 -0
  249. package/templates/channels/chatgpt/channel.json +59 -0
  250. package/templates/channels/chatgpt/icon.svg +1 -0
  251. package/templates/channels/chatgpt/install.template.md.hbs +20 -95
  252. package/templates/channels/chatgpt/integration/README.md +1 -1
  253. package/templates/channels/chatgpt/integration/application.json +2 -2
  254. package/templates/channels/chatgpt/integration/chatgpt-system.json +49 -4
  255. package/templates/channels/chatgpt/integration/env.template +2 -4
  256. package/templates/channels/chatgpt/integration/rbac.json +13 -0
  257. package/templates/channels/claude/TROUBLESHOOTING.md +41 -0
  258. package/templates/channels/claude/channel.json +59 -0
  259. package/templates/channels/claude/icon.svg +1 -0
  260. package/templates/channels/claude/install.template.md.hbs +21 -0
  261. package/templates/channels/claude/integration/README.md +14 -0
  262. package/templates/channels/claude/integration/application.json +15 -0
  263. package/templates/channels/claude/integration/claude-system.json +59 -0
  264. package/templates/channels/claude/integration/env.template +2 -0
  265. package/templates/channels/claude/integration/rbac.json +13 -0
  266. package/templates/channels/claude/manifest.template.json.hbs +40 -0
  267. package/templates/channels/mcp-client/channel.json +72 -0
  268. package/templates/channels/mcp-client/icon.svg +1 -0
  269. package/templates/channels/mcp-client/install.template.md.hbs +24 -0
  270. package/templates/channels/mcp-client/integration/README.md +13 -0
  271. package/templates/channels/mcp-client/integration/application.json +15 -0
  272. package/templates/channels/mcp-client/integration/env.template +2 -0
  273. package/templates/channels/mcp-client/integration/mcp-client-system.json +72 -0
  274. package/templates/channels/mcp-client/integration/rbac.json +13 -0
  275. package/templates/channels/mcp-client/manifest.template.json.hbs +41 -0
  276. package/templates/channels/mcp-client/profiles/cursor.json +26 -0
  277. package/templates/channels/mcp-client/profiles/github-copilot.json +29 -0
  278. package/templates/channels/mcp-client/profiles/vscode.json +29 -0
  279. package/templates/channels/microsoft-copilot/channel.json +73 -0
  280. package/templates/channels/microsoft-copilot/declarative-agent.template.json.hbs +8 -4
  281. package/templates/channels/microsoft-copilot/entra-sso-registration.template.md.hbs +65 -5
  282. package/templates/channels/microsoft-copilot/icon.svg +1 -0
  283. package/templates/channels/microsoft-copilot/install.template.md.hbs +9 -9
  284. package/templates/channels/microsoft-copilot/integration/README.md +1 -1
  285. package/templates/channels/microsoft-copilot/integration/application.json +2 -2
  286. package/templates/channels/microsoft-copilot/integration/env.template +3 -6
  287. package/templates/channels/microsoft-copilot/integration/microsoft-copilot-system.json +63 -4
  288. package/templates/channels/microsoft-copilot/integration/rbac.json +13 -0
  289. package/templates/channels/microsoft-copilot/oauth-plugin-vault-required.template.md.hbs +5 -5
  290. package/templates/channels/slack/channel.json +223 -0
  291. package/templates/channels/slack/icon.svg +1 -0
  292. package/templates/channels/slack/install.template.md.hbs +36 -28
  293. package/templates/channels/slack/integration/README.md +245 -22
  294. package/templates/channels/slack/integration/application.json +44 -7
  295. package/templates/channels/slack/integration/env.template +15 -6
  296. package/templates/channels/slack/integration/openapi/openapi.json +126 -0
  297. package/templates/channels/slack/integration/rbac.json +84 -0
  298. package/templates/channels/slack/integration/slack-datasource-commands.json +154 -0
  299. package/templates/channels/slack/integration/slack-datasource-conversations.json +28 -3
  300. package/templates/channels/slack/integration/slack-datasource-events.json +154 -0
  301. package/templates/channels/slack/integration/slack-datasource-interactive.json +154 -0
  302. package/templates/channels/slack/integration/slack-datasource-messages.json +40 -2
  303. package/templates/channels/slack/integration/slack-system.json +155 -77
  304. package/templates/channels/slack/manifest.template.json.hbs +5 -2
  305. package/templates/channels/teams-bot/channel.json +161 -0
  306. package/templates/channels/teams-bot/icon.svg +1 -0
  307. package/templates/channels/teams-bot/install.template.md.hbs +12 -13
  308. package/templates/channels/teams-bot/integration/README.md +5 -4
  309. package/templates/channels/teams-bot/integration/application.json +6 -4
  310. package/templates/channels/teams-bot/integration/env.template +5 -4
  311. package/templates/channels/teams-bot/integration/openapi/openapi.json +68 -0
  312. package/templates/channels/teams-bot/integration/rbac.json +21 -0
  313. package/templates/channels/teams-bot/integration/teams-bot-datasource-activities.json +154 -0
  314. package/templates/channels/teams-bot/integration/teams-bot-system.json +128 -23
  315. package/templates/channels/web-embed/channel.json +60 -0
  316. package/templates/channels/web-embed/install.template.md.hbs +1 -1
  317. package/templates/channels/web-embed/integration/README.md +2 -2
  318. package/templates/channels/web-embed/integration/application.json +2 -2
  319. package/templates/channels/web-embed/integration/env.template +1 -1
  320. package/templates/channels/web-embed/integration/rbac.json +13 -0
  321. package/templates/channels/web-embed/integration/web-embed-system.json +50 -4
@@ -1,9 +1,8 @@
1
1
  {
2
2
  "key": "slack",
3
- "displayName": "Slack communication channel",
4
- "description": "Slack communication channel — Role Assistants (workforce) and document approval workflows",
3
+ "displayName": "Slack",
4
+ "description": "Chat with Role Assistants, send notifications, and review documents in Slack.",
5
5
  "type": "custom",
6
- "systemKind": "communication",
7
6
  "enabled": true,
8
7
  "authentication": {
9
8
  "authType": "credential",
@@ -27,118 +26,197 @@
27
26
  "clientSecret": "kv://slack/clientSecret"
28
27
  },
29
28
  "formFields": [
30
- { "name": "signingSecret", "required": true },
29
+ {
30
+ "name": "signingSecret",
31
+ "required": true,
32
+ "label": "Signing secret"
33
+ },
31
34
  {
32
35
  "name": "botToken",
33
36
  "required": true,
34
- "label": "Bot User OAuth Token (xoxb-)",
37
+ "label": "Bot user OAuth token",
35
38
  "placeholder": "xoxb-…"
36
39
  },
37
- { "name": "clientSecret", "required": false }
40
+ {
41
+ "name": "clientSecret",
42
+ "required": false,
43
+ "label": "Client secret"
44
+ }
38
45
  ]
39
46
  }
40
47
  },
48
+ "authentications": [
49
+ {
50
+ "key": "default",
51
+ "usage": "api",
52
+ "authType": "credential",
53
+ "credential": {
54
+ "credentialKey": "slack-app",
55
+ "displayName": "Slack App",
56
+ "method": "hmac",
57
+ "writeOnce": true,
58
+ "variables": {
59
+ "algorithm": "sha256",
60
+ "signatureHeader": "X-Slack-Signature",
61
+ "timestampHeader": "X-Slack-Request-Timestamp",
62
+ "signaturePrefix": "v0=",
63
+ "timestampMaxAge": "300",
64
+ "baseUrl": "https://slack.com",
65
+ "testEndpoint": "https://slack.com/api/auth.test"
66
+ },
67
+ "security": {
68
+ "signingSecret": "kv://slack/signingSecret",
69
+ "botToken": "kv://slack/botToken",
70
+ "clientSecret": "kv://slack/clientSecret"
71
+ },
72
+ "formFields": [
73
+ {
74
+ "name": "signingSecret",
75
+ "required": true,
76
+ "label": "Signing secret"
77
+ },
78
+ {
79
+ "name": "botToken",
80
+ "required": true,
81
+ "label": "Bot user OAuth token",
82
+ "placeholder": "xoxb-…"
83
+ },
84
+ {
85
+ "name": "clientSecret",
86
+ "required": false,
87
+ "label": "Client secret"
88
+ }
89
+ ]
90
+ }
91
+ },
92
+ {
93
+ "key": "webhookInbound",
94
+ "usage": "webhookInbound",
95
+ "authType": "credential",
96
+ "credential": {
97
+ "credentialKey": "slack-app",
98
+ "displayName": "Slack inbound webhook",
99
+ "method": "hmac",
100
+ "writeOnce": true,
101
+ "variables": {
102
+ "algorithm": "sha256",
103
+ "signatureHeader": "X-Slack-Signature",
104
+ "timestampHeader": "X-Slack-Request-Timestamp",
105
+ "signaturePrefix": "v0=",
106
+ "timestampMaxAge": "300"
107
+ },
108
+ "security": {
109
+ "signingSecret": "kv://slack/signingSecret"
110
+ },
111
+ "formFields": [
112
+ {
113
+ "name": "signingSecret",
114
+ "required": true,
115
+ "label": "Signing secret"
116
+ }
117
+ ]
118
+ }
119
+ }
120
+ ],
41
121
  "configuration": [
42
122
  {
43
- "name": "ENABLE_PROACTIVE_MESSAGING",
44
- "value": "true",
123
+ "name": "CHANNEL_APP_DESCRIPTION",
124
+ "value": "Enterprise AI assistant for employees. Approved assistants, enterprise knowledge, workflows, and governed actions via AI Fabrix.",
45
125
  "location": "variable",
46
126
  "required": false,
47
127
  "portalInput": {
48
- "field": "select",
49
- "label": "Enable proactive messaging",
50
- "options": ["true", "false"]
128
+ "field": "textarea",
129
+ "label": "Description",
130
+ "placeholder": "Shown to people who connect this app",
131
+ "validation": {
132
+ "maxLength": 4000
133
+ }
51
134
  }
52
135
  },
53
136
  {
54
- "name": "ENABLE_CHANNEL_NOTIFICATIONS",
55
- "value": "true",
137
+ "name": "CHANNEL_COMMAND_PREFIX",
138
+ "value": "af",
56
139
  "location": "variable",
57
140
  "required": false,
58
141
  "portalInput": {
59
- "field": "select",
60
- "label": "Enable channel notifications",
61
- "options": ["true", "false"]
142
+ "field": "text",
143
+ "label": "Slash command prefix",
144
+ "placeholder": "Letters and numbers, for example af",
145
+ "validation": {
146
+ "pattern": "^[a-z][a-z0-9]{0,15}$"
147
+ }
62
148
  }
63
149
  },
150
+ {
151
+ "name": "ENABLE_PROACTIVE_MESSAGING",
152
+ "value": "true",
153
+ "location": "variable",
154
+ "required": false
155
+ },
156
+ {
157
+ "name": "ENABLE_CHANNEL_NOTIFICATIONS",
158
+ "value": "true",
159
+ "location": "variable",
160
+ "required": false
161
+ },
64
162
  {
65
163
  "name": "ENABLE_DIRECT_MESSAGES",
66
164
  "value": "true",
67
165
  "location": "variable",
68
- "required": false,
69
- "portalInput": {
70
- "field": "select",
71
- "label": "Enable direct messages",
72
- "options": ["true", "false"]
73
- }
166
+ "required": false
74
167
  },
75
168
  {
76
169
  "name": "ENABLE_MODALS",
77
170
  "value": "true",
78
171
  "location": "variable",
79
- "required": false,
80
- "portalInput": {
81
- "field": "select",
82
- "label": "Enable modals",
83
- "options": ["true", "false"]
84
- }
172
+ "required": false
85
173
  },
86
174
  {
87
175
  "name": "ENABLE_SHORTCUTS",
88
176
  "value": "true",
89
177
  "location": "variable",
90
- "required": false,
91
- "portalInput": {
92
- "field": "select",
93
- "label": "Enable shortcuts",
94
- "options": ["true", "false"]
95
- }
178
+ "required": false
96
179
  }
97
180
  ],
98
- "dataSources": ["slack-messages", "slack-conversations"],
99
- "endpoints": [
100
- {
101
- "type": "commands",
102
- "path": "/commands",
103
- "router": "slack_commands_router",
104
- "description": "Slack slash commands endpoint",
105
- "active": true
106
- },
107
- {
108
- "type": "events",
109
- "path": "/events",
110
- "router": "slack_events_router",
111
- "description": "Slack Events API endpoint",
112
- "active": true
113
- },
114
- {
115
- "type": "interactive",
116
- "path": "/interactive",
117
- "router": "slack_interactive_router",
118
- "description": "Slack interactive components endpoint",
119
- "active": true
120
- },
121
- {
122
- "type": "notifications",
123
- "path": "/notifications",
124
- "router": "slack_notifications_router",
125
- "description": "Proactive notification endpoint",
126
- "active": true
181
+ "dataSources": [
182
+ "slack-interactive",
183
+ "slack-commands",
184
+ "slack-events",
185
+ "slack-conversations",
186
+ "slack-messages"
187
+ ],
188
+ "endpoints": [],
189
+ "endpointsActive": true,
190
+ "systemKind": "communication",
191
+ "channel": {
192
+ "definitionKey": "slack",
193
+ "provisioning": {
194
+ "mode": "automatic"
127
195
  },
128
- {
129
- "type": "config",
130
- "path": "/bot-config",
131
- "router": "slack_config_router",
132
- "description": "Slack bot configuration endpoint",
133
- "active": true
196
+ "runtimeTarget": {
197
+ "defaultSystemKey": "runtime-orchestration",
198
+ "configurable": true
134
199
  },
135
- {
136
- "type": "documents",
137
- "path": "/documents",
138
- "router": "slack_documents_router",
139
- "description": "Slack document review endpoint",
140
- "active": true
200
+ "experimental": false,
201
+ "profiles": [],
202
+ "packaging": {
203
+ "channelType": "slack",
204
+ "templateDir": "slack",
205
+ "artifactFileName": "channel-slack.json",
206
+ "artifactFormat": "json",
207
+ "credentialKey": "slack-app",
208
+ "capabilities": [
209
+ "chat",
210
+ "notify",
211
+ "documentApproval"
212
+ ],
213
+ "displayLabel": "Slack",
214
+ "category": "communication",
215
+ "wizardOrder": 40,
216
+ "remainingManualStep": "Workspace admin approval if Slack asks.",
217
+ "docsAnchor": "slack",
218
+ "approvalRequired": true,
219
+ "vendorAuthRequired": true
141
220
  }
142
- ],
143
- "endpointsActive": true
221
+ }
144
222
  }
@@ -2,11 +2,12 @@
2
2
  "display_information": {
3
3
  "name": "{{appName}}",
4
4
  "description": "{{appDescription}}",
5
+ "long_description": {{{appLongDescriptionJson}}},
5
6
  "background_color": "#0F172A"
6
7
  },
7
8
  "features": {
8
9
  "app_home": {
9
- "home_tab_enabled": true,
10
+ "home_tab_enabled": false,
10
11
  "messages_tab_enabled": true,
11
12
  "messages_tab_read_only_enabled": false
12
13
  },
@@ -51,7 +52,9 @@
51
52
  "commands",
52
53
  "im:history",
53
54
  "im:read",
54
- "im:write"
55
+ "im:write",
56
+ "users:read",
57
+ "users:read.email"
55
58
  ]
56
59
  },
57
60
  "pkce_enabled": false
@@ -0,0 +1,161 @@
1
+ {
2
+ "key": "teams-bot",
3
+ "displayName": "Microsoft Teams",
4
+ "description": "Chat with Role Assistants, send notifications, and review documents in Microsoft Teams.",
5
+ "type": "custom",
6
+ "systemKind": "communication",
7
+ "enabled": true,
8
+ "authentication": {
9
+ "authType": "credential",
10
+ "credential": {
11
+ "credentialKey": "teams-bot",
12
+ "displayName": "Microsoft Teams assistant bot",
13
+ "method": "oidc",
14
+ "writeOnce": true,
15
+ "variables": {
16
+ "openIdConfigUrl": "https://login.botframework.com/v1/.well-known/openid_configuration",
17
+ "expectedIssuer": "https://api.botframework.com",
18
+ "algorithms": "RS256",
19
+ "validateSignature": "true"
20
+ },
21
+ "security": {
22
+ "clientId": "kv://teams-bot/botAppId"
23
+ },
24
+ "formFields": [
25
+ {
26
+ "name": "clientId",
27
+ "required": true,
28
+ "label": "Bot application ID"
29
+ }
30
+ ]
31
+ }
32
+ },
33
+ "authentications": [
34
+ {
35
+ "key": "default",
36
+ "usage": "api",
37
+ "authType": "credential",
38
+ "credential": {
39
+ "credentialKey": "teams-bot",
40
+ "displayName": "Microsoft Teams assistant bot",
41
+ "method": "oidc",
42
+ "writeOnce": true,
43
+ "variables": {
44
+ "openIdConfigUrl": "https://login.botframework.com/v1/.well-known/openid_configuration",
45
+ "expectedIssuer": "https://api.botframework.com",
46
+ "algorithms": "RS256",
47
+ "validateSignature": "true"
48
+ },
49
+ "security": {
50
+ "clientId": "kv://teams-bot/botAppId"
51
+ },
52
+ "formFields": [
53
+ {
54
+ "name": "clientId",
55
+ "required": true,
56
+ "label": "Bot application ID"
57
+ }
58
+ ]
59
+ }
60
+ },
61
+ {
62
+ "key": "webhookInbound",
63
+ "usage": "webhookInbound",
64
+ "authType": "credential",
65
+ "credential": {
66
+ "credentialKey": "teams-bot",
67
+ "displayName": "Microsoft Teams inbound webhook",
68
+ "method": "oidc",
69
+ "writeOnce": true,
70
+ "variables": {
71
+ "openIdConfigUrl": "https://login.botframework.com/v1/.well-known/openid_configuration",
72
+ "expectedIssuer": "https://api.botframework.com",
73
+ "algorithms": "RS256",
74
+ "validateSignature": "true"
75
+ },
76
+ "security": {
77
+ "clientId": "kv://teams-bot/botAppId"
78
+ },
79
+ "formFields": [
80
+ {
81
+ "name": "clientId",
82
+ "required": true,
83
+ "label": "Bot application ID"
84
+ }
85
+ ]
86
+ }
87
+ }
88
+ ],
89
+ "configuration": [
90
+ {
91
+ "name": "CHANNEL_APP_DESCRIPTION",
92
+ "value": "Enterprise AI assistant for employees. Approved assistants, enterprise knowledge, workflows, and governed actions via AI Fabrix.",
93
+ "location": "variable",
94
+ "required": false,
95
+ "portalInput": {
96
+ "field": "textarea",
97
+ "label": "Description",
98
+ "placeholder": "Shown to people who connect this app",
99
+ "validation": {
100
+ "maxLength": 4000
101
+ }
102
+ }
103
+ }
104
+ ],
105
+ "dataSources": [
106
+ "teams-bot-activities"
107
+ ],
108
+ "endpoints": [],
109
+ "endpointsActive": true,
110
+ "roles": [
111
+ {
112
+ "name": "Everyone",
113
+ "value": "aifabrix-everyone",
114
+ "description": "Authenticated-user consume access for Enterprise LLM and platform search (not a Role Assistant)",
115
+ "groups": [
116
+ "AI-Fabrix-Everyone"
117
+ ]
118
+ }
119
+ ],
120
+ "permissions": [
121
+ {
122
+ "name": "teams-bot-activities:create",
123
+ "roles": [
124
+ "aifabrix-everyone"
125
+ ],
126
+ "description": "Permission: teams-bot-activities:create"
127
+ }
128
+ ],
129
+ "channel": {
130
+ "definitionKey": "teams-bot",
131
+ "provisioning": {
132
+ "mode": "automatic"
133
+ },
134
+ "runtimeTarget": {
135
+ "defaultSystemKey": "runtime-orchestration",
136
+ "configurable": true
137
+ },
138
+ "experimental": false,
139
+ "maxInstances": 1,
140
+ "profiles": [],
141
+ "packaging": {
142
+ "channelType": "teamsBot",
143
+ "templateDir": "teams-bot",
144
+ "artifactFileName": "channel-teams-bot.json",
145
+ "artifactFormat": "json",
146
+ "credentialKey": "teams-bot",
147
+ "capabilities": [
148
+ "chat",
149
+ "notify",
150
+ "documentApproval"
151
+ ],
152
+ "displayLabel": "Microsoft Teams",
153
+ "category": "communication",
154
+ "wizardOrder": 20,
155
+ "remainingManualStep": "Approve custom app upload or organization publish if your tenant requires it.",
156
+ "docsAnchor": "teams-bot",
157
+ "approvalRequired": true,
158
+ "vendorAuthRequired": true
159
+ }
160
+ }
161
+ }
@@ -0,0 +1 @@
1
+ <svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>Microsoft Teams</title><path d="M20.625 8.127q-.55 0-1.025-.205-.475-.205-.832-.563-.358-.357-.563-.832Q18 6.053 18 5.502q0-.54.205-1.02t.563-.837q.357-.358.832-.563.474-.205 1.025-.205.54 0 1.02.205t.837.563q.358.357.563.837.205.48.205 1.02 0 .55-.205 1.025-.205.475-.563.832-.357.358-.837.563-.48.205-1.02.205zm0-3.75q-.469 0-.797.328-.328.328-.328.797 0 .469.328.797.328.328.797.328.469 0 .797-.328.328-.328.328-.797 0-.469-.328-.797-.328-.328-.797-.328zM24 10.002v5.578q0 .774-.293 1.46-.293.685-.803 1.194-.51.51-1.195.803-.686.293-1.459.293-.445 0-.908-.105-.463-.106-.85-.329-.293.95-.855 1.729-.563.78-1.319 1.336-.756.557-1.67.861-.914.305-1.898.305-1.148 0-2.162-.398-1.014-.399-1.805-1.102-.79-.703-1.312-1.664t-.674-2.086h-5.8q-.411 0-.704-.293T0 16.881V6.873q0-.41.293-.703t.703-.293h8.59q-.34-.715-.34-1.5 0-.727.275-1.365.276-.639.75-1.114.475-.474 1.114-.75.638-.275 1.365-.275t1.365.275q.639.276 1.114.75.474.475.75 1.114.275.638.275 1.365t-.275 1.365q-.276.639-.75 1.113-.475.475-1.114.75-.638.276-1.365.276-.188 0-.375-.024-.188-.023-.375-.058v1.078h10.875q.469 0 .797.328.328.328.328.797zM12.75 2.373q-.41 0-.78.158-.368.158-.638.434-.27.275-.428.639-.158.363-.158.773 0 .41.158.78.159.368.428.638.27.27.639.428.369.158.779.158.41 0 .773-.158.364-.159.64-.428.274-.27.433-.639.158-.369.158-.779 0-.41-.158-.773-.159-.364-.434-.64-.275-.275-.639-.433-.363-.158-.773-.158zM6.937 9.814h2.25V7.94H2.814v1.875h2.25v6h1.875zm10.313 7.313v-6.75H12v6.504q0 .41-.293.703t-.703.293H8.309q.152.809.556 1.5.405.691.985 1.19.58.497 1.318.779.738.281 1.582.281.926 0 1.746-.352.82-.351 1.436-.966.615-.616.966-1.43.352-.815.352-1.752zm5.25-1.547v-5.203h-3.75v6.855q.305.305.691.452.387.146.809.146.469 0 .879-.176.41-.175.715-.48.304-.305.48-.715t.176-.879Z"/></svg>
@@ -1,25 +1,24 @@
1
- # {{appName}} — Microsoft Teams communication channel install
1
+ # {{appName}} — Microsoft Teams install
2
2
 
3
3
  {{appDescription}}
4
4
 
5
5
  Environment: **{{environment}}** · Credential key: `{{credentialKey}}`
6
6
 
7
- One Teams bot delivers **Role Assistant** chat **and** **document approval** (plan 455.2).
7
+ One Teams bot delivers **Role Assistant** chat **and** document approval.
8
8
 
9
- ## Register the Teams bot (tenant admin)
9
+ `aifabrix channel add teams-bot` provisions an **Azure-managed** bot around the existing AI Fabrix messaging endpoint. It does not scaffold a Teams SDK bot.
10
10
 
11
- 1. Open the [Teams Developer Portal](https://dev.teams.microsoft.com/) as a Teams tenant admin.
12
- 2. Create a new app or **Import an existing app** using the Bot Framework manifest JSON from `dist/channels/teams-bot/channel-teams-bot.json` (same folder as this file).
13
- 3. Set the **Bot messaging endpoint** to the **Bot messages** URL below (your dataplane `/messages` route).
14
- 4. In [Azure Portal](https://portal.azure.com/), register or open the **Azure Bot** resource and copy the **Microsoft App ID**.
15
- 5. In Microsoft Entra, create a **client secret** (or upload a certificate) for the bot app registration.
16
- 6. Enable the **Microsoft Teams** channel on the Azure Bot resource.
17
- 7. Save the **Microsoft App ID** and **client secret** in AI Fabrix: [Authentication settings]({{credentialPortalUrl}})
18
- 8. Publish the app to your organization (or sideload for lab) and complete tenant admin approval if prompted.
11
+ ## Remaining Microsoft steps
12
+
13
+ 1. Open [Teams](https://teams.microsoft.com) and install the generated package if sideloading is allowed.
14
+ 2. Approve custom app upload or organization publish if your tenant requires it.
15
+ 3. If upload is restricted, approve in [Teams admin centre → Manage apps](https://admin.teams.microsoft.com/policies/manage-apps).
16
+
17
+ Bot App ID and client secret are stored in AI Fabrix (`kv://teams-bot/…`). Do not paste secrets into this file.
19
18
 
20
19
  ## Platform callback URLs
21
20
 
22
- Configure these on the Azure Bot / Teams app registration. Do not embed secrets in generated files — use AI Fabrix credential storage only.
21
+ These URLs are already configured on the Azure-managed bot when provision succeeds. Public HTTPS only.
23
22
 
24
23
  {{#if messagesUrl}}
25
24
  - **Bot messages:** {{messagesUrl}}
@@ -54,7 +53,7 @@ Runtime lists **assistants** available to each user from:
54
53
 
55
54
  {{assistantCatalogUrl}}
56
55
 
57
- ## After Teams admin approval
56
+ ## After tenant policy approval
58
57
 
59
58
  ```bash
60
59
  aifabrix channel add {{channelTarget}} --name "{{baseName}}"
@@ -1,16 +1,17 @@
1
- # teams-bot communication channel (lab fixture)
1
+ # Microsoft Teams
2
2
 
3
- SSOT for Teams Bot Framework communication channel — **Role Assistants** and **document approval** on one bot (plan 455.2). Published to builder via `make sync-json`.
3
+ SSOT for Microsoft Teams — **Role Assistants** and **document approval** on one bot. Edit this tree in `aifabrix-builder/templates/channels/teams-bot/`.
4
4
 
5
5
  ## Surfaces
6
6
 
7
- - **Workforce:** DMs, activation cards, task offers (Bot Framework `/messages`)
7
+ - **Role Assistants:** DMs, activation cards, task offers (`POST /api/v1/webhooks/teams-bot/teams-bot-activities`)
8
8
  - **Document approval:** `documents`, `document`, `approve`, `help` bot commands; review Adaptive Cards; proactive `/notifications`
9
+ - **Inbound python CIP:** `teams-bot-activities` via webhookInbound OIDC so Execution logs include inbound
9
10
 
10
11
  ```bash
11
12
  aifabrix channel add teams-bot --name "Your Assistant" --probe
12
13
  ```
13
14
 
14
- Optional low-level (dataplane fixture tree): `validate` / `upload` / `deploy` before add.
15
+ Optional low-level: `channel scaffold` / `upload` from a workspace that has the package.
15
16
 
16
17
  Authentication: oidc — prefilled discovery settings; operators add Microsoft App ID + client secret on Connected Systems → Authentication.
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "app": {
3
3
  "key": "teams-bot",
4
- "displayName": "teams-bot assistant channel",
5
- "description": "Assistant communication channel — upload then channel add",
4
+ "displayName": "Microsoft Teams",
5
+ "description": "Chat with Role Assistants, send notifications, and review documents in Microsoft Teams.",
6
6
  "type": "external"
7
7
  },
8
8
  "externalIntegration": {
@@ -10,8 +10,10 @@
10
10
  "systems": [
11
11
  "teams-bot-system.json"
12
12
  ],
13
- "dataSources": [],
13
+ "dataSources": [
14
+ "teams-bot-datasource-activities.json"
15
+ ],
14
16
  "autopublish": true,
15
17
  "version": "1.0.0"
16
18
  }
17
- }
19
+ }
@@ -1,5 +1,6 @@
1
- # teams-bot assistant channel — lab fixture secrets
2
- # Microsoft App ID (JWT audience / Bot Framework app registration)
1
+ # Microsoft Teams assistant bot
2
+ # Bot App ID is written by `aifabrix channel add teams-bot` via secret set
3
+ # when Azure-managed Teams app create returns it. Do not require it here:
4
+ # missing botAppId must not block publishing the communication system.
3
5
  # aifabrix secret set teams-bot/botAppId "<app-id>" --shared
4
-
5
- KV_TEAMS_BOT_BOTAPPID=kv://teams-bot/botAppId
6
+ # KV_TEAMS_BOT_BOTAPPID=kv://teams-bot/botAppId
@@ -0,0 +1,68 @@
1
+ {
2
+ "openapi": "3.0.3",
3
+ "info": {
4
+ "title": "Teams-bot inbound python CIP",
5
+ "version": "1.0.0",
6
+ "description": "Contract surface for Teams-bot inbound python CIP. Vendor Request URL is POST /api/v1/webhooks/teams-bot/teams-bot-activities; this path is a CIP operation id."
7
+ },
8
+ "paths": {
9
+ "/inbound/activities": {
10
+ "post": {
11
+ "operationId": "teamsBotActivitiesCreate",
12
+ "summary": "Accept an inbound Bot Framework activity",
13
+ "x-aifabrix-capability": "create",
14
+ "requestBody": {
15
+ "required": true,
16
+ "content": {
17
+ "application/json": {
18
+ "schema": {
19
+ "$ref": "#/components/schemas/ChannelInboundCreateRequest"
20
+ }
21
+ }
22
+ }
23
+ },
24
+ "responses": {
25
+ "200": {
26
+ "description": "Inbound handler record",
27
+ "content": {
28
+ "application/json": {
29
+ "schema": {
30
+ "$ref": "#/components/schemas/ChannelInboundCreateResponse"
31
+ }
32
+ }
33
+ }
34
+ }
35
+ }
36
+ }
37
+ }
38
+ },
39
+ "components": {
40
+ "schemas": {
41
+ "ChannelInboundCreateRequest": {
42
+ "type": "object",
43
+ "description": "CIP create body. payload is the Bot Framework activity after OIDC validation.",
44
+ "properties": {
45
+ "payload": {
46
+ "type": "object",
47
+ "additionalProperties": true
48
+ }
49
+ }
50
+ },
51
+ "ChannelInboundCreateResponse": {
52
+ "type": "object",
53
+ "description": "Normalized inbound handler record for fieldMappings.",
54
+ "required": ["channel", "action", "outcome"],
55
+ "properties": {
56
+ "channel": { "type": "string" },
57
+ "action": { "type": "string" },
58
+ "outcome": { "type": "string" },
59
+ "externalId": { "type": "string" },
60
+ "response": {
61
+ "type": "object",
62
+ "additionalProperties": true
63
+ }
64
+ }
65
+ }
66
+ }
67
+ }
68
+ }