@fitlab-ai/agent-infra 0.9.11 → 0.9.12
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.
- package/README.md +6 -6
- package/README.zh-CN.md +6 -6
- package/dist/bin/internal-cli.js +5 -0
- package/dist/lib/agent-clients/adapters/codex-lifecycle/build-identity.js +71 -10
- package/dist/lib/defaults.json +4 -0
- package/dist/lib/git/workflow.js +43 -1
- package/dist/lib/init.js +1 -0
- package/dist/lib/internal/git-workflow.js +8 -1
- package/dist/lib/internal/platform-pr.js +8 -2
- package/dist/lib/internal/task-delivery.js +59 -0
- package/dist/lib/platform/github-client.js +7 -1
- package/dist/lib/platform/pr-checks.js +8 -5
- package/dist/lib/platform/pr-summary.js +12 -8
- package/dist/lib/platform/pull-requests.js +393 -91
- package/dist/lib/platform/verification-required.js +13 -2
- package/dist/lib/platform/verification-sync.js +9 -4
- package/dist/lib/pr-review/evidence-grading.js +12 -4
- package/dist/lib/sandbox/config.js +5 -0
- package/dist/lib/sandbox/control/lifecycle.js +29 -7
- package/dist/lib/server/process-state.js +2 -2
- package/dist/lib/task/artifact-lifecycle.js +2 -2
- package/dist/lib/task/commit-intent.js +100 -0
- package/dist/lib/task/commit-operation.js +195 -101
- package/dist/lib/task/create.js +33 -7
- package/dist/lib/task/decision-details.js +3 -48
- package/dist/lib/task/delivery-target.js +97 -0
- package/dist/lib/task/delivery.js +153 -0
- package/dist/lib/task/human-override.js +5 -2
- package/dist/lib/task/lifecycle.js +106 -9
- package/dist/lib/task/orchestration.js +55 -62
- package/dist/lib/task/pr-delivery-fact.js +182 -0
- package/dist/lib/task/review-finalization.js +4 -8
- package/dist/lib/task/review-fingerprint.js +8 -0
- package/dist/lib/task/verification-engine.js +48 -24
- package/dist/lib/task/verification-review.js +1 -1
- package/dist/lib/update.js +9 -0
- package/dist/lifecycle-build-manifest.json +3 -3
- package/lib/agent-clients/adapters/codex-lifecycle/build-identity.ts +105 -10
- package/lib/agent-clients/adapters/codex-lifecycle/manifest-files.json +12 -1
- package/lib/defaults.json +4 -0
- package/lib/git/workflow.ts +38 -1
- package/lib/init.ts +3 -0
- package/lib/internal/git-workflow.ts +7 -1
- package/lib/internal/platform-pr.ts +8 -1
- package/lib/internal/task-delivery.ts +53 -0
- package/lib/platform/github-client.ts +8 -1
- package/lib/platform/pr-checks.ts +7 -5
- package/lib/platform/pr-summary.ts +10 -7
- package/lib/platform/pull-requests.ts +425 -87
- package/lib/platform/verification-required.ts +12 -2
- package/lib/platform/verification-sync.ts +9 -4
- package/lib/pr-review/evidence-grading.ts +7 -4
- package/lib/sandbox/config.ts +7 -0
- package/lib/sandbox/control/lifecycle.ts +30 -8
- package/lib/server/process-state.ts +2 -2
- package/lib/task/artifact-lifecycle.ts +2 -2
- package/lib/task/commit-intent.ts +137 -0
- package/lib/task/commit-operation.ts +174 -87
- package/lib/task/create.ts +34 -9
- package/lib/task/decision-details.ts +2 -62
- package/lib/task/delivery-target.ts +130 -0
- package/lib/task/delivery.ts +160 -0
- package/lib/task/human-override.ts +5 -2
- package/lib/task/lifecycle.ts +93 -4
- package/lib/task/orchestration.ts +62 -65
- package/lib/task/pr-delivery-fact.ts +254 -0
- package/lib/task/review-finalization.ts +4 -14
- package/lib/task/review-fingerprint.ts +10 -0
- package/lib/task/verification-engine.ts +45 -28
- package/lib/task/verification-review.ts +2 -0
- package/lib/update.ts +10 -0
- package/package.json +1 -1
- package/templates/.agents/rules/README.en.md +4 -2
- package/templates/.agents/rules/README.zh-CN.md +4 -2
- package/templates/.agents/rules/create-issue.en.md +11 -2
- package/templates/.agents/rules/create-issue.zh-CN.md +24 -2
- package/templates/.agents/rules/issue-pr-commands.en.md +4 -17
- package/templates/.agents/rules/issue-sync.en.md +26 -5
- package/templates/.agents/rules/issue-sync.zh-CN.md +62 -5
- package/templates/.agents/rules/label-milestone-setup.en.md +15 -2
- package/templates/.agents/rules/label-milestone-setup.zh-CN.md +15 -2
- package/templates/.agents/rules/local-artifact-repair.en.md +46 -0
- package/templates/.agents/rules/local-artifact-repair.zh-CN.md +46 -0
- package/templates/.agents/rules/milestone-inference.en.md +12 -2
- package/templates/.agents/rules/milestone-inference.zh-CN.md +25 -3
- package/templates/.agents/rules/pr-sync.en.md +22 -13
- package/templates/.agents/rules/pr-sync.zh-CN.md +22 -1
- package/templates/.agents/rules/release-commands.en.md +42 -3
- package/templates/.agents/rules/release-commands.zh-CN.md +42 -3
- package/templates/.agents/rules/security-alerts.en.md +17 -2
- package/templates/.agents/rules/security-alerts.zh-CN.md +17 -2
- package/templates/.agents/rules/sync-content-generation.en.md +8 -0
- package/templates/.agents/rules/sync-content-generation.zh-CN.md +8 -0
- package/templates/.agents/rules/task-management.en.md +1 -1
- package/templates/.agents/rules/task-management.zh-CN.md +1 -1
- package/templates/.agents/scripts/security-alerts.github.sh +151 -0
- package/templates/.agents/scripts/security-alerts.sh +31 -0
- package/templates/.agents/skills/analyze-task/SKILL.en.md +1 -0
- package/templates/.agents/skills/analyze-task/SKILL.zh-CN.md +1 -0
- package/templates/.agents/skills/close-codescan/SKILL.en.md +2 -2
- package/templates/.agents/skills/close-codescan/SKILL.zh-CN.md +2 -2
- package/templates/.agents/skills/close-dependabot/SKILL.en.md +2 -2
- package/templates/.agents/skills/close-dependabot/SKILL.zh-CN.md +2 -2
- package/templates/.agents/skills/code-task/SKILL.en.md +5 -2
- package/templates/.agents/skills/code-task/SKILL.zh-CN.md +6 -3
- package/templates/.agents/skills/commit/SKILL.en.md +3 -3
- package/templates/.agents/skills/commit/SKILL.zh-CN.md +3 -3
- package/templates/.agents/skills/commit/config/verify.json +1 -1
- package/templates/.agents/skills/commit/reference/commit-orchestration.en.md +3 -3
- package/templates/.agents/skills/commit/reference/commit-orchestration.zh-CN.md +3 -3
- package/templates/.agents/skills/commit/reference/pr-summary-sync.en.md +1 -1
- package/templates/.agents/skills/commit/reference/pr-summary-sync.zh-CN.md +1 -1
- package/templates/.agents/skills/commit/reference/task-status-update.en.md +2 -2
- package/templates/.agents/skills/commit/reference/task-status-update.zh-CN.md +2 -2
- package/templates/.agents/skills/complete-manual-validation/SKILL.en.md +2 -1
- package/templates/.agents/skills/complete-manual-validation/SKILL.zh-CN.md +2 -1
- package/templates/.agents/skills/complete-manual-validation/config/verify.en.json +1 -1
- package/templates/.agents/skills/complete-manual-validation/config/verify.zh-CN.json +1 -1
- package/templates/.agents/skills/complete-manual-validation/reference/summary-update.en.md +1 -1
- package/templates/.agents/skills/complete-manual-validation/reference/summary-update.zh-CN.md +1 -1
- package/templates/.agents/skills/complete-task/SKILL.en.md +10 -10
- package/templates/.agents/skills/complete-task/SKILL.zh-CN.md +10 -10
- package/templates/.agents/skills/complete-task/reference/external-delivery.en.md +2 -2
- package/templates/.agents/skills/complete-task/reference/external-delivery.zh-CN.md +2 -2
- package/templates/.agents/skills/create-pr/SKILL.en.md +4 -4
- package/templates/.agents/skills/create-pr/SKILL.zh-CN.md +4 -4
- package/templates/.agents/skills/create-task/SKILL.en.md +1 -0
- package/templates/.agents/skills/create-task/SKILL.zh-CN.md +1 -0
- package/templates/.agents/skills/import-codescan/SKILL.en.md +1 -1
- package/templates/.agents/skills/import-codescan/SKILL.zh-CN.md +1 -1
- package/templates/.agents/skills/import-dependabot/SKILL.en.md +1 -1
- package/templates/.agents/skills/import-dependabot/SKILL.zh-CN.md +1 -1
- package/templates/.agents/skills/init-labels/SKILL.en.md +9 -10
- package/templates/.agents/skills/init-labels/SKILL.zh-CN.md +9 -10
- package/templates/.agents/skills/init-labels/scripts/init-labels.github.sh +57 -1
- package/templates/.agents/skills/init-labels/scripts/init-labels.sh +27 -1
- package/templates/.agents/skills/init-milestones/SKILL.en.md +3 -5
- package/templates/.agents/skills/init-milestones/SKILL.zh-CN.md +3 -5
- package/templates/.agents/skills/plan-task/SKILL.en.md +1 -0
- package/templates/.agents/skills/plan-task/SKILL.zh-CN.md +1 -0
- package/templates/.agents/skills/review-analysis/SKILL.en.md +4 -3
- package/templates/.agents/skills/review-analysis/SKILL.zh-CN.md +4 -3
- package/templates/.agents/skills/review-analysis/reference/output-templates.en.md +18 -0
- package/templates/.agents/skills/review-analysis/reference/output-templates.zh-CN.md +18 -0
- package/templates/.agents/skills/review-code/SKILL.en.md +7 -6
- package/templates/.agents/skills/review-code/SKILL.zh-CN.md +7 -6
- package/templates/.agents/skills/review-code/reference/output-templates.en.md +19 -1
- package/templates/.agents/skills/review-code/reference/output-templates.zh-CN.md +19 -1
- package/templates/.agents/skills/review-code/reference/report-template.en.md +4 -2
- package/templates/.agents/skills/review-code/reference/report-template.zh-CN.md +4 -2
- package/templates/.agents/skills/review-plan/SKILL.en.md +4 -3
- package/templates/.agents/skills/review-plan/SKILL.zh-CN.md +4 -3
- package/templates/.agents/skills/review-plan/reference/output-templates.en.md +18 -0
- package/templates/.agents/skills/review-plan/reference/output-templates.zh-CN.md +18 -0
- package/templates/.agents/skills/review-pr/SKILL.en.md +1 -0
- package/templates/.agents/skills/review-pr/SKILL.zh-CN.md +1 -0
- package/templates/.agents/skills/review-pr/reference/evidence-grading.en.md +2 -2
- package/templates/.agents/skills/review-pr/reference/evidence-grading.zh-CN.md +2 -2
- package/templates/.agents/skills/run-manual-validation/SKILL.en.md +1 -0
- package/templates/.agents/skills/run-manual-validation/SKILL.zh-CN.md +1 -0
- package/templates/.agents/skills/run-task/SKILL.en.md +1 -1
- package/templates/.agents/skills/run-task/SKILL.zh-CN.md +1 -1
- package/templates/.agents/skills/update-agent-infra/scripts/sync-templates.js +4 -0
- package/templates/.agents/skills/watch-pr/SKILL.en.md +4 -4
- package/templates/.agents/skills/watch-pr/SKILL.zh-CN.md +4 -4
- package/templates/.agents/templates/task.en.md +5 -1
- package/templates/.agents/templates/task.zh-CN.md +5 -1
- package/templates/.agents/workflows/bug-fix.en.yaml +9 -8
- package/templates/.agents/workflows/bug-fix.zh-CN.yaml +9 -8
- package/templates/.agents/workflows/feature-development.en.yaml +9 -8
- package/templates/.agents/workflows/feature-development.zh-CN.yaml +9 -8
- package/templates/.agents/workflows/refactoring.en.yaml +9 -8
- package/templates/.agents/workflows/refactoring.zh-CN.yaml +9 -8
- package/templates/.agents/rules/create-issue.github.en.md +0 -14
- package/templates/.agents/rules/create-issue.github.zh-CN.md +0 -27
- package/templates/.agents/rules/issue-pr-commands.github.en.md +0 -34
- package/templates/.agents/rules/issue-pr-commands.github.zh-CN.md +0 -49
- package/templates/.agents/rules/issue-sync.github.en.md +0 -40
- package/templates/.agents/rules/issue-sync.github.zh-CN.md +0 -76
- package/templates/.agents/rules/label-milestone-setup.github.en.md +0 -60
- package/templates/.agents/rules/label-milestone-setup.github.zh-CN.md +0 -60
- package/templates/.agents/rules/milestone-inference.github.en.md +0 -15
- package/templates/.agents/rules/milestone-inference.github.zh-CN.md +0 -27
- package/templates/.agents/rules/pr-checks-commands.github.en.md +0 -18
- package/templates/.agents/rules/pr-checks-commands.github.zh-CN.md +0 -34
- package/templates/.agents/rules/pr-sync.github.en.md +0 -43
- package/templates/.agents/rules/pr-sync.github.zh-CN.md +0 -69
- package/templates/.agents/rules/release-commands.github.en.md +0 -44
- package/templates/.agents/rules/release-commands.github.zh-CN.md +0 -44
- package/templates/.agents/rules/security-alerts.github.en.md +0 -43
- package/templates/.agents/rules/security-alerts.github.zh-CN.md +0 -43
- /package/templates/.agents/rules/{issue-fields.github.en.md → issue-fields.en.md} +0 -0
- /package/templates/.agents/rules/{issue-fields.github.zh-CN.md → issue-fields.zh-CN.md} +0 -0
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
# PR 摘要同步
|
|
2
|
-
|
|
3
|
-
> `--agent` 取值见 `.agents/rules/task-management.md`「合作者 token 规范」。
|
|
4
|
-
|
|
5
|
-
PR 摘要的语义聚合由模型完成;canonical 产物选择、marker、当前 HEAD、分页评论查找和 create/update/no-op 由 typed core 负责。
|
|
6
|
-
|
|
7
|
-
## 三层隔离
|
|
8
|
-
|
|
9
|
-
- `sync-pr:{task-id}:summary`(`platform-pr summary-sync`)是可更新的 reviewer 摘要,不是过程原文,也不是正式 Review。
|
|
10
|
-
- `pr-review*` 完整过程原文在 Issue artifact 评论(`platform-comment sync --kind artifact`),由 `restore-task` 按 Issue-only 契约恢复。
|
|
11
|
-
- 正式 PR Review(`platform-pr-review publish`)是唯一发布到 PR 的正式结论载体,绑定被审 head SHA,含结论、finding、receipt 与 Issue artifact 链接。
|
|
12
|
-
|
|
13
|
-
三者不串用:PR 普通评论不承载完整过程原文;Issue artifact 评论不当作正式 Review;摘要不冒充正式 Review。
|
|
14
|
-
|
|
15
|
-
## 聚合输入
|
|
16
|
-
|
|
17
|
-
```bash
|
|
18
|
-
agent-infra-internal platform-pr summary-context {task-id}
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
只使用返回的 canonical latest `plan*`、`review-plan*`、`code*`、`review-code*`、`manual-validation*`(包括 `manual-validation.md`)。模型据此生成 reviewer 摘要正文,至少包含:
|
|
22
|
-
|
|
23
|
-
- 变更摘要与实现范围
|
|
24
|
-
- 测试结果
|
|
25
|
-
- 审查历程与当前结论
|
|
26
|
-
- 人工校验三态:`### ⚠️ 需人工校验`、`### ✅ 人工验证已通过` 或 `### ✅ 无需人工校验`
|
|
27
|
-
- `### PR 代码增减`:基于 `platform-pr inspect` 的权威 base/head 和完整 `git diff --find-renames --numstat base...head`,按运行时代码、测试、Skill/规则、模板、文档及其他分类核算,并说明 rename、机械镜像与疑似不必要变化
|
|
28
|
-
|
|
29
|
-
保留人工校验项时,每条写明校验内容、定位和只能人工完成的原因。
|
|
30
|
-
|
|
31
|
-
core 最终包装出的 canonical 评论结构为:
|
|
32
|
-
|
|
33
|
-
```markdown
|
|
34
|
-
<!-- sync-pr:{task-id}:summary -->
|
|
35
|
-
<!-- last-commit: {git-head-sha} -->
|
|
36
|
-
## 审查摘要
|
|
37
|
-
{manual-validation-section}
|
|
38
|
-
### 关键技术决策
|
|
39
|
-
### 审查历程
|
|
40
|
-
### 测试结果
|
|
41
|
-
### PR 代码增减
|
|
42
|
-
```
|
|
43
|
-
|
|
44
|
-
## 发布
|
|
45
|
-
|
|
46
|
-
把聚合后的纯正文写入 `{summary-body-file}`,不要自行添加 marker 或 commit SHA:
|
|
47
|
-
|
|
48
|
-
```bash
|
|
49
|
-
agent-infra-internal platform-pr summary-sync {task-id} \
|
|
50
|
-
--agent {standard-agent-token} --body-file {summary-body-file}
|
|
51
|
-
```
|
|
52
|
-
|
|
53
|
-
core 会包装唯一 `<!-- sync-pr:{task-id}:summary -->` 和当前 `<!-- last-commit: ... -->`,分页查找 PR 普通评论:不存在则创建、正文变化则原地更新、无差异则 no-op、重复 marker 则稳定失败。正文通过文件输入,调用方不得拼 shell/heredoc。
|
|
54
|
-
|
|
55
|
-
## 结果回传
|
|
56
|
-
|
|
57
|
-
- `applied`:`summary created` 或 `summary updated`
|
|
58
|
-
- `no-op`:`summary skipped (no diff)`
|
|
59
|
-
- `failed|blocked`:`summary failed: {error.code}: {error.message}`
|
|
60
|
-
|
|
61
|
-
`create-pr` 中摘要失败不回滚已创建 PR;`commit` 中只记 warning,不回滚 commit;`complete-manual-validation` 在 canonical artifact 落盘后调用同一 intent 原地刷新。
|
|
62
|
-
|
|
63
|
-
关联任务的摘要失败由调用方登记结构化告警:
|
|
64
|
-
|
|
65
|
-
```bash
|
|
66
|
-
agent-infra-internal task-warning {task-id} add --step {step} --severity WARNING \
|
|
67
|
-
--code COMMENT_SYNC_FAILED --target pr-summary --message "{reason}" \
|
|
68
|
-
--action "修复评论权限或平台连接后重跑当前步骤"
|
|
69
|
-
```
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
# Release Platform Commands
|
|
2
|
-
|
|
3
|
-
Release-note platform operations use a typed internal intent. Callers consume structured JSON and do not interpret platform commands, raw fields, identity email rules, or authentication errors.
|
|
4
|
-
|
|
5
|
-
## Collect Release-note Context
|
|
6
|
-
|
|
7
|
-
```bash
|
|
8
|
-
agent-infra-internal platform-release-notes context \
|
|
9
|
-
--from-tag "v{prev-version}" \
|
|
10
|
-
--to-tag "v{version}" \
|
|
11
|
-
--branch "{branch}" \
|
|
12
|
-
--history-limit 3
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
The result contains `history`, `pullRequests`, `closingIssues`, and commit `authors` with normalized `login` / `resolution` values. `status: no-op` with error code `PLATFORM_RELEASE_NOTES_UNSUPPORTED` means the current platform does not support remote release-note operations.
|
|
16
|
-
|
|
17
|
-
### Identity Safety Boundary
|
|
18
|
-
|
|
19
|
-
- Render an identity as `@login` only when `resolution` is `platform-user` or `platform-noreply` and `login` is non-empty.
|
|
20
|
-
- Exclude `resolution: unresolved` identities from the release-note contributor list. Never infer a login from a name, email address, domain, brand, or same-named platform account, and never substitute a guessed personal or organization account.
|
|
21
|
-
- Do not publish unresolved identity emails or identity-verification TODOs in Release notes. Record any required investigation outside the release workflow without creating a platform mention.
|
|
22
|
-
|
|
23
|
-
## Stage Release Notes
|
|
24
|
-
|
|
25
|
-
```bash
|
|
26
|
-
agent-infra-internal platform-release-notes stage \
|
|
27
|
-
--notes-file "{notes-file}"
|
|
28
|
-
```
|
|
29
|
-
|
|
30
|
-
The command accepts only an external regular file, normalizes it atomically, and returns SHA-256 for its exact bytes.
|
|
31
|
-
|
|
32
|
-
## Publish Release Notes
|
|
33
|
-
|
|
34
|
-
Call this only after user confirmation:
|
|
35
|
-
|
|
36
|
-
```bash
|
|
37
|
-
agent-infra-internal platform-release-notes publish \
|
|
38
|
-
--tag "v{version}" \
|
|
39
|
-
--title "v{version}" \
|
|
40
|
-
--notes-file "{notes-file}" \
|
|
41
|
-
--expected-sha256 "{preview-sha256}"
|
|
42
|
-
```
|
|
43
|
-
|
|
44
|
-
The command recomputes the digest before platform access and performs no platform write on mismatch. On a match it updates an existing Release or creates it when missing; `--dry-run` returns only the planned operation. Exit code `0` means success, `1` means a stable failure, and `2` means a network or platform block.
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
# Release 平台命令
|
|
2
|
-
|
|
3
|
-
发布说明平台操作统一使用 typed internal intent。调用方只解释结构化 JSON,不解析平台命令、原始字段、身份邮箱规则或认证错误。
|
|
4
|
-
|
|
5
|
-
## 收集发布说明上下文
|
|
6
|
-
|
|
7
|
-
```bash
|
|
8
|
-
agent-infra-internal platform-release-notes context \
|
|
9
|
-
--from-tag "v{prev-version}" \
|
|
10
|
-
--to-tag "v{version}" \
|
|
11
|
-
--branch "{branch}" \
|
|
12
|
-
--history-limit 3
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
结果包含 `history`、`pullRequests`、`closingIssues` 和带规范化 `login` / `resolution` 的 commit `authors`。`status: no-op` 且错误码为 `PLATFORM_RELEASE_NOTES_UNSUPPORTED` 表示当前平台不支持远端发布说明能力。
|
|
16
|
-
|
|
17
|
-
### 身份安全边界
|
|
18
|
-
|
|
19
|
-
- 只有 `resolution` 为 `platform-user` 或 `platform-noreply` 且 `login` 非空的身份可以渲染为 `@login`。
|
|
20
|
-
- `resolution: unresolved` 的身份不得进入发布说明的贡献者列表;不得从 Name、邮箱、域名、品牌或同名平台账号推断 login,也不得替换成推测的个人或组织账号。
|
|
21
|
-
- 不得把未解析身份的邮箱或身份确认 TODO 写入可发布的 Release notes。需要调查时仅在发布流程外记录,不得产生平台 mention。
|
|
22
|
-
|
|
23
|
-
## Stage Release notes
|
|
24
|
-
|
|
25
|
-
```bash
|
|
26
|
-
agent-infra-internal platform-release-notes stage \
|
|
27
|
-
--notes-file "{notes-file}"
|
|
28
|
-
```
|
|
29
|
-
|
|
30
|
-
命令只接受工作树外普通文件,原子规范化并返回精确 bytes 的 SHA-256。
|
|
31
|
-
|
|
32
|
-
## 发布 Release notes
|
|
33
|
-
|
|
34
|
-
用户确认后调用:
|
|
35
|
-
|
|
36
|
-
```bash
|
|
37
|
-
agent-infra-internal platform-release-notes publish \
|
|
38
|
-
--tag "v{version}" \
|
|
39
|
-
--title "v{version}" \
|
|
40
|
-
--notes-file "{notes-file}" \
|
|
41
|
-
--expected-sha256 "{preview-sha256}"
|
|
42
|
-
```
|
|
43
|
-
|
|
44
|
-
命令在平台访问前复算摘要,不匹配时零写入;匹配时更新已有 Release,缺失时创建。`--dry-run` 只返回 planned operation。退出码为 `0` 时成功,`1` 表示稳定失败,`2` 表示网络或平台阻塞。
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
# Security Alert Platform Commands
|
|
2
|
-
|
|
3
|
-
Read this file before importing or dismissing Dependabot or Code Scanning alerts.
|
|
4
|
-
|
|
5
|
-
## Dependabot Alerts
|
|
6
|
-
|
|
7
|
-
Read an alert:
|
|
8
|
-
|
|
9
|
-
```bash
|
|
10
|
-
gh api "repos/{owner}/{repo}/dependabot/alerts/{number}"
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
Dismiss an alert:
|
|
14
|
-
|
|
15
|
-
```bash
|
|
16
|
-
gh api --method PATCH "repos/{owner}/{repo}/dependabot/alerts/{number}" \
|
|
17
|
-
-f state="dismissed" \
|
|
18
|
-
-f dismissed_reason="{reason}" \
|
|
19
|
-
-f dismissed_comment="{comment}"
|
|
20
|
-
```
|
|
21
|
-
|
|
22
|
-
## Code Scanning Alerts
|
|
23
|
-
|
|
24
|
-
Read an alert:
|
|
25
|
-
|
|
26
|
-
```bash
|
|
27
|
-
gh api "repos/{owner}/{repo}/code-scanning/alerts/{number}"
|
|
28
|
-
```
|
|
29
|
-
|
|
30
|
-
Dismiss an alert:
|
|
31
|
-
|
|
32
|
-
```bash
|
|
33
|
-
gh api --method PATCH "repos/{owner}/{repo}/code-scanning/alerts/{number}" \
|
|
34
|
-
-f state="dismissed" \
|
|
35
|
-
-f dismissed_reason="{reason}" \
|
|
36
|
-
-f dismissed_comment="{comment}"
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
## Constraints
|
|
40
|
-
|
|
41
|
-
- read the current alert state before deciding whether to continue
|
|
42
|
-
- validate dismissal reasons in the calling skill before sending them
|
|
43
|
-
- stop or escalate according to the calling skill when API calls fail
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
# 安全告警平台命令
|
|
2
|
-
|
|
3
|
-
在导入或关闭 Dependabot / Code Scanning 告警前先读取本文件。
|
|
4
|
-
|
|
5
|
-
## Dependabot 告警
|
|
6
|
-
|
|
7
|
-
读取告警:
|
|
8
|
-
|
|
9
|
-
```bash
|
|
10
|
-
gh api "repos/{owner}/{repo}/dependabot/alerts/{number}"
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
关闭告警:
|
|
14
|
-
|
|
15
|
-
```bash
|
|
16
|
-
gh api --method PATCH "repos/{owner}/{repo}/dependabot/alerts/{number}" \
|
|
17
|
-
-f state="dismissed" \
|
|
18
|
-
-f dismissed_reason="{reason}" \
|
|
19
|
-
-f dismissed_comment="{comment}"
|
|
20
|
-
```
|
|
21
|
-
|
|
22
|
-
## Code Scanning 告警
|
|
23
|
-
|
|
24
|
-
读取告警:
|
|
25
|
-
|
|
26
|
-
```bash
|
|
27
|
-
gh api "repos/{owner}/{repo}/code-scanning/alerts/{number}"
|
|
28
|
-
```
|
|
29
|
-
|
|
30
|
-
关闭告警:
|
|
31
|
-
|
|
32
|
-
```bash
|
|
33
|
-
gh api --method PATCH "repos/{owner}/{repo}/code-scanning/alerts/{number}" \
|
|
34
|
-
-f state="dismissed" \
|
|
35
|
-
-f dismissed_reason="{reason}" \
|
|
36
|
-
-f dismissed_comment="{comment}"
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
## 约束
|
|
40
|
-
|
|
41
|
-
- 先读取当前告警状态,再决定是否继续
|
|
42
|
-
- 关闭理由必须由调用方校验后再传入
|
|
43
|
-
- API 失败时按调用方规则停止或提示人工介入
|
|
File without changes
|
|
File without changes
|