Skip to content

feat(cli): silent login refresh, scenario agent creds store, delivery_mode#37

Merged
George-iam merged 3 commits intomainfrom
feat/login-refresh-scenario-agents-20260314
Mar 14, 2026
Merged

feat(cli): silent login refresh, scenario agent creds store, delivery_mode#37
George-iam merged 3 commits intomainfrom
feat/login-refresh-scenario-agents-20260314

Conversation

@George-iam
Copy link
Contributor

Summary

  • Silent login refresh: axme login now silently renews credentials via refresh_token without OTP if session is still active; --force flag to override. File-store notice shown only once (FileStoreNoticeSeen persisted in config).
  • Scenario agent creds store: persist provisioned agent credentials to ~/.config/axme/scenario-agents.json for reuse across apply calls.
  • delivery_mode on agent entries: scenario agent entries now carry delivery_mode field (stream/poll/http/inbox) for typed dispatch.
  • login_test.go: unit tests for silent refresh logic (mock HTTP server, verify OTP skipped when token valid, OTP called when expired).

Test plan

  • axme login with existing valid session → "Session refreshed" without OTP
  • axme login --force → always prompts OTP
  • go test ./cmd/axme/... -run TestLogin passes
  • axme scenarios apply with delivery_mode field in scenario JSON works

Made with Cursor

- Add `axme tasks submit <id> --outcome <outcome>` for arbitrary outcomes
  beyond approve/reject (escalated, provided, deferred, submitted, etc.)
- Add --comment, --data (key=value pairs), --data-json (JSON object) flags
- Improve submitTaskResult output: shows actual outcome instead of
  hardcoded "approved"/"rejected" verb
- Add 5 new unit tests for submit payload construction and validation

All tasks subcommands now complete: list, get, approve, reject, submit.

Made-with: Cursor
…_mode support

- main.go: add silent token refresh on `axme login` — if a valid
  refresh_token exists, silently renews credentials without OTP flow;
  add --force flag to override; show file-store notice only once
  (FileStoreNoticeSeen persisted in config)
- scenarios.go: add scenarioAgentCreds store (~/.config/axme/scenario-agents.json)
  for persisting provisioned agent credentials; add delivery_mode field to
  scenarioAgentEntry; add scenarioWorkflowStep struct for typed workflow steps
- login_test.go: tests for silent refresh logic (mockRefreshServer, verify
  OTP flow skipped when token valid, OTP flow called when token expired)

Made-with: Cursor
@George-iam George-iam merged commit b7b0751 into main Mar 14, 2026
1 check passed
@George-iam George-iam deleted the feat/login-refresh-scenario-agents-20260314 branch March 14, 2026 10:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant