@numa-tech/numa 1.14.28 → 1.14.30

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 (94) hide show
  1. package/README.md +35 -201
  2. package/dist/application-onboarding/client.d.ts +3 -17
  3. package/dist/application-onboarding/client.js +1 -14
  4. package/dist/application-onboarding/client.js.map +1 -1
  5. package/dist/application-onboarding/commands.d.ts +0 -2
  6. package/dist/application-onboarding/commands.js +5 -76
  7. package/dist/application-onboarding/commands.js.map +1 -1
  8. package/dist/application-onboarding/schemas.d.ts +28 -301
  9. package/dist/application-onboarding/schemas.js +13 -91
  10. package/dist/application-onboarding/schemas.js.map +1 -1
  11. package/dist/cli.js +0 -2
  12. package/dist/cli.js.map +1 -1
  13. package/dist/command-catalog.js +6 -336
  14. package/dist/command-catalog.js.map +1 -1
  15. package/dist/gitops/client.d.ts +0 -38
  16. package/dist/gitops/client.js +1 -9
  17. package/dist/gitops/client.js.map +1 -1
  18. package/dist/gitops/commands.js +1 -20
  19. package/dist/gitops/commands.js.map +1 -1
  20. package/dist/gitops/schemas.d.ts +0 -112
  21. package/dist/gitops/schemas.js +0 -38
  22. package/dist/gitops/schemas.js.map +1 -1
  23. package/dist/jenkins/commands.d.ts +0 -4
  24. package/dist/jenkins/commands.js +0 -10
  25. package/dist/jenkins/commands.js.map +1 -1
  26. package/dist/jenkins-jobs/commands.d.ts +0 -2
  27. package/dist/jenkins-jobs/commands.js +0 -2
  28. package/dist/jenkins-jobs/commands.js.map +1 -1
  29. package/dist/pipeline/commands.js +0 -2
  30. package/dist/pipeline/commands.js.map +1 -1
  31. package/dist/platform-profile.d.ts +2 -0
  32. package/dist/platform-profile.js +2 -1
  33. package/dist/platform-profile.js.map +1 -1
  34. package/package.json +4 -4
  35. package/skills/numa-create-application/SKILL.md +30 -163
  36. package/skills/numa-create-application/agents/openai.yaml +2 -2
  37. package/skills/numa-create-application/evals/evals.json +9 -150
  38. package/skills/numa-create-application/references/checklist.md +22 -139
  39. package/skills/numa-create-application/references/numa-cli.md +27 -257
  40. package/skills/numa-create-application/references/promote-workflows.md +22 -188
  41. package/skills/numa-create-application/scripts/inspect-project.mjs +1 -1
  42. package/skills/numa-jenkins-deployment/SKILL.md +21 -132
  43. package/skills/numa-jenkins-deployment/agents/openai.yaml +2 -2
  44. package/skills/numa-jenkins-deployment/evals/evals.json +9 -59
  45. package/skills/numa-jenkins-deployment/references/cli-contract.md +22 -101
  46. package/skills/numa-jenkins-deployment/references/diagnostics.md +2 -2
  47. package/skills/numa-jenkins-deployment/references/release-policy.md +19 -85
  48. package/skills/numa-local-flux-deploy/SKILL.md +1 -1
  49. package/skills/numa-local-flux-deploy/references/local-flux-release.md +1 -1
  50. package/dist/integration-bootstrap/client.d.ts +0 -61
  51. package/dist/integration-bootstrap/client.js +0 -293
  52. package/dist/integration-bootstrap/client.js.map +0 -1
  53. package/dist/integration-bootstrap/commands.d.ts +0 -86
  54. package/dist/integration-bootstrap/commands.js +0 -615
  55. package/dist/integration-bootstrap/commands.js.map +0 -1
  56. package/dist/integration-bootstrap/schemas.d.ts +0 -831
  57. package/dist/integration-bootstrap/schemas.js +0 -565
  58. package/dist/integration-bootstrap/schemas.js.map +0 -1
  59. package/dist/jenkins-gitops-rollouts/client.d.ts +0 -197
  60. package/dist/jenkins-gitops-rollouts/client.js +0 -126
  61. package/dist/jenkins-gitops-rollouts/client.js.map +0 -1
  62. package/dist/jenkins-gitops-rollouts/commands.d.ts +0 -50
  63. package/dist/jenkins-gitops-rollouts/commands.js +0 -358
  64. package/dist/jenkins-gitops-rollouts/commands.js.map +0 -1
  65. package/dist/jenkins-gitops-rollouts/schemas.d.ts +0 -217
  66. package/dist/jenkins-gitops-rollouts/schemas.js +0 -131
  67. package/dist/jenkins-gitops-rollouts/schemas.js.map +0 -1
  68. package/dist/platform-build-job-replans/client.d.ts +0 -291
  69. package/dist/platform-build-job-replans/client.js +0 -148
  70. package/dist/platform-build-job-replans/client.js.map +0 -1
  71. package/dist/platform-build-job-replans/commands.d.ts +0 -6
  72. package/dist/platform-build-job-replans/commands.js +0 -373
  73. package/dist/platform-build-job-replans/commands.js.map +0 -1
  74. package/dist/platform-build-job-replans/schemas.d.ts +0 -147
  75. package/dist/platform-build-job-replans/schemas.js +0 -151
  76. package/dist/platform-build-job-replans/schemas.js.map +0 -1
  77. package/dist/platform-build-rollouts/client.d.ts +0 -346
  78. package/dist/platform-build-rollouts/client.js +0 -153
  79. package/dist/platform-build-rollouts/client.js.map +0 -1
  80. package/dist/platform-build-rollouts/commands.d.ts +0 -98
  81. package/dist/platform-build-rollouts/commands.js +0 -465
  82. package/dist/platform-build-rollouts/commands.js.map +0 -1
  83. package/dist/platform-build-rollouts/schemas.d.ts +0 -348
  84. package/dist/platform-build-rollouts/schemas.js +0 -257
  85. package/dist/platform-build-rollouts/schemas.js.map +0 -1
  86. package/dist/platform-builds/client.d.ts +0 -147
  87. package/dist/platform-builds/client.js +0 -115
  88. package/dist/platform-builds/client.js.map +0 -1
  89. package/dist/platform-builds/commands.d.ts +0 -7
  90. package/dist/platform-builds/commands.js +0 -226
  91. package/dist/platform-builds/commands.js.map +0 -1
  92. package/dist/platform-builds/schemas.d.ts +0 -127
  93. package/dist/platform-builds/schemas.js +0 -66
  94. package/dist/platform-builds/schemas.js.map +0 -1
@@ -1,147 +1,36 @@
1
1
  ---
2
2
  name: numa-jenkins-deployment
3
- description: 使用 Numa CLI 安全规划、执行、监控、诊断和恢复 MCI DevOps/Jenkins v2 platform-build 或旧 v1 pipeline 部署。用户要求部署、发布、上线、重新部署、回滚,或排查 `pipeline platform-build`、`pipeline build/builds/status/log/retry/stop`、Jenkins 构建、GitOps image intent、结果未知、流水线无日志时必须使用。负责区分应用未入驻、Jenkins/branch 未初始化、v2 rollout 未就绪、项目规范失败、构建或运行失败、远端 Flux CAS 已落地但平台账本未决,以及控制面故障。
3
+ description: 使用 Numa CLI 安全规划、执行、监控、诊断和恢复 MCI DevOps/Jenkins canonical Multibranch 流水线部署。用户要求部署、发布、上线、重新部署、回滚,或排查 pipeline build/builds/status/log/retry/stopJenkins 构建、GitOps 写入和运行态时必须使用。
4
4
  ---
5
5
 
6
6
  # Numa Jenkins Deployment
7
7
 
8
- Numa CLI 当作 Jenkins 和平台 GitOps writer 的唯一受控入口。先判定 delivery mode,再证明应用、源码、Job、binding、rollout、审批与运行态指向同一发布;不要用重复触发掩盖初始化或结果对账问题。
8
+ 通过标准 `pipeline build` 表面执行仓库中的 `gitopsBuildEntry()`。已退役的签名快照、独立触发、rollout provenance 命令不得使用;若旧服务仍返回这些 capability,只视为待清理的历史状态。
9
9
 
10
- ## 必读资源
10
+ ## 工作流
11
11
 
12
- - 每次执行完整读取 [references/cli-contract.md](references/cli-contract.md)
13
- - 每次部署或故障排查完整读取 [references/diagnostics.md](references/diagnostics.md)。
14
- - 生产、多应用顺序发布或存在 `.numa/pipeline-release.json` 时完整读取 [references/release-policy.md](references/release-policy.md)。
12
+ 1. 先读取 [references/release-policy.md](references/release-policy.md),确认本次请求授权的环境和动作。
13
+ 2. 检查源码目录、分支、HEAD、remote、工作树和 `.numa/pipeline-release.json`。生产只发布干净且已推送的提交。
14
+ 3. 使用 `numa pipeline inspect APPLICATION --json` `numa pipeline list` 确认 application、tier、canonical Multibranch root、branch child 与参数定义。
15
+ 4. 新分支 Job 第一次运行不带业务参数,作为参数初始化;需要强制重建参数时可传 `INIT=true`。初始化成功后必须用新的幂等键触发实际部署。
16
+ 5. 实际构建使用 `numa pipeline build`,传明确的 `ENV_ID` 及项目必需参数。生产提供 `--approve-id` 或不少于 10 个字符的 `--production-reason`。
17
+ 6. 保存 requestId。结果不明时只用 `pipeline status/log` 或 `pipeline builds` 找回原请求,不换 key 重放。
18
+ 7. 完成必须同时核对:平台构建账本/Jenkins 结果、Flux 目标文件与提交、目标集群实际镜像和健康状态。
15
19
 
16
- ## 工作边界
17
-
18
- - 解释、review、状态查询或诊断保持只读;不触发、停止、重试或修改远程资源。
19
- - 用户明确要求发布已解析的应用、tier 和 branch 后,可执行对应部署。新增目标、生产影响或 fallback 需要再次授权。
20
- - 应用/Repository/Job 缺失时转入 `numa-create-application`;项目构建规范缺失且用户要求修复时使用 `mci-build-standards`。
21
- - 不读取或输出 token cache、Bearer/Cookie、Jenkins/SCM credential、Kubernetes Secret 或数据库密码。
22
- - v2 writer 结果未知时禁止直接改 Flux、数据库或 Jenkins 结果;本地 Flux 只是在正常流水线不可用且用户明确授权后的独立 fallback,不是账本修复器。
23
-
24
- ## 1. 建立运行时事实
25
-
26
- 1. 读取目标仓库的 `AGENTS.md`、部署文档和 `.numa/pipeline-release.json`。
27
- 2. 只用当前运行时帮助确定命令,不凭记忆猜参数:
28
-
29
- ```bash
30
- numa --version
31
- numa commands --json
32
- numa auth status --json
33
- numa profile --json
34
- numa pipeline --help
35
- numa pipeline inspect APPLICATION --json
36
- ```
37
-
38
- 3. 记录 CLI 版本、profile/API origin、当前用户、tier、application、branch 和完整 remote commit。401/403 按身份/权限处理,不绕过服务端。
39
- 4. 判定 delivery mode:存在已验证的 platform-build rollout、server-owned writer 和 `pipeline platform-build` capability 时为 `PLATFORM_V2`;明确的 legacy binding 才为 `LEGACY_V1`。证据不足时停止,禁止猜测或降级。
40
-
41
- ## 2. 写操作前预检
42
-
43
- 按顺序核验:
44
-
45
- 1. **应用目录**:`numa app list --json` 中存在唯一 application;否则分类为 `APPLICATION_NOT_REGISTERED`。
46
- 2. **Jenkins 初始化**:Job、instance、inventory、binding 和目标 branch child 均存在且可构建。完整 multibranch 初始化还要有 INDEX_ONLY/NoTrigger scan 证据;只存在父 Job 或 `scanMode=NONE` 不代表 branch 已就绪。当前服务端在 SCM 分支与 Jenkinsfile 已验证、但 branch child 缺失时,会为同一部署操作自动执行一次安全索引并继续;不得另建影子 Job 或退回默认分支。
47
- 3. **v2 rollout**:`PLATFORM_V2` 必须证明 writer bootstrap、Job provenance、platform-build rollout/configure 为 exact `READY/JENKINS_API_VERIFIED/VERIFIED`,source/Jenkinsfile/build-profile/configuration digest 完整。不得用 legacy manual readiness 代替。
48
- 4. **源码与项目**:工作树干净,HEAD 等于目标远端;Jenkinsfile/build profile 和运行时入口符合该 delivery mode。不要 stash、提交或丢弃用户的无关修改。
49
- 5. **治理**:生产发布需要真实 approval ID 或服务端允许的具体 production reason;不能捏造审批,也不能通过普通参数传入。
50
-
51
- ## 3. 展示发布计划
52
-
53
- 触发前展示 CLI/profile/操作者、delivery mode、application 顺序、repository/branch/SHA、Jenkins Job/binding/rollout、preflight、审批、稳定 idempotency key,以及会发生和不会发生的写操作。首次构建、生产发布和 fallback 都是独立授权。
54
-
55
- 幂等键应稳定标识同一应用、同一源码和同一发布 intent,例如 `APPLICATION-COMMIT_SHA`。同一提交的未知结果复用原 key;真正的新发布才使用新 key。
56
-
57
- ## 4. 执行与观察
58
-
59
- ### PLATFORM_V2
60
-
61
- 按运行时 help 组装命令;v2 不接受任意 Jenkins 参数:
62
-
63
- ```bash
64
- numa pipeline platform-build trigger APPLICATION \
65
- --tier TIER \
66
- --branch BRANCH \
67
- --idempotency-key APPLICATION-COMMIT_SHA \
68
- --approve-id APPROVAL_ID \
69
- --production-reason '具体生产发布原因' \
70
- --yes --wait --json
71
- ```
72
-
73
- 只传策略真实要求的审批字段。Jenkins 负责构建/push 镜像并提交一次 image intent;Flux SCM CAS 由 DevOps server-owned writer 执行,Jenkins 不持有 Flux Git credential。
74
-
75
- ### LEGACY_V1
76
-
77
- 只有明确 legacy binding 才使用:
20
+ ## 标准命令
78
21
 
79
22
  ```bash
80
- numa pipeline build APPLICATION \
81
- --tier TIER \
82
- --branch BRANCH \
83
- --approve-id APPROVAL_ID \
84
- --production-reason '具体生产发布原因' \
85
- --idempotency-key APPLICATION-COMMIT_SHA \
86
- --wait --json
87
- ```
88
-
89
- 多个应用严格串行;前一个只有平台终态和所需运行态验证均通过后才启动下一个。等待期间至少每分钟给用户一次状态。中断本地观察不会自动停止远端任务。
90
-
91
- ## 5. 未知结果与安全恢复
23
+ numa pipeline build APPLICATION --tier production --branch BRANCH \
24
+ --param INIT=true \
25
+ --production-reason '初始化生产流水线参数' --wait --json
92
26
 
93
- ### Trigger/transport 未知
27
+ numa pipeline build APPLICATION --tier production --branch BRANCH \
28
+ --param ENV_ID=prd \
29
+ --production-reason '执行生产构建与部署' --wait --json
94
30
 
95
- v2 trigger POST 只发一次:
96
-
97
- ```bash
98
- numa pipeline platform-build resolve --client-request-id APPLICATION-COMMIT_SHA --json
99
- numa pipeline platform-build status REQUEST_ID --watch --json
100
- numa pipeline platform-build log REQUEST_ID --start 0 --json
31
+ numa pipeline status REQUEST_ID --watch --json
32
+ numa pipeline log REQUEST_ID --offset 0 --json
33
+ numa pipeline builds --app APPLICATION --tier production --branch BRANCH --json
101
34
  ```
102
35
 
103
- legacy 通过原请求的 `builds/status/log` 找回。不要因 500/504、连接中断或本地等待取消而换 key 或直接 retry
104
-
105
- ### GitOps writer/账本未知
106
-
107
- Jenkins 可能在“更新环境镜像”阶段显示失败或 image intent 保持 `UNKNOWN`,但远端 Codeup CAS 和 Flux 部署实际已成功。此时分别核验:
108
-
109
- - 原 platform request/build/log;
110
- - exact application、binding/target、source revision、image repository/tag/digest、expected old head 和稳定 request marker;
111
- - 远端 target HEAD/revision 与目标 image 字段;
112
- - Flux GitRepository/Kustomization/HelmRelease/Deployment 的 exact observed revision/image。
113
-
114
- 远端 marker/HEAD 和健康运行态证明原 CAS 可能已经落地,不授权重放 build、生成新 key、手工重写 Flux、直改数据库或伪造 Jenkins `SUCCESS`。只有 runtime command catalog 明确提供、且服务端能对同一 durable request 做 exact reconciliation 的 reconcile/recover 能力才可推进账本。当前没有该能力时报告 `RUNTIME_DEPLOYED / PLATFORM_LEDGER_UNRESOLVED` 并停止。
115
-
116
- ## 6. 失败分类
117
-
118
- 只选择有证据的一类,并列出已排除项:
119
-
120
- 1. `APPLICATION_NOT_REGISTERED`:应用目录缺失。
121
- 2. `JENKINS_NOT_INITIALIZED`:instance/inventory/Job/scan/branch/binding 缺失。
122
- 3. `PLATFORM_V2_NOT_READY`:writer bootstrap、provenance 或 rollout/configure 未达到 exact verified readiness。
123
- 4. `PROJECT_STANDARD`:Jenkinsfile、build profile、产物或启动契约不合规。
124
- 5. `AUTHORIZATION_OR_APPROVAL`:登录、角色或生产审批不足。
125
- 6. `BUILD_OR_RUNTIME_FAILURE`:编译、测试、镜像、迁移、探针或启动失败。
126
- 7. `GITOPS_LEDGER_UNRESOLVED`:远端/运行态可能成功,但 writer response/readback/平台持久化未确认。
127
- 8. `CONTROL_PLANE_OUTAGE`:DevOps API 路由或后端不可用,无法读取正常控制面状态。
128
-
129
- 日志从第一个根因和最终 `Finished:` 共同判断,不只看最后一层包装异常。
130
-
131
- ## 7. 运行态与完成标准
132
-
133
- v2 完成状态分三列报告:
134
-
135
- | 维度 | 必要证据 |
136
- |---|---|
137
- | Jenkins/build | 同一 request/build 的明确终态与源码/image identity |
138
- | Platform ledger | 同一 image intent/CAS 的 verified terminal result |
139
- | Flux/runtime | exact Git revision、controller healthy、workload exact image 与 readiness |
140
-
141
- 只有三者一致,且仓库定义的健康/迁移/能力探针通过,才报告平台自动化部署成功。Flux/Deployment 健康但账本未决时只能报告运行态部署成功;“构建已触发”“镜像已推送”或“Flux 已同步”都不能单独冒充完整发布成功。
142
-
143
- 最终报告先给结论,再列 application、mode、branch/SHA、request/build、幂等键、三维状态、运行态验证、未决风险和安全恢复入口。
144
-
145
- ## 8. 控制平面自部署与 break-glass
146
-
147
- 若目标就是提供 Numa pipeline API 的 DevOps 平台且控制面已宕机,停止 CLI 重试并说明自举死锁。只有用户明确授权且已有受控规程时,才用白名单 Jenkins UI/恢复服务固定 branch/commit、审批和审计恢复后端;恢复后立即回到 Numa CLI 校正原请求并验证运行态。手工构建可能不会进入平台账本,必须如实报告。
36
+ 首次自然空跑与显式 `INIT=true` 二选一;已经有参数定义时无需重复初始化。详细参数和恢复规则见 [references/cli-contract.md](references/cli-contract.md),失败分类见 [references/diagnostics.md](references/diagnostics.md)
@@ -1,4 +1,4 @@
1
1
  interface:
2
2
  display_name: "Numa Jenkins 发布"
3
- short_description: "安全执行 v2 platform-build 与 legacy Jenkins 发布"
4
- default_prompt: "使用 $numa-jenkins-deployment 判定目标应用的 PLATFORM_V2 LEGACY_V1 delivery mode,完成预检、受治理触发、状态与日志恢复,并分别核验 Jenkins/buildplatform image-intent ledger Flux/runtime。结果未知时只恢复原请求,不重放写操作。"
3
+ short_description: "安全执行 canonical Jenkins/Flux 发布"
4
+ default_prompt: "使用 $numa-jenkins-deployment 通过 canonical Multibranch pipeline build 完成预检、参数初始化、构建触发、状态与日志恢复,并核验 Jenkins、Flux 和 runtime。结果未知时只恢复原请求,不使用已退役的签名快照表面。"
@@ -1,69 +1,19 @@
1
1
  {
2
- "skill_name": "numa-jenkins-deployment",
3
2
  "evals": [
4
3
  {
5
- "id": 1,
6
- "prompt": "请制定一个通过 Numa CLI 发布订单系统的执行方案,不要实际触发。order-api 和 order-web 都已确认是 PLATFORM_V2,rollout READY/JENKINS_API_VERIFIED/VERIFIED;仓库 develop 分支 HEAD 与 origin/develop 都是 4f7d9b1,工作树干净;.numa/pipeline-release.json 要求 production,顺序为 order-api 后 order-web,approvalId 为 ORDER-STANDARD-RELEASE,preflight 是 ./scripts/verify-cli-deploy.sh。请给出预检、只读解析、准确构建命令、幂等键、失败恢复和完成条件。",
7
- "expected_output": "输出严格串行、可审计且幂等的 Numa CLI生产发布方案,不绕过仓库策略。",
8
- "files": [],
9
- "expectations": [
10
- "先验证 CLI/auth/profile、Git HEAD 与远端、仓库 preflight、应用和 Jenkins binding,再给出写命令",
11
- "使用 order-api-4f7d9b1 和 order-web-4f7d9b1 作为每应用稳定幂等键",
12
- "生产命令使用 pipeline platform-build trigger、--approve-id ORDER-STANDARD-RELEASE、--yes、--wait 和 --json,且没有任意 --param",
13
- "明确 order-api 只有 build、platform ledger、Flux/runtime 三方完成后才允许触发 order-web",
14
- "网络或轮询结果不明时按原 key 使用 platform-build resolve/status/log"
15
- ]
4
+ "name": "canonical-v2-production",
5
+ "prompt": "active-code-inbox 使用 gitopsBuildEntry,生产分支 Job 已初始化。给出发布和未知结果恢复方案。",
6
+ "expected_output": "使用 pipeline build 传 ENV_ID 和生产原因;保存 requestId,并只用 status/log/builds 恢复;不使用任何签名快照命令。"
16
7
  },
17
8
  {
18
- "id": 2,
19
- "prompt": "帮我判断下面三个项目为什么不能用 Jenkins 部署,只诊断不要修改或触发:A numa app list 查不到 application;B 的 application 已存在,但 pipeline inspect 没有 confirmed binding,Jenkins instance inventory 从未同步;C 的 binding confirmed/instance healthy,构建日志显示 Jenkinsfile 没有 buildEntry()、Next.js 容器也没有可运行的 standalone server.js。请分别给出根因分类、证据、责任边界和下一步。",
20
- "expected_output": "准确区分应用未登记、Jenkins 未初始化和项目不符合构建/运行规范,并路由到正确专项能力。",
21
- "files": [],
22
- "expectations": [
23
- "A 被分类为 APPLICATION_NOT_REGISTERED,并建议使用 numa-create-application/onboarding,而不是直接建 Jenkins Job",
24
- "B 被分类为 JENKINS_NOT_INITIALIZED,指出 inventory、Job/binding 确认责任属于平台初始化",
25
- "C 被分类为 PROJECT_STANDARD 或构建运行规范问题,并建议使用 mci-build-standards",
26
- "没有触发 build、retry、stop,也没有擅自修改项目",
27
- "明确列出已排除类别和每个项目的最小下一步"
28
- ]
9
+ "name": "first-run-initialization",
10
+ "prompt": "新的 Multibranch Job 尚无 parameterDefinitions,如何完成第一次部署?",
11
+ "expected_output": "先无业务参数运行或使用 INIT=true 初始化;成功后用新的幂等键和 ENV_ID 触发第二次实际构建。"
29
12
  },
30
13
  {
31
- "id": 3,
32
- "prompt": "正在用 numa pipeline 部署 mci-devops-platform 自己。后端构建后,numa pipeline list/builds/log 全部返回 404 或 503,但登录后的 Jenkins 网页仍能看到 build #50 日志,日志末尾是 Spring ApplicationContext 启动失败和 Finished: FAILURE。前端还没部署。请判断原因并给安全恢复方案;不要假设能继续调用已经宕机的 DevOps API。",
33
- "expected_output": "识别控制平面自部署死锁,停止 CLI 重试,提出受控 break-glass 后端恢复及恢复后回归 Numa CLI 的顺序。",
34
- "files": [],
35
- "expectations": [
36
- "分类为 CONTROL_PLANE_OUTAGE 与后端运行时失败叠加,而不是 Numa 日志命令缺失",
37
- "解释 Jenkins 网页直连而 Numa log 依赖 DevOps 后端代理",
38
- "停止重复 build/retry,并明确前端不得在后端恢复前触发",
39
- "break-glass 要求白名单 Job、固定 branch/commit、审批、SSO/MFA 或既有受控权限和审计",
40
- "后端恢复后切回 Numa CLI校正旧状态、验证运行态,再部署前端,并说明手工构建可能不会回填 request 表"
41
- ]
42
- },
43
- {
44
- "id": 4,
45
- "prompt": "active-code-inbox 已确认使用 PLATFORM_V2,rollout 为 READY/JENKINS_API_VERIFIED/VERIFIED。请给出生产触发和未知结果恢复命令;不得传任意 Jenkins 参数。",
46
- "expected_output": "使用 platform-build trigger,并且未知 trigger 只按原 client request id resolve/status/log,不回退 legacy pipeline build。",
47
- "files": [],
48
- "expectations": [
49
- "触发使用 numa pipeline platform-build trigger,包含稳定 idempotency key、生产审批和 --yes --wait --json",
50
- "明确 v2 不接受 --param,也不回退 numa pipeline build",
51
- "未知结果使用同一 key 的 platform-build resolve,再按同一 request status/log",
52
- "说明 Jenkins 只构建镜像并提交一次 intent,Flux CAS 由 server-owned writer 执行"
53
- ]
54
- },
55
- {
56
- "id": 5,
57
- "prompt": "某 v2 构建在 Update Environment Image 阶段以 GitOpsUnknownResult 失败,但远端 prd HEAD 含本次 request marker,目标 values 的 image tag/digest 与 intent 一致,Flux 和 Deployment 也已应用且健康;平台 image-intent 仍 UNKNOWN。是否应该重跑构建或本地再推一次 Flux?如何报告状态?",
58
- "expected_output": "识别远端 CAS 已落地但平台账本未决,不重放任何写操作;分别报告 runtime 与 ledger,并等待同一 durable request 的服务端 exact reconciliation。",
59
- "files": [],
60
- "expectations": [
61
- "不重跑 build、不换 idempotency key、不创建第二个 image/commit、不手工再写 Flux",
62
- "解释 Git CAS 可原子成功,但 response/readback/平台持久化仍可能未知",
63
- "要求匹配 application、binding/target、request/build、source、image、expected old head、marker 和 remote HEAD/file content",
64
- "报告 RUNTIME_DEPLOYED / PLATFORM_LEDGER_UNRESOLVED,而不是完整平台发布成功",
65
- "只有服务端对同一 durable request 的受支持 reconcile/recover 能推进账本;命令不存在时停止而不是发明命令"
66
- ]
14
+ "name": "retired-snapshot-surface",
15
+ "prompt": "服务端仍显示历史签名快照 capability,是否应继续使用旧触发命令?",
16
+ "expected_output": "不使用。该表面已退役,只走 canonical pipeline build,并把旧 capability 视为待清理历史状态。"
67
17
  }
68
18
  ]
69
19
  }
@@ -1,120 +1,41 @@
1
- # Numa Pipeline CLI 调用契约
1
+ # CLI contract
2
2
 
3
- ## 1. 固定 CLI、身份与 profile
4
-
5
- 优先使用 PATH 中的 `numa`,并在一次发布中固定同一入口:
6
-
7
- ```bash
8
- numa --version
9
- numa commands --json
10
- numa auth status --json
11
- numa profile --json
12
- numa pipeline --help
13
- ```
14
-
15
- 缺少命令时可以只读检查公开最新版,但切换前要告知用户,且发现和写操作必须使用同一已验证版本:
16
-
17
- ```bash
18
- npx -y --prefer-online --registry=https://registry.npmjs.org/ \
19
- @numa-tech/numa@latest --version
20
- ```
21
-
22
- 不要硬编码本地源码的 `dist/cli.js` 作为通用方案。401/403 不得通过裸 API、token cache 或手工 Bearer 绕过。
23
-
24
- ## 2. 判定 delivery mode
3
+ ## 只读发现
25
4
 
26
5
  ```bash
27
- numa app list --json
6
+ numa pipeline list --app APPLICATION --tier production --branch BRANCH --json
28
7
  numa pipeline inspect APPLICATION --json
29
- numa pipeline list --app APPLICATION --tier TIER --branch BRANCH --json
30
- numa pipeline platform-build --help
31
- ```
32
-
33
- `PLATFORM_V2` 必须同时有运行时 platform-build capability、verified platform-build rollout/server-owned writer、confirmed binding 和可构建 branch。明确 legacy binding 才进入 `LEGACY_V1`。命令存在但服务端 capability/rollout 未就绪不能冒充 v2 ready,也不能静默回退 v1。
34
-
35
- Multibranch 父 Job 的 `buildable=false` 可能正常;必须解析目标 branch child。完整初始化需要 INDEX_ONLY/NoTrigger scan 的 task/result 与“没有触发 build”证据,只建父 Job 或 `scanMode=NONE` 不足。
36
-
37
- ## 3. PLATFORM_V2 构建
38
-
39
- 运行时帮助:
40
-
41
- ```bash
42
- numa pipeline platform-build trigger --help
43
- numa pipeline platform-build resolve --help
44
- numa pipeline platform-build status --help
45
- numa pipeline platform-build log --help
46
- numa pipeline platform-build stop --help
8
+ numa pipeline builds --app APPLICATION --tier production --branch BRANCH --limit 20 --json
47
9
  ```
48
10
 
49
- 生产示例:
11
+ 必须确认 binding 指向 canonical Multibranch root,目标 branch child 已被 scan 到。不得通过 Job 名猜环境。
50
12
 
51
- ```bash
52
- numa pipeline platform-build trigger APPLICATION \
53
- --tier production \
54
- --branch BRANCH \
55
- --idempotency-key APPLICATION-COMMIT_SHA \
56
- --approve-id APPROVAL_ID \
57
- --production-reason '具体生产发布原因' \
58
- --yes --wait --json
59
- ```
13
+ ## 初始化
60
14
 
61
- 规则:
15
+ 新 branch child 在第一次 Pipeline 执行前没有 parameterDefinitions。第一次运行不带业务参数,`gitopsBuildEntry()` 会写入参数定义并结束。也可以显式传 `INIT=true` 强制重新初始化。
62
16
 
63
- - v2 不接受任意 `--param`;审批只留平台审计,不进入 Jenkins 环境。
64
- - idempotency key 是稳定 client request id;未知结果复用原 key,新发布才用新 key。
65
- - Jenkins 只构建/push 镜像并提交一次 image intent;DevOps server-owned writer 执行 Flux SCM CAS。
66
- - `--wait` 只观察原 request,终端中断不停止远端任务。
17
+ 初始化请求与实际部署是两个独立构建,必须使用不同 idempotency key。初始化成功不等于镜像已构建或 Flux 已更新。
67
18
 
68
- ## 4. PLATFORM_V2 找回、状态与日志
19
+ ## 实际部署
69
20
 
70
21
  ```bash
71
- numa pipeline platform-build resolve \
72
- --client-request-id APPLICATION-COMMIT_SHA --json
73
- numa pipeline platform-build list \
74
- --app APPLICATION --tier production --json
75
- numa pipeline platform-build status REQUEST_ID --watch --json
76
- numa pipeline platform-build log REQUEST_ID --start 0 --json
22
+ numa pipeline build APPLICATION --tier TIER --branch BRANCH \
23
+ --param ENV_ID=ENVIRONMENT_ID \
24
+ --production-reason '明确的发布原因' --wait --json
77
25
  ```
78
26
 
79
- Trigger POST 只发一次。500/504、连接断开、无效响应或本地等待取消后只用原 key/request GET。不要用第二个 trigger 或新 key探测结果。
80
-
81
- Stop 是独立写操作,必须由用户明确要求并遵循生产治理;响应未知后只读取同一 request,不重放 stop。
82
-
83
- ## 5. GitOps writer 未决契约
84
-
85
- 若 Jenkins 最终失败发生在 image update/writer 阶段,或 image intent 为 `UNKNOWN`,先保存原 request/build/log。支持的 server reconciliation 必须精确匹配:
86
-
87
- - application、service binding/target;
88
- - client request/idempotency key、request ID、build number;
89
- - source revision;
90
- - image repository、tag、digest;
91
- - expected old target head 和稳定 request marker;
92
- - remote target HEAD/revision 与目标文件 image 字段。
27
+ Jenkinsfile 和平台登记参数补充其它 `--param KEY=VALUE`。不得把 secret、token、password credential 放在参数、日志或聊天中。
93
28
 
94
- Flux GitRepository/Kustomization/HelmRelease/Deployment 只能证明 exact revision/image 的运行态。远端 CAS 和运行时已经成功时,不重放 build、不换 key、不创建第二个 image/commit、不手工写 Flux、不直改数据库或 Jenkins 结果。
95
-
96
- 只有运行时 command catalog 明确提供的服务端 reconcile/recover,且它恢复同一 durable request,才可推进平台账本。当前 CLI 没有该命令时输出 `RUNTIME_DEPLOYED / PLATFORM_LEDGER_UNRESOLVED`,等待控制面能力;不要发明命令或使用 local Flux fallback 代替。
97
-
98
- ## 6. LEGACY_V1 兼容命令
99
-
100
- 仅用于明确 legacy binding:
29
+ ## 恢复
101
30
 
102
31
  ```bash
103
- numa pipeline build APPLICATION \
104
- --tier production \
105
- --branch BRANCH \
106
- --approve-id APPROVAL_ID \
107
- --production-reason '具体生产发布原因' \
108
- --idempotency-key APPLICATION-COMMIT_SHA \
109
- --wait --json
110
-
111
- numa pipeline builds --app APPLICATION --tier production --branch BRANCH --limit 20 --json
112
- numa pipeline status REQUEST_OR_BUILD_ID --watch --json
113
- numa pipeline log REQUEST_OR_BUILD_ID --follow
32
+ numa pipeline status REQUEST_ID --watch --json
33
+ numa pipeline log REQUEST_ID --offset 0 --json
34
+ numa pipeline builds --app APPLICATION --tier TIER --branch BRANCH --json
114
35
  ```
115
36
 
116
- Legacy `retry` 创建新请求,只用于已知终态失败后的有意重试,并需要当前有效审批;它不用于未知结果恢复。`stop` 是破坏性操作,必须有用户明确授权。
117
-
118
- ## 7. 安全输出
119
-
120
- 最终仅保留 CLI version、profile/API origin、application、delivery mode、tier、branch/SHA、request/build ID、idempotency key、状态、Flux observed revision/image 和脱敏 request ID。不要输出 token、Cookie、Authorization、Jenkins/SCM credential、Secret 或包含密码的参数。
37
+ - 已保存 requestId:只查询同一个 request。
38
+ - 未保存 requestId:按应用、tier、branch 和时间窗口找回。
39
+ - trigger 响应未知:先查账本和 Jenkins,不生成新的请求。
40
+ - Flux 已提交但平台状态未知:核对同一提交和镜像,不重跑构建或再推一次 Flux。
41
+ - 已退役的签名快照命令不得作为恢复手段。
@@ -13,7 +13,7 @@
13
13
  | 只有父 Job 或 `scanMode=NONE` | `JENKINS_NOT_INITIALIZED` | 完整的 branch 初始化尚未发生 | 新部署命令会在 SCM/Jenkinsfile 已验证后自动尝试一次 INDEX_ONLY/NoTrigger scan;仍失败时用受治理的初始化/replan 修复 |
14
14
  | 目标分支经过自动索引后仍无 child | `JENKINS_BRANCH_FILTERED` | Jenkins 分支策略过滤、索引未收敛或 branch child 不可构建 | 检查 Multibranch branch source/filter 与 Jenkinsfile;不要改用默认分支或影子 Job |
15
15
  | Jenkins 索引读取结果不可确认 | `JENKINS_BRANCH_DISCOVERY_FAILED` | Jenkins 上游读取、超时或中断 | 保留同一部署参数和幂等键,先查状态与 Jenkins 索引结果,再按服务端错误恢复 |
16
- | v2 writer bootstrap/provenance/rollout 非 exact verified readiness | `PLATFORM_V2_NOT_READY` | 新平台构建入口尚未达到安全门禁 | 回到 onboarding/rollout 恢复;不得用 legacy readiness 或 `pipeline build` 降级 |
16
+ | 仍出现签名 snapshot capability | `RETIRED_PIPELINE_SURFACE` | 服务端或本地 CLI 仍暴露已退役路径 | 不调用旧命令;升级组件并只使用 canonical `pipeline build` |
17
17
  | 401 | `AUTHORIZATION_OR_APPROVAL` | 登录缺失、过期或 issuer/profile 不匹配 | `auth status`、`profile`,必要时重新登录 |
18
18
  | 403 | `AUTHORIZATION_OR_APPROVAL` | 团队权限、平台角色或生产角色不足 | 核对成员关系和 ops-admin;不要索要 token 绕过 |
19
19
  | 生产审批缺失/无效 | `AUTHORIZATION_OR_APPROVAL` | 服务端治理拒绝写操作 | 使用真实 approval ID 或合规具体原因 |
@@ -42,7 +42,7 @@ app 存在
42
42
 
43
43
  使用 `mci-build-standards` 核对:
44
44
 
45
- - Jenkinsfile 使用统一 `buildEntry()`;
45
+ - v2 Jenkinsfile 使用统一 `gitopsBuildEntry()`;尚未迁移的 v1 应用才保留 `buildEntry()`;
46
46
  - `APP_NAME` 与应用/镜像名一致;
47
47
  - monorepo 的 `APP_HOME` 正确;
48
48
  - `TRIGGER_BUILD`、目标 branch 和手动/webhook 策略一致;
@@ -1,94 +1,28 @@
1
- # 仓库驱动的发布策略
1
+ # Release policy
2
2
 
3
- ## 策略优先级
3
+ ## 授权与目标
4
4
 
5
- 按以下顺序解析发布策略:
5
+ 部署请求只授权指定应用、环境和正常发布步骤。生产操作前必须通过只读调用解析 exact application、tier、branch、Jenkins binding、GitOps target 和集群。
6
6
 
7
- 1. 仓库根目录 `.numa/pipeline-release.json`;
8
- 2. `AGENTS.md` 和仓库部署文档;
9
- 3. 用户为本次发布明确提供的值。
7
+ 生产部署只允许干净、已提交且已推送的 revision。不得绕过 dirty-worktree guard,不得发布未跟踪本地状态。
10
8
 
11
- 不要擅自覆盖版本化的应用顺序、tier、preflight、approval ID 或生产原因。用户如果要改变发布策略,应把策略修改和实际部署分开 review。
9
+ ## 执行顺序
12
10
 
13
- ## Manifest v1
11
+ 1. 运行项目声明的 preflight/verify。
12
+ 2. 确认 canonical Multibranch branch Job 已存在。
13
+ 3. 缺少参数定义时先执行初始化构建;初始化不会部署。
14
+ 4. 用新的幂等键执行实际构建。
15
+ 5. 逐项等待前置应用成功后再启动下游。
16
+ 6. 核对 Jenkins、Flux 与 runtime 三方证据。
14
17
 
15
- ```json
16
- {
17
- "schemaVersion": 1,
18
- "tier": "production",
19
- "approval": {
20
- "id": "APPROVAL-ID",
21
- "reason": "具体生产发布原因"
22
- },
23
- "preflight": [
24
- {
25
- "command": "./scripts/verify-cli-deploy.sh",
26
- "description": "仓库发布门禁"
27
- }
28
- ],
29
- "applications": [
30
- {
31
- "code": "backend-application",
32
- "description": "先部署迁移和 API"
33
- },
34
- {
35
- "code": "frontend-application",
36
- "description": "仅在后端成功后部署"
37
- }
38
- ]
39
- }
40
- ```
18
+ ## 安全与恢复
41
19
 
42
- 校验规则:
20
+ - 不输出 access token、refresh token、Cookie、client secret、Jenkins password、SCM 凭据或 kubeconfig。
21
+ - 不把敏感值放入 Jenkins 参数。
22
+ - 同一请求结果不明时只读恢复,不换 key 重放。
23
+ - 不手工改写 Flux 来掩盖失败。
24
+ - 旧签名快照构建表面已退役;任何仍出现的旧 capability 或数据库记录只作历史审计,不授权调用。
43
25
 
44
- - `schemaVersion` 为 1;
45
- - tier 只接受 develop、staging、production;
46
- - applications 至少一个,code 非空且唯一;
47
- - production 至少提供真实 approval ID 或不少于 10 字符的具体原因;
48
- - approval ID 匹配 `[A-Za-z0-9][A-Za-z0-9._:/-]{0,159}`;
49
- - reason 不超过 800 字符;
50
- - manifest、preflight 和 build parameters 不含 Secret。
26
+ ## 完成条件
51
27
 
52
- ## Git 与 preflight
53
-
54
- 生产发布前:
55
-
56
- ```bash
57
- git status --short --branch
58
- git check-ref-format --branch BRANCH
59
- git fetch origin BRANCH
60
- git rev-parse HEAD
61
- git rev-parse origin/BRANCH
62
- ```
63
-
64
- 要求工作树干净、branch 合法、本地 HEAD 与远端完全一致。不要 stash、reset、checkout 或提交用户的无关修改来强行通过。
65
-
66
- 逐条检查 preflight 命令内容后按顺序执行;第一条非零即停止。preflight 应覆盖编译、测试、打包和运行时产物契约,而不仅是静态 lint。
67
-
68
- ## 计划与授权
69
-
70
- 为每个应用派生稳定幂等键:
71
-
72
- ```text
73
- APPLICATION-COMMIT_SHA
74
- ```
75
-
76
- 展示解析后的应用顺序、tier、branch/SHA、Jenkins binding、preflight、审批和幂等键。用户明确要求按仓库既有 manifest 发布该 branch,且解析没有改变目标或政策时,视为已授权该发布;任何新增目标或生产影响都要重新确认。
77
-
78
- 每个应用还要记录 delivery mode。`PLATFORM_V2` 使用 `pipeline platform-build trigger`,不接受任意参数;只有明确 `LEGACY_V1` 才使用 `pipeline build`。manifest 不能把 v2 应用静默降级成 legacy,也不能把同一 idempotency key 用于不同 source revision 或 image intent。
79
-
80
- ## 串行发布
81
-
82
- 依次执行 manifest applications。v2 前置应用只有 Jenkins/build、platform image-intent ledger 与 Flux/runtime 三方一致并通过健康检查后,才算 `SUCCESS`;后端、数据库迁移或公共 API 等前置应用未满足该条件时,禁止触发前端和下游应用。
83
-
84
- 如果本地等待中断:
85
-
86
- - 远端任务可能仍运行;
87
- - 复用原幂等键;
88
- - 先通过 builds/status/log 恢复;
89
- - 不自动 retry,不推进下一个应用。
90
- - 若远端 Flux CAS/运行态已经成功但平台 ledger 未决,报告 `RUNTIME_DEPLOYED / PLATFORM_LEDGER_UNRESOLVED`,不重复发布,也不推进依赖完整平台成功证明的后续应用。
91
-
92
- ## 完成验证
93
-
94
- 除 Jenkins 终态外,还要执行仓库定义的健康、迁移或能力探针。v2 分别报告 Jenkins/build、platform ledger、Flux/runtime,及每个应用的 request/build ID、branch/SHA 和幂等键;失败或 ledger 未决时明确哪些后续应用被跳过。
28
+ 只有当平台账本/Jenkins 为成功、Flux 目标文件指向本次镜像、目标工作负载实际运行该镜像且健康时,才报告部署成功。
@@ -16,7 +16,7 @@ Read [local-flux-release.md](references/local-flux-release.md) completely before
16
16
  - Never read registry auth files, kubeconfig contents, application secrets, token caches, or `secrets/**`. Check only whether the required authenticated tools can operate.
17
17
  - Do not modify Keycloak, database data, unrelated Flux resources, or a live Deployment unless the user separately placed that target in scope.
18
18
  - A local interruption or registry/network error creates an unknown result. Inspect the existing image tag, Git ref, Flux revision, and workload before any retry. Reuse the exact operation identity; never create a second release to escape uncertainty.
19
- - A Numa v2 platform-build whose writer result is `UNKNOWN` is not evidence that the Flux write failed. Before selecting this fallback, inspect the original platform request plus the remote target HEAD/request marker and exact image field. If the intended CAS already landed, do not write Flux again; observe the existing revision and leave platform-ledger reconciliation to the supported server-side recovery path.
19
+ - A retired signed-snapshot build whose writer result is `UNKNOWN` is not evidence that the Flux write failed. Before selecting this fallback, inspect the original request plus the remote target HEAD/request marker and exact image field. If the intended CAS already landed, do not write Flux again; observe the existing revision and leave ledger reconciliation to the supported server-side recovery path.
20
20
 
21
21
  ## Finish with evidence
22
22
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  Use this runbook only after the user authorizes the exact deployment and the normal Jenkins/Numa pipeline is unavailable or explicitly excluded. Keep the pipeline failure evidence in the handoff, but do not repeatedly probe or trigger it once the fallback is selected.
4
4
 
5
- Do not select the fallback merely because a v2 platform-build ended with `GitOpsUnknownResult`, a gateway timeout, or an image-intent ledger in `UNKNOWN`. First inspect the original request and the remote Flux branch. If the target HEAD contains the same stable request marker and the resolved image repository/tag/digest matches the original intent, the governed CAS already landed: skip image/Flux writes, observe that exact revision, and report the platform ledger separately. Local fallback cannot reconcile or overwrite the control-plane record.
5
+ Do not select the fallback merely because a retired signed-snapshot build ended with `GitOpsUnknownResult`, a gateway timeout, or an image-intent ledger in `UNKNOWN`. First inspect the original request and the remote Flux branch. If the target HEAD contains the same stable request marker and the resolved image repository/tag/digest matches the original intent, the governed CAS already landed: skip image/Flux writes, observe that exact revision, and report the platform ledger separately. Local fallback cannot reconcile or overwrite the control-plane record.
6
6
 
7
7
  ## 1. Resolve and freeze the release identity
8
8
 
@@ -1,61 +0,0 @@
1
- import type { AuthConfig } from "../config.js";
2
- import { type KeycloakTokenProvider } from "../oauth.js";
3
- import { type IntegrationBootstrapActionKind, type IntegrationBootstrapActionStart, type IntegrationBootstrapActionView, type IntegrationBootstrapApplyStart, type IntegrationBootstrapRunView, type IntegrationBootstrapSession, type IntegrationBootstrapStart, type IntegrationBootstrapTrustAnchorClient } from "./schemas.js";
4
- export declare const INTEGRATION_BOOTSTRAP_V2_ROOT = "/api/v1/admin/integration-bootstrap/jenkins-gitops-writer/v2";
5
- export declare const INTEGRATION_BOOTSTRAP_PLAN_SESSION_ROOT = "/api/v1/admin/integration-bootstrap/jenkins-gitops-writer/v2/plan-sessions";
6
- export declare const INTEGRATION_BOOTSTRAP_RUN_ROOT = "/api/v1/admin/integration-bootstrap/jenkins-gitops-writer/v2/runs";
7
- export declare const INTEGRATION_BOOTSTRAP_TRUST_ANCHOR_CONFIGURATION = "/public/v1/keycloak-bootstrap/client-configuration";
8
- export declare const INTEGRATION_BOOTSTRAP_TRUST_ANCHOR_CALLBACK = "/public/v1/keycloak-bootstrap/callback";
9
- export interface IntegrationBootstrapApplyInput {
10
- planSessionNo: string;
11
- planDigest: string;
12
- clientRequestId: string;
13
- }
14
- export interface IntegrationBootstrapActionInput {
15
- expectedRunVersion: number;
16
- clientRequestId: string;
17
- }
18
- export interface IntegrationBootstrapTrustAnchorDocument {
19
- realm: "master";
20
- clientId: "mci-devops-platform-bootstrap";
21
- configurationDigest: string;
22
- sourceUrl: string;
23
- configuration: IntegrationBootstrapTrustAnchorClient;
24
- }
25
- export interface IntegrationBootstrapApi {
26
- getTrustAnchorConfiguration(): Promise<IntegrationBootstrapTrustAnchorDocument>;
27
- startPlanSession(clientRequestId: string, idempotencyKey: string): Promise<IntegrationBootstrapStart>;
28
- resolvePlanSession(clientRequestId: string): Promise<IntegrationBootstrapSession>;
29
- getPlanSession(sessionNo: string): Promise<IntegrationBootstrapSession>;
30
- startApply(input: IntegrationBootstrapApplyInput, idempotencyKey: string): Promise<IntegrationBootstrapApplyStart>;
31
- resolveRun(clientRequestId: string): Promise<IntegrationBootstrapRunView>;
32
- getRun(runNo: string): Promise<IntegrationBootstrapRunView>;
33
- startAction(runNo: string, kind: Exclude<IntegrationBootstrapActionKind, "APPLY">, input: IntegrationBootstrapActionInput, idempotencyKey: string): Promise<IntegrationBootstrapActionStart>;
34
- resolveAction(clientRequestId: string): Promise<IntegrationBootstrapActionView>;
35
- getAction(actionNo: string): Promise<IntegrationBootstrapActionView>;
36
- }
37
- export interface IntegrationBootstrapClientDependencies {
38
- fetch?: typeof fetch;
39
- tokenProvider?: KeycloakTokenProvider;
40
- }
41
- export declare function integrationBootstrapIdempotencyKey(value: string): string;
42
- export declare function integrationBootstrapClientRequestId(value: string): string;
43
- export declare function integrationBootstrapRunNo(value: string): string;
44
- export declare class IntegrationBootstrapClient implements IntegrationBootstrapApi {
45
- private readonly config;
46
- private readonly fetchImpl;
47
- private readonly tokenProvider;
48
- constructor(config: AuthConfig, dependencies?: IntegrationBootstrapClientDependencies);
49
- private authenticatedFetch;
50
- private json;
51
- getTrustAnchorConfiguration(): Promise<IntegrationBootstrapTrustAnchorDocument>;
52
- startPlanSession(clientRequestIdValue: string, keyValue: string): Promise<IntegrationBootstrapStart>;
53
- resolvePlanSession(clientRequestIdValue: string): Promise<IntegrationBootstrapSession>;
54
- getPlanSession(value: string): Promise<IntegrationBootstrapSession>;
55
- startApply(input: IntegrationBootstrapApplyInput, keyValue: string): Promise<IntegrationBootstrapApplyStart>;
56
- resolveRun(clientRequestIdValue: string): Promise<IntegrationBootstrapRunView>;
57
- getRun(value: string): Promise<IntegrationBootstrapRunView>;
58
- startAction(runNoValue: string, kind: Exclude<IntegrationBootstrapActionKind, "APPLY">, input: IntegrationBootstrapActionInput, keyValue: string): Promise<IntegrationBootstrapActionStart>;
59
- resolveAction(clientRequestIdValue: string): Promise<IntegrationBootstrapActionView>;
60
- getAction(value: string): Promise<IntegrationBootstrapActionView>;
61
- }