Commit Graph
165 Commits
Author SHA1 Message Date
fantiu a18ce2e54d feat: add self-upgrade command with GitHub Releases, atomic flow, and cross-platform support 2026-04-02 16:34:51 +08:00
fantiu a0dc5d6183 Merge branch 'main' of github.com:fantiu/dingtalk-workspace-cli into feat-login-upgrade
feat: add upgrade command.
2026-04-02 15:44:49 +08:00
fantiu 5149f6808f Merge branch 'DingTalk-Real-AI:main' into main 2026-04-02 15:43:07 +08:00
meng93 918db33a8b Merge pull request #74 from DingTalk-Real-AI/feat/issue-label
feat/issue label
2026-04-02 14:54:08 +08:00
meng93 95cbde9187 Merge branch 'main' of https://github.com/DingTalk-Real-AI/dingtalk-workspace-cli into feat/issue-label 2026-04-02 14:48:42 +08:00
meng93 5e194393ff feat: to #73551688 支持上报用例集标签 2026-04-02 14:48:02 +08:00
fantiu 3da572a76a Merge remote-tracking branch 'origin/main' into feat-login-upgrade 2026-04-02 11:47:58 +08:00
github-actions[bot] a116cba8ba chore: update coverage badge [skip ci] 2026-04-02 03:32:07 +00:00
fantiu fe5952fe14 Merge branch 'DingTalk-Real-AI:main' into main 2026-04-02 11:30:30 +08:00
coffeeBigSir 2ab45ffd90 Merge pull request #72 from fantiu/feat-check-enable
feat(auth): switch CLI auth check to fail-closed with unified retry
2026-04-02 11:27:59 +08:00
fantiu 7c4932154c fix:auth check test file gofmt. 2026-04-02 11:20:06 +08:00
fantiu e2dbaa7c78 feat(auth): unify MCP retry constant and add retry to remaining endpoints 2026-04-02 11:10:49 +08:00
fantiu 11a0dbc84a feat(auth): unify MCP retry constant and add retry to remaining endpoints 2026-04-02 10:55:51 +08:00
fantiu ee441643dd fix(auth): switch CLI auth check from fail-open to fail-closed
Previously, when the /cli/cliAuthEnabled API was unreachable (network
error, timeout, 5xx, etc.), both OAuth and Device Flow login modes
silently assumed CLI access was enabled (fail-open). This allowed users
to "successfully" log in even when their organization had not granted
CLI data access, leading to confusing failures on subsequent API calls.

Changes:
- Reverse the check logic in OAuth callback: treat any error as
  "not enabled" instead of "enabled", showing the permission request
  page so users can take action.
- Block login in Device Flow when the check fails, with a clear
  error message asking users to verify network connectivity.
- Add retry with backoff (3 attempts, 0s/1s/2s) to
  CheckCLIAuthEnabled to tolerate transient network issues.
- Add retry with backoff (3 attempts) to FetchClientIDFromMCP
  (/cli/clientId) for the same transient-error resilience.
- Add i18n entries (en/zh) for new error messages.
- Add 19 tests covering server error, connection refused, malformed
  JSON, timeout, transient-then-recovery, business error, and full
  Device Flow loginOnce integration scenarios for both endpoints.

Made-with: Cursor
2026-04-02 10:55:51 +08:00
github-actions[bot] 4c5affba99 chore: update coverage badge [skip ci] 2026-04-02 02:44:56 +00:00
fantiu c8148ef2cc Merge pull request #71 from wxianfeng/feature/wk_merge
Feature/wk merge
2026-04-02 10:22:49 +08:00
fantiu b89740bad6 feat: add self-upgrade command with GitHub Releases as data source 2026-04-01 21:26:01 +08:00
xianfeng wang 5c0d2b274c Merge branch 'DingTalk-Real-AI:main' into feature/wk_merge 2026-04-01 21:05:35 +08:00
fantiu 0489cd67c8 Merge pull request #70 from DingTalk-Real-AI/feat-css
style(auth): redesign OAuth authorization pages UI
2026-04-01 20:38:00 +08:00
fantiu 15d495e56e style(auth): redesign OAuth authorization pages UI 2026-04-01 20:21:05 +08:00
coffeeBigSir 28b775198d Merge pull request #69 from DingTalk-Real-AI/version-unify
Version unify
v1.0.6
2026-04-01 17:11:40 +08:00
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
xianfeng wang c74f1eeb26 Merge branch 'DingTalk-Real-AI:main' into feature/wk_merge 2026-04-01 09:53:58 +08:00
wxianfeng 933615003c merge upstream main 2026-04-01 09:53:18 +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
wxianfeng 3c75c66d4d chore: group pkg imports per goimports
Move pkg/config next to other pkg/* imports after local internal packages.

Made-with: Cursor
2026-03-31 15:32:50 +08:00
wxianfeng 93d6fdb17e feat: edition layer for Wukong overlay; promote shared code to pkg/
Introduce a build-time edition hook so downstream overlays (e.g. Wukong)
can customize auth UX, config dir, static server list, visible products,
and extra root commands while keeping the default open-source behavior.

- Add pkg/edition (defaults) and pkg/editiontest contract tests; Makefile
  target edition-test; CI job edition-tests.
- Root: optional RegisterExtraCommands with tool caller adapter; inject
  static servers to skip market discovery when configured; deduplicate
  top-level commands so overlay wins; extend hideNonDirectRuntimeCommands
  with edition VisibleProducts and static commands (recovery/schema/mcp).
- Auth/config: gate login subcommand and auth login hints for embedded
  editions; optional token auto-purge; edition ConfigDir override.
- version: human-readable multi-line output plus JSON with edition,
  architecture, build, commit.
- Relocate internal/{config,convert,validate} to pkg/; add pkg/cli and
  pkg/cmdutil (flags/time helpers).
- CI: optional notify-downstream job (GitLab trigger via secrets) on main
  push; open_source_policy_test adjusted for new layout.

Secrets (repo settings): WUKONG_TRIGGER_TOKEN, WUKONG_TRIGGER_URL — optional;
if unset, downstream step is skipped.

Made-with: Cursor
2026-03-31 15:29:21 +08:00
github-actions[bot] 75b873d231 chore: update coverage badge [skip ci] 2026-03-31 05:47:53 +00:00