Compare commits

..
Author SHA1 Message Date
修雨 8332b3eeb8 ci: trigger mergeability recalculation 2026-07-27 18:49:55 +08:00
Dennis 66bb86cc9e feat(schema): publish built-in shortcuts 2026-07-27 16:33:14 +08:00
github-actions[bot] 3e4886fc71 chore: update beta formula for v1.0.55-beta.4 [skip ci] 2026-07-27 03:32:08 +00:00
修雨 72cb8f188e ci: trigger code admission on main after bot merges 2026-07-27 11:16:24 +08:00
github-actions[bot] 2f8614aa1f Merge pull request #798 from DingTalk-Real-AI/changelog-v1.0.55-beta.4
chore(release): prepare v1.0.55-beta.4
2026-07-27 10:58:01 +08:00
修雨 0e60d09980 chore(release): prepare v1.0.55-beta.4 2026-07-27 10:26:32 +08:00
github-actions[bot] 4d182dea45 Merge pull request #795 from DingTalk-Real-AI/codex/fix-chat-bots-projection
fix(shortcut): prevent projection data loss
2026-07-27 10:18:14 +08:00
修雨 f56d3263e8 chore: extend changelog entry and align npm propagation test with workflow
- CHANGELOG [Unreleased] entry now covers all three projection fixes
- npm dist-tag propagation test expects 60 attempts, matching release.yml
2026-07-26 21:49:12 +08:00
Dennis 22c94900d7 docs(changelog): note shortcut projection fix 2026-07-26 16:58:10 +08:00
Dennis 0871c5d88c fix(shortcut): preserve bot search and mail thread fields 2026-07-26 16:19:21 +08:00
Dennis 15a15a1c12 fix(shortcut): preserve chat bots projection 2026-07-26 15:48:21 +08:00
修雨 0cc049eaa1 fix(release): handle Gitee API 200 null response for missing releases
Gitee API returns HTTP 200 with null body when a release tag doesn't
exist, unlike GitHub which returns 404. Treat empty release_id as
"no release exists" instead of erroring out.
2026-07-24 18:58:30 +08:00
修雨 dd2d91ae7e feat(ci): add release asset sync to Gitee mirror workflow
Add `sync_release_version` input to mirror-to-gitee.yml for ad-hoc
release asset synchronization that bypasses the release.yml verify
gate when tag metadata cannot be updated.
2026-07-24 18:54:47 +08:00
修雨 98309fa239 fix(ci): increase npm CDN propagation timeout with incremental backoff
npm registry behind CDN can take 1-5 minutes for dist-tag to propagate
to edge nodes. Extend max attempts from 12 to 60 and use incremental
backoff: 5s for first 12 attempts, then 10s.
2026-07-24 18:48:08 +08:00
修雨 b4e92f4e65 chore(release): prepare v1.0.55-beta.3 2026-07-24 18:48:03 +08:00
修雨 b34bbc9aa0 ci: enforce beta and stable release roles (#791) 2026-07-24 18:15:55 +08:00
github-actions[bot] 40444a6f78 chore: update beta formula for v1.0.55-beta.3 [skip ci] 2026-07-24 09:35:06 +00:00
修雨 97248bf7c2 chore(release): prepare v1.0.55-beta.3 2026-07-24 16:41:45 +08:00
修雨 fd6b3be046 ci: tier PR quality gates and automate review routing (#788)
Tier PR validation by risk, distribute peer review automatically, and enable a streamlined quality-preserving merge path.
2026-07-24 16:37:03 +08:00
修雨 835c9229fd ci: tier PR quality gates and automate review routing 2026-07-24 16:24:59 +08:00
修雨 ea7d8cc666 Merge pull request #783 from DingTalk-Real-AI/fix/shortcut-projection-data-loss
fix(shortcut): fix projection-data-loss silent-empty returns
2026-07-24 15:50:25 +08:00
DennisandClaude Opus 4.8 d2e36a76e2 fix(shortcut): address review — minutes taskUuid only; English test messages
- minutes: drop the minutesId/minutes_id candidate from the taskUuid mapping.
  minutesId is the minutes document id, a different identifier from the
  recording taskUuid that +record-pause/resume/stop consume via --id, so
  substituting it would feed record control a wrong id. The backend list
  already returns taskUuid; the guard test now asserts taskUuid/task_uuid.
- Rewrite the guard-test failure messages and fixture data in English to match
  the repository convention (only the two assertions that match the
  production Chinese validation string are kept).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-24 15:20:00 +08:00
Dennis 52cf261000 Merge remote-tracking branch 'origin/main' into fix/shortcut-projection-data-loss 2026-07-24 14:46:54 +08:00
修雨 8dac7d5fa5 Merge pull request #708 from anxiangbo/feat/20260714_hrbrain
Feat/20260714 hrbrain
2026-07-24 12:31:42 +08:00
修雨 4543e9935c Merge branch 'main' into feat/20260714_hrbrain 2026-07-24 11:38:50 +08:00
修雨 e79c3ea5b9 Merge pull request #786 from DingTalk-Real-AI/codex/fix-homebrew-publish-identity
fix(release): use designated Homebrew publisher
2026-07-24 11:34:26 +08:00
修雨 ad2ba15a45 fix(release): use designated Homebrew publisher 2026-07-24 11:23:20 +08:00
修雨 74350b3c7b Merge pull request #784 from DingTalk-Real-AI/codex/simplify-release-pipeline
fix(release): make publication retries seamless
2026-07-24 11:17:01 +08:00
修雨 02f66df599 fix(release): make publication retries seamless 2026-07-24 11:05:14 +08:00
anxb 883f082425 fix(changelog): move HR Brain entry to Unreleased
The HR Brain entry was incorrectly placed in the released
[1.0.55-beta.1] section during merge conflict resolution. Move it
back to ## [Unreleased] ### Added since hrbrain has not shipped yet.
2026-07-24 10:27:08 +08:00
DennisandClaude Opus 4.8 b1e7b43f85 fix(shortcut): fix projection-data-loss silent-empty returns
Several read shortcuts returned an empty list with exit 0 and no error
envelope even though the underlying MCP tool returned data, so agents misread
"no data" and made wrong decisions.

Root causes:
- Container key mismatch: the resolver probed the wrong key —
  processCodeList / values / wikiSpaces / itemList / groupList / recentItems /
  emailAccounts / deptUserList / labelUserList / roles / report_list, plus
  get_org_labels grouped labels[] needing a descend.
- Item fields nested under a VO wrapper, not unwrapped: shiftVO / entityVO /
  userInfo.
- Param exceeded a backend limit: todo +created-todos sent pageSize=50 while
  the backend silently returns empty for pageSize>20; now uses the shared pager
  (pageSize=20).

Affected: contact/oa/wiki/drive/minutes/calendar/attendance/chat/report/smart
resolvers. Every fix ships a guard test that feeds the real backend response
shape (and, for minutes, both the taskUuid and minutesId item shapes) and
asserts the projection is non-empty with a usable id.

scripts/shortcut_real_result.py now compares the upper (projection) output
against the lower (raw backend) layer, and record_real_shortcut_run.py captures
the lower layer in memory (persisting only derived counts, never raw PII) so an
exit-0 empty projection over a non-empty backend is scored as
projection-data-loss instead of real-ok. The Python self-test runs in CI via
test/scripts.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-24 10:07:02 +08:00
anxb 571a096004 feat: 组织大脑修复7 2026-07-24 09:59:08 +08:00
anxb 0d3fef0037 feat: 组织大脑修复6 2026-07-24 09:46:31 +08:00
anxb 72934ddc39 Merge branch 'refs/heads/main' into feat/20260714_hrbrain
# Conflicts:
#	internal/cli/schema_agent_metadata/index.json
#	internal/cli/schema_agent_metadata_audit.json
#	internal/cli/schema_catalog.json
#	internal/cli/schema_hints/runtime-surface-completeness.json
#	skills/mono/SKILL.md
#	test/fixtures/cli-interface-baseline.txt
2026-07-24 09:43:16 +08:00
anxb 5dcf95ce07 Merge remote-tracking branch 'origin/feat/20260714_hrbrain' into feat/20260714_hrbrain 2026-07-23 18:23:35 +08:00
anxb e70b21ae8a Merge branch 'refs/heads/main' into feat/20260714_hrbrain 2026-07-23 18:22:43 +08:00
anxiangbo ad0582ea48 Merge branch 'main' into feat/20260714_hrbrain 2026-07-23 18:10:28 +08:00
anxb 883f397554 feat: 组织大脑修复5 2026-07-23 14:17:22 +08:00
anxb 276d5bcd73 Merge branch 'refs/heads/main' into feat/20260714_hrbrain 2026-07-23 14:08:53 +08:00
anxb 8321f1ffea Merge remote-tracking branch 'upstream/main' into feat/20260714_hrbrain
# Conflicts:
#	internal/cli/schema_agent_metadata/index.json
#	internal/cli/schema_agent_metadata_audit.json
#	internal/cli/schema_catalog.json
#	internal/cli/schema_hints/runtime-surface-completeness.json
#	test/fixtures/cli-interface-baseline.txt
2026-07-23 14:05:24 +08:00
anxb 5bdaad092a feat: 组织大脑修复,add hrbrain command nodes to interface baseline)。 2026-07-23 10:42:11 +08:00
anxb 55cf6cfb71 Merge branch 'refs/heads/main' into feat/20260714_hrbrain
# Conflicts:
#	CHANGELOG.md
2026-07-23 10:38:38 +08:00
anxb 58b4d6f9f4 Merge branch 'refs/heads/main' into feat/20260714_hrbrain 2026-07-22 16:38:40 +08:00
anxb a3478ad587 feat: 组织大脑修复4 2026-07-22 16:31:10 +08:00
anxb 5d1092da73 Merge branch 'refs/heads/main' into feat/20260714_hrbrain 2026-07-22 16:09:29 +08:00
anxb 46fe02f72c feat: 组织大脑修复3 2026-07-22 14:24:14 +08:00
anxb 2dba64b880 feat: 组织大脑修复2 2026-07-22 13:56:13 +08:00
anxb e564c8d923 Merge branch 'refs/heads/main' into feat/20260714_hrbrain
# Conflicts:
#	internal/cli/schema_agent_metadata/index.json
#	internal/cli/schema_agent_metadata_audit.json
#	internal/cli/schema_catalog.json
2026-07-22 11:09:37 +08:00
anxb 2e7e6a1010 feat: 组织大脑修复 2026-07-21 15:07:59 +08:00
anxb f88bc32259 feat: 接入组织大脑5 2026-07-21 10:44:57 +08:00
anxb f3cce5f49b Merge branch 'refs/heads/main' into feat/20260714_hrbrain 2026-07-21 10:37:36 +08:00
anxb 2e389fe27d feat: 接入组织大脑4 2026-07-21 09:57:21 +08:00
anxb dd112a845e feat: 接入组织大脑3 2026-07-20 14:02:44 +08:00
anxb c0cb81c12b Merge branch 'refs/heads/main' into feat/20260714_hrbrain 2026-07-20 09:56:49 +08:00
anxb 2b76047164 Merge branch 'refs/heads/main' into feat/20260714_hrbrain 2026-07-17 14:41:05 +08:00
anxb 241444e992 feat: 接入组织大脑2 2026-07-17 14:20:36 +08:00
anxb 309f833f15 Merge branch 'refs/heads/main' into feat/20260714_hrbrain 2026-07-16 10:19:44 +08:00
anxb 115cce7308 feat: 接入组织大脑 2026-07-16 10:18:05 +08:00
157 changed files with 200195 additions and 1179 deletions
-4
View File
@@ -1,4 +0,0 @@
# Default code owners for all files
# These users will be automatically requested for review on PRs.
* @DingTalk-Real-AI/cli-maintainers
+28 -9
View File
@@ -3,22 +3,41 @@
- What changed?
- Why is this change needed?
## Risk tier
- [ ] Documentation-only: prose/assets only; no executable, generated, workflow,
packaging, or interface behavior changed
- [ ] Standard: ordinary implementation change with a stable package graph
- [ ] High-risk: workflow/policy, package graph, generated Schema/registry,
platform, auth/keychain, installer, packaging, release, transport, recovery,
or another fail-closed infrastructure change
## Verification
For an exact in-place `CHANGELOG.md`-only pull request, the full-suite checks
may be marked `N/A`, but the targeted CHANGELOG check is required. For every
other pull request, mark the targeted check `N/A` and complete the applicable
full-suite checks.
Record the smallest targeted evidence that proves the changed behavior. Do not
repeat the entire CI suite locally only to fill this checklist: CI expands the
selected tier from documentation checks, through affected-package tests, to
the complete high-risk suite.
- [ ] Exact `CHANGELOG.md`-only check (otherwise `N/A`):
- [ ] Exact in-place `CHANGELOG.md`-only check (otherwise `N/A`):
`./scripts/policy/check-changelog-pr.sh --fast-path "$(git merge-base HEAD origin/main)" HEAD`
- [ ] `make build`
- [ ] `make lint`
- [ ] `make test`
- [ ] `make policy`
- [ ] Targeted test/check commands and results:
- [ ] Behavior evidence (test name, CLI output shape, or before/after result):
- [ ] Documentation links/content/rendering checked (documentation-only, otherwise
`N/A`)
- [ ] Full local suite run because the change is high-risk (optional for other
tiers; record command/result or `N/A`)
- [ ] `./scripts/policy/check-generated-drift.sh`
(when generator inputs or generated artifacts may change)
- [ ] `./scripts/policy/check-command-surface.sh --strict` (if command surface changed)
- [ ] `./scripts/release/verify-package-managers.sh`
(after `make package`, if packaging or installer surfaces changed)
## Notes
- Any risks, follow-up work, or intentional scope cuts
The repository automatically requests one eligible peer reviewer, including
after a new head push when another review is needed. Once the latest push has
peer approval and all nine required checks are current and green, auto-merge
completes the PR; authors do not need to coordinate a separate routine merge.
+479 -108
View File
@@ -25,6 +25,12 @@ jobs:
outputs:
changelog_only: ${{ steps.classify.outputs.changelog_only }}
changelog_changed: ${{ steps.classify.outputs.changelog_changed }}
docs_only: ${{ steps.classify.outputs.docs_only }}
full_suite: ${{ steps.classify.outputs.full_suite }}
release_sensitive: ${{ steps.classify.outputs.release_sensitive }}
interface_sensitive: ${{ steps.classify.outputs.interface_sensitive }}
mcp_sensitive: ${{ steps.classify.outputs.mcp_sensitive }}
edition_sensitive: ${{ steps.classify.outputs.edition_sensitive }}
platform_sensitive: ${{ steps.classify.outputs.platform_sensitive }}
steps:
- name: Classify revision scope
@@ -34,10 +40,176 @@ jobs:
script: |
let changelogOnly = false;
let changelogChanged = false;
let docsOnly = false;
let fullSuite = context.eventName === 'push';
let releaseSensitive = context.eventName === 'push';
let interfaceSensitive = context.eventName === 'push';
let mcpSensitive = context.eventName === 'push';
let editionSensitive = context.eventName === 'push';
let platformSensitive = context.eventName === 'push';
let files = [];
let fastPathTrust = 'not evaluated';
const isDocsOnly = (filename) =>
typeof filename === 'string' &&
(
filename === 'CHANGELOG.md' ||
filename === 'README.md' ||
filename === 'README_zh.md' ||
filename === 'CONTRIBUTING.md' ||
filename === 'SECURITY.md' ||
filename === 'CODE_OF_CONDUCT.md' ||
filename === 'LICENSE' ||
filename === 'NOTICE' ||
filename === '.github/PULL_REQUEST_TEMPLATE.md' ||
filename.startsWith('.github/ISSUE_TEMPLATE/') ||
filename.startsWith('docs/')
);
const isReleaseSensitive = (filename) =>
typeof filename === 'string' &&
(
filename.startsWith('scripts/release/') ||
filename.startsWith('scripts/install') ||
filename.startsWith('Formula/') ||
filename.startsWith('build/') ||
filename === '.goreleaser.yaml' ||
filename === '.github/workflows/release.yml' ||
filename === '.github/workflows/withdraw-release.yml'
);
const isPlatformSensitive = (filename) =>
typeof filename === 'string' &&
(
filename.startsWith('internal/auth/') ||
filename.startsWith('internal/keychain/') ||
/_(darwin|windows|linux|unix)(?:_[a-z0-9]+)*\.go$/.test(filename) ||
filename === '.github/workflows/ci.yml' ||
filename ===
'scripts/policy/run-platform-coverage-gate.sh'
);
const isNativeGoChange = ({ filename, previous_filename, patch }) => {
const paths = [filename, previous_filename].filter(
(value) => typeof value === 'string' && value !== ''
);
if (paths.some(isPlatformSensitive)) {
return true;
}
if (!paths.some((value) => value.endsWith('.go'))) {
return false;
}
if (typeof patch !== 'string') {
return true;
}
return (
/\/\/go:build[^\n]*(darwin|windows|linux|unix)/.test(patch) ||
/runtime\.GO(OS|ARCH)/.test(patch)
);
};
const isInterfaceSensitive = (filename) =>
typeof filename === 'string' &&
(
filename.startsWith('cmd/') ||
filename.startsWith('internal/app/') ||
filename.startsWith('internal/cli/') ||
filename.startsWith('internal/cobracmd/') ||
filename.startsWith('internal/helpers/') ||
filename.startsWith('internal/i18n/') ||
filename.startsWith('internal/interfacesnapshot/') ||
filename.startsWith('internal/ir/') ||
filename.startsWith('internal/shortcut/') ||
filename.startsWith('pkg/cmdutil/') ||
filename === 'skills_embed.go' ||
filename === 'test/fixtures/cli-interface-baseline.txt' ||
filename.startsWith('skills/')
);
const isMCPSensitive = (filename) =>
typeof filename === 'string' &&
(
filename.startsWith('internal/mcp') ||
filename.startsWith('internal/transport/') ||
filename.startsWith('internal/helpers/') ||
filename.startsWith('internal/app/') ||
filename.startsWith('test/mock_mcp/')
);
const isEditionSensitive = (filename) =>
typeof filename === 'string' &&
(
filename.startsWith('pkg/edition') ||
filename.startsWith('internal/edition') ||
filename === 'go.mod' ||
filename === 'go.sum'
);
const isHighRisk = (filename) =>
typeof filename === 'string' &&
(
isPlatformSensitive(filename) ||
isReleaseSensitive(filename) ||
filename.startsWith('.github/workflows/') ||
filename === '.github/actionlint.yaml' ||
filename.startsWith('scripts/') ||
filename.startsWith('verify/') ||
filename.startsWith('internal/generator/') ||
filename.startsWith('internal/cli/schema') ||
filename.startsWith('internal/interfacesnapshot/') ||
filename.startsWith('internal/app/upgrade') ||
filename.startsWith('internal/transport/') ||
filename.startsWith('internal/recovery/') ||
filename.startsWith('internal/syncdata/') ||
filename.includes('/testdata/') ||
filename.startsWith('testdata/') ||
filename.startsWith('test/fixtures/') ||
filename === 'Makefile' ||
filename === 'go.mod' ||
filename === 'go.sum'
);
const classifyFiles = (complete) => {
const paths = files.flatMap(({ filename, previous_filename }) =>
[filename, previous_filename].filter(
(value) => typeof value === 'string' && value !== ''
)
);
const structuralChange = files.some(
({ status, previous_filename }) =>
status === 'removed' || Boolean(previous_filename)
);
const goPackageShapeChange = files.some(
({ filename, previous_filename, status }) =>
['added', 'removed'].includes(status) &&
[filename, previous_filename].some(
(value) =>
typeof value === 'string' && value.endsWith('.go')
)
);
docsOnly =
complete &&
files.length > 0 &&
paths.length > 0 &&
paths.every(isDocsOnly);
releaseSensitive =
!complete || paths.some(isReleaseSensitive);
platformSensitive =
!complete || files.some(isNativeGoChange);
interfaceSensitive =
!complete ||
paths.some(isInterfaceSensitive) ||
paths.some(isEditionSensitive);
mcpSensitive =
!complete || paths.some(isMCPSensitive);
editionSensitive =
!complete || paths.some(isEditionSensitive);
fullSuite =
!complete ||
(
!docsOnly &&
(
context.eventName === 'push' ||
structuralChange ||
goPackageShapeChange ||
files.some(isNativeGoChange) ||
paths.some(isHighRisk)
)
);
};
if (context.eventName === 'pull_request') {
const expectedHead = context.payload.pull_request.head.sha;
const expectedBase = context.payload.pull_request.base.sha;
@@ -85,28 +257,14 @@ jobs:
filename === 'CHANGELOG.md' ||
previous_filename === 'CHANGELOG.md'
);
const isPlatformSensitive = (filename) =>
typeof filename === 'string' &&
(
filename.startsWith('internal/auth/') ||
filename.startsWith('internal/keychain/') ||
/_(darwin|windows|linux|unix)\.go$/.test(filename) ||
filename.startsWith('scripts/release/') ||
filename.startsWith('scripts/install') ||
filename.startsWith('Formula/') ||
filename.startsWith('build/npm/') ||
filename === '.goreleaser.yaml' ||
filename === '.github/workflows/release.yml'
);
platformSensitive = files.some(
({ filename, previous_filename }) =>
isPlatformSensitive(filename) ||
isPlatformSensitive(previous_filename)
);
classifyFiles(true);
fastPathTrust = changelogOnly
? 'exact pull-request revision and synthetic merge policy'
: 'full admission required';
: docsOnly
? 'documentation-only focused admission'
: fullSuite
? 'high-risk full admission'
: 'changed-package focused admission';
} else if (context.eventName === 'push') {
const expectedBefore = context.payload.before;
const expectedAfter = context.payload.after;
@@ -136,6 +294,7 @@ jobs:
per_page: 100,
});
files = Array.isArray(comparison.files) ? comparison.files : [];
classifyFiles(files.length < 300);
const linearFromValidatedTip =
comparison.status === 'ahead' &&
comparison.merge_base_commit?.sha === expectedBefore &&
@@ -217,12 +376,24 @@ jobs:
core.setOutput('changelog_only', String(changelogOnly));
core.setOutput('changelog_changed', String(changelogChanged));
core.setOutput('docs_only', String(docsOnly));
core.setOutput('full_suite', String(fullSuite));
core.setOutput('release_sensitive', String(releaseSensitive));
core.setOutput('interface_sensitive', String(interfaceSensitive));
core.setOutput('mcp_sensitive', String(mcpSensitive));
core.setOutput('edition_sensitive', String(editionSensitive));
core.setOutput('platform_sensitive', String(platformSensitive));
await core.summary
.addHeading('Code Admission scope')
.addRaw(`- Event: \`${context.eventName}\`\n`)
.addRaw(`- Exact modified CHANGELOG only: \`${changelogOnly}\`\n`)
.addRaw(`- CHANGELOG touched: \`${changelogChanged}\`\n`)
.addRaw(`- Documentation-only: \`${docsOnly}\`\n`)
.addRaw(`- Full suite: \`${fullSuite}\`\n`)
.addRaw(`- Release-sensitive: \`${releaseSensitive}\`\n`)
.addRaw(`- Interface-sensitive: \`${interfaceSensitive}\`\n`)
.addRaw(`- MCP-sensitive: \`${mcpSensitive}\`\n`)
.addRaw(`- Edition-sensitive: \`${editionSensitive}\`\n`)
.addRaw(`- Native-platform risk paths touched: \`${platformSensitive}\`\n`)
.addRaw(`- Changed files: \`${files.length}\`\n`)
.addRaw(`- Fast-path trust: ${fastPathTrust}\n`)
@@ -232,36 +403,92 @@ jobs:
if: steps.classify.outputs.changelog_only == 'true'
run: echo "Lint is satisfied by the trusted CHANGELOG-only Policy path." >> "$GITHUB_STEP_SUMMARY"
- name: Record documentation-only fast path
if: steps.classify.outputs.changelog_only != 'true' && steps.classify.outputs.docs_only == 'true'
run: echo "Lint is satisfied by the non-executable documentation scope." >> "$GITHUB_STEP_SUMMARY"
- name: Check out repository
if: steps.classify.outputs.changelog_only != 'true'
if: steps.classify.outputs.changelog_only != 'true' && steps.classify.outputs.docs_only != 'true'
uses: actions/checkout@v4
- name: Set up Go
if: steps.classify.outputs.changelog_only != 'true'
if: steps.classify.outputs.changelog_only != 'true' && steps.classify.outputs.docs_only != 'true'
uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: Verify Test Package Plan
if: steps.classify.outputs.changelog_only != 'true'
if: steps.classify.outputs.changelog_only != 'true' && steps.classify.outputs.docs_only != 'true'
run: make test-plan
- name: Format Check
if: steps.classify.outputs.changelog_only != 'true'
if: steps.classify.outputs.changelog_only != 'true' && steps.classify.outputs.docs_only != 'true'
run: make format-check
- name: Go Vet
if: steps.classify.outputs.changelog_only != 'true'
if: steps.classify.outputs.changelog_only != 'true' && steps.classify.outputs.docs_only != 'true'
run: go vet ./...
- name: Check GitHub Actions workflows
if: steps.classify.outputs.changelog_only != 'true'
if: steps.classify.outputs.changelog_only != 'true' && steps.classify.outputs.docs_only != 'true'
run: go run github.com/rhysd/actionlint/cmd/actionlint@v1.7.12
test-focused:
name: Test (changed packages)
needs: lint
if: ${{ needs.lint.outputs.changelog_only != 'true' && needs.lint.outputs.docs_only != 'true' && needs.lint.outputs.full_suite != 'true' }}
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Check out repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Verify authoritative synthetic merge
env:
PR_BASE_SHA: ${{ github.event.pull_request.base.sha }}
PR_HEAD_SHA: ${{ github.event.pull_request.head.sha }}
run: |
set -eu
test "$(git rev-parse HEAD^1)" = "$PR_BASE_SHA" || {
echo "focused test merge first parent does not match event base" >&2
exit 1
}
test "$(git rev-parse HEAD^2)" = "$PR_HEAD_SHA" || {
echo "focused test merge second parent does not match event head" >&2
exit 1
}
echo "TEST_BASE_REF=$PR_BASE_SHA" >> "$GITHUB_ENV"
echo "TEST_HEAD_REF=$(git rev-parse HEAD)" >> "$GITHUB_ENV"
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: Test changed packages and reverse dependencies
shell: bash
env:
DWS_PACKAGE_VERSION: 0.0.0-test
run: |
set -euo pipefail
package_output="$(
./scripts/ci/changed-test-packages.sh \
list "$TEST_BASE_REF" "$TEST_HEAD_REF"
)"
if [ -z "$package_output" ]; then
echo "No buildable Go package is affected by this revision." \
>> "$GITHUB_STEP_SUMMARY"
exit 0
fi
mapfile -t packages <<< "$package_output"
go test -v -race -count=1 -timeout=8m "${packages[@]}"
test-race:
name: "Test (race: ${{ matrix.shard }})"
needs: lint
if: ${{ needs.lint.outputs.changelog_only != 'true' }}
if: ${{ needs.lint.outputs.changelog_only != 'true' && needs.lint.outputs.docs_only != 'true' && needs.lint.outputs.full_suite == 'true' }}
runs-on: ubuntu-latest
timeout-minutes: 15
strategy:
@@ -299,9 +526,9 @@ jobs:
go test -v -race -count=1 -timeout=10m "${packages[@]}"
test-release-scripts:
name: Test (release scripts)
name: Test (workflow and release contracts)
needs: lint
if: ${{ needs.lint.outputs.changelog_only != 'true' }}
if: ${{ needs.lint.outputs.changelog_only != 'true' && needs.lint.outputs.docs_only != 'true' && (needs.lint.outputs.full_suite == 'true' || needs.lint.outputs.release_sensitive == 'true') }}
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
@@ -331,7 +558,7 @@ jobs:
test-cross-platform:
name: Test (cross-platform compile)
needs: lint
if: ${{ needs.lint.outputs.changelog_only != 'true' }}
if: ${{ needs.lint.outputs.changelog_only != 'true' && needs.lint.outputs.docs_only != 'true' }}
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
@@ -363,6 +590,7 @@ jobs:
name: Test
needs:
- lint
- test-focused
- test-race
- test-release-scripts
- test-cross-platform
@@ -376,7 +604,10 @@ jobs:
- name: Verify test shards
env:
CHANGELOG_ONLY: ${{ needs.lint.outputs.changelog_only }}
PLATFORM_SENSITIVE: ${{ needs.lint.outputs.platform_sensitive }}
DOCS_ONLY: ${{ needs.lint.outputs.docs_only }}
FULL_SUITE: ${{ needs.lint.outputs.full_suite }}
RELEASE_SENSITIVE: ${{ needs.lint.outputs.release_sensitive }}
FOCUSED_RESULT: ${{ needs.test-focused.result }}
RACE_RESULT: ${{ needs.test-race.result }}
RELEASE_SCRIPTS_RESULT: ${{ needs.test-release-scripts.result }}
CROSS_PLATFORM_RESULT: ${{ needs.test-cross-platform.result }}
@@ -384,8 +615,9 @@ jobs:
WINDOWS_RESULT: ${{ needs.test-windows.result }}
run: |
failed=0
if [ "$CHANGELOG_ONLY" = true ]; then
if [ "$CHANGELOG_ONLY" = true ] || [ "$DOCS_ONLY" = true ]; then
for shard in \
"changed packages:$FOCUSED_RESULT" \
"race shards:$RACE_RESULT" \
"release scripts:$RELEASE_SCRIPTS_RESULT" \
"cross-platform compile:$CROSS_PLATFORM_RESULT" \
@@ -403,21 +635,34 @@ jobs:
exit
fi
focused_expected=success
race_expected=skipped
if [ "$FULL_SUITE" = true ]; then
focused_expected=skipped
race_expected=success
fi
release_expected=skipped
if [ "$FULL_SUITE" = true ] || [ "$RELEASE_SENSITIVE" = true ]; then
release_expected=success
fi
for shard in \
"race shards:$RACE_RESULT" \
"release scripts:$RELEASE_SCRIPTS_RESULT" \
"cross-platform compile:$CROSS_PLATFORM_RESULT"
"changed packages:$FOCUSED_RESULT:$focused_expected" \
"race shards:$RACE_RESULT:$race_expected" \
"release scripts:$RELEASE_SCRIPTS_RESULT:$release_expected" \
"cross-platform compile:$CROSS_PLATFORM_RESULT:success"
do
name="${shard%%:*}"
result="${shard#*:}"
printf '%s: %s\n' "$name" "$result"
if [ "$result" != "success" ]; then
remainder="${shard#*:}"
result="${remainder%%:*}"
expected="${remainder#*:}"
printf '%s: %s (expected %s)\n' "$name" "$result" "$expected"
if [ "$result" != "$expected" ]; then
failed=1
fi
done
native_expected=skipped
if [ "$PLATFORM_SENSITIVE" = true ]; then
if [ "$FULL_SUITE" = true ]; then
native_expected=success
fi
for native in \
@@ -436,7 +681,7 @@ jobs:
test-darwin:
name: Test (macOS auth/keychain)
needs: lint
if: ${{ needs.lint.outputs.changelog_only != 'true' && needs.lint.outputs.platform_sensitive == 'true' }}
if: ${{ needs.lint.outputs.changelog_only != 'true' && needs.lint.outputs.docs_only != 'true' && needs.lint.outputs.full_suite == 'true' }}
runs-on: macos-latest
timeout-minutes: 15
steps:
@@ -454,7 +699,7 @@ jobs:
test-windows:
name: Test (Windows)
needs: lint
if: ${{ needs.lint.outputs.changelog_only != 'true' && needs.lint.outputs.platform_sensitive == 'true' }}
if: ${{ needs.lint.outputs.changelog_only != 'true' && needs.lint.outputs.docs_only != 'true' && needs.lint.outputs.full_suite == 'true' }}
runs-on: windows-latest
timeout-minutes: 15
steps:
@@ -568,13 +813,14 @@ jobs:
coverage-current:
name: Coverage (current)
needs: lint
if: ${{ needs.lint.outputs.changelog_only != 'true' }}
if: ${{ needs.lint.outputs.changelog_only != 'true' && needs.lint.outputs.docs_only != 'true' }}
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- name: Check out repository
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
- name: Set up Go
@@ -583,15 +829,69 @@ jobs:
go-version-file: go.mod
- name: Install archive tooling
if: needs.lint.outputs.full_suite == 'true'
run: sudo apt-get update && sudo apt-get install -y zip unzip
- name: Resolve authoritative coverage base
env:
PR_HEAD_SHA: ${{ github.event.pull_request.head.sha }}
PR_BASE_SHA: ${{ github.event.pull_request.base.sha }}
PUSH_BEFORE_SHA: ${{ github.event.before }}
run: |
set -eu
base_ref="$PUSH_BEFORE_SHA"
if [ "$GITHUB_EVENT_NAME" = "pull_request" ]; then
base_ref="$(git merge-base "$PR_HEAD_SHA" "$PR_BASE_SHA")"
fi
if [ -z "$base_ref" ] || [ "$base_ref" = "0000000000000000000000000000000000000000" ]; then
base_ref="$(git rev-parse HEAD^)"
fi
git rev-parse --verify "${base_ref}^{commit}" >/dev/null
echo "COVERAGE_BASE_REF=$base_ref" >> "$GITHUB_ENV"
echo "COVERAGE_HEAD_REF=$(git rev-parse HEAD)" >> "$GITHUB_ENV"
- name: Build
run: make build
- name: Run current unit tests with coverage
shell: bash
env:
DWS_PACKAGE_VERSION: 0.0.0-test
FULL_SUITE: ${{ needs.lint.outputs.full_suite }}
run: |
go test -count=1 -p 1 -coverprofile=coverage.txt -covermode=atomic ./ ./cmd/... ./internal/... ./skills/...
go tool cover -func=coverage.txt
set -euo pipefail
if [ "$FULL_SUITE" = true ]; then
go test -count=1 -p 1 \
-coverprofile=coverage.txt \
-covermode=atomic \
./ ./cmd/... ./internal/... ./skills/...
else
changed_output="$(
./scripts/ci/changed-test-packages.sh \
changed "$COVERAGE_BASE_REF" "$COVERAGE_HEAD_REF"
)"
impacted_output="$(
./scripts/ci/changed-test-packages.sh \
list "$COVERAGE_BASE_REF" "$COVERAGE_HEAD_REF"
)"
if [ -z "$changed_output" ] || [ -z "$impacted_output" ]; then
printf 'mode: atomic\n' > coverage.txt
echo "No buildable Go package needs scoped coverage." \
>> "$GITHUB_STEP_SUMMARY"
else
mapfile -t changed_packages <<< "$changed_output"
mapfile -t impacted_packages <<< "$impacted_output"
coverpkg="$(IFS=,; echo "${changed_packages[*]}")"
go test -count=1 -p 1 \
-coverpkg="$coverpkg" \
-coverprofile=coverage.txt \
-covermode=atomic \
"${impacted_packages[@]}"
fi
fi
if [ "$(wc -l < coverage.txt)" -gt 1 ]; then
go tool cover -func=coverage.txt
fi
- name: Upload current coverage profile
uses: actions/upload-artifact@v4
@@ -603,7 +903,7 @@ jobs:
coverage-supporting:
name: Coverage (supporting)
needs: lint
if: ${{ needs.lint.outputs.changelog_only != 'true' }}
if: ${{ needs.lint.outputs.changelog_only != 'true' && needs.lint.outputs.docs_only != 'true' && needs.lint.outputs.full_suite == 'true' }}
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
@@ -642,7 +942,7 @@ jobs:
coverage-baseline:
name: Coverage (baseline)
needs: lint
if: ${{ needs.lint.outputs.changelog_only != 'true' }}
if: ${{ needs.lint.outputs.changelog_only != 'true' && needs.lint.outputs.docs_only != 'true' }}
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
@@ -658,6 +958,7 @@ jobs:
go-version-file: go.mod
- name: Install archive tooling
if: needs.lint.outputs.full_suite == 'true'
run: sudo apt-get update && sudo apt-get install -y zip unzip
- name: Resolve authoritative coverage base
@@ -678,8 +979,24 @@ jobs:
echo "COVERAGE_BASE_REF=$base_ref" >> "$GITHUB_ENV"
- name: Run baseline unit tests with coverage
shell: bash
env:
DWS_PACKAGE_VERSION: 0.0.0-test
FULL_SUITE: ${{ needs.lint.outputs.full_suite }}
run: |
set -eu
set -euo pipefail
changed_output=
impacted_output=
if [ "$FULL_SUITE" != true ]; then
changed_output="$(
./scripts/ci/changed-test-packages.sh \
changed "$COVERAGE_BASE_REF" HEAD
)"
impacted_output="$(
./scripts/ci/changed-test-packages.sh \
list "$COVERAGE_BASE_REF" HEAD
)"
fi
base_worktree="$(mktemp -d "${RUNNER_TEMP}/dws-coverage-base.XXXXXX")"
rmdir "$base_worktree"
cleanup() {
@@ -689,11 +1006,25 @@ jobs:
git worktree add --detach "$base_worktree" "$COVERAGE_BASE_REF"
(
cd "$base_worktree"
go test -count=1 \
-p 1 \
-coverprofile="$GITHUB_WORKSPACE/coverage-base.txt" \
-covermode=atomic \
./ ./cmd/... ./internal/... ./skills/...
if [ "$FULL_SUITE" = true ]; then
go test -count=1 \
-p 1 \
-coverprofile="$GITHUB_WORKSPACE/coverage-base.txt" \
-covermode=atomic \
./ ./cmd/... ./internal/... ./skills/...
elif [ -z "$changed_output" ] || [ -z "$impacted_output" ]; then
printf 'mode: atomic\n' > "$GITHUB_WORKSPACE/coverage-base.txt"
else
mapfile -t changed_packages <<< "$changed_output"
mapfile -t impacted_packages <<< "$impacted_output"
coverpkg="$(IFS=,; echo "${changed_packages[*]}")"
go test -count=1 \
-p 1 \
-coverpkg="$coverpkg" \
-coverprofile="$GITHUB_WORKSPACE/coverage-base.txt" \
-covermode=atomic \
"${impacted_packages[@]}"
fi
)
- name: Upload baseline coverage profile
@@ -719,6 +1050,8 @@ jobs:
- name: Verify coverage profile jobs
env:
CHANGELOG_ONLY: ${{ needs.lint.outputs.changelog_only }}
DOCS_ONLY: ${{ needs.lint.outputs.docs_only }}
FULL_SUITE: ${{ needs.lint.outputs.full_suite }}
PLATFORM_SENSITIVE: ${{ needs.lint.outputs.platform_sensitive }}
CURRENT_RESULT: ${{ needs.coverage-current.result }}
SUPPORTING_RESULT: ${{ needs.coverage-supporting.result }}
@@ -727,22 +1060,32 @@ jobs:
WINDOWS_RESULT: ${{ needs.coverage-windows.result }}
run: |
failed=0
expected=success
current_expected=success
supporting_expected=skipped
baseline_expected=success
native_expected=skipped
if [ "$CHANGELOG_ONLY" = true ]; then
expected=skipped
elif [ "$PLATFORM_SENSITIVE" = true ]; then
if [ "$CHANGELOG_ONLY" = true ] || [ "$DOCS_ONLY" = true ]; then
current_expected=skipped
baseline_expected=skipped
elif [ "$FULL_SUITE" = true ]; then
supporting_expected=success
fi
if [ "$CHANGELOG_ONLY" != true ] &&
[ "$DOCS_ONLY" != true ] &&
[ "$PLATFORM_SENSITIVE" = true ]; then
native_expected=success
fi
for profile in \
"current:$CURRENT_RESULT" \
"supporting:$SUPPORTING_RESULT" \
"baseline:$BASELINE_RESULT"
"current:$CURRENT_RESULT:$current_expected" \
"supporting:$SUPPORTING_RESULT:$supporting_expected" \
"baseline:$BASELINE_RESULT:$baseline_expected"
do
name="${profile%%:*}"
result="${profile#*:}"
printf '%s: %s\n' "$name" "$result"
remainder="${profile#*:}"
result="${remainder%%:*}"
expected="${remainder#*:}"
printf '%s: %s (expected %s)\n' "$name" "$result" "$expected"
if [ "$result" != "$expected" ]; then
failed=1
fi
@@ -754,10 +1097,8 @@ jobs:
do
name="${native%%:*}"
result="${native#*:}"
printf '%s: %s\n' "$name" "$result"
if [ "$CHANGELOG_ONLY" = true ]; then
native_expected=skipped
fi
printf '%s: %s (expected %s)\n' \
"$name" "$result" "$native_expected"
if [ "$result" != "$native_expected" ]; then
failed=1
fi
@@ -765,20 +1106,20 @@ jobs:
test "$failed" -eq 0
- name: Check out repository
if: needs.lint.outputs.changelog_only != 'true'
if: needs.lint.outputs.changelog_only != 'true' && needs.lint.outputs.docs_only != 'true'
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
- name: Set up Go
if: needs.lint.outputs.changelog_only != 'true'
if: needs.lint.outputs.changelog_only != 'true' && needs.lint.outputs.docs_only != 'true'
uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: Resolve authoritative coverage base
if: needs.lint.outputs.changelog_only != 'true'
if: needs.lint.outputs.changelog_only != 'true' && needs.lint.outputs.docs_only != 'true'
env:
PR_HEAD_SHA: ${{ github.event.pull_request.head.sha }}
PR_BASE_SHA: ${{ github.event.pull_request.base.sha }}
@@ -796,40 +1137,52 @@ jobs:
echo "COVERAGE_BASE_REF=$base_ref" >> "$GITHUB_ENV"
- name: Download current coverage profile
if: needs.lint.outputs.changelog_only != 'true'
if: needs.lint.outputs.changelog_only != 'true' && needs.lint.outputs.docs_only != 'true'
uses: actions/download-artifact@v4
with:
name: coverage-current-profile
path: .
- name: Download supporting coverage profiles
if: needs.lint.outputs.changelog_only != 'true'
if: needs.lint.outputs.changelog_only != 'true' && needs.lint.outputs.docs_only != 'true' && needs.lint.outputs.full_suite == 'true'
uses: actions/download-artifact@v4
with:
name: coverage-supporting-profiles
path: .
- name: Download baseline coverage profile
if: needs.lint.outputs.changelog_only != 'true'
if: needs.lint.outputs.changelog_only != 'true' && needs.lint.outputs.docs_only != 'true'
uses: actions/download-artifact@v4
with:
name: coverage-baseline-profile
path: .
- name: Enforce coverage gate
if: needs.lint.outputs.changelog_only != 'true'
if: needs.lint.outputs.changelog_only != 'true' && needs.lint.outputs.docs_only != 'true'
env:
COVERAGE_TARGET: "100"
COVERAGE_ENFORCE_OVERALL: "false"
COVERAGE_OVERALL_TOLERANCE: "0"
run: COVERAGE_ADDITIONAL_DIFF_PROFILE=coverage-shortcut.txt make coverage-gate BASE_REF="$COVERAGE_BASE_REF"
run: |
additional_profile=
if [ -f coverage-shortcut.txt ]; then
additional_profile=coverage-shortcut.txt
fi
COVERAGE_ADDITIONAL_DIFF_PROFILE="$additional_profile" \
make coverage-gate BASE_REF="$COVERAGE_BASE_REF"
- name: Generate coverage report
if: needs.lint.outputs.changelog_only != 'true'
run: go tool cover -html=coverage.txt -o coverage.html
if: needs.lint.outputs.changelog_only != 'true' && needs.lint.outputs.docs_only != 'true'
run: |
if [ "$(wc -l < coverage.txt)" -gt 1 ]; then
go tool cover -html=coverage.txt -o coverage.html
else
echo "No buildable Go package needed a coverage HTML report." \
>> "$GITHUB_STEP_SUMMARY"
fi
- name: Upload coverage artifact
if: needs.lint.outputs.changelog_only != 'true'
if: needs.lint.outputs.changelog_only != 'true' && needs.lint.outputs.docs_only != 'true'
uses: actions/upload-artifact@v4
with:
name: coverage-report
@@ -839,6 +1192,7 @@ jobs:
coverage-policy.txt
coverage-shortcut.txt
coverage.html
if-no-files-found: error
policy:
name: Policy
@@ -852,7 +1206,7 @@ jobs:
fetch-depth: 0
- name: Set up Go
if: needs.lint.outputs.changelog_only != 'true'
if: ${{ needs.lint.outputs.changelog_only != 'true' && needs.lint.outputs.docs_only != 'true' && (needs.lint.outputs.full_suite == 'true' || needs.lint.outputs.interface_sensitive == 'true') }}
uses: actions/setup-go@v5
with:
go-version-file: go.mod
@@ -930,12 +1284,29 @@ jobs:
echo "Only the trusted base-equivalent CHANGELOG validator ran; executable sources are unchanged." \
>> "$GITHUB_STEP_SUMMARY"
- name: Validate scoped policy
if: ${{ needs.lint.outputs.changelog_only != 'true' && (needs.lint.outputs.docs_only == 'true' || (needs.lint.outputs.full_suite != 'true' && needs.lint.outputs.interface_sensitive != 'true')) }}
env:
PR_BASE_SHA: ${{ github.event.pull_request.base.sha }}
PUSH_BEFORE_SHA: ${{ github.event.before }}
run: |
set -eu
base_ref="$PUSH_BEFORE_SHA"
if [ "$GITHUB_EVENT_NAME" = "pull_request" ]; then
base_ref="$PR_BASE_SHA"
fi
git rev-parse --verify "${base_ref}^{commit}" >/dev/null
git diff --check "$base_ref" HEAD
./scripts/policy/check-open-source-assets.sh
echo "Policy used the scoped content/source admission path." \
>> "$GITHUB_STEP_SUMMARY"
- name: Build
if: needs.lint.outputs.changelog_only != 'true'
if: ${{ needs.lint.outputs.changelog_only != 'true' && needs.lint.outputs.docs_only != 'true' && (needs.lint.outputs.full_suite == 'true' || needs.lint.outputs.interface_sensitive == 'true') }}
run: make build
- name: Policy
if: needs.lint.outputs.changelog_only != 'true'
if: ${{ needs.lint.outputs.changelog_only != 'true' && needs.lint.outputs.docs_only != 'true' && (needs.lint.outputs.full_suite == 'true' || needs.lint.outputs.interface_sensitive == 'true') }}
run: make policy
interface-integrity:
@@ -945,24 +1316,24 @@ jobs:
timeout-minutes: 15
steps:
- name: Check out repository
if: needs.lint.outputs.changelog_only != 'true'
if: ${{ needs.lint.outputs.changelog_only != 'true' && needs.lint.outputs.docs_only != 'true' && (needs.lint.outputs.full_suite == 'true' || needs.lint.outputs.interface_sensitive == 'true') }}
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
- name: Set up Go
if: needs.lint.outputs.changelog_only != 'true'
if: ${{ needs.lint.outputs.changelog_only != 'true' && needs.lint.outputs.docs_only != 'true' && (needs.lint.outputs.full_suite == 'true' || needs.lint.outputs.interface_sensitive == 'true') }}
uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: Build
if: needs.lint.outputs.changelog_only != 'true'
if: ${{ needs.lint.outputs.changelog_only != 'true' && needs.lint.outputs.docs_only != 'true' && (needs.lint.outputs.full_suite == 'true' || needs.lint.outputs.interface_sensitive == 'true') }}
run: make build
- name: Resolve authoritative compatibility merge-base
if: needs.lint.outputs.changelog_only != 'true'
if: ${{ needs.lint.outputs.changelog_only != 'true' && needs.lint.outputs.docs_only != 'true' && (needs.lint.outputs.full_suite == 'true' || needs.lint.outputs.interface_sensitive == 'true') }}
env:
PR_HEAD_SHA: ${{ github.event.pull_request.head.sha }}
PR_BASE_SHA: ${{ github.event.pull_request.base.sha }}
@@ -987,7 +1358,7 @@ jobs:
echo "COMPATIBILITY_STABLE_REF=$stable_ref" >> "$GITHUB_ENV"
- name: Check historical commands and help compatibility
if: needs.lint.outputs.changelog_only != 'true'
if: ${{ needs.lint.outputs.changelog_only != 'true' && needs.lint.outputs.docs_only != 'true' && (needs.lint.outputs.full_suite == 'true' || needs.lint.outputs.interface_sensitive == 'true') }}
run: |
make authoritative-interface-integrity \
BASE_REF="$COMPATIBILITY_BASE_REF"
@@ -997,16 +1368,16 @@ jobs:
fi
- name: Check complete Schema compatibility
if: needs.lint.outputs.changelog_only != 'true'
if: ${{ needs.lint.outputs.changelog_only != 'true' && needs.lint.outputs.docs_only != 'true' && (needs.lint.outputs.full_suite == 'true' || needs.lint.outputs.interface_sensitive == 'true') }}
run: make schema-compatibility BASE_REF="$COMPATIBILITY_BASE_REF"
- name: Check skill command references
if: needs.lint.outputs.changelog_only != 'true'
if: ${{ needs.lint.outputs.changelog_only != 'true' && needs.lint.outputs.docs_only != 'true' && (needs.lint.outputs.full_suite == 'true' || needs.lint.outputs.interface_sensitive == 'true') }}
run: make skill-command-integrity
- name: Record CHANGELOG-only fast path
if: needs.lint.outputs.changelog_only == 'true'
run: echo "Interface Integrity is unaffected by an exact CHANGELOG-only diff." >> "$GITHUB_STEP_SUMMARY"
- name: Record scoped fast path
if: ${{ needs.lint.outputs.changelog_only == 'true' || needs.lint.outputs.docs_only == 'true' || (needs.lint.outputs.full_suite != 'true' && needs.lint.outputs.interface_sensitive != 'true') }}
run: echo "Interface Integrity is unaffected by this classified revision." >> "$GITHUB_STEP_SUMMARY"
cli-smoke:
name: CLI Smoke
@@ -1015,26 +1386,26 @@ jobs:
timeout-minutes: 10
steps:
- name: Check out repository
if: needs.lint.outputs.changelog_only != 'true'
if: ${{ needs.lint.outputs.changelog_only != 'true' && needs.lint.outputs.docs_only != 'true' && (needs.lint.outputs.full_suite == 'true' || needs.lint.outputs.interface_sensitive == 'true') }}
uses: actions/checkout@v4
- name: Set up Go
if: needs.lint.outputs.changelog_only != 'true'
if: ${{ needs.lint.outputs.changelog_only != 'true' && needs.lint.outputs.docs_only != 'true' && (needs.lint.outputs.full_suite == 'true' || needs.lint.outputs.interface_sensitive == 'true') }}
uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: Build
if: needs.lint.outputs.changelog_only != 'true'
if: ${{ needs.lint.outputs.changelog_only != 'true' && needs.lint.outputs.docs_only != 'true' && (needs.lint.outputs.full_suite == 'true' || needs.lint.outputs.interface_sensitive == 'true') }}
run: make build
- name: Check public top-level commands
if: needs.lint.outputs.changelog_only != 'true'
if: ${{ needs.lint.outputs.changelog_only != 'true' && needs.lint.outputs.docs_only != 'true' && (needs.lint.outputs.full_suite == 'true' || needs.lint.outputs.interface_sensitive == 'true') }}
run: make cli-smoke
- name: Record CHANGELOG-only fast path
if: needs.lint.outputs.changelog_only == 'true'
run: echo "CLI Smoke is unaffected by an exact CHANGELOG-only diff." >> "$GITHUB_STEP_SUMMARY"
- name: Record scoped fast path
if: ${{ needs.lint.outputs.changelog_only == 'true' || needs.lint.outputs.docs_only == 'true' || (needs.lint.outputs.full_suite != 'true' && needs.lint.outputs.interface_sensitive != 'true') }}
run: echo "CLI Smoke is unaffected by this classified revision." >> "$GITHUB_STEP_SUMMARY"
mock-mcp-smoke:
name: Mock MCP
@@ -1043,22 +1414,22 @@ jobs:
timeout-minutes: 10
steps:
- name: Check out repository
if: needs.lint.outputs.changelog_only != 'true'
if: ${{ needs.lint.outputs.changelog_only != 'true' && needs.lint.outputs.docs_only != 'true' && (needs.lint.outputs.full_suite == 'true' || needs.lint.outputs.mcp_sensitive == 'true') }}
uses: actions/checkout@v4
- name: Set up Go
if: needs.lint.outputs.changelog_only != 'true'
if: ${{ needs.lint.outputs.changelog_only != 'true' && needs.lint.outputs.docs_only != 'true' && (needs.lint.outputs.full_suite == 'true' || needs.lint.outputs.mcp_sensitive == 'true') }}
uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: Check HTTP and stdio MCP transport
if: needs.lint.outputs.changelog_only != 'true'
if: ${{ needs.lint.outputs.changelog_only != 'true' && needs.lint.outputs.docs_only != 'true' && (needs.lint.outputs.full_suite == 'true' || needs.lint.outputs.mcp_sensitive == 'true') }}
run: make mock-mcp-smoke
- name: Record CHANGELOG-only fast path
if: needs.lint.outputs.changelog_only == 'true'
run: echo "Mock MCP is unaffected by an exact CHANGELOG-only diff." >> "$GITHUB_STEP_SUMMARY"
- name: Record scoped fast path
if: ${{ needs.lint.outputs.changelog_only == 'true' || needs.lint.outputs.docs_only == 'true' || (needs.lint.outputs.full_suite != 'true' && needs.lint.outputs.mcp_sensitive != 'true') }}
run: echo "Mock MCP is unaffected by this classified revision." >> "$GITHUB_STEP_SUMMARY"
edition-tests:
name: Edition
@@ -1067,19 +1438,19 @@ jobs:
timeout-minutes: 10
steps:
- name: Check out repository
if: needs.lint.outputs.changelog_only != 'true'
if: ${{ needs.lint.outputs.changelog_only != 'true' && needs.lint.outputs.docs_only != 'true' && (needs.lint.outputs.full_suite == 'true' || needs.lint.outputs.edition_sensitive == 'true') }}
uses: actions/checkout@v4
- name: Set up Go
if: needs.lint.outputs.changelog_only != 'true'
if: ${{ needs.lint.outputs.changelog_only != 'true' && needs.lint.outputs.docs_only != 'true' && (needs.lint.outputs.full_suite == 'true' || needs.lint.outputs.edition_sensitive == 'true') }}
uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: Run edition contract tests
if: needs.lint.outputs.changelog_only != 'true'
if: ${{ needs.lint.outputs.changelog_only != 'true' && needs.lint.outputs.docs_only != 'true' && (needs.lint.outputs.full_suite == 'true' || needs.lint.outputs.edition_sensitive == 'true') }}
run: go test -v -count=1 ./pkg/editiontest/...
- name: Record CHANGELOG-only fast path
if: needs.lint.outputs.changelog_only == 'true'
run: echo "Edition is unaffected by an exact CHANGELOG-only diff." >> "$GITHUB_STEP_SUMMARY"
- name: Record scoped fast path
if: ${{ needs.lint.outputs.changelog_only == 'true' || needs.lint.outputs.docs_only == 'true' || (needs.lint.outputs.full_suite != 'true' && needs.lint.outputs.edition_sensitive != 'true') }}
run: echo "Edition is unaffected by this classified revision." >> "$GITHUB_STEP_SUMMARY"
+44 -1
View File
@@ -14,6 +14,11 @@ on:
schedule:
- cron: '0 18 * * *'
workflow_dispatch:
inputs:
sync_release_version:
description: "Sync a specific release version's assets to Gitee (e.g. v1.0.55-beta.3)"
required: false
type: string
concurrency:
group: gitee-code-mirror
@@ -23,7 +28,6 @@ jobs:
mirror:
runs-on: ubuntu-latest
if: ${{ github.ref_name == github.event.repository.default_branch && github.repository_owner == 'DingTalk-Real-AI' }}
# GitHub Actions 不允许在 job-level if 直接引用 secrets,故先用 env 暴露再在 step 守卫。
env:
GITEE_TOKEN: ${{ secrets.GITEE_TOKEN }}
GITEE_USER: ${{ secrets.GITEE_USER }}
@@ -76,3 +80,42 @@ jobs:
# main 镜像对齐;release tag 由 release.yml 单独校验后创建,禁止在这里 force。
git push --force "$REMOTE" 'gitee-main:refs/heads/main'
echo "✅ 已镜像 main(含 Gitee README 本地化)到 Gitee ${GITEE_REPO}"
- name: Download GitHub Release assets
if: ${{ inputs.sync_release_version != '' }}
env:
VERSION: ${{ inputs.sync_release_version }}
GH_TOKEN: ${{ github.token }}
run: |
set -eu
echo "📥 Downloading release assets for ${VERSION}"
mkdir -p dist
gh release download "$VERSION" \
--repo "$GITHUB_REPOSITORY" \
--dir dist \
--pattern 'dws-*' \
--pattern 'checksums.txt' \
--clobber
ls -la dist/
- name: Verify release artifacts
if: ${{ inputs.sync_release_version != '' }}
env:
VERSION: ${{ inputs.sync_release_version }}
run: |
set -eu
DWS_PACKAGE_DIST_DIR="$GITHUB_WORKSPACE/dist" \
./scripts/release/verify-release-artifacts.sh "$VERSION"
- name: Sync release assets to Gitee
if: ${{ inputs.sync_release_version != '' }}
env:
VERSION: ${{ inputs.sync_release_version }}
GITEE_TOKEN: ${{ secrets.GITEE_TOKEN }}
GITEE_USER: ${{ secrets.GITEE_USER }}
GITEE_REPO: ${{ secrets.GITEE_REPO }}
DIST_DIR: ${{ github.workspace }}/dist
run: |
set -eu
echo "📦 Syncing release assets for ${VERSION} to Gitee ${GITEE_REPO}"
./scripts/release/sync-to-gitee.sh
+522 -168
View File
@@ -2,9 +2,6 @@ name: Release
run-name: ${{ github.event_name == 'workflow_dispatch' && inputs.release_operation != 'none' && format('Release {0} {1} ({2})', inputs.release_operation, inputs.release_channel, inputs.release_bump) || github.event_name == 'workflow_dispatch' && inputs.governance_preflight_nonce != '' && format('Release governance preflight {0}', inputs.governance_preflight_nonce) || github.event_name == 'workflow_dispatch' && inputs.recover_release_version != '' && format('Release recovery {0} at {1} {2}', inputs.recover_release_version, inputs.recover_release_commit, inputs.recover_release_nonce) || github.event_name == 'workflow_dispatch' && inputs.repair_npm_version != '' && format('Release npm repair {0}', inputs.repair_npm_version) || github.event_name == 'workflow_dispatch' && inputs.repair_gitee_version != '' && format('Release Gitee repair {0}', inputs.repair_gitee_version) || github.event_name == 'workflow_dispatch' && inputs.repair_oss_version != '' && format('Release OSS repair {0}', inputs.repair_oss_version) || github.workflow }}
on:
push:
tags:
- "v*"
workflow_dispatch:
inputs:
release_operation:
@@ -33,10 +30,6 @@ on:
- patch
- minor
- major
release_confirmation:
description: "For publish, type PUBLISH beta or PUBLISH stable"
required: false
type: string
repair_npm_version:
description: "Recover npm for a public immutable release without moving latest/beta"
required: false
@@ -78,7 +71,7 @@ on:
required: false
type: string
recover_release_nonce:
description: "Unique identifier for this protected recovery request"
description: "Unique identifier for this machine-verified recovery request"
required: false
type: string
recover_release_confirmation:
@@ -122,7 +115,6 @@ jobs:
RELEASE_OPERATION: ${{ inputs.release_operation }}
RELEASE_CHANNEL: ${{ inputs.release_channel }}
RELEASE_BUMP: ${{ inputs.release_bump }}
RELEASE_CONFIRMATION: ${{ inputs.release_confirmation }}
run: |
set -eu
release_flow=0
@@ -157,16 +149,8 @@ jobs:
exit 1
esac
if test "$RELEASE_OPERATION" = plan; then
test -z "$RELEASE_CONFIRMATION" || {
echo "release_confirmation must be empty for a plan" >&2
exit 1
}
echo "mode=plan_release" >> "$GITHUB_OUTPUT"
elif test "$RELEASE_OPERATION" = publish; then
test "$RELEASE_CONFIRMATION" = "PUBLISH $RELEASE_CHANNEL" || {
echo "release_confirmation must be exactly: PUBLISH $RELEASE_CHANNEL" >&2
exit 1
}
echo "mode=create_release" >> "$GITHUB_OUTPUT"
else
echo "release_operation must be none, plan, or publish" >&2
@@ -219,42 +203,51 @@ jobs:
echo "mode=recover_release" >> "$GITHUB_OUTPUT"
fi
authorize-recovery:
name: Approve existing tag recovery
needs: dispatch-contract
if: ${{ needs.dispatch-contract.outputs.mode == 'recover_release' }}
environment: release-recovery
runs-on: ubuntu-latest
timeout-minutes: 2
permissions:
actions: read
steps:
- name: Verify break-glass environment protection
- name: Authorize repository release requester
if: ${{ steps.mode.outputs.mode == 'plan_release' || steps.mode.outputs.mode == 'create_release' }}
uses: actions/github-script@v7
env:
EXPECTED_REPOSITORY: DingTalk-Real-AI/dingtalk-workspace-cli
REQUESTED_BY: ${{ github.actor }}
TRIGGERED_BY: ${{ github.triggering_actor }}
with:
script: |
const { owner, repo } = context.repo;
const response = await github.request(
"GET /repos/{owner}/{repo}/environments/{environment_name}",
{ owner, repo, environment_name: "release-recovery" },
);
const reviewerRule = response.data.protection_rules.find(
(rule) => rule.type === "required_reviewers",
);
if (
!reviewerRule ||
reviewerRule.prevent_self_review !== true ||
!Array.isArray(reviewerRule.reviewers) ||
reviewerRule.reviewers.length === 0
) {
core.setFailed("release-recovery must require a reviewer and prevent self-review");
const expectedRepository = process.env.EXPECTED_REPOSITORY;
if (context.payload.repository.full_name !== expectedRepository) {
core.setFailed(`release requests are restricted to ${expectedRepository}`);
return;
}
if (response.data.deployment_branch_policy?.protected_branches !== true) {
core.setFailed("release-recovery must allow only protected branches");
}
if (response.data.can_admins_bypass !== false) {
core.setFailed("release-recovery must not allow administrator bypass");
const actors = new Set([
process.env.REQUESTED_BY,
process.env.TRIGGERED_BY,
]);
for (const username of actors) {
if (!/^[A-Za-z0-9](?:[A-Za-z0-9-]{0,38})$/.test(username || "")) {
core.setFailed("release request contains an invalid GitHub actor");
return;
}
let permission;
try {
const response = await github.rest.repos.getCollaboratorPermissionLevel({
...context.repo,
username,
});
permission = response.data.permission;
} catch (error) {
if (error.status === 404) {
core.setFailed(`${username} is not an authorized repository collaborator`);
return;
}
throw error;
}
// GitHub maps maintain to the legacy write permission here.
if (!["write", "admin"].includes(permission)) {
core.setFailed(
`${username} needs repository write, maintain, or admin access to release`,
);
return;
}
}
governance-preflight:
@@ -410,24 +403,9 @@ jobs:
core.setFailed("Immutable releases must be enabled before publishing");
}
- name: Verify Homebrew PR automation permission
env:
HOMEBREW_PR_TOKEN: ${{ secrets.HOMEBREW_PR_TOKEN }}
RELEASE_GOVERNANCE_TOKEN: ${{ secrets.RELEASE_GOVERNANCE_TOKEN }}
run: |
test -n "$HOMEBREW_PR_TOKEN" || {
echo "HOMEBREW_PR_TOKEN is required to open Formula PRs from official releases" >&2
exit 1
}
test "$HOMEBREW_PR_TOKEN" != "$RELEASE_GOVERNANCE_TOKEN" || {
echo "HOMEBREW_PR_TOKEN and RELEASE_GOVERNANCE_TOKEN must use separate least-privilege identities" >&2
exit 1
}
./scripts/release/verify-homebrew-pr-token.sh "$GITHUB_REPOSITORY" --canary
release-contract:
needs: [dispatch-contract, authorize-recovery, governance-preflight, release-plan, seal-release]
if: ${{ !cancelled() && (github.event_name == 'push' || (needs.dispatch-contract.result == 'success' && needs.dispatch-contract.outputs.mode == 'recover_release' && needs.authorize-recovery.result == 'success') || (needs.dispatch-contract.result == 'success' && needs.dispatch-contract.outputs.mode == 'create_release' && needs.governance-preflight.result == 'success' && needs.release-plan.result == 'success' && needs.seal-release.result == 'success')) }}
needs: [dispatch-contract, governance-preflight, release-plan, seal-release]
if: ${{ !cancelled() && (github.event_name == 'push' || (needs.dispatch-contract.result == 'success' && needs.dispatch-contract.outputs.mode == 'recover_release') || (needs.dispatch-contract.result == 'success' && needs.dispatch-contract.outputs.mode == 'create_release' && needs.governance-preflight.result == 'success' && needs.release-plan.result == 'success' && needs.seal-release.result == 'success')) }}
runs-on: ubuntu-latest
timeout-minutes: 20
permissions:
@@ -568,6 +546,8 @@ jobs:
if (isCloudSeal) {
const expectedChannel = version.includes("-beta.") ? "prerelease" : "stable";
const actorId = String(context.payload.sender?.id || "");
const sealedRunAttempt = Number(tagFields.get("Release-Run-Attempt"));
const currentRunAttempt = Number(process.env.GITHUB_RUN_ATTEMPT);
if (
tagFields.get("Channel") !== expectedChannel ||
tagFields.get("Sealed-Commit") !== commit ||
@@ -582,7 +562,10 @@ jobs:
}
if (isCreate && (
tagFields.get("Release-Run") !== String(context.runId) ||
tagFields.get("Release-Run-Attempt") !== process.env.GITHUB_RUN_ATTEMPT ||
!Number.isSafeInteger(sealedRunAttempt) ||
!Number.isSafeInteger(currentRunAttempt) ||
sealedRunAttempt < 1 ||
sealedRunAttempt > currentRunAttempt ||
tagFields.get("Requested-By") !== context.actor ||
tagFields.get("Requested-By-ID") !== actorId
)) {
@@ -642,6 +625,7 @@ jobs:
if (failedByCloud && (
tagFields.get("Release-Run") !== failedRunId ||
tagFields.get("Release-Run-Attempt") !== failedRunAttempt ||
tagFields.get("Requested-By") !== String(run.actor?.login || "") ||
tagFields.get("Requested-By-ID") !== String(run.actor?.id || "")
)) {
core.setFailed(
@@ -818,23 +802,6 @@ jobs:
core.setFailed("Immutable releases must be enabled before publishing");
}
- name: Verify Homebrew PR automation permission
if: ${{ github.repository_owner == 'DingTalk-Real-AI' && (github.event_name == 'push' || needs.dispatch-contract.outputs.mode == 'recover_release') }}
env:
HOMEBREW_PR_TOKEN: ${{ secrets.HOMEBREW_PR_TOKEN }}
RELEASE_GOVERNANCE_TOKEN: ${{ secrets.RELEASE_GOVERNANCE_TOKEN }}
run: |
if [ -z "$HOMEBREW_PR_TOKEN" ]; then
echo "HOMEBREW_PR_TOKEN is required to open Formula PRs from official releases" >&2
exit 1
fi
if [ "$HOMEBREW_PR_TOKEN" = "$RELEASE_GOVERNANCE_TOKEN" ]; then
echo "HOMEBREW_PR_TOKEN and RELEASE_GOVERNANCE_TOKEN must use separate least-privilege identities" >&2
exit 1
fi
"$GITHUB_WORKSPACE/tmp/trusted-release-tooling/scripts/release/verify-homebrew-pr-token.sh" \
"$GITHUB_REPOSITORY" --canary
- name: Require successful beta delivery before stable promotion
if: ${{ steps.contract.outputs.channel == 'stable' && (github.event_name == 'push' || needs.dispatch-contract.outputs.mode == 'recover_release') }}
uses: actions/github-script@v7
@@ -1146,6 +1113,7 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 30
permissions:
checks: write
contents: write
env:
RELEASE_VERSION: ${{ needs.release-contract.outputs.release_version }}
@@ -1499,29 +1467,189 @@ jobs:
"$GITHUB_WORKSPACE/tmp/trusted-release-tooling/scripts/release/verify-github-tag-authority.sh" \
"$RELEASE_VERSION" "$RELEASE_COMMIT" "$RELEASE_TAG_OBJECT"
- name: Open stable Homebrew formula PR
- name: Publish stable Homebrew formula
id: homebrew-stable
if: ${{ github.repository_owner == 'DingTalk-Real-AI' && needs.release-contract.outputs.channel == 'stable' }}
run: ./scripts/release/publish-homebrew-formula.sh
run: DWS_PUBLISH_OUTPUT="$GITHUB_OUTPUT" "$GITHUB_WORKSPACE/tmp/trusted-release-tooling/scripts/release/publish-homebrew-formula.sh"
env:
DWS_FORMULA_SOURCE: ${{ github.workspace }}/dist/homebrew/dingtalk-workspace-cli.rb
DWS_TAP_REPO_URL: https://github.com/DingTalk-Real-AI/dingtalk-workspace-cli.git
DWS_TAP_BRANCH: main
DWS_TAP_GITHUB_TOKEN: ${{ secrets.HOMEBREW_PR_TOKEN }}
DWS_TAP_PR_REPOSITORY: ${{ github.repository }}
DWS_TAP_PR_BRANCH: "automation/homebrew-${{ needs.release-contract.outputs.release_version }}"
DWS_TAP_PR_TITLE: "chore: update Homebrew formula for ${{ needs.release-contract.outputs.release_version }}"
DWS_TAP_COMMIT_MESSAGE: "chore: update formula for ${{ needs.release-contract.outputs.release_version }}"
DWS_TAP_COMMIT_MESSAGE: "chore: update formula for ${{ needs.release-contract.outputs.release_version }} [skip ci]"
DWS_GIT_NAME: github-actions[bot]
DWS_GIT_EMAIL: 41898282+github-actions[bot]@users.noreply.github.com
- name: Open beta Homebrew formula PR
- name: Publish beta Homebrew formula
id: homebrew-beta
if: ${{ github.repository_owner == 'DingTalk-Real-AI' && needs.release-contract.outputs.channel == 'prerelease' }}
run: ./scripts/release/publish-homebrew-formula.sh
run: DWS_PUBLISH_OUTPUT="$GITHUB_OUTPUT" "$GITHUB_WORKSPACE/tmp/trusted-release-tooling/scripts/release/publish-homebrew-formula.sh"
env:
DWS_FORMULA_SOURCE: dist/homebrew/dingtalk-workspace-cli-beta.rb
DWS_FORMULA_SOURCE: ${{ github.workspace }}/dist/homebrew/dingtalk-workspace-cli-beta.rb
DWS_TAP_FORMULA_PATH: Formula/dingtalk-workspace-cli-beta.rb
DWS_TAP_REPO_URL: https://github.com/DingTalk-Real-AI/dingtalk-workspace-cli.git
DWS_TAP_BRANCH: main
DWS_TAP_GITHUB_TOKEN: ${{ secrets.HOMEBREW_PR_TOKEN }}
DWS_TAP_PR_REPOSITORY: ${{ github.repository }}
DWS_TAP_PR_BRANCH: "automation/homebrew-beta-${{ needs.release-contract.outputs.release_version }}"
DWS_TAP_PR_TITLE: "chore: update Homebrew beta formula for ${{ needs.release-contract.outputs.release_version }}"
DWS_TAP_COMMIT_MESSAGE: "chore: update beta formula for ${{ needs.release-contract.outputs.release_version }}"
DWS_TAP_COMMIT_MESSAGE: "chore: update beta formula for ${{ needs.release-contract.outputs.release_version }} [skip ci]"
DWS_GIT_NAME: github-actions[bot]
DWS_GIT_EMAIL: 41898282+github-actions[bot]@users.noreply.github.com
- name: Seal Formula-only Code Admission contexts
if: ${{ github.repository_owner == 'DingTalk-Real-AI' }}
uses: actions/github-script@v7
env:
FORMULA_CHANGED: ${{ steps.homebrew-stable.outputs.formula_changed || steps.homebrew-beta.outputs.formula_changed }}
FORMULA_COMMIT: ${{ steps.homebrew-stable.outputs.published_commit || steps.homebrew-beta.outputs.published_commit }}
RELEASE_CHANNEL: ${{ needs.release-contract.outputs.channel }}
with:
script: |
const fs = require("fs");
const { owner, repo } = context.repo;
const commit = process.env.FORMULA_COMMIT;
const formulaChanged = process.env.FORMULA_CHANGED === "true";
const channel = process.env.RELEASE_CHANNEL;
const version = process.env.RELEASE_VERSION;
const formulaPath = channel === "stable"
? "Formula/dingtalk-workspace-cli.rb"
: "Formula/dingtalk-workspace-cli-beta.rb";
const sourcePath = channel === "stable"
? "dist/homebrew/dingtalk-workspace-cli.rb"
: "dist/homebrew/dingtalk-workspace-cli-beta.rb";
const expectedMessage = channel === "stable"
? `chore: update formula for ${version} [skip ci]`
: `chore: update beta formula for ${version} [skip ci]`;
if (!/^[0-9a-f]{40}$/.test(commit)) {
core.setFailed("Homebrew publisher did not return one full commit SHA");
return;
}
const commitResponse = await github.rest.repos.getCommit({
owner,
repo,
ref: commit,
per_page: 100,
});
const files = commitResponse.data.files || [];
const requiredContexts = [
"Lint",
"Test",
"Coverage",
"Policy",
"Edition",
"Interface Integrity",
"AI Behavior",
"CLI Smoke",
"Mock MCP",
];
const exactFormulaCommit =
commitResponse.data.sha === commit &&
commitResponse.data.parents.length === 1 &&
commitResponse.data.commit.message === expectedMessage &&
commitResponse.data.author?.login === "github-actions[bot]" &&
commitResponse.data.committer?.login === "github-actions[bot]" &&
files.length === 1 &&
files[0].filename === formulaPath &&
["added", "modified"].includes(files[0].status);
if (!exactFormulaCommit) {
if (formulaChanged) {
core.setFailed(
`${commit} is not the exact github-actions Formula-only commit for ${version}`,
);
} else {
core.info("Formula was already current; no Formula-only check sealing is needed.");
}
return;
}
const parent = commitResponse.data.parents[0].sha;
const parentRuns = await github.paginate(github.rest.checks.listForRef, {
owner,
repo,
ref: parent,
filter: "latest",
per_page: 100,
});
const latestParentRunByName = new Map();
for (const run of parentRuns) {
if (
run.head_sha !== parent ||
run.app?.slug !== "github-actions" ||
!requiredContexts.includes(run.name)
) {
continue;
}
const current = latestParentRunByName.get(run.name);
if (!current || run.id > current.id) {
latestParentRunByName.set(run.name, run);
}
}
const invalidParentContexts = requiredContexts.filter((name) => {
const run = latestParentRunByName.get(name);
return !run || run.conclusion !== "success";
});
if (invalidParentContexts.length > 0) {
core.setFailed(
`Formula commit parent ${parent} lacks successful Code Admission contexts: ` +
invalidParentContexts.join(", "),
);
return;
}
const remoteFormula = await github.rest.repos.getContent({
owner,
repo,
path: formulaPath,
ref: commit,
});
if (
Array.isArray(remoteFormula.data) ||
remoteFormula.data.type !== "file" ||
remoteFormula.data.encoding !== "base64"
) {
core.setFailed(`${formulaPath} is not a regular base64 GitHub blob at ${commit}`);
return;
}
const expectedFormula = fs.readFileSync(sourcePath);
const actualFormula = Buffer.from(
remoteFormula.data.content.replace(/\s/g, ""),
"base64",
);
if (!actualFormula.equals(expectedFormula)) {
core.setFailed(`${formulaPath} at ${commit} differs from the verified release Formula`);
return;
}
const branch = await github.rest.repos.getBranch({
owner,
repo,
branch: context.payload.repository.default_branch,
});
const comparison = await github.rest.repos.compareCommitsWithBasehead({
owner,
repo,
basehead: `${commit}...${branch.data.commit.sha}`,
});
if (!["ahead", "identical"].includes(comparison.data.status)) {
core.setFailed(`${commit} is no longer contained in the default branch`);
return;
}
for (const name of requiredContexts) {
await github.rest.checks.create({
owner,
repo,
name,
head_sha: commit,
status: "completed",
conclusion: "success",
output: {
title: "Verified Formula-only release commit",
summary:
`${formulaPath} was generated from immutable ${version} assets, ` +
"validated byte-for-byte, and was the commit's only changed file.",
},
});
}
- name: Reverify exact immutable npm package
run: ./scripts/release/verify-package-managers.sh --npm-only --expected-version "$RELEASE_VERSION"
@@ -1739,7 +1867,7 @@ jobs:
set -eu
. ./scripts/release/release-lib.sh
attempt=1
max_attempts=12
max_attempts=60
while :; do
delivered="$(npm view dingtalk-workspace-cli "dist-tags.$NPM_TAG" \
--registry=https://registry.npmjs.org --prefer-online)"
@@ -1757,7 +1885,12 @@ jobs:
exit 1
fi
echo "npm $NPM_TAG still reports older v$delivered; waiting for registry propagation ($attempt/$max_attempts)."
sleep 5
# incremental backoff: 5s for first 12 attempts (1 min), then 10s
if [ "$attempt" -lt 12 ]; then
sleep 5
else
sleep 10
fi
attempt=$((attempt + 1))
done
@@ -2049,7 +2182,6 @@ jobs:
if: ${{ !cancelled() }}
needs:
- dispatch-contract
- authorize-recovery
- governance-preflight
- release-contract
- release-validation
@@ -2072,7 +2204,6 @@ jobs:
DISPATCH_MODE: ${{ needs.dispatch-contract.outputs.mode }}
GITEE_FALLBACK_ENABLED: ${{ vars.ENABLE_GITEE_UPLOAD_FALLBACK }}
DISPATCH_RESULT: ${{ needs.dispatch-contract.result }}
AUTHORIZE_RECOVERY_RESULT: ${{ needs.authorize-recovery.result }}
GOVERNANCE_PREFLIGHT_RESULT: ${{ needs.governance-preflight.result }}
RELEASE_CONTRACT_RESULT: ${{ needs.release-contract.result }}
RELEASE_VALIDATION_RESULT: ${{ needs.release-validation.result }}
@@ -2116,7 +2247,6 @@ jobs:
case "$EVENT_NAME:$DISPATCH_MODE" in
push:)
require_result dispatch-contract "$DISPATCH_RESULT" skipped
require_result authorize-recovery "$AUTHORIZE_RECOVERY_RESULT" skipped
require_result governance-preflight "$GOVERNANCE_PREFLIGHT_RESULT" skipped
require_result repair-npm "$REPAIR_NPM_RESULT" skipped
require_result repair-channel "$REPAIR_CHANNEL_RESULT" skipped
@@ -2128,7 +2258,6 @@ jobs:
require_result governance-preflight "$GOVERNANCE_PREFLIGHT_RESULT" success
require_result release-plan "$RELEASE_PLAN_RESULT" success
require_result seal-release "$SEAL_RELEASE_RESULT" success
require_result authorize-recovery "$AUTHORIZE_RECOVERY_RESULT" skipped
require_result repair-npm "$REPAIR_NPM_RESULT" skipped
require_result repair-channel "$REPAIR_CHANNEL_RESULT" skipped
require_publication
@@ -2137,7 +2266,6 @@ jobs:
require_result dispatch-contract "$DISPATCH_RESULT" success
require_result release-plan "$RELEASE_PLAN_RESULT" success
require_result seal-release "$SEAL_RELEASE_RESULT" skipped
require_result authorize-recovery "$AUTHORIZE_RECOVERY_RESULT" skipped
require_result governance-preflight "$GOVERNANCE_PREFLIGHT_RESULT" skipped
require_result release-contract "$RELEASE_CONTRACT_RESULT" skipped
require_result release-validation "$RELEASE_VALIDATION_RESULT" skipped
@@ -2151,7 +2279,6 @@ jobs:
;;
workflow_dispatch:recover_release)
require_result dispatch-contract "$DISPATCH_RESULT" success
require_result authorize-recovery "$AUTHORIZE_RECOVERY_RESULT" success
require_result governance-preflight "$GOVERNANCE_PREFLIGHT_RESULT" skipped
require_result repair-npm "$REPAIR_NPM_RESULT" skipped
require_result repair-channel "$REPAIR_CHANNEL_RESULT" skipped
@@ -2161,7 +2288,6 @@ jobs:
workflow_dispatch:governance_preflight)
require_result dispatch-contract "$DISPATCH_RESULT" success
require_result governance-preflight "$GOVERNANCE_PREFLIGHT_RESULT" success
require_result authorize-recovery "$AUTHORIZE_RECOVERY_RESULT" skipped
require_result release-contract "$RELEASE_CONTRACT_RESULT" skipped
require_result release-validation "$RELEASE_VALIDATION_RESULT" skipped
require_result release "$RELEASE_RESULT" skipped
@@ -2176,7 +2302,6 @@ jobs:
workflow_dispatch:repair_npm)
require_result dispatch-contract "$DISPATCH_RESULT" success
require_result repair-npm "$REPAIR_NPM_RESULT" success
require_result authorize-recovery "$AUTHORIZE_RECOVERY_RESULT" skipped
require_result governance-preflight "$GOVERNANCE_PREFLIGHT_RESULT" skipped
require_result release-contract "$RELEASE_CONTRACT_RESULT" skipped
require_result release-validation "$RELEASE_VALIDATION_RESULT" skipped
@@ -2191,7 +2316,6 @@ jobs:
workflow_dispatch:repair_gitee)
require_result dispatch-contract "$DISPATCH_RESULT" success
require_result repair-channel "$REPAIR_CHANNEL_RESULT" success
require_result authorize-recovery "$AUTHORIZE_RECOVERY_RESULT" skipped
require_result governance-preflight "$GOVERNANCE_PREFLIGHT_RESULT" skipped
require_result release-contract "$RELEASE_CONTRACT_RESULT" skipped
require_result release-validation "$RELEASE_VALIDATION_RESULT" skipped
@@ -2206,7 +2330,6 @@ jobs:
workflow_dispatch:repair_oss)
require_result dispatch-contract "$DISPATCH_RESULT" success
require_result repair-channel "$REPAIR_CHANNEL_RESULT" success
require_result authorize-recovery "$AUTHORIZE_RECOVERY_RESULT" skipped
require_result governance-preflight "$GOVERNANCE_PREFLIGHT_RESULT" skipped
require_result release-contract "$RELEASE_CONTRACT_RESULT" skipped
require_result release-validation "$RELEASE_VALIDATION_RESULT" skipped
@@ -2754,15 +2877,98 @@ jobs:
name: Seal cloud release tag
needs: [dispatch-contract, governance-preflight, release-plan]
if: ${{ !cancelled() && needs.dispatch-contract.result == 'success' && needs.dispatch-contract.outputs.mode == 'create_release' && needs.governance-preflight.result == 'success' && needs.release-plan.result == 'success' }}
environment:
name: ${{ inputs.release_channel == 'stable' && 'release-stable' || 'release-beta' }}
runs-on: ubuntu-latest
timeout-minutes: 5
permissions:
actions: read
contents: write
outputs:
release_version: ${{ steps.seal.outputs.release_version }}
release_commit: ${{ steps.seal.outputs.release_commit }}
release_tag_object: ${{ steps.seal.outputs.release_tag_object }}
steps:
- name: Verify release environment governance before sealing
uses: actions/github-script@v7
env:
RELEASE_ENVIRONMENT: ${{ inputs.release_channel == 'stable' && 'release-stable' || 'release-beta' }}
with:
script: |
const { owner, repo } = context.repo;
const environmentName = process.env.RELEASE_ENVIRONMENT;
const expectedRepository = "DingTalk-Real-AI/dingtalk-workspace-cli";
if (
context.payload.repository.full_name !== expectedRepository ||
!["release-beta", "release-stable"].includes(environmentName)
) {
core.setFailed("release environment validation is not bound to an official channel");
return;
}
const response = await github.request(
"GET /repos/{owner}/{repo}/environments/{environment_name}",
{ owner, repo, environment_name: environmentName },
);
const environment = response.data;
const branchPolicy = environment.deployment_branch_policy;
const protectionRules = environment.protection_rules || [];
const reviewerRules = protectionRules.filter(
(rule) => rule.type === "required_reviewers",
);
const waitRules = protectionRules.filter(
(rule) => rule.type === "wait_timer",
);
if (
environment.name !== environmentName ||
environment.can_admins_bypass !== false ||
branchPolicy?.protected_branches !== true ||
branchPolicy?.custom_branch_policies !== false ||
waitRules.length !== 0
) {
core.setFailed(`${environmentName} does not match the required release policy`);
return;
}
if (environmentName === "release-beta") {
if (reviewerRules.length !== 0) {
core.setFailed("release-beta must not require a manual reviewer");
}
return;
}
if (
reviewerRules.length !== 1 ||
reviewerRules[0].prevent_self_review !== true ||
!Array.isArray(reviewerRules[0].reviewers) ||
reviewerRules[0].reviewers.length === 0
) {
core.setFailed(
"release-stable requires a non-self reviewing administrator",
);
return;
}
for (const reviewer of reviewerRules[0].reviewers) {
if (
reviewer.type !== "User" ||
!reviewer.reviewer?.login
) {
core.setFailed("release-stable reviewers must be repository administrators");
return;
}
const permission = await github.rest.repos.getCollaboratorPermissionLevel({
owner,
repo,
username: reviewer.reviewer.login,
});
if (permission.data.permission !== "admin") {
core.setFailed(
`${reviewer.reviewer.login} is no longer a repository administrator`,
);
return;
}
}
- name: Create one immutable annotated release tag
id: seal
uses: actions/github-script@v7
@@ -2816,10 +3022,94 @@ jobs:
repo,
branch: defaultBranch,
});
if (branch.data.commit.sha !== commit) {
core.setFailed(`${defaultBranch} moved to ${branch.data.commit.sha}; run the release again`);
const currentBranchCommit = branch.data.commit.sha;
const branchMoved = branch.data.commit.sha !== commit;
const currentAttempt = Number(process.env.GITHUB_RUN_ATTEMPT);
const requestedById = String(context.payload.sender?.id || "");
if (!Number.isSafeInteger(currentAttempt) || currentAttempt < 1 || !/^[1-9]\d*$/.test(requestedById)) {
core.setFailed("cloud release request contains an invalid run attempt or requester identity");
return;
}
const messageForAttempt = (attempt) => [
`Release ${version}`,
"",
`Channel: ${channel}`,
...(fromBeta ? [`From-Beta: ${fromBeta}`] : []),
`OSS-Mirror: ${ossMirror}`,
`Release-Run: ${context.runId}`,
`Release-Run-Attempt: ${attempt}`,
`Requested-By: ${context.actor}`,
`Requested-By-ID: ${context.payload.sender?.id || ""}`,
`Sealed-Commit: ${commit}`,
`Workflow-Commit: ${context.sha}`,
`Allocation-Fingerprint: ${expectedFingerprint}`,
].join("\n");
const retryablePostWriteError = (error) =>
error.status === 404 ||
error.status === 429 ||
(
Number.isInteger(error.status) &&
error.status >= 500 &&
error.status < 600
);
const postWriteRetryDelaysMs = [0, 1000, 2000, 4000, 8000, 16000];
const sleep = (delayMs) =>
new Promise((resolve) => setTimeout(resolve, delayMs));
const readAfterWrite = async (description, operation) => {
let lastError;
for (const delayMs of postWriteRetryDelaysMs) {
if (delayMs > 0) {
core.info(`${description} is not visible yet; retrying in ${delayMs}ms`);
await sleep(delayMs);
}
try {
return await operation();
} catch (error) {
lastError = error;
if (!retryablePostWriteError(error)) {
throw error;
}
}
}
throw lastError;
};
const verifyExactTag = async (refResponse, expectedTagObject = "") => {
if (refResponse.data.object.type !== "tag") {
throw new Error(`${version} does not point to an annotated tag object`);
}
const tagObject = refResponse.data.object.sha;
if (expectedTagObject && tagObject !== expectedTagObject) {
throw new Error(
`${version} points to ${tagObject}, expected new tag object ${expectedTagObject}`,
);
}
const tagResponse = await readAfterWrite(
`${version} annotated tag object`,
() => github.rest.git.getTag({ owner, repo, tag_sha: tagObject }),
);
const attemptMatches = [
...tagResponse.data.message.matchAll(/^Release-Run-Attempt: ([1-9]\d*)$/gm),
];
if (attemptMatches.length !== 1) {
throw new Error(`${version} has invalid Release-Run-Attempt metadata`);
}
const sealedAttempt = Number(attemptMatches[0][1]);
if (
!Number.isSafeInteger(sealedAttempt) ||
sealedAttempt < 1 ||
sealedAttempt > currentAttempt ||
tagResponse.data.tag !== version ||
tagResponse.data.object.type !== "commit" ||
tagResponse.data.object.sha !== commit ||
tagResponse.data.message !== messageForAttempt(sealedAttempt)
) {
throw new Error(
`${version} existing annotated tag is not the exact seal from this workflow run`,
);
}
return tagObject;
};
const refs = [];
for (const prefix of ["tags/v", "tags/withdrawn/v"]) {
@@ -2830,6 +3120,12 @@ jobs:
per_page: 100,
});
for (const ref of matching) {
// A failed-jobs rerun keeps the successful release-plan output.
// Ignore only this run's candidate ref while recomputing that
// pre-write fingerprint; verify its complete authority below.
if (ref.ref === `refs/tags/${version}`) {
continue;
}
refs.push(`${ref.ref}=${ref.object.sha}`);
}
}
@@ -2843,10 +3139,13 @@ jobs:
return;
}
let existingRef = null;
try {
await github.rest.git.getRef({ owner, repo, ref: `tags/${version}` });
core.setFailed(`release tag already exists: ${version}`);
return;
existingRef = await github.rest.git.getRef({
owner,
repo,
ref: `tags/${version}`,
});
} catch (error) {
if (error.status !== 404) throw error;
}
@@ -2862,66 +3161,121 @@ jobs:
if (error.status !== 404) throw error;
}
const message = [
`Release ${version}`,
"",
`Channel: ${channel}`,
...(fromBeta ? [`From-Beta: ${fromBeta}`] : []),
`OSS-Mirror: ${ossMirror}`,
`Release-Run: ${context.runId}`,
`Release-Run-Attempt: ${process.env.GITHUB_RUN_ATTEMPT}`,
`Requested-By: ${context.actor}`,
`Requested-By-ID: ${context.payload.sender?.id || ""}`,
`Sealed-Commit: ${commit}`,
`Workflow-Commit: ${context.sha}`,
`Allocation-Fingerprint: ${expectedFingerprint}`,
].join("\n");
const tag = await github.rest.git.createTag({
owner,
repo,
tag: version,
message,
object: commit,
type: "commit",
});
await github.rest.git.createRef({
owner,
repo,
ref: `refs/tags/${version}`,
sha: tag.data.sha,
});
const sealedRef = await github.rest.git.getRef({
owner,
repo,
ref: `tags/${version}`,
});
if (
sealedRef.data.object.type !== "tag" ||
sealedRef.data.object.sha !== tag.data.sha
) {
core.setFailed(`${version} did not seal to the new annotated tag object`);
return;
if (branchMoved) {
if (!existingRef) {
core.setFailed(
`${defaultBranch} moved to ${currentBranchCommit} before the tag was created; run the release again`,
);
return;
}
const comparison = await github.rest.repos.compareCommitsWithBasehead({
owner,
repo,
basehead: `${commit}...${currentBranchCommit}`,
});
if (!["ahead", "identical"].includes(comparison.data.status)) {
core.setFailed(
`${version} sealed commit is no longer contained in ${defaultBranch}`,
);
return;
}
}
const sealedTag = await github.rest.git.getTag({
owner,
repo,
tag_sha: tag.data.sha,
});
if (
sealedTag.data.tag !== version ||
sealedTag.data.object.type !== "commit" ||
sealedTag.data.object.sha !== commit ||
sealedTag.data.message !== message
) {
core.setFailed(`${version} annotated tag authority differs after creation`);
return;
let sealedTagObject = "";
let reusedExistingSeal = false;
if (existingRef) {
sealedTagObject = await verifyExactTag(existingRef);
reusedExistingSeal = true;
core.info(
`Reusing exact ${version} seal from run ${context.runId}; continuing failed jobs without recovery approval`,
);
} else {
const message = messageForAttempt(currentAttempt);
const tag = await github.rest.git.createTag({
owner,
repo,
tag: version,
message,
object: commit,
type: "commit",
});
if (
tag.data.tag !== version ||
tag.data.object.type !== "commit" ||
tag.data.object.sha !== commit ||
tag.data.message !== message
) {
core.setFailed(`${version} annotated tag creation response differs from the seal`);
return;
}
let createRefResponse = null;
let createRefError = null;
for (const delayMs of postWriteRetryDelaysMs) {
if (delayMs > 0) {
core.info(
`${version} ref creation is not confirmed; retrying in ${delayMs}ms`,
);
await sleep(delayMs);
}
try {
createRefResponse = await github.rest.git.createRef({
owner,
repo,
ref: `refs/tags/${version}`,
sha: tag.data.sha,
});
break;
} catch (error) {
createRefError = error;
if (
error.status !== 422 &&
error.status !== 429 &&
!(Number.isInteger(error.status) && error.status >= 500 && error.status < 600)
) {
throw error;
}
try {
const observedRef = await github.rest.git.getRef({
owner,
repo,
ref: `tags/${version}`,
});
await verifyExactTag(observedRef, tag.data.sha);
createRefResponse = observedRef;
break;
} catch (observeError) {
if (!retryablePostWriteError(observeError)) {
throw observeError;
}
}
}
}
if (!createRefResponse) {
throw createRefError;
}
if (
createRefResponse.data.object.type !== "tag" ||
createRefResponse.data.object.sha !== tag.data.sha
) {
core.setFailed(`${version} ref creation response differs from the new tag object`);
return;
}
const sealedRef = await readAfterWrite(
`${version} tag ref`,
() => github.rest.git.getRef({ owner, repo, ref: `tags/${version}` }),
);
sealedTagObject = await verifyExactTag(sealedRef, tag.data.sha);
}
core.setOutput("release_version", version);
core.setOutput("release_commit", commit);
core.setOutput("release_tag_object", tag.data.sha);
core.setOutput("release_tag_object", sealedTagObject);
await core.summary
.addHeading("Cloud release sealed")
.addRaw(`\`${version}\` → \`${commit}\` (run ${context.runId})`)
.addRaw(
`\`${version}\` → \`${commit}\` (run ${context.runId}` +
`${reusedExistingSeal ? ", exact seal reused" : ""})`,
)
.write();
+258
View File
@@ -0,0 +1,258 @@
name: Reviewer routing
on:
pull_request_target:
branches: [main]
types: [opened, synchronize, reopened, ready_for_review]
# pull_request_target deliberately runs only this workflow from the protected
# base branch. Never check out or execute pull-request code here.
permissions:
contents: write
pull-requests: write
concurrency:
group: reviewer-router-${{ github.event.pull_request.number }}
cancel-in-progress: true
jobs:
route:
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Route review and enable auto-merge
uses: actions/github-script@f28e40c7f34bde8b3046d885e986cb6290c5673b # v7.1.0
with:
script: |
const owner = context.repo.owner;
const repo = context.repo.repo;
const pullNumber = context.payload.pull_request.number;
const eventHeadSha = context.payload.pull_request.head.sha;
const reviewerPool = [
'sczheng189',
'shangguanxuan633-lab',
'audanye-sudo',
'wxianfeng',
];
async function getReadyEventPull(phase) {
const {data: currentPull} = await github.rest.pulls.get({
owner,
repo,
pull_number: pullNumber,
});
if (
currentPull.head.sha !== eventHeadSha ||
currentPull.state !== 'open' ||
currentPull.draft ||
currentPull.base.ref !== 'main'
) {
core.info(
`PR #${pullNumber} state or revision no longer matches this ready-main event during ${phase}; routing stopped.`,
);
return null;
}
return currentPull;
}
const pullRequest = await getReadyEventPull('initial read');
if (!pullRequest) {
return;
}
const author = pullRequest.user.login.toLowerCase();
const headSha = pullRequest.head.sha;
const latestPusher =
context.payload.action === 'synchronize'
? context.payload.sender?.login?.toLowerCase()
: author;
async function routeReview() {
const eligible = reviewerPool.filter(
reviewer =>
reviewer.toLowerCase() !== author &&
reviewer.toLowerCase() !== latestPusher,
);
if (eligible.length === 0) {
core.warning(`No eligible reviewer remains for PR #${pullNumber}.`);
return;
}
const alreadyRequested =
(pullRequest.requested_reviewers || []).length > 0 ||
(pullRequest.requested_teams || []).length > 0;
if (alreadyRequested) {
core.info(`PR #${pullNumber} already has a requested reviewer; leaving it unchanged.`);
return;
}
let reviews;
try {
reviews = await github.paginate(github.rest.pulls.listReviews, {
owner,
repo,
pull_number: pullNumber,
per_page: 100,
});
} catch (error) {
core.warning(
`Could not inspect existing reviews for PR #${pullNumber}; skipping reviewer routing to avoid a duplicate request (${error.status || 'unknown status'}).`,
);
return;
}
const latestDecisionByLogin = new Map();
for (const review of reviews) {
const login = review.user?.login?.toLowerCase();
if (
!login ||
!['APPROVED', 'CHANGES_REQUESTED', 'DISMISSED'].includes(
review.state,
)
) {
continue;
}
const previous = latestDecisionByLogin.get(login);
if (!previous || review.id > previous.id) {
latestDecisionByLogin.set(login, review);
}
}
const currentHeadDecision = [...latestDecisionByLogin.values()].find(
review =>
review.commit_id === headSha &&
eligible.some(
reviewer =>
reviewer.toLowerCase() ===
review.user.login.toLowerCase(),
) &&
['APPROVED', 'CHANGES_REQUESTED'].includes(review.state),
);
if (currentHeadDecision) {
core.info(
`PR #${pullNumber} already has a ${currentHeadDecision.state} review on its current head; leaving review ownership unchanged.`,
);
return;
}
const loads = new Map(eligible.map(reviewer => [reviewer, 0]));
try {
const openPullRequests = await github.paginate(github.rest.pulls.list, {
owner,
repo,
state: 'open',
per_page: 100,
});
for (const openPullRequest of openPullRequests) {
for (const reviewer of openPullRequest.requested_reviewers || []) {
const candidate = eligible.find(
login => login.toLowerCase() === reviewer.login.toLowerCase(),
);
if (candidate) {
loads.set(candidate, loads.get(candidate) + 1);
}
}
}
} catch (error) {
core.warning(
`Could not read current reviewer load; using deterministic rotation (${error.status || 'unknown status'}).`,
);
}
const offset = pullNumber % eligible.length;
const rotated = eligible.slice(offset).concat(eligible.slice(0, offset));
const tieOrder = new Map(rotated.map((reviewer, index) => [reviewer, index]));
const staleChangeRequester = [...latestDecisionByLogin.values()]
.filter(review => review.state === 'CHANGES_REQUESTED')
.sort((left, right) => right.id - left.id)
.map(review =>
eligible.find(
reviewer =>
reviewer.toLowerCase() === review.user.login.toLowerCase(),
),
)
.find(Boolean);
const ranked = [...eligible].sort(
(left, right) =>
Number(right === staleChangeRequester) -
Number(left === staleChangeRequester) ||
loads.get(left) - loads.get(right) ||
tieOrder.get(left) - tieOrder.get(right),
);
for (const reviewer of ranked) {
try {
const currentPull = await getReadyEventPull('review request');
if (!currentPull) {
return;
}
if (
(currentPull.requested_reviewers || []).length > 0 ||
(currentPull.requested_teams || []).length > 0
) {
core.info(
`PR #${pullNumber} received a reviewer while routing; leaving it unchanged.`,
);
return;
}
await github.rest.pulls.requestReviewers({
owner,
repo,
pull_number: pullNumber,
reviewers: [reviewer],
});
core.info(
`Requested @${reviewer} for PR #${pullNumber} (open request load: ${loads.get(reviewer)}).`,
);
return;
} catch (error) {
core.warning(
`Could not request @${reviewer} for PR #${pullNumber}; trying the next candidate (${error.status || 'unknown status'}).`,
);
}
}
core.warning(`No reviewer request could be created for PR #${pullNumber}.`);
}
async function enableAutoMerge() {
try {
const currentPull = await getReadyEventPull('auto-merge enable');
if (!currentPull) {
return;
}
if (currentPull.auto_merge) {
core.info(`Auto-merge is already enabled for PR #${pullNumber}.`);
return;
}
await github.graphql(
`mutation EnableAutoMerge($pullRequestId: ID!) {
enablePullRequestAutoMerge(
input: {
pullRequestId: $pullRequestId
mergeMethod: MERGE
}
) {
pullRequest {
autoMergeRequest {
enabledAt
}
}
}
}`,
{pullRequestId: currentPull.node_id},
);
core.info(`Enabled native auto-merge for PR #${pullNumber}.`);
} catch (error) {
core.warning(
`Could not enable auto-merge for PR #${pullNumber}; checks and review can continue normally (${error.message}).`,
);
}
}
try {
await routeReview();
} catch (error) {
core.warning(
`Reviewer routing hit an unexpected error for PR #${pullNumber}; review can still proceed manually (${error.message}).`,
);
}
await enableAutoMerge();
+32 -8
View File
@@ -6,18 +6,41 @@ The format is inspired by [Keep a Changelog](https://keepachangelog.com/) and th
## [Unreleased]
## [1.0.55-beta.2] - 2026-07-23
### Added
This beta validates Wukong capability parity across Chat, Contacts, documents,
Drive, Markdown, and Todos, together with faster guarded releases and legacy
authentication migration.
- **Shortcut Runtime Schema delivery** — publishes all 210 public built-in shortcuts as reviewed Agent-visible leaf tools across 16 product groups, with stable canonical identities, executable `+shortcut` CLI paths, parameter and cross-parameter constraints, selection guidance, interface metadata, and runtime-aligned safety/confirmation semantics. `dws shortcut list` remains the lightweight batch-discovery view, while leaf Schema now carries the complete Agent contract; declared string-slice defaults are also preserved consistently in Cobra and Schema.
## [1.0.55-beta.4] - 2026-07-27
This beta validates the shortcut projection fixes for group bots, bot search,
and mail threads, together with hardened release delivery to Gitee and npm on
top of the `v1.0.55-beta.3` baseline.
### Fixed
- **Shortcut projection fixes** (#795) — `chat +chat-bots` no longer projects a non-empty `list_group_bots` response to an empty list, `+bot-find` recognizes the `search_bots` response shape (`result.bots` entries with `botOpenDingTalkId`), and mail thread listings keep `lastUpdated` when the backend returns `lastModifiedDateTime`.
### Changed
- **Hardened release delivery** — the Gitee mirror workflow can synchronize a specific release's assets on demand, release lookup tolerates Gitee's HTTP 200 null-body response for missing releases, npm dist-tag verification waits through slow registry CDN propagation with incremental backoff, and beta/stable release operations are role-enforced (#791).
## [1.0.55-beta.3] - 2026-07-24
This beta validates the HR Brain command surface, smoother guarded release
automation, and deterministic Markdown test coverage on top of the
`v1.0.55-beta.2` baseline.
### Added
- **Chat editing and group management** — adds `chat message edit`, conversation-category lookups through `chat category list-by-conv` and `chat category batch-info`, and the confirmed, irreversible `chat group upgrade-to-external` flow.
- **Contact maintenance commands** — adds `contact user update`, `contact user update-self`, `contact dept create`, `contact dept update`, and `contact account update`, all with guarded write behavior.
- **Markdown file workflows** — adds the `markdown` product with `fetch`, `create`, `overwrite`, and `patch` commands for Drive-native `.md` files, including explicit routing, dry-run previews, and confirmation for destructive writes.
- **Todo labels** — adds `todo tag add`, `delete`, `update`, `list`, and `create`.
- **HR Brain (`dws hrbrain`) command surface** — adds 11 commands across three groups: `talent-pool list/detail/employees` for talent pool browsing, `profile metadata/query/labels/career/performance` for employee profile data, and `search employees/employees-structured/fields` for basic and advanced (rule-based) people search. Ships with bundled mono/multi Skill guidance (`dingtalk-hrbrain`, `cli_version: ">=1.0.54"`); `search employees-structured` validates `--origin-json` as a JSON object and `--fields` as a JSON array before dispatch.
### Changed
- **Smoother guarded releases** — publishes verified stable and beta Homebrew Formula updates directly from the release workflow, retries transient tag-ref visibility failures, lets an exact same-run retry reuse its sealed tag, and allows machine-verified rebuild recovery without a separate approval wait.
### Fixed
- **Deterministic Markdown coverage** — replaces timing-dependent temporary-file deletion tests with synchronized file-stat failures so release admission no longer flakes on scheduler timing.
### Changed
@@ -47,6 +70,7 @@ records, encrypted messages, and media-download ID aliases.
### Fixed
- **Shortcut projection silent-empty returns** (#783) — a batch of read shortcuts returned an empty list with exit 0 and no error envelope even when the underlying MCP tool returned data, so agents misread "no data". The projection resolvers now probe the real container keys (`processCodeList`, `values`, `wikiSpaces`, `itemList`, `groupList`, `recentItems`, `emailAccounts`, `deptUserList`, `labelUserList`, `roles`, `report_list`, and the grouped `get_org_labels` `labels[]`), unwrap items nested under a VO wrapper (`shiftVO` / `entityVO` / `userInfo`), and `todo +created-todos` uses the shared pager (`pageSize=20`) because the backend silently returns an empty page for `pageSize>20`. Affects contact/oa/wiki/drive/minutes/calendar/attendance/chat/report/smart shortcuts, each with a guard test asserting the real response shape projects non-empty. `scripts/shortcut_real_result.py` also gains an upper-vs-lower layer comparison so an exit-0 empty projection over a non-empty backend is scored as `projection-data-loss` in the real read-audit path rather than `real-ok`.
- **Message-read shortcut projection** (#706) — the message-list shortcuts (`chat +chat-messages` / `+messages-list` / `+messages-list-direct` / `+at-me` / `+search-msg` / `+thread-replies`) now render card and out-of-office rich-content JSON as readable text (without ever rewriting ordinary text that merely embeds a JSON fragment), expand a forwarded chat record's nested `forwardMessages` instead of collapsing to a "[卡片]" summary, and mark undecryptable encrypted card messages as `[加密消息]`; the speaker is read from the bare `sender` key, nested `{name:…}` sender objects yield their display name, and the literal string `"null"` is treated as absent. Shared projection helpers now live in `internal/shortcut/chatmsg`. `chat message download-media` also gains `--msg-id` / `--open-message-id` aliases for its `--message-id` flag so agents copying the `openMessageId`/`msgId` output field no longer hit "unknown flag".
## [1.0.54] - 2026-07-21
+46 -8
View File
@@ -27,7 +27,9 @@ notes that are intentionally kept out of the repository root.
## Local Checks
Run the verification commands that match the surface you changed before you hand work back.
Run the verification commands that match the surface you changed before you
hand work back. The goal is useful, change-specific evidence, not a second
local execution of every CI job.
Common repository checks already used here include:
@@ -44,19 +46,55 @@ make lint
git diff --check
```
Select the PR risk tier before choosing checks:
| Tier | Typical scope | Developer evidence | CI expansion |
|---|---|---|---|
| Documentation-only | Prose and documentation assets with no executable, generated, workflow, packaging, or interface change | Links/content/rendering plus repository asset checks | Lightweight documentation validation; all nine named contexts still report |
| Standard | Ordinary implementation work with a stable package graph | Focused unit/integration tests and observable behavior for the changed path | Race tests for changed packages and their reverse dependencies, scope-matched HEAD/base coverage, and representative Darwin/Windows compilation |
| High-risk | Workflow/policy, package graph, generated Schema/registry, platform, auth/keychain, installer, packaging, release, transport, recovery, or an unprovable infrastructure change | Relevant full or domain suite plus focused behavior evidence | Complete race suite, native platform tests, and all affected domain gates; protected `main` uses this tier |
Classification fails closed: an incomplete diff, package add/remove/rename, or
uncertain dependency graph selects the high-risk suite. Native changed-code
coverage is additionally selected for platform-sensitive code.
## Pull Request Checklist
1. Keep implementation and tests in sync.
2. Run `./scripts/dev/ci-local.sh`.
3. Run `./scripts/policy/check-command-surface.sh --strict` when command paths/flags change. CI also runs `./scripts/policy/check-command-compatibility.sh --base-ref <main-ref> --stable-ref <latest-GA-tag>` against both the target branch and latest stable release.
4. Run `./scripts/policy/check-generated-drift.sh` when generated artifacts may change.
5. Run `./scripts/release/verify-package-managers.sh` when packaging or installer surfaces change (run `make package` first).
6. Update docs and `CHANGELOG.md` for behavior/interface changes.
7. Include verification evidence in your PR description.
2. Select the documentation-only, standard, or high-risk tier and run the
smallest checks that prove the change. Use `./scripts/dev/ci-local.sh` when
a complete local pass is warranted; it is not required for every ordinary
PR.
3. Include both the commands/results and user-visible or contract-level
behavior evidence in the PR description.
4. Run `./scripts/policy/check-command-surface.sh --strict` when command
paths/flags change. CI also runs
`./scripts/policy/check-command-compatibility.sh --base-ref <main-ref> --stable-ref <latest-GA-tag>`
against both the target branch and latest stable release.
5. Run `./scripts/policy/check-generated-drift.sh` when generated artifacts may
change.
6. Run `./scripts/release/verify-package-managers.sh` when packaging or
installer surfaces change (run `make package` first).
7. Update docs and `CHANGELOG.md` for behavior/interface changes.
## Submission Flow
1. Make the smallest atomic change that satisfies the task.
2. Keep doc edits factual and limited to implemented behavior.
3. Run the relevant verification commands.
4. Report the validation results with the handoff.
4. Report the validation results and risk tier with the handoff.
5. Open a ready PR against `main`. Base-owned automation assigns one eligible
peer reviewer, balancing the current open-review load and excluding the
author. A new head push re-enters the same routing flow when the latest
revision still needs review.
6. After the latest push has one peer approval and the exact nine required
contexts are current and green, auto-merge completes the PR. If `main`
advances first, strict status checks revalidate the branch; no separate
routine merge request is needed.
Contributors without repository write access stop at the PR flow. Explicitly
authorized collaborators with `write`, `maintain`, or `admin` access can use
[Actions → Release](https://github.com/DingTalk-Real-AI/dingtalk-workspace-cli/actions/workflows/release.yml)
to publish beta releases without manual approval. The same internal roles may
start a stable release, but a different repository administrator must approve
the `release-stable` Environment deployment before publication continues.
+11 -11
View File
@@ -1,33 +1,33 @@
class DingtalkWorkspaceCliBeta < Formula
desc "Automate DingTalk workspace tasks from the terminal (beta channel)"
homepage "https://github.com/DingTalk-Real-AI/dingtalk-workspace-cli"
version "1.0.55-beta.2"
version "1.0.55-beta.4"
license "Apache-2.0"
keg_only "it is the beta channel and conflicts with dingtalk-workspace-cli"
on_macos do
if Hardware::CPU.arm?
url "https://github.com/DingTalk-Real-AI/dingtalk-workspace-cli/releases/download/v1.0.55-beta.2/dws-darwin-arm64.tar.gz"
sha256 "fd23353c473419ce8cfaf316e7afff757cc4606291f4ad41a62c6f5625f45c8f"
url "https://github.com/DingTalk-Real-AI/dingtalk-workspace-cli/releases/download/v1.0.55-beta.4/dws-darwin-arm64.tar.gz"
sha256 "05b269fe44a125ee8b368d6228c5229950b8216872fb569741d1e30a83ce952a"
else
url "https://github.com/DingTalk-Real-AI/dingtalk-workspace-cli/releases/download/v1.0.55-beta.2/dws-darwin-amd64.tar.gz"
sha256 "0b429950a6449736338b504386d8009a4f2cdb0668f64f72a61cd503a25df193"
url "https://github.com/DingTalk-Real-AI/dingtalk-workspace-cli/releases/download/v1.0.55-beta.4/dws-darwin-amd64.tar.gz"
sha256 "b0d7604299336c83b7805d3b1a47a90668f2e2f3fc54702b0e846bb2907b6170"
end
end
on_linux do
if Hardware::CPU.arm?
url "https://github.com/DingTalk-Real-AI/dingtalk-workspace-cli/releases/download/v1.0.55-beta.2/dws-linux-arm64.tar.gz"
sha256 "c213a22d6187a8f68596b9f25d6277f5fd58cea5120f5b7caeef011fb41f1104"
url "https://github.com/DingTalk-Real-AI/dingtalk-workspace-cli/releases/download/v1.0.55-beta.4/dws-linux-arm64.tar.gz"
sha256 "a9c1dd5c6171091a84fc18e5081c9f75d037826cd3966726545d715ce832ae31"
else
url "https://github.com/DingTalk-Real-AI/dingtalk-workspace-cli/releases/download/v1.0.55-beta.2/dws-linux-amd64.tar.gz"
sha256 "4e041ba7b1d8038fa34deba3a3f78af8377f4361131d8bfdb1f1913e5f9454dc"
url "https://github.com/DingTalk-Real-AI/dingtalk-workspace-cli/releases/download/v1.0.55-beta.4/dws-linux-amd64.tar.gz"
sha256 "5e97ba398f5a3e15b9d235bc53f596d31a4d6b7af7bb2185b7b48beeda6a2ebb"
end
end
resource "skills" do
url "https://github.com/DingTalk-Real-AI/dingtalk-workspace-cli/releases/download/v1.0.55-beta.2/dws-skills.zip"
sha256 "1cec445c73b9ff569ca002b6548f4ee8383712447bc4cebd7701c6065774524a"
url "https://github.com/DingTalk-Real-AI/dingtalk-workspace-cli/releases/download/v1.0.55-beta.4/dws-skills.zip"
sha256 "4ebc0294b65d90adb5c5d639a548b528af240e4117ccca3d388e2efb6030170a"
end
def install
+2 -2
View File
@@ -39,8 +39,8 @@ help:
@printf " make package - Build all release artifacts locally\n"
@printf " make changelog-pre VERSION=vX.Y.Z-beta.N - Prepare prerelease notes\n"
@printf " make changelog-stable VERSION=vX.Y.Z FROM_BETA=vX.Y.Z-beta.N - Prepare stable notes\n"
@printf " make release-pre VERSION=vX.Y.Z-beta.N [PUBLISH=1] - Validate or publish prerelease\n"
@printf " make release-stable VERSION=vX.Y.Z FROM_BETA=vX.Y.Z-beta.N [PUBLISH=1] - Validate or publish stable\n"
@printf " make release-pre VERSION=vX.Y.Z-beta.N - Validate prerelease; publish official releases from Actions\n"
@printf " make release-stable VERSION=vX.Y.Z FROM_BETA=vX.Y.Z-beta.N - Validate stable; publish official releases from Actions\n"
@printf " make publish-homebrew-formula - Push dist/homebrew/dingtalk-workspace-cli.rb to a tap repo\n"
build:
+20 -7
View File
@@ -52,7 +52,13 @@ run.
```mermaid
flowchart TB
PR["Pull request"] --> CA["CI"]
PR["Pull request"] --> CLASSIFY["Fail-closed risk classification"]
CLASSIFY --> DOCS["Documentation-only<br/>asset/content validation"]
CLASSIFY --> STANDARD["Standard<br/>affected + reverse-dependent race<br/>scope-matched HEAD/base coverage"]
CLASSIFY --> HIGH["High-risk / main<br/>full race + native tests"]
DOCS --> CA["CI"]
STANDARD --> CA
HIGH --> CA
subgraph CA_CHECKS["Nine required contexts"]
L["Lint"]
T["Test"]
@@ -72,9 +78,16 @@ flowchart TB
PLATFORM --> RELEASE
```
Complete Multi-profile E2E and the ordinary full native-platform matrix are
downstream of PR admission. PRs still run primary-environment assurance and
fast cross-platform compilation; auth, keychain, OS-specific, installer, and
release changes additionally select native platform tests before merge. See
[`docs/ci-pr-gates.md`](ci-pr-gates.md) for the exact context and ruleset
contract.
All nine named contexts are produced for every tier. Domain-specific helpers
run when their owned surface is affected; otherwise the corresponding context
records an explicit unaffected success. Standard code changes still receive
representative Darwin/Windows compilation. High-risk PRs and protected `main`
run the complete race and native test suites, while platform-sensitive diffs
also receive native changed-code coverage.
Review orchestration is also base-owned: it requests one eligible peer without
executing PR code, re-routes an updated head when needed, and auto-merge
completes only after the latest push has peer approval plus the current
revision's nine strict contexts. Complete Multi-profile E2E remains downstream
of PR admission. See [`docs/ci-pr-gates.md`](ci-pr-gates.md) for the exact
classification, context, reviewer, and ruleset contract.
+26 -32
View File
@@ -62,32 +62,27 @@ make lint
git diff --check
```
## Homebrew Formula PR Automation
## Homebrew Formula Delivery
Official tag releases require the repository Actions secret
`HOMEBREW_PR_TOKEN`. Prefer a fine-grained personal access token owned by a
maintainer or release-bot account, limited to this repository with
`Contents: write` and `Pull requests: write`. If organization policy prevents
that account from targeting the repository, use a dedicated classic token with
only the `public_repo` scope. Do not reuse a broad developer token.
Official releases use the Release workflow's built-in `GITHUB_TOKEN` to update
exactly one tracked Formula after the immutable GitHub assets and their
checksums have passed verification. The publisher validates the rendered Ruby,
commits only the configured Formula path, never force-pushes `main`, and retries
from a fresh clone up to three times when `main` advances concurrently. Normal
stable and beta releases do not create a Formula PR or run a permission
canary. The workflow uses the existing repository-scoped
`HOMEBREW_PR_TOKEN` release identity because GitHub does not allow its built-in
Actions App to bypass this repository's rulesets. That identity is the sole
user bypass actor on the two default-branch rulesets. The workflow creates the
nine Code Admission checks for the Formula-only commit only after proving its
sole parent already has all nine successful checks and the committed Formula
exactly matches this release's verified bytes.
Store the dedicated token as the `HOMEBREW_PR_TOKEN` repository Actions secret
and rotate it before its configured expiration. Replace it immediately if it is
exposed, its owner loses repository access, or the release-bot ownership
changes. The Release workflow uses this
dedicated token only to push an `automation/homebrew-*` branch and open the
stable or beta Formula PR. It does not push Formula changes directly to `main`.
The default-branch governance preflight and every tag contract authenticate the
token before publication, reject over-scoped classic tokens, confirm its
identity, and run a controlled write canary. The canary pushes a unique
`automation/homebrew-token-canary-*` branch with a `[skip ci]` commit, creates a
draft PR, closes it, and deletes the branch with the same token. This proves both
Contents and Pull requests write access before publication without merging
anything. The gate also rejects reuse of `RELEASE_GOVERNANCE_TOKEN`.
No maintainer environment variable is required when creating a tag. Using the
built-in `GITHUB_TOKEN` is insufficient because organization policy prevents
Actions from creating pull requests, and its generated PR events may require
separate workflow approval.
Keep `HOMEBREW_PR_TOKEN` repository-scoped with `Contents: write` and
`Pull requests: write` (the latter remains necessary for withdrawal rollback),
keep its owner as the designated ruleset bypass actor, and do not reuse
`RELEASE_GOVERNANCE_TOKEN`. The workflow and publisher provide the Formula-only
path restriction; GitHub rulesets do not infer that restriction from the token.
## Release Governance and Recovery
@@ -98,15 +93,14 @@ administration setting and cannot be read by the workflow's built-in
contract use this same credential so a missing or expired identity is detected
before an irreversible tag is created.
Create a protected `release-recovery` environment limited to protected
branches, with a required reviewer, self-review disabled, and administrator
bypass disabled. The workflow reads the environment through the GitHub API and
fails closed unless the required-reviewer, prevent-self-review, and protected-
branch rules are present.
Recovery is restricted to an existing annotated tag whose exact tag object,
commit, and failed tag-push run all match; it then reuses the normal release
jobs. Do not put publication secrets in temporary branches or create ad-hoc
recovery workflows.
commit, sealed metadata, original failed run/attempt, requester identity and
Release state all match; it then reuses the normal release jobs without a
second-person environment approval. A same-run “Re-run failed jobs” is even
lighter: the seal job may adopt an existing tag only when its complete
authority matches that run and its original attempt is not newer than the
current attempt. Do not put publication secrets in temporary branches or
create ad-hoc recovery workflows.
Cloud-sealed releases mirror to OSS only when the repository variable
`ENABLE_OSS_MIRROR` is exactly `true`. Leave the variable unset while no Bucket
+59 -18
View File
@@ -4,9 +4,9 @@ The pull-request admission layer has exactly nine required external contexts:
| Required context | Contract |
|---|---|
| `Lint` | Stable PR revision classification, formatting, `go vet`, and Actionlint |
| `Test` | Race/unit/release-script tests plus fast cross-platform compilation |
| `Coverage` | Overall non-regression and 100% changed-code coverage |
| `Lint` | Stable PR revision/risk classification plus applicable formatting, `go vet`, and Actionlint |
| `Test` | Tier-selected race/unit/release-script tests plus representative cross-platform compilation |
| `Coverage` | Scope-matched overall non-regression and 100% changed-code coverage |
| `Policy` | Repository policy and the fail-closed CHANGELOG contract |
| `Edition` | Edition contract tests |
| `Interface Integrity` | CLI, Schema, Skill, and stable-release compatibility |
@@ -84,13 +84,28 @@ second file but still rejects invalid dates or versions, missing bullets,
placeholder `TODO`/`TBD`, unmanaged-section changes, and unsafe tree modes.
Adding a second file therefore cannot bypass CHANGELOG validation.
## Platform and downstream boundaries
## Risk tiers and downstream boundaries
Ordinary PRs run the primary Linux assurance plus fast Darwin/Windows compile
checks. Full native macOS/Windows tests and platform coverage run on a PR only
when its diff touches auth, keychain, OS-specific Go files, installers,
packaging, Formulae, or release automation. Protected `main` pushes run the
complete native matrix.
`Lint` resolves the complete base/head diff before any helper is skipped.
Unknown or truncated input fails closed into the high-risk tier.
| Tier | Selection | Admission work |
|---|---|---|
| Documentation-only | Only prose/documentation assets; no executable, generated, workflow, packaging, or interface surface | Documentation and repository-asset validation; expensive code helpers skip while every required context still succeeds |
| Standard | Ordinary code change with a stable package graph | Race tests for changed Go packages and their reverse dependencies; candidate and merge-base coverage over the same impacted scope and `coverpkg`; representative Darwin/Windows compilation |
| High-risk / protected `main` | Workflow/policy, package add/remove/rename, generated Schema/registry, platform, auth/keychain, installer, packaging, release, transport, recovery, or an unprovable infrastructure classification | Complete race suite and full native macOS/Windows tests, plus every affected domain gate |
Domain helpers (`Edition`, `Interface Integrity`, `CLI Smoke`, and `Mock MCP`,
for example) execute their substantive suites when the diff can affect that
contract or when the high-risk tier is selected. Otherwise their stable named
contexts still report a successful, explicit unaffected result. Release-script
tests follow the same impact rule. This preserves the ruleset contract without
charging every developer for unrelated work.
Platform-sensitive changes additionally run native changed-code coverage.
Protected `main` always runs native tests; generic portable changes are held to
the Linux changed-code gate rather than being forced to manufacture
platform-only coverage.
Complete `Multi-profile E2E` is not a PR admission context. It belongs to the
`Main Integration — 主干集成` workflow and runs only after a push to `main` (or
@@ -116,9 +131,28 @@ flowchart TB
MAIN --> RELEASE["Release delivery"]
```
## Review ownership and auto-merge
A base-owned `pull_request_target` workflow routes newly opened, updated,
reopened, or newly ready PRs targeting `main` to one eligible peer reviewer. It
does not check out or execute PR code, excludes both the author and the known
latest pusher, and balances the open requested-review load across the reviewed
maintainer pool. A current-head approval or change request is preserved; after
a new push, stale activity does not suppress a fresh request, and an
outstanding change requester is preferred for continuity.
The branch ruleset keeps one human approval and all nine strict required
contexts, and requires someone other than the latest pusher to approve after
the most recent head update. Repository auto-merge is enabled for ready PRs,
so a PR merges after that approval and the current revision's nine checks are
green. If `main` advances, strict checks rerun before merge. The reviewer
router is orchestration, not a quality context, and must not be added to the
ruleset.
## Running focused gates locally
Run the contracts relevant to the change:
Run the contracts relevant to the change. Ordinary contributors are not
expected to repeat every CI job locally:
```sh
make build
@@ -139,15 +173,18 @@ base_ref=$(git merge-base HEAD origin/main)
./scripts/policy/check-changelog-pr.sh --fast-path "$base_ref" HEAD
```
`make coverage-gate` is an enforcement step, not a profile generator. CI
generates the candidate, supporting, merge-base, and (when risk-selected)
native profiles before the aggregate `Coverage` context evaluates them. The
`make coverage-gate` is an enforcement step, not a profile generator. For a
standard PR, CI derives changed packages and their reverse-dependency test
closure, then generates candidate and merge-base profiles with the same test
scope and `coverpkg`. High-risk and protected-main runs use the complete
profiles. Supporting and (when platform-selected) native profiles are
generated before the aggregate `Coverage` context evaluates them. The
aggregate and native gates require 100% coverage for changed executable Go
statements. Overall coverage remains an unrounded, zero-tolerance merge-base
non-regression check. Candidate and baseline profiles are evaluated by the
same block-deduplicating checker; supporting policy and shortcut profiles
contribute to changed-code coverage only. The checked-in badge is presentation
only and is never read as a gate input.
statements. Overall coverage remains an unrounded, zero-tolerance,
scope-matched merge-base non-regression check. Candidate and baseline profiles
are evaluated by the same block-deduplicating checker; supporting policy and
shortcut profiles contribute to changed-code coverage only. The checked-in
badge is presentation only and is never read as a gate input.
Compatibility checks derive authoritative Interface snapshots from the PR
merge-base and the latest reachable stable release. The candidate cannot bless
@@ -175,3 +212,7 @@ Do not require helper jobs, `Multi-profile E2E`, or an aggregate admission
alias. Update ruleset contexts only after the new names have appeared on the
protected branch, so a rename cannot silently remove enforcement or leave an
unproducible required context.
The branch ruleset also requires one approval after the latest push. Enable
repository auto-merge and automatic head-branch deletion; keep the base-owned
reviewer router outside the required-context list.
+33 -28
View File
@@ -1,19 +1,26 @@
# 发布手册(预发 / 正式)
发布只走一条受控链路:GitHub Actions 的 `Release` workflow 负责版本分配、封板、构建、签名和下游发布;Homebrew 以 workflow 自动创建的 Formula PR 经独立审核合入为交付边界。本地 `dws-release` 仍是兼容入口,但不再要求某一台固定电脑承担打包;不要直接运行 `goreleaser release`,也不要手工补打、移动或复用 tag。
发布只走一条受控链路:GitHub Actions 的 `Release` workflow 负责版本分配、封板、构建、签名和下游发布;Homebrew Formula 在不可变 Release 资产及 checksum 通过校验后,由同一 workflow 直接写入 `main`,不再创建二次 PR。本地 `dws-release` 仍是兼容入口,但不再要求某一台固定电脑承担打包;不要直接运行 `goreleaser release`,也不要手工补打、移动或复用 tag。
发布前必须完成平台治理:目标 GitHub 仓库已启用 immutable releases,`main` 精确要求 `CI` workflow 的九个 context:`Lint`、`Test`、`Coverage`、`Policy`、`Edition`、`Interface Integrity`、`AI Behavior`、`CLI Smoke`、`Mock MCP`。云端和本地入口都会在封 tag 前检查 immutable releases、当前 SHA 的全部九个 context 和在途 Release;`v*` tag ruleset 仍需仓库管理员预先配置。
发布前必须完成平台治理:目标 GitHub 仓库已启用 immutable releases,`main` 精确要求 `CI` workflow 的九个 context:`Lint`、`Test`、`Coverage`、`Policy`、`Edition`、`Interface Integrity`、`AI Behavior`、`CLI Smoke`、`Mock MCP`。云端入口会在封 tag 前检查 immutable releases、当前 SHA 的全部九个 context、Environment 保护规则和在途 Release;`v*` tag ruleset 仍需仓库管理员预先配置。
## 推荐入口:GitHub 云端发布
任何具有仓库写权限、因而可以手动运行 Actions workflow 的成员,都可以基于当时最新的 `main` 发起发布:
入口页面是 [GitHub Actions → Release](https://github.com/DingTalk-Real-AI/dingtalk-workspace-cli/actions/workflows/release.yml)。在仓库页面依次点击 `Actions` → `Release` → `Run workflow` 即可操作;不需要通过 Agent 或本地机器触发。
1. 在 GitHub Actions 打开 `Release`,选择 `Run workflow`,分支必须是默认分支 `main`。
只有得到该仓库明确授权、最终权限为 `write`、`maintain` 或 `admin` 的协作者可以运行发布操作,workflow 还会对发起人和重新运行者做同样的权限复核。没有仓库写权限的外部贡献者以及仅有 `read` / `triage` 权限的成员不能规划或发布版本。两个渠道的授权边界如下:
- beta:上述任一内部成员都可以直接规划和发布,不需要人工审批。
- stable:上述任一内部成员都可以规划并发起发布;完成只读规划和治理检查后,workflow 会在 `release-stable` Environment 等待另一名仓库管理员通过 `Review deployments` 签收。申请人不能批准自己的请求,批准后原 run 自动继续,无需重新触发。
基于当时最新的 `main` 发起发布:
1. 在上述 `Release` 页面选择 `Run workflow`,分支必须是默认分支 `main`。
2. `release_operation=plan`,选择 `release_channel=beta|stable`;仅在开始新 beta 线时选择 `release_bump=patch|minor|major`。
3. workflow summary 会给出唯一的下一版本。把对应的精确 `CHANGELOG.md` 章节通过 PR 合入 `main`。
4. 再次运行,改为 `release_operation=publish`,并输入 `PUBLISH beta` 或 `PUBLISH stable`。
4. 再次运行,改为 `release_operation=publish`。beta 会直接进入自动化发布;stable 会在封 tag 前等待管理员签收。
`plan` 是纯只读操作,不创建 tag、预留版本号或生成包。CHANGELOG 合入期间若另一个发布先占用了该版本,`publish` 会重新分配并因 CHANGELOG 章节不匹配而拒绝,需要重新 plan。`publish` 会先再次确认 dispatch SHA 仍是当前 `main`、Code Admission 和平台治理均通过,再由唯一的 write job 使用 GitHub API 原子创建 annotated tag;同一次 run 随即进入既有的跨平台构建、GitHub/npm、可选 OSS/Gitee 发布和 Homebrew PR DAG。内置 `GITHUB_TOKEN` 创建的 tag 不依赖第二条 workflow 被再次触发。
`plan` 是纯只读操作,不创建 tag、预留版本号或生成包。CHANGELOG 合入期间若另一个发布先占用了该版本,`publish` 会重新分配并因 CHANGELOG 章节不匹配而拒绝,需要重新 plan。`publish` 会先再次确认 dispatch SHA 仍是当前 `main`、Code Admission 和平台治理均通过,再由唯一的 write job 使用 GitHub API 原子创建 annotated tag;同一次 run 随即进入既有的跨平台构建、GitHub/npm、可选 OSS/Gitee 发布和 Homebrew 直交付 DAG。内置 `GITHUB_TOKEN` 创建的 tag 不依赖第二条 workflow 被再次触发。
为缩短封板前后的关键路径,`publish` 的只读版本规划会与平台治理检查并行,seal 仍严格等待二者成功;plan 在 candidate annotated tag 上验证过的 contract 和 stable/beta baseline 会绑定进 seal,并由 seal 后的 tag authority 检查复用。Code Admission 状态与 immutable-releases 治理仍会在 seal 后再次读取,避免 preflight 与发布之间的状态变化被忽略。随后三类只读门禁(release automation、命令兼容性、multi-profile E2E)与 GoReleaser 构建并行;Node/archive 等仅供后处理使用的工具也延后到构建完成后安装。并行和已验证结果复用只改变调度,不降低发布门禁:任何一条验证失败都会阻止 GitHub Release、npm、镜像和 Homebrew 发布,delivery proof 也要求三条验证 job 全部成功。
@@ -64,7 +71,9 @@ dws-release
dws-release config --remote origin
```
之后命令按仓库状态自动走到正确步骤:缺少精确 CHANGELOG 章节时只生成模板并停止;补全、提交并合入 `main` 后,再运行同一条命令就会安全快进本地 `main` 并执行完整预检。若同名 remote 后续被改指向其他仓库会直接拒绝。只有显式增加 `--publish` 才会进入 tag 发布,且底层仍要求最终版本确认。
之后命令按仓库状态自动走到正确步骤:缺少精确 CHANGELOG 章节时只生成模板并停止;补全、提交并合入 `main` 后,再运行同一条命令就会安全快进本地 `main` 并执行完整预检。若同名 remote 后续被改指向其他仓库会直接拒绝。官方仓库不再接受本地 `--publish`,命令会直接提示上述 Actions 页面;本地入口不能绕过 beta/stable 的统一授权。
Release workflow 不再监听新建的 `v*` tag;直接推 tag 不会发布 GitHub Release、npm 或镜像渠道。所有新 beta/stable 都必须从云端页面进入统一授权和审计链路;历史失败版本仍可通过受保护的 recovery 兼容处理。
## 发布模型
@@ -91,13 +100,7 @@ dws-release v1.2.3-beta.1
dws-release v1.2.3-beta.1
```
预检包含测试、策略检查、旧正式版命令树兼容检查、全平台打包、npm 安装验证,以及 macOS 环境下的 Homebrew 安装验证。它还会从默认分支触发一次无发布权限的 `Release governance preflight`,用正式流水线相同的身份检查该精确 commit 的九个 Code Admission context 和 immutable releases。通过后会在当前 Git worktree 的私有 Git 状态目录写入一个有效期六小时的证明,绑定版本、精确 commit、发布仓库、beta/stable 基线和远端 `main`:
```bash
dws-release v1.2.3-beta.1 --publish
```
若源码、版本、远端身份和 stable 基线均未变化,`--publish` 会复用该证明,只执行远端契约、发布身份和最终治理复核,不再重复测试与打包。也可以直接运行 `--publish`;没有可复用证明时只会完整执行一次预检。命令在封 tag 前仍要求再次输入完整版本号,统一入口不提供跳过确认的参数。
预检包含测试、策略检查、旧正式版命令树兼容检查、全平台打包、npm 安装验证,以及 macOS 环境下的 Homebrew 安装验证。它还会从默认分支触发一次无发布权限的 `Release governance preflight`,用正式流水线相同的身份检查该精确 commit 的九个 Code Admission context 和 immutable releases。通过后回到上述 Actions 页面选择 beta 和 `release_operation=publish`;云端会重新绑定当前 `main`,然后直接进入 beta 自动发布,不需要人工审批或输入确认短语。
## 正式发布
@@ -107,14 +110,13 @@ beta 验证通过后,运行正式版入口:
dws-release v1.2.3 --from-beta v1.2.3-beta.1
```
首次运行只生成正式版 CHANGELOG 并停止。补全内容、删除 `TODO`,提交后通过 PR 合入 `main`;重新运行同一条命令做完整预检,确认后增加 `--publish`:
首次运行只生成正式版 CHANGELOG 并停止。补全内容、删除 `TODO`,提交后通过 PR 合入 `main`;重新运行同一条命令做完整预检:
```bash
dws-release v1.2.3 --from-beta v1.2.3-beta.1
dws-release v1.2.3 --from-beta v1.2.3-beta.1 --publish
```
本地入口的 `FROM_BETA` 不会自动推断;云端入口会按上述规则唯一选择。两种入口都会把它写入 stable annotated tag 的 `From-Beta` 元数据,CI 会再次读取和验证。
预检通过后,在 Actions 页面选择 stable 和 `release_operation=publish`。云端入口会按上述规则唯一选择 beta,并把它写入 stable annotated tag 的 `From-Beta` 元数据;在创建 tag 前必须由另一名仓库管理员签收。
## CHANGELOG 契约
@@ -132,14 +134,14 @@ dws-release v1.2.3 --from-beta v1.2.3-beta.1 --publish
## CI/CD 保证
- 只接受 `vX.Y.Z-beta.N` 和 `vX.Y.Z`,且新版本必须高于上一正式版。这里的“上一正式版”必须同时具备公开非草稿 GitHub Release 和同 tag/commit 的成功 Release workflow;只有 tag、没有交付成功的孤儿版本会阻断后续发布,要求走受保护恢复补齐。云端 tag 会固定 `Release-Run`、requester、commit 和版本分配指纹,交付验证按该精确 run/attempt 及完整 job graph 取证,不接受任意 `workflow_dispatch`。历史版本若曾通过专用 recovery workflow 完成交付,只能使用仓库内 `delivered-stable-recoveries.json` 中精确到 tag、commit、run、workflow SHA 与 attempt 的 reviewed 证据。
- tag 必须是 annotated tag;本地脚本要求封板提交已通过 PR 合入并包含在远端 `main` 历史中,发布只推送 tag。CI 允许其后 `main` 继续前进,但始终要求封板提交位于 `main` 历史中。
- 只接受 `vX.Y.Z-beta.N` 和 `vX.Y.Z`,且新版本必须高于上一正式版。这里的“上一正式版”必须同时具备公开非草稿 GitHub Release 和同 tag/commit 的成功 Release workflow;只有 tag、没有交付成功的孤儿版本会阻断后续发布,要求走机器核验恢复补齐。云端 tag 会固定 `Release-Run`、requester、commit 和版本分配指纹,交付验证按该精确 run/attempt 及完整 job graph 取证,不接受任意 `workflow_dispatch`。历史版本若曾通过专用 recovery workflow 完成交付,只能使用仓库内 `delivered-stable-recoveries.json` 中精确到 tag、commit、run、workflow SHA 与 attempt 的 reviewed 证据。
- tag 必须由云端 seal job 创建为 annotated tag;封板提交必须已通过 PR 合入并包含在远端 `main` 历史中。流水线允许其后 `main` 继续前进,但始终要求封板提交位于 `main` 历史中。
- 日常 CI 和发布前都会对比“最新已交付正式版”的完整命令树;若长时间预检期间该 baseline 发生变化,会针对新的 baseline 重新比较。
- GoReleaser 只构建;Darwin 重签、checksums 重算和 npm 安装验证通过后,才统一上传 GitHub Release 的最终产物。
- 六个平台归档会逐个解包并核验二进制内嵌版本;公开资产集合、checksums 集合和 npm tarball integrity 都必须精确一致。npm tarball 固定由 npm `10.9.2` 打包,避免重跑时因 runner 自带 npm 漂移产生不同字节。
- stable 发布到 npm `latest`;prerelease 发布到 npm `beta`。启用 `ENABLE_OSS_MIRROR=true` 后,stable 同步 OSS `latest.txt` 和共享安装脚本,prerelease 只同步 OSS `beta.txt`,不会覆盖稳定入口。
- Release workflow 使用一个最多容纳 100 个 pending run 的串行 publication queue;版本规划、云端封板、发布、恢复、修复和撤回共享同一发布锁。
- 本地 tag push 失败时会删除本次新建的本地 tag。远端 tag 一旦创建,后续发布归 CI 所有;发布中途失败时走受保护恢复,禁止改 tag 指向或复用版本号。只有已经公开版本经过受保护的全渠道撤回并留下永久 `withdrawn/...` 墓碑后,撤回 workflow 才会在最后一步删除原 tag。
- 云端 seal 创建远端 tag 后,后续发布归同一 run 所有;发布中途失败时先重跑同一 run 的失败 jobs,必须跨 run 时走机器核验恢复,禁止改 tag 指向或复用版本号。只有已经公开版本经过受保护的全渠道撤回并留下永久 `withdrawn/...` 墓碑后,撤回 workflow 才会在最后一步删除原 tag。
npm 补发只允许从默认分支触发 Release workflow 的 `repair_npm_version`。它只支持启用 immutable releases 后、由本流水线成功产出的公开 immutable release:目标必须是 `main` 历史中的 annotated tag,并且同 commit 的 `Build immutable GitHub Release` job 已成功。即使后续 npm 分发失败,这个独立的产物封存边界仍可作为补发依据。补发会用目标 commit 的 npm 模板重组包,逐平台核验资产和二进制版本,再发布到隔离的 `backfill` dist-tag,不会回滚 `latest` / `beta`。历史 mutable release 不进入自动补发路径,避免把可被替换的资产带入 npm。
@@ -166,32 +168,35 @@ dws-release recover v1.2.3-beta.1
- 输入精确绑定原 annotated tag object、commit 和失败的 sealed `Release` run;云端 run 还必须与 tag 内的 run ID、attempt、requester 完全一致,commit 必须仍在 `main` 历史中。
- 目标只允许不存在 GitHub Release 或仍为 Draft;已经公开的版本不能全量重建:单个下游故障走对应的 channel repair,版本本身有问题则走受保护的全平台 withdrawal。
- `release-recovery` environment 必须限制为受保护分支、配置至少一名 required reviewer,并禁止自审;workflow 会通过 API 复核这些设置,未配置时 fail closed。
- 恢复不再进入人工审批 environment。workflow 会机器核验 tag object、commit、原失败 run/attempt、请求人、完整 seal metadata、`main` 祖先关系以及 Release 状态;任一事实不一致都会在构建前 fail closed。
- 恢复复用正常的 contract、构建、Developer ID 签名、资产校验、immutable 发布、Homebrew、npm,以及已启用的 OSS jobs,不存在 recovery 专用 publisher 或门禁跳过。
- 如果 GitHub Release 已在 recovery 中封存、后续 Homebrew/npm 校验发生瞬时失败,只重跑该 run 的 failed jobs;流水线仅在隐藏 run marker、tag object、commit 和 finalized artifact 字节全部精确一致时复用公开 Release。
成功的默认分支恢复 run 会成为后续 beta → stable 和 stable baseline 验证的可审计交付证据;历史临时分支恢复仍只接受 reviewed manifest 中的固定证据。
云端 seal 后不要使用 GitHub 的 “Re-run failed jobs” 作为交付修复:annotated tag 永久绑定最初的 run attempt,普通 rerun 不会成为可接受的交付证据。GitHub Release 尚未公开时走上述 protected recovery;已经公开且仅 npm/OSS/Gitee 某一渠道失败时走对应 repair;版本内容本身有问题时走 withdrawal。
seal job 写入 tag 后如果只因 GitHub API 瞬时 404/429/5xx 或后续 job 失败,可直接使用 GitHub 的 “Re-run failed jobs”。同一 run 会精确复用原 release-plan;seal 只在 version、tag object、commit、channel、beta 来源、OSS policy、请求人、run ID 和完整 message 全部匹配且原 attempt 不大于当前 attempt 时认领已有 tag。不同 run 或任一字段不匹配时不会认领。GitHub Release 尚未公开且必须跨 run 重建时走上述机器核验 recovery;已经公开且仅 npm/OSS/Gitee 某一渠道失败时走对应 repair;版本内容本身有问题时走 withdrawal。
OSS 的 `latest.txt` / `beta.txt` 是镜像频道元数据;当前仓库安装器仍主要从 GitHub/Gitee 解析版本。启用 OSS 后,发布和撤回把它作为受控分发渠道处理,保证一旦外部消费者接入该 pointer,也不会继续解析到已撤回版本;未启用时两条流程都明确跳过不存在的 OSS 渠道。
Release workflow 会生成 Darwin/Linux 双架构 Formula,并分别为 stable/beta 打开 Homebrew PR;tap 的默认分支仍以独立审核合入为交付边界。撤回 workflow 使用相同模板和回退版本 checksums 打开反向 PR;问题 GitHub Release 会先被移除以阻止新安装,永久墓碑和 workflow 日志承担审计/续跑依据。
Release workflow 会生成 Darwin/Linux 双架构 Formula,并在不可变资产逐个校验后,由 `HOMEBREW_PR_TOKEN` 所属的受控发布身份只提交对应 stable 或 beta Formula 文件到 `main`,不再创建二次发布 PR;并发 `main` 更新会以全新 clone 最多重试三次,绝不 force push。该身份的提交不会依赖另一轮 CI 来补齐证明:workflow 只在确认该 commit 单父、唯一改动为目标 Formula、内容与本次已验证产物逐字节一致,且父 commit 九项 Code Admission 全绿后,直接为 Formula-only commit 封存同名九项成功 checks,避免下一次发布因缺失 contexts 被卡住。撤回 workflow 暂时仍使用相同模板和回退版本 checksums 打开反向 PR;问题 GitHub Release 会先被移除以阻止新安装,永久墓碑和 workflow 日志承担审计/续跑依据。
## 平台治理前置
仓库管理员还需要在 GitHub 平台配置以下不可由脚本替代的规则:
- `main` 必须精确要求 `Lint`、`Test`、`Coverage`、`Policy`、`Edition`、`Interface Integrity`、`AI Behavior`、`CLI Smoke`、`Mock MCP` 九个 Code Admission context;tag workflow 也会通过 Checks API 再确认该封板 SHA 上九项全部成功。
- `main` 必须精确要求 `Lint`、`Test`、`Coverage`、`Policy`、`Edition`、`Interface Integrity`、`AI Behavior`、`CLI Smoke`、`Mock MCP` 九个 Code Admission context;Release workflow 也会通过 Checks API 再确认该封板 SHA 上九项全部成功。
- 必须启用 immutable releases;它只保护启用后发布的 release,因此应在第一次使用新流水线前配置。为 `v*` 增加 tag ruleset,限制创建权限,并在 release 发布前保护 tag 的短暂窗口。
- tag ruleset 还必须覆盖 `withdrawn/v*`:只允许受保护的撤回 workflow 创建墓碑,禁止更新或删除墓碑;同时应允许 Release workflow 创建新的 `v*`,允许撤回 workflow 在全部渠道回退后删除精确的问题 `v*`。若组织级规则阻止这两个 workflow 的预期动作,发布或撤回会 fail closed,不能靠手工移动 tag 绕过。
- 配置 `RELEASE_GOVERNANCE_TOKEN` Actions secret,只授予目标仓库 `Administration: read`;内置 `GITHUB_TOKEN` 不具备 immutable-releases API 所需的仓库治理权限。每次本地预检和 tag workflow 都使用这一个身份进行 fail-closed 验证。
- 配置 `RELEASE_GOVERNANCE_TOKEN` Actions secret,只授予目标仓库 `Administration: read`;内置 `GITHUB_TOKEN` 不具备 immutable-releases API 所需的仓库治理权限。每次本地预检和云端发布都使用这一个身份进行 fail-closed 验证。
- 配置 `APPLE_CERTIFICATE_P12_BASE64`、`APPLE_CERTIFICATE_PASSWORD` 和具备发布权限的 `NPM_TOKEN`;撤回还要求该 npm 身份能够执行 `deprecate` 和修改 dist-tag。
- 启用 OSS 镜像时,先创建有效 Bucket,再设置仓库变量 `ENABLE_OSS_MIRROR=true`,并配置 `OSS_ACCESS_KEY_ID`、`OSS_ACCESS_KEY_SECRET`、`OSS_ENDPOINT`、`OSS_BUCKET`,按需配置 `OSS_PREFIX`。启用后发布保持 fail-closed;撤回身份必须能够补齐安全版本资产、写 `latest.txt` / `beta.txt` 并删除问题版本前缀。尚未 provision Bucket 时保持该变量未设置或不等于 `true`,新 tag 会封存 `OSS-Mirror: deferred` 并跳过 OSS;该版本不能通过现有 repair 流程事后改成启用。
- 若启用 Gitee fallback,设置 `ENABLE_GITEE_UPLOAD_FALLBACK=true`,并配置 `GITEE_TOKEN`、`GITEE_USER`、`GITEE_REPO`;该身份必须能够创建和删除目标仓库的 Release 与 tag。
- 单独配置 `HOMEBREW_PR_TOKEN`,优先使用仅授权本仓库且具备 `Contents: write`、`Pull requests: write` 的 fine-grained PAT;若组织策略不允许该账号使用 fine-grained PAT,则回退到仅带 `public_repo` scope 的专用 classic PAT。治理预检和 tag contract 会验证 token 身份、classic scope,并用 `[skip ci]` 临时分支和 draft PR 完成真实写权限 canary,随后立即关闭 PR、删除分支;任何清理失败都会 fail closed。门禁也会拒绝与治理 token 复用。
- 创建 `release-recovery` environment,只允许受保护分支,设置 required reviewer、禁止自审并关闭管理员绕过。workflow 会读取 environment 的 required-reviewer、prevent-self-review 和 protected-branch 规则;规则缺失时紧急恢复会失败,正常 beta/stable tag 发布不受影响。
- 正常 Homebrew 发布使用现有的 `HOMEBREW_PR_TOKEN` 直接提交 Formula-only commit,不再创建 Homebrew PR,也不跑权限 canary。GitHub 不允许内置 Actions App 作为当前仓库 ruleset 的 bypass actor,因此两个默认分支 ruleset 都只给该 token 所属的指定发布管理员用户 `always` bypass;仓库脚本仍会限制提交路径、校验 Ruby、禁止 force push,并在并发更新时重新基于最新 `main`。
- `HOMEBREW_PR_TOKEN` 应保持仓库范围的 `Contents: write` 与 `Pull requests: write` 权限;后者仅供撤回流程创建回退 PR。不要与 `RELEASE_GOVERNANCE_TOKEN` 复用,并定期审计 token owner 与 ruleset bypass actor 一致。
- 创建 `release-beta` environment,只允许受保护分支且不配置 required reviewer;仓库内部 `write`、`maintain`、`admin` 成员的 beta 发布会直接通过该边界。
- 创建 `release-stable` environment,只允许受保护分支,以仓库管理员为 required reviewer,禁止申请人自审并关闭管理员绕过。内部成员可以发起 stable,但必须由另一名管理员签收后才能封 tag 和写入任何发布渠道。
- Release workflow 会在封 tag 前回读并验证上述两套 Environment 规则;规则缺失、stable reviewer 不再是仓库管理员、或 beta 被误加人工审批时都会 fail closed。
- 创建 `release-withdrawal` environment,只允许受保护分支,设置至少一名 required reviewer、禁止申请人自审并关闭管理员绕过。撤回 workflow 会通过 API 复核这些规则;任何一项缺失都会在触碰 npm、OSS、Gitee、Homebrew 或 GitHub Release 前失败。
- 仓库或组织的 Actions 策略必须允许 `Release` 与 `Withdraw release` workflow 的 `GITHUB_TOKEN` 获得各 job 声明的 `contents: write`。若上述发布凭证采用 environment secret,确认 `release-withdrawal` 审批完成后能够读取撤回所需的 npm、OSS、Gitee 和 Homebrew 凭证。
- 仓库或组织的 Actions 策略必须允许 `Release` 与 `Withdraw release` workflow 的 `GITHUB_TOKEN` 获得各 job 声明的权限;正常发布由 `HOMEBREW_PR_TOKEN` 更新两个受控 Formula 路径,内置 token 只承担 workflow 自身声明的封板与校验写入。若撤回凭证采用 environment secret,确认 `release-withdrawal` 审批完成后能够读取撤回所需的 npm、OSS、Gitee 和 Homebrew 凭证。
immutable releases,或任一 Code Admission context 缺失、未成功时,发布脚本会自动拒绝封 tag。tag ruleset 可能来自组织层,脚本不自动推断其最终作用范围;管理员确认不能省略,脚本约定也不能替代平台强制。
@@ -0,0 +1,358 @@
// Copyright 2026 Alibaba Group
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
package app
import (
"bytes"
"encoding/json"
"fmt"
"strings"
"testing"
"github.com/DingTalk-Real-AI/dingtalk-workspace-cli/internal/shortcut"
)
const publicShortcutSchemaCount = 210
func TestEmbeddedSchemaPublishesEveryPublicShortcutContract(t *testing.T) {
tools := embeddedSchemaAllToolsForHelpFlagTest(t, NewRootCommand())
public := make([]shortcut.Shortcut, 0, publicShortcutSchemaCount)
for _, candidate := range shortcut.All() {
if candidate.UserDefined || !shortcut.InPublicCatalog(candidate.Service, candidate.Command) {
continue
}
public = append(public, candidate)
}
if got := len(public); got != publicShortcutSchemaCount {
t.Fatalf("public built-in shortcuts = %d, want %d", got, publicShortcutSchemaCount)
}
deliveredShortcuts := 0
for canonical := range tools {
if strings.Contains(canonical, ".shortcut_") {
deliveredShortcuts++
}
}
if deliveredShortcuts != publicShortcutSchemaCount {
t.Fatalf("embedded schema --all shortcut tools = %d, want %d", deliveredShortcuts, publicShortcutSchemaCount)
}
for _, declared := range public {
declared := declared
t.Run(declared.Service+"/"+strings.TrimPrefix(declared.Command, "+"), func(t *testing.T) {
canonical := shortcutSchemaCanonical(declared)
tool := tools[canonical]
if tool == nil {
t.Fatalf("embedded schema --all is missing %s (%s %s)", canonical, declared.Service, declared.Command)
}
assertEmbeddedShortcutIdentityAndSelection(t, tool, declared, canonical)
assertEmbeddedShortcutSafetyAndInterface(t, tool, declared, canonical)
assertEmbeddedShortcutParameters(t, tool, declared, canonical)
assertEmbeddedShortcutConstraints(t, tool, declared, canonical)
})
}
}
func TestEmbeddedShortcutProgressiveQueriesReturnCompleteContracts(t *testing.T) {
leaf := executeShortcutSchemaQuery(t, "--cli-path", "chat +messages-read-status")
if got, want := schemaContractString(leaf["canonical_path"]), "chat.shortcut_messages_read_status"; got != want {
t.Fatalf("shortcut leaf canonical_path = %q, want %q", got, want)
}
if got, want := schemaContractString(leaf["confirmation"]), "not_required"; got != want {
t.Fatalf("shortcut leaf confirmation = %q, want %q", got, want)
}
conversationID := schemaContractMap(leaf["parameters"])["conversation-id"]
if required, _ := conversationID["required"].(bool); !required {
t.Fatal("public --conversation-id must become required after hidden compatibility aliases are removed from Schema")
}
if got := leaf["constraints"]; got != nil {
t.Fatalf("shortcut leaf constraints = %#v, want omitted after hidden compatibility aliases collapse", got)
}
constrainedLeaf := executeShortcutSchemaQuery(t, "--cli-path", "calendar +freebusy")
wantConstraints := map[string]any{
"require_one_of": [][]string{{"users", "rooms"}},
}
if got := constrainedLeaf["constraints"]; !schemaContractJSONEqual(got, wantConstraints) {
t.Fatalf("shortcut leaf constraints = %#v, want %#v", got, wantConstraints)
}
product := executeShortcutSchemaQuery(t, "chat")
productPayload, _ := product["product"].(map[string]any)
if got, want := int(product["count"].(float64)), 120; got != want {
t.Fatalf("schema chat count = %d, want %d", got, want)
}
summaries := schemaContractObjectSlice(productPayload["tools"])
shortcutCount := 0
for _, summary := range summaries {
if strings.HasPrefix(schemaContractString(summary["canonical_path"]), "chat.shortcut_") {
shortcutCount++
}
}
if shortcutCount != 42 {
t.Fatalf("schema chat shortcut summaries = %d, want 42", shortcutCount)
}
}
func executeShortcutSchemaQuery(t testing.TB, args ...string) map[string]any {
t.Helper()
root := NewRootCommand()
var stdout, stderr bytes.Buffer
root.SetOut(&stdout)
root.SetErr(&stderr)
root.SetArgs(append([]string{"schema"}, append(args, "--format", "json")...))
if err := root.Execute(); err != nil {
t.Fatalf("execute dws schema %q: %v; stderr=%s", strings.Join(args, " "), err, stderr.String())
}
var payload map[string]any
if err := json.Unmarshal(stdout.Bytes(), &payload); err != nil {
t.Fatalf("decode dws schema %q: %v", strings.Join(args, " "), err)
}
return payload
}
func shortcutSchemaCanonical(declared shortcut.Shortcut) string {
name := strings.ReplaceAll(strings.TrimPrefix(declared.Command, "+"), "-", "_")
return declared.Service + ".shortcut_" + name
}
func assertEmbeddedShortcutIdentityAndSelection(
t testing.TB,
tool map[string]any,
declared shortcut.Shortcut,
canonical string,
) {
t.Helper()
if got, want := schemaContractString(tool["canonical_path"]), canonical; got != want {
t.Errorf("canonical_path = %q, want %q", got, want)
}
if got, want := schemaContractString(tool["primary_cli_path"]), declared.Service+" "+declared.Command; got != want {
t.Errorf("%s primary_cli_path = %q, want %q", canonical, got, want)
}
if got, want := schemaContractString(tool["agent_summary"]), declared.Description; got != want {
t.Errorf("%s agent_summary = %q, want %q", canonical, got, want)
}
if got, want := schemaContractStringSlice(tool["use_when"]), []string{declared.Intent}; !schemaContractJSONEqual(got, want) {
t.Errorf("%s use_when = %#v, want %#v", canonical, got, want)
}
if len(schemaContractStringSlice(tool["avoid_when"])) == 0 {
t.Errorf("%s has no reviewed avoid_when", canonical)
}
examples := schemaContractStringSlice(tool["examples"])
if len(examples) == 0 || len(examples) > 2 {
t.Errorf("%s examples = %d, want 1..2", canonical, len(examples))
}
for _, example := range examples {
if strings.Contains(example, "--yes") {
t.Errorf("%s stores unsafe example %q", canonical, example)
}
if !strings.HasPrefix(example, "dws "+declared.Service+" "+declared.Command) {
t.Errorf("%s example does not use its primary path: %q", canonical, example)
}
}
}
func assertEmbeddedShortcutSafetyAndInterface(
t testing.TB,
tool map[string]any,
declared shortcut.Shortcut,
canonical string,
) {
t.Helper()
risk := declared.Risk
if risk == "" {
risk = shortcut.RiskRead
}
wantEffect, wantRisk, wantConfirmation, wantIdempotency := "read", "low", "not_required", "idempotent"
switch risk {
case shortcut.RiskWrite:
wantEffect, wantRisk, wantConfirmation, wantIdempotency = "write", "medium", "user_required", "unknown"
case shortcut.RiskHighWrite:
wantEffect, wantRisk, wantConfirmation, wantIdempotency = "destructive", "high", "user_required", "unknown"
}
for field, want := range map[string]string{
"effect": wantEffect,
"risk": wantRisk,
"confirmation": wantConfirmation,
"idempotency": wantIdempotency,
"interface_mode": "composite",
"availability": "available",
} {
if got := schemaContractString(tool[field]); got != want {
t.Errorf("%s %s = %q, want %q", canonical, field, got, want)
}
}
if strings.TrimSpace(schemaContractString(tool["interface_reason"])) == "" {
t.Errorf("%s has no reviewed composite interface reason", canonical)
}
}
func assertEmbeddedShortcutParameters(
t testing.TB,
tool map[string]any,
declared shortcut.Shortcut,
canonical string,
) {
t.Helper()
parameters := schemaContractMap(tool["parameters"])
publicFlags := make([]shortcut.Flag, 0, len(declared.Flags))
for _, flag := range declared.Flags {
if !flag.Hidden {
publicFlags = append(publicFlags, flag)
}
}
if got, want := len(parameters), len(publicFlags); got != want {
t.Errorf("%s parameters = %d, want %d", canonical, got, want)
}
for _, flag := range publicFlags {
parameter := parameters[flag.Name]
if parameter == nil {
t.Errorf("%s is missing parameter --%s", canonical, flag.Name)
continue
}
flagType := flag.Type
if flagType == "" {
flagType = shortcut.FlagString
}
wantType := map[shortcut.FlagType]string{
shortcut.FlagString: "string",
shortcut.FlagBool: "boolean",
shortcut.FlagInt: "integer",
shortcut.FlagStringSlice: "array",
}[flagType]
if got := schemaContractString(parameter["type"]); got != wantType {
t.Errorf("%s --%s type = %q, want %q", canonical, flag.Name, got, wantType)
}
if got, _ := parameter["required"].(bool); got != shortcutSchemaRequired(declared, flag.Name) {
t.Errorf("%s --%s required = %t, want %t", canonical, flag.Name, got, shortcutSchemaRequired(declared, flag.Name))
}
if got, want := schemaContractString(parameter["default"]), shortcutSchemaDefault(flag); got != want {
t.Errorf("%s --%s default = %q, want %q", canonical, flag.Name, got, want)
}
gotEnum := schemaContractStringSlice(parameter["enum"])
if len(flag.Enum) == 0 {
if len(gotEnum) != 0 {
t.Errorf("%s --%s enum = %#v, want empty", canonical, flag.Name, gotEnum)
}
} else if !schemaContractJSONEqual(gotEnum, flag.Enum) {
t.Errorf("%s --%s enum = %#v, want %#v", canonical, flag.Name, gotEnum, flag.Enum)
}
}
}
func shortcutSchemaDefault(flag shortcut.Flag) string {
value := strings.TrimSpace(flag.Default)
switch flag.Type {
case shortcut.FlagBool:
if value != "true" {
return ""
}
case shortcut.FlagInt:
if value == "0" {
return ""
}
case shortcut.FlagStringSlice:
if value != "" {
return "[" + value + "]"
}
}
return value
}
func shortcutSchemaRequired(declared shortcut.Shortcut, flagName string) bool {
for _, flag := range declared.Flags {
if flag.Name == flagName && flag.Required {
return true
}
}
public := make(map[string]bool, len(declared.Flags))
for _, flag := range declared.Flags {
if !flag.Hidden {
public[flag.Name] = true
}
}
for _, constraint := range declared.Constraints {
if constraint.Kind != shortcut.ConstraintAtLeastOne && constraint.Kind != shortcut.ConstraintExactlyOne {
continue
}
visible := make([]string, 0, len(constraint.Flags))
for _, constrained := range constraint.Flags {
if public[constrained] {
visible = append(visible, constrained)
}
}
if len(visible) == 1 && visible[0] == flagName {
return true
}
}
return false
}
func assertEmbeddedShortcutConstraints(
t testing.TB,
tool map[string]any,
declared shortcut.Shortcut,
canonical string,
) {
t.Helper()
public := make(map[string]bool, len(declared.Flags))
for _, flag := range declared.Flags {
if !flag.Hidden {
public[flag.Name] = true
}
}
want := map[string][][]string{}
for _, constraint := range declared.Constraints {
flags := make([]string, 0, len(constraint.Flags))
for _, flagName := range constraint.Flags {
if public[flagName] {
flags = append(flags, flagName)
}
}
switch constraint.Kind {
case shortcut.ConstraintAtLeastOne:
if len(flags) > 1 {
want["require_one_of"] = append(want["require_one_of"], flags)
}
case shortcut.ConstraintExactlyOne:
if len(flags) > 1 {
want["require_one_of"] = append(want["require_one_of"], flags)
want["mutually_exclusive"] = append(want["mutually_exclusive"], flags)
}
case shortcut.ConstraintMutuallyExclusive:
if len(flags) > 1 {
want["mutually_exclusive"] = append(want["mutually_exclusive"], flags)
}
case shortcut.ConstraintCustom:
for _, flagName := range flags {
description := schemaContractString(schemaContractMap(tool["parameters"])[flagName]["description"])
for _, requiredText := range []string{"原文不能为空", "不能重复"} {
if !strings.Contains(description, requiredText) {
t.Errorf("%s --%s description does not publish custom constraint %q: %q", canonical, flagName, requiredText, description)
}
}
}
default:
t.Errorf("%s has unsupported declared shortcut constraint %q", canonical, constraint.Kind)
}
}
if len(want) == 0 {
if got := tool["constraints"]; got != nil {
t.Errorf("%s constraints = %#v, want omitted", canonical, got)
}
return
}
if got := tool["constraints"]; !schemaContractJSONEqual(got, want) {
t.Errorf("%s constraints = %s, want %s", canonical, mustShortcutJSON(got), mustShortcutJSON(want))
}
}
func mustShortcutJSON(value any) string {
encoded, err := json.Marshal(value)
if err != nil {
return fmt.Sprintf("%#v", value)
}
return string(encoded)
}
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+153 -11
View File
@@ -1,17 +1,17 @@
{
"version": 1,
"source_hash": "sha256:be0a967cd36b8430c22dd27fbd9a01ec232d0ce07b8a5ca3f9d35f2554ecbbe4",
"surface_hash": "sha256:2c84c53f5844050980fb5e1459c92e3afbd701357e125608f4c41a43abc9bdd5",
"source_hash": "sha256:f7d9911baa7c829febb0f461c1ae773d9bd4747b73a79c6fc4cd8a0e3956561c",
"surface_hash": "sha256:4cf8460240b19f896c3a330c69982cbb5f57aa8576cdf30373172082eea893ed",
"coverage": {
"surface_products": 24,
"products_with_metadata": 24,
"surface_tools": 592,
"tools_with_metadata": 592,
"tools_with_agent_summary": 592,
"tools_with_use_when": 592,
"tools_with_avoid_when": 592,
"tools_with_examples": 592,
"tools_with_interface_mode": 592,
"surface_products": 26,
"products_with_metadata": 26,
"surface_tools": 813,
"tools_with_metadata": 813,
"tools_with_agent_summary": 813,
"tools_with_use_when": 813,
"tools_with_avoid_when": 813,
"tools_with_examples": 813,
"tools_with_interface_mode": 813,
"unmatched_skill_tools": 118,
"unreviewed_skill_tools": 7
},
@@ -585,6 +585,74 @@
"创建/配置开放平台应用、机器人、权限、事件订阅或发布版本"
]
},
"devapp": {
"agent_summary": "管理钉钉开放平台企业内部应用、成员、权限、机器人、事件与版本",
"agent_summary_source": "dws-agent-selection/devapp",
"avoid_when": [
"开放平台接口文档搜索使用 devdoc;普通钉钉业务数据使用对应产品命令"
],
"field_provenance": {
"agent_summary": {
"value": "管理钉钉开放平台企业内部应用、成员、权限、机器人、事件与版本",
"source": "internal/cli/schema_hints/selection/devapp.json",
"precedence": "reviewed_explicit",
"resolution": "highest_precedence",
"candidates": [
{
"value": "管理钉钉开放平台企业内部应用、成员、权限、机器人、事件与版本",
"source": "internal/cli/schema_hints/selection/devapp.json",
"precedence": "reviewed_explicit",
"selected": true
}
]
},
"avoid_when": {
"value": [
"开放平台接口文档搜索使用 devdoc;普通钉钉业务数据使用对应产品命令"
],
"source": "internal/cli/schema_hints/selection/devapp.json",
"precedence": "reviewed_explicit",
"resolution": "highest_precedence",
"candidates": [
{
"value": [
"开放平台接口文档搜索使用 devdoc;普通钉钉业务数据使用对应产品命令"
],
"source": "internal/cli/schema_hints/selection/devapp.json",
"precedence": "reviewed_explicit",
"selected": true
}
]
},
"use_when": {
"value": [
"请求涉及企业内部应用的查询、创建、配置、成员权限、机器人、事件订阅或版本管理"
],
"source": "internal/cli/schema_hints/selection/devapp.json",
"precedence": "reviewed_explicit",
"resolution": "highest_precedence",
"candidates": [
{
"value": [
"请求涉及企业内部应用的查询、创建、配置、成员权限、机器人、事件订阅或版本管理"
],
"source": "internal/cli/schema_hints/selection/devapp.json",
"precedence": "reviewed_explicit",
"selected": true
}
]
}
},
"source_refs": [
"CommandRegistry:product=devapp",
"internal/cli/schema_command_registry.json",
"internal/cli/schema_hints/selection/devapp.json",
"internal/shortcut/devapp"
],
"use_when": [
"请求涉及企业内部应用的查询、创建、配置、成员权限、机器人、事件订阅或版本管理"
]
},
"devdoc": {
"agent_summary": "搜索钉钉开放平台开发文档与错误排查资料",
"agent_summary_source": "dws-agent-selection/devdoc",
@@ -941,6 +1009,78 @@
"需要实时监听个人消息接收、已读、撤回或表情回应事件,或管理个人事件订阅生命周期"
]
},
"hrbrain": {
"agent_summary": "钉钉组织大脑:人才池管理、员工档案查询与人才搜索",
"agent_summary_source": "dws-agent-selection/hrbrain",
"avoid_when": [
"要操作通讯录/组织架构基础信息时改用 contact 产品",
"要提交/查询战略解码、经营合约、目标等 OKR 能力时改用 agoal(CLI-only,未接入 Agent Schema)"
],
"field_provenance": {
"agent_summary": {
"value": "钉钉组织大脑:人才池管理、员工档案查询与人才搜索",
"source": "internal/cli/schema_hints/selection/hrbrain.json",
"precedence": "reviewed_explicit",
"resolution": "highest_precedence",
"candidates": [
{
"value": "钉钉组织大脑:人才池管理、员工档案查询与人才搜索",
"source": "internal/cli/schema_hints/selection/hrbrain.json",
"precedence": "reviewed_explicit",
"selected": true
}
]
},
"avoid_when": {
"value": [
"要操作通讯录/组织架构基础信息时改用 contact 产品",
"要提交/查询战略解码、经营合约、目标等 OKR 能力时改用 agoal(CLI-only,未接入 Agent Schema)"
],
"source": "internal/cli/schema_hints/selection/hrbrain.json",
"precedence": "reviewed_explicit",
"resolution": "highest_precedence",
"candidates": [
{
"value": [
"要操作通讯录/组织架构基础信息时改用 contact 产品",
"要提交/查询战略解码、经营合约、目标等 OKR 能力时改用 agoal(CLI-only,未接入 Agent Schema)"
],
"source": "internal/cli/schema_hints/selection/hrbrain.json",
"precedence": "reviewed_explicit",
"selected": true
}
]
},
"use_when": {
"value": [
"需要查询人才池、员工档案(元数据/标签/职业历程/绩效)或搜索员工时"
],
"source": "internal/cli/schema_hints/selection/hrbrain.json",
"precedence": "reviewed_explicit",
"resolution": "highest_precedence",
"candidates": [
{
"value": [
"需要查询人才池、员工档案(元数据/标签/职业历程/绩效)或搜索员工时"
],
"source": "internal/cli/schema_hints/selection/hrbrain.json",
"precedence": "reviewed_explicit",
"selected": true
}
]
}
},
"source_refs": [
"CommandRegistry:product=hrbrain",
"Skill:skills/mono/references/products/hrbrain.md",
"Skill:skills/multi/dingtalk-hrbrain/SKILL.md",
"internal/cli/schema_hints/selection/hrbrain.json",
"skills/mono/SKILL.md"
],
"use_when": [
"需要查询人才池、员工档案(元数据/标签/职业历程/绩效)或搜索员工时"
]
},
"live": {
"agent_summary": "查询当前用户发起的直播列表",
"agent_summary_source": "dws-agent-selection/live",
@@ -1734,11 +1874,13 @@
"chat",
"contact",
"dev",
"devapp",
"devdoc",
"ding",
"doc",
"drive",
"event",
"hrbrain",
"live",
"mail",
"markdown",
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
@@ -1,6 +1,525 @@
{
"product_id": "report",
"tools": {
"report +inbox-list": {
"agent_summary": "列出我收到的日报(按时间范围分页)",
"agent_summary_source": "dws-agent-selection/report",
"availability": "available",
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"confirmation": "not_required",
"effect": "read",
"effect_source": "agent-hint",
"examples": [
"dws report +inbox-list --start \"2026-03-10T00:00:00+08:00\" --end \"2026-03-10T23:59:59+08:00\" --cursor 0 --size 20"
],
"field_provenance": {
"agent_summary": {
"value": "列出我收到的日报(按时间范围分页)",
"source": "internal/cli/schema_hints/selection/report.json",
"precedence": "reviewed_explicit",
"resolution": "highest_precedence",
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"candidates": [
{
"value": "列出我收到的日报(按时间范围分页)",
"source": "internal/cli/schema_hints/selection/report.json",
"precedence": "reviewed_explicit",
"selected": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts."
}
]
},
"availability": {
"value": "available",
"source": "internal/cli/schema_hints/metadata/report.json",
"precedence": "reviewed_explicit",
"resolution": "highest_precedence",
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"candidates": [
{
"value": "available",
"source": "internal/cli/schema_hints/metadata/report.json",
"precedence": "reviewed_explicit",
"selected": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity."
}
]
},
"avoid_when": {
"value": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"source": "internal/cli/schema_hints/selection/report.json",
"precedence": "reviewed_explicit",
"resolution": "highest_precedence",
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"candidates": [
{
"value": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"source": "internal/cli/schema_hints/selection/report.json",
"precedence": "reviewed_explicit",
"selected": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts."
}
]
},
"confirmation": {
"value": "not_required",
"source": "internal/cli/schema_hints/metadata/report.json",
"precedence": "reviewed_explicit",
"resolution": "highest_precedence",
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"candidates": [
{
"value": "not_required",
"source": "internal/cli/schema_hints/metadata/report.json",
"precedence": "reviewed_explicit",
"selected": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity."
}
]
},
"effect": {
"value": "read",
"source": "internal/cli/schema_hints/metadata/report.json",
"precedence": "reviewed_explicit",
"resolution": "highest_precedence",
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"candidates": [
{
"value": "read",
"source": "internal/cli/schema_hints/metadata/report.json",
"precedence": "reviewed_explicit",
"selected": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity."
}
]
},
"examples": {
"value": [
"dws report +inbox-list --start \"2026-03-10T00:00:00+08:00\" --end \"2026-03-10T23:59:59+08:00\" --cursor 0 --size 20"
],
"source": "internal/cli/schema_hints/selection/report.json",
"precedence": "reviewed_explicit",
"resolution": "highest_precedence",
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"candidates": [
{
"value": [
"dws report +inbox-list --start \"2026-03-10T00:00:00+08:00\" --end \"2026-03-10T23:59:59+08:00\" --cursor 0 --size 20"
],
"source": "internal/cli/schema_hints/selection/report.json",
"precedence": "reviewed_explicit",
"selected": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts."
}
]
},
"idempotency": {
"value": "idempotent",
"source": "internal/cli/schema_hints/metadata/report.json",
"precedence": "reviewed_explicit",
"resolution": "highest_precedence",
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"candidates": [
{
"value": "idempotent",
"source": "internal/cli/schema_hints/metadata/report.json",
"precedence": "reviewed_explicit",
"selected": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity."
}
]
},
"interface_mode": {
"value": "composite",
"source": "internal/cli/schema_hints/metadata/report.json",
"precedence": "reviewed_explicit",
"resolution": "highest_precedence",
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"candidates": [
{
"value": "composite",
"source": "internal/cli/schema_hints/metadata/report.json",
"precedence": "reviewed_explicit",
"selected": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity."
}
]
},
"interface_reason": {
"value": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"source": "internal/cli/schema_hints/metadata/report.json",
"precedence": "reviewed_explicit",
"resolution": "highest_precedence",
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"candidates": [
{
"value": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"source": "internal/cli/schema_hints/metadata/report.json",
"precedence": "reviewed_explicit",
"selected": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity."
}
]
},
"interface_ref": {
"value": null,
"source": "internal/cli/schema_hints/metadata/report.json",
"precedence": "reviewed_explicit",
"resolution": "interface_disposition_matrix",
"review_reason": "final interface mode composite forbids a direct MCP interface_ref",
"candidates": [
{
"value": null,
"source": "internal/cli/schema_hints/metadata/report.json",
"precedence": "reviewed_explicit",
"selected": true,
"review_reason": "final interface mode composite forbids a direct MCP interface_ref"
}
]
},
"reviewed": {
"value": true,
"source": "internal/cli/schema_hints/metadata/report.json",
"precedence": "reviewed_explicit",
"resolution": "highest_precedence",
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"candidates": [
{
"value": true,
"source": "internal/cli/schema_hints/metadata/report.json",
"precedence": "reviewed_explicit",
"selected": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity."
},
{
"value": true,
"source": "internal/cli/schema_hints/selection/report.json",
"precedence": "reviewed_explicit",
"selected": false,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts."
}
]
},
"risk": {
"value": "low",
"source": "internal/cli/schema_hints/metadata/report.json",
"precedence": "reviewed_explicit",
"resolution": "highest_precedence",
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"candidates": [
{
"value": "low",
"source": "internal/cli/schema_hints/metadata/report.json",
"precedence": "reviewed_explicit",
"selected": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity."
}
]
},
"use_when": {
"value": [
"当你要查看下属或同事发给自己的日报周报、想在某个时间段内浏览或审阅收到的汇报时使用;输入起止时间(ISO-8601),可按发送人 staffId 过滤,分页返回收到的日报列表及其 reportId,供后续 +entry-get 读正文。"
],
"source": "internal/cli/schema_hints/selection/report.json",
"precedence": "reviewed_explicit",
"resolution": "highest_precedence",
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"candidates": [
{
"value": [
"当你要查看下属或同事发给自己的日报周报、想在某个时间段内浏览或审阅收到的汇报时使用;输入起止时间(ISO-8601),可按发送人 staffId 过滤,分页返回收到的日报列表及其 reportId,供后续 +entry-get 读正文。"
],
"source": "internal/cli/schema_hints/selection/report.json",
"precedence": "reviewed_explicit",
"selected": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts."
}
]
}
},
"idempotency": "idempotent",
"interface_mode": "composite",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"risk": "low",
"source_refs": [
"ShortcutRegistry:report +inbox-list",
"cobra-help:dws report +inbox-list",
"internal/cli/schema_command_registry.json#report.shortcut_inbox_list",
"internal/cli/schema_hints/metadata/report.json",
"internal/cli/schema_hints/selection/report.json"
],
"use_when": [
"当你要查看下属或同事发给自己的日报周报、想在某个时间段内浏览或审阅收到的汇报时使用;输入起止时间(ISO-8601),可按发送人 staffId 过滤,分页返回收到的日报列表及其 reportId,供后续 +entry-get 读正文。"
]
},
"report +outbox-list": {
"agent_summary": "列出我发出的日报(可选时间/模版名过滤)",
"agent_summary_source": "dws-agent-selection/report",
"availability": "available",
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"confirmation": "not_required",
"effect": "read",
"effect_source": "agent-hint",
"examples": [
"dws report +outbox-list --cursor 0 --size 20",
"dws report +outbox-list --cursor 0 --size 20 --template-name \"日报\""
],
"field_provenance": {
"agent_summary": {
"value": "列出我发出的日报(可选时间/模版名过滤)",
"source": "internal/cli/schema_hints/selection/report.json",
"precedence": "reviewed_explicit",
"resolution": "highest_precedence",
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"candidates": [
{
"value": "列出我发出的日报(可选时间/模版名过滤)",
"source": "internal/cli/schema_hints/selection/report.json",
"precedence": "reviewed_explicit",
"selected": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts."
}
]
},
"availability": {
"value": "available",
"source": "internal/cli/schema_hints/metadata/report.json",
"precedence": "reviewed_explicit",
"resolution": "highest_precedence",
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"candidates": [
{
"value": "available",
"source": "internal/cli/schema_hints/metadata/report.json",
"precedence": "reviewed_explicit",
"selected": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity."
}
]
},
"avoid_when": {
"value": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"source": "internal/cli/schema_hints/selection/report.json",
"precedence": "reviewed_explicit",
"resolution": "highest_precedence",
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"candidates": [
{
"value": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"source": "internal/cli/schema_hints/selection/report.json",
"precedence": "reviewed_explicit",
"selected": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts."
}
]
},
"confirmation": {
"value": "not_required",
"source": "internal/cli/schema_hints/metadata/report.json",
"precedence": "reviewed_explicit",
"resolution": "highest_precedence",
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"candidates": [
{
"value": "not_required",
"source": "internal/cli/schema_hints/metadata/report.json",
"precedence": "reviewed_explicit",
"selected": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity."
}
]
},
"effect": {
"value": "read",
"source": "internal/cli/schema_hints/metadata/report.json",
"precedence": "reviewed_explicit",
"resolution": "highest_precedence",
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"candidates": [
{
"value": "read",
"source": "internal/cli/schema_hints/metadata/report.json",
"precedence": "reviewed_explicit",
"selected": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity."
}
]
},
"examples": {
"value": [
"dws report +outbox-list --cursor 0 --size 20",
"dws report +outbox-list --cursor 0 --size 20 --template-name \"日报\""
],
"source": "internal/cli/schema_hints/selection/report.json",
"precedence": "reviewed_explicit",
"resolution": "highest_precedence",
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"candidates": [
{
"value": [
"dws report +outbox-list --cursor 0 --size 20",
"dws report +outbox-list --cursor 0 --size 20 --template-name \"日报\""
],
"source": "internal/cli/schema_hints/selection/report.json",
"precedence": "reviewed_explicit",
"selected": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts."
}
]
},
"idempotency": {
"value": "idempotent",
"source": "internal/cli/schema_hints/metadata/report.json",
"precedence": "reviewed_explicit",
"resolution": "highest_precedence",
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"candidates": [
{
"value": "idempotent",
"source": "internal/cli/schema_hints/metadata/report.json",
"precedence": "reviewed_explicit",
"selected": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity."
}
]
},
"interface_mode": {
"value": "composite",
"source": "internal/cli/schema_hints/metadata/report.json",
"precedence": "reviewed_explicit",
"resolution": "highest_precedence",
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"candidates": [
{
"value": "composite",
"source": "internal/cli/schema_hints/metadata/report.json",
"precedence": "reviewed_explicit",
"selected": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity."
}
]
},
"interface_reason": {
"value": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"source": "internal/cli/schema_hints/metadata/report.json",
"precedence": "reviewed_explicit",
"resolution": "highest_precedence",
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"candidates": [
{
"value": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"source": "internal/cli/schema_hints/metadata/report.json",
"precedence": "reviewed_explicit",
"selected": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity."
}
]
},
"interface_ref": {
"value": null,
"source": "internal/cli/schema_hints/metadata/report.json",
"precedence": "reviewed_explicit",
"resolution": "interface_disposition_matrix",
"review_reason": "final interface mode composite forbids a direct MCP interface_ref",
"candidates": [
{
"value": null,
"source": "internal/cli/schema_hints/metadata/report.json",
"precedence": "reviewed_explicit",
"selected": true,
"review_reason": "final interface mode composite forbids a direct MCP interface_ref"
}
]
},
"reviewed": {
"value": true,
"source": "internal/cli/schema_hints/metadata/report.json",
"precedence": "reviewed_explicit",
"resolution": "highest_precedence",
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"candidates": [
{
"value": true,
"source": "internal/cli/schema_hints/metadata/report.json",
"precedence": "reviewed_explicit",
"selected": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity."
},
{
"value": true,
"source": "internal/cli/schema_hints/selection/report.json",
"precedence": "reviewed_explicit",
"selected": false,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts."
}
]
},
"risk": {
"value": "low",
"source": "internal/cli/schema_hints/metadata/report.json",
"precedence": "reviewed_explicit",
"resolution": "highest_precedence",
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"candidates": [
{
"value": "low",
"source": "internal/cli/schema_hints/metadata/report.json",
"precedence": "reviewed_explicit",
"selected": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity."
}
]
},
"use_when": {
"value": [
"当你要回顾自己写过、提交过的日报周报,比如确认某天是否已交、找回历史汇报内容或统计提交情况时使用;可按创建/修改时间范围和模版名过滤,分页返回自己发出的日报列表及 reportId,供后续 +entry-get 查看正文。"
],
"source": "internal/cli/schema_hints/selection/report.json",
"precedence": "reviewed_explicit",
"resolution": "highest_precedence",
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"candidates": [
{
"value": [
"当你要回顾自己写过、提交过的日报周报,比如确认某天是否已交、找回历史汇报内容或统计提交情况时使用;可按创建/修改时间范围和模版名过滤,分页返回自己发出的日报列表及 reportId,供后续 +entry-get 查看正文。"
],
"source": "internal/cli/schema_hints/selection/report.json",
"precedence": "reviewed_explicit",
"selected": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts."
}
]
}
},
"idempotency": "idempotent",
"interface_mode": "composite",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"risk": "low",
"source_refs": [
"ShortcutRegistry:report +outbox-list",
"cobra-help:dws report +outbox-list",
"internal/cli/schema_command_registry.json#report.shortcut_outbox_list",
"internal/cli/schema_hints/metadata/report.json",
"internal/cli/schema_hints/selection/report.json"
],
"use_when": [
"当你要回顾自己写过、提交过的日报周报,比如确认某天是否已交、找回历史汇报内容或统计提交情况时使用;可按创建/修改时间范围和模版名过滤,分页返回自己发出的日报列表及 reportId,供后续 +entry-get 查看正文。"
]
},
"report entry get": {
"agent_summary": "获取指定一篇日志的详情信息",
"agent_summary_source": "dws-agent-selection/report",
@@ -1,6 +1,522 @@
{
"product_id": "sheet",
"tools": {
"sheet +list-sheets": {
"agent_summary": "获取表格文档中全部工作表列表",
"agent_summary_source": "dws-agent-selection/sheet",
"availability": "available",
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"confirmation": "not_required",
"effect": "read",
"effect_source": "agent-hint",
"examples": [
"dws sheet +list-sheets --node NODE_ID"
],
"field_provenance": {
"agent_summary": {
"value": "获取表格文档中全部工作表列表",
"source": "internal/cli/schema_hints/selection/sheet.json",
"precedence": "reviewed_explicit",
"resolution": "highest_precedence",
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"candidates": [
{
"value": "获取表格文档中全部工作表列表",
"source": "internal/cli/schema_hints/selection/sheet.json",
"precedence": "reviewed_explicit",
"selected": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts."
}
]
},
"availability": {
"value": "available",
"source": "internal/cli/schema_hints/metadata/sheet.json",
"precedence": "reviewed_explicit",
"resolution": "highest_precedence",
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"candidates": [
{
"value": "available",
"source": "internal/cli/schema_hints/metadata/sheet.json",
"precedence": "reviewed_explicit",
"selected": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity."
}
]
},
"avoid_when": {
"value": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"source": "internal/cli/schema_hints/selection/sheet.json",
"precedence": "reviewed_explicit",
"resolution": "highest_precedence",
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"candidates": [
{
"value": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"source": "internal/cli/schema_hints/selection/sheet.json",
"precedence": "reviewed_explicit",
"selected": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts."
}
]
},
"confirmation": {
"value": "not_required",
"source": "internal/cli/schema_hints/metadata/sheet.json",
"precedence": "reviewed_explicit",
"resolution": "highest_precedence",
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"candidates": [
{
"value": "not_required",
"source": "internal/cli/schema_hints/metadata/sheet.json",
"precedence": "reviewed_explicit",
"selected": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity."
}
]
},
"effect": {
"value": "read",
"source": "internal/cli/schema_hints/metadata/sheet.json",
"precedence": "reviewed_explicit",
"resolution": "highest_precedence",
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"candidates": [
{
"value": "read",
"source": "internal/cli/schema_hints/metadata/sheet.json",
"precedence": "reviewed_explicit",
"selected": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity."
}
]
},
"examples": {
"value": [
"dws sheet +list-sheets --node NODE_ID"
],
"source": "internal/cli/schema_hints/selection/sheet.json",
"precedence": "reviewed_explicit",
"resolution": "highest_precedence",
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"candidates": [
{
"value": [
"dws sheet +list-sheets --node NODE_ID"
],
"source": "internal/cli/schema_hints/selection/sheet.json",
"precedence": "reviewed_explicit",
"selected": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts."
}
]
},
"idempotency": {
"value": "idempotent",
"source": "internal/cli/schema_hints/metadata/sheet.json",
"precedence": "reviewed_explicit",
"resolution": "highest_precedence",
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"candidates": [
{
"value": "idempotent",
"source": "internal/cli/schema_hints/metadata/sheet.json",
"precedence": "reviewed_explicit",
"selected": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity."
}
]
},
"interface_mode": {
"value": "composite",
"source": "internal/cli/schema_hints/metadata/sheet.json",
"precedence": "reviewed_explicit",
"resolution": "highest_precedence",
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"candidates": [
{
"value": "composite",
"source": "internal/cli/schema_hints/metadata/sheet.json",
"precedence": "reviewed_explicit",
"selected": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity."
}
]
},
"interface_reason": {
"value": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"source": "internal/cli/schema_hints/metadata/sheet.json",
"precedence": "reviewed_explicit",
"resolution": "highest_precedence",
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"candidates": [
{
"value": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"source": "internal/cli/schema_hints/metadata/sheet.json",
"precedence": "reviewed_explicit",
"selected": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity."
}
]
},
"interface_ref": {
"value": null,
"source": "internal/cli/schema_hints/metadata/sheet.json",
"precedence": "reviewed_explicit",
"resolution": "interface_disposition_matrix",
"review_reason": "final interface mode composite forbids a direct MCP interface_ref",
"candidates": [
{
"value": null,
"source": "internal/cli/schema_hints/metadata/sheet.json",
"precedence": "reviewed_explicit",
"selected": true,
"review_reason": "final interface mode composite forbids a direct MCP interface_ref"
}
]
},
"reviewed": {
"value": true,
"source": "internal/cli/schema_hints/metadata/sheet.json",
"precedence": "reviewed_explicit",
"resolution": "highest_precedence",
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"candidates": [
{
"value": true,
"source": "internal/cli/schema_hints/metadata/sheet.json",
"precedence": "reviewed_explicit",
"selected": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity."
},
{
"value": true,
"source": "internal/cli/schema_hints/selection/sheet.json",
"precedence": "reviewed_explicit",
"selected": false,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts."
}
]
},
"risk": {
"value": "low",
"source": "internal/cli/schema_hints/metadata/sheet.json",
"precedence": "reviewed_explicit",
"resolution": "highest_precedence",
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"candidates": [
{
"value": "low",
"source": "internal/cli/schema_hints/metadata/sheet.json",
"precedence": "reviewed_explicit",
"selected": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity."
}
]
},
"use_when": {
"value": [
"当你拿到一个表格文档、想先了解它里面有哪些工作表(sheet)以及各自的 sheetId 时使用,通常作为读写具体数据前的第一步;传入表格文档 ID 或 URL,返回工作表清单。"
],
"source": "internal/cli/schema_hints/selection/sheet.json",
"precedence": "reviewed_explicit",
"resolution": "highest_precedence",
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"candidates": [
{
"value": [
"当你拿到一个表格文档、想先了解它里面有哪些工作表(sheet)以及各自的 sheetId 时使用,通常作为读写具体数据前的第一步;传入表格文档 ID 或 URL,返回工作表清单。"
],
"source": "internal/cli/schema_hints/selection/sheet.json",
"precedence": "reviewed_explicit",
"selected": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts."
}
]
}
},
"idempotency": "idempotent",
"interface_mode": "composite",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"risk": "low",
"source_refs": [
"ShortcutRegistry:sheet +list-sheets",
"cobra-help:dws sheet +list-sheets",
"internal/cli/schema_command_registry.json#sheet.shortcut_list_sheets",
"internal/cli/schema_hints/metadata/sheet.json",
"internal/cli/schema_hints/selection/sheet.json"
],
"use_when": [
"当你拿到一个表格文档、想先了解它里面有哪些工作表(sheet)以及各自的 sheetId 时使用,通常作为读写具体数据前的第一步;传入表格文档 ID 或 URL,返回工作表清单。"
]
},
"sheet +read": {
"agent_summary": "读取工作表指定范围的结构化单元格数据",
"agent_summary_source": "dws-agent-selection/sheet",
"availability": "available",
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"confirmation": "not_required",
"effect": "read",
"effect_source": "agent-hint",
"examples": [
"dws sheet +read --node NODE_ID --sheet-id SHEET_ID --range \"A1:D10\""
],
"field_provenance": {
"agent_summary": {
"value": "读取工作表指定范围的结构化单元格数据",
"source": "internal/cli/schema_hints/selection/sheet.json",
"precedence": "reviewed_explicit",
"resolution": "highest_precedence",
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"candidates": [
{
"value": "读取工作表指定范围的结构化单元格数据",
"source": "internal/cli/schema_hints/selection/sheet.json",
"precedence": "reviewed_explicit",
"selected": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts."
}
]
},
"availability": {
"value": "available",
"source": "internal/cli/schema_hints/metadata/sheet.json",
"precedence": "reviewed_explicit",
"resolution": "highest_precedence",
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"candidates": [
{
"value": "available",
"source": "internal/cli/schema_hints/metadata/sheet.json",
"precedence": "reviewed_explicit",
"selected": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity."
}
]
},
"avoid_when": {
"value": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"source": "internal/cli/schema_hints/selection/sheet.json",
"precedence": "reviewed_explicit",
"resolution": "highest_precedence",
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"candidates": [
{
"value": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"source": "internal/cli/schema_hints/selection/sheet.json",
"precedence": "reviewed_explicit",
"selected": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts."
}
]
},
"confirmation": {
"value": "not_required",
"source": "internal/cli/schema_hints/metadata/sheet.json",
"precedence": "reviewed_explicit",
"resolution": "highest_precedence",
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"candidates": [
{
"value": "not_required",
"source": "internal/cli/schema_hints/metadata/sheet.json",
"precedence": "reviewed_explicit",
"selected": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity."
}
]
},
"effect": {
"value": "read",
"source": "internal/cli/schema_hints/metadata/sheet.json",
"precedence": "reviewed_explicit",
"resolution": "highest_precedence",
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"candidates": [
{
"value": "read",
"source": "internal/cli/schema_hints/metadata/sheet.json",
"precedence": "reviewed_explicit",
"selected": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity."
}
]
},
"examples": {
"value": [
"dws sheet +read --node NODE_ID --sheet-id SHEET_ID --range \"A1:D10\""
],
"source": "internal/cli/schema_hints/selection/sheet.json",
"precedence": "reviewed_explicit",
"resolution": "highest_precedence",
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"candidates": [
{
"value": [
"dws sheet +read --node NODE_ID --sheet-id SHEET_ID --range \"A1:D10\""
],
"source": "internal/cli/schema_hints/selection/sheet.json",
"precedence": "reviewed_explicit",
"selected": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts."
}
]
},
"idempotency": {
"value": "idempotent",
"source": "internal/cli/schema_hints/metadata/sheet.json",
"precedence": "reviewed_explicit",
"resolution": "highest_precedence",
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"candidates": [
{
"value": "idempotent",
"source": "internal/cli/schema_hints/metadata/sheet.json",
"precedence": "reviewed_explicit",
"selected": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity."
}
]
},
"interface_mode": {
"value": "composite",
"source": "internal/cli/schema_hints/metadata/sheet.json",
"precedence": "reviewed_explicit",
"resolution": "highest_precedence",
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"candidates": [
{
"value": "composite",
"source": "internal/cli/schema_hints/metadata/sheet.json",
"precedence": "reviewed_explicit",
"selected": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity."
}
]
},
"interface_reason": {
"value": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"source": "internal/cli/schema_hints/metadata/sheet.json",
"precedence": "reviewed_explicit",
"resolution": "highest_precedence",
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"candidates": [
{
"value": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"source": "internal/cli/schema_hints/metadata/sheet.json",
"precedence": "reviewed_explicit",
"selected": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity."
}
]
},
"interface_ref": {
"value": null,
"source": "internal/cli/schema_hints/metadata/sheet.json",
"precedence": "reviewed_explicit",
"resolution": "interface_disposition_matrix",
"review_reason": "final interface mode composite forbids a direct MCP interface_ref",
"candidates": [
{
"value": null,
"source": "internal/cli/schema_hints/metadata/sheet.json",
"precedence": "reviewed_explicit",
"selected": true,
"review_reason": "final interface mode composite forbids a direct MCP interface_ref"
}
]
},
"reviewed": {
"value": true,
"source": "internal/cli/schema_hints/metadata/sheet.json",
"precedence": "reviewed_explicit",
"resolution": "highest_precedence",
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"candidates": [
{
"value": true,
"source": "internal/cli/schema_hints/metadata/sheet.json",
"precedence": "reviewed_explicit",
"selected": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity."
},
{
"value": true,
"source": "internal/cli/schema_hints/selection/sheet.json",
"precedence": "reviewed_explicit",
"selected": false,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts."
}
]
},
"risk": {
"value": "low",
"source": "internal/cli/schema_hints/metadata/sheet.json",
"precedence": "reviewed_explicit",
"resolution": "highest_precedence",
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"candidates": [
{
"value": "low",
"source": "internal/cli/schema_hints/metadata/sheet.json",
"precedence": "reviewed_explicit",
"selected": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity."
}
]
},
"use_when": {
"value": [
"当你需要按单元格逐格获取数据(含类型、公式或格式化值等结构化信息)以便程序处理时使用;传入表格与可选范围(A1 表示法,不传则全部),可指定取格式化值/原始值/公式,返回结构化单元格数组。若只想要纯文本可改用 +csv-get。"
],
"source": "internal/cli/schema_hints/selection/sheet.json",
"precedence": "reviewed_explicit",
"resolution": "highest_precedence",
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"candidates": [
{
"value": [
"当你需要按单元格逐格获取数据(含类型、公式或格式化值等结构化信息)以便程序处理时使用;传入表格与可选范围(A1 表示法,不传则全部),可指定取格式化值/原始值/公式,返回结构化单元格数组。若只想要纯文本可改用 +csv-get。"
],
"source": "internal/cli/schema_hints/selection/sheet.json",
"precedence": "reviewed_explicit",
"selected": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts."
}
]
}
},
"idempotency": "idempotent",
"interface_mode": "composite",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"risk": "low",
"source_refs": [
"ShortcutRegistry:sheet +read",
"cobra-help:dws sheet +read",
"internal/cli/schema_command_registry.json#sheet.shortcut_read",
"internal/cli/schema_hints/metadata/sheet.json",
"internal/cli/schema_hints/selection/sheet.json"
],
"use_when": [
"当你需要按单元格逐格获取数据(含类型、公式或格式化值等结构化信息)以便程序处理时使用;传入表格与可选范围(A1 表示法,不传则全部),可指定取格式化值/原始值/公式,返回结构化单元格数组。若只想要纯文本可改用 +csv-get。"
]
},
"sheet add-dimension": {
"agent_summary": "在工作表末尾追加空行或空列。",
"agent_summary_source": "dws-agent-selection/sheet",
File diff suppressed because it is too large Load Diff
@@ -1,6 +1,264 @@
{
"product_id": "wiki",
"tools": {
"wiki +space-search": {
"agent_summary": "搜索知识库",
"agent_summary_source": "dws-agent-selection/wiki",
"availability": "available",
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"confirmation": "not_required",
"effect": "read",
"effect_source": "agent-hint",
"examples": [
"dws wiki +space-search --query \"产品文档\""
],
"field_provenance": {
"agent_summary": {
"value": "搜索知识库",
"source": "internal/cli/schema_hints/selection/wiki.json",
"precedence": "reviewed_explicit",
"resolution": "highest_precedence",
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"candidates": [
{
"value": "搜索知识库",
"source": "internal/cli/schema_hints/selection/wiki.json",
"precedence": "reviewed_explicit",
"selected": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts."
}
]
},
"availability": {
"value": "available",
"source": "internal/cli/schema_hints/metadata/wiki.json",
"precedence": "reviewed_explicit",
"resolution": "highest_precedence",
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"candidates": [
{
"value": "available",
"source": "internal/cli/schema_hints/metadata/wiki.json",
"precedence": "reviewed_explicit",
"selected": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity."
}
]
},
"avoid_when": {
"value": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"source": "internal/cli/schema_hints/selection/wiki.json",
"precedence": "reviewed_explicit",
"resolution": "highest_precedence",
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"candidates": [
{
"value": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"source": "internal/cli/schema_hints/selection/wiki.json",
"precedence": "reviewed_explicit",
"selected": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts."
}
]
},
"confirmation": {
"value": "not_required",
"source": "internal/cli/schema_hints/metadata/wiki.json",
"precedence": "reviewed_explicit",
"resolution": "highest_precedence",
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"candidates": [
{
"value": "not_required",
"source": "internal/cli/schema_hints/metadata/wiki.json",
"precedence": "reviewed_explicit",
"selected": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity."
}
]
},
"effect": {
"value": "read",
"source": "internal/cli/schema_hints/metadata/wiki.json",
"precedence": "reviewed_explicit",
"resolution": "highest_precedence",
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"candidates": [
{
"value": "read",
"source": "internal/cli/schema_hints/metadata/wiki.json",
"precedence": "reviewed_explicit",
"selected": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity."
}
]
},
"examples": {
"value": [
"dws wiki +space-search --query \"产品文档\""
],
"source": "internal/cli/schema_hints/selection/wiki.json",
"precedence": "reviewed_explicit",
"resolution": "highest_precedence",
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"candidates": [
{
"value": [
"dws wiki +space-search --query \"产品文档\""
],
"source": "internal/cli/schema_hints/selection/wiki.json",
"precedence": "reviewed_explicit",
"selected": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts."
}
]
},
"idempotency": {
"value": "idempotent",
"source": "internal/cli/schema_hints/metadata/wiki.json",
"precedence": "reviewed_explicit",
"resolution": "highest_precedence",
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"candidates": [
{
"value": "idempotent",
"source": "internal/cli/schema_hints/metadata/wiki.json",
"precedence": "reviewed_explicit",
"selected": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity."
}
]
},
"interface_mode": {
"value": "composite",
"source": "internal/cli/schema_hints/metadata/wiki.json",
"precedence": "reviewed_explicit",
"resolution": "highest_precedence",
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"candidates": [
{
"value": "composite",
"source": "internal/cli/schema_hints/metadata/wiki.json",
"precedence": "reviewed_explicit",
"selected": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity."
}
]
},
"interface_reason": {
"value": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"source": "internal/cli/schema_hints/metadata/wiki.json",
"precedence": "reviewed_explicit",
"resolution": "highest_precedence",
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"candidates": [
{
"value": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"source": "internal/cli/schema_hints/metadata/wiki.json",
"precedence": "reviewed_explicit",
"selected": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity."
}
]
},
"interface_ref": {
"value": null,
"source": "internal/cli/schema_hints/metadata/wiki.json",
"precedence": "reviewed_explicit",
"resolution": "interface_disposition_matrix",
"review_reason": "final interface mode composite forbids a direct MCP interface_ref",
"candidates": [
{
"value": null,
"source": "internal/cli/schema_hints/metadata/wiki.json",
"precedence": "reviewed_explicit",
"selected": true,
"review_reason": "final interface mode composite forbids a direct MCP interface_ref"
}
]
},
"reviewed": {
"value": true,
"source": "internal/cli/schema_hints/metadata/wiki.json",
"precedence": "reviewed_explicit",
"resolution": "highest_precedence",
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"candidates": [
{
"value": true,
"source": "internal/cli/schema_hints/metadata/wiki.json",
"precedence": "reviewed_explicit",
"selected": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity."
},
{
"value": true,
"source": "internal/cli/schema_hints/selection/wiki.json",
"precedence": "reviewed_explicit",
"selected": false,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts."
}
]
},
"risk": {
"value": "low",
"source": "internal/cli/schema_hints/metadata/wiki.json",
"precedence": "reviewed_explicit",
"resolution": "highest_precedence",
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"candidates": [
{
"value": "low",
"source": "internal/cli/schema_hints/metadata/wiki.json",
"precedence": "reviewed_explicit",
"selected": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity."
}
]
},
"use_when": {
"value": [
"当你只记得知识库名称的部分关键词、想快速按名称定位某个知识库时使用;输入关键词返回匹配的知识库列表,比逐页 +space-list 更快找到目标 workspaceId。"
],
"source": "internal/cli/schema_hints/selection/wiki.json",
"precedence": "reviewed_explicit",
"resolution": "highest_precedence",
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"candidates": [
{
"value": [
"当你只记得知识库名称的部分关键词、想快速按名称定位某个知识库时使用;输入关键词返回匹配的知识库列表,比逐页 +space-list 更快找到目标 workspaceId。"
],
"source": "internal/cli/schema_hints/selection/wiki.json",
"precedence": "reviewed_explicit",
"selected": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts."
}
]
}
},
"idempotency": "idempotent",
"interface_mode": "composite",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"risk": "low",
"source_refs": [
"ShortcutRegistry:wiki +space-search",
"cobra-help:dws wiki +space-search",
"internal/cli/schema_command_registry.json#wiki.shortcut_space_search",
"internal/cli/schema_hints/metadata/wiki.json",
"internal/cli/schema_hints/selection/wiki.json"
],
"use_when": [
"当你只记得知识库名称的部分关键词、想快速按名称定位某个知识库时使用;输入关键词返回匹配的知识库列表,比逐页 +space-list 更快找到目标 workspaceId。"
]
},
"wiki member add": {
"agent_summary": "为指定知识库添加一个或多个成员,并授予指定角色",
"agent_summary_source": "dws-agent-selection/wiki",
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
-217
View File
@@ -48,223 +48,6 @@
"version"
]
},
{
"id": "shortcut-catalog-surface",
"reason": "Shortcut commands are high-level task entries discovered through dws shortcut list and product skills; they are intentionally separate from the runtime Schema catalog of base Agent tools.",
"reviewed": true,
"commands": [
"aitable +base-get",
"aitable +base-list",
"aitable +base-search",
"aitable +chart-get",
"aitable +chart-widgets-example",
"aitable +dashboard-config-example",
"aitable +dashboard-get",
"aitable +field-get",
"aitable +find-record",
"aitable +form-field-list",
"aitable +form-list",
"aitable +form-share-get",
"aitable +list-tables",
"aitable +record-history-list",
"aitable +record-query",
"aitable +record-query-empty",
"aitable +record-share-links",
"aitable +record-share-url",
"aitable +resolve-base",
"aitable +resolve-table",
"aitable +role-list",
"aitable +section-list-empty",
"aitable +section-list-nodes",
"aitable +table-get",
"aitable +template-search",
"aitable +view-get",
"aitable +view-get-frozen-cols",
"aitable +view-get-lock",
"aitable +view-get-row-height",
"attendance +check-record",
"attendance +check-result",
"attendance +get-adjustment-rule",
"attendance +get-approve-template",
"attendance +get-checkin-record",
"attendance +get-leave-records",
"attendance +get-overtime-rule",
"attendance +get-schedule",
"attendance +get-self-setting",
"attendance +get-summary",
"attendance +list-approve",
"attendance +list-leave-types",
"attendance +my-attendance",
"attendance +query-report-data",
"attendance +search-adjustment-rule",
"attendance +search-class",
"attendance +search-group",
"attendance +search-overtime-rule",
"attendance +this-month",
"calendar +agenda",
"calendar +attendee-list",
"calendar +book",
"calendar +book-list",
"calendar +book-search",
"calendar +cancel-event",
"calendar +conflicts",
"calendar +free",
"calendar +free-slots",
"calendar +freebusy",
"calendar +invite",
"calendar +my-free",
"calendar +next-event",
"calendar +reschedule",
"calendar +room-groups",
"calendar +room-search",
"calendar +suggest-time",
"calendar +today",
"calendar +tomorrow",
"calendar +week",
"chat +at-me",
"chat +bot-find",
"chat +bot-search",
"chat +broadcast",
"chat +category-create",
"chat +category-delete",
"chat +category-list",
"chat +category-rename",
"chat +chat-bots",
"chat +chat-dismiss",
"chat +chat-invite-url",
"chat +chat-list-all",
"chat +chat-list-join-requests",
"chat +chat-list-mine",
"chat +chat-mute",
"chat +chat-role-add",
"chat +chat-role-list",
"chat +chat-role-query-user",
"chat +chat-role-set-user",
"chat +chat-role-update",
"chat +chat-search",
"chat +chat-set-admin",
"chat +chat-set-history",
"chat +chat-update-alias",
"chat +chat-update-nick",
"chat +conversation-clear-all-red-point",
"chat +conversation-info",
"chat +conversation-list",
"chat +conversation-list-top",
"chat +dm",
"chat +group-members",
"chat +messages-list-direct",
"chat +messages-list-pin",
"chat +messages-list-unread-conversations",
"chat +messages-mget",
"chat +messages-query-send-status",
"chat +messages-read-status",
"chat +messages-send-by-webhook",
"chat +messages-update-card",
"chat +my-groups",
"chat +send-to-group",
"chat +unread-chats",
"contact +by-mobile",
"contact +dept-members",
"contact +list-dept-members",
"contact +list-followings",
"contact +list-role-members",
"contact +list-roles",
"contact +list-sub-depts",
"contact +lookup",
"contact +me",
"contact +org",
"contact +resolve-dept",
"contact +search-mobile",
"contact +search-user",
"contact +team",
"devapp +create",
"devapp +delete",
"devapp +disable",
"devapp +enable",
"devapp +event-list",
"devapp +get",
"devapp +list",
"devapp +member-add",
"devapp +member-list",
"devapp +member-remove",
"devapp +permission-list",
"devapp +robot-get",
"devapp +update",
"devapp +version-check-approval",
"devapp +version-get",
"devapp +version-list",
"devapp +version-status",
"devapp +webapp-config",
"devapp +webapp-get",
"ding +list",
"ding +recall-personal",
"ding +receiver-status",
"ding +send-personal",
"doc +comment-create",
"doc +comment-list",
"doc +comment-reply",
"doc +copy",
"doc +doc-append",
"doc +export-get",
"doc +export-submit",
"doc +find-doc",
"doc +list",
"doc +move",
"doc +search",
"doc +share-doc",
"doc +template-list",
"doc +template-search",
"doc +version-list",
"doc +version-revert",
"doc +version-save",
"drive +copy",
"drive +find-file",
"drive +info",
"drive +move",
"drive +recent",
"drive +search",
"drive +search-docs",
"mail +contact-list",
"mail +find-mail-user",
"mail +folder-list",
"mail +recent-mail",
"mail +search-mail",
"mail +tag-list",
"mail +template-list",
"mail +thread-list",
"mail +unread-mail",
"mail +user-search",
"minutes +detail",
"minutes +list-all",
"minutes +list-mine",
"minutes +list-shared",
"minutes +record-start",
"minutes +replace-batch",
"oa +list-cc",
"oa +list-executed",
"oa +list-forms",
"oa +list-pending",
"oa +list-submitted",
"oa +my-initiated",
"oa +search-forms",
"report +inbox-list",
"report +outbox-list",
"sheet +list-sheets",
"sheet +read",
"todo +assign",
"todo +assign-multi",
"todo +created-todos",
"todo +get",
"todo +get-my-tasks",
"todo +list-attachment",
"todo +list-comment",
"todo +list-sub",
"todo +overdue",
"todo +remind",
"todo +todo-done",
"wiki +space-search"
]
},
{
"id": "agoal-out-of-surface",
"reason": "The Agoal product remains executable for compatibility but is outside the currently reviewed open-source Agent command surface.",
+1 -1
View File
@@ -34,7 +34,7 @@ var embeddedSchemaCommandRegistrySchemaJSON []byte
var (
commandRegistryProductIDPattern = regexp.MustCompile(`^[A-Za-z0-9][A-Za-z0-9_-]*$`)
commandRegistryCanonicalPattern = regexp.MustCompile(`^[A-Za-z0-9][A-Za-z0-9_-]*\.[A-Za-z0-9][A-Za-z0-9_.-]*$`)
commandRegistryCLIPathToken = regexp.MustCompile(`^[A-Za-z0-9][A-Za-z0-9._:-]*$`)
commandRegistryCLIPathToken = regexp.MustCompile(`^(?:[A-Za-z0-9][A-Za-z0-9._:-]*|\+[A-Za-z0-9][A-Za-z0-9._:-]*)$`)
)
type schemaCommandRegistrySnapshot struct {
+894
View File
@@ -488,6 +488,122 @@
{
"canonical_path": "aitable.workflow_update",
"cli_path": "aitable workflow update"
},
{
"canonical_path": "aitable.shortcut_base_list",
"cli_path": "aitable +base-list"
},
{
"canonical_path": "aitable.shortcut_base_search",
"cli_path": "aitable +base-search"
},
{
"canonical_path": "aitable.shortcut_base_get",
"cli_path": "aitable +base-get"
},
{
"canonical_path": "aitable.shortcut_table_get",
"cli_path": "aitable +table-get"
},
{
"canonical_path": "aitable.shortcut_field_get",
"cli_path": "aitable +field-get"
},
{
"canonical_path": "aitable.shortcut_record_query",
"cli_path": "aitable +record-query"
},
{
"canonical_path": "aitable.shortcut_record_query_empty",
"cli_path": "aitable +record-query-empty"
},
{
"canonical_path": "aitable.shortcut_record_history_list",
"cli_path": "aitable +record-history-list"
},
{
"canonical_path": "aitable.shortcut_record_share_url",
"cli_path": "aitable +record-share-url"
},
{
"canonical_path": "aitable.shortcut_template_search",
"cli_path": "aitable +template-search"
},
{
"canonical_path": "aitable.shortcut_view_get",
"cli_path": "aitable +view-get"
},
{
"canonical_path": "aitable.shortcut_view_get_lock",
"cli_path": "aitable +view-get-lock"
},
{
"canonical_path": "aitable.shortcut_view_get_frozen_cols",
"cli_path": "aitable +view-get-frozen-cols"
},
{
"canonical_path": "aitable.shortcut_view_get_row_height",
"cli_path": "aitable +view-get-row-height"
},
{
"canonical_path": "aitable.shortcut_form_list",
"cli_path": "aitable +form-list"
},
{
"canonical_path": "aitable.shortcut_form_field_list",
"cli_path": "aitable +form-field-list"
},
{
"canonical_path": "aitable.shortcut_form_share_get",
"cli_path": "aitable +form-share-get"
},
{
"canonical_path": "aitable.shortcut_dashboard_config_example",
"cli_path": "aitable +dashboard-config-example"
},
{
"canonical_path": "aitable.shortcut_dashboard_get",
"cli_path": "aitable +dashboard-get"
},
{
"canonical_path": "aitable.shortcut_chart_widgets_example",
"cli_path": "aitable +chart-widgets-example"
},
{
"canonical_path": "aitable.shortcut_chart_get",
"cli_path": "aitable +chart-get"
},
{
"canonical_path": "aitable.shortcut_role_list",
"cli_path": "aitable +role-list"
},
{
"canonical_path": "aitable.shortcut_section_list_empty",
"cli_path": "aitable +section-list-empty"
},
{
"canonical_path": "aitable.shortcut_section_list_nodes",
"cli_path": "aitable +section-list-nodes"
},
{
"canonical_path": "aitable.shortcut_find_record",
"cli_path": "aitable +find-record"
},
{
"canonical_path": "aitable.shortcut_list_tables",
"cli_path": "aitable +list-tables"
},
{
"canonical_path": "aitable.shortcut_record_share_links",
"cli_path": "aitable +record-share-links"
},
{
"canonical_path": "aitable.shortcut_resolve_base",
"cli_path": "aitable +resolve-base"
},
{
"canonical_path": "aitable.shortcut_resolve_table",
"cli_path": "aitable +resolve-table"
}
]
},
@@ -645,6 +761,82 @@
{
"canonical_path": "attendance.vacation_update_type",
"cli_path": "attendance vacation update-type"
},
{
"canonical_path": "attendance.shortcut_check_result",
"cli_path": "attendance +check-result"
},
{
"canonical_path": "attendance.shortcut_check_record",
"cli_path": "attendance +check-record"
},
{
"canonical_path": "attendance.shortcut_list_approve",
"cli_path": "attendance +list-approve"
},
{
"canonical_path": "attendance.shortcut_get_approve_template",
"cli_path": "attendance +get-approve-template"
},
{
"canonical_path": "attendance.shortcut_get_schedule",
"cli_path": "attendance +get-schedule"
},
{
"canonical_path": "attendance.shortcut_search_class",
"cli_path": "attendance +search-class"
},
{
"canonical_path": "attendance.shortcut_get_adjustment_rule",
"cli_path": "attendance +get-adjustment-rule"
},
{
"canonical_path": "attendance.shortcut_search_adjustment_rule",
"cli_path": "attendance +search-adjustment-rule"
},
{
"canonical_path": "attendance.shortcut_get_overtime_rule",
"cli_path": "attendance +get-overtime-rule"
},
{
"canonical_path": "attendance.shortcut_search_overtime_rule",
"cli_path": "attendance +search-overtime-rule"
},
{
"canonical_path": "attendance.shortcut_search_group",
"cli_path": "attendance +search-group"
},
{
"canonical_path": "attendance.shortcut_get_summary",
"cli_path": "attendance +get-summary"
},
{
"canonical_path": "attendance.shortcut_get_self_setting",
"cli_path": "attendance +get-self-setting"
},
{
"canonical_path": "attendance.shortcut_query_report_data",
"cli_path": "attendance +query-report-data"
},
{
"canonical_path": "attendance.shortcut_list_leave_types",
"cli_path": "attendance +list-leave-types"
},
{
"canonical_path": "attendance.shortcut_get_leave_records",
"cli_path": "attendance +get-leave-records"
},
{
"canonical_path": "attendance.shortcut_get_checkin_record",
"cli_path": "attendance +get-checkin-record"
},
{
"canonical_path": "attendance.shortcut_my_attendance",
"cli_path": "attendance +my-attendance"
},
{
"canonical_path": "attendance.shortcut_this_month",
"cli_path": "attendance +this-month"
}
]
},
@@ -747,6 +939,86 @@
{
"canonical_path": "calendar.query_available_meeting_room",
"cli_path": "calendar room search"
},
{
"canonical_path": "calendar.shortcut_agenda",
"cli_path": "calendar +agenda"
},
{
"canonical_path": "calendar.shortcut_attendee_list",
"cli_path": "calendar +attendee-list"
},
{
"canonical_path": "calendar.shortcut_room_search",
"cli_path": "calendar +room-search"
},
{
"canonical_path": "calendar.shortcut_room_groups",
"cli_path": "calendar +room-groups"
},
{
"canonical_path": "calendar.shortcut_freebusy",
"cli_path": "calendar +freebusy"
},
{
"canonical_path": "calendar.shortcut_book_list",
"cli_path": "calendar +book-list"
},
{
"canonical_path": "calendar.shortcut_book_search",
"cli_path": "calendar +book-search"
},
{
"canonical_path": "calendar.shortcut_book",
"cli_path": "calendar +book"
},
{
"canonical_path": "calendar.shortcut_cancel_event",
"cli_path": "calendar +cancel-event"
},
{
"canonical_path": "calendar.shortcut_conflicts",
"cli_path": "calendar +conflicts"
},
{
"canonical_path": "calendar.shortcut_free_slots",
"cli_path": "calendar +free-slots"
},
{
"canonical_path": "calendar.shortcut_free",
"cli_path": "calendar +free"
},
{
"canonical_path": "calendar.shortcut_invite",
"cli_path": "calendar +invite"
},
{
"canonical_path": "calendar.shortcut_my_free",
"cli_path": "calendar +my-free"
},
{
"canonical_path": "calendar.shortcut_next_event",
"cli_path": "calendar +next-event"
},
{
"canonical_path": "calendar.shortcut_reschedule",
"cli_path": "calendar +reschedule"
},
{
"canonical_path": "calendar.shortcut_suggest_time",
"cli_path": "calendar +suggest-time"
},
{
"canonical_path": "calendar.shortcut_today",
"cli_path": "calendar +today"
},
{
"canonical_path": "calendar.shortcut_tomorrow",
"cli_path": "calendar +tomorrow"
},
{
"canonical_path": "calendar.shortcut_week",
"cli_path": "calendar +week"
}
]
},
@@ -1064,6 +1336,174 @@
{
"canonical_path": "chat.upgrade_group_to_external",
"cli_path": "chat group upgrade-to-external"
},
{
"canonical_path": "chat.shortcut_bot_search",
"cli_path": "chat +bot-search"
},
{
"canonical_path": "chat.shortcut_bot_find",
"cli_path": "chat +bot-find"
},
{
"canonical_path": "chat.shortcut_conversation_info",
"cli_path": "chat +conversation-info"
},
{
"canonical_path": "chat.shortcut_conversation_clear_all_red_point",
"cli_path": "chat +conversation-clear-all-red-point"
},
{
"canonical_path": "chat.shortcut_conversation_list",
"cli_path": "chat +conversation-list"
},
{
"canonical_path": "chat.shortcut_conversation_list_top",
"cli_path": "chat +conversation-list-top"
},
{
"canonical_path": "chat.shortcut_category_list",
"cli_path": "chat +category-list"
},
{
"canonical_path": "chat.shortcut_category_create",
"cli_path": "chat +category-create"
},
{
"canonical_path": "chat.shortcut_category_delete",
"cli_path": "chat +category-delete"
},
{
"canonical_path": "chat.shortcut_category_rename",
"cli_path": "chat +category-rename"
},
{
"canonical_path": "chat.shortcut_chat_search",
"cli_path": "chat +chat-search"
},
{
"canonical_path": "chat.shortcut_chat_invite_url",
"cli_path": "chat +chat-invite-url"
},
{
"canonical_path": "chat.shortcut_chat_dismiss",
"cli_path": "chat +chat-dismiss"
},
{
"canonical_path": "chat.shortcut_chat_set_history",
"cli_path": "chat +chat-set-history"
},
{
"canonical_path": "chat.shortcut_chat_update_nick",
"cli_path": "chat +chat-update-nick"
},
{
"canonical_path": "chat.shortcut_chat_update_alias",
"cli_path": "chat +chat-update-alias"
},
{
"canonical_path": "chat.shortcut_chat_list_mine",
"cli_path": "chat +chat-list-mine"
},
{
"canonical_path": "chat.shortcut_chat_list_all",
"cli_path": "chat +chat-list-all"
},
{
"canonical_path": "chat.shortcut_chat_list_join_requests",
"cli_path": "chat +chat-list-join-requests"
},
{
"canonical_path": "chat.shortcut_chat_bots",
"cli_path": "chat +chat-bots"
},
{
"canonical_path": "chat.shortcut_chat_set_admin",
"cli_path": "chat +chat-set-admin"
},
{
"canonical_path": "chat.shortcut_chat_mute",
"cli_path": "chat +chat-mute"
},
{
"canonical_path": "chat.shortcut_chat_role_list",
"cli_path": "chat +chat-role-list"
},
{
"canonical_path": "chat.shortcut_chat_role_add",
"cli_path": "chat +chat-role-add"
},
{
"canonical_path": "chat.shortcut_chat_role_update",
"cli_path": "chat +chat-role-update"
},
{
"canonical_path": "chat.shortcut_chat_role_set_user",
"cli_path": "chat +chat-role-set-user"
},
{
"canonical_path": "chat.shortcut_chat_role_query_user",
"cli_path": "chat +chat-role-query-user"
},
{
"canonical_path": "chat.shortcut_messages_send_by_webhook",
"cli_path": "chat +messages-send-by-webhook"
},
{
"canonical_path": "chat.shortcut_messages_list_direct",
"cli_path": "chat +messages-list-direct"
},
{
"canonical_path": "chat.shortcut_messages_list_unread_conversations",
"cli_path": "chat +messages-list-unread-conversations"
},
{
"canonical_path": "chat.shortcut_messages_mget",
"cli_path": "chat +messages-mget"
},
{
"canonical_path": "chat.shortcut_messages_query_send_status",
"cli_path": "chat +messages-query-send-status"
},
{
"canonical_path": "chat.shortcut_messages_read_status",
"cli_path": "chat +messages-read-status"
},
{
"canonical_path": "chat.shortcut_messages_update_card",
"cli_path": "chat +messages-update-card"
},
{
"canonical_path": "chat.shortcut_messages_list_pin",
"cli_path": "chat +messages-list-pin"
},
{
"canonical_path": "chat.shortcut_at_me",
"cli_path": "chat +at-me"
},
{
"canonical_path": "chat.shortcut_broadcast",
"cli_path": "chat +broadcast"
},
{
"canonical_path": "chat.shortcut_dm",
"cli_path": "chat +dm"
},
{
"canonical_path": "chat.shortcut_group_members",
"cli_path": "chat +group-members"
},
{
"canonical_path": "chat.shortcut_my_groups",
"cli_path": "chat +my-groups"
},
{
"canonical_path": "chat.shortcut_send_to_group",
"cli_path": "chat +send-to-group"
},
{
"canonical_path": "chat.shortcut_unread_chats",
"cli_path": "chat +unread-chats"
}
]
},
@@ -1149,6 +1589,62 @@
{
"canonical_path": "contact.self_user_profile_update",
"cli_path": "contact user update-self"
},
{
"canonical_path": "contact.shortcut_list_followings",
"cli_path": "contact +list-followings"
},
{
"canonical_path": "contact.shortcut_search_user",
"cli_path": "contact +search-user"
},
{
"canonical_path": "contact.shortcut_search_mobile",
"cli_path": "contact +search-mobile"
},
{
"canonical_path": "contact.shortcut_list_roles",
"cli_path": "contact +list-roles"
},
{
"canonical_path": "contact.shortcut_list_role_members",
"cli_path": "contact +list-role-members"
},
{
"canonical_path": "contact.shortcut_list_sub_depts",
"cli_path": "contact +list-sub-depts"
},
{
"canonical_path": "contact.shortcut_list_dept_members",
"cli_path": "contact +list-dept-members"
},
{
"canonical_path": "contact.shortcut_by_mobile",
"cli_path": "contact +by-mobile"
},
{
"canonical_path": "contact.shortcut_dept_members",
"cli_path": "contact +dept-members"
},
{
"canonical_path": "contact.shortcut_lookup",
"cli_path": "contact +lookup"
},
{
"canonical_path": "contact.shortcut_org",
"cli_path": "contact +org"
},
{
"canonical_path": "contact.shortcut_resolve_dept",
"cli_path": "contact +resolve-dept"
},
{
"canonical_path": "contact.shortcut_team",
"cli_path": "contact +team"
},
{
"canonical_path": "contact.shortcut_me",
"cli_path": "contact +me"
}
]
},
@@ -1293,6 +1789,87 @@
}
]
},
{
"id": "devapp",
"tools": [
{
"canonical_path": "devapp.shortcut_list",
"cli_path": "devapp +list"
},
{
"canonical_path": "devapp.shortcut_get",
"cli_path": "devapp +get"
},
{
"canonical_path": "devapp.shortcut_create",
"cli_path": "devapp +create"
},
{
"canonical_path": "devapp.shortcut_update",
"cli_path": "devapp +update"
},
{
"canonical_path": "devapp.shortcut_delete",
"cli_path": "devapp +delete"
},
{
"canonical_path": "devapp.shortcut_enable",
"cli_path": "devapp +enable"
},
{
"canonical_path": "devapp.shortcut_disable",
"cli_path": "devapp +disable"
},
{
"canonical_path": "devapp.shortcut_webapp_get",
"cli_path": "devapp +webapp-get"
},
{
"canonical_path": "devapp.shortcut_webapp_config",
"cli_path": "devapp +webapp-config"
},
{
"canonical_path": "devapp.shortcut_permission_list",
"cli_path": "devapp +permission-list"
},
{
"canonical_path": "devapp.shortcut_member_list",
"cli_path": "devapp +member-list"
},
{
"canonical_path": "devapp.shortcut_member_add",
"cli_path": "devapp +member-add"
},
{
"canonical_path": "devapp.shortcut_member_remove",
"cli_path": "devapp +member-remove"
},
{
"canonical_path": "devapp.shortcut_robot_get",
"cli_path": "devapp +robot-get"
},
{
"canonical_path": "devapp.shortcut_event_list",
"cli_path": "devapp +event-list"
},
{
"canonical_path": "devapp.shortcut_version_list",
"cli_path": "devapp +version-list"
},
{
"canonical_path": "devapp.shortcut_version_get",
"cli_path": "devapp +version-get"
},
{
"canonical_path": "devapp.shortcut_version_check_approval",
"cli_path": "devapp +version-check-approval"
},
{
"canonical_path": "devapp.shortcut_version_status",
"cli_path": "devapp +version-status"
}
]
},
{
"id": "devdoc",
"tools": [
@@ -1312,6 +1889,22 @@
{
"canonical_path": "ding.send_ding_message",
"cli_path": "ding message send"
},
{
"canonical_path": "ding.shortcut_list",
"cli_path": "ding +list"
},
{
"canonical_path": "ding.shortcut_receiver_status",
"cli_path": "ding +receiver-status"
},
{
"canonical_path": "ding.shortcut_send_personal",
"cli_path": "ding +send-personal"
},
{
"canonical_path": "ding.shortcut_recall_personal",
"cli_path": "ding +recall-personal"
}
]
},
@@ -1469,6 +2062,74 @@
{
"canonical_path": "doc.version_save",
"cli_path": "doc version save"
},
{
"canonical_path": "doc.shortcut_search",
"cli_path": "doc +search"
},
{
"canonical_path": "doc.shortcut_list",
"cli_path": "doc +list"
},
{
"canonical_path": "doc.shortcut_copy",
"cli_path": "doc +copy"
},
{
"canonical_path": "doc.shortcut_move",
"cli_path": "doc +move"
},
{
"canonical_path": "doc.shortcut_comment_list",
"cli_path": "doc +comment-list"
},
{
"canonical_path": "doc.shortcut_comment_create",
"cli_path": "doc +comment-create"
},
{
"canonical_path": "doc.shortcut_comment_reply",
"cli_path": "doc +comment-reply"
},
{
"canonical_path": "doc.shortcut_export_submit",
"cli_path": "doc +export-submit"
},
{
"canonical_path": "doc.shortcut_export_get",
"cli_path": "doc +export-get"
},
{
"canonical_path": "doc.shortcut_version_save",
"cli_path": "doc +version-save"
},
{
"canonical_path": "doc.shortcut_version_list",
"cli_path": "doc +version-list"
},
{
"canonical_path": "doc.shortcut_version_revert",
"cli_path": "doc +version-revert"
},
{
"canonical_path": "doc.shortcut_template_list",
"cli_path": "doc +template-list"
},
{
"canonical_path": "doc.shortcut_template_search",
"cli_path": "doc +template-search"
},
{
"canonical_path": "doc.shortcut_doc_append",
"cli_path": "doc +doc-append"
},
{
"canonical_path": "doc.shortcut_find_doc",
"cli_path": "doc +find-doc"
},
{
"canonical_path": "doc.shortcut_share_doc",
"cli_path": "doc +share-doc"
}
]
},
@@ -1574,6 +2235,34 @@
{
"canonical_path": "drive.get_upload_info",
"cli_path": "drive upload-info"
},
{
"canonical_path": "drive.shortcut_info",
"cli_path": "drive +info"
},
{
"canonical_path": "drive.shortcut_search",
"cli_path": "drive +search"
},
{
"canonical_path": "drive.shortcut_search_docs",
"cli_path": "drive +search-docs"
},
{
"canonical_path": "drive.shortcut_copy",
"cli_path": "drive +copy"
},
{
"canonical_path": "drive.shortcut_move",
"cli_path": "drive +move"
},
{
"canonical_path": "drive.shortcut_recent",
"cli_path": "drive +recent"
},
{
"canonical_path": "drive.shortcut_find_file",
"cli_path": "drive +find-file"
}
]
},
@@ -1602,6 +2291,55 @@
}
]
},
{
"id": "hrbrain",
"tools": [
{
"canonical_path": "hrbrain.list_talent_pools",
"cli_path": "hrbrain talent-pool list"
},
{
"canonical_path": "hrbrain.get_talent_pool_detail",
"cli_path": "hrbrain talent-pool detail"
},
{
"canonical_path": "hrbrain.list_pool_employees",
"cli_path": "hrbrain talent-pool employees"
},
{
"canonical_path": "hrbrain.get_profile_metadata",
"cli_path": "hrbrain profile metadata"
},
{
"canonical_path": "hrbrain.query_profile_data",
"cli_path": "hrbrain profile query"
},
{
"canonical_path": "hrbrain.get_profile_label",
"cli_path": "hrbrain profile labels"
},
{
"canonical_path": "hrbrain.get_employee_career",
"cli_path": "hrbrain profile career"
},
{
"canonical_path": "hrbrain.get_employee_performance",
"cli_path": "hrbrain profile performance"
},
{
"canonical_path": "hrbrain.search_employees",
"cli_path": "hrbrain search employees"
},
{
"canonical_path": "hrbrain.search_employees_structured",
"cli_path": "hrbrain search employees-structured"
},
{
"canonical_path": "hrbrain.get_search_fields",
"cli_path": "hrbrain search fields"
}
]
},
{
"id": "live",
"tools": [
@@ -1737,6 +2475,46 @@
{
"canonical_path": "mail.search_mail_users",
"cli_path": "mail user search"
},
{
"canonical_path": "mail.shortcut_thread_list",
"cli_path": "mail +thread-list"
},
{
"canonical_path": "mail.shortcut_folder_list",
"cli_path": "mail +folder-list"
},
{
"canonical_path": "mail.shortcut_tag_list",
"cli_path": "mail +tag-list"
},
{
"canonical_path": "mail.shortcut_user_search",
"cli_path": "mail +user-search"
},
{
"canonical_path": "mail.shortcut_template_list",
"cli_path": "mail +template-list"
},
{
"canonical_path": "mail.shortcut_contact_list",
"cli_path": "mail +contact-list"
},
{
"canonical_path": "mail.shortcut_find_mail_user",
"cli_path": "mail +find-mail-user"
},
{
"canonical_path": "mail.shortcut_recent_mail",
"cli_path": "mail +recent-mail"
},
{
"canonical_path": "mail.shortcut_search_mail",
"cli_path": "mail +search-mail"
},
{
"canonical_path": "mail.shortcut_unread_mail",
"cli_path": "mail +unread-mail"
}
]
},
@@ -1896,6 +2674,30 @@
{
"canonical_path": "minutes.create_upload_session",
"cli_path": "minutes upload create"
},
{
"canonical_path": "minutes.shortcut_list_mine",
"cli_path": "minutes +list-mine"
},
{
"canonical_path": "minutes.shortcut_list_shared",
"cli_path": "minutes +list-shared"
},
{
"canonical_path": "minutes.shortcut_list_all",
"cli_path": "minutes +list-all"
},
{
"canonical_path": "minutes.shortcut_record_start",
"cli_path": "minutes +record-start"
},
{
"canonical_path": "minutes.shortcut_detail",
"cli_path": "minutes +detail"
},
{
"canonical_path": "minutes.shortcut_replace_batch",
"cli_path": "minutes +replace-batch"
}
]
},
@@ -1961,6 +2763,34 @@
{
"canonical_path": "oa.list_pending_tasks",
"cli_path": "oa approval tasks"
},
{
"canonical_path": "oa.shortcut_list_pending",
"cli_path": "oa +list-pending"
},
{
"canonical_path": "oa.shortcut_list_forms",
"cli_path": "oa +list-forms"
},
{
"canonical_path": "oa.shortcut_search_forms",
"cli_path": "oa +search-forms"
},
{
"canonical_path": "oa.shortcut_list_executed",
"cli_path": "oa +list-executed"
},
{
"canonical_path": "oa.shortcut_list_submitted",
"cli_path": "oa +list-submitted"
},
{
"canonical_path": "oa.shortcut_list_cc",
"cli_path": "oa +list-cc"
},
{
"canonical_path": "oa.shortcut_my_initiated",
"cli_path": "oa +my-initiated"
}
]
},
@@ -2026,6 +2856,14 @@
{
"canonical_path": "report.get_available_report_templates",
"cli_path": "report template list"
},
{
"canonical_path": "report.shortcut_inbox_list",
"cli_path": "report +inbox-list"
},
{
"canonical_path": "report.shortcut_outbox_list",
"cli_path": "report +outbox-list"
}
]
},
@@ -2353,6 +3191,14 @@
{
"canonical_path": "sheet.write_image",
"cli_path": "sheet write-image"
},
{
"canonical_path": "sheet.shortcut_list_sheets",
"cli_path": "sheet +list-sheets"
},
{
"canonical_path": "sheet.shortcut_read",
"cli_path": "sheet +read"
}
]
},
@@ -2450,6 +3296,50 @@
{
"canonical_path": "todo.update_todo_tag",
"cli_path": "todo tag update"
},
{
"canonical_path": "todo.shortcut_assign",
"cli_path": "todo +assign"
},
{
"canonical_path": "todo.shortcut_assign_multi",
"cli_path": "todo +assign-multi"
},
{
"canonical_path": "todo.shortcut_created_todos",
"cli_path": "todo +created-todos"
},
{
"canonical_path": "todo.shortcut_overdue",
"cli_path": "todo +overdue"
},
{
"canonical_path": "todo.shortcut_remind",
"cli_path": "todo +remind"
},
{
"canonical_path": "todo.shortcut_todo_done",
"cli_path": "todo +todo-done"
},
{
"canonical_path": "todo.shortcut_get_my_tasks",
"cli_path": "todo +get-my-tasks"
},
{
"canonical_path": "todo.shortcut_list_sub",
"cli_path": "todo +list-sub"
},
{
"canonical_path": "todo.shortcut_get",
"cli_path": "todo +get"
},
{
"canonical_path": "todo.shortcut_list_attachment",
"cli_path": "todo +list-attachment"
},
{
"canonical_path": "todo.shortcut_list_comment",
"cli_path": "todo +list-comment"
}
]
},
@@ -2515,6 +3405,10 @@
{
"canonical_path": "wiki.search_wikiSpaces",
"cli_path": "wiki space search"
},
{
"canonical_path": "wiki.shortcut_space_search",
"cli_path": "wiki +space-search"
}
]
}
@@ -36,8 +36,8 @@
},
"cliPath": {
"type": "string",
"pattern": "^(?!dws(?:\\s|$))(?!.*(?:^|\\s)--)(?!.*[*?\\[\\]])[A-Za-z0-9][A-Za-z0-9._:-]*(?: [A-Za-z0-9][A-Za-z0-9._:-]*)*$",
"description": "Exact Cobra command path without the leading 'dws', flags, wildcard characters, or surrounding/repeated whitespace."
"pattern": "^(?!dws(?:\\s|$))(?!.*(?:^|\\s)--)(?!.*[*?\\[\\]])(?:[A-Za-z0-9][A-Za-z0-9._:-]*|\\+[A-Za-z0-9][A-Za-z0-9._:-]*)(?: (?:[A-Za-z0-9][A-Za-z0-9._:-]*|\\+[A-Za-z0-9][A-Za-z0-9._:-]*))*$",
"description": "Exact Cobra command path without the leading 'dws', flags, wildcard characters, or surrounding/repeated whitespace. A token may use the reviewed '+' shortcut prefix."
},
"product": {
"type": "object",
@@ -94,6 +94,14 @@ func TestDecodeCommandRegistryEnforcesReviewedSourceConstraints(t *testing.T) {
if got := registry.ByCanonical["sample.run"].Visibility; got != SchemaVisibilityPublic {
t.Fatalf("default visibility = %q, want public", got)
}
shortcut, err := decodeCommandRegistry([]byte(wrap(`[{"id":"sample","tools":[{"canonical_path":"sample.shortcut_run","cli_path":"sample +run"}]}]`)))
if err != nil {
t.Fatalf("decode shortcut registry path: %v", err)
}
if got := shortcut.ByCanonical["sample.shortcut_run"].PrimaryCLIPath; got != "sample +run" {
t.Fatalf("shortcut primary path = %q, want sample +run", got)
}
}
func TestCommandRegistryHashCoversEveryStableCommandField(t *testing.T) {
+4
View File
@@ -16,11 +16,13 @@
"chat": "metadata/chat.json",
"contact": "metadata/contact.json",
"dev": "metadata/dev.json",
"devapp": "metadata/devapp.json",
"devdoc": "metadata/devdoc.json",
"ding": "metadata/ding.json",
"doc": "metadata/doc.json",
"drive": "metadata/drive.json",
"event": "metadata/event.json",
"hrbrain": "metadata/hrbrain.json",
"live": "metadata/live.json",
"mail": "metadata/mail.json",
"markdown": "metadata/markdown.json",
@@ -42,11 +44,13 @@
"chat": "selection/chat.json",
"contact": "selection/contact.json",
"dev": "selection/dev.json",
"devapp": "selection/devapp.json",
"devdoc": "selection/devdoc.json",
"ding": "selection/ding.json",
"doc": "selection/doc.json",
"drive": "selection/drive.json",
"event": "selection/event.json",
"hrbrain": "selection/hrbrain.json",
"live": "selection/live.json",
"mail": "selection/mail.json",
"markdown": "selection/markdown.json",
@@ -1056,6 +1056,383 @@
"review_reason": "The command maps --base-id, --workflow-id and a decoded complete workflow-dsl/v1 --dsl object to aitable/update_workflow. This is full replacement rather than a partial patch; locale remains optional.",
"cli_path": "aitable workflow update",
"runtime_gate": "none"
},
"aitable.shortcut_base_list": {
"effect": "read",
"risk": "low",
"confirmation": "not_required",
"idempotency": "idempotent",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "aitable +base-list",
"runtime_gate": "none"
},
"aitable.shortcut_base_search": {
"effect": "read",
"risk": "low",
"confirmation": "not_required",
"idempotency": "idempotent",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "aitable +base-search",
"runtime_gate": "none"
},
"aitable.shortcut_base_get": {
"effect": "read",
"risk": "low",
"confirmation": "not_required",
"idempotency": "idempotent",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "aitable +base-get",
"runtime_gate": "none"
},
"aitable.shortcut_table_get": {
"effect": "read",
"risk": "low",
"confirmation": "not_required",
"idempotency": "idempotent",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "aitable +table-get",
"runtime_gate": "none"
},
"aitable.shortcut_field_get": {
"effect": "read",
"risk": "low",
"confirmation": "not_required",
"idempotency": "idempotent",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "aitable +field-get",
"runtime_gate": "none"
},
"aitable.shortcut_record_query": {
"effect": "read",
"risk": "low",
"confirmation": "not_required",
"idempotency": "idempotent",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "aitable +record-query",
"runtime_gate": "none"
},
"aitable.shortcut_record_query_empty": {
"effect": "read",
"risk": "low",
"confirmation": "not_required",
"idempotency": "idempotent",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "aitable +record-query-empty",
"runtime_gate": "none"
},
"aitable.shortcut_record_history_list": {
"effect": "read",
"risk": "low",
"confirmation": "not_required",
"idempotency": "idempotent",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "aitable +record-history-list",
"runtime_gate": "none"
},
"aitable.shortcut_record_share_url": {
"effect": "read",
"risk": "low",
"confirmation": "not_required",
"idempotency": "idempotent",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "aitable +record-share-url",
"runtime_gate": "none"
},
"aitable.shortcut_template_search": {
"effect": "read",
"risk": "low",
"confirmation": "not_required",
"idempotency": "idempotent",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "aitable +template-search",
"runtime_gate": "none"
},
"aitable.shortcut_view_get": {
"effect": "read",
"risk": "low",
"confirmation": "not_required",
"idempotency": "idempotent",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "aitable +view-get",
"runtime_gate": "none"
},
"aitable.shortcut_view_get_lock": {
"effect": "read",
"risk": "low",
"confirmation": "not_required",
"idempotency": "idempotent",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "aitable +view-get-lock",
"runtime_gate": "none"
},
"aitable.shortcut_view_get_frozen_cols": {
"effect": "read",
"risk": "low",
"confirmation": "not_required",
"idempotency": "idempotent",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "aitable +view-get-frozen-cols",
"runtime_gate": "none"
},
"aitable.shortcut_view_get_row_height": {
"effect": "read",
"risk": "low",
"confirmation": "not_required",
"idempotency": "idempotent",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "aitable +view-get-row-height",
"runtime_gate": "none"
},
"aitable.shortcut_form_list": {
"effect": "read",
"risk": "low",
"confirmation": "not_required",
"idempotency": "idempotent",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "aitable +form-list",
"runtime_gate": "none"
},
"aitable.shortcut_form_field_list": {
"effect": "read",
"risk": "low",
"confirmation": "not_required",
"idempotency": "idempotent",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "aitable +form-field-list",
"runtime_gate": "none"
},
"aitable.shortcut_form_share_get": {
"effect": "read",
"risk": "low",
"confirmation": "not_required",
"idempotency": "idempotent",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "aitable +form-share-get",
"runtime_gate": "none"
},
"aitable.shortcut_dashboard_config_example": {
"effect": "read",
"risk": "low",
"confirmation": "not_required",
"idempotency": "idempotent",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "aitable +dashboard-config-example",
"runtime_gate": "none"
},
"aitable.shortcut_dashboard_get": {
"effect": "read",
"risk": "low",
"confirmation": "not_required",
"idempotency": "idempotent",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "aitable +dashboard-get",
"runtime_gate": "none"
},
"aitable.shortcut_chart_widgets_example": {
"effect": "read",
"risk": "low",
"confirmation": "not_required",
"idempotency": "idempotent",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "aitable +chart-widgets-example",
"runtime_gate": "none"
},
"aitable.shortcut_chart_get": {
"effect": "read",
"risk": "low",
"confirmation": "not_required",
"idempotency": "idempotent",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "aitable +chart-get",
"runtime_gate": "none"
},
"aitable.shortcut_role_list": {
"effect": "read",
"risk": "low",
"confirmation": "not_required",
"idempotency": "idempotent",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "aitable +role-list",
"runtime_gate": "none"
},
"aitable.shortcut_section_list_empty": {
"effect": "read",
"risk": "low",
"confirmation": "not_required",
"idempotency": "idempotent",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "aitable +section-list-empty",
"runtime_gate": "none"
},
"aitable.shortcut_section_list_nodes": {
"effect": "read",
"risk": "low",
"confirmation": "not_required",
"idempotency": "idempotent",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "aitable +section-list-nodes",
"runtime_gate": "none"
},
"aitable.shortcut_find_record": {
"effect": "read",
"risk": "low",
"confirmation": "not_required",
"idempotency": "idempotent",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "aitable +find-record",
"runtime_gate": "none"
},
"aitable.shortcut_list_tables": {
"effect": "read",
"risk": "low",
"confirmation": "not_required",
"idempotency": "idempotent",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "aitable +list-tables",
"runtime_gate": "none"
},
"aitable.shortcut_record_share_links": {
"effect": "read",
"risk": "low",
"confirmation": "not_required",
"idempotency": "idempotent",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "aitable +record-share-links",
"runtime_gate": "none"
},
"aitable.shortcut_resolve_base": {
"effect": "read",
"risk": "low",
"confirmation": "not_required",
"idempotency": "idempotent",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "aitable +resolve-base",
"runtime_gate": "none"
},
"aitable.shortcut_resolve_table": {
"effect": "read",
"risk": "low",
"confirmation": "not_required",
"idempotency": "idempotent",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "aitable +resolve-table",
"runtime_gate": "none"
}
}
}
@@ -428,6 +428,253 @@
"interface_reason": "Reviewed unpinned remote adapter: this executable CLI wrapper calls a remote helper that is absent from the pinned MCP metadata snapshot; no single pinned semantically equivalent interface_ref can represent the command.",
"reviewed": true,
"runtime_gate": "typed_yes"
},
"attendance.shortcut_check_result": {
"effect": "read",
"risk": "low",
"confirmation": "not_required",
"idempotency": "idempotent",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "attendance +check-result",
"runtime_gate": "none"
},
"attendance.shortcut_check_record": {
"effect": "read",
"risk": "low",
"confirmation": "not_required",
"idempotency": "idempotent",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "attendance +check-record",
"runtime_gate": "none"
},
"attendance.shortcut_list_approve": {
"effect": "read",
"risk": "low",
"confirmation": "not_required",
"idempotency": "idempotent",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "attendance +list-approve",
"runtime_gate": "none"
},
"attendance.shortcut_get_approve_template": {
"effect": "read",
"risk": "low",
"confirmation": "not_required",
"idempotency": "idempotent",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "attendance +get-approve-template",
"runtime_gate": "none"
},
"attendance.shortcut_get_schedule": {
"effect": "read",
"risk": "low",
"confirmation": "not_required",
"idempotency": "idempotent",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "attendance +get-schedule",
"runtime_gate": "none"
},
"attendance.shortcut_search_class": {
"effect": "read",
"risk": "low",
"confirmation": "not_required",
"idempotency": "idempotent",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "attendance +search-class",
"runtime_gate": "none"
},
"attendance.shortcut_get_adjustment_rule": {
"effect": "read",
"risk": "low",
"confirmation": "not_required",
"idempotency": "idempotent",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "attendance +get-adjustment-rule",
"runtime_gate": "none"
},
"attendance.shortcut_search_adjustment_rule": {
"effect": "read",
"risk": "low",
"confirmation": "not_required",
"idempotency": "idempotent",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "attendance +search-adjustment-rule",
"runtime_gate": "none"
},
"attendance.shortcut_get_overtime_rule": {
"effect": "read",
"risk": "low",
"confirmation": "not_required",
"idempotency": "idempotent",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "attendance +get-overtime-rule",
"runtime_gate": "none"
},
"attendance.shortcut_search_overtime_rule": {
"effect": "read",
"risk": "low",
"confirmation": "not_required",
"idempotency": "idempotent",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "attendance +search-overtime-rule",
"runtime_gate": "none"
},
"attendance.shortcut_search_group": {
"effect": "read",
"risk": "low",
"confirmation": "not_required",
"idempotency": "idempotent",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "attendance +search-group",
"runtime_gate": "none"
},
"attendance.shortcut_get_summary": {
"effect": "read",
"risk": "low",
"confirmation": "not_required",
"idempotency": "idempotent",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "attendance +get-summary",
"runtime_gate": "none"
},
"attendance.shortcut_get_self_setting": {
"effect": "read",
"risk": "low",
"confirmation": "not_required",
"idempotency": "idempotent",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "attendance +get-self-setting",
"runtime_gate": "none"
},
"attendance.shortcut_query_report_data": {
"effect": "read",
"risk": "low",
"confirmation": "not_required",
"idempotency": "idempotent",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "attendance +query-report-data",
"runtime_gate": "none"
},
"attendance.shortcut_list_leave_types": {
"effect": "read",
"risk": "low",
"confirmation": "not_required",
"idempotency": "idempotent",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "attendance +list-leave-types",
"runtime_gate": "none"
},
"attendance.shortcut_get_leave_records": {
"effect": "read",
"risk": "low",
"confirmation": "not_required",
"idempotency": "idempotent",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "attendance +get-leave-records",
"runtime_gate": "none"
},
"attendance.shortcut_get_checkin_record": {
"effect": "read",
"risk": "low",
"confirmation": "not_required",
"idempotency": "idempotent",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "attendance +get-checkin-record",
"runtime_gate": "none"
},
"attendance.shortcut_my_attendance": {
"effect": "read",
"risk": "low",
"confirmation": "not_required",
"idempotency": "idempotent",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "attendance +my-attendance",
"runtime_gate": "none"
},
"attendance.shortcut_this_month": {
"effect": "read",
"risk": "low",
"confirmation": "not_required",
"idempotency": "idempotent",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "attendance +this-month",
"runtime_gate": "none"
}
}
}
@@ -119,6 +119,266 @@
"interface_mode": "mcp",
"availability": "available",
"reviewed": true
},
"calendar.shortcut_agenda": {
"effect": "read",
"risk": "low",
"confirmation": "not_required",
"idempotency": "idempotent",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "calendar +agenda",
"runtime_gate": "none"
},
"calendar.shortcut_attendee_list": {
"effect": "read",
"risk": "low",
"confirmation": "not_required",
"idempotency": "idempotent",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "calendar +attendee-list",
"runtime_gate": "none"
},
"calendar.shortcut_room_search": {
"effect": "read",
"risk": "low",
"confirmation": "not_required",
"idempotency": "idempotent",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "calendar +room-search",
"runtime_gate": "none"
},
"calendar.shortcut_room_groups": {
"effect": "read",
"risk": "low",
"confirmation": "not_required",
"idempotency": "idempotent",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "calendar +room-groups",
"runtime_gate": "none"
},
"calendar.shortcut_freebusy": {
"effect": "read",
"risk": "low",
"confirmation": "not_required",
"idempotency": "idempotent",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "calendar +freebusy",
"runtime_gate": "none"
},
"calendar.shortcut_book_list": {
"effect": "read",
"risk": "low",
"confirmation": "not_required",
"idempotency": "idempotent",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "calendar +book-list",
"runtime_gate": "none"
},
"calendar.shortcut_book_search": {
"effect": "read",
"risk": "low",
"confirmation": "not_required",
"idempotency": "idempotent",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "calendar +book-search",
"runtime_gate": "none"
},
"calendar.shortcut_book": {
"effect": "write",
"risk": "medium",
"confirmation": "user_required",
"idempotency": "unknown",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "calendar +book",
"runtime_gate": "typed_yes"
},
"calendar.shortcut_cancel_event": {
"effect": "destructive",
"risk": "high",
"confirmation": "user_required",
"idempotency": "unknown",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "calendar +cancel-event",
"runtime_gate": "typed_yes"
},
"calendar.shortcut_conflicts": {
"effect": "read",
"risk": "low",
"confirmation": "not_required",
"idempotency": "idempotent",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "calendar +conflicts",
"runtime_gate": "none"
},
"calendar.shortcut_free_slots": {
"effect": "read",
"risk": "low",
"confirmation": "not_required",
"idempotency": "idempotent",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "calendar +free-slots",
"runtime_gate": "none"
},
"calendar.shortcut_free": {
"effect": "read",
"risk": "low",
"confirmation": "not_required",
"idempotency": "idempotent",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "calendar +free",
"runtime_gate": "none"
},
"calendar.shortcut_invite": {
"effect": "write",
"risk": "medium",
"confirmation": "user_required",
"idempotency": "unknown",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "calendar +invite",
"runtime_gate": "typed_yes"
},
"calendar.shortcut_my_free": {
"effect": "read",
"risk": "low",
"confirmation": "not_required",
"idempotency": "idempotent",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "calendar +my-free",
"runtime_gate": "none"
},
"calendar.shortcut_next_event": {
"effect": "read",
"risk": "low",
"confirmation": "not_required",
"idempotency": "idempotent",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "calendar +next-event",
"runtime_gate": "none"
},
"calendar.shortcut_reschedule": {
"effect": "write",
"risk": "medium",
"confirmation": "user_required",
"idempotency": "unknown",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "calendar +reschedule",
"runtime_gate": "typed_yes"
},
"calendar.shortcut_suggest_time": {
"effect": "read",
"risk": "low",
"confirmation": "not_required",
"idempotency": "idempotent",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "calendar +suggest-time",
"runtime_gate": "none"
},
"calendar.shortcut_today": {
"effect": "read",
"risk": "low",
"confirmation": "not_required",
"idempotency": "idempotent",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "calendar +today",
"runtime_gate": "none"
},
"calendar.shortcut_tomorrow": {
"effect": "read",
"risk": "low",
"confirmation": "not_required",
"idempotency": "idempotent",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "calendar +tomorrow",
"runtime_gate": "none"
},
"calendar.shortcut_week": {
"effect": "read",
"risk": "low",
"confirmation": "not_required",
"idempotency": "idempotent",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "calendar +week",
"runtime_gate": "none"
}
}
}
@@ -800,6 +800,552 @@
"review_reason": "The reviewed handler validates the target group and optional string-valued extension object, permits caller-authoritative dry-run, and requires explicit --yes before the irreversible upgrade.",
"cli_path": "chat group upgrade-to-external",
"runtime_gate": "confirm_dangerous"
},
"chat.shortcut_bot_search": {
"effect": "read",
"risk": "low",
"confirmation": "not_required",
"idempotency": "idempotent",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "chat +bot-search",
"runtime_gate": "none"
},
"chat.shortcut_bot_find": {
"effect": "read",
"risk": "low",
"confirmation": "not_required",
"idempotency": "idempotent",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "chat +bot-find",
"runtime_gate": "none"
},
"chat.shortcut_conversation_info": {
"effect": "read",
"risk": "low",
"confirmation": "not_required",
"idempotency": "idempotent",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "chat +conversation-info",
"runtime_gate": "none"
},
"chat.shortcut_conversation_clear_all_red_point": {
"effect": "write",
"risk": "medium",
"confirmation": "user_required",
"idempotency": "unknown",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "chat +conversation-clear-all-red-point",
"runtime_gate": "typed_yes"
},
"chat.shortcut_conversation_list": {
"effect": "read",
"risk": "low",
"confirmation": "not_required",
"idempotency": "idempotent",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "chat +conversation-list",
"runtime_gate": "none"
},
"chat.shortcut_conversation_list_top": {
"effect": "read",
"risk": "low",
"confirmation": "not_required",
"idempotency": "idempotent",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "chat +conversation-list-top",
"runtime_gate": "none"
},
"chat.shortcut_category_list": {
"effect": "read",
"risk": "low",
"confirmation": "not_required",
"idempotency": "idempotent",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "chat +category-list",
"runtime_gate": "none"
},
"chat.shortcut_category_create": {
"effect": "write",
"risk": "medium",
"confirmation": "user_required",
"idempotency": "unknown",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "chat +category-create",
"runtime_gate": "typed_yes"
},
"chat.shortcut_category_delete": {
"effect": "destructive",
"risk": "high",
"confirmation": "user_required",
"idempotency": "unknown",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "chat +category-delete",
"runtime_gate": "typed_yes"
},
"chat.shortcut_category_rename": {
"effect": "write",
"risk": "medium",
"confirmation": "user_required",
"idempotency": "unknown",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "chat +category-rename",
"runtime_gate": "typed_yes"
},
"chat.shortcut_chat_search": {
"effect": "read",
"risk": "low",
"confirmation": "not_required",
"idempotency": "idempotent",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "chat +chat-search",
"runtime_gate": "none"
},
"chat.shortcut_chat_invite_url": {
"effect": "read",
"risk": "low",
"confirmation": "not_required",
"idempotency": "idempotent",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "chat +chat-invite-url",
"runtime_gate": "none"
},
"chat.shortcut_chat_dismiss": {
"effect": "destructive",
"risk": "high",
"confirmation": "user_required",
"idempotency": "unknown",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "chat +chat-dismiss",
"runtime_gate": "typed_yes"
},
"chat.shortcut_chat_set_history": {
"effect": "write",
"risk": "medium",
"confirmation": "user_required",
"idempotency": "unknown",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "chat +chat-set-history",
"runtime_gate": "typed_yes"
},
"chat.shortcut_chat_update_nick": {
"effect": "write",
"risk": "medium",
"confirmation": "user_required",
"idempotency": "unknown",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "chat +chat-update-nick",
"runtime_gate": "typed_yes"
},
"chat.shortcut_chat_update_alias": {
"effect": "write",
"risk": "medium",
"confirmation": "user_required",
"idempotency": "unknown",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "chat +chat-update-alias",
"runtime_gate": "typed_yes"
},
"chat.shortcut_chat_list_mine": {
"effect": "read",
"risk": "low",
"confirmation": "not_required",
"idempotency": "idempotent",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "chat +chat-list-mine",
"runtime_gate": "none"
},
"chat.shortcut_chat_list_all": {
"effect": "read",
"risk": "low",
"confirmation": "not_required",
"idempotency": "idempotent",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "chat +chat-list-all",
"runtime_gate": "none"
},
"chat.shortcut_chat_list_join_requests": {
"effect": "read",
"risk": "low",
"confirmation": "not_required",
"idempotency": "idempotent",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "chat +chat-list-join-requests",
"runtime_gate": "none"
},
"chat.shortcut_chat_bots": {
"effect": "read",
"risk": "low",
"confirmation": "not_required",
"idempotency": "idempotent",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "chat +chat-bots",
"runtime_gate": "none"
},
"chat.shortcut_chat_set_admin": {
"effect": "write",
"risk": "medium",
"confirmation": "user_required",
"idempotency": "unknown",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "chat +chat-set-admin",
"runtime_gate": "typed_yes"
},
"chat.shortcut_chat_mute": {
"effect": "write",
"risk": "medium",
"confirmation": "user_required",
"idempotency": "unknown",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "chat +chat-mute",
"runtime_gate": "typed_yes"
},
"chat.shortcut_chat_role_list": {
"effect": "read",
"risk": "low",
"confirmation": "not_required",
"idempotency": "idempotent",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "chat +chat-role-list",
"runtime_gate": "none"
},
"chat.shortcut_chat_role_add": {
"effect": "write",
"risk": "medium",
"confirmation": "user_required",
"idempotency": "unknown",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "chat +chat-role-add",
"runtime_gate": "typed_yes"
},
"chat.shortcut_chat_role_update": {
"effect": "write",
"risk": "medium",
"confirmation": "user_required",
"idempotency": "unknown",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "chat +chat-role-update",
"runtime_gate": "typed_yes"
},
"chat.shortcut_chat_role_set_user": {
"effect": "write",
"risk": "medium",
"confirmation": "user_required",
"idempotency": "unknown",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "chat +chat-role-set-user",
"runtime_gate": "typed_yes"
},
"chat.shortcut_chat_role_query_user": {
"effect": "read",
"risk": "low",
"confirmation": "not_required",
"idempotency": "idempotent",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "chat +chat-role-query-user",
"runtime_gate": "none"
},
"chat.shortcut_messages_send_by_webhook": {
"effect": "write",
"risk": "medium",
"confirmation": "user_required",
"idempotency": "unknown",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "chat +messages-send-by-webhook",
"runtime_gate": "typed_yes"
},
"chat.shortcut_messages_list_direct": {
"effect": "read",
"risk": "low",
"confirmation": "not_required",
"idempotency": "idempotent",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "chat +messages-list-direct",
"runtime_gate": "none"
},
"chat.shortcut_messages_list_unread_conversations": {
"effect": "read",
"risk": "low",
"confirmation": "not_required",
"idempotency": "idempotent",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "chat +messages-list-unread-conversations",
"runtime_gate": "none"
},
"chat.shortcut_messages_mget": {
"effect": "read",
"risk": "low",
"confirmation": "not_required",
"idempotency": "idempotent",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "chat +messages-mget",
"runtime_gate": "none"
},
"chat.shortcut_messages_query_send_status": {
"effect": "read",
"risk": "low",
"confirmation": "not_required",
"idempotency": "idempotent",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "chat +messages-query-send-status",
"runtime_gate": "none"
},
"chat.shortcut_messages_read_status": {
"effect": "read",
"risk": "low",
"confirmation": "not_required",
"idempotency": "idempotent",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "chat +messages-read-status",
"runtime_gate": "none"
},
"chat.shortcut_messages_update_card": {
"effect": "write",
"risk": "medium",
"confirmation": "user_required",
"idempotency": "unknown",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "chat +messages-update-card",
"runtime_gate": "typed_yes"
},
"chat.shortcut_messages_list_pin": {
"effect": "read",
"risk": "low",
"confirmation": "not_required",
"idempotency": "idempotent",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "chat +messages-list-pin",
"runtime_gate": "none"
},
"chat.shortcut_at_me": {
"effect": "read",
"risk": "low",
"confirmation": "not_required",
"idempotency": "idempotent",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "chat +at-me",
"runtime_gate": "none"
},
"chat.shortcut_broadcast": {
"effect": "write",
"risk": "medium",
"confirmation": "user_required",
"idempotency": "unknown",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "chat +broadcast",
"runtime_gate": "typed_yes"
},
"chat.shortcut_dm": {
"effect": "write",
"risk": "medium",
"confirmation": "user_required",
"idempotency": "unknown",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "chat +dm",
"runtime_gate": "typed_yes"
},
"chat.shortcut_group_members": {
"effect": "read",
"risk": "low",
"confirmation": "not_required",
"idempotency": "idempotent",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "chat +group-members",
"runtime_gate": "none"
},
"chat.shortcut_my_groups": {
"effect": "read",
"risk": "low",
"confirmation": "not_required",
"idempotency": "idempotent",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "chat +my-groups",
"runtime_gate": "none"
},
"chat.shortcut_send_to_group": {
"effect": "write",
"risk": "medium",
"confirmation": "user_required",
"idempotency": "unknown",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "chat +send-to-group",
"runtime_gate": "typed_yes"
},
"chat.shortcut_unread_chats": {
"effect": "read",
"risk": "low",
"confirmation": "not_required",
"idempotency": "idempotent",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "chat +unread-chats",
"runtime_gate": "none"
}
}
}
@@ -388,6 +388,188 @@
"review_reason": "The reviewed handler requires at least one of nickname or avatar file ID, confirms, then invokes self_user_profile_update for the current user.",
"cli_path": "contact user update-self",
"runtime_gate": "confirm_dangerous"
},
"contact.shortcut_list_followings": {
"effect": "read",
"risk": "low",
"confirmation": "not_required",
"idempotency": "idempotent",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "contact +list-followings",
"runtime_gate": "none"
},
"contact.shortcut_search_user": {
"effect": "read",
"risk": "low",
"confirmation": "not_required",
"idempotency": "idempotent",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "contact +search-user",
"runtime_gate": "none"
},
"contact.shortcut_search_mobile": {
"effect": "read",
"risk": "low",
"confirmation": "not_required",
"idempotency": "idempotent",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "contact +search-mobile",
"runtime_gate": "none"
},
"contact.shortcut_list_roles": {
"effect": "read",
"risk": "low",
"confirmation": "not_required",
"idempotency": "idempotent",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "contact +list-roles",
"runtime_gate": "none"
},
"contact.shortcut_list_role_members": {
"effect": "read",
"risk": "low",
"confirmation": "not_required",
"idempotency": "idempotent",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "contact +list-role-members",
"runtime_gate": "none"
},
"contact.shortcut_list_sub_depts": {
"effect": "read",
"risk": "low",
"confirmation": "not_required",
"idempotency": "idempotent",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "contact +list-sub-depts",
"runtime_gate": "none"
},
"contact.shortcut_list_dept_members": {
"effect": "read",
"risk": "low",
"confirmation": "not_required",
"idempotency": "idempotent",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "contact +list-dept-members",
"runtime_gate": "none"
},
"contact.shortcut_by_mobile": {
"effect": "read",
"risk": "low",
"confirmation": "not_required",
"idempotency": "idempotent",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "contact +by-mobile",
"runtime_gate": "none"
},
"contact.shortcut_dept_members": {
"effect": "read",
"risk": "low",
"confirmation": "not_required",
"idempotency": "idempotent",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "contact +dept-members",
"runtime_gate": "none"
},
"contact.shortcut_lookup": {
"effect": "read",
"risk": "low",
"confirmation": "not_required",
"idempotency": "idempotent",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "contact +lookup",
"runtime_gate": "none"
},
"contact.shortcut_org": {
"effect": "read",
"risk": "low",
"confirmation": "not_required",
"idempotency": "idempotent",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "contact +org",
"runtime_gate": "none"
},
"contact.shortcut_resolve_dept": {
"effect": "read",
"risk": "low",
"confirmation": "not_required",
"idempotency": "idempotent",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "contact +resolve-dept",
"runtime_gate": "none"
},
"contact.shortcut_team": {
"effect": "read",
"risk": "low",
"confirmation": "not_required",
"idempotency": "idempotent",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "contact +team",
"runtime_gate": "none"
},
"contact.shortcut_me": {
"effect": "read",
"risk": "low",
"confirmation": "not_required",
"idempotency": "idempotent",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "contact +me",
"runtime_gate": "none"
}
}
}
@@ -0,0 +1,259 @@
{
"version": 1,
"source": {
"kind": "explicit",
"name": "dws-tool-metadata/devapp",
"repository": "DingTalk-Real-AI/dingtalk-workspace-cli",
"channel": "open-source",
"reviewed": true
},
"tools": {
"devapp.shortcut_list": {
"effect": "read",
"risk": "low",
"confirmation": "not_required",
"idempotency": "idempotent",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "devapp +list",
"runtime_gate": "none"
},
"devapp.shortcut_get": {
"effect": "read",
"risk": "low",
"confirmation": "not_required",
"idempotency": "idempotent",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "devapp +get",
"runtime_gate": "none"
},
"devapp.shortcut_create": {
"effect": "write",
"risk": "medium",
"confirmation": "user_required",
"idempotency": "unknown",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "devapp +create",
"runtime_gate": "typed_yes"
},
"devapp.shortcut_update": {
"effect": "write",
"risk": "medium",
"confirmation": "user_required",
"idempotency": "unknown",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "devapp +update",
"runtime_gate": "typed_yes"
},
"devapp.shortcut_delete": {
"effect": "destructive",
"risk": "high",
"confirmation": "user_required",
"idempotency": "unknown",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "devapp +delete",
"runtime_gate": "typed_yes"
},
"devapp.shortcut_enable": {
"effect": "write",
"risk": "medium",
"confirmation": "user_required",
"idempotency": "unknown",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "devapp +enable",
"runtime_gate": "typed_yes"
},
"devapp.shortcut_disable": {
"effect": "destructive",
"risk": "high",
"confirmation": "user_required",
"idempotency": "unknown",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "devapp +disable",
"runtime_gate": "typed_yes"
},
"devapp.shortcut_webapp_get": {
"effect": "read",
"risk": "low",
"confirmation": "not_required",
"idempotency": "idempotent",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "devapp +webapp-get",
"runtime_gate": "none"
},
"devapp.shortcut_webapp_config": {
"effect": "write",
"risk": "medium",
"confirmation": "user_required",
"idempotency": "unknown",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "devapp +webapp-config",
"runtime_gate": "typed_yes"
},
"devapp.shortcut_permission_list": {
"effect": "read",
"risk": "low",
"confirmation": "not_required",
"idempotency": "idempotent",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "devapp +permission-list",
"runtime_gate": "none"
},
"devapp.shortcut_member_list": {
"effect": "read",
"risk": "low",
"confirmation": "not_required",
"idempotency": "idempotent",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "devapp +member-list",
"runtime_gate": "none"
},
"devapp.shortcut_member_add": {
"effect": "write",
"risk": "medium",
"confirmation": "user_required",
"idempotency": "unknown",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "devapp +member-add",
"runtime_gate": "typed_yes"
},
"devapp.shortcut_member_remove": {
"effect": "destructive",
"risk": "high",
"confirmation": "user_required",
"idempotency": "unknown",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "devapp +member-remove",
"runtime_gate": "typed_yes"
},
"devapp.shortcut_robot_get": {
"effect": "read",
"risk": "low",
"confirmation": "not_required",
"idempotency": "idempotent",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "devapp +robot-get",
"runtime_gate": "none"
},
"devapp.shortcut_event_list": {
"effect": "read",
"risk": "low",
"confirmation": "not_required",
"idempotency": "idempotent",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "devapp +event-list",
"runtime_gate": "none"
},
"devapp.shortcut_version_list": {
"effect": "read",
"risk": "low",
"confirmation": "not_required",
"idempotency": "idempotent",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "devapp +version-list",
"runtime_gate": "none"
},
"devapp.shortcut_version_get": {
"effect": "read",
"risk": "low",
"confirmation": "not_required",
"idempotency": "idempotent",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "devapp +version-get",
"runtime_gate": "none"
},
"devapp.shortcut_version_check_approval": {
"effect": "read",
"risk": "low",
"confirmation": "not_required",
"idempotency": "idempotent",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "devapp +version-check-approval",
"runtime_gate": "none"
},
"devapp.shortcut_version_status": {
"effect": "read",
"risk": "low",
"confirmation": "not_required",
"idempotency": "idempotent",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "devapp +version-status",
"runtime_gate": "none"
}
}
}
@@ -21,6 +21,58 @@
"interface_mode": "mcp",
"availability": "available",
"reviewed": true
},
"ding.shortcut_list": {
"effect": "read",
"risk": "low",
"confirmation": "not_required",
"idempotency": "idempotent",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "ding +list",
"runtime_gate": "none"
},
"ding.shortcut_receiver_status": {
"effect": "read",
"risk": "low",
"confirmation": "not_required",
"idempotency": "idempotent",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "ding +receiver-status",
"runtime_gate": "none"
},
"ding.shortcut_send_personal": {
"effect": "write",
"risk": "medium",
"confirmation": "user_required",
"idempotency": "unknown",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "ding +send-personal",
"runtime_gate": "typed_yes"
},
"ding.shortcut_recall_personal": {
"effect": "destructive",
"risk": "high",
"confirmation": "user_required",
"idempotency": "unknown",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "ding +recall-personal",
"runtime_gate": "typed_yes"
}
}
}
+222 -2
View File
@@ -301,8 +301,7 @@
},
"review_reason": "Preserve the reviewed user-mention conversion and normalize repeated or comma-separated group conversation IDs into mentionedOpenConversationIds.",
"cli_path": "doc comment update",
"runtime_gate": "none",
"confirmation": "not_required"
"runtime_gate": "none"
},
"doc.update_document": {
"effect": "write",
@@ -367,6 +366,227 @@
"interface_reason": "Reviewed unpinned remote adapter: this executable CLI wrapper calls a remote helper that is absent from the pinned MCP metadata snapshot; no single pinned semantically equivalent interface_ref can represent the command.",
"reviewed": true,
"review_reason": "migrated to reviewed metadata block"
},
"doc.shortcut_search": {
"effect": "read",
"risk": "low",
"confirmation": "not_required",
"idempotency": "idempotent",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "doc +search",
"runtime_gate": "none"
},
"doc.shortcut_list": {
"effect": "read",
"risk": "low",
"confirmation": "not_required",
"idempotency": "idempotent",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "doc +list",
"runtime_gate": "none"
},
"doc.shortcut_copy": {
"effect": "write",
"risk": "medium",
"confirmation": "user_required",
"idempotency": "unknown",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "doc +copy",
"runtime_gate": "typed_yes"
},
"doc.shortcut_move": {
"effect": "write",
"risk": "medium",
"confirmation": "user_required",
"idempotency": "unknown",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "doc +move",
"runtime_gate": "typed_yes"
},
"doc.shortcut_comment_list": {
"effect": "read",
"risk": "low",
"confirmation": "not_required",
"idempotency": "idempotent",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "doc +comment-list",
"runtime_gate": "none"
},
"doc.shortcut_comment_create": {
"effect": "write",
"risk": "medium",
"confirmation": "user_required",
"idempotency": "unknown",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "doc +comment-create",
"runtime_gate": "typed_yes"
},
"doc.shortcut_comment_reply": {
"effect": "write",
"risk": "medium",
"confirmation": "user_required",
"idempotency": "unknown",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "doc +comment-reply",
"runtime_gate": "typed_yes"
},
"doc.shortcut_export_submit": {
"effect": "read",
"risk": "low",
"confirmation": "not_required",
"idempotency": "idempotent",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "doc +export-submit",
"runtime_gate": "none"
},
"doc.shortcut_export_get": {
"effect": "read",
"risk": "low",
"confirmation": "not_required",
"idempotency": "idempotent",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "doc +export-get",
"runtime_gate": "none"
},
"doc.shortcut_version_save": {
"effect": "write",
"risk": "medium",
"confirmation": "user_required",
"idempotency": "unknown",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "doc +version-save",
"runtime_gate": "typed_yes"
},
"doc.shortcut_version_list": {
"effect": "read",
"risk": "low",
"confirmation": "not_required",
"idempotency": "idempotent",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "doc +version-list",
"runtime_gate": "none"
},
"doc.shortcut_version_revert": {
"effect": "destructive",
"risk": "high",
"confirmation": "user_required",
"idempotency": "unknown",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "doc +version-revert",
"runtime_gate": "typed_yes"
},
"doc.shortcut_template_list": {
"effect": "read",
"risk": "low",
"confirmation": "not_required",
"idempotency": "idempotent",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "doc +template-list",
"runtime_gate": "none"
},
"doc.shortcut_template_search": {
"effect": "read",
"risk": "low",
"confirmation": "not_required",
"idempotency": "idempotent",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "doc +template-search",
"runtime_gate": "none"
},
"doc.shortcut_doc_append": {
"effect": "write",
"risk": "medium",
"confirmation": "user_required",
"idempotency": "unknown",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "doc +doc-append",
"runtime_gate": "typed_yes"
},
"doc.shortcut_find_doc": {
"effect": "read",
"risk": "low",
"confirmation": "not_required",
"idempotency": "idempotent",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "doc +find-doc",
"runtime_gate": "none"
},
"doc.shortcut_share_doc": {
"effect": "write",
"risk": "medium",
"confirmation": "user_required",
"idempotency": "unknown",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "doc +share-doc",
"runtime_gate": "typed_yes"
}
}
}
@@ -228,6 +228,97 @@
"review_reason": "The reviewed helper preserves the stable command-level Schema contract for ordinary uploads; --node switches to overwrite mode and the runtime still requires explicit confirmation unless --yes is supplied.",
"cli_path": "drive upload",
"runtime_gate": "none"
},
"drive.shortcut_info": {
"effect": "read",
"risk": "low",
"confirmation": "not_required",
"idempotency": "idempotent",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "drive +info",
"runtime_gate": "none"
},
"drive.shortcut_search": {
"effect": "read",
"risk": "low",
"confirmation": "not_required",
"idempotency": "idempotent",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "drive +search",
"runtime_gate": "none"
},
"drive.shortcut_search_docs": {
"effect": "read",
"risk": "low",
"confirmation": "not_required",
"idempotency": "idempotent",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "drive +search-docs",
"runtime_gate": "none"
},
"drive.shortcut_copy": {
"effect": "write",
"risk": "medium",
"confirmation": "user_required",
"idempotency": "unknown",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "drive +copy",
"runtime_gate": "typed_yes"
},
"drive.shortcut_move": {
"effect": "write",
"risk": "medium",
"confirmation": "user_required",
"idempotency": "unknown",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "drive +move",
"runtime_gate": "typed_yes"
},
"drive.shortcut_recent": {
"effect": "read",
"risk": "low",
"confirmation": "not_required",
"idempotency": "idempotent",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "drive +recent",
"runtime_gate": "none"
},
"drive.shortcut_find_file": {
"effect": "read",
"risk": "low",
"confirmation": "not_required",
"idempotency": "idempotent",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "drive +find-file",
"runtime_gate": "none"
}
}
}
@@ -0,0 +1,289 @@
{
"version": 1,
"source": {
"kind": "explicit",
"name": "dws-tool-metadata/hrbrain",
"repository": "DingTalk-Real-AI/dingtalk-workspace-cli",
"channel": "open-source",
"reviewed": true
},
"tools": {
"hrbrain.list_talent_pools": {
"effect": "read",
"risk": "low",
"confirmation": "not_required",
"idempotency": "idempotent",
"runtime_gate": "none",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed unpinned remote adapter: this executable CLI wrapper calls the hrbrain MCP tool list_talent_pools, which is absent from the pinned MCP metadata snapshot; no single pinned interface_ref can represent the command.",
"reviewed": true,
"cli_path": "hrbrain talent-pool list",
"review_reason": "Reviewed unpinned remote adapter: flags map 1:1 to the list_talent_pools MCP call arguments observed in internal/helpers/hrbrain.go.",
"parameters": {
"keyword": {
"property": "keyword",
"required": false
},
"pool-type": {
"property": "poolType",
"required": false
},
"creator": {
"property": "creator",
"required": false
},
"labels": {
"property": "labels",
"required": false
},
"page": {
"property": "currentPage",
"required": false
},
"page-size": {
"property": "pageSize",
"required": false
}
}
},
"hrbrain.get_talent_pool_detail": {
"effect": "read",
"risk": "low",
"confirmation": "not_required",
"idempotency": "idempotent",
"runtime_gate": "none",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed unpinned remote adapter: this executable CLI wrapper calls the hrbrain MCP tool get_talent_pool_detail, which is absent from the pinned MCP metadata snapshot; no single pinned interface_ref can represent the command.",
"reviewed": true,
"cli_path": "hrbrain talent-pool detail",
"review_reason": "Reviewed unpinned remote adapter: --pool-code maps 1:1 to the poolCode MCP call argument observed in internal/helpers/hrbrain.go.",
"parameters": {
"pool-code": {
"property": "poolCode",
"required": true
}
}
},
"hrbrain.list_pool_employees": {
"effect": "read",
"risk": "low",
"confirmation": "not_required",
"idempotency": "idempotent",
"runtime_gate": "none",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed unpinned remote adapter: this executable CLI wrapper calls the hrbrain MCP tool list_pool_employees, which is absent from the pinned MCP metadata snapshot; no single pinned interface_ref can represent the command.",
"reviewed": true,
"cli_path": "hrbrain talent-pool employees",
"review_reason": "Reviewed unpinned remote adapter: flags map 1:1 to the list_pool_employees MCP call arguments observed in internal/helpers/hrbrain.go.",
"parameters": {
"pool-code": {
"property": "poolCode",
"required": true
},
"page": {
"property": "currentPage",
"required": false
},
"page-size": {
"property": "pageSize",
"required": false
}
}
},
"hrbrain.get_profile_metadata": {
"effect": "read",
"risk": "low",
"confirmation": "not_required",
"idempotency": "idempotent",
"runtime_gate": "none",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed unpinned remote adapter: this executable CLI wrapper calls the hrbrain MCP tool get_profile_metadata, which is absent from the pinned MCP metadata snapshot; no single pinned interface_ref can represent the command.",
"reviewed": true,
"cli_path": "hrbrain profile metadata",
"review_reason": "Reviewed unpinned remote adapter: --work-no maps 1:1 to the workNo MCP call argument observed in internal/helpers/hrbrain.go.",
"parameters": {
"work-no": {
"property": "workNo",
"required": true
}
}
},
"hrbrain.query_profile_data": {
"effect": "read",
"risk": "low",
"confirmation": "not_required",
"idempotency": "idempotent",
"runtime_gate": "none",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed unpinned remote adapter: this executable CLI wrapper calls the hrbrain MCP tool query_profile_data, which is absent from the pinned MCP metadata snapshot; no single pinned interface_ref can represent the command.",
"reviewed": true,
"cli_path": "hrbrain profile query",
"review_reason": "Reviewed unpinned remote adapter: flags map 1:1 to the query_profile_data MCP call arguments observed in internal/helpers/hrbrain.go.",
"parameters": {
"work-no": {
"property": "workNo",
"required": true
},
"data-queries": {
"property": "dataQueries",
"required": true
}
}
},
"hrbrain.get_profile_label": {
"effect": "read",
"risk": "low",
"confirmation": "not_required",
"idempotency": "idempotent",
"runtime_gate": "none",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed unpinned remote adapter: this executable CLI wrapper calls the hrbrain MCP tool get_profile_label, which is absent from the pinned MCP metadata snapshot; no single pinned interface_ref can represent the command.",
"reviewed": true,
"cli_path": "hrbrain profile labels",
"review_reason": "Reviewed unpinned remote adapter: flags map 1:1 to the get_profile_label MCP call arguments observed in internal/helpers/hrbrain.go.",
"parameters": {
"staff-ids": {
"property": "staffIds",
"required": true
},
"all-label": {
"property": "allLabel",
"required": false
}
}
},
"hrbrain.get_employee_career": {
"effect": "read",
"risk": "low",
"confirmation": "not_required",
"idempotency": "idempotent",
"runtime_gate": "none",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed unpinned remote adapter: this executable CLI wrapper calls the hrbrain MCP tool get_employee_career, which is absent from the pinned MCP metadata snapshot; no single pinned interface_ref can represent the command.",
"reviewed": true,
"cli_path": "hrbrain profile career",
"review_reason": "Reviewed unpinned remote adapter: --work-no maps 1:1 to the workNo MCP call argument observed in internal/helpers/hrbrain.go.",
"parameters": {
"work-no": {
"property": "workNo",
"required": true
}
}
},
"hrbrain.get_employee_performance": {
"effect": "read",
"risk": "low",
"confirmation": "not_required",
"idempotency": "idempotent",
"runtime_gate": "none",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed unpinned remote adapter: this executable CLI wrapper calls the hrbrain MCP tool get_employee_performance, which is absent from the pinned MCP metadata snapshot; no single pinned interface_ref can represent the command.",
"reviewed": true,
"cli_path": "hrbrain profile performance",
"review_reason": "Reviewed unpinned remote adapter: --work-no maps 1:1 to the workNo MCP call argument observed in internal/helpers/hrbrain.go.",
"parameters": {
"work-no": {
"property": "workNo",
"required": true
}
}
},
"hrbrain.search_employees": {
"effect": "read",
"risk": "low",
"confirmation": "not_required",
"idempotency": "idempotent",
"runtime_gate": "none",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed unpinned remote adapter: this executable CLI wrapper calls the hrbrain MCP tool search_employees, which is absent from the pinned MCP metadata snapshot; no single pinned interface_ref can represent the command.",
"reviewed": true,
"cli_path": "hrbrain search employees",
"review_reason": "Reviewed unpinned remote adapter: flags map 1:1 to the search_employees MCP call arguments observed in internal/helpers/hrbrain.go.",
"parameters": {
"keyword": {
"property": "keyword",
"required": false
},
"dept-name": {
"property": "deptName",
"required": false
},
"position-name": {
"property": "positionName",
"required": false
},
"job-level": {
"property": "jobLevel",
"required": false
},
"pool-code": {
"property": "poolCode",
"required": false
},
"page": {
"property": "currentPage",
"required": false
},
"page-size": {
"property": "pageSize",
"required": false
}
}
},
"hrbrain.search_employees_structured": {
"effect": "read",
"risk": "low",
"confirmation": "not_required",
"idempotency": "idempotent",
"runtime_gate": "none",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed unpinned remote adapter: this executable CLI wrapper calls the hrbrain MCP tool search_employees_structured, which is absent from the pinned MCP metadata snapshot; no single pinned interface_ref can represent the command.",
"reviewed": true,
"cli_path": "hrbrain search employees-structured",
"review_reason": "Reviewed unpinned remote adapter: flags map 1:1 to the search_employees_structured MCP call arguments observed in internal/helpers/hrbrain.go.",
"parameters": {
"origin-json": {
"property": "originJson",
"required": true
},
"fields": {
"property": "fields",
"required": true
},
"order-by": {
"property": "orderByClauses",
"required": false
},
"page": {
"property": "currentPage",
"required": false
},
"page-size": {
"property": "pageSize",
"required": false
}
}
},
"hrbrain.get_search_fields": {
"effect": "read",
"risk": "low",
"confirmation": "not_required",
"idempotency": "idempotent",
"runtime_gate": "none",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed unpinned remote adapter: this executable CLI wrapper calls the hrbrain MCP tool get_search_fields, which is absent from the pinned MCP metadata snapshot; no single pinned interface_ref can represent the command.",
"reviewed": true
}
}
}
@@ -218,6 +218,136 @@
"cli_path": "mail template update",
"runtime_gate": "none",
"confirmation": "not_required"
},
"mail.shortcut_thread_list": {
"effect": "read",
"risk": "low",
"confirmation": "not_required",
"idempotency": "idempotent",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "mail +thread-list",
"runtime_gate": "none"
},
"mail.shortcut_folder_list": {
"effect": "read",
"risk": "low",
"confirmation": "not_required",
"idempotency": "idempotent",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "mail +folder-list",
"runtime_gate": "none"
},
"mail.shortcut_tag_list": {
"effect": "read",
"risk": "low",
"confirmation": "not_required",
"idempotency": "idempotent",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "mail +tag-list",
"runtime_gate": "none"
},
"mail.shortcut_user_search": {
"effect": "read",
"risk": "low",
"confirmation": "not_required",
"idempotency": "idempotent",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "mail +user-search",
"runtime_gate": "none"
},
"mail.shortcut_template_list": {
"effect": "read",
"risk": "low",
"confirmation": "not_required",
"idempotency": "idempotent",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "mail +template-list",
"runtime_gate": "none"
},
"mail.shortcut_contact_list": {
"effect": "read",
"risk": "low",
"confirmation": "not_required",
"idempotency": "idempotent",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "mail +contact-list",
"runtime_gate": "none"
},
"mail.shortcut_find_mail_user": {
"effect": "read",
"risk": "low",
"confirmation": "not_required",
"idempotency": "idempotent",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "mail +find-mail-user",
"runtime_gate": "none"
},
"mail.shortcut_recent_mail": {
"effect": "read",
"risk": "low",
"confirmation": "not_required",
"idempotency": "idempotent",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "mail +recent-mail",
"runtime_gate": "none"
},
"mail.shortcut_search_mail": {
"effect": "read",
"risk": "low",
"confirmation": "not_required",
"idempotency": "idempotent",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "mail +search-mail",
"runtime_gate": "none"
},
"mail.shortcut_unread_mail": {
"effect": "read",
"risk": "low",
"confirmation": "not_required",
"idempotency": "idempotent",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "mail +unread-mail",
"runtime_gate": "none"
}
}
}
@@ -194,6 +194,89 @@
"interface_mode": "mcp",
"availability": "available",
"reviewed": true
},
"minutes.shortcut_list_mine": {
"effect": "read",
"risk": "low",
"confirmation": "not_required",
"idempotency": "idempotent",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "minutes +list-mine",
"runtime_gate": "none"
},
"minutes.shortcut_list_shared": {
"effect": "read",
"risk": "low",
"confirmation": "not_required",
"idempotency": "idempotent",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "minutes +list-shared",
"runtime_gate": "none"
},
"minutes.shortcut_list_all": {
"effect": "read",
"risk": "low",
"confirmation": "not_required",
"idempotency": "idempotent",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "minutes +list-all",
"runtime_gate": "none"
},
"minutes.shortcut_record_start": {
"effect": "write",
"risk": "medium",
"confirmation": "user_required",
"idempotency": "unknown",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "minutes +record-start",
"runtime_gate": "typed_yes"
},
"minutes.shortcut_detail": {
"effect": "read",
"risk": "low",
"confirmation": "not_required",
"idempotency": "idempotent",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "minutes +detail",
"runtime_gate": "none"
},
"minutes.shortcut_replace_batch": {
"effect": "write",
"risk": "medium",
"confirmation": "user_required",
"idempotency": "unknown",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"parameters": {
"pair": {
"description": "替换规则,格式 \"原文=>替换\",可重复传多组(必填);每组原文不能为空且不能重复"
}
},
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate, composite interface, and the custom --pair format/uniqueness validation without inventing a direct MCP identity.",
"cli_path": "minutes +replace-batch",
"runtime_gate": "typed_yes"
}
}
}
@@ -90,6 +90,97 @@
"availability": "available",
"reviewed": true,
"runtime_gate": "confirm_delete"
},
"oa.shortcut_list_pending": {
"effect": "read",
"risk": "low",
"confirmation": "not_required",
"idempotency": "idempotent",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "oa +list-pending",
"runtime_gate": "none"
},
"oa.shortcut_list_forms": {
"effect": "read",
"risk": "low",
"confirmation": "not_required",
"idempotency": "idempotent",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "oa +list-forms",
"runtime_gate": "none"
},
"oa.shortcut_search_forms": {
"effect": "read",
"risk": "low",
"confirmation": "not_required",
"idempotency": "idempotent",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "oa +search-forms",
"runtime_gate": "none"
},
"oa.shortcut_list_executed": {
"effect": "read",
"risk": "low",
"confirmation": "not_required",
"idempotency": "idempotent",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "oa +list-executed",
"runtime_gate": "none"
},
"oa.shortcut_list_submitted": {
"effect": "read",
"risk": "low",
"confirmation": "not_required",
"idempotency": "idempotent",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "oa +list-submitted",
"runtime_gate": "none"
},
"oa.shortcut_list_cc": {
"effect": "read",
"risk": "low",
"confirmation": "not_required",
"idempotency": "idempotent",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "oa +list-cc",
"runtime_gate": "none"
},
"oa.shortcut_my_initiated": {
"effect": "read",
"risk": "low",
"confirmation": "not_required",
"idempotency": "idempotent",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "oa +my-initiated",
"runtime_gate": "none"
}
}
}
@@ -51,6 +51,32 @@
"interface_mode": "mcp",
"availability": "available",
"reviewed": true
},
"report.shortcut_inbox_list": {
"effect": "read",
"risk": "low",
"confirmation": "not_required",
"idempotency": "idempotent",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "report +inbox-list",
"runtime_gate": "none"
},
"report.shortcut_outbox_list": {
"effect": "read",
"risk": "low",
"confirmation": "not_required",
"idempotency": "idempotent",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "report +outbox-list",
"runtime_gate": "none"
}
}
}
@@ -708,6 +708,32 @@
"interface_mode": "mcp",
"availability": "available",
"reviewed": true
},
"sheet.shortcut_list_sheets": {
"effect": "read",
"risk": "low",
"confirmation": "not_required",
"idempotency": "idempotent",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "sheet +list-sheets",
"runtime_gate": "none"
},
"sheet.shortcut_read": {
"effect": "read",
"risk": "low",
"confirmation": "not_required",
"idempotency": "idempotent",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "sheet +read",
"runtime_gate": "none"
}
}
}
@@ -233,6 +233,149 @@
"review_reason": "The reviewed handler requires a non-null JSON array of tag update records and invokes update_todo_tag without a runtime confirmation gate.",
"cli_path": "todo tag update",
"runtime_gate": "none"
},
"todo.shortcut_assign": {
"effect": "write",
"risk": "medium",
"confirmation": "user_required",
"idempotency": "unknown",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "todo +assign",
"runtime_gate": "typed_yes"
},
"todo.shortcut_assign_multi": {
"effect": "write",
"risk": "medium",
"confirmation": "user_required",
"idempotency": "unknown",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "todo +assign-multi",
"runtime_gate": "typed_yes"
},
"todo.shortcut_created_todos": {
"effect": "read",
"risk": "low",
"confirmation": "not_required",
"idempotency": "idempotent",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "todo +created-todos",
"runtime_gate": "none"
},
"todo.shortcut_overdue": {
"effect": "read",
"risk": "low",
"confirmation": "not_required",
"idempotency": "idempotent",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "todo +overdue",
"runtime_gate": "none"
},
"todo.shortcut_remind": {
"effect": "write",
"risk": "medium",
"confirmation": "user_required",
"idempotency": "unknown",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "todo +remind",
"runtime_gate": "typed_yes"
},
"todo.shortcut_todo_done": {
"effect": "write",
"risk": "medium",
"confirmation": "user_required",
"idempotency": "unknown",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "todo +todo-done",
"runtime_gate": "typed_yes"
},
"todo.shortcut_get_my_tasks": {
"effect": "read",
"risk": "low",
"confirmation": "not_required",
"idempotency": "idempotent",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "todo +get-my-tasks",
"runtime_gate": "none"
},
"todo.shortcut_list_sub": {
"effect": "read",
"risk": "low",
"confirmation": "not_required",
"idempotency": "idempotent",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "todo +list-sub",
"runtime_gate": "none"
},
"todo.shortcut_get": {
"effect": "read",
"risk": "low",
"confirmation": "not_required",
"idempotency": "idempotent",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "todo +get",
"runtime_gate": "none"
},
"todo.shortcut_list_attachment": {
"effect": "read",
"risk": "low",
"confirmation": "not_required",
"idempotency": "idempotent",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "todo +list-attachment",
"runtime_gate": "none"
},
"todo.shortcut_list_comment": {
"effect": "read",
"risk": "low",
"confirmation": "not_required",
"idempotency": "idempotent",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "todo +list-comment",
"runtime_gate": "none"
}
}
}
@@ -119,6 +119,19 @@
"interface_mode": "mcp",
"availability": "available",
"reviewed": true
},
"wiki.shortcut_space_search": {
"effect": "read",
"risk": "low",
"confirmation": "not_required",
"idempotency": "idempotent",
"interface_mode": "composite",
"availability": "available",
"interface_reason": "Reviewed built-in shortcut adapter: the executable CLI owns validation, optional multi-step orchestration, output projection, and confirmation; the complete command contract is not represented by one pinned MCP interface_ref.",
"reviewed": true,
"review_reason": "Reviewed against the built-in Shortcut registry and mounted Cobra command: publishes the executable risk gate and composite interface without inventing a direct MCP identity.",
"cli_path": "wiki +space-search",
"runtime_gate": "none"
}
}
}
@@ -7,7 +7,7 @@
"channel": "open-source"
},
"coverage": {
"source_tools": 592,
"source_tools": 813,
"matched_tools": 71
},
"tools": {
@@ -2328,6 +2328,561 @@
"cobra-help:dws aitable workflow update --help",
"skills/mono/references/products/aitable/aitable-workflow.md"
]
},
"aitable.shortcut_base_list": {
"agent_summary": "获取当前用户可访问的 AI 表格 Base 列表(最近访问,支持游标分页)",
"use_when": [
"当你不知道具体 baseId、想先浏览自己最近用过或可访问的 AI 表格清单以便定位目标时使用;支持游标分页,返回 Base 列表及其 baseId。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws aitable +base-list",
"dws aitable +base-list --limit 5 --cursor NEXT"
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#aitable.shortcut_base_list",
"cobra-help:dws aitable +base-list",
"ShortcutRegistry:aitable +base-list"
]
},
"aitable.shortcut_base_search": {
"agent_summary": "按名称关键词搜索 AI 表格 Base",
"use_when": [
"当你知道某个 AI 表格的名字或部分关键词、想直接定位到它并拿到 baseId 时使用;输入名称关键词,返回匹配的 Base 列表。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws aitable +base-search --query \"项目管理\""
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#aitable.shortcut_base_search",
"cobra-help:dws aitable +base-search",
"ShortcutRegistry:aitable +base-search"
]
},
"aitable.shortcut_base_get": {
"agent_summary": "获取指定 Base 的目录信息(tables / dashboards summary)",
"use_when": [
"当你已有 baseId、需要了解这个表格里有哪些数据表和仪表盘(拿到 tableId/dashboardId)以便进一步操作时使用;返回 Base 的目录结构概要。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws aitable +base-get --base-id BASE_ID"
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#aitable.shortcut_base_get",
"cobra-help:dws aitable +base-get",
"ShortcutRegistry:aitable +base-get"
]
},
"aitable.shortcut_table_get": {
"agent_summary": "批量获取指定数据表的表级信息、字段目录与视图目录",
"use_when": [
"当你已进入某个 Base、需要了解其中某些数据表有哪些字段(拿 fieldId)、有哪些视图(拿 viewId)以便读写数据时使用;批量返回表信息、字段目录和视图目录。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws aitable +table-get --base-id BASE_ID",
"dws aitable +table-get --base-id B --table-ids tbl1,tbl2"
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#aitable.shortcut_table_get",
"cobra-help:dws aitable +table-get",
"ShortcutRegistry:aitable +table-get"
]
},
"aitable.shortcut_field_get": {
"agent_summary": "批量获取字段详情(含类型相关完整配置)",
"use_when": [
"当你需要查看字段的完整类型配置(如单选选项、关联表设置、AI 配置)以便正确写入数据或改配置时使用;批量返回字段详情。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws aitable +field-get --base-id B --table-id T"
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#aitable.shortcut_field_get",
"cobra-help:dws aitable +field-get",
"ShortcutRegistry:aitable +field-get"
]
},
"aitable.shortcut_record_query": {
"agent_summary": "查询表格记录(按 ID 取 / 条件筛选 / 关键词 / 分页)",
"use_when": [
"当你要读取表格里的行数据——按 recordId 精确取、按结构化条件筛选、按关键词全文搜索或分页遍历时使用;返回匹配记录及其单元格值。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws aitable +record-query --base-id B --table-id T --query \"关键词\" --limit 50"
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#aitable.shortcut_record_query",
"cobra-help:dws aitable +record-query",
"ShortcutRegistry:aitable +record-query"
]
},
"aitable.shortcut_record_query_empty": {
"agent_summary": "扫描并过滤出完全没填用户字段的空行",
"use_when": [
"当你想清理表格、需要先找出那些所有用户字段都为空的空行时使用;扫描并返回空行列表,支持分页预算。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws aitable +record-query-empty --base-id B --table-id T"
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#aitable.shortcut_record_query_empty",
"cobra-help:dws aitable +record-query-empty",
"ShortcutRegistry:aitable +record-query-empty"
]
},
"aitable.shortcut_record_history_list": {
"agent_summary": "按 recordId 查询单条记录的变更历史",
"use_when": [
"当你要追溯某条记录曾被谁在何时改过哪些字段时使用;按 recordId 分页返回该行的变更历史。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws aitable +record-history-list --base-id B --table-id T --record-id R"
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#aitable.shortcut_record_history_list",
"cobra-help:dws aitable +record-history-list",
"ShortcutRegistry:aitable +record-history-list"
]
},
"aitable.shortcut_record_share_url": {
"agent_summary": "按 recordId 批量获取记录分享链接,单次最多 20 条",
"use_when": [
"当你要把某几条记录以链接形式分享给他人(可带视图上下文)时使用;按 recordId 批量返回分享链接,单次最多 20 条。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws aitable +record-share-url --base-id B --table-id T --record-ids rec1,rec2"
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#aitable.shortcut_record_share_url",
"cobra-help:dws aitable +record-share-url",
"ShortcutRegistry:aitable +record-share-url"
]
},
"aitable.shortcut_template_search": {
"agent_summary": "按名称关键词搜索 AI 表格模板",
"use_when": [
"当你要新建表格并想套用现成模板、需要先按关键词找模板(不传关键词则返回热门)时使用;返回模板列表及其模板 ID。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws aitable +template-search --query \"项目管理\""
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#aitable.shortcut_template_search",
"cobra-help:dws aitable +template-search",
"ShortcutRegistry:aitable +template-search"
]
},
"aitable.shortcut_view_get": {
"agent_summary": "获取视图完整信息(列顺序、筛选、排序、分组等)",
"use_when": [
"当你要了解某个视图当前的列顺序、筛选、排序、分组等完整配置以便复用或修改时使用;批量返回视图详情。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws aitable +view-get --base-id B --table-id T"
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#aitable.shortcut_view_get",
"cobra-help:dws aitable +view-get",
"ShortcutRegistry:aitable +view-get"
]
},
"aitable.shortcut_view_get_lock": {
"agent_summary": "获取视图锁定状态",
"use_when": [
"当你想确认某视图是否已被锁定(以防他人误改其配置)时使用;返回该视图的锁定状态。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws aitable +view-get-lock --base-id B --table-id T --view-id V"
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#aitable.shortcut_view_get_lock",
"cobra-help:dws aitable +view-get-lock",
"ShortcutRegistry:aitable +view-get-lock"
]
},
"aitable.shortcut_view_get_frozen_cols": {
"agent_summary": "获取视图当前冻结的左侧列数",
"use_when": [
"当你想知道某视图当前冻结了左侧几列时使用;返回冻结列数。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws aitable +view-get-frozen-cols --base-id B --table-id T --view-id V"
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#aitable.shortcut_view_get_frozen_cols",
"cobra-help:dws aitable +view-get-frozen-cols",
"ShortcutRegistry:aitable +view-get-frozen-cols"
]
},
"aitable.shortcut_view_get_row_height": {
"agent_summary": "获取视图单元格行高(像素)",
"use_when": [
"当你想知道某视图当前的行高档位时使用;返回单元格行高的像素值。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws aitable +view-get-row-height --base-id B --table-id T --view-id V"
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#aitable.shortcut_view_get_row_height",
"cobra-help:dws aitable +view-get-row-height",
"ShortcutRegistry:aitable +view-get-row-height"
]
},
"aitable.shortcut_form_list": {
"agent_summary": "列出指定数据表下的所有表单视图",
"use_when": [
"当你要查看某数据表下已有哪些收集表单时使用;返回该表的全部表单视图列表。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws aitable +form-list --base-id B --table-id T"
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#aitable.shortcut_form_list",
"cobra-help:dws aitable +form-list",
"ShortcutRegistry:aitable +form-list"
]
},
"aitable.shortcut_form_field_list": {
"agent_summary": "列出表单视图当前可见的字段及其配置",
"use_when": [
"当你要查看某表单当前放出了哪些字段供填写及其是否必填等配置时使用;返回表单可见字段列表。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws aitable +form-field-list --base-id B --table-id T --view-id V"
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#aitable.shortcut_form_field_list",
"cobra-help:dws aitable +form-field-list",
"ShortcutRegistry:aitable +form-field-list"
]
},
"aitable.shortcut_form_share_get": {
"agent_summary": "读取视图当前的分享表单配置",
"use_when": [
"当你要查看某视图的表单分享是否已开启及其分享配置时使用;返回当前的分享表单配置。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws aitable +form-share-get --base-id B --table-id T --view-id V"
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#aitable.shortcut_form_share_get",
"cobra-help:dws aitable +form-share-get",
"ShortcutRegistry:aitable +form-share-get"
]
},
"aitable.shortcut_dashboard_config_example": {
"agent_summary": "获取 dashboard config 的结构示例",
"use_when": [
"当你准备创建或更新仪表盘、需要先了解 dashboard config 的字段结构长什么样时使用;返回一份配置结构示例供参考。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws aitable +dashboard-config-example"
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#aitable.shortcut_dashboard_config_example",
"cobra-help:dws aitable +dashboard-config-example",
"ShortcutRegistry:aitable +dashboard-config-example"
]
},
"aitable.shortcut_dashboard_get": {
"agent_summary": "获取指定 dashboard 的详细信息(含 charts summary)",
"use_when": [
"当你要查看某仪表盘的配置详情及它包含哪些图表(拿 chartId)时使用;返回 dashboard 信息与 charts 概要。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws aitable +dashboard-get --base-id B --dashboard-id D"
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#aitable.shortcut_dashboard_get",
"cobra-help:dws aitable +dashboard-get",
"ShortcutRegistry:aitable +dashboard-get"
]
},
"aitable.shortcut_chart_widgets_example": {
"agent_summary": "获取所有图表类型的 widget config 示例",
"use_when": [
"当你准备创建或修改图表、需要先参考各类图表 widget config 的示例结构时使用;返回所有图表类型的配置示例。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws aitable +chart-widgets-example"
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#aitable.shortcut_chart_widgets_example",
"cobra-help:dws aitable +chart-widgets-example",
"ShortcutRegistry:aitable +chart-widgets-example"
]
},
"aitable.shortcut_chart_get": {
"agent_summary": "获取指定 chart 的详细信息",
"use_when": [
"当你要查看某个图表的配置详情(统计维度、样式等)时使用;返回指定 chart 的详细信息。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws aitable +chart-get --base-id B --dashboard-id D --chart-id C"
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#aitable.shortcut_chart_get",
"cobra-help:dws aitable +chart-get",
"ShortcutRegistry:aitable +chart-get"
]
},
"aitable.shortcut_role_list": {
"agent_summary": "列出指定 Base 下的全部角色",
"use_when": [
"当你要查看某 Base 下配置了哪些角色(拿 roleId)时使用;返回全部角色列表。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws aitable +role-list --base-id B"
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#aitable.shortcut_role_list",
"cobra-help:dws aitable +role-list",
"ShortcutRegistry:aitable +role-list"
]
},
"aitable.shortcut_section_list_empty": {
"agent_summary": "列出指定 Base 下所有没有子节点的空文件夹",
"use_when": [
"当你想清理 Base、需要先找出所有没有任何子节点的空文件夹时使用;返回空文件夹列表。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws aitable +section-list-empty --base-id B"
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#aitable.shortcut_section_list_empty",
"cobra-help:dws aitable +section-list-empty",
"ShortcutRegistry:aitable +section-list-empty"
]
},
"aitable.shortcut_section_list_nodes": {
"agent_summary": "列出指定 Base 当前版本下的全部 nsheet 节点",
"use_when": [
"当你要总览某 Base 当前版本下的全部节点(表、仪表盘、文件夹等)目录结构时使用;返回所有 nsheet 节点。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws aitable +section-list-nodes --base-id B"
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#aitable.shortcut_section_list_nodes",
"cobra-help:dws aitable +section-list-nodes",
"ShortcutRegistry:aitable +section-list-nodes"
]
},
"aitable.shortcut_find_record": {
"agent_summary": "在指定多维表里按关键词查记录(只读)",
"use_when": [
"当你已经知道某个多维表的 baseId 和 tableId、想按一个关键词快速找出匹配的行记录,却不想手写结构化过滤条件时使用;内部直接调用 query_records,把 --query 作为全文关键词(keyword)在该表里检索并打印匹配记录。不传 --query 时则返回该表的前若干条记录。这是只读操作,不会修改任何数据。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws aitable +find-record --base B --table T",
"dws aitable +find-record --base B --table T --query 张三"
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#aitable.shortcut_find_record",
"cobra-help:dws aitable +find-record",
"ShortcutRegistry:aitable +find-record"
]
},
"aitable.shortcut_list_tables": {
"agent_summary": "列出某个多维表(base)里的所有数据表(只读,投影 tableId/tableName)",
"use_when": [
"当你已经知道某个多维表(base)的 baseId、想一步看清这个 base 下都有哪些数据表(table)、拿到它们的 tableId 和 tableName 以便后续查记录或改结构,却不想手动翻 base get 的完整目录时使用;内部直接调用 get_tables,只传 baseId(不带 tableIds,因此返回该 base 下的全部数据表),再在本地把每张表投影成 tableId、tableName 两个关键字段打印出来。这是纯只读操作,只做列举与本地投影,不会创建、修改或删除任何表。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws aitable +list-tables --base B"
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#aitable.shortcut_list_tables",
"cobra-help:dws aitable +list-tables",
"ShortcutRegistry:aitable +list-tables"
]
},
"aitable.shortcut_record_share_links": {
"agent_summary": "批量(可 >20 条)获取多维表记录分享链接:去重+分片+合并",
"use_when": [
"当你要一次性拿到很多条多维表记录的分享链接、数量可能超过底层工具单次 20 条上限时使用;内部先对 --record-ids 去重(保持顺序),再按每批 ≤20 条切片,逐批调用 get_record_share_url(在 aitable-helper 服务上),最后把各批返回的 {recordId, shareUrl} 合并成一个列表;某一批失败会记录错误但不影响其余批。这是只读操作,只生成/获取分享链接、不修改记录。可选 --view-id 生成带视图上下文的链接。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws aitable +record-share-links --base B --table T --record-ids rec1,rec2,rec3",
"dws aitable +record-share-links --base B --table T --record-ids rec1 --view-id viw_VIP"
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#aitable.shortcut_record_share_links",
"cobra-help:dws aitable +record-share-links",
"ShortcutRegistry:aitable +record-share-links"
]
},
"aitable.shortcut_resolve_base": {
"agent_summary": "按名称搜索多维表 Base 并解析出唯一 baseId(只读)",
"use_when": [
"当你只知道某个多维表 Base 的名称(或名称里的关键词)、想把它解析成可直接用于后续工具的 baseId 时使用;内部按 --name 关键词调用 search_bases 搜索 Base,再在本地投影出每个候选的 baseId 和 name。如果只命中一个 Base 就直接返回它的 baseId;如果命中多个则列出全部候选让你消歧,绝不替你瞎猜;如果一个都没命中则提示未找到。这是纯只读操作,只做搜索与本地投影,不会修改任何 Base。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws aitable +resolve-base --name 项目管理"
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#aitable.shortcut_resolve_base",
"cobra-help:dws aitable +resolve-base",
"ShortcutRegistry:aitable +resolve-base"
]
},
"aitable.shortcut_resolve_table": {
"agent_summary": "在某个多维表 Base 内按名称解析出唯一的数据表 tableId(只读)",
"use_when": [
"当你已经知道某个多维表 Base 的 baseId、又只记得里面某张数据表(table)的名称或名称关键词、想把它解析成可直接用于后续工具的 tableId 时使用;内部先用 get_tables(只传 baseId)列出该 Base 下的全部数据表,再在本地把每张表投影成 tableId、name,并按 --name 关键词做大小写不敏感的包含匹配来筛选候选。如果只命中一张表就直接返回它的 tableId;如果命中多张则列出全部候选让你消歧,绝不替你瞎猜;如果一张都没命中则提示未找到。这是纯只读操作,只做列举、本地匹配与投影,不会创建、修改或删除任何数据表。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws aitable +resolve-table --base B --name 任务"
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#aitable.shortcut_resolve_table",
"cobra-help:dws aitable +resolve-table",
"ShortcutRegistry:aitable +resolve-table"
]
}
},
"products": {
@@ -886,6 +886,367 @@
"skills/mono/references/products/attendance-vacation.md",
"live-dws-schema:attendance.vacation_update_type"
]
},
"attendance.shortcut_check_result": {
"agent_summary": "查询用户打卡结果(迟到/早退/缺卡等)",
"use_when": [
"当你需要批量统计一批员工在某段时间的打卡结果(正常/迟到/早退/缺卡等判定结论)时使用,例如做月度考勤汇总或异常人员排查;输入多个 userId(最多 100 人)和不超过 1 个月的日期区间,返回每人每天的打卡结果状态,支持分页。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws attendance +check-result --users userId1,userId2 --start 2026-04-01 --end 2026-04-30 --limit 50"
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#attendance.shortcut_check_result",
"cobra-help:dws attendance +check-result",
"ShortcutRegistry:attendance +check-result"
]
},
"attendance.shortcut_check_record": {
"agent_summary": "查询用户打卡流水(打卡时间/地点/定位方式)",
"use_when": [
"当你要查看员工每一次实际打卡的原始记录(具体打卡时刻、打卡地点、定位/Wifi/蓝牙等方式)而不是判定结论时使用,例如核实某人是否在指定地点打卡;输入 userId 列表和不超过 1 个月的日期区间,返回逐条打卡流水。与 +check-result 的区别是这里返回明细流水而非迟到早退结论。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws attendance +check-record --users userId1 --start 2026-04-01 --end 2026-04-30"
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#attendance.shortcut_check_record",
"cobra-help:dws attendance +check-record",
"ShortcutRegistry:attendance +check-record"
]
},
"attendance.shortcut_list_approve": {
"agent_summary": "查询用户考勤审批单(补卡/加班/请假/出差外出)",
"use_when": [
"当你想查看某些员工已提交的考勤类审批单(加班、请假、出差外出、补卡)时使用,例如核对某人这段时间请了几次假或有没有补卡审批;输入 userId 列表、审批类型(overtime/加班、leave/请假、trip/出差外出、patch/补卡)和日期区间,返回匹配的审批单记录。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws attendance +list-approve --users userId1 --types overtime,leave --start 2026-04-01 --end 2026-04-30"
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#attendance.shortcut_list_approve",
"cobra-help:dws attendance +list-approve",
"ShortcutRegistry:attendance +list-approve"
]
},
"attendance.shortcut_get_approve_template": {
"agent_summary": "查询补卡/请假/加班/外出/出差审批提交链接",
"use_when": [
"当用户想自己发起一条考勤审批(补卡、请假、加班、外出、出差)、需要拿到对应审批表单的提交入口链接时使用;输入审批类型(如 leave/请假),返回可直接打开填写并提交的审批链接。本命令只返回链接、不代替用户提交审批。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws attendance +get-approve-template --type leave"
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#attendance.shortcut_get_approve_template",
"cobra-help:dws attendance +get-approve-template",
"ShortcutRegistry:attendance +get-approve-template"
]
},
"attendance.shortcut_get_schedule": {
"agent_summary": "获取指定用户一段时间内的排班记录",
"use_when": [
"当你要查看排班制考勤组下员工在某段时间的排班记录(含排班 id、班次、是否休息)时使用,尤其是需要拿到排班 id 用于后续 BOSS 改签打卡(+boss-check)的场景;输入 userId 列表和起止时间,返回逐日排班明细。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws attendance +get-schedule --users user001,user002 --start 2026-04-01 --end 2026-04-30"
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#attendance.shortcut_get_schedule",
"cobra-help:dws attendance +get-schedule",
"ShortcutRegistry:attendance +get-schedule"
]
},
"attendance.shortcut_search_class": {
"agent_summary": "查询当前用户可管理的班次详情列表",
"use_when": [
"当你要浏览或按名称查找当前用户能管理的班次、以便拿到班次 ID 用于建组、排班或改班次时使用;可选按班次名关键字模糊搜索、按 ALL/我负责的过滤并分页,返回班次列表及详情。要看某个具体班次的完整配置用 +get-class。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws attendance +search-class --query \"早班\" --filter-type MINE_OWN"
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#attendance.shortcut_search_class",
"cobra-help:dws attendance +search-class",
"ShortcutRegistry:attendance +search-class"
]
},
"attendance.shortcut_get_adjustment_rule": {
"agent_summary": "根据补卡规则主键 ID 查询补卡规则详情",
"use_when": [
"当你已知某条补卡规则的主键 ID、想查看它的具体规则内容(每月可补卡次数、时限、适用范围等)时使用;输入 adjustmentId,返回该补卡规则的完整详情。不知道 ID 时先用 +search-adjustment-rule 列出。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws attendance +get-adjustment-rule --adjustment-id 12345"
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#attendance.shortcut_get_adjustment_rule",
"cobra-help:dws attendance +get-adjustment-rule",
"ShortcutRegistry:attendance +get-adjustment-rule"
]
},
"attendance.shortcut_search_adjustment_rule": {
"agent_summary": "查询当前用户可管理的补卡规则列表",
"use_when": [
"当你要浏览或按名称查找当前用户可管理的补卡规则、以便拿到规则 ID 做进一步查看时使用;可选按规则名关键字模糊搜索并分页,返回补卡规则列表。要看某条规则的完整内容用 +get-adjustment-rule。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws attendance +search-adjustment-rule --query \"标准\" --page 1 --limit 50"
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#attendance.shortcut_search_adjustment_rule",
"cobra-help:dws attendance +search-adjustment-rule",
"ShortcutRegistry:attendance +search-adjustment-rule"
]
},
"attendance.shortcut_get_overtime_rule": {
"agent_summary": "根据加班规则主键 ID 查询加班规则详情",
"use_when": [
"当你已知某条加班规则的主键 ID、想查看它的具体内容(工作日/休息日/节假日加班计算方式、适用范围等)时使用;输入 overtimeId,返回该加班规则的完整详情。不知道 ID 时先用 +search-overtime-rule 列出。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws attendance +get-overtime-rule --overtime-id 12345"
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#attendance.shortcut_get_overtime_rule",
"cobra-help:dws attendance +get-overtime-rule",
"ShortcutRegistry:attendance +get-overtime-rule"
]
},
"attendance.shortcut_search_overtime_rule": {
"agent_summary": "查询当前用户可管理的加班规则列表",
"use_when": [
"当你要浏览或按名称查找当前用户可管理的加班规则、以便拿到规则 ID 做进一步查看时使用;可选按规则名关键字模糊搜索并分页,返回加班规则列表。要看某条规则的完整内容用 +get-overtime-rule。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws attendance +search-overtime-rule --query \"节假日\" --page 1 --limit 50"
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#attendance.shortcut_search_overtime_rule",
"cobra-help:dws attendance +search-overtime-rule",
"ShortcutRegistry:attendance +search-overtime-rule"
]
},
"attendance.shortcut_search_group": {
"agent_summary": "查询当前用户可管理的考勤组列表",
"use_when": [
"当你要浏览或按名称查找当前用户可管理的考勤组、以便拿到考勤组 ID 用于查看详情、改成员或改配置时使用;可选按名称关键字、考勤组类型(固定班制/排班制/自由工时)过滤,并可选带出定位/Wifi/蓝牙信息,分页返回考勤组简要列表。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws attendance +search-group --query \"研发\" --type FIXED --limit 50"
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#attendance.shortcut_search_group",
"cobra-help:dws attendance +search-group",
"ShortcutRegistry:attendance +search-group"
]
},
"attendance.shortcut_get_summary": {
"agent_summary": "查询某个人的考勤统计摘要(周/月)",
"use_when": [
"当你想快速了解某个人一周或一月的考勤汇总(出勤天数、迟到早退次数、加班、请假时长等统计口径)而不是逐天明细时使用;输入 userId、所在周期内的任意日期和统计类型(week/month),返回该周期的考勤统计摘要。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws attendance +get-summary --user USER_ID --date 2026-03-12 --stats-type week"
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#attendance.shortcut_get_summary",
"cobra-help:dws attendance +get-summary",
"ShortcutRegistry:attendance +get-summary"
]
},
"attendance.shortcut_get_self_setting": {
"agent_summary": "查询个人规则设置(打卡提醒/极速打卡/缺卡提醒等)",
"use_when": [
"当你想查看某个用户在指定场景下的个人考勤规则开关配置(如打卡提醒、极速打卡、缺卡提醒、考勤结果通知等是否开启)时使用;输入设置场景 settingScene 和用户 userId,返回该用户对应场景的个人设置。查企业全局设置用 +get-global-setting。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws attendance +get-self-setting --setting-scene checkRemind --user USER_ID"
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#attendance.shortcut_get_self_setting",
"cobra-help:dws attendance +get-self-setting",
"ShortcutRegistry:attendance +get-self-setting"
]
},
"attendance.shortcut_query_report_data": {
"agent_summary": "根据字段查询考勤报表数据(仅管理员)",
"use_when": [
"当你要按指定考勤字段导出/查询一批员工在某时间段的报表数值(如各人的出勤天数、迟到次数、加班时长)时使用,常用于做考勤汇总或核算;输入 userId 列表(最多 20 人)、字段 ID 列表(来自 +list-report-columns)和不超过 32 天的时间区间,返回对应字段的数据。仅管理员可用。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws attendance +query-report-data --users userId1,userId2 --columns 1001,1002 --start \"2026-03-01 00:00:00\" --end \"2026-03-31 23:59:59\""
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#attendance.shortcut_query_report_data",
"cobra-help:dws attendance +query-report-data",
"ShortcutRegistry:attendance +query-report-data"
]
},
"attendance.shortcut_list_leave_types": {
"agent_summary": "查询当前用户可用的假期规则列表",
"use_when": [
"当你想知道企业有哪些假期类型(年假、事假、病假等)及其对应的假期编码 code、单位、是否带薪时使用,通常是查余额或改假期规则前先拿到 leaveCode;无需参数,返回当前用户可用的假期规则列表。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws attendance +list-leave-types"
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#attendance.shortcut_list_leave_types",
"cobra-help:dws attendance +list-leave-types",
"ShortcutRegistry:attendance +list-leave-types"
]
},
"attendance.shortcut_get_leave_records": {
"agent_summary": "查询指定员工的假期余额变更记录",
"use_when": [
"当你想追溯某个员工假期额度的变动流水(何时发放、扣减、因请假消耗多少)以核对余额来龙去脉时使用;输入单个 userId、日期区间,可选假期 code(不传查所有假期),返回该员工在该时间段的余额变更记录。只想看当前余额用 +get-leave-balance。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws attendance +get-leave-records --user USER_ID --leave-code a1b2c3d4-e5f6-7890-abcd-ef1234567890 --start 2026-04-01 --end 2026-04-22"
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#attendance.shortcut_get_leave_records",
"cobra-help:dws attendance +get-leave-records",
"ShortcutRegistry:attendance +get-leave-records"
]
},
"attendance.shortcut_get_checkin_record": {
"agent_summary": "查询指定员工一段时间内的签到记录",
"use_when": [
"当你要查看员工的外勤/移动办公签到记录(signin/checkin,区别于考勤打卡)时使用,例如核实业务员的拜访签到轨迹;需提供操作者企业 ID 与员工 ID、目标员工 ID 列表(最多 100 人)以及不超过 7 天的时间区间,返回这些人的签到明细。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws attendance +get-checkin-record --operator-corp-id dingXXX --operator-staff-id op001 --staff-ids user001,user002 --start \"2026-04-01 00:00:00\" --end \"2026-04-07 00:00:00\""
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#attendance.shortcut_get_checkin_record",
"cobra-help:dws attendance +get-checkin-record",
"ShortcutRegistry:attendance +get-checkin-record"
]
},
"attendance.shortcut_my_attendance": {
"agent_summary": "查我今天的考勤打卡记录(打卡流水,自动解析当前用户)",
"use_when": [
"当你想快速看自己今天的打卡流水(几点上下班打卡、打卡地址/定位方式)、又不想先查自己的 userId 再手动填写今天的起止时间时使用;内部先取当前登录用户的 userId,再按本地时区算出今天 00:00 到次日 00:00 的时间窗,最后查询你今天的打卡流水记录。只读操作,不会修改任何考勤数据;今天若还没有任何打卡则返回空结果。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws attendance +my-attendance"
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#attendance.shortcut_my_attendance",
"cobra-help:dws attendance +my-attendance",
"ShortcutRegistry:attendance +my-attendance"
]
},
"attendance.shortcut_this_month": {
"agent_summary": "查我本月的考勤打卡记录(打卡流水,自动解析当前用户)",
"use_when": [
"当你想快速看自己本月的打卡流水(几点上下班打卡、打卡地址/定位方式)、又不想先查自己的 userId 再手动填写本月的起止时间时使用;内部先取当前登录用户的 userId,再按本地时区算出本月 1 号 00:00 到下月 1 号 00:00 的时间窗,最后查询你本月的打卡流水记录。只读操作,不会修改任何考勤数据;本月若还没有任何打卡则返回空结果。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws attendance +this-month"
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#attendance.shortcut_this_month",
"cobra-help:dws attendance +this-month",
"ShortcutRegistry:attendance +this-month"
]
}
},
"products": {
@@ -437,6 +437,393 @@
"skills/mono/references/products/calendar.md",
"live-dws-schema:calendar.update_calendar_event"
]
},
"calendar.shortcut_agenda": {
"agent_summary": "查询日程列表(不传时间默认查询今天)",
"use_when": [
"当你想了解某人(默认自己)在某段时间内的日程安排、看看今天/本周有哪些会时使用;可传 --start/--end 圈定时间范围、--calendar-id 指定日历,返回该区间内的日程列表(含日程 ID,可配合 +get 看详情)。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws calendar +agenda",
"dws calendar +agenda --start \"2026-03-10T00:00:00+08:00\" --end \"2026-03-31T23:59:59+08:00\" --limit 50"
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#calendar.shortcut_agenda",
"cobra-help:dws calendar +agenda",
"ShortcutRegistry:calendar +agenda"
]
},
"calendar.shortcut_attendee_list": {
"agent_summary": "查看日程参会人",
"use_when": [
"当你想知道某个日程都有谁参加、各人的出席响应状态时使用;输入 --event 日程 ID,返回参会人列表(userId 及其接受/拒绝等状态)。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws calendar +attendee-list --event EVENT_ID"
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#calendar.shortcut_attendee_list",
"cobra-help:dws calendar +attendee-list",
"ShortcutRegistry:calendar +attendee-list"
]
},
"calendar.shortcut_room_search": {
"agent_summary": "按名称模糊搜索会议室(不检查可用性)",
"use_when": [
"当你只知道会议室名字、想拿到它的 roomId 以便后续预定时使用;输入 --room-name 名称关键词(建议只填核心专名,去掉“会议室”等后缀),返回名称匹配的会议室列表。它只按名字找、不判断该时段是否空闲,查可用性请用 +room-find。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws calendar +room-search --room-name 永澄亭"
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#calendar.shortcut_room_search",
"cobra-help:dws calendar +room-search",
"ShortcutRegistry:calendar +room-search"
]
},
"calendar.shortcut_room_groups": {
"agent_summary": "会议室分组列表",
"use_when": [
"当你想按楼层/园区等分组浏览会议室、或需要拿到 groupId 以便在 +room-find 里按分组过滤时使用;返回会议室分组列表,支持 --limit/--page 分页。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws calendar +room-groups"
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#calendar.shortcut_room_groups",
"cobra-help:dws calendar +room-groups",
"ShortcutRegistry:calendar +room-groups"
]
},
"calendar.shortcut_freebusy": {
"agent_summary": "查询用户 / 会议室闲忙状态(--users 与 --rooms 至少其一)",
"use_when": [
"当你要在约会前确认某些人或会议室在指定时间段是否有空、避免冲突时使用;传入 --start/--end 时间段并至少给出 --users 或 --rooms 其一,返回各对象在该区间的忙/闲时段。只看忙闲结果、不看具体日程内容,需要系统给出建议时段可用 +suggestion。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws calendar +freebusy --users userId1,userId2 --start \"2026-03-10T14:00:00+08:00\" --end \"2026-03-10T18:00:00+08:00\""
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#calendar.shortcut_freebusy",
"cobra-help:dws calendar +freebusy",
"ShortcutRegistry:calendar +freebusy"
]
},
"calendar.shortcut_book_list": {
"agent_summary": "查询用户的日历本列表",
"use_when": [
"当你想知道自己有哪些日历本(主日历、项目日历、订阅日历等)、或需要拿到某个日历的 calendarId 以便在 +agenda/+create 中指定时使用;无需参数,返回全部日历本列表。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws calendar +book-list"
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#calendar.shortcut_book_list",
"cobra-help:dws calendar +book-list",
"ShortcutRegistry:calendar +book-list"
]
},
"calendar.shortcut_book_search": {
"agent_summary": "按名称模糊搜索日历本",
"use_when": [
"当你只记得日历本名字的一部分、想据此找到对应的 calendarId 时使用;输入 --query 名称关键词,返回名称匹配的日历本列表,便于后续在其它命令里指定 --calendar-id。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws calendar +book-search --query \"项目\""
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#calendar.shortcut_book_search",
"cobra-help:dws calendar +book-search",
"ShortcutRegistry:calendar +book-search"
]
},
"calendar.shortcut_book": {
"agent_summary": "创建日程,并可按姓名邀请参会人(自动解析 userId,失败自动回滚删除日程)",
"use_when": [
"当你想快速排一个会/日程、并顺手把几位同事按姓名拉进来时使用;内部先建日程拿到 eventId,再把每个姓名解析成唯一 userId 批量加为参会人。如果加参会人失败,会自动删除刚建好的日程回滚,避免留下一个没人的空日程。会真实创建日程并发出参会邀请。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws calendar +book --title \"周会\" --start \"2026-03-10T14:00:00+08:00\" --end \"2026-03-10T15:00:00+08:00\"",
"dws calendar +book --title \"Q1 复盘会\" --start \"2026-03-10T14:00:00+08:00\" --end \"2026-03-10T15:00:00+08:00\" --with 张三,李四"
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#calendar.shortcut_book",
"cobra-help:dws calendar +book",
"ShortcutRegistry:calendar +book"
]
},
"calendar.shortcut_cancel_event": {
"agent_summary": "取消(删除)一个已有日程(删除前先确认它真实存在)",
"use_when": [
"当你想取消/删除一个已经存在的日程时使用;内部先用 eventId 拉一次日程详情确认它真实存在并回显标题,再执行删除,避免因 eventId 写错而误删别的日程。如果 eventId 查不到会直接报错,不会盲目删除。这是高危写操作,会真实删除该日程,框架会二次确认。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws calendar +cancel-event --event EVENT_ID"
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#calendar.shortcut_cancel_event",
"cobra-help:dws calendar +cancel-event",
"ShortcutRegistry:calendar +cancel-event"
]
},
"calendar.shortcut_conflicts": {
"agent_summary": "检测我某天日程的时间冲突(重叠/双重预订,默认今天)",
"use_when": [
"当你想快速知道『我今天(或某天)的日程有没有时间冲突、撞车的会议』时使用;内部自动算出目标日期的时间范围(默认今天,可用 --in-days 指定几天后),列出当天全部日程,再在本地两两比对开始/结束时间,找出所有时间段重叠的日程对并报告。只读操作,不修改任何日程;没有冲突时明确告诉你「无冲突」。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws calendar +conflicts",
"dws calendar +conflicts --in-days 1"
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#calendar.shortcut_conflicts",
"cobra-help:dws calendar +conflicts",
"ShortcutRegistry:calendar +conflicts"
]
},
"calendar.shortcut_free_slots": {
"agent_summary": "找我某天工作时段内的空闲时间段(默认今天 09:00-18:00)",
"use_when": [
"当你想知道『我今天(或某天)还有哪些时间是空的、可以安排会议/事情』时使用;内部列出目标日期(默认今天,--in-days 指定几天后)的全部日程,合并忙碌时段,再在工作时间范围内(默认 09:00-18:00,可用 --from/--to 指定起止小时)算出所有空闲窗口并给出每段的起止与时长。只读操作,不修改任何日程;用于快速定位可预约的空档。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws calendar +free-slots",
"dws calendar +free-slots --in-days 1 --from 9 --to 20"
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#calendar.shortcut_free_slots",
"cobra-help:dws calendar +free-slots",
"ShortcutRegistry:calendar +free-slots"
]
},
"calendar.shortcut_free": {
"agent_summary": "按姓名查询某人在指定时间段内的忙闲状态(自动解析 userId)",
"use_when": [
"当你只知道对方姓名、想知道 TA 在某段时间内是空闲还是被日程占用(比如约会前先看看有没有空)而不想先手动查 userId 时使用;内部先按姓名搜通讯录解析出唯一 userId,姓名匹配到多人时会列出候选让你区分,再按时间范围查询忙闲。只读,不产生任何日程变更。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws calendar +free --who 张三 --start \"2026-03-10T14:00:00+08:00\" --end \"2026-03-10T18:00:00+08:00\""
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#calendar.shortcut_free",
"cobra-help:dws calendar +free",
"ShortcutRegistry:calendar +free"
]
},
"calendar.shortcut_invite": {
"agent_summary": "按姓名把参会人加入已有日程(自动解析 userId 后批量添加)",
"use_when": [
"当你已经有一个日程(知道 eventId),想按姓名把几位同事拉进来当参会人时使用;内部先把 --with 里每个姓名解析成唯一 userId,再一次性把他们全部加到 --event 指定的日程里。会真实修改日程并发出参会邀请。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws calendar +invite --event EVENT_ID --with 张三",
"dws calendar +invite --event EVENT_ID --with 张三,李四"
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#calendar.shortcut_invite",
"cobra-help:dws calendar +invite",
"ShortcutRegistry:calendar +invite"
]
},
"calendar.shortcut_my_free": {
"agent_summary": "查我自己在某时间段的忙闲(默认今天,无需输入姓名)",
"use_when": [
"当你(或 AI agent)想知道『我自己什么时候有空/忙』、用于安排会议或回复邀约时使用;不用像 +free 那样传别人的姓名——内部自动解析当前用户的 userId,再查其忙闲时段。默认查今天(本地时区 00:00 到次日 00:00),也可用 --start/--end 指定 ISO8601 时间范围。只读操作,只查忙闲、不创建或修改任何日程;返回按时间排列的忙碌时段,空则表示这段时间全空。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws calendar +my-free",
"dws calendar +my-free --start 2026-07-10T09:00:00+08:00 --end 2026-07-10T18:00:00+08:00"
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#calendar.shortcut_my_free",
"cobra-help:dws calendar +my-free",
"ShortcutRegistry:calendar +my-free"
]
},
"calendar.shortcut_next_event": {
"agent_summary": "查看接下来最近的一个日程(默认扫描未来 7 天)",
"use_when": [
"当你只想知道『我下一个日程是什么、什么时候开始』、而不想翻一整份日程列表时使用;内部以当前时间为起点、往后 7 天为范围,拉取主日历下的日程,按开始时间升序挑出最近的那一个并打印摘要(标题、开始/结束时间、地点)。若这 7 天内没有任何日程,会明确提示『近 7 天无日程』。只读,不做任何修改。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws calendar +next-event"
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#calendar.shortcut_next_event",
"cobra-help:dws calendar +next-event",
"ShortcutRegistry:calendar +next-event"
]
},
"calendar.shortcut_reschedule": {
"agent_summary": "改一个已有日程的时间(只动开始/结束时间,其他字段不变)",
"use_when": [
"当你想把一个已经存在的日程改到新的时间段、又不想动标题/描述/参会人等其他内容时使用;内部先用 eventId 拉一次日程详情确认它真实存在,再只更新开始和结束时间。如果 eventId 查不到会直接报错,不会误改别的日程。会真实修改该日程的时间。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws calendar +reschedule --event EVENT_ID --start \"2026-03-10T15:00:00+08:00\" --end \"2026-03-10T16:00:00+08:00\""
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#calendar.shortcut_reschedule",
"cobra-help:dws calendar +reschedule",
"ShortcutRegistry:calendar +reschedule"
]
},
"calendar.shortcut_suggest_time": {
"agent_summary": "按姓名解析多位参与者,推荐大家都有空的可开会时间段(自动解析 userId)",
"use_when": [
"当你想为几个人凑一个大家都空闲的开会时间、但只知道他们的姓名而不想逐个手动查 userId 时使用;内部会把 --with 里的姓名逐个搜通讯录解析成唯一 userId(任何一个没匹配到或匹配到多人都会明确报出来,绝不瞎猜),再基于所有参与者的忙闲,在给定时间范围内推荐若干可用时段。只读,不创建任何日程。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws calendar +suggest-time --with 张三,李四 --start \"2026-03-10T09:00:00+08:00\" --end \"2026-03-10T18:00:00+08:00\"",
"dws calendar +suggest-time --with 张三,李四,王五 --start \"2026-03-10T09:00:00+08:00\" --end \"2026-03-10T18:00:00+08:00\" --duration 30"
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#calendar.shortcut_suggest_time",
"cobra-help:dws calendar +suggest-time",
"ShortcutRegistry:calendar +suggest-time"
]
},
"calendar.shortcut_today": {
"agent_summary": "列出我今天的日程(自动计算今天的起止时间,无需手动填时间范围)",
"use_when": [
"当你想快速看看『我今天有哪些日程/会议安排』时使用;内部用本地时区自动把时间范围算成今天 00:00 到次日 00:00,转成毫秒时间戳,查询主日历(primary)下今天的全部日程。只读,不会创建或修改任何日程。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws calendar +today"
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#calendar.shortcut_today",
"cobra-help:dws calendar +today",
"ShortcutRegistry:calendar +today"
]
},
"calendar.shortcut_tomorrow": {
"agent_summary": "列出我明天的日程(自动计算明天的起止时间,无需手动填时间范围)",
"use_when": [
"当你想快速看看『我明天有哪些日程/会议安排』、提前准备时使用;内部用本地时区自动把时间范围算成明天 00:00 到后天 00:00,转成毫秒时间戳,查询主日历(primary)下明天的全部日程,并投影出标题、开始时间、结束时间、地点、eventId。只读,不会创建或修改任何日程。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws calendar +tomorrow"
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#calendar.shortcut_tomorrow",
"cobra-help:dws calendar +tomorrow",
"ShortcutRegistry:calendar +tomorrow"
]
},
"calendar.shortcut_week": {
"agent_summary": "列出我本周的日程(自动按周一为周首计算本周起止时间,无需手动填时间范围)",
"use_when": [
"当你想快速看看『我本周有哪些日程/会议安排』时使用;内部用本地时区、以周一为一周开始,自动把时间范围算成本周一 00:00 到下周一 00:00,转成毫秒时间戳,查询主日历(primary)下本周的全部日程,并投影出标题、开始时间、结束时间、eventId。只读,不会创建或修改任何日程。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws calendar +week"
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#calendar.shortcut_week",
"cobra-help:dws calendar +week",
"ShortcutRegistry:calendar +week"
]
}
},
"products": {
@@ -1595,6 +1595,807 @@
"Wukong-parity:3306c3307",
"live-dws-schema:chat.upgrade_group_to_external#FAILED"
]
},
"chat.shortcut_bot_search": {
"agent_summary": "搜索当前用户自己创建的机器人",
"use_when": [
"当你要管理或复用自己创建的机器人(比如查到其 robotCode 以便让它进群或发消息)时使用;按机器人名称模糊搜索,只返回当前用户名下创建的机器人列表。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws chat +bot-search --page 1 --name \"日报\""
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#chat.shortcut_bot_search",
"cobra-help:dws chat +bot-search",
"ShortcutRegistry:chat +bot-search"
]
},
"chat.shortcut_bot_find": {
"agent_summary": "搜索全部可用机器人(含他人/官方,返回 openDingTalkId 可发单聊)",
"use_when": [
"当你想找到平台上任意可用机器人(含他人创建或官方助手,例如某个日报/审批机器人)以便与其发起单聊时使用;输入关键词,返回含 openDingTalkId 的机器人列表。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws chat +bot-find --query \"日报\""
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#chat.shortcut_bot_find",
"cobra-help:dws chat +bot-find",
"ShortcutRegistry:chat +bot-find"
]
},
"chat.shortcut_conversation_info": {
"agent_summary": "获取会话信息(群聊传 --group,单聊传 --open-dingtalk-id)",
"use_when": [
"当你已有群 openConversationId 或单聊对方 openDingTalkId、需要查看该会话的名称/类型/成员数等基础信息时使用;只读,群聊传 --group、单聊传 --open-dingtalk-id 二选一。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws chat +conversation-info --group <openConversationId>"
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#chat.shortcut_conversation_info",
"cobra-help:dws chat +conversation-info",
"ShortcutRegistry:chat +conversation-info"
]
},
"chat.shortcut_conversation_clear_all_red_point": {
"agent_summary": "清除所有会话红点(全部已读)",
"use_when": [
"当你想一键把全部会话标记为已读、清空所有红点时使用;会实际清除当前用户所有会话的红点,无需任何参数。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws chat +conversation-clear-all-red-point"
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#chat.shortcut_conversation_clear_all_red_point",
"cobra-help:dws chat +conversation-clear-all-red-point",
"ShortcutRegistry:chat +conversation-clear-all-red-point"
]
},
"chat.shortcut_conversation_list": {
"agent_summary": "分页获取当前用户的全部会话列表(单聊+群聊)",
"use_when": [
"当你想遍历当前用户的所有会话(单聊+群聊)做统计、清理或批量处理时使用;只读分页返回,可用 --exclude-muted 排除已免打扰会话。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws chat +conversation-list --limit 50"
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#chat.shortcut_conversation_list",
"cobra-help:dws chat +conversation-list",
"ShortcutRegistry:chat +conversation-list"
]
},
"chat.shortcut_conversation_list_top": {
"agent_summary": "拉取置顶会话列表",
"use_when": [
"当你只想查看被置顶的那些会话时使用;只读分页返回置顶会话列表,可用 --exclude-muted 排除已免打扰会话。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws chat +conversation-list-top --limit 1000"
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#chat.shortcut_conversation_list_top",
"cobra-help:dws chat +conversation-list-top",
"ShortcutRegistry:chat +conversation-list-top"
]
},
"chat.shortcut_category_list": {
"agent_summary": "获取用户自定义会话分组",
"use_when": [
"当你想查看当前用户自建了哪些会话分组(如'工作群''项目群')时使用;只读返回分组列表及其 categoryId,供后续按分组拉会话或增删。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws chat +category-list"
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#chat.shortcut_category_list",
"cobra-help:dws chat +category-list",
"ShortcutRegistry:chat +category-list"
]
},
"chat.shortcut_category_create": {
"agent_summary": "创建用户自定义会话分组",
"use_when": [
"当你想新建一个会话分组来归类会话时使用;会实际创建分组并返回其 ID,需传分组名称 --title。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws chat +category-create --title \"工作群\""
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#chat.shortcut_category_create",
"cobra-help:dws chat +category-create",
"ShortcutRegistry:chat +category-create"
]
},
"chat.shortcut_category_delete": {
"agent_summary": "删除用户自定义会话分组",
"use_when": [
"当你想删除某个自定义会话分组时使用;会实际删除分组(不影响其中会话本身),不可逆,需传 categoryId。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws chat +category-delete --category-id <分组ID>"
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#chat.shortcut_category_delete",
"cobra-help:dws chat +category-delete",
"ShortcutRegistry:chat +category-delete"
]
},
"chat.shortcut_category_rename": {
"agent_summary": "更新用户自定义会话分组的名称",
"use_when": [
"当你想重命名已有的自定义会话分组时使用;会实际更新分组名称,需传 categoryId 和新名称 --title。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws chat +category-rename --category-id <分组ID> --title \"新名称\""
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#chat.shortcut_category_rename",
"cobra-help:dws chat +category-rename",
"ShortcutRegistry:chat +category-rename"
]
},
"chat.shortcut_chat_search": {
"agent_summary": "按关键词搜索群聊",
"use_when": [
"当你只记得群名称关键词、需要拿到群 openConversationId 以便发消息或管理该群时使用;按群名模糊搜索,只读分页返回匹配的群列表。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws chat +chat-search --query \"项目冲刺\""
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#chat.shortcut_chat_search",
"cobra-help:dws chat +chat-search",
"ShortcutRegistry:chat +chat-search"
]
},
"chat.shortcut_chat_invite_url": {
"agent_summary": "获取群邀请链接",
"use_when": [
"当你想拿到一条群邀请链接分享给别人加群时使用;只读生成链接,需传群 openConversationId,可用 --expires-seconds 设置有效期(0 表示永久)。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws chat +chat-invite-url --group <openConversationId>"
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#chat.shortcut_chat_invite_url",
"cobra-help:dws chat +chat-invite-url",
"ShortcutRegistry:chat +chat-invite-url"
]
},
"chat.shortcut_chat_dismiss": {
"agent_summary": "解散群聊(不可逆,需群主权限)",
"use_when": [
"当你要彻底解散一个群时使用;会实际销毁群聊,不可逆且需群主权限,仅需传群 openConversationId,操作前务必确认。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws chat +chat-dismiss --group <openConversationId>"
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#chat.shortcut_chat_dismiss",
"cobra-help:dws chat +chat-dismiss",
"ShortcutRegistry:chat +chat-dismiss"
]
},
"chat.shortcut_chat_set_history": {
"agent_summary": "设置新成员入群可查看历史消息范围",
"use_when": [
"当你想控制新成员入群后能看到多少历史消息时使用;会实际修改群配置,需传群 openConversationId 和范围(FORBIDDEN 不可见 / RECENT_100 最近100条 / ALL 全部)。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws chat +chat-set-history --group <openConversationId> --option RECENT_100"
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#chat.shortcut_chat_set_history",
"cobra-help:dws chat +chat-set-history",
"ShortcutRegistry:chat +chat-set-history"
]
},
"chat.shortcut_chat_update_nick": {
"agent_summary": "设置当前用户在群内的群昵称",
"use_when": [
"当你想设置当前用户在某个群里显示的群昵称时使用;会实际更新本人在该群的昵称,需传群 openConversationId 和昵称。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws chat +chat-update-nick --group <openConversationId> --nick \"我的群昵称\""
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#chat.shortcut_chat_update_nick",
"cobra-help:dws chat +chat-update-nick",
"ShortcutRegistry:chat +chat-update-nick"
]
},
"chat.shortcut_chat_update_alias": {
"agent_summary": "设置群备注(仅自己可见)",
"use_when": [
"当你想给某个群设置仅自己可见的备注名以便区分同名群时使用;会实际保存本人对该群的备注,需传群 openConversationId 和备注标题。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws chat +chat-update-alias --group <openConversationId> --alias-title \"项目A群\""
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#chat.shortcut_chat_update_alias",
"cobra-help:dws chat +chat-update-alias",
"ShortcutRegistry:chat +chat-update-alias"
]
},
"chat.shortcut_chat_list_mine": {
"agent_summary": "拉取我创建/管理的群",
"use_when": [
"当你想查看自己作为群主或管理员在管理哪些群时使用;只读分页返回,可用 --role OWNER/ADMIN 按角色过滤。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws chat +chat-list-mine --role OWNER"
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#chat.shortcut_chat_list_mine",
"cobra-help:dws chat +chat-list-mine",
"ShortcutRegistry:chat +chat-list-mine"
]
},
"chat.shortcut_chat_list_all": {
"agent_summary": "分页拉取我加入的所有群列表",
"use_when": [
"当你想遍历当前用户加入的所有群做统计或批量操作时使用;只读分页返回全部已加入的群列表。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws chat +chat-list-all --limit 50"
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#chat.shortcut_chat_list_all",
"cobra-help:dws chat +chat-list-all",
"ShortcutRegistry:chat +chat-list-all"
]
},
"chat.shortcut_chat_list_join_requests": {
"agent_summary": "分页拉取入群验证记录",
"use_when": [
"当你作为群主/管理员想查看待处理的入群申请时使用;只读分页返回入群验证记录(含 recordId、申请人与邀请人 ID),供后续用 chat-audit-join 审批。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws chat +chat-list-join-requests --limit 30"
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#chat.shortcut_chat_list_join_requests",
"cobra-help:dws chat +chat-list-join-requests",
"ShortcutRegistry:chat +chat-list-join-requests"
]
},
"chat.shortcut_chat_bots": {
"agent_summary": "查看群内所有机器人",
"use_when": [
"当你想查看某个群里已添加了哪些机器人时使用;需传群 openConversationId,只读返回群内机器人列表(含 openBotId,供后续移除)。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws chat +chat-bots --group <openConversationId>"
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#chat.shortcut_chat_bots",
"cobra-help:dws chat +chat-bots",
"ShortcutRegistry:chat +chat-bots"
]
},
"chat.shortcut_chat_set_admin": {
"agent_summary": "设置 / 取消群管理员",
"use_when": [
"当你想把某些成员设为或取消群管理员时使用;会实际变更成员角色,需传群 openConversationId 和成员 userId/openDingTalkId 列表,加 --off 取消管理员。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws chat +chat-set-admin --group <openConversationId> --users userId1,userId2"
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#chat.shortcut_chat_set_admin",
"cobra-help:dws chat +chat-set-admin",
"ShortcutRegistry:chat +chat-set-admin"
]
},
"chat.shortcut_chat_mute": {
"agent_summary": "全员禁言 / 取消全员禁言",
"use_when": [
"当你想对整个群开启或取消全员禁言时使用;会实际切换群的全员禁言状态,需传群 openConversationId,加 --off 取消禁言。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws chat +chat-mute --group <openConversationId>"
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#chat.shortcut_chat_mute",
"cobra-help:dws chat +chat-mute",
"ShortcutRegistry:chat +chat-mute"
]
},
"chat.shortcut_chat_role_list": {
"agent_summary": "拉取会话的群身份列表",
"use_when": [
"当你想查看某群自定义的群身份(如'班长''值日')都有哪些时使用;需传群 openConversationId,只读返回群身份列表及 openRoleId。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws chat +chat-role-list --group <openConversationId>"
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#chat.shortcut_chat_role_list",
"cobra-help:dws chat +chat-role-list",
"ShortcutRegistry:chat +chat-role-list"
]
},
"chat.shortcut_chat_role_add": {
"agent_summary": "添加群身份",
"use_when": [
"当你想在群里新增一个自定义群身份/头衔时使用;会实际创建群身份,需传群 openConversationId 和身份名称。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws chat +chat-role-add --group <openConversationId> --name \"管理员\""
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#chat.shortcut_chat_role_add",
"cobra-help:dws chat +chat-role-add",
"ShortcutRegistry:chat +chat-role-add"
]
},
"chat.shortcut_chat_role_update": {
"agent_summary": "更新群身份名称",
"use_when": [
"当你想重命名已有的群身份时使用;会实际更新身份名称,需传群 openConversationId、身份 openRoleId 和新名称。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws chat +chat-role-update --group <openConversationId> --role-id <openRoleId> --name \"新名称\""
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#chat.shortcut_chat_role_update",
"cobra-help:dws chat +chat-role-update",
"ShortcutRegistry:chat +chat-role-update"
]
},
"chat.shortcut_chat_role_set_user": {
"agent_summary": "设置用户的群身份(覆盖该用户的全部群身份)",
"use_when": [
"当你想为某成员整体设定其在群内的身份时使用;会实际改写该用户的群身份集合(覆盖其原有全部身份),需传群、用户和 openRoleId 列表(传空则清除全部)。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws chat +chat-role-set-user --group <openConversationId> --user <userId> --role-ids roleId1,roleId2"
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#chat.shortcut_chat_role_set_user",
"cobra-help:dws chat +chat-role-set-user",
"ShortcutRegistry:chat +chat-role-set-user"
]
},
"chat.shortcut_chat_role_query_user": {
"agent_summary": "查询群成员的群身份",
"use_when": [
"当你想查看某个群成员当前拥有哪些群身份时使用;只读,需传群 openConversationId 和用户 userId 或 openDingTalkId。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws chat +chat-role-query-user --group <openConversationId> --user <userId>"
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#chat.shortcut_chat_role_query_user",
"cobra-help:dws chat +chat-role-query-user",
"ShortcutRegistry:chat +chat-role-query-user"
]
},
"chat.shortcut_messages_send_by_webhook": {
"agent_summary": "自定义机器人 Webhook 发送群消息",
"use_when": [
"当你只有自定义机器人的 Webhook token、想往其所在群推送消息时使用;会实际通过 Webhook 发群消息,需传 token、标题、正文,可 @手机号/userId 或 @所有人。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws chat +messages-send-by-webhook --token <token> --title \"告警\" --text \"CPU 超 90%\" --at-all"
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#chat.shortcut_messages_send_by_webhook",
"cobra-help:dws chat +messages-send-by-webhook",
"ShortcutRegistry:chat +messages-send-by-webhook"
]
},
"chat.shortcut_messages_list_direct": {
"agent_summary": "拉取单聊会话消息",
"use_when": [
"当你想按时间拉取与某人单聊的历史消息时使用;只读,需传对方 userId 或 openDingTalkId 及起始时间,--forward 控制翻页方向。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws chat +messages-list-direct --user <userId> --time \"2025-03-01 00:00:00\""
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#chat.shortcut_messages_list_direct",
"cobra-help:dws chat +messages-list-direct",
"ShortcutRegistry:chat +messages-list-direct"
]
},
"chat.shortcut_messages_list_unread_conversations": {
"agent_summary": "获取有未读消息的会话列表",
"use_when": [
"当你想快速定位哪些会话还有未读消息时使用;只读返回有未读的会话列表,可用 --exclude-muted 排除已免打扰会话。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws chat +messages-list-unread-conversations --count 20"
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#chat.shortcut_messages_list_unread_conversations",
"cobra-help:dws chat +messages-list-unread-conversations",
"ShortcutRegistry:chat +messages-list-unread-conversations"
]
},
"chat.shortcut_messages_mget": {
"agent_summary": "根据消息 ID 批量查询消息(最多 50 条)",
"use_when": [
"当你已有一批消息 openMsgId、需要批量取回它们的详细内容时使用;只读,一次最多查询 50 条。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws chat +messages-mget --msg-ids msgId1,msgId2"
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#chat.shortcut_messages_mget",
"cobra-help:dws chat +messages-mget",
"ShortcutRegistry:chat +messages-mget"
]
},
"chat.shortcut_messages_query_send_status": {
"agent_summary": "查询消息发送状态",
"use_when": [
"当你发消息后拿到 openTaskId、想确认这条消息是否发送成功时使用;只读返回发送状态,需传 --open-task-id。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws chat +messages-query-send-status --open-task-id <openTaskId>"
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#chat.shortcut_messages_query_send_status",
"cobra-help:dws chat +messages-query-send-status",
"ShortcutRegistry:chat +messages-query-send-status"
]
},
"chat.shortcut_messages_read_status": {
"agent_summary": "查询消息的已读/未读状态",
"use_when": [
"当你想知道自己发出的某条消息有哪些人已读/未读时使用;只读,需传会话 openConversationId 和该消息 openMessageId,可指定目标成员列表。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws chat +messages-read-status --conversation-id <openConversationId> --message-id <openMessageId>"
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#chat.shortcut_messages_read_status",
"cobra-help:dws chat +messages-read-status",
"ShortcutRegistry:chat +messages-read-status"
]
},
"chat.shortcut_messages_update_card": {
"agent_summary": "流式更新卡片内容(最后一次 --flow-status 应为 3)",
"use_when": [
"当你要向已发送的流式卡片持续追加/更新内容时使用;会实际更新卡片,需传 send-card 返回的 bizId、新内容及 flowStatus(最后一次应为 3 表示完成)。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws chat +messages-update-card --biz-id <bizId> --content \"内容\" --flow-status 3"
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#chat.shortcut_messages_update_card",
"cobra-help:dws chat +messages-update-card",
"ShortcutRegistry:chat +messages-update-card"
]
},
"chat.shortcut_messages_list_pin": {
"agent_summary": "拉取会话中钉住的消息列表",
"use_when": [
"当你想查看某会话里当前钉住的消息有哪些时使用;只读分页返回,需传会话 openConversationId。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws chat +messages-list-pin --open-conversation-id <openConversationId>"
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#chat.shortcut_messages_list_pin",
"cobra-help:dws chat +messages-list-pin",
"ShortcutRegistry:chat +messages-list-pin"
]
},
"chat.shortcut_at_me": {
"agent_summary": "查最近 @我 的消息(自动算时间窗,投影发送人/时间/内容/会话)",
"use_when": [
"当你想快速看回最近谁在群里或单聊里 @了你、但不想手动把起止时间换算成毫秒、也不想记 list-mentions 的一堆参数时使用;内部按本地时区算出「最近 N 天」(默认 7 天,可用 --days 调整回溯天数)的时间窗,搜索这段时间内 @我 的消息,再在本地把每条消息投影成发送人、时间、内容、所在会话四个关键字段。这是纯只读操作,只做搜索与本地投影,不会发送、撤回或标记任何消息。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws chat +at-me",
"dws chat +at-me --days 3"
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#chat.shortcut_at_me",
"cobra-help:dws chat +at-me",
"ShortcutRegistry:chat +at-me"
]
},
"chat.shortcut_broadcast": {
"agent_summary": "按姓名逐一给多个人群发同一条单聊消息(自动解析 userId、逐个发送)",
"use_when": [
"当你想把同一条通知一次性单聊发给多位同事、但只知道他们的姓名不想逐个查 userId 时使用;内部把姓名列表逐个解析成唯一用户后,用 openDingTalkId 对每个人单独发一条单聊消息,并汇总成功/失败人数。某个姓名匹配不到人或匹配到多人时,会跳过该人并在结尾报出,不影响其他人收到消息。会真实发出多条消息。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws chat +broadcast --to \"张三,李四,王五\" --text \"今晚 8 点上线,请留意\""
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#chat.shortcut_broadcast",
"cobra-help:dws chat +broadcast",
"ShortcutRegistry:chat +broadcast"
]
},
"chat.shortcut_dm": {
"agent_summary": "按姓名直接给某人发单聊消息(自动解析 userId)",
"use_when": [
"当你只知道对方姓名、想直接发一条单聊消息而不想先查 userId 时使用;内部先按姓名搜通讯录解析出唯一用户,并用其 openDingTalkId 发送,姓名匹配到多人时会列出候选让你区分。会真实发出消息。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws chat +dm --to 张三 --text \"周报发我一下\""
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#chat.shortcut_dm",
"cobra-help:dws chat +dm",
"ShortcutRegistry:chat +dm"
]
},
"chat.shortcut_group_members": {
"agent_summary": "按群名列出群成员(自动搜群解析 openConversationId)",
"use_when": [
"当你只知道群的名字、想看看这个群里有哪些成员,而不想先手动查群 ID 时使用;内部先按群名搜索群聊解析出唯一 openConversationId,再拉取该群的成员列表。群名匹配到多个群时会列出候选让你区分、绝不自行假定。只读,不改动任何数据。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws chat +group-members --group 项目冲刺"
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#chat.shortcut_group_members",
"cobra-help:dws chat +group-members",
"ShortcutRegistry:chat +group-members"
]
},
"chat.shortcut_my_groups": {
"agent_summary": "列出我加入的群,可按类型过滤并投影关键字段",
"use_when": [
"当你想快速看一眼自己都加入了哪些群、以及每个群的会话ID、名称、群主和人数,而不想翻分页或盯着原始返回时使用;内部分页拉取你加入的群列表,把每个群防御式地投影成 会话id / 名称 / 群主 / 人数 / 类型 等关键字段,输出成干净的结果。可选 --type 在本地按群类型过滤(底层接口本身不带类型参数,故为客户端过滤)。这是只读操作,不会改动任何群或成员关系。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws chat +my-groups",
"dws chat +my-groups --type group"
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#chat.shortcut_my_groups",
"cobra-help:dws chat +my-groups",
"ShortcutRegistry:chat +my-groups"
]
},
"chat.shortcut_send_to_group": {
"agent_summary": "按群名直接给群发消息(自动搜群解析 openConversationId)",
"use_when": [
"当你只知道群的名字、想直接往这个群里发一条消息而不想先手动查群 ID 时使用;内部先按群名搜索群聊解析出唯一 openConversationId 再发送,群名匹配到多个群时会列出候选让你区分、绝不自行假定。会真实发出群消息。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws chat +send-to-group --group 项目冲刺 --text \"今天 5 点前提交进度\""
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#chat.shortcut_send_to_group",
"cobra-help:dws chat +send-to-group",
"ShortcutRegistry:chat +send-to-group"
]
},
"chat.shortcut_unread_chats": {
"agent_summary": "列出我有未读消息的会话(投影会话名/未读数/会话ID)",
"use_when": [
"当你想快速看清自己当前有哪些会话还有未读消息、方便逐个处理时使用;内部调用未读会话列表接口,可用 --count 控制返回的会话条数(不传则用服务端默认值),用 --exclude-muted 排除你已设置免打扰的会话;再在本地把每个会话投影成会话名、未读数和会话 ID 三个关键字段。这是纯只读操作,只做列表与本地投影,不会把任何会话标记为已读或未读;若没有未读会话则返回空列表。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws chat +unread-chats",
"dws chat +unread-chats --count 20"
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#chat.shortcut_unread_chats",
"cobra-help:dws chat +unread-chats",
"ShortcutRegistry:chat +unread-chats"
]
}
},
"products": {
@@ -431,6 +431,272 @@
"Wukong-parity:3306c3307",
"live-dws-schema:contact.self_user_profile_update#FAILED"
]
},
"contact.shortcut_list_followings": {
"agent_summary": "获取当前用户的特别关注列表",
"use_when": [
"当你想查看本人在通讯录里「特别关注」的联系人名单(例如常打交道的同事、上级)时使用;无需输入,返回关注对象的用户列表,可用于快速定位这些人的 userId 再发消息或排日程。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws contact +list-followings"
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#contact.shortcut_list_followings",
"cobra-help:dws contact +list-followings",
"ShortcutRegistry:contact +list-followings"
]
},
"contact.shortcut_search_user": {
"agent_summary": "按关键词搜索通讯录用户",
"use_when": [
"当你只知道某人的姓名、花名或部分名字,需要把它解析成 userId 及部门等信息以便后续发消息、排日程或指派任务时使用;输入搜索关键词(--query),返回匹配的用户列表。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws contact +search-user --query \"张三\""
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#contact.shortcut_search_user",
"cobra-help:dws contact +search-user",
"ShortcutRegistry:contact +search-user"
]
},
"contact.shortcut_search_mobile": {
"agent_summary": "按手机号搜索通讯录用户",
"use_when": [
"当你手里只有某人的手机号、需要反查出对应的通讯录用户和 userId 时使用;输入手机号(--mobile),返回该手机号所属的用户信息,适合从电话或名片信息定位到具体员工。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws contact +search-mobile --mobile 13800138000"
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#contact.shortcut_search_mobile",
"cobra-help:dws contact +search-mobile",
"ShortcutRegistry:contact +search-mobile"
]
},
"contact.shortcut_list_roles": {
"agent_summary": "获取企业所有角色(标签)列表",
"use_when": [
"当你想总览企业里都有哪些角色/员工标签(如「管理员」「财务」「销售」)及其角色 ID 时使用;无需输入,返回全量角色列表,常用于按角色圈定人群前先摸清有哪些角色可选。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws contact +list-roles"
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#contact.shortcut_list_roles",
"cobra-help:dws contact +list-roles",
"ShortcutRegistry:contact +list-roles"
]
},
"contact.shortcut_list_role_members": {
"agent_summary": "查询角色下的成员列表",
"use_when": [
"当你已知某个角色 ID、想列出该角色(标签)下的全部成员以便群发通知或统计人群时使用;输入角色 ID(--id),返回该角色下的用户列表,通常先用 +search-role 拿到角色 ID 再调用。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws contact +list-role-members --id 12345"
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#contact.shortcut_list_role_members",
"cobra-help:dws contact +list-role-members",
"ShortcutRegistry:contact +list-role-members"
]
},
"contact.shortcut_list_sub_depts": {
"agent_summary": "查看指定部门的子部门",
"use_when": [
"当你想逐层浏览组织架构、查看某个部门下一级的子部门时使用;输入父部门 ID(--dept,根部门为 1),返回其直属子部门列表,可用于自顶向下遍历部门树。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws contact +list-sub-depts --dept 1"
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#contact.shortcut_list_sub_depts",
"cobra-help:dws contact +list-sub-depts",
"ShortcutRegistry:contact +list-sub-depts"
]
},
"contact.shortcut_list_dept_members": {
"agent_summary": "查看部门成员(仅本部门,不含下级)",
"use_when": [
"当你想列出一个或多个部门本级的员工(不含下级子部门)以便群发通知、统计或指派任务时使用;输入部门 ID 列表(--depts,逗号分隔),返回这些部门下的成员,如需含下级需自行遍历子部门。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws contact +list-dept-members --depts 12345,67890"
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#contact.shortcut_list_dept_members",
"cobra-help:dws contact +list-dept-members",
"ShortcutRegistry:contact +list-dept-members"
]
},
"contact.shortcut_by_mobile": {
"agent_summary": "按手机号查询某人的完整资料(自动解析 userId 后取详情)",
"use_when": [
"当你只知道对方手机号、想一步拿到其完整资料(部门、职位、联系方式、是否管理员等)而不想先按手机号搜出 userId 再单独查详情时使用;内部先用手机号在通讯录里查出对应的 userId,若没有人绑定该手机号会明确报错,再用该 userId 取完整详情。这是纯只读操作,不会修改任何数据。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws contact +by-mobile --mobile 13800138000"
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#contact.shortcut_by_mobile",
"cobra-help:dws contact +by-mobile",
"ShortcutRegistry:contact +by-mobile"
]
},
"contact.shortcut_dept_members": {
"agent_summary": "按部门名列出部门成员(自动解析 deptId)",
"use_when": [
"当你只知道某个部门的名称、想知道该部门里都有哪些成员时使用;内部先按部门名搜索出唯一的 deptId(匹配到 0 个或多个时不猜测,而是列出候选部门名与 deptId 让你选),再打印该部门的直接成员列表(仅本部门,不递归下级部门)。只读,不做任何修改。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws contact +dept-members --dept 技术部"
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#contact.shortcut_dept_members",
"cobra-help:dws contact +dept-members",
"ShortcutRegistry:contact +dept-members"
]
},
"contact.shortcut_lookup": {
"agent_summary": "按姓名查询某人的完整资料(自动解析 userId 后取详情)",
"use_when": [
"当你只知道对方姓名、想一步拿到其完整资料(部门、职位、联系方式等)而不想先搜 userId 再查详情时使用;内部先按姓名搜通讯录解析出唯一 userId,再取详情,姓名匹配到多人时会列出候选让你区分。只读操作。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws contact +lookup --name 张三"
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#contact.shortcut_lookup",
"cobra-help:dws contact +lookup",
"ShortcutRegistry:contact +lookup"
]
},
"contact.shortcut_org": {
"agent_summary": "按姓名查某人所在部门的详情(自动解析 userId 与 deptId)",
"use_when": [
"当你只知道某位同事的姓名、想知道 TA 所在部门(部门ID、名称、人数)时使用;内部先按姓名解析出唯一 userId,再取 TA 的组织信息拿到主部门 deptId,最后打印该部门的详情。只读,不做任何修改。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws contact +org --name 张三"
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#contact.shortcut_org",
"cobra-help:dws contact +org",
"ShortcutRegistry:contact +org"
]
},
"contact.shortcut_resolve_dept": {
"agent_summary": "按名称搜索部门并解析出唯一 deptId(只读)",
"use_when": [
"当你只知道某个部门的名称(或名称里的关键词)、想把它解析成可直接用于后续工具的 deptId 时使用;内部按 --name 关键词调用 search_dept_by_keyword 搜索部门,再在本地投影出每个候选的 deptId 和 name。如果只命中一个部门就直接返回它的 deptId;如果命中多个则列出全部候选让你消歧,绝不替你瞎猜;如果一个都没命中则提示未找到。这是纯只读操作,只做搜索与本地投影,不会修改任何部门,也不会列出部门成员。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws contact +resolve-dept --name 技术部"
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#contact.shortcut_resolve_dept",
"cobra-help:dws contact +resolve-dept",
"ShortcutRegistry:contact +resolve-dept"
]
},
"contact.shortcut_team": {
"agent_summary": "按姓名列出某人所在部门的成员(自动解析 userId 与 deptId)",
"use_when": [
"当你只知道某位同事的姓名、想知道 TA 所在部门里都有哪些成员时使用;内部先按姓名解析出唯一 userId,再取 TA 的组织信息拿到主部门 deptId,最后打印该部门的直接成员列表(仅本部门,不递归下级部门)。只读,不做任何修改。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws contact +team --name 张三"
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#contact.shortcut_team",
"cobra-help:dws contact +team",
"ShortcutRegistry:contact +team"
]
},
"contact.shortcut_me": {
"agent_summary": "查看我自己的通讯录资料(姓名/userId/手机/部门/组织,干净投影)",
"use_when": [
"当你(或 AI agent)需要知道「我是谁」——我自己的 userId、姓名、所在部门、组织、手机号,用于后续按名解析他人前先确定自己身份、或填充发起人信息时使用;内部调用零参数的 get_current_user_profile(永远是「我」,无需传姓名),再把冗长的原始资料投影成 {name,userId,mobile,dept,org,email} 几个关键字段。这是纯只读操作,不修改任何资料。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws contact +me"
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#contact.shortcut_me",
"cobra-help:dws contact +me",
"ShortcutRegistry:contact +me"
]
}
},
"products": {
@@ -0,0 +1,391 @@
{
"version": 1,
"source": {
"kind": "explicit",
"name": "dws-agent-selection/devapp",
"repository": "DingTalk-Real-AI/dingtalk-workspace-cli",
"channel": "open-source",
"reviewed": true
},
"tools": {
"devapp.shortcut_list": {
"agent_summary": "查询开放平台企业内部应用列表",
"use_when": [
"当你要在开发者后台盘点或定位某个企业内部应用(例如按应用名、appKey、创建人或机器人名搜索,拿到其 unifiedAppId 以便后续查看详情、配置或发布)时使用;支持关键词过滤、排序和分页,返回应用列表。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws devapp +list"
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#devapp.shortcut_list",
"cobra-help:dws devapp +list",
"ShortcutRegistry:devapp +list"
]
},
"devapp.shortcut_get": {
"agent_summary": "查询开放平台企业内部应用详情",
"use_when": [
"当你已知某应用的 unifiedAppId、需要查看它的完整配置信息(如名称、描述、图标、能力开关等)以便核对现状或作为修改前的依据时使用;输入 unifiedAppId,返回单个应用的详情。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws devapp +get --unified-app-id <UNIFIED_APP_ID>"
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#devapp.shortcut_get",
"cobra-help:dws devapp +get",
"ShortcutRegistry:devapp +get"
]
},
"devapp.shortcut_create": {
"agent_summary": "创建开放平台企业内部应用",
"use_when": [
"当你要在开放平台从零新建一个企业内部应用(H5/机器人等的载体)时使用;传入应用名称、可选描述与图标 mediaId,会实际创建出一个新应用并返回其 unifiedAppId 供后续配置。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws devapp +create --name <NAME>"
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#devapp.shortcut_create",
"cobra-help:dws devapp +create",
"ShortcutRegistry:devapp +create"
]
},
"devapp.shortcut_update": {
"agent_summary": "修改开放平台企业内部应用基础信息",
"use_when": [
"当你要改动一个已存在应用的基础信息(更名、改描述或换图标)时使用;指定 unifiedAppId 及要更新的字段,会实际写回并覆盖对应的应用基础资料。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws devapp +update --unified-app-id <UNIFIED_APP_ID>"
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#devapp.shortcut_update",
"cobra-help:dws devapp +update",
"ShortcutRegistry:devapp +update"
]
},
"devapp.shortcut_delete": {
"agent_summary": "删除开放平台企业内部应用(不可逆)",
"use_when": [
"当你确认要彻底废弃某个企业内部应用时使用;传入 unifiedAppId 会真实且不可逆地删除该应用及其配置,执行前务必确认无误。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws devapp +delete --unified-app-id <UNIFIED_APP_ID>"
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#devapp.shortcut_delete",
"cobra-help:dws devapp +delete",
"ShortcutRegistry:devapp +delete"
]
},
"devapp.shortcut_enable": {
"agent_summary": "启用开放平台企业内部应用",
"use_when": [
"当某个应用处于停用状态、你要让它重新生效可用时使用;传入 unifiedAppId 会实际将应用状态切换为启用。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws devapp +enable --unified-app-id <UNIFIED_APP_ID>"
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#devapp.shortcut_enable",
"cobra-help:dws devapp +enable",
"ShortcutRegistry:devapp +enable"
]
},
"devapp.shortcut_disable": {
"agent_summary": "停用开放平台企业内部应用",
"use_when": [
"当你要临时下线某个应用、让它对用户不可用又不删除时使用;传入 unifiedAppId 会实际将应用状态切换为停用,可日后再启用恢复。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws devapp +disable --unified-app-id <UNIFIED_APP_ID>"
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#devapp.shortcut_disable",
"cobra-help:dws devapp +disable",
"ShortcutRegistry:devapp +disable"
]
},
"devapp.shortcut_webapp_get": {
"agent_summary": "查询网页应用配置",
"use_when": [
"当你要查看某应用的网页(H5)能力现状,如移动端/PC 首页地址、管理后台地址等,以便核对或作为改配置前的参考时使用;输入 unifiedAppId,返回当前网页应用配置。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws devapp +webapp-get --unified-app-id <UNIFIED_APP_ID>"
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#devapp.shortcut_webapp_get",
"cobra-help:dws devapp +webapp-get",
"ShortcutRegistry:devapp +webapp-get"
]
},
"devapp.shortcut_webapp_config": {
"agent_summary": "配置网页应用能力",
"use_when": [
"当你要为应用开通或调整网页(H5)入口,如设置移动端/PC 端首页 URL、管理后台地址或页面类型时使用;指定 unifiedAppId 及相应地址,会实际写入该应用的网页应用配置。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws devapp +webapp-config --unified-app-id <UNIFIED_APP_ID>"
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#devapp.shortcut_webapp_config",
"cobra-help:dws devapp +webapp-config",
"ShortcutRegistry:devapp +webapp-config"
]
},
"devapp.shortcut_permission_list": {
"agent_summary": "查询开放平台应用权限列表",
"use_when": [
"当你要查看某应用已申请/可申请的 API 权限点及其授权状态(用于排查接口报权限错、或确认某 scopeValue 是否已开通)时使用;可按关键词、scopeValue、授权状态等过滤,返回权限点列表。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws devapp +permission-list --unified-app-id <UNIFIED_APP_ID>"
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#devapp.shortcut_permission_list",
"cobra-help:dws devapp +permission-list",
"ShortcutRegistry:devapp +permission-list"
]
},
"devapp.shortcut_member_list": {
"agent_summary": "查询开放平台应用成员",
"use_when": [
"当你要查看某应用有哪些成员及其角色(如谁是开发者/管理员),用于核对协作人员或权限归属时使用;输入 unifiedAppId,返回成员列表。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws devapp +member-list --unified-app-id <UNIFIED_APP_ID>"
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#devapp.shortcut_member_list",
"cobra-help:dws devapp +member-list",
"ShortcutRegistry:devapp +member-list"
]
},
"devapp.shortcut_member_add": {
"agent_summary": "添加开放平台应用成员",
"use_when": [
"当你要给某应用增加协作人员(如把某人加为开发者)时使用;传入 unifiedAppId、userId 列表和成员类型(如 DEVELOPER),会实际把这些人加入应用成员并赋予对应角色。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws devapp +member-add --unified-app-id <UNIFIED_APP_ID> --user-ids <VALUES> --member-type <MEMBER_TYPE>"
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#devapp.shortcut_member_add",
"cobra-help:dws devapp +member-add",
"ShortcutRegistry:devapp +member-add"
]
},
"devapp.shortcut_member_remove": {
"agent_summary": "移除开放平台应用成员",
"use_when": [
"当某人离职或不再参与、你要取消其对应用的访问/协作权限时使用;传入 unifiedAppId、userId 列表和成员类型,会实际把这些人从应用成员中移除。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws devapp +member-remove --unified-app-id <UNIFIED_APP_ID> --user-ids <VALUES> --member-type <MEMBER_TYPE>"
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#devapp.shortcut_member_remove",
"cobra-help:dws devapp +member-remove",
"ShortcutRegistry:devapp +member-remove"
]
},
"devapp.shortcut_robot_get": {
"agent_summary": "查询现有应用的机器人配置",
"use_when": [
"当你要查看某应用已有的机器人配置(名称、回调地址、模式 HTTPS/STREAM/AISKILL、技能等)以核对现状或作为改配置前的依据时使用;输入 unifiedAppId,返回当前机器人配置。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws devapp +robot-get --unified-app-id <UNIFIED_APP_ID>"
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#devapp.shortcut_robot_get",
"cobra-help:dws devapp +robot-get",
"ShortcutRegistry:devapp +robot-get"
]
},
"devapp.shortcut_event_list": {
"agent_summary": "查询应用已订阅的事件列表",
"use_when": [
"当你要确认某应用当前订阅了哪些事件回调(用于排查漏收事件、或退订前先查事件码)时使用;输入 unifiedAppId,可按事件码/名称关键词过滤并分页,返回已订阅事件列表。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws devapp +event-list --unified-app-id <UNIFIED_APP_ID>"
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#devapp.shortcut_event_list",
"cobra-help:dws devapp +event-list",
"ShortcutRegistry:devapp +event-list"
]
},
"devapp.shortcut_version_list": {
"agent_summary": "分页查询应用版本列表",
"use_when": [
"当你要查看某应用的历史版本(找某个 versionId、看各版本发布状态或回顾迭代记录)时使用;输入 unifiedAppId 并分页,返回版本列表。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws devapp +version-list --unified-app-id <UNIFIED_APP_ID>"
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#devapp.shortcut_version_list",
"cobra-help:dws devapp +version-list",
"ShortcutRegistry:devapp +version-list"
]
},
"devapp.shortcut_version_get": {
"agent_summary": "查询指定版本详情",
"use_when": [
"当你已知某个 versionId、要查看该版本的具体内容(版本号、描述、包含的配置等)以核对发布内容时使用;输入 unifiedAppId 和 versionId,返回单个版本的详情。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws devapp +version-get --unified-app-id <UNIFIED_APP_ID> --version-id <VERSION_ID>"
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#devapp.shortcut_version_get",
"cobra-help:dws devapp +version-get",
"ShortcutRegistry:devapp +version-get"
]
},
"devapp.shortcut_version_check_approval": {
"agent_summary": "预检版本发布是否需要审批(不实际发布)",
"use_when": [
"当你在正式发布某版本前想先确认它是否会触发审批、是否含高敏权限等发布前置要求时使用;传入 unifiedAppId 和 versionId,仅做预检返回审批要求,不会真正发布。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws devapp +version-check-approval --unified-app-id <UNIFIED_APP_ID> --version-id <VERSION_ID>"
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#devapp.shortcut_version_check_approval",
"cobra-help:dws devapp +version-check-approval",
"ShortcutRegistry:devapp +version-check-approval"
]
},
"devapp.shortcut_version_status": {
"agent_summary": "查询版本发布/审批状态",
"use_when": [
"当你已提交发布、想跟进某版本当前处于什么阶段(审批中、已发布、被驳回等)时使用;输入 unifiedAppId 和 versionId,返回该版本的发布/审批状态。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws devapp +version-status --unified-app-id <UNIFIED_APP_ID> --version-id <VERSION_ID>"
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#devapp.shortcut_version_status",
"cobra-help:dws devapp +version-status",
"ShortcutRegistry:devapp +version-status"
]
}
},
"products": {
"devapp": {
"agent_summary": "管理钉钉开放平台企业内部应用、成员、权限、机器人、事件与版本",
"use_when": [
"请求涉及企业内部应用的查询、创建、配置、成员权限、机器人、事件订阅或版本管理"
],
"avoid_when": [
"开放平台接口文档搜索使用 devdoc;普通钉钉业务数据使用对应产品命令"
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the public devapp Shortcut surface; product routing does not alter command identity, parameters, or runtime safety.",
"source_refs": [
"internal/cli/schema_command_registry.json",
"internal/shortcut/devapp",
"CommandRegistry:product=devapp"
]
}
}
}
@@ -58,6 +58,82 @@
"skills/mono/references/products/ding.md",
"live-dws-schema:ding.send_ding_message"
]
},
"ding.shortcut_list": {
"agent_summary": "查询 DING 消息列表",
"use_when": [
"当你想查看当前身份收到或发出的 DING 消息、回顾有哪些强提醒或获取某条 DING 的 openDingId 以便后续查已读或撤回时使用;可选按类型过滤并用 cursor 翻页,只读不产生副作用。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws ding +list"
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#ding.shortcut_list",
"cobra-help:dws ding +list",
"ShortcutRegistry:ding +list"
]
},
"ding.shortcut_receiver_status": {
"agent_summary": "查询 DING 消息接收人已读状态",
"use_when": [
"当你发出一条 DING 后想确认每位接收人是否已读、追踪谁还没看到以便催办时使用;需提供该 DING 的 openDingId,返回各接收人的已读/未读状态,只读操作。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws ding +receiver-status --ding-id <DING_ID>"
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#ding.shortcut_receiver_status",
"cobra-help:dws ding +receiver-status",
"ShortcutRegistry:ding +receiver-status"
]
},
"ding.shortcut_send_personal": {
"agent_summary": "以本人身份发送 DING 给指定人",
"use_when": [
"当你想以自己(而非机器人)的身份直接给某些同事发 DING 强提醒,让对方看到是本人发起时使用;需提供接收人的 openDingTalkId 列表和内容,可选提醒方式与幂等 uuid,会真实向这些人发出 DING。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws ding +send-personal --users <VALUES> --content <CONTENT>"
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#ding.shortcut_send_personal",
"cobra-help:dws ding +send-personal",
"ShortcutRegistry:ding +send-personal"
]
},
"ding.shortcut_recall_personal": {
"agent_summary": "撤回本人发起的 DING",
"use_when": [
"当你以本人身份发出的某条 DING 发错人或内容有误、想收回时使用(对应 send-personal/send-by-message 发出的 DING);需提供该 DING 的 openDingId,会真实撤回它,接收人将不再看到该提醒。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws ding +recall-personal --id <ID>"
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#ding.shortcut_recall_personal",
"cobra-help:dws ding +recall-personal",
"ShortcutRegistry:ding +recall-personal"
]
}
},
"products": {
@@ -896,6 +896,334 @@
"structured-hint:internal/cli/schema_hints/products/doc.json",
"live-mcp:dws schema doc.save_doc_version"
]
},
"doc.shortcut_search": {
"agent_summary": "按关键词搜索有权限的文档 (不传则返回最近访问)",
"use_when": [
"当你只记得文档的标题或主题词、需要先定位到某篇钉钉文档拿到它的 nodeId/URL 以便后续阅读或编辑时使用;可按关键词、扩展名、创建/访问时间、创建者等条件过滤,不传关键词则返回最近访问的文档,返回匹配的文档列表。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws doc +search --query \"会议纪要\"",
"dws doc +search --extensions pdf,docx"
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#doc.shortcut_search",
"cobra-help:dws doc +search",
"ShortcutRegistry:doc +search"
]
},
"doc.shortcut_list": {
"agent_summary": "列出文件夹或知识库下的直接子节点",
"use_when": [
"当你已知某个文档文件夹或知识库的 ID、想浏览它下面直接包含的文档与子文件夹(不递归深层)以便逐层导航时使用;输入 folder 或 workspace,返回该层级的子节点列表。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws doc +list --folder DOC_FOLDER_NODE_ID",
"dws doc +list --workspace WS_ID --limit 20"
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#doc.shortcut_list",
"cobra-help:dws doc +list",
"ShortcutRegistry:doc +list"
]
},
"doc.shortcut_copy": {
"agent_summary": "复制文档/文件到指定文件夹或知识库",
"use_when": [
"当你想保留原件、在另一个文件夹或知识库里生成一份文档/文件副本(例如以某篇文档为模板另存)时使用;输入源 node 与目标 folder/workspace,会实际创建一个副本。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws doc +copy --node DOC_ID --folder TARGET_FOLDER_NODE_ID"
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#doc.shortcut_copy",
"cobra-help:dws doc +copy",
"ShortcutRegistry:doc +copy"
]
},
"doc.shortcut_move": {
"agent_summary": "移动文档/文件到指定文件夹或知识库",
"use_when": [
"当你要整理文档归属、把某篇文档/文件从当前位置挪到另一个文件夹或知识库(原位置不再保留)时使用;输入 node 与目标 folder/workspace,会实际改变文件的存放位置。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws doc +move --node DOC_ID --folder TARGET_FOLDER_NODE_ID"
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#doc.shortcut_move",
"cobra-help:dws doc +move",
"ShortcutRegistry:doc +move"
]
},
"doc.shortcut_comment_list": {
"agent_summary": "查询文档评论列表",
"use_when": [
"当你想查看某篇文档上已有的评论、了解有哪些反馈或待处理意见(可按全文/划词、已解决/未解决过滤)时使用;输入 node,返回评论列表及其 commentKey 以便后续回复。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws doc +comment-list --node DOC_ID",
"dws doc +comment-list --node DOC_ID --type inline --resolve-status unresolved"
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#doc.shortcut_comment_list",
"cobra-help:dws doc +comment-list",
"ShortcutRegistry:doc +comment-list"
]
},
"doc.shortcut_comment_create": {
"agent_summary": "在文档上创建一条评论",
"use_when": [
"当你想对整篇文档留一条全文评论、给出反馈或 @ 相关同事时使用;输入 node 与评论 content(可带 mention),会实际在文档上发布一条新评论。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws doc +comment-create --node DOC_ID --content \"这里需要修改\""
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#doc.shortcut_comment_create",
"cobra-help:dws doc +comment-create",
"ShortcutRegistry:doc +comment-create"
]
},
"doc.shortcut_comment_reply": {
"agent_summary": "回复文档中的一条评论",
"use_when": [
"当你要针对某条已有评论进行回复、参与讨论或用表情贴图回应时使用;先从评论列表拿到 comment-key,再输入 node、comment-key 与 content(--emoji 则作为表情回复),会实际发布一条回复。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws doc +comment-reply --node DOC_ID --comment-key COMMENT_KEY --content \"同意\""
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#doc.shortcut_comment_reply",
"cobra-help:dws doc +comment-reply",
"ShortcutRegistry:doc +comment-reply"
]
},
"doc.shortcut_export_submit": {
"agent_summary": "提交在线文档导出任务 (docx/markdown/pdf),返回 jobId",
"use_when": [
"当你想把在线文档导出成 docx/markdown/pdf 文件(例如离线保存或外发)时使用;这是异步任务的第一步,输入 node 与 export-format 提交导出,返回 jobId,随后用 +export-get 轮询结果。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws doc +export-submit --node DOC_ID --export-format markdown"
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#doc.shortcut_export_submit",
"cobra-help:dws doc +export-submit",
"ShortcutRegistry:doc +export-submit"
]
},
"doc.shortcut_export_get": {
"agent_summary": "根据 jobId 查询文档导出任务结果",
"use_when": [
"当你已用 +export-submit 提交了导出任务、想查询它是否完成并拿到导出文件的下载链接时使用;输入上一步返回的 job-id,返回任务状态与结果。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws doc +export-get --job-id JOB_ID"
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#doc.shortcut_export_get",
"cobra-help:dws doc +export-get",
"ShortcutRegistry:doc +export-get"
]
},
"doc.shortcut_version_save": {
"agent_summary": "手动保存文档版本快照",
"use_when": [
"当你在做重大改动前后、想手动打一个可回滚的版本存档点时使用;输入 node,会实际为该文档保存一个当前内容的历史版本快照。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws doc +version-save --node DOC_ID"
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#doc.shortcut_version_save",
"cobra-help:dws doc +version-save",
"ShortcutRegistry:doc +version-save"
]
},
"doc.shortcut_version_list": {
"agent_summary": "查看文档历史版本列表",
"use_when": [
"当你想查看某篇文档有哪些历史版本、以便挑一个版本号用于回滚时使用;输入 node,返回历史版本列表及其版本号。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws doc +version-list --node DOC_ID"
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#doc.shortcut_version_list",
"cobra-help:dws doc +version-list",
"ShortcutRegistry:doc +version-list"
]
},
"doc.shortcut_version_revert": {
"agent_summary": "回滚文档到指定历史版本",
"use_when": [
"当文档被误改、你想把它整体恢复到某个历史版本时使用;先用 +version-list 找到目标版本号,再输入 node 与 version,会实际把文档内容覆盖回该版本,属于高风险写操作,需谨慎确认。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws doc +version-revert --node DOC_ID --version 3"
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#doc.shortcut_version_revert",
"cobra-help:dws doc +version-revert",
"ShortcutRegistry:doc +version-revert"
]
},
"doc.shortcut_template_list": {
"agent_summary": "获取文档模板列表",
"use_when": [
"当你想基于模板新建文档、需要先浏览可用的模板(自己的 MY 或公共 PUBLIC)并拿到 templateId 时使用;返回模板列表,随后可配合 +template-apply 套用。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws doc +template-list --source PUBLIC"
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#doc.shortcut_template_list",
"cobra-help:dws doc +template-list",
"ShortcutRegistry:doc +template-list"
]
},
"doc.shortcut_template_search": {
"agent_summary": "根据关键词搜索文档模板",
"use_when": [
"当模板较多、你想按关键词(如“周报”“合同”)快速找到合适的模板并拿到 templateId 时使用;输入 query,返回匹配的模板列表,随后可配合 +template-apply 套用。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws doc +template-search --query \"周报\""
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#doc.shortcut_template_search",
"cobra-help:dws doc +template-search",
"ShortcutRegistry:doc +template-search"
]
},
"doc.shortcut_doc_append": {
"agent_summary": "在文档末尾追加一段文本(安全追加,不改动原有内容)",
"use_when": [
"当你只想往一篇钉钉文档的最后面补一段文字、又不想动原有内容时使用;内部用文档更新的“追加(append)”模式,把你给的文本安全地拼到文档末尾,不需要你先去查文档块列表、算末尾位置或手工拼块结构。会真实写入文档内容。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws doc +doc-append --doc DOC_ID --text \"补充说明:本方案已评审通过。\"",
"dws doc +doc-append --doc \"https://alidocs.dingtalk.com/i/nodes/<DOC_UUID>\" --text \"追加一行备注\""
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#doc.shortcut_doc_append",
"cobra-help:dws doc +doc-append",
"ShortcutRegistry:doc +doc-append"
]
},
"doc.shortcut_find_doc": {
"agent_summary": "按关键词搜索云文档并投影关键字段(只读)",
"use_when": [
"当你只记得云文档标题或内容里的某个关键词,想快速按关键词找到匹配的文档、拿到它的标题、URL、类型和 token 以便后续查看或编辑,却不想拿到一大坨原始字段时使用;内部调用云文档的 search_documents 工具,把 --query 作为搜索关键词(keyword),可选地用 --limit 限制返回条数(pageSize),再在本地把每条命中结果精简为「标题、URL、类型、token」四个字段后打印。这是纯只读操作,只做搜索与本地投影,不会创建、修改或删除任何文档;未命中时提示「没搜到文档」。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws doc +find-doc --query 季度汇报",
"dws doc +find-doc --query 合同 --limit 10"
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#doc.shortcut_find_doc",
"cobra-help:dws doc +find-doc",
"ShortcutRegistry:doc +find-doc"
]
},
"doc.shortcut_share_doc": {
"agent_summary": "按姓名把文档链接私信发给某人(自动解析 userId)",
"use_when": [
"当你手上已经有一个文档链接、想直接私信发给某个人而不必先查 userId 时使用;内部先按姓名搜通讯录解析出唯一用户,再用 openDingTalkId 把链接拼成一条 Markdown 消息发出去,姓名匹配到多人时会列出候选让你区分。只发链接、不读取或改动文档本身,会真实发出消息。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws doc +share-doc --to 张三 --url https://docs.dingtalk.com/xxx --note \"帮忙过一下\""
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#doc.shortcut_share_doc",
"cobra-help:dws doc +share-doc",
"ShortcutRegistry:doc +share-doc"
]
}
},
"products": {
@@ -621,6 +621,142 @@
"structured-hint:internal/cli/schema_hints/products/drive.json",
"live-mcp:none (Cobra+Skill; composite/unpinned)"
]
},
"drive.shortcut_info": {
"agent_summary": "获取钉盘文件/文件夹元数据",
"use_when": [
"当你已经知道某个节点的 dentryUuid、想查看它的详细信息(名称、大小、类型、创建/修改时间、所属空间等)而不是仅列表概览时使用;输入 node(节点 ID),返回该单个文件或文件夹的完整元数据。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws drive +info --node <dentryUuid>"
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#drive.shortcut_info",
"cobra-help:dws drive +info",
"ShortcutRegistry:drive +info"
]
},
"drive.shortcut_search": {
"agent_summary": "搜索钉盘文件",
"use_when": [
"当你只记得文件名或内容关键词、不知道它在哪个目录时用它全局检索钉盘文件;输入 query,可按文件类型、扩展名、创建者、创建/修改时间范围过滤,返回匹配文件及其 ID,便于再做下载或整理。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws drive +search --query \"季度汇报\"",
"dws drive +search --query \"合同\" --target file --extensions pdf,docx"
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#drive.shortcut_search",
"cobra-help:dws drive +search",
"ShortcutRegistry:drive +search"
]
},
"drive.shortcut_search_docs": {
"agent_summary": "搜索文档空间文档",
"use_when": [
"当你只记得文档标题或关键词、想在文档空间/知识库中检索在线文档(区别于 +search 检索钉盘文件)时使用;输入 query 关键词,返回匹配的文档及其节点信息。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws drive +search-docs --query \"季度汇报\""
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#drive.shortcut_search_docs",
"cobra-help:dws drive +search-docs",
"ShortcutRegistry:drive +search-docs"
]
},
"drive.shortcut_copy": {
"agent_summary": "复制文件/文档到指定位置",
"use_when": [
"当你想保留原件、把某个文件/文档拷贝一份到指定文件夹或知识库时使用;输入源节点 node 及目标 folder/workspace,会实际生成一个副本,原文件位置不变。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws drive +copy --node <nodeId> --folder <targetFolderId>"
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#drive.shortcut_copy",
"cobra-help:dws drive +copy",
"ShortcutRegistry:drive +copy"
]
},
"drive.shortcut_move": {
"agent_summary": "移动文件/文档到指定位置",
"use_when": [
"当你要把某个文件/文档从当前位置转移到另一个文件夹或知识库(整理归档、调整目录结构)时使用;输入源节点 node 及目标 folder/workspace,会实际改变文件所在位置,原位置不再保留该文件。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws drive +move --node <nodeId> --folder <targetFolderId>"
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#drive.shortcut_move",
"cobra-help:dws drive +move",
"ShortcutRegistry:drive +move"
]
},
"drive.shortcut_recent": {
"agent_summary": "获取最近访问/编辑的文档列表",
"use_when": [
"当你想快速找回「我最近看过/改过的那个文档」而不记得它放在哪时使用;可按操作类型(最近访问/最近编辑)和创建人(全部/我创建/他人创建)过滤,返回近期文档列表及其节点信息。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws drive +recent",
"dws drive +recent --operate-type 1 --creator-type 1"
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#drive.shortcut_recent",
"cobra-help:dws drive +recent",
"ShortcutRegistry:drive +recent"
]
},
"drive.shortcut_find_file": {
"agent_summary": "按名称关键词搜索钉盘文件并投影关键字段(只读)",
"use_when": [
"当你只记得钉盘文件的名字(或其中一部分),想快速按文件名关键词找到它、拿到它的 dentryId 以便后续下载/查看,却不想手动翻目录或写复杂过滤条件时使用;内部调用钉盘的 search_files 工具,把 --query 作为文件名关键词(keyword) 并限定搜索范围为钉盘文件(searchTarget=file),再在本地把每条命中结果精简为「文件名、类型、dentryId、大小」四个字段后打印。这是纯只读操作,只做搜索与本地投影,不会创建、移动或删除任何文件;未命中时返回空列表。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws drive +find-file --query 季度汇报",
"dws drive +find-file --query 合同"
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#drive.shortcut_find_file",
"cobra-help:dws drive +find-file",
"ShortcutRegistry:drive +find-file"
]
}
},
"products": {
@@ -0,0 +1,258 @@
{
"version": 1,
"source": {
"kind": "explicit",
"name": "dws-agent-selection/hrbrain",
"repository": "DingTalk-Real-AI/dingtalk-workspace-cli",
"channel": "open-source",
"reviewed": true
},
"tools": {
"hrbrain.list_talent_pools": {
"agent_summary": "查询人才池列表,支持按名称关键词、类型、创建人、标签筛选",
"use_when": [
"需要列出组织中的人才池,或按名称/类型/创建人/标签筛选人才池时"
],
"avoid_when": [
"已知 poolCode 只需要单个人才池详情时改用 dws hrbrain talent-pool detail",
"要查看人才池内人员名单时改用 dws hrbrain talent-pool employees"
],
"examples": [
"dws hrbrain talent-pool list --page 1 --page-size 20",
"dws hrbrain talent-pool list --keyword \"储备干部\""
],
"reviewed": true,
"review_reason": "依据 reviewed CommandRegistry、真实 Cobra help 与 mono/multi Skill 选型审阅。",
"source_refs": [
"CommandRegistry:canonical_path=hrbrain.list_talent_pools",
"cobra-help:dws hrbrain talent-pool list",
"Skill:skills/mono/references/products/hrbrain.md",
"Skill:skills/multi/dingtalk-hrbrain/SKILL.md"
]
},
"hrbrain.get_talent_pool_detail": {
"agent_summary": "根据人才池编码获取人才池详细信息",
"use_when": [
"已知 poolCode,需要查看某个人才池的详细信息时"
],
"avoid_when": [
"尚未取得 poolCode 时先用 dws hrbrain talent-pool list 查找"
],
"examples": [
"dws hrbrain talent-pool detail --pool-code POOL_CODE"
],
"reviewed": true,
"review_reason": "依据 reviewed CommandRegistry、真实 Cobra help 与 mono/multi Skill 选型审阅。",
"source_refs": [
"CommandRegistry:canonical_path=hrbrain.get_talent_pool_detail",
"cobra-help:dws hrbrain talent-pool detail",
"Skill:skills/mono/references/products/hrbrain.md",
"Skill:skills/multi/dingtalk-hrbrain/SKILL.md"
]
},
"hrbrain.list_pool_employees": {
"agent_summary": "查询指定人才池内的人员列表",
"use_when": [
"已知 poolCode,需要查看该人才池内的人员名单时"
],
"avoid_when": [
"尚未取得 poolCode 时先用 dws hrbrain talent-pool list 查找",
"不限定人才池的人员搜索请改用 dws hrbrain search employees"
],
"examples": [
"dws hrbrain talent-pool employees --pool-code POOL_CODE --page 1 --page-size 20"
],
"reviewed": true,
"review_reason": "依据 reviewed CommandRegistry、真实 Cobra help 与 mono/multi Skill 选型审阅。",
"source_refs": [
"CommandRegistry:canonical_path=hrbrain.list_pool_employees",
"cobra-help:dws hrbrain talent-pool employees",
"Skill:skills/mono/references/products/hrbrain.md",
"Skill:skills/multi/dingtalk-hrbrain/SKILL.md"
]
},
"hrbrain.get_profile_metadata": {
"agent_summary": "查询员工档案元数据结构,用于构造档案数据查询参数",
"use_when": [
"需要先了解某员工档案有哪些模块/字段,以构造 hrbrain profile query 的 --data-queries 参数时"
],
"avoid_when": [
"已知模块与字段编码,直接查询档案数据时改用 dws hrbrain profile query"
],
"examples": [
"dws hrbrain profile metadata --work-no WORK_NO"
],
"reviewed": true,
"review_reason": "依据 reviewed CommandRegistry、真实 Cobra help 与 mono/multi Skill 选型审阅。",
"source_refs": [
"CommandRegistry:canonical_path=hrbrain.get_profile_metadata",
"cobra-help:dws hrbrain profile metadata",
"Skill:skills/mono/references/products/hrbrain.md",
"Skill:skills/multi/dingtalk-hrbrain/SKILL.md"
]
},
"hrbrain.query_profile_data": {
"agent_summary": "按模块批量查询员工档案数据",
"use_when": [
"已知模块与字段编码(通常先用 hrbrain profile metadata 获取),需要批量查询员工档案数据时"
],
"avoid_when": [
"尚不清楚可查询的模块/字段时先用 dws hrbrain profile metadata",
"只需要职业历程或绩效记录时改用 dws hrbrain profile career / profile performance"
],
"examples": [
"dws hrbrain profile query --work-no WORK_NO --data-queries '[{\"modelCode\":\"basic\",\"fields\":[\"name\",\"dept\"]}]'"
],
"reviewed": true,
"review_reason": "依据 reviewed CommandRegistry、真实 Cobra help 与 mono/multi Skill 选型审阅。",
"source_refs": [
"CommandRegistry:canonical_path=hrbrain.query_profile_data",
"cobra-help:dws hrbrain profile query",
"Skill:skills/mono/references/products/hrbrain.md",
"Skill:skills/multi/dingtalk-hrbrain/SKILL.md"
]
},
"hrbrain.get_profile_label": {
"agent_summary": "根据员工工号列表获取员工标签",
"use_when": [
"需要按一个或多个工号批量查看员工标签时"
],
"avoid_when": [
"要查看职业历程或绩效记录时改用 dws hrbrain profile career / profile performance"
],
"examples": [
"dws hrbrain profile labels --staff-ids WORK_NO1,WORK_NO2"
],
"reviewed": true,
"review_reason": "依据 reviewed CommandRegistry、真实 Cobra help 与 mono/multi Skill 选型审阅。",
"source_refs": [
"CommandRegistry:canonical_path=hrbrain.get_profile_label",
"cobra-help:dws hrbrain profile labels",
"Skill:skills/mono/references/products/hrbrain.md",
"Skill:skills/multi/dingtalk-hrbrain/SKILL.md"
]
},
"hrbrain.get_employee_career": {
"agent_summary": "查询员工在公司内的职业历程",
"use_when": [
"需要查看某员工在公司内的岗位/职级变动历史时"
],
"avoid_when": [
"要查看绩效记录时改用 dws hrbrain profile performance"
],
"examples": [
"dws hrbrain profile career --work-no WORK_NO"
],
"reviewed": true,
"review_reason": "依据 reviewed CommandRegistry、真实 Cobra help 与 mono/multi Skill 选型审阅。",
"source_refs": [
"CommandRegistry:canonical_path=hrbrain.get_employee_career",
"cobra-help:dws hrbrain profile career",
"Skill:skills/mono/references/products/hrbrain.md",
"Skill:skills/multi/dingtalk-hrbrain/SKILL.md"
]
},
"hrbrain.get_employee_performance": {
"agent_summary": "查询员工绩效记录",
"use_when": [
"需要查看某员工的历史绩效评级/记录时"
],
"avoid_when": [
"要查看职业历程时改用 dws hrbrain profile career"
],
"examples": [
"dws hrbrain profile performance --work-no WORK_NO"
],
"reviewed": true,
"review_reason": "依据 reviewed CommandRegistry、真实 Cobra help 与 mono/multi Skill 选型审阅。",
"source_refs": [
"CommandRegistry:canonical_path=hrbrain.get_employee_performance",
"cobra-help:dws hrbrain profile performance",
"Skill:skills/mono/references/products/hrbrain.md",
"Skill:skills/multi/dingtalk-hrbrain/SKILL.md"
]
},
"hrbrain.search_employees": {
"agent_summary": "按关键词、部门、职务、职级、人才池等条件搜索员工",
"use_when": [
"需要按姓名/工号/部门/职务/职级等基础条件模糊找人时"
],
"avoid_when": [
"需要复杂组合条件(表达式)搜索时改用 dws hrbrain search employees-structured",
"已限定某个人才池要看全部人员时改用 dws hrbrain talent-pool employees"
],
"examples": [
"dws hrbrain search employees --keyword \"张三\" --page 1 --page-size 20",
"dws hrbrain search employees --dept-name \"技术部\" --job-level P7"
],
"reviewed": true,
"review_reason": "依据 reviewed CommandRegistry、真实 Cobra help 与 mono/multi Skill 选型审阅。",
"source_refs": [
"CommandRegistry:canonical_path=hrbrain.search_employees",
"cobra-help:dws hrbrain search employees",
"Skill:skills/mono/references/products/hrbrain.md",
"Skill:skills/multi/dingtalk-hrbrain/SKILL.md"
]
},
"hrbrain.search_employees_structured": {
"agent_summary": "使用高级条件表达式(originJson)搜索员工",
"use_when": [
"需要使用组合过滤条件表达式搜索员工,且已通过 dws hrbrain search fields 获取有权限的字段/操作符时"
],
"avoid_when": [
"只是简单关键词/部门/职级搜索时改用 dws hrbrain search employees",
"尚未获取可用字段与操作符时先用 dws hrbrain search fields"
],
"examples": [
"dws hrbrain search employees-structured --origin-json '{\"rules\":[{\"field\":\"name\",\"operator\":\"contains\",\"value\":\"张\"}],\"combinator\":\"and\"}' --fields '[{\"label\":\"姓名\",\"value\":\"name\"}]'"
],
"reviewed": true,
"review_reason": "依据 reviewed CommandRegistry、真实 Cobra help 与 mono/multi Skill 选型审阅。",
"source_refs": [
"CommandRegistry:canonical_path=hrbrain.search_employees_structured",
"cobra-help:dws hrbrain search employees-structured",
"Skill:skills/mono/references/products/hrbrain.md",
"Skill:skills/multi/dingtalk-hrbrain/SKILL.md"
]
},
"hrbrain.get_search_fields": {
"agent_summary": "获取当前操作人有权限使用的高级搜索字段与操作符列表",
"use_when": [
"在调用 dws hrbrain search employees-structured 之前,需要确认可用字段与操作符时"
],
"avoid_when": [
"只是简单关键词搜索时改用 dws hrbrain search employees"
],
"examples": [
"dws hrbrain search fields"
],
"reviewed": true,
"review_reason": "依据 reviewed CommandRegistry、真实 Cobra help 与 mono/multi Skill 选型审阅。",
"source_refs": [
"CommandRegistry:canonical_path=hrbrain.get_search_fields",
"cobra-help:dws hrbrain search fields",
"Skill:skills/mono/references/products/hrbrain.md",
"Skill:skills/multi/dingtalk-hrbrain/SKILL.md"
]
}
},
"products": {
"hrbrain": {
"agent_summary": "钉钉组织大脑:人才池管理、员工档案查询与人才搜索",
"use_when": [
"需要查询人才池、员工档案(元数据/标签/职业历程/绩效)或搜索员工时"
],
"avoid_when": [
"要操作通讯录/组织架构基础信息时改用 contact 产品",
"要提交/查询战略解码、经营合约、目标等 OKR 能力时改用 agoal(CLI-only,未接入 Agent Schema)"
],
"reviewed": true,
"review_reason": "依据真实 CommandRegistry 命令分区与对应产品 Skill 审阅产品级选择边界。",
"source_refs": [
"CommandRegistry:product=hrbrain",
"Skill:skills/mono/references/products/hrbrain.md",
"Skill:skills/multi/dingtalk-hrbrain/SKILL.md"
]
}
}
}
@@ -638,6 +638,201 @@
"skills/mono/SKILL.md",
"skills/mono/references/products/mail.md"
]
},
"mail.shortcut_thread_list": {
"agent_summary": "列出指定邮箱文件夹下的邮件会话(thread)",
"use_when": [
"当你想按会话(同一往来主题的邮件串)而非单封邮件来浏览某个文件夹时使用;传入邮箱和文件夹 ID,可按时间范围和升降序筛选,返回会话列表及其 conversationId,供 +thread 查看详情。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws mail +thread-list --email user@company.com --folder 104 --limit 20"
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#mail.shortcut_thread_list",
"cobra-help:dws mail +thread-list",
"ShortcutRegistry:mail +thread-list"
]
},
"mail.shortcut_folder_list": {
"agent_summary": "列出顶层文件夹或指定父文件夹下的子文件夹",
"use_when": [
"当你需要了解某个邮箱有哪些文件夹、或要取得文件夹 ID 以便移动邮件、按文件夹列信/建规则时使用;传入邮箱(可选父文件夹 ID 查子级),返回文件夹列表及其 ID。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws mail +folder-list --email user@company.com"
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#mail.shortcut_folder_list",
"cobra-help:dws mail +folder-list",
"ShortcutRegistry:mail +folder-list"
]
},
"mail.shortcut_tag_list": {
"agent_summary": "列出指定邮箱下的所有邮件标签",
"use_when": [
"当你要查看邮箱里有哪些标签、或需要取得标签 ID 以便给邮件/会话加标签时使用;传入邮箱地址,返回全部邮件标签及其 ID。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws mail +tag-list --email user@company.com"
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#mail.shortcut_tag_list",
"cobra-help:dws mail +tag-list",
"ShortcutRegistry:mail +tag-list"
]
},
"mail.shortcut_user_search": {
"agent_summary": "按关键词或工号搜索邮箱用户(仅企业邮箱)",
"use_when": [
"当你只知道同事的姓名或工号、需要查出其企业邮箱地址以便发信或添加联系人时使用;提供关键词或工号(至少其一),返回匹配的企业邮箱用户列表。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws mail +user-search --keyword \"张三\"",
"dws mail +user-search --email user@company.com --employee-no \"E123456\""
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#mail.shortcut_user_search",
"cobra-help:dws mail +user-search",
"ShortcutRegistry:mail +user-search"
]
},
"mail.shortcut_template_list": {
"agent_summary": "列出指定邮箱的所有邮件模板",
"use_when": [
"当你想查看某个邮箱下已有哪些邮件模板、或需要取得模板 ID 以便查看详情或更新时使用;传入邮箱和每页数量,返回模板列表,支持分页。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws mail +template-list --email user@company.com --limit 20"
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#mail.shortcut_template_list",
"cobra-help:dws mail +template-list",
"ShortcutRegistry:mail +template-list"
]
},
"mail.shortcut_contact_list": {
"agent_summary": "列出指定邮箱的所有邮件联系人",
"use_when": [
"当你想查看某邮箱通讯录里有哪些联系人、或需要取得联系人 ID 以便更新或删除时使用;传入邮箱和每页数量,返回联系人列表,支持分页。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws mail +contact-list --email user@company.com --limit 20"
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#mail.shortcut_contact_list",
"cobra-help:dws mail +contact-list",
"ShortcutRegistry:mail +contact-list"
]
},
"mail.shortcut_find_mail_user": {
"agent_summary": "按关键词搜索邮箱联系人并投影列表(姓名/昵称/邮箱/工号等)",
"use_when": [
"当你只知道某人的姓名、花名或邮箱片段,想在企业邮箱通讯录里按关键词把匹配的邮箱用户找出来、并只看一份精简清单(姓名、昵称、邮箱地址、工号、职位、工作地)而不想拿到一大坨原始字段时使用;内部按 --query 关键词调用邮箱用户搜索,再在本地把每个匹配用户投影成整洁记录打印出来,可配合 --format/--jq/--fields。这是纯只读操作,只做搜索与本地投影,不会修改任何数据;注意仅企业邮箱可用(个人邮箱如 xxx@dingtalk.com 会因无权限报错);若没有命中则提示「没搜到邮箱联系人」。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws mail +find-mail-user --query \"张三\"",
"dws mail +find-mail-user --query alice --limit 10"
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#mail.shortcut_find_mail_user",
"cobra-help:dws mail +find-mail-user",
"ShortcutRegistry:mail +find-mail-user"
]
},
"mail.shortcut_recent_mail": {
"agent_summary": "列出收件箱近期邮件会话并投影列表(主题/发件人/时间/threadId)",
"use_when": [
"当你想快速看一眼自己邮箱里近期的邮件会话(收件箱线程/conversation),只需要一份精简清单(主题、发件人、最后修改时间、会话 threadId)、而不想翻完整正文或原始字段时使用;内部先确定要看的邮箱地址——你可以用 --email 指定,不指定时自动取你绑定的第一个邮箱——再解析要看的文件夹——你可以用 --folder 指定文件夹 ID,不指定时自动定位收件箱——然后列出该文件夹下的近期会话,最后在本地把每条会话投影成 {subject, from, date, threadId} 打印出来,可配合 --format/--jq/--fields。这是纯只读操作,只做列举与本地投影,不会修改、发送或删除任何邮件;若最近没有邮件则提示「最近没有邮件」。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws mail +recent-mail",
"dws mail +recent-mail --limit 30"
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#mail.shortcut_recent_mail",
"cobra-help:dws mail +recent-mail",
"ShortcutRegistry:mail +recent-mail"
]
},
"mail.shortcut_search_mail": {
"agent_summary": "按 KQL 关键词搜索邮件并投影列表(主题/发件人/时间/messageId)",
"use_when": [
"当你想按关键词(KQL 表达式,如 subject:周报、from:alice、hasAttachments:true、folderId:2 等)快速搜自己的邮件、并只看一份精简清单(主题、发件人、时间、邮件 messageId)而不想翻完整正文时使用;内部先确定要搜的邮箱地址——你可以用 --email 指定,不指定时自动取你绑定的第一个邮箱——再执行邮件搜索,最后在本地把每封邮件投影成 {subject, from, date, messageId} 打印出来,可配合 --format/--jq/--fields。这是纯只读操作,只做搜索与本地投影,不会修改、发送或删除任何邮件;若没有命中则返回空列表。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws mail +search-mail --query \"subject:周报\"",
"dws mail +search-mail --query \"from:alice AND date>2025-06-01T00:00:00Z\""
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#mail.shortcut_search_mail",
"cobra-help:dws mail +search-mail",
"ShortcutRegistry:mail +search-mail"
]
},
"mail.shortcut_unread_mail": {
"agent_summary": "列出未读邮件并投影列表(主题/发件人/时间/messageId)",
"use_when": [
"当你想快速看自己邮箱里有哪些未读邮件、并只看一份精简清单(主题、发件人、时间、邮件 messageId)而不想翻完整正文时使用;内部先确定要查的邮箱地址——你可以用 --email 指定,不指定时自动取你绑定的第一个邮箱——再用 KQL 过滤条件 isRead:false 搜索未读邮件,最后在本地把每封邮件投影成 {subject, from, date, messageId} 打印出来,可配合 --format/--jq/--fields。这是纯只读操作,只做搜索与本地投影,不会把邮件标记为已读,也不会修改、发送或删除任何邮件;若没有未读邮件则返回空列表。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws mail +unread-mail",
"dws mail +unread-mail --email user@company.com"
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#mail.shortcut_unread_mail",
"cobra-help:dws mail +unread-mail",
"ShortcutRegistry:mail +unread-mail"
]
}
},
"products": {
@@ -688,6 +688,122 @@
"skills/mono/references/best_practices/07-minutes.md",
"live-dws-schema:minutes.update_minutes_title"
]
},
"minutes.shortcut_list_mine": {
"agent_summary": "查询我创建的听记列表",
"use_when": [
"当你想找回自己发起或录制的某次听记(会议纪要),却只记得大概的标题关键字时使用;可按关键字筛选并分页,返回自己创建的听记列表及其 taskUuid,便于后续查看摘要、转写或待办。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws minutes +list-mine --query \"周会\" --limit 10"
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#minutes.shortcut_list_mine",
"cobra-help:dws minutes +list-mine",
"ShortcutRegistry:minutes +list-mine"
]
},
"minutes.shortcut_list_shared": {
"agent_summary": "查询他人共享给我的听记列表",
"use_when": [
"当你要找同事分享给你的会议听记、想快速定位别人共享过来的纪要时使用;可按关键字筛选并分页,返回他人共享给你的听记列表及 taskUuid。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws minutes +list-shared --limit 20"
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#minutes.shortcut_list_shared",
"cobra-help:dws minutes +list-shared",
"ShortcutRegistry:minutes +list-shared"
]
},
"minutes.shortcut_list_all": {
"agent_summary": "查询我有权限访问的所有听记列表",
"use_when": [
"当你不确定某条听记是自己创建还是别人共享、想在所有可访问的听记中一次性检索时使用;合并「我创建的」和「共享给我的」,按关键字筛选并分页返回全部有权限的听记及 taskUuid。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws minutes +list-all --query \"周会\" --limit 20"
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#minutes.shortcut_list_all",
"cobra-help:dws minutes +list-all",
"ShortcutRegistry:minutes +list-all"
]
},
"minutes.shortcut_record_start": {
"agent_summary": "发起听记(开始录音)",
"use_when": [
"当你要开始一场实时会议/通话的 AI 听记、立刻启动录音并生成一条新听记任务时使用;可选传入 AI 助理会话 ID,会真实发起录音,返回新建听记的 taskUuid 供后续暂停/恢复/结束。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws minutes +record-start --session-id <sessionId>"
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#minutes.shortcut_record_start",
"cobra-help:dws minutes +record-start",
"ShortcutRegistry:minutes +record-start"
]
},
"minutes.shortcut_detail": {
"agent_summary": "一条命令聚合取一条妙记(听记)的多项产物(基础信息/摘要/关键词/逐字稿/待办)",
"use_when": [
"当你已经有某条听记的 taskUuid,想在一次操作里同时拿到它的基础信息、AI 摘要、关键词、逐字稿和待办,而不想分别敲 4~5 个子命令再自己拼时使用;内部按 --artifacts 选择要拉的产物(默认全部:basic/summary/keywords/transcript/todos),逐个调用对应的原子工具并聚合成一个结果,某一项失败不会中断整体(会以错误字符串记录在该项下)。这是纯只读操作,不会修改听记;--direction 仅影响逐字稿排序(0=正序默认,1=倒序)。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws minutes +detail --id <taskUuid>",
"dws minutes +detail --id <taskUuid> --artifacts summary,todos"
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#minutes.shortcut_detail",
"cobra-help:dws minutes +detail",
"ShortcutRegistry:minutes +detail"
]
},
"minutes.shortcut_replace_batch": {
"agent_summary": "对一条妙记(听记)批量执行多组文字替换(原文=>替换)",
"use_when": [
"当你要在同一条听记里一次性纠正多个词(如把多个错识别的人名/术语统一替换),而底层工具一次只能替换一组时使用;内部按多个 --pair \"原文=>替换\" 逐组调用替换工具,先在本地校验去重(同一个「原文」不能出现两次,避免两条规则互相打架),再逐组应用并聚合每组的成功/失败结果,某一组失败不会中断其余组。这是写操作,会实际修改听记文字内容,请确认 taskUuid 与替换规则无误。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws minutes +replace-batch --id <taskUuid> --pair \"张三=>张三丰\"",
"dws minutes +replace-batch --id <taskUuid> --pair \"Q2=>第二季度\" --pair \"PM=>产品经理\""
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#minutes.shortcut_replace_batch",
"cobra-help:dws minutes +replace-batch",
"ShortcutRegistry:minutes +replace-batch"
]
}
},
"products": {
+134
View File
@@ -359,6 +359,140 @@
"structured-hint:internal/cli/schema_hints/imported/wukong.json#oa.revoke_processInstance",
"live-dws-schema:oa.revoke_processInstance"
]
},
"oa.shortcut_list_pending": {
"agent_summary": "查询待我处理的审批(时间范围为 epoch 毫秒)",
"use_when": [
"当你想知道自己当前有哪些审批还没处理、需要清理审批待办或按时间段/关键字盘点待审批单时使用;传入起止时间(epoch 毫秒,可选关键字与分页),返回待我审批的实例列表,是后续 +get 查详情、+approve/+reject 处理的入口。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws oa +list-pending --start 1741536000000 --end 1741622399000 --query 报销"
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#oa.shortcut_list_pending",
"cobra-help:dws oa +list-pending",
"ShortcutRegistry:oa +list-pending"
]
},
"oa.shortcut_list_forms": {
"agent_summary": "获取当前用户可见的审批表单列表",
"use_when": [
"当你想浏览自己有权限发起哪些审批模板、或需要为 +list-initiated 等操作枚举 processCode 时使用;无需关键字,按游标分页返回当前用户可见的全部审批表单,适合不确定表单名称时先整体看一遍。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws oa +list-forms --cursor 0 --limit 100"
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#oa.shortcut_list_forms",
"cobra-help:dws oa +list-forms",
"ShortcutRegistry:oa +list-forms"
]
},
"oa.shortcut_search_forms": {
"agent_summary": "按关键字模糊搜索当前用户可见的审批表单",
"use_when": [
"当你已知想找的审批大致名称(如「报销」「请假」)、想快速定位对应表单及其 processCode 时使用,比 +list-forms 全量列举更高效;传入关键字,返回名称或 processCode 匹配的表单,供后续 +list-initiated 按模板查询。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws oa +search-forms --query 报销"
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#oa.shortcut_search_forms",
"cobra-help:dws oa +search-forms",
"ShortcutRegistry:oa +search-forms"
]
},
"oa.shortcut_list_executed": {
"agent_summary": "获取当前用户已经处理过的审批单列表",
"use_when": [
"当你想回顾自己历史上审批过(已同意/拒绝等)的单子、做复盘或查找某条已办审批时使用,区别于 +list-pending 的待办;按页码/关键字分页返回我已处理的审批单。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws oa +list-executed --limit 20 --page 1 --query 报销"
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#oa.shortcut_list_executed",
"cobra-help:dws oa +list-executed",
"ShortcutRegistry:oa +list-executed"
]
},
"oa.shortcut_list_submitted": {
"agent_summary": "获取当前用户已发起的审批单列表",
"use_when": [
"当你想查看自己提交发起的审批单及其审批进度(如某笔报销/请假审到哪一步)时使用;按页码/关键字分页返回我发起的审批单,可据此决定是否 +revoke 撤销或催办。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws oa +list-submitted --limit 20 --page 1 --query 报销"
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#oa.shortcut_list_submitted",
"cobra-help:dws oa +list-submitted",
"ShortcutRegistry:oa +list-submitted"
]
},
"oa.shortcut_list_cc": {
"agent_summary": "获取抄送当前用户的审批单列表",
"use_when": [
"当你想查看抄送给自己、需要知悉但无需审批的单子时使用;按页码/关键字分页返回抄送我的审批单列表,适合了解与自己相关但不用自己动手处理的审批动态。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws oa +list-cc --limit 20 --page 1 --query 报销"
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#oa.shortcut_list_cc",
"cobra-help:dws oa +list-cc",
"ShortcutRegistry:oa +list-cc"
]
},
"oa.shortcut_my_initiated": {
"agent_summary": "列出我发起(提交)的审批单据",
"use_when": [
"当你想快速看清自己发起(提交)过哪些 OA 审批单据、方便跟进它们的进展时使用;内部直接拉取当前用户已发起的审批实例列表(等价于 dws oa approval list-submitted),再在本地把每条单据投影成标题、单号(businessId)、状态和审批实例 ID(processInstanceId) 四个关键字段。可用 --query 按关键字过滤、--page/--limit 翻页(默认第 1 页、每页 20 条)。这是纯只读操作,只做列表与本地投影,不会同意、拒绝、撤销或修改任何审批单据;若没有发起过审批则返回空列表。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws oa +my-initiated",
"dws oa +my-initiated --query 报销"
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#oa.shortcut_my_initiated",
"cobra-help:dws oa +my-initiated",
"ShortcutRegistry:oa +my-initiated"
]
}
},
"products": {
@@ -172,6 +172,45 @@
"structured-hint:internal/cli/schema_hints/imported/wukong.json#report.get_template_details_by_name",
"live-dws-schema:report.get_template_details_by_name"
]
},
"report.shortcut_inbox_list": {
"agent_summary": "列出我收到的日报(按时间范围分页)",
"use_when": [
"当你要查看下属或同事发给自己的日报周报、想在某个时间段内浏览或审阅收到的汇报时使用;输入起止时间(ISO-8601),可按发送人 staffId 过滤,分页返回收到的日报列表及其 reportId,供后续 +entry-get 读正文。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws report +inbox-list --start \"2026-03-10T00:00:00+08:00\" --end \"2026-03-10T23:59:59+08:00\" --cursor 0 --size 20"
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#report.shortcut_inbox_list",
"cobra-help:dws report +inbox-list",
"ShortcutRegistry:report +inbox-list"
]
},
"report.shortcut_outbox_list": {
"agent_summary": "列出我发出的日报(可选时间/模版名过滤)",
"use_when": [
"当你要回顾自己写过、提交过的日报周报,比如确认某天是否已交、找回历史汇报内容或统计提交情况时使用;可按创建/修改时间范围和模版名过滤,分页返回自己发出的日报列表及 reportId,供后续 +entry-get 查看正文。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws report +outbox-list --cursor 0 --size 20",
"dws report +outbox-list --cursor 0 --size 20 --template-name \"日报\""
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#report.shortcut_outbox_list",
"cobra-help:dws report +outbox-list",
"ShortcutRegistry:report +outbox-list"
]
}
},
"products": {
@@ -1591,6 +1591,44 @@
"skills/mono/references/products/sheet.md",
"dws-schema-live:sheet.write_image"
]
},
"sheet.shortcut_list_sheets": {
"agent_summary": "获取表格文档中全部工作表列表",
"use_when": [
"当你拿到一个表格文档、想先了解它里面有哪些工作表(sheet)以及各自的 sheetId 时使用,通常作为读写具体数据前的第一步;传入表格文档 ID 或 URL,返回工作表清单。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws sheet +list-sheets --node NODE_ID"
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#sheet.shortcut_list_sheets",
"cobra-help:dws sheet +list-sheets",
"ShortcutRegistry:sheet +list-sheets"
]
},
"sheet.shortcut_read": {
"agent_summary": "读取工作表指定范围的结构化单元格数据",
"use_when": [
"当你需要按单元格逐格获取数据(含类型、公式或格式化值等结构化信息)以便程序处理时使用;传入表格与可选范围(A1 表示法,不传则全部),可指定取格式化值/原始值/公式,返回结构化单元格数组。若只想要纯文本可改用 +csv-get。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws sheet +read --node NODE_ID --sheet-id SHEET_ID --range \"A1:D10\""
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#sheet.shortcut_read",
"cobra-help:dws sheet +read",
"ShortcutRegistry:sheet +read"
]
}
},
"products": {
@@ -525,6 +525,215 @@
"Wukong-parity:3306c3307",
"live-dws-schema:todo.update_todo_tag#FAILED"
]
},
"todo.shortcut_assign": {
"agent_summary": "按姓名给某人创建并指派一条待办(自动解析 userId)",
"use_when": [
"当你想把一件事指派给某位同事、但只知道对方姓名不想先查 userId 时使用;内部先按姓名解析出唯一 userId,再创建待办并把 TA 设为执行人。会真实创建待办。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws todo +assign --to 张三 --task \"整理周报\""
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#todo.shortcut_assign",
"cobra-help:dws todo +assign",
"ShortcutRegistry:todo +assign"
]
},
"todo.shortcut_assign_multi": {
"agent_summary": "把一条待办按姓名一次性指派给多个人(自动把每个姓名解析成 userId)",
"use_when": [
"当你想把同一条待办同时指派给好几个同事、但手上只有他们的姓名而不是 userId 时使用;内部会把 --to 里的每个姓名逐个解析成唯一 userId,只要有任何一个姓名查不到或者重名有歧义,就把这些问题一次性汇总报错、并且完全不创建待办(不会建出只指派了一半人的残缺待办)。全部姓名都解析成功后,才用这些 userId 一次性创建这条待办并指派给所有人。会真实创建一条新的待办。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws todo +assign-multi --to \"张三,李四\" --task \"周五前提交排期\""
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#todo.shortcut_assign_multi",
"cobra-help:dws todo +assign-multi",
"ShortcutRegistry:todo +assign-multi"
]
},
"todo.shortcut_created_todos": {
"agent_summary": "列出我创建的待办(我作为创建人 creator 发起的待办,而非分配给我执行的)",
"use_when": [
"当你想快速看清『哪些待办是我自己创建/发起的』,而不是别人指派给我执行的待办时使用;内部拉取你当前组织下角色为创建人(creator)的待办列表(roleTypes=[\"creator\"],creator 是待办列表支持的角色枚举之一),再在本地把每条待办投影成标题(subject)、任务 ID(taskId) 和截止时间(dueTime) 打印出来。这是纯只读操作,只做列表与投影,不会创建或修改任何待办;若没有你创建的待办则返回空列表。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws todo +created-todos"
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#todo.shortcut_created_todos",
"cobra-help:dws todo +created-todos",
"ShortcutRegistry:todo +created-todos"
]
},
"todo.shortcut_overdue": {
"agent_summary": "列出我已过期未完成的待办",
"use_when": [
"当你想快速看清自己有哪些待办已经过了截止时间却还没做完、方便优先处理时使用;内部先拉取你当前组织下作为执行人(executor)的待办列表,再在本地按「有截止时间(dueTime) 且早于当前时刻 且尚未完成」的条件筛选,最后只打印这些逾期待办的标题(subject)、截止时间(dueTime) 和任务 ID(taskId)。这是纯只读操作,只做列表与本地过滤,不会修改或完成任何待办;若没有逾期待办则返回空列表。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws todo +overdue"
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#todo.shortcut_overdue",
"cobra-help:dws todo +overdue",
"ShortcutRegistry:todo +overdue"
]
},
"todo.shortcut_remind": {
"agent_summary": "给自己创建一条带截止/提醒时间的待办",
"use_when": [
"当你想给自己记一件事、并(可选)设一个截止/提醒时间,又不想先查自己的 userId 时使用;内部先解析当前登录用户的 userId,再显式设置 executorIds,--at 会按 ISO8601 解析为截止时间。会真实创建待办。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws todo +remind --task \"交周报\" --at 2026-03-10T18:00:00+08:00"
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#todo.shortcut_remind",
"cobra-help:dws todo +remind",
"ShortcutRegistry:todo +remind"
]
},
"todo.shortcut_todo_done": {
"agent_summary": "按标题关键词把我的某条待办标记完成(自动定位 taskId)",
"use_when": [
"当你只记得某条待办的标题关键词、想直接把它标记完成,却不想先翻列表复制 taskId 时使用;内部先拉取你当前组织下作为执行人的待办列表,按标题(subject)包含关键词匹配:没匹配到会提示「没找到匹配待办」,匹配到多条会列出候选(标题+taskId)让你写得更精确,唯一命中时才把它标记为已完成。这会真实修改待办完成状态。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws todo +todo-done --task 周报"
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#todo.shortcut_todo_done",
"cobra-help:dws todo +todo-done",
"ShortcutRegistry:todo +todo-done"
]
},
"todo.shortcut_get_my_tasks": {
"agent_summary": "查询当前组织下我的待办列表",
"use_when": [
"当你想查看自己在当前组织下的待办清单、盘点未完成事项或按条件筛选任务时使用;可按完成状态、优先级、角色(创建者/执行者/参与者)和截止时间范围过滤并分页,返回匹配的待办列表。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws todo +get-my-tasks --status false --priority 40,30"
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#todo.shortcut_get_my_tasks",
"cobra-help:dws todo +get-my-tasks",
"ShortcutRegistry:todo +get-my-tasks"
]
},
"todo.shortcut_list_sub": {
"agent_summary": "查询子待办列表",
"use_when": [
"当你已知某个待办任务 ID、想了解它被拆解出的所有子任务时使用;输入父任务 ID,返回其下的子待办列表。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws todo +list-sub --task-id <taskId>"
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#todo.shortcut_list_sub",
"cobra-help:dws todo +list-sub",
"ShortcutRegistry:todo +list-sub"
]
},
"todo.shortcut_get": {
"agent_summary": "查询待办详情",
"use_when": [
"当你已知某条待办的任务 ID、想查看它的完整信息(标题、执行者、截止时间、优先级、状态等)时使用;输入任务 ID,返回该待办的详细内容。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws todo +get --task-id <taskId>"
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#todo.shortcut_get",
"cobra-help:dws todo +get",
"ShortcutRegistry:todo +get"
]
},
"todo.shortcut_list_attachment": {
"agent_summary": "查询待办任务的附件列表",
"use_when": [
"当你想查看某条待办上挂了哪些附件、或需要拿到附件 ID 以便后续删除时使用;输入任务 ID,返回该待办的附件列表。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws todo +list-attachment --task-id <taskId>"
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#todo.shortcut_list_attachment",
"cobra-help:dws todo +list-attachment",
"ShortcutRegistry:todo +list-attachment"
]
},
"todo.shortcut_list_comment": {
"agent_summary": "查询待办评论列表",
"use_when": [
"当你想查看某条待办下的讨论记录、了解协作沟通历史或获取评论 ID 以便删除时使用;输入任务 ID 并可分页,返回该待办的评论列表。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws todo +list-comment --task-id <taskId>"
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#todo.shortcut_list_comment",
"cobra-help:dws todo +list-comment",
"ShortcutRegistry:todo +list-comment"
]
}
},
"products": {
@@ -354,6 +354,25 @@
"structured-hint:internal/cli/schema_hints/products/wiki.json",
"live-mcp:dws schema wiki.update_member"
]
},
"wiki.shortcut_space_search": {
"agent_summary": "搜索知识库",
"use_when": [
"当你只记得知识库名称的部分关键词、想快速按名称定位某个知识库时使用;输入关键词返回匹配的知识库列表,比逐页 +space-list 更快找到目标 workspaceId。"
],
"avoid_when": [
"需要该 Shortcut 未公开的底层参数、原始响应或不同执行语义时,改用对应原子命令"
],
"examples": [
"dws wiki +space-search --query \"产品文档\""
],
"reviewed": true,
"review_reason": "Agent-authored and reviewed from the built-in Shortcut intent, executable Cobra path, and declared outcome; it affects selection only and does not alter execution or safety facts.",
"source_refs": [
"internal/cli/schema_command_registry.json#wiki.shortcut_space_search",
"cobra-help:dws wiki +space-search",
"ShortcutRegistry:wiki +space-search"
]
}
},
"products": {
+1
View File
@@ -99,6 +99,7 @@ var cmdToProduct = map[string]string{
"sheet": "sheet",
"wiki": "wiki",
"aisearch": "aisearch",
"hrbrain": "hrbrain",
"yida": "yida",
// vendor extension command routing (kept here for resolveProductID)
"unified-toolkit": "unified-toolkit",
+321
View File
@@ -0,0 +1,321 @@
package helpers
import (
"encoding/json"
"fmt"
"github.com/spf13/cobra"
)
// ──────────────────────────────────────────────────────────
// dws hrbrain — 组织大脑(人才池、员工档案、人才搜索)
// ──────────────────────────────────────────────────────────
func newHrbrainCommand() *cobra.Command {
root := &cobra.Command{
Use: "hrbrain",
Short: "组织大脑:人才池、员工档案与人才搜索",
Long: `钉钉组织大脑(hrbrain)能力:人才池管理、员工档案查询、人才搜索与标签管理。
命令结构:
dws hrbrain talent-pool list 人才池列表
dws hrbrain talent-pool detail 获取人才池详情
dws hrbrain talent-pool employees 人才池人员列表
dws hrbrain profile metadata 查询员工档案元数据结构
dws hrbrain profile query 按模块批量查询员工档案数据
dws hrbrain profile labels 获取员工标签
dws hrbrain profile career 查询员工公司内职业历程
dws hrbrain profile performance 查询员工绩效记录
dws hrbrain search employees 人才搜索
dws hrbrain search employees-structured 使用高级条件搜索人员
dws hrbrain search fields 获取高级搜索字段列表`,
RunE: groupRunE,
}
// ── talent-pool: 人才池管理 ────────────────────────────────
talentPoolCmd := &cobra.Command{Use: "talent-pool", Short: "人才池管理", RunE: groupRunE}
talentPoolListCmd := &cobra.Command{
Use: "list",
Short: "人才池列表",
Long: `查询人才池列表,支持按名称关键词、类型、创建人、标签等条件筛选。`,
Example: ` dws hrbrain talent-pool list --page 1 --page-size 20
dws hrbrain talent-pool list --keyword "储备干部" --pool-type TYPE --creator USER_ID`,
RunE: func(cmd *cobra.Command, args []string) error {
page, _ := cmd.Flags().GetInt("page")
pageSize, _ := cmd.Flags().GetInt("page-size")
toolArgs := map[string]any{
"currentPage": page,
"pageSize": pageSize,
}
if v, _ := cmd.Flags().GetString("keyword"); v != "" {
toolArgs["keyword"] = v
}
if v, _ := cmd.Flags().GetString("pool-type"); v != "" {
toolArgs["poolType"] = v
}
if v, _ := cmd.Flags().GetString("creator"); v != "" {
toolArgs["creator"] = v
}
if v, _ := cmd.Flags().GetString("labels"); v != "" {
toolArgs["labels"] = parseCSVValues(v)
}
return callMCPTool("list_talent_pools", toolArgs)
},
}
talentPoolListCmd.Flags().String("keyword", "", "人才池名称关键词 (可选)")
talentPoolListCmd.Flags().String("pool-type", "", "人才池类型 (可选)")
talentPoolListCmd.Flags().String("creator", "", "创建人 (可选)")
talentPoolListCmd.Flags().String("labels", "", "标签列表,逗号分隔 (可选)")
talentPoolListCmd.Flags().Int("page", 1, "当前页码 (默认 1)")
talentPoolListCmd.Flags().Int("page-size", 20, "每页条数 (默认 20)")
talentPoolDetailCmd := &cobra.Command{
Use: "detail",
Short: "获取人才池详情",
Long: `根据人才池编码获取人才池详细信息。`,
Example: ` dws hrbrain talent-pool detail --pool-code POOL_CODE`,
RunE: func(cmd *cobra.Command, args []string) error {
if err := validateRequiredFlags(cmd, "pool-code"); err != nil {
return err
}
return callMCPTool("get_talent_pool_detail", map[string]any{
"poolCode": mustGetFlag(cmd, "pool-code"),
})
},
}
talentPoolDetailCmd.Flags().String("pool-code", "", "人才池编码 (必填)")
talentPoolEmployeesCmd := &cobra.Command{
Use: "employees",
Short: "人才池人员列表",
Long: `查询指定人才池内的人员列表。`,
Example: ` dws hrbrain talent-pool employees --pool-code POOL_CODE --page 1 --page-size 20`,
RunE: func(cmd *cobra.Command, args []string) error {
if err := validateRequiredFlags(cmd, "pool-code"); err != nil {
return err
}
page, _ := cmd.Flags().GetInt("page")
pageSize, _ := cmd.Flags().GetInt("page-size")
return callMCPTool("list_pool_employees", map[string]any{
"poolCode": mustGetFlag(cmd, "pool-code"),
"currentPage": page,
"pageSize": pageSize,
})
},
}
talentPoolEmployeesCmd.Flags().String("pool-code", "", "人才池编码 (必填)")
talentPoolEmployeesCmd.Flags().Int("page", 1, "当前页码 (默认 1)")
talentPoolEmployeesCmd.Flags().Int("page-size", 20, "每页条数 (默认 20)")
talentPoolCmd.AddCommand(talentPoolListCmd, talentPoolDetailCmd, talentPoolEmployeesCmd)
// ── profile: 员工档案管理 ──────────────────────────────────
profileCmd := &cobra.Command{Use: "profile", Short: "员工档案管理", RunE: groupRunE}
profileMetadataCmd := &cobra.Command{
Use: "metadata",
Short: "查询员工档案元数据结构",
Long: `查询指定员工档案的元数据结构,用于构造 query_profile_data 的 dataQueries 参数。`,
Example: ` dws hrbrain profile metadata --work-no WORK_NO`,
RunE: func(cmd *cobra.Command, args []string) error {
if err := validateRequiredFlags(cmd, "work-no"); err != nil {
return err
}
return callMCPTool("get_profile_metadata", map[string]any{
"workNo": mustGetFlag(cmd, "work-no"),
})
},
}
profileMetadataCmd.Flags().String("work-no", "", "员工工号 (必填)")
profileQueryCmd := &cobra.Command{
Use: "query",
Short: "按模块批量查询员工档案数据",
Long: `按模块维度批量查询员工档案数据。
--data-queries 为 JSON 数组,每个元素包含:
modelCode — 档案模块编码
fields — 要查询的字段编码列表`,
Example: ` dws hrbrain profile query --work-no WORK_NO --data-queries '[{"modelCode":"basic","fields":["name","dept"]}]'`,
RunE: func(cmd *cobra.Command, args []string) error {
if err := validateRequiredFlags(cmd, "work-no", "data-queries"); err != nil {
return err
}
var queries []any
if err := json.Unmarshal([]byte(mustGetFlag(cmd, "data-queries")), &queries); err != nil {
return fmt.Errorf("--data-queries must be a valid JSON array: %w", err)
}
if len(queries) == 0 {
return fmt.Errorf("--data-queries must be a non-empty JSON array")
}
return callMCPTool("query_profile_data", map[string]any{
"workNo": mustGetFlag(cmd, "work-no"),
"dataQueries": queries,
})
},
}
profileQueryCmd.Flags().String("work-no", "", "目标员工工号 (必填)")
profileQueryCmd.Flags().String("data-queries", "", "按模块查询的条件列表 JSON 数组 (必填)")
profileLabelsCmd := &cobra.Command{
Use: "labels",
Short: "获取员工标签",
Long: `根据员工工号列表获取员工标签。`,
Example: ` dws hrbrain profile labels --staff-ids WORK_NO1,WORK_NO2 --all-label`,
RunE: func(cmd *cobra.Command, args []string) error {
if err := validateRequiredFlags(cmd, "staff-ids"); err != nil {
return err
}
toolArgs := map[string]any{
"staffIds": parseCSVValues(mustGetFlag(cmd, "staff-ids")),
}
if cmd.Flags().Changed("all-label") {
v, _ := cmd.Flags().GetBool("all-label")
toolArgs["allLabel"] = v
}
return callMCPTool("get_profile_label", toolArgs)
},
}
profileLabelsCmd.Flags().String("staff-ids", "", "员工工号列表,逗号分隔 (必填)")
profileLabelsCmd.Flags().Bool("all-label", false, "是否所有标签 (可选)")
profileCareerCmd := &cobra.Command{
Use: "career",
Short: "查询员工公司内职业历程",
Example: ` dws hrbrain profile career --work-no WORK_NO`,
RunE: func(cmd *cobra.Command, args []string) error {
if err := validateRequiredFlags(cmd, "work-no"); err != nil {
return err
}
return callMCPTool("get_employee_career", map[string]any{
"workNo": mustGetFlag(cmd, "work-no"),
})
},
}
profileCareerCmd.Flags().String("work-no", "", "员工工号 (必填)")
profilePerformanceCmd := &cobra.Command{
Use: "performance",
Short: "查询员工绩效记录",
Example: ` dws hrbrain profile performance --work-no WORK_NO`,
RunE: func(cmd *cobra.Command, args []string) error {
if err := validateRequiredFlags(cmd, "work-no"); err != nil {
return err
}
return callMCPTool("get_employee_performance", map[string]any{
"workNo": mustGetFlag(cmd, "work-no"),
})
},
}
profilePerformanceCmd.Flags().String("work-no", "", "员工工号 (必填)")
profileCmd.AddCommand(profileMetadataCmd, profileQueryCmd, profileLabelsCmd, profileCareerCmd, profilePerformanceCmd)
// ── search: 人才搜索 ─────────────────────────────────────
searchCmd := &cobra.Command{Use: "search", Short: "人才搜索", RunE: groupRunE}
employeeSearchCmd := &cobra.Command{
Use: "employees",
Short: "人才搜索",
Long: `按关键词、部门、职务、职级、人才池等条件搜索人员。`,
Example: ` dws hrbrain search employees --keyword "张三" --page 1 --page-size 20
dws hrbrain search employees --dept-name "技术部" --job-level P7 --pool-code POOL_CODE`,
RunE: func(cmd *cobra.Command, args []string) error {
page, _ := cmd.Flags().GetInt("page")
pageSize, _ := cmd.Flags().GetInt("page-size")
toolArgs := map[string]any{
"currentPage": page,
"pageSize": pageSize,
}
if v, _ := cmd.Flags().GetString("keyword"); v != "" {
toolArgs["keyword"] = v
}
if v, _ := cmd.Flags().GetString("dept-name"); v != "" {
toolArgs["deptName"] = v
}
if v, _ := cmd.Flags().GetString("position-name"); v != "" {
toolArgs["positionName"] = v
}
if v, _ := cmd.Flags().GetString("job-level"); v != "" {
toolArgs["jobLevel"] = v
}
if v, _ := cmd.Flags().GetString("pool-code"); v != "" {
toolArgs["poolCode"] = v
}
return callMCPTool("search_employees", toolArgs)
},
}
employeeSearchCmd.Flags().String("keyword", "", "全文搜索关键词(姓名/工号等)(可选)")
employeeSearchCmd.Flags().String("dept-name", "", "部门名称 (可选)")
employeeSearchCmd.Flags().String("position-name", "", "职务名称 (可选)")
employeeSearchCmd.Flags().String("job-level", "", "职级 (可选)")
employeeSearchCmd.Flags().String("pool-code", "", "限定人才池编码 (可选)")
employeeSearchCmd.Flags().Int("page", 1, "当前页码 (默认 1)")
employeeSearchCmd.Flags().Int("page-size", 20, "每页条数 (默认 20)")
employeeSearchStructuredCmd := &cobra.Command{
Use: "employees-structured",
Short: "使用高级条件搜索人员",
Long: `使用高级条件(originJson 表达式)搜索人员。
建议先调用 "dws hrbrain search fields" 获取有权限的字段与操作符列表。
--origin-json 为 JSON 字符串,例如:
{"rules":[{"field":"name","operator":"contains","value":"张"}],"combinator":"and"}
--fields 为 JSON 数组,例如:
[{"label":"姓名","value":"name"}]
--order-by 为逗号分隔的排序字段列表 (可选)`,
Example: ` dws hrbrain search employees-structured --origin-json '{"rules":[{"field":"name","operator":"contains","value":"张"}],"combinator":"and"}' --fields '[{"label":"姓名","value":"name"}]' --page 1 --page-size 20`,
RunE: func(cmd *cobra.Command, args []string) error {
if err := validateRequiredFlags(cmd, "origin-json", "fields"); err != nil {
return err
}
page, _ := cmd.Flags().GetInt("page")
pageSize, _ := cmd.Flags().GetInt("page-size")
originJSON := mustGetFlag(cmd, "origin-json")
var originObj map[string]any
if err := json.Unmarshal([]byte(originJSON), &originObj); err != nil {
return fmt.Errorf("--origin-json must be a valid JSON object: %w", err)
}
var fields []any
if err := json.Unmarshal([]byte(mustGetFlag(cmd, "fields")), &fields); err != nil {
return fmt.Errorf("--fields must be a valid JSON array: %w", err)
}
if len(fields) == 0 {
return fmt.Errorf("--fields must be a non-empty JSON array")
}
toolArgs := map[string]any{
"originJson": originJSON,
"currentPage": page,
"pageSize": pageSize,
"fields": fields,
}
if v, _ := cmd.Flags().GetString("order-by"); v != "" {
toolArgs["orderByClauses"] = parseCSVValues(v)
}
return callMCPTool("search_employees_structured", toolArgs)
},
}
employeeSearchStructuredCmd.Flags().String("origin-json", "", "搜索条件 JSON 表达式 (必填)")
employeeSearchStructuredCmd.Flags().Int("page", 1, "当前页码 (默认 1)")
employeeSearchStructuredCmd.Flags().Int("page-size", 20, "每页条数 (默认 20)")
employeeSearchStructuredCmd.Flags().String("order-by", "", "排序字段列表,逗号分隔 (可选)")
employeeSearchStructuredCmd.Flags().String("fields", "", "返回列定义 JSON 数组 (必填)")
searchFieldsCmd := &cobra.Command{
Use: "fields",
Short: "获取高级搜索字段列表",
Long: `获取当前操作人有权限使用的高级搜索字段列表,用于构造 employees-structured 的参数。`,
Example: ` dws hrbrain search fields`,
RunE: func(cmd *cobra.Command, args []string) error {
return callMCPTool("get_search_fields", nil)
},
}
searchCmd.AddCommand(employeeSearchCmd, employeeSearchStructuredCmd, searchFieldsCmd)
root.AddCommand(talentPoolCmd, profileCmd, searchCmd)
return root
}
+332
View File
@@ -0,0 +1,332 @@
package helpers
import (
"io"
"os"
"testing"
"github.com/spf13/cobra"
)
// executeHrbrainCommand runs the given hrbrain command tree with args, discarding
// output, and returns the error (if any) from RunE.
func executeHrbrainCommand(t *testing.T, root *cobra.Command, args ...string) error {
t.Helper()
oldArgs := os.Args
os.Args = append([]string{"dws", "hrbrain"}, args...)
t.Cleanup(func() { os.Args = oldArgs })
root.SilenceErrors = true
root.SilenceUsage = true
root.SetOut(io.Discard)
root.SetErr(io.Discard)
// SetArgs must receive a non-nil slice: when args is nil (zero variadic
// call), cobra falls back to os.Args[1:] internally, which would wrongly
// feed the literal "hrbrain" token back in as a bogus positional arg.
root.SetArgs(append([]string{}, args...))
return root.Execute()
}
func TestHrbrainTalentPoolList(t *testing.T) {
installScriptedCaller(t, &scriptedToolCaller{dry: true})
if err := executeHrbrainCommand(t, newHrbrainCommand(),
"talent-pool", "list",
); err != nil {
t.Fatalf("list without optional flags: %v", err)
}
if err := executeHrbrainCommand(t, newHrbrainCommand(),
"talent-pool", "list",
"--page", "1", "--page-size", "20",
"--keyword", "储备干部", "--pool-type", "TYPE", "--creator", "USER_ID",
"--labels", "a,b,c",
); err != nil {
t.Fatalf("list with optional flags: %v", err)
}
}
func TestHrbrainTalentPoolDetail(t *testing.T) {
installScriptedCaller(t, &scriptedToolCaller{dry: true})
if err := executeHrbrainCommand(t, newHrbrainCommand(),
"talent-pool", "detail", "--pool-code", "POOL_CODE",
); err != nil {
t.Fatalf("detail with pool-code: %v", err)
}
if err := executeHrbrainCommand(t, newHrbrainCommand(),
"talent-pool", "detail",
); err == nil {
t.Fatal("detail without pool-code should error")
}
}
func TestHrbrainTalentPoolEmployees(t *testing.T) {
installScriptedCaller(t, &scriptedToolCaller{dry: true})
if err := executeHrbrainCommand(t, newHrbrainCommand(),
"talent-pool", "employees",
"--pool-code", "POOL_CODE", "--page", "1", "--page-size", "20",
); err != nil {
t.Fatalf("employees with pool-code: %v", err)
}
if err := executeHrbrainCommand(t, newHrbrainCommand(),
"talent-pool", "employees",
); err == nil {
t.Fatal("employees without pool-code should error")
}
}
func TestHrbrainProfileMetadata(t *testing.T) {
installScriptedCaller(t, &scriptedToolCaller{dry: true})
if err := executeHrbrainCommand(t, newHrbrainCommand(),
"profile", "metadata", "--work-no", "WORK_NO",
); err != nil {
t.Fatalf("metadata with work-no: %v", err)
}
if err := executeHrbrainCommand(t, newHrbrainCommand(),
"profile", "metadata",
); err == nil {
t.Fatal("metadata without work-no should error")
}
}
func TestHrbrainProfileQuery(t *testing.T) {
installScriptedCaller(t, &scriptedToolCaller{dry: true})
if err := executeHrbrainCommand(t, newHrbrainCommand(),
"profile", "query",
"--work-no", "WORK_NO",
"--data-queries", `[{"modelCode":"basic","fields":["name","dept"]}]`,
); err != nil {
t.Fatalf("query with valid data-queries: %v", err)
}
if err := executeHrbrainCommand(t, newHrbrainCommand(),
"profile", "query",
"--work-no", "WORK_NO",
"--data-queries", `not-json`,
); err == nil {
t.Fatal("query with invalid data-queries JSON should error")
}
// An empty JSON array is syntactically valid but queries nothing, so it
// must be rejected before dispatch.
emptyDataQueriesCaller := &scriptedToolCaller{dry: true}
installScriptedCaller(t, emptyDataQueriesCaller)
if err := executeHrbrainCommand(t, newHrbrainCommand(),
"profile", "query",
"--work-no", "WORK_NO",
"--data-queries", `[]`,
); err == nil {
t.Fatal("query with empty data-queries array should error")
}
if emptyDataQueriesCaller.calls != 0 {
t.Fatalf("query with empty data-queries must not call MCP, got %d call(s)", emptyDataQueriesCaller.calls)
}
if err := executeHrbrainCommand(t, newHrbrainCommand(),
"profile", "query", "--work-no", "WORK_NO",
); err == nil {
t.Fatal("query without data-queries should error")
}
if err := executeHrbrainCommand(t, newHrbrainCommand(),
"profile", "query", "--data-queries", `[]`,
); err == nil {
t.Fatal("query without work-no should error")
}
}
func TestHrbrainProfileLabels(t *testing.T) {
installScriptedCaller(t, &scriptedToolCaller{dry: true})
if err := executeHrbrainCommand(t, newHrbrainCommand(),
"profile", "labels", "--staff-ids", "WORK_NO1,WORK_NO2", "--all-label",
); err != nil {
t.Fatalf("labels with staff-ids and all-label: %v", err)
}
if err := executeHrbrainCommand(t, newHrbrainCommand(),
"profile", "labels", "--staff-ids", "WORK_NO1",
); err != nil {
t.Fatalf("labels without all-label: %v", err)
}
if err := executeHrbrainCommand(t, newHrbrainCommand(),
"profile", "labels",
); err == nil {
t.Fatal("labels without staff-ids should error")
}
}
func TestHrbrainProfileCareer(t *testing.T) {
installScriptedCaller(t, &scriptedToolCaller{dry: true})
if err := executeHrbrainCommand(t, newHrbrainCommand(),
"profile", "career", "--work-no", "WORK_NO",
); err != nil {
t.Fatalf("career with work-no: %v", err)
}
if err := executeHrbrainCommand(t, newHrbrainCommand(),
"profile", "career",
); err == nil {
t.Fatal("career without work-no should error")
}
}
func TestHrbrainProfilePerformance(t *testing.T) {
installScriptedCaller(t, &scriptedToolCaller{dry: true})
if err := executeHrbrainCommand(t, newHrbrainCommand(),
"profile", "performance", "--work-no", "WORK_NO",
); err != nil {
t.Fatalf("performance with work-no: %v", err)
}
if err := executeHrbrainCommand(t, newHrbrainCommand(),
"profile", "performance",
); err == nil {
t.Fatal("performance without work-no should error")
}
}
func TestHrbrainSearchEmployees(t *testing.T) {
installScriptedCaller(t, &scriptedToolCaller{dry: true})
if err := executeHrbrainCommand(t, newHrbrainCommand(),
"search", "employees",
); err != nil {
t.Fatalf("search employees without optional flags: %v", err)
}
if err := executeHrbrainCommand(t, newHrbrainCommand(),
"search", "employees",
"--keyword", "张三", "--dept-name", "技术部", "--position-name", "工程师",
"--job-level", "P7", "--pool-code", "POOL_CODE",
"--page", "1", "--page-size", "20",
); err != nil {
t.Fatalf("search employees with all optional flags: %v", err)
}
}
func TestHrbrainSearchEmployeesStructured(t *testing.T) {
installScriptedCaller(t, &scriptedToolCaller{dry: true})
if err := executeHrbrainCommand(t, newHrbrainCommand(),
"search", "employees-structured",
"--origin-json", `{"rules":[{"field":"name","operator":"contains","value":"张"}],"combinator":"and"}`,
"--fields", `[{"label":"姓名","value":"name"}]`,
"--order-by", "name,dept",
"--page", "1", "--page-size", "20",
); err != nil {
t.Fatalf("search employees-structured with valid args: %v", err)
}
if err := executeHrbrainCommand(t, newHrbrainCommand(),
"search", "employees-structured",
"--origin-json", `{}`,
"--fields", `not-json`,
); err == nil {
t.Fatal("search employees-structured with invalid fields JSON should error")
}
invalidOriginJSONCaller := &scriptedToolCaller{dry: true}
installScriptedCaller(t, invalidOriginJSONCaller)
if err := executeHrbrainCommand(t, newHrbrainCommand(),
"search", "employees-structured",
"--origin-json", `not-json`,
"--fields", `[]`,
); err == nil {
t.Fatal("search employees-structured with invalid origin-json JSON should error")
}
if invalidOriginJSONCaller.calls != 0 {
t.Fatalf("search employees-structured with invalid origin-json must not call MCP, got %d call(s)", invalidOriginJSONCaller.calls)
}
// A bare JSON scalar (e.g. a number) is valid JSON per json.Valid, but it
// is not a JSON object, so it must still be rejected before dispatch.
nonObjectOriginJSONCaller := &scriptedToolCaller{dry: true}
installScriptedCaller(t, nonObjectOriginJSONCaller)
if err := executeHrbrainCommand(t, newHrbrainCommand(),
"search", "employees-structured",
"--origin-json", `111`,
"--fields", `[]`,
); err == nil {
t.Fatal("search employees-structured with non-object origin-json JSON should error")
}
if nonObjectOriginJSONCaller.calls != 0 {
t.Fatalf("search employees-structured with non-object origin-json must not call MCP, got %d call(s)", nonObjectOriginJSONCaller.calls)
}
// An empty --fields array is syntactically valid but selects no columns,
// so it must be rejected before dispatch.
emptyFieldsCaller := &scriptedToolCaller{dry: true}
installScriptedCaller(t, emptyFieldsCaller)
if err := executeHrbrainCommand(t, newHrbrainCommand(),
"search", "employees-structured",
"--origin-json", `{"rules":[],"combinator":"and"}`,
"--fields", `[]`,
); err == nil {
t.Fatal("search employees-structured with empty fields array should error")
}
if emptyFieldsCaller.calls != 0 {
t.Fatalf("search employees-structured with empty fields must not call MCP, got %d call(s)", emptyFieldsCaller.calls)
}
if err := executeHrbrainCommand(t, newHrbrainCommand(),
"search", "employees-structured", "--fields", `[]`,
); err == nil {
t.Fatal("search employees-structured without origin-json should error")
}
if err := executeHrbrainCommand(t, newHrbrainCommand(),
"search", "employees-structured", "--origin-json", `{}`,
); err == nil {
t.Fatal("search employees-structured without fields should error")
}
}
func TestHrbrainSearchFields(t *testing.T) {
installScriptedCaller(t, &scriptedToolCaller{dry: true})
if err := executeHrbrainCommand(t, newHrbrainCommand(),
"search", "fields",
); err != nil {
t.Fatalf("search fields: %v", err)
}
}
func TestHrbrainGroupCommandsWiring(t *testing.T) {
installScriptedCaller(t, &scriptedToolCaller{dry: true})
root := newHrbrainCommand()
if err := executeHrbrainCommand(t, root); err != nil {
t.Fatalf("hrbrain root with no args should show help: %v", err)
}
if err := executeHrbrainCommand(t, newHrbrainCommand(), "talent-pool"); err != nil {
t.Fatalf("talent-pool group with no args should show help: %v", err)
}
if err := executeHrbrainCommand(t, newHrbrainCommand(), "talent-pool", "bogus"); err == nil {
t.Fatal("talent-pool group with unknown subcommand should error")
}
if err := executeHrbrainCommand(t, newHrbrainCommand(), "profile"); err != nil {
t.Fatalf("profile group with no args should show help: %v", err)
}
if err := executeHrbrainCommand(t, newHrbrainCommand(), "profile", "bogus"); err == nil {
t.Fatal("profile group with unknown subcommand should error")
}
if err := executeHrbrainCommand(t, newHrbrainCommand(), "search"); err != nil {
t.Fatalf("search group with no args should show help: %v", err)
}
if err := executeHrbrainCommand(t, newHrbrainCommand(), "search", "bogus"); err == nil {
t.Fatal("search group with unknown subcommand should error")
}
}
+4 -6
View File
@@ -27,9 +27,7 @@ import (
"github.com/spf13/cobra"
)
// markdownStatUpload stats the prepared upload file. Tests override it to
// deterministically simulate the file disappearing between write and stat.
var markdownStatUpload = os.Stat
var markdownUploadStat = os.Stat
func newMarkdownCommand() *cobra.Command {
root := &cobra.Command{
@@ -261,7 +259,7 @@ func runMarkdownCreate(cmd *cobra.Command, _ []string) error {
if !hasMarkdownExtension(nameFlag) {
return fmt.Errorf("--name 必须以 .md 结尾,当前: %s", nameFlag)
}
info, err := markdownStatUpload(uploadPath)
info, err := markdownUploadStat(uploadPath)
if err != nil {
return fmt.Errorf("读取上传文件失败: %w", err)
}
@@ -425,7 +423,7 @@ func runMarkdownOverwrite(cmd *cobra.Command, _ []string) error {
if !hasMarkdownExtension(nameFlag) {
return fmt.Errorf("--name 必须以 .md 结尾,当前: %s", nameFlag)
}
info, err := markdownStatUpload(uploadPath)
info, err := markdownUploadStat(uploadPath)
if err != nil {
return fmt.Errorf("读取上传文件失败: %w", err)
}
@@ -567,7 +565,7 @@ func runMarkdownPatch(cmd *cobra.Command, _ []string) error {
if err := os.WriteFile(uploadPath, []byte(newContent), 0o600); err != nil {
return fmt.Errorf("写入临时文件失败: %w", err)
}
info, err := markdownStatUpload(uploadPath)
info, err := markdownUploadStat(uploadPath)
if err != nil {
return fmt.Errorf("读取临时文件失败: %w", err)
}
+52 -14
View File
@@ -24,20 +24,58 @@ func (markdownCIFailingReader) Read([]byte) (int, error) {
return 0, errors.New("forced read failure")
}
// installMarkdownStatUploadRemover overrides the markdownStatUpload seam so
// the prepared upload file is deterministically removed before stat runs,
// simulating the file disappearing between write and stat without racing a
// background goroutine.
func installMarkdownStatUploadRemover(t *testing.T) {
func installMarkdownCITempFileDisappearance(t *testing.T) {
t.Helper()
original := markdownStatUpload
markdownStatUpload = func(name string) (os.FileInfo, error) {
if err := os.Remove(name); err != nil && !os.IsNotExist(err) {
t.Errorf("removing upload file %q: %v", name, err)
original := markdownUploadStat
markdownUploadStat = func(path string) (os.FileInfo, error) {
if err := os.Remove(path); err != nil {
return nil, err
}
return os.Stat(name)
return os.Stat(path)
}
t.Cleanup(func() { markdownStatUpload = original })
t.Cleanup(func() { markdownUploadStat = original })
}
func TestCrossPlatformCoverageMarkdownUploadStatFailures(t *testing.T) {
t.Run("create", func(t *testing.T) {
installMarkdownDriveDeps(t, &markdownDriveCaller{format: "json"})
installMarkdownCITempFileDisappearance(t)
err := executeMarkdownDriveCommand(t, newMarkdownCommand(), nil,
"markdown", "create", "--name", "a.md", "--content", "body")
if err == nil || !strings.Contains(err.Error(), "读取上传文件失败") {
t.Fatalf("error = %v", err)
}
})
t.Run("overwrite", func(t *testing.T) {
installMarkdownDriveDeps(t, &markdownDriveCaller{format: "json"})
installMarkdownCITempFileDisappearance(t)
err := executeMarkdownDriveCommand(t, newMarkdownCommand(), nil,
"markdown", "overwrite", "--node", "node-1", "--space-id", "space-1",
"--name", "a.md", "--content", "body")
if err == nil || !strings.Contains(err.Error(), "读取上传文件失败") {
t.Fatalf("error = %v", err)
}
})
t.Run("patch", func(t *testing.T) {
caller := &markdownDriveCaller{
format: "json",
steps: []markdownDriveStep{
{text: `{"downloadUrl":"https://download.test/current.md","fileName":"current.md"}`},
{text: `{"fileName":"current.md"}`},
},
}
installMarkdownDriveDeps(t, caller)
installMarkdownHTTPGet(t, "old")
installMarkdownCITempFileDisappearance(t)
err := executeMarkdownDriveCommand(t, newMarkdownCommand(), nil,
"markdown", "patch", "--node", "node-1", "--space-id", "space-1",
"--pattern", "old", "--content", "new", "--yes")
if err == nil || !strings.Contains(err.Error(), "读取临时文件失败") {
t.Fatalf("error = %v", err)
}
})
}
func TestMarkdownCICoverageFetchAndOutputPaths(t *testing.T) {
@@ -160,7 +198,7 @@ func TestMarkdownCICoverageCreateEdges(t *testing.T) {
t.Run("temporary file disappears before stat", func(t *testing.T) {
installMarkdownDriveDeps(t, &markdownDriveCaller{format: "json"})
installMarkdownStatUploadRemover(t)
installMarkdownCITempFileDisappearance(t)
err := executeMarkdownDriveCommand(t, newMarkdownCommand(), nil,
"markdown", "create", "--name", "a.md", "--content", "body")
if err == nil || !strings.Contains(err.Error(), "读取上传文件失败") {
@@ -237,7 +275,7 @@ func TestMarkdownCICoverageOverwriteEdges(t *testing.T) {
t.Run("temporary file disappears before stat", func(t *testing.T) {
installMarkdownDriveDeps(t, &markdownDriveCaller{format: "json"})
installMarkdownStatUploadRemover(t)
installMarkdownCITempFileDisappearance(t)
err := executeMarkdownDriveCommand(t, newMarkdownCommand(), nil,
"markdown", "overwrite", "--node", "node-1", "--space-id", "space-1",
"--name", "a.md", "--content", "body")
@@ -414,7 +452,7 @@ func TestMarkdownCICoveragePatchEdges(t *testing.T) {
}
installMarkdownDriveDeps(t, caller)
installMarkdownHTTPGet(t, "old")
installMarkdownStatUploadRemover(t)
installMarkdownCITempFileDisappearance(t)
err := executeMarkdownDriveCommand(t, newMarkdownCommand(), nil,
"markdown", "patch", "--node", "node-1", "--space-id", "space-1",
"--pattern", "old", "--content", "new", "--yes")
@@ -22,9 +22,11 @@ type scriptedToolCaller struct {
index int
format string
dry bool
calls int
}
func (c *scriptedToolCaller) CallTool(context.Context, string, string, map[string]any) (*edition.ToolResult, error) {
c.calls++
if len(c.steps) == 0 {
return &edition.ToolResult{}, nil
}
+1
View File
@@ -34,6 +34,7 @@ func init() {
{"ding", newDingCommand},
{"doc", newDocCommand},
{"drive", newDriveCommand},
{"hrbrain", newHrbrainCommand},
{"live", newLiveCommand},
{"mail", newMailCommand},
{"markdown", newMarkdownCommand},
+15 -1
View File
@@ -455,6 +455,12 @@ func searchClassProject(data map[string]any) []map[string]any {
if !ok {
continue
}
// get_class_list wraps each shift's identity/label under shiftVO
// (item = {"shiftVO": {id, name, ...}}); unwrap it first, otherwise every
// row projects empty and the whole command silently returns nothing.
if vo, ok := m["shiftVO"].(map[string]any); ok {
m = vo
}
row := map[string]any{}
if v, ok := attendanceFirst(m, "id", "classId", "class_id"); ok {
row["classId"] = v
@@ -668,13 +674,21 @@ var SearchAdjustmentRule = shortcut.Shortcut{
// across candidate keys, so an unknown/empty shape yields an empty list rather
// than a crash or fabricated data.
func searchRuleProject(data map[string]any) []map[string]any {
raw := attendanceResolveList(data, "ruleList", "rules", "list", "items")
// get_overtime_rule nests the list under result.atRuleList and
// get_adjustment_rule under result.adjustmentList; both wrap each rule's
// identity/label under entityVO. Probe those container keys AND unwrap
// entityVO, otherwise +search-overtime-rule / +search-adjustment-rule
// silently return empty despite the backend returning rules.
raw := attendanceResolveList(data, "atRuleList", "adjustmentList", "ruleList", "rules", "list", "items")
out := make([]map[string]any, 0, len(raw))
for _, item := range raw {
m, ok := item.(map[string]any)
if !ok {
continue
}
if vo, ok := m["entityVO"].(map[string]any); ok {
m = vo
}
row := map[string]any{}
if v, ok := attendanceFirst(m, "id", "ruleId", "rule_id", "adjustmentId", "overtimeId"); ok {
row["ruleId"] = v
@@ -0,0 +1,70 @@
// Copyright 2026 Alibaba Group
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package attendance
import (
"encoding/json"
"testing"
)
// TestSearchClassProjectShiftVOShape guards against projection-data-loss:
// get_class_list nests the list under result.items and wraps each shift's
// identity under shiftVO. The projection must unwrap shiftVO or +search-class
// silently returns empty despite the backend returning shifts.
func TestSearchClassProjectShiftVOShape(t *testing.T) {
const raw = `{"result":{"items":[
{"shiftVO":{"id":957395083,"name":"default shift"}},
{"shiftVO":{"id":957395084,"name":"morning shift"}}
]}}`
var data map[string]any
if err := json.Unmarshal([]byte(raw), &data); err != nil {
t.Fatalf("unmarshal fixture: %v", err)
}
got := searchClassProject(data)
if len(got) != 2 {
t.Fatalf("lower/upper mismatch: 2 shifts in backend, projection returned %d (%v)", len(got), got)
}
if got[0]["name"] == nil || got[0]["classId"] == nil {
t.Fatalf("shiftVO fields not unwrapped: %v", got[0])
}
}
// TestSearchRuleProjectEntityVOShape guards get_overtime_rule (result.atRuleList)
// and get_adjustment_rule (result.adjustmentList), both wrapping the rule under
// entityVO. The resolver must probe those keys and unwrap entityVO or
// +search-overtime-rule / +search-adjustment-rule silently return empty.
func TestSearchRuleProjectEntityVOShape(t *testing.T) {
for _, tc := range []struct {
name, key string
}{
{"overtime", "atRuleList"},
{"adjustment", "adjustmentList"},
} {
raw := `{"result":{"` + tc.key + `":[
{"entityVO":{"id":11,"name":"weekday overtime"},"permissionVO":{}},
{"entityVO":{"id":12,"name":"holiday overtime"},"permissionVO":{}}
]}}`
var data map[string]any
if err := json.Unmarshal([]byte(raw), &data); err != nil {
t.Fatalf("[%s] unmarshal fixture: %v", tc.name, err)
}
got := searchRuleProject(data)
if len(got) != 2 {
t.Fatalf("[%s] lower/upper mismatch: result.%s has 2 entries, projection returned %d", tc.name, tc.key, len(got))
}
if got[0]["ruleId"] == nil || got[0]["name"] == nil {
t.Fatalf("[%s] entityVO fields not unwrapped: %v", tc.name, got[0])
}
}
}
+4 -1
View File
@@ -494,7 +494,10 @@ func roomGroupsProject(data map[string]any) []map[string]any {
// roomGroupsContainer locates the group slice across candidate wrapper keys,
// unwrapping one nested object layer (e.g. result.list) when needed.
func roomGroupsContainer(data map[string]any) []any {
keys := []string{"result", "data", "list", "items", "groups"}
// list_meeting_room_groups nests the groups under result.groupList;
// "groupList" MUST be probed or +room-groups silently returns empty despite
// the backend returning meeting-room groups.
keys := []string{"result", "data", "list", "items", "groupList", "groups"}
for _, k := range keys {
v, ok := data[k]
if !ok {
@@ -0,0 +1,37 @@
// Copyright 2026 Alibaba Group
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package calendar
import (
"encoding/json"
"testing"
)
// TestRoomGroupsProjectGroupListShape guards against projection-data-loss:
// list_meeting_room_groups nests the groups under result.groupList; the resolver
// must probe "groupList" or +room-groups silently returns empty despite the
// backend returning meeting-room groups.
func TestRoomGroupsProjectGroupListShape(t *testing.T) {
const raw = `{"result":{"groupList":[
{"groupId":"g1","groupName":"north rooms"},
{"groupId":"g2","groupName":"south rooms"}
]}}`
var data map[string]any
if err := json.Unmarshal([]byte(raw), &data); err != nil {
t.Fatalf("unmarshal fixture: %v", err)
}
if got := roomGroupsProject(data); len(got) != 2 {
t.Fatalf("lower/upper mismatch: result.groupList has 2 entries, projection returned %d", len(got))
}
}
+3 -3
View File
@@ -82,7 +82,7 @@ func botSearchProject(data map[string]any) []map[string]any {
// botResolveList locates the list payload inside the response, tolerating a bare
// top-level array or nesting under result/data/list/items containers.
func botResolveList(data map[string]any) []any {
for _, key := range []string{"result", "data", "list", "items", "robots", "records"} {
for _, key := range []string{"result", "data", "list", "items", "robots", "bots", "records"} {
v, ok := data[key]
if !ok {
continue
@@ -91,7 +91,7 @@ func botResolveList(data map[string]any) []any {
return arr
}
if inner, ok := v.(map[string]any); ok {
for _, ik := range []string{"list", "items", "robots", "records", "result", "data"} {
for _, ik := range []string{"list", "items", "robots", "bots", "records", "result", "data"} {
if arr, ok := inner[ik].([]any); ok {
return arr
}
@@ -158,7 +158,7 @@ func botFindProject(data map[string]any) []map[string]any {
continue
}
row := map[string]any{}
if v, ok := botFirst(m, "openDingTalkId", "open_ding_talk_id", "openId"); ok {
if v, ok := botFirst(m, "botOpenDingTalkId", "openDingTalkId", "open_ding_talk_id", "openId"); ok {
row["openDingTalkId"] = v
}
if v, ok := botFirst(m, "name", "robotName", "botName"); ok {
@@ -0,0 +1,56 @@
// Copyright 2026 Alibaba Group
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package chat
import (
"encoding/json"
"testing"
)
// TestBotFindProjectBotsShape guards the exact search_bots response contract:
// entries are nested under result.bots and expose botOpenDingTalkId. Losing
// either key makes +bot-find silently report no usable bots.
func TestBotFindProjectBotsShape(t *testing.T) {
const raw = `{"result":{"bots":[
{"botOpenDingTalkId":"bot-open-id-1","name":"Bot One"},
{"botOpenDingTalkId":"bot-open-id-2","name":"Bot Two"}
]}}`
var data map[string]any
if err := json.Unmarshal([]byte(raw), &data); err != nil {
t.Fatalf("unmarshal fixture: %v", err)
}
got := botFindProject(data)
if len(got) != 2 {
t.Fatalf("lower/upper mismatch: result.bots has 2 entries, projection returned %d (%v)", len(got), got)
}
if got[0]["openDingTalkId"] != "bot-open-id-1" || got[0]["name"] != "Bot One" {
t.Fatalf("bot fields missing: %v", got[0])
}
}
// TestBotSearchProjectRobotsShape ensures the shared resolver still accepts the
// search_my_robots response after adding the search_bots container.
func TestBotSearchProjectRobotsShape(t *testing.T) {
const raw = `{"result":{"robots":[{"robotCode":"robot-1","robotName":"Robot One"}]}}`
var data map[string]any
if err := json.Unmarshal([]byte(raw), &data); err != nil {
t.Fatalf("unmarshal fixture: %v", err)
}
got := botSearchProject(data)
if len(got) != 1 || got[0]["robotCode"] != "robot-1" || got[0]["robotName"] != "Robot One" {
t.Fatalf("robots shape regressed: %v", got)
}
}
@@ -0,0 +1,44 @@
// Copyright 2026 Alibaba Group
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package chat
import (
"encoding/json"
"testing"
)
// TestChatBotsProjectBotsShape guards against projection-data-loss:
// list_group_bots nests its entries under result.bots; the shared resolver
// must probe "bots" or +chat-bots silently reports zero robots.
func TestChatBotsProjectBotsShape(t *testing.T) {
const raw = `{"result":{"bots":[
{"openBotId":"bot-1","name":"AI小钉"},
{"openBotId":"bot-2","name":"本地opencode"},
{"openBotId":"bot-3","name":"hermes助手"},
{"openBotId":"bot-4","name":"claudecode 助手"},
{"openBotId":"bot-5","name":"ClawdBot"}
]}}`
var data map[string]any
if err := json.Unmarshal([]byte(raw), &data); err != nil {
t.Fatalf("unmarshal fixture: %v", err)
}
got := chatBotsProject(data)
if len(got) != 5 {
t.Fatalf("lower/upper mismatch: result.bots has 5 entries, projection returned %d (%v)", len(got), got)
}
if got[0]["openBotId"] != "bot-1" || got[0]["name"] != "AI小钉" {
t.Fatalf("bot fields missing: %v", got[0])
}
}
+8 -2
View File
@@ -413,7 +413,13 @@ func chatGroupResolveList(data map[string]any) []any {
if data == nil {
return []any{}
}
for _, key := range []string{"result", "data", "list", "items", "groups", "conversations"} {
// "bots" and "roles" are probed too: chatBotsProject and
// chatRoleListProject reuse this resolver, while their backing tools nest
// lists under result.bots and result.roles. Without those keys the
// shortcuts silently return empty despite the group having bots or roles.
// Group listings key on groups/conversations, which are probed first, so
// adding these sibling containers is harmless to them.
for _, key := range []string{"result", "data", "list", "items", "groups", "conversations", "bots", "roles"} {
v, ok := data[key]
if !ok {
continue
@@ -422,7 +428,7 @@ func chatGroupResolveList(data map[string]any) []any {
return arr
}
if inner, ok := v.(map[string]any); ok {
for _, ik := range []string{"list", "items", "groups", "conversations", "result", "data"} {
for _, ik := range []string{"list", "items", "groups", "conversations", "bots", "roles", "result", "data"} {
if arr, ok := inner[ik].([]any); ok {
return arr
}
@@ -0,0 +1,54 @@
// Copyright 2026 Alibaba Group
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package chat
import (
"encoding/json"
"testing"
)
// TestChatRoleListProjectRolesShape guards against projection-data-loss:
// list_custom_group_roles nests the roles under result.roles; the shared
// resolver must probe "roles" or +chat-role-list silently returns empty despite
// the group having custom roles.
func TestChatRoleListProjectRolesShape(t *testing.T) {
const raw = `{"result":{"roles":[
{"openRoleId":"r1","name":"CTO"},
{"openRoleId":"r2","name":"CEO"}
]}}`
var data map[string]any
if err := json.Unmarshal([]byte(raw), &data); err != nil {
t.Fatalf("unmarshal fixture: %v", err)
}
got := chatRoleListProject(data)
if len(got) != 2 {
t.Fatalf("lower/upper mismatch: result.roles has 2 entries, projection returned %d (%v)", len(got), got)
}
if got[0]["openRoleId"] == nil || got[0]["name"] == nil {
t.Fatalf("role fields missing: %v", got[0])
}
}
// TestChatGroupResolveListStillHandlesGroups ensures adding "roles" did not
// disturb the group-listing shape the resolver is shared with.
func TestChatGroupResolveListStillHandlesGroups(t *testing.T) {
const raw = `{"result":{"groups":[{"openConversationId":"c1","title":"project group"}]}}`
var data map[string]any
if err := json.Unmarshal([]byte(raw), &data); err != nil {
t.Fatalf("unmarshal fixture: %v", err)
}
if got := chatGroupResolveList(data); len(got) != 1 {
t.Fatalf("group shape regressed: want 1, got %d", len(got))
}
}
+51 -4
View File
@@ -214,13 +214,13 @@ func listRolesResolveList(data map[string]any) []any {
continue
}
if arr, ok := v.([]any); ok {
return arr
return listRolesFlattenGroups(arr)
}
// container may itself wrap the list one level deeper
if inner, ok := v.(map[string]any); ok {
for _, ik := range []string{"list", "items", "labels", "result", "data"} {
if arr, ok := inner[ik].([]any); ok {
return arr
return listRolesFlattenGroups(arr)
}
}
}
@@ -228,6 +228,42 @@ func listRolesResolveList(data map[string]any) []any {
return []any{}
}
// listRolesFlattenGroups flattens the grouped get_org_labels response into a
// flat list of label objects. get_org_labels returns result[] as label GROUPS
// ({groupName, labels[]}), nesting the actual roles one level under each group's
// labels[]. A naive top-level scan would hand back the group wrappers — which
// carry no labelId/name — so every row would silently project to empty. When
// the array is already a flat label list (no per-group labels[]), it is returned
// unchanged so the projection tolerates both response shapes.
func listRolesFlattenGroups(arr []any) []any {
flattened := make([]any, 0, len(arr))
sawGroup := false
for _, item := range arr {
m, ok := item.(map[string]any)
if !ok {
flattened = append(flattened, item)
continue
}
var nested []any
for _, gk := range []string{"labels", "subLabels"} {
if inner, ok := m[gk].([]any); ok {
nested = inner
break
}
}
if nested != nil {
sawGroup = true
flattened = append(flattened, nested...)
continue
}
flattened = append(flattened, item)
}
if sawGroup {
return flattened
}
return arr
}
// listRolesFirst returns the first present candidate key's value.
func listRolesFirst(m map[string]any, keys ...string) (any, bool) {
for _, k := range keys {
@@ -291,6 +327,12 @@ func memberListProject(data map[string]any) []map[string]any {
if !ok {
continue
}
// get_dept_members_by_deptId wraps each member under userInfo
// (deptUserList item = {"userInfo": {userId, name, ...}}); unwrap it or
// every row projects empty and +list-dept-members silently returns none.
if ui, ok := m["userInfo"].(map[string]any); ok {
m = ui
}
row := map[string]any{}
if v := memberListFirst(m, "userId", "user_id", "userid", "id"); v != nil {
row["userId"] = v
@@ -306,9 +348,14 @@ func memberListProject(data map[string]any) []map[string]any {
}
// memberListFindList returns the first slice found under the common list
// container keys, or nil when none is present.
// container keys, or nil when none is present. get_dept_members_by_deptId nests
// its members under deptUserList, so that key must be probed too.
func memberListFindList(m map[string]any) []any {
for _, k := range []string{"result", "data", "list", "items", "members", "userList"} {
// get_dept_members_by_deptId nests under deptUserList and
// get_label_members_by_labelId under labelUserList; both must be probed (and
// each item unwrapped from userInfo above) or +list-dept-members /
// +list-role-members silently return empty despite having members.
for _, k := range []string{"result", "data", "list", "items", "members", "userList", "deptUserList", "labelUserList"} {
if arr, ok := m[k].([]any); ok {
return arr
}
@@ -0,0 +1,84 @@
// Copyright 2026 Alibaba Group
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package contact
import (
"encoding/json"
"testing"
)
// TestListRolesProjectGroupedShape guards against the projection-data-loss class:
// get_org_labels returns result[] as label GROUPS with the real roles nested one
// level under each group's labels[]. The projection MUST descend into those
// nested labels[] rather than treating group wrappers as roles — otherwise it
// silently returns empty (exit 0, no error envelope) while the backend has data.
func TestListRolesProjectGroupedShape(t *testing.T) {
// Faithful get_org_labels shape (as returned by the backend / leaf command).
const raw = `{"result":[
{"groupName":"default","labels":[
{"labelId":101,"name":"roleA"},
{"labelId":102,"name":"roleB"},
{"labelId":103,"name":"roleC"}]},
{"groupName":"job","labels":[
{"labelId":104,"name":"roleD"},
{"labelId":105,"name":"roleE"}]}
]}`
var data map[string]any
if err := json.Unmarshal([]byte(raw), &data); err != nil {
t.Fatalf("unmarshal fixture: %v", err)
}
roles := listRolesProject(data)
if len(roles) != 5 {
t.Fatalf("lower/upper mismatch: 5 roles in backend, projection returned %d (roles=%v)", len(roles), roles)
}
for _, r := range roles {
if r["labelId"] == nil || r["labelName"] == nil {
t.Fatalf("projected role missing labelId/labelName: %v", r)
}
}
}
// TestListRolesProjectNestedWrapperAndNonMap covers the nested map-wrapper branch
// ({result:{labels:[...]}}) and a non-map array element, which must be passed
// through rather than dropped.
func TestListRolesProjectNestedWrapperAndNonMap(t *testing.T) {
const raw = `{"result":{"labels":[
{"groupName":"default","labels":[{"labelId":1,"name":"roleA"}]},
"junk"
]}}`
var data map[string]any
if err := json.Unmarshal([]byte(raw), &data); err != nil {
t.Fatalf("unmarshal fixture: %v", err)
}
if roles := listRolesProject(data); len(roles) != 1 {
t.Fatalf("nested wrapper + non-map: want 1 role, got %d (%v)", len(roles), roles)
}
}
// TestListRolesProjectFlatShape ensures the flatten step is a no-op when the
// response is already a flat label list (response-shape drift tolerance).
func TestListRolesProjectFlatShape(t *testing.T) {
const raw = `{"result":[
{"labelId":1,"name":"sales"},
{"labelId":2,"name":"market"}
]}`
var data map[string]any
if err := json.Unmarshal([]byte(raw), &data); err != nil {
t.Fatalf("unmarshal fixture: %v", err)
}
if roles := listRolesProject(data); len(roles) != 2 {
t.Fatalf("flat shape: want 2 roles, got %d (%v)", len(roles), roles)
}
}
@@ -0,0 +1,76 @@
// Copyright 2026 Alibaba Group
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package contact
import (
"encoding/json"
"testing"
)
// TestMemberListProjectDeptUserListShape guards against projection-data-loss:
// get_dept_members_by_deptId returns members under deptUserList, each wrapped in
// userInfo. The resolver must probe deptUserList AND unwrap userInfo or
// +list-dept-members silently returns empty despite the backend returning members.
func TestMemberListProjectDeptUserListShape(t *testing.T) {
const raw = `{"deptUserList":[
{"userInfo":{"userId":"u1","name":"Alice"}},
{"userInfo":{"userId":"u2","name":"Bob"}}
]}`
var data map[string]any
if err := json.Unmarshal([]byte(raw), &data); err != nil {
t.Fatalf("unmarshal fixture: %v", err)
}
got := memberListProject(data)
if len(got) != 2 {
t.Fatalf("lower/upper mismatch: deptUserList has 2 members, projection returned %d (%v)", len(got), got)
}
if got[0]["userId"] == nil || got[0]["name"] == nil {
t.Fatalf("userInfo fields not unwrapped: %v", got[0])
}
}
// TestMemberListProjectLabelUserListShape guards the role-member path:
// get_label_members_by_labelId nests members under labelUserList, each wrapped
// in userInfo. The resolver must probe labelUserList AND unwrap userInfo or
// +list-role-members silently returns empty despite the role having members.
func TestMemberListProjectLabelUserListShape(t *testing.T) {
const raw = `{"labelUserList":[
{"userInfo":{"userId":"u1","name":"Carol"}},
{"userInfo":{"userId":"u2","name":"Dave"}}
]}`
var data map[string]any
if err := json.Unmarshal([]byte(raw), &data); err != nil {
t.Fatalf("unmarshal fixture: %v", err)
}
got := memberListProject(data)
if len(got) != 2 {
t.Fatalf("lower/upper mismatch: labelUserList has 2 members, projection returned %d (%v)", len(got), got)
}
if got[0]["userId"] == nil || got[0]["name"] == nil {
t.Fatalf("userInfo not unwrapped: %v", got[0])
}
}
// TestMemberListProjectFlatRoleShape ensures the shared projection still handles
// a flat member shape unchanged.
func TestMemberListProjectFlatRoleShape(t *testing.T) {
const raw = `{"result":[{"userId":"u9","name":"Alice"}]}`
var data map[string]any
if err := json.Unmarshal([]byte(raw), &data); err != nil {
t.Fatalf("unmarshal fixture: %v", err)
}
if got := memberListProject(data); len(got) != 1 {
t.Fatalf("flat role-member shape: want 1, got %d (%v)", len(got), got)
}
}
+27 -3
View File
@@ -495,8 +495,16 @@ var Recent = shortcut.Shortcut{
// document list, dropping transport noise (logId) while keeping the pagination
// cursor.
func recentListProject(data map[string]any) map[string]any {
// get_recent_list nests its payload under result.recentItems; earlier this
// read data["recentItems"] at the top level only, so the whole list silently
// projected to empty. Resolve the payload container (top-level or one level
// under result/data) before reading recentItems / pagination fields.
payload := data
if inner, ok := recentListPayload(data); ok {
payload = inner
}
items := []map[string]any{}
raw, _ := data["recentItems"].([]any)
raw, _ := payload["recentItems"].([]any)
for _, it := range raw {
m, ok := it.(map[string]any)
if !ok {
@@ -512,15 +520,31 @@ func recentListProject(data map[string]any) map[string]any {
})
}
out := map[string]any{"count": len(items), "items": items}
if nc, ok := data["nextCursor"]; ok && nc != nil {
if nc, ok := payload["nextCursor"]; ok && nc != nil {
out["nextCursor"] = nc
}
if hm, ok := data["hasMore"]; ok {
if hm, ok := payload["hasMore"]; ok {
out["hasMore"] = hm
}
return out
}
// recentListPayload returns the map that actually holds recentItems, tolerating
// a {result|data:{recentItems:[...]}} envelope as well as a bare top-level shape.
func recentListPayload(data map[string]any) (map[string]any, bool) {
if _, ok := data["recentItems"]; ok {
return data, true
}
for _, k := range []string{"result", "data"} {
if inner, ok := data[k].(map[string]any); ok {
if _, ok := inner["recentItems"]; ok {
return inner, true
}
}
}
return nil, false
}
func init() {
shortcut.Register(
List,
@@ -0,0 +1,66 @@
// Copyright 2026 Alibaba Group
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package drive
import (
"encoding/json"
"testing"
)
// TestRecentListProjectResultWrapper guards against projection-data-loss:
// get_recent_list nests its payload under result.recentItems; the projection
// must descend into result or +recent silently returns empty despite backend
// records.
func TestRecentListProjectResultWrapper(t *testing.T) {
const raw = `{"result":{"hasMore":true,"nextCursor":"c2","recentItems":[
{"name":"weekly report","nodeType":"doc","nodeId":"n1","docUrl":"https://x/1"},
{"name":"budget sheet","nodeType":"sheet","nodeId":"n2","docUrl":"https://x/2"}
]}}`
var data map[string]any
if err := json.Unmarshal([]byte(raw), &data); err != nil {
t.Fatalf("unmarshal fixture: %v", err)
}
out := recentListProject(data)
if got, _ := out["count"].(int); got != 2 {
t.Fatalf("lower/upper mismatch: result.recentItems has 2 entries, projection count=%v (%v)", out["count"], out)
}
if out["hasMore"] != true || out["nextCursor"] != "c2" {
t.Fatalf("pagination fields lost from result wrapper: %v", out)
}
}
// TestRecentListProjectNoItems covers the no-recentItems branch (payload not
// found under any wrapper), which must yield an empty list, not a panic.
func TestRecentListProjectNoItems(t *testing.T) {
const raw = `{"result":{"totalCount":0},"success":true}`
var data map[string]any
if err := json.Unmarshal([]byte(raw), &data); err != nil {
t.Fatalf("unmarshal fixture: %v", err)
}
if out := recentListProject(data); out["count"].(int) != 0 {
t.Fatalf("no recentItems: want count 0, got %v", out["count"])
}
}
// TestRecentListProjectTopLevel covers the already-unwrapped shape.
func TestRecentListProjectTopLevel(t *testing.T) {
const raw = `{"recentItems":[{"name":"weekly report","nodeId":"n1"}],"hasMore":false}`
var data map[string]any
if err := json.Unmarshal([]byte(raw), &data); err != nil {
t.Fatalf("unmarshal fixture: %v", err)
}
if out := recentListProject(data); out["count"].(int) != 1 {
t.Fatalf("top-level recentItems: want count 1, got %v", out["count"])
}
}
+1 -1
View File
@@ -106,7 +106,7 @@ func threadListProject(data map[string]any) []map[string]any {
if v, ok := threadListFirst(m, "subject", "title", "topic"); ok {
row["subject"] = v
}
if v, ok := threadListFirst(m, "lastUpdated", "last_updated", "updateTime", "modifiedTime", "sentDateTime"); ok {
if v, ok := threadListFirst(m, "lastUpdated", "last_updated", "lastModifiedDateTime", "updateTime", "modifiedTime", "sentDateTime"); ok {
row["lastUpdated"] = v
}
if v, ok := threadListFirst(m, "isRead", "is_read", "read", "unread"); ok {
@@ -0,0 +1,50 @@
// Copyright 2026 Alibaba Group
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package mail
import (
"encoding/json"
"testing"
)
// TestThreadListProjectConversationsShape guards the exact
// list_mailbox_threads response contract, including lastModifiedDateTime.
func TestThreadListProjectConversationsShape(t *testing.T) {
const raw = `{"result":{"conversations":[{
"id":"thread-1",
"subject":"Projection contract",
"lastModifiedDateTime":"2026-07-26T10:00:00Z",
"isRead":false
}]}}`
var data map[string]any
if err := json.Unmarshal([]byte(raw), &data); err != nil {
t.Fatalf("unmarshal fixture: %v", err)
}
got := threadListProject(data)
if len(got) != 1 {
t.Fatalf("lower/upper mismatch: result.conversations has 1 entry, projection returned %d (%v)", len(got), got)
}
want := map[string]any{
"conversationId": "thread-1",
"subject": "Projection contract",
"lastUpdated": "2026-07-26T10:00:00Z",
"isRead": false,
}
for key, value := range want {
if got[0][key] != value {
t.Fatalf("%s mismatch: want %v, got %v (row=%v)", key, value, got[0][key], got[0])
}
}
}
@@ -0,0 +1,42 @@
// Copyright 2026 Alibaba Group
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package minutes
import (
"encoding/json"
"testing"
)
// TestCallListProjectItemListShape guards against projection-data-loss end to
// end: list_by_keyword_and_time_range nests the minutes under result.itemList,
// so the resolver must probe "itemList", and each projected row must carry the
// real taskUuid that record-control commands consume. minutesId is deliberately
// not treated as a taskUuid (see callListProject).
func TestCallListProjectItemListShape(t *testing.T) {
const raw = `{"result":{"itemList":[
{"taskUuid":"uuid-1","title":"weekly sync"},
{"task_uuid":"uuid-2","title":"design review"}
]}}`
var data map[string]any
if err := json.Unmarshal([]byte(raw), &data); err != nil {
t.Fatalf("unmarshal fixture: %v", err)
}
got := callListProject(data)
if len(got) != 2 {
t.Fatalf("lower/upper mismatch: itemList has 2 entries, projection returned %d", len(got))
}
if got[0]["taskUuid"] != "uuid-1" || got[1]["taskUuid"] != "uuid-2" {
t.Fatalf("taskUuid not projected from taskUuid/task_uuid keys: %v", got)
}
}

Some files were not shown because too many files have changed in this diff Show More