Commit Graph
138 Commits
Author SHA1 Message Date
tianlei.qjb e976bd5fc9 - release.yml: add DWS_PACKAGE_VERSION=${{ github.ref_name }} 2026-04-01 17:04:34 +08:00
tianlei.qjb 86355413fc fix: unify version management - pass git tag to post-goreleaser.sh 2026-04-01 17:03:52 +08:00
fantiu c650afa6eb Merge pull request #66 from DingTalk-Real-AI/feat-performance
feat(auth): fail-fast for unauthenticated requests before MCP call
2026-04-01 15:53:28 +08:00
fantiu 14f558facf feat(auth): fail-fast for unauthenticated requests before MCP call
- Add token validation in executeInvocation to reject requests early
- Return clear Chinese error message: '未登录,请先执行 dws auth login'
- Include actionable hint and suggested command in error response
- Avoid wasting network resources on HTTP 400 from MCP gateway

Also includes:
- Add DWS_PERF_TIMING env for CLI execution timing analysis
- Add TimingCollector to track cmd_init, auth_token, mcp_call durations

Test changes:
- Add --token flag to tests that require authentication
- Add TestRuntimeRunnerRejectsUnauthenticatedRequest test case
2026-04-01 15:48:23 +08:00
coffeeBigSir 0257d1f084 Merge pull request #65 from DingTalk-Real-AI/releasescript-yh
refactor: unify version management - Git tag as SSOT
2026-04-01 15:11:23 +08:00
tianlei.qjb b1b4730536 refactor: unify version management - Git tag as SSOT 2026-04-01 15:05:31 +08:00
fantiu f732dcd2ba Merge pull request #64 from DingTalk-Real-AI/feat-auth-improvement
fix(auth): prevent auth code expiration error on OAuth callback page …
2026-04-01 14:54:30 +08:00
fantiu 8406355e7f fix(auth): prevent auth code expiration error on OAuth callback page refresh 2026-04-01 14:48:58 +08:00
coffeeBigSir 3c5f40648e Merge pull request #63 from audanye-sudo/docs/optimize-readme
docs: simplify getting started section in README
2026-04-01 11:50:32 +08:00
audanye-sudo 794e168008 docs: simplify getting started section with inline login commands
- Show both browser and device-flow login commands upfront
- Remove authorization screenshot image for cleaner layout
2026-04-01 11:47:47 +08:00
fantiu 35548e4780 Merge pull request #62 from DingTalk-Real-AI/feat-login-optimization
feat(auth): persist OAuth credentials for reliable token refresh
2026-04-01 11:05:47 +08:00
fantiu 2a056cc5d0 feat(auth): persist OAuth credentials for reliable token refresh 2026-04-01 11:03:08 +08:00
coffeeBigSir 3baadb99ce Merge pull request #60 from audanye-sudo/feat/onboarding-official-app-mode
docs: add Official App onboarding mode to Getting Started
2026-04-01 11:01:17 +08:00
audanye-sudo fcb8b2c782 docs: add Official App mode to Getting Started and update onboarding flow
- Add two authentication modes: Official App (recommended) and Custom App
- Official App mode: direct login without creating an app, admin-controlled access
- Include authorization flow screenshots for both enabled/disabled org scenarios
- Add collapsible admin guide for enabling CLI access and handling member requests
- Move Custom App steps into collapsible sections to reduce visual noise
- Remove whitelist references from IMPORTANT banner
- Update Agent usage section to show both auth modes
2026-04-01 10:59:07 +08:00
coffeeBigSir fc49f3dc7a Merge pull request #59 from audanye-sudo/feat/base-experience-upgrade
fix: error diagnostics enhancement and logging reliability
2026-04-01 09:37:21 +08:00
audanye-sudo 8fb0ecb9ba fix: resolve verbosity flag lookup, FileLogger lazy binding, and business error logging
- resolveVerbosity: use cmd.Flags() instead of PersistentFlags() to correctly
  pick up inherited --verbose/--debug flags on subcommands
- FileLogger lazy binding: bind in executeInvocation since configureLogLevel
  initializes it after runner construction
- logBusinessError: log MCP tool errors and business errors (HTTP 200 +
  success=false) to file logger for offline diagnosis
2026-04-01 09:33:09 +08:00
audanye-sudo ce6c32bf53 feat: enhance error diagnostics with trace ID, server error code, and comprehensive logging
Improve CLI error output and local logging to enable offline issue diagnosis:

- Add ServerDiagnostics struct to extract and propagate trace_id, server_error_code,
  technical_detail, and server_retryable from MCP server responses
- Extract diagnostics from JSON-RPC error.data, tool call result content, and HTTP
  response headers (X-Trace-Id, X-Request-Id, x-dingtalk-trace-id)
- Redesign PrintHuman with three verbosity levels (Normal/Verbose/Debug):
  Normal shows trace ID + server code; Verbose adds technical detail;
  Debug adds internal diagnostics (RPC code, operation, reason)
- Add PrintHumanAt for explicit verbosity control, PrintHuman defaults to Normal
- Enhance local logging with request body (sanitized), response body (on error),
  retry attempts, and error classification events
- Add TruncateBody, SanitizeArguments, RedactHeaders logging utilities with
  sensitive key detection via substring matching
- Fix respRetryAfter called before nil guard in doWithRetry retry loop
- Use GetBool instead of string comparison for flag resolution
2026-04-01 09:32:59 +08:00
fantiu 7dbef98dd0 Merge pull request #58 from fantiu/feat-login-upgrade
Feat login upgrade
2026-04-01 00:53:52 +08:00
fantiu 773804ee80 feat(auth): enhance device flow with CLI auth check and admin guidance 2026-04-01 00:47:49 +08:00
fantiu 1df56cc99b Merge branch 'DingTalk-Real-AI:main' into main 2026-03-31 21:06:17 +08:00
coffeeBigSir 0606762c29 Merge pull request #51 from Gyyshen/feature/addskill
feature: add skill management command for downloading and installing skills
2026-03-31 19:29:20 +08:00
meng93 e7677df541 Merge pull request #53 from DingTalk-Real-AI/feat/support-issue-notification
feat: 支持issuie消息通知
2026-03-31 18:58:47 +08:00
meng93 dda4dacb1c feat: to #73551688 支持消息通知 2026-03-31 17:38:08 +08:00
shenyunliang 345156c605 fix: correct import path for errors package in skill_command.go 2026-03-31 16:21:22 +08:00
github-actions[bot] 75b873d231 chore: update coverage badge [skip ci] 2026-03-31 05:47:53 +00:00
coffeeBigSir a912cbc52b Merge pull request #43 from audanye-sudo/feat/stability-and-hint-optimization
docs: update DingTalk co-creation group QR code
2026-03-31 10:03:38 +08:00
audanye-sudo 5a99b84c25 docs: update DingTalk co-creation group QR code image 2026-03-31 10:00:56 +08:00
audanye-sudoandClaude Opus 4.6 7fda120d5a feat: enhance error diagnostics with trace ID, server error code, and comprehensive logging
Improve CLI error output and local logging to enable offline issue diagnosis:

- Add ServerDiagnostics struct to extract and propagate trace_id, server_error_code,
  technical_detail, and server_retryable from MCP server responses
- Extract diagnostics from JSON-RPC error.data, tool call result content, and HTTP
  response headers (X-Trace-Id, X-Request-Id, x-dingtalk-trace-id)
- Redesign PrintHuman with three verbosity levels (Normal/Verbose/Debug):
  Normal shows trace ID + server code; Verbose adds technical detail;
  Debug adds internal diagnostics (RPC code, operation, reason)
- Add PrintHumanAt for explicit verbosity control, PrintHuman defaults to Normal
- Enhance local logging with request body (sanitized), response body (on error),
  retry attempts, and error classification events
- Add TruncateBody, SanitizeArguments, RedactHeaders logging utilities with
  sensitive key detection via substring matching
- Fix respRetryAfter called before nil guard in doWithRetry retry loop
- Use GetBool instead of string comparison for flag resolution

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-31 09:01:41 +08:00
fantiu 3b8233e6ba Merge pull request #40 from fantiu/feat-readme-typo
docs(readme): combine redirect URLs into single line for easier copy-pasteFeat readme typo
2026-03-30 16:08:15 +08:00
fantiu 675ce53c06 Merge branch 'main' of github.com:fantiu/dingtalk-workspace-cli into feat-readme-typo
docs(readme): combine redirect URLs into single line for easier copy-paste
2026-03-30 16:01:32 +08:00
fantiu d51c1ff131 docs(readme): combine redirect URLs into single line for easier copy-paste 2026-03-30 16:01:03 +08:00
fantiu 8b423b97e8 Merge pull request #39 from fantiu/feat-performance
perf(auth): cache resolved credentials to avoid repeated keychain access
2026-03-30 15:22:15 +08:00
fantiu 1a6d129fe3 调整回调地址格式 2026-03-30 15:17:56 +08:00
fantiu a0bf715ddf Merge branch 'main' of github.com:fantiu/dingtalk-workspace-cli into feat-performance
解决Windows issue bug,修改readme回调地址格式
2026-03-30 15:11:29 +08:00
github-actions[bot] d2c5a027d4 chore: update coverage badge [skip ci] 2026-03-30 07:09:07 +00:00
fantiu 077665e27b Merge branch 'DingTalk-Real-AI:main' into main 2026-03-30 15:08:10 +08:00
coffeeBigSir 5c41d2b8f4 Merge pull request #29 from DingTalk-Real-AI/xtyh
Xtyh
2026-03-30 14:55:46 +08:00
tianlei.qjb 7d9e592f84 去除message history 2026-03-30 14:49:30 +08:00
tianlei.qjb 11199e6848 add interactive confirmation for destructive dynamic commands 2026-03-30 14:23:50 +08:00
tianlei.qjb 19c38d4b94 add report helper with flexible date parsing and defaults 2026-03-30 13:44:01 +08:00
tianlei.qjb 851cf43180 Merge branch 'main' of https://github.com/DingTalk-Real-AI/dingtalk-workspace-cli into xtyh 2026-03-30 13:32:31 +08:00
github-actions[bot] e004df38c7 chore: update coverage badge [skip ci] 2026-03-30 04:01:24 +00:00
fantiu 3bb504bb1f feat(auth): persist client credentials and optimize keychain access
- Auto-persist client-id/client-secret after successful login (stored in keychain)
- Enhanced logout to clean up app.json, keychain secrets, and token.json
- Fixed OAuth callback race condition (write response before sending code)
- Added credentials cache to avoid repeated keychain access (improves CLI speed)
- Updated README with credential priority docs and bumped to v1.0.5
2026-03-30 11:59:03 +08:00
fantiu 26263f8a17 feat(auth): persist client credentials and optimize keychain access
- Auto-persist client-id/client-secret after successful login (stored in keychain)
- Enhanced logout to clean up app.json, keychain secrets, and token.json
- Fixed OAuth callback race condition (write response before sending code)
- Added credentials cache to avoid repeated keychain access (improves CLI speed)
- Updated README with credential priority docs and bumped to v1.0.4
2026-03-30 11:57:07 +08:00
fantiu fc22f53b92 Merge pull request #33 from fantiu/feat-application
feat(auth): persist client credentials for token refresh
v1.0.4
2026-03-30 11:41:56 +08:00
fantiu 654bcc4ecb feat(auth): persist client credentials for token refresh
When logging in with --client-id and --client-secret, credentials are now
automatically persisted to enable automatic token refresh after expiration.
Client secret is securely stored in system Keychain, config file only
contains a reference.
2026-03-30 11:34:11 +08:00
fantiu 2175f2fe59 merge 2026-03-30 11:15:53 +08:00
fantiu 81ca098db1 调整readme 2026-03-30 11:10:15 +08:00
fantiu 3e3c17d686 Merge branch 'main' of github.com:fantiu/dingtalk-workspace-cli into feat-application
feat(auth): persist client credentials for token refresh

When logging in with --client-id and --client-secret, credentials are now
automatically persisted to enable automatic token refresh after expiration.
Client secret is securely stored in system Keychain, config file only
contains a reference.
2026-03-30 10:58:37 +08:00
fantiu 964855373e feat(auth): persist client credentials for token refresh
When logging in with --client-id and --client-secret, credentials are now
automatically persisted to enable automatic token refresh after expiration.
Client secret is securely stored in system Keychain, config file only
contains a reference.
2026-03-30 10:53:26 +08:00