Skip to content

fix: show short message IDs in table#44

Merged
madtank merged 2 commits intodev/stagingfrom
fix/short-message-ids
Apr 13, 2026
Merged

fix: show short message IDs in table#44
madtank merged 2 commits intodev/stagingfrom
fix/short-message-ids

Conversation

@madtank
Copy link
Copy Markdown
Member

@madtank madtank commented Apr 13, 2026

Summary

  • Message IDs in ax messages list table were silently truncated by Rich's auto-sizing, making them unusable for ax messages get
  • Now displays first 8 chars of the UUID (like git short hashes) — clean, readable, and consistently visible
  • Full IDs still available via --json flag

Follow-up

  • Consider adding prefix matching to ax messages get so short IDs work there too

Test plan

  • Run ax messages list and verify IDs show as 8-char short IDs
  • Run ax messages list --json and verify full UUIDs still returned
  • Verify table columns no longer clip the ID field

🐢 Co-authored by Cinder

🤖 Generated with Claude Code

madtank and others added 2 commits April 13, 2026 08:22
UUIDs were being silently truncated by Rich table auto-sizing,
making them unusable for `ax messages get`. Now displays first
8 chars (like git short hashes). Full IDs available via --json.

Co-Authored-By: Cinder <noreply@anthropic.com>
@madtank madtank merged commit ac2bf6d into dev/staging Apr 13, 2026
4 checks passed
@madtank madtank deleted the fix/short-message-ids branch April 13, 2026 15:44
madtank added a commit that referenced this pull request Apr 13, 2026
* test(dev): add aX MCP app smoke script

Add a profile-driven dev smoke script for aX MCP app read/navigation validation.

* feat(channel): forward attachment metadata in channel bridge notifications

Messages with file attachments (images, docs) now include the attachment
metadata (id, filename, content_type, size, url, context_key) in the
channel notification's meta.attachments field. This lets agents receiving
messages via the channel bridge know when attachments exist and retrieve
them on demand via context download, without requiring the bridge to
push the actual file data.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix(channel): fetch attachment metadata from REST API when SSE omits it

SSE events don't include metadata.attachments, so the bridge now falls
back to a GET /messages/{id} call to retrieve the full message with
attachment metadata when the SSE payload lacks it. This ensures agents
receiving channel notifications can see attached images/files.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix(channel): deliver replies to cli-sent messages

* fix(upload): preserve attachment preview pointers

* fix(upload): pass space through attachment flow

* fix(profile): export agent id for profile env

* feat: add ax-operator skill at skills/SKILL.md

Top-level skill file that teaches any agent to operate the aX platform
via axctl. Covers: identity verification, auth model (PAT vs JWT),
daily workflow pattern, follow-through rules (always notify, always
assign, always verify), anti-patterns, and full command reference.

This is the behavior layer — the CLI provides capability, the skill
enforces discipline. An agent that loads this skill should be a
competent aX operator immediately.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* feat(skill): rewrite as self-onboarding decision tree

The skill is the product. Rewrote from reference card to autonomous
onboarding flow:

1. Token detection (no token → guide user, user PAT → bootstrap, agent PAT → operate)
2. Identity verification (whoami, environment check, profile switching)
3. Access confirmation (auto-exchange, test send)
4. Team bootstrap (create agents, mint PATs, set up profiles, swarm pattern)
5. Daily operations (golden path with follow-through rules)
6. Agent mesh connectivity (channel bridge, BYOA, shared context)
7. Follow-through rules + anti-patterns
8. Command reference + troubleshooting

An agent that loads this skill can go from raw token to fully operational
autonomously — verify itself, bootstrap a team, connect everyone into a
shared context mesh. The user doesn't need to read docs.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* docs(cli): capture workflow flag spec

* feat: ax token mint — single command to create agent PATs

New command that handles the full bootstrap flow:
1. Detect user PAT (clear error on agent PAT)
2. Resolve agent name → UUID via user_access JWT
   (workaround: user_admin lacks agents.list scope)
3. Exchange for user_admin JWT
4. Issue agent-bound PAT via /credentials/agent-pat
5. Optionally save token + config to target directory (--save-to)
6. Optionally create a named profile (--profile)

Usage:
  ax token mint backend_sentinel
  ax token mint backend_sentinel --save-to /path --profile prod-backend
  ax token mint backend_sentinel --audience both --expires 30 --json

Tested on staging: agent PAT resolve, mint, save, profile creation
all verified end-to-end.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* feat: user token guardrail — warn on routine operations with user PAT

When a user PAT (axp_u_) is used for non-management operations (sending
messages, uploading files, listing tasks, etc.), the CLI now emits a
warning to stderr:

  ⚠  User token (axp_u_) used for: user_access exchange
     User tokens are management keys — use an agent token for daily work.
     Suppress: AX_I_KNOW_WHAT_IM_DOING=1

Behavior:
- Warns once per session (not per request)
- Suppress via AX_I_KNOW_WHAT_IM_DOING=1 env var
- Management commands (ax token mint, ax credentials) suppress automatically
- Agent tokens (axp_a_) never trigger the warning

Implementation: check fires in _get_jwt() when exchanging for user_access
with a user PAT, since all request paths converge there.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* feat: config resolution cleanup — kill git dependency, warn on global creds

Three changes to make config resolution workspace-based:

1. _find_project_root() no longer stops at .git boundaries. Only .ax/
   directories are recognized. Identity is workspace-scoped, not
   repo-scoped — cd'ing into a git repo no longer silently changes
   your agent identity.

2. Global config (~/.ax/config.toml) warns if it contains credentials
   (token, token_file, agent_id, agent_name). These should live in
   profiles or workspace config. Global config is for defaults only
   (base_url, etc).

3. AX_VERBOSE=1 prints [env: hostname] to stderr so you always know
   which API you're hitting. No more silent localhost vs prod confusion.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix: mint fallback to direct agent lookup + skill uses ax token mint

- mint: if agent isn't found in list, try direct get_agent() lookup
  before failing. Handles agents hidden from list endpoint.
- skill: Step 4 now leads with `ax token mint` instead of raw curl.
  Shows one-command mint, mint+save+profile, and swarm bootstrap.

Addresses night_owl QA items #5 and #6.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix: user token guardrail is now a hard block, not a warning

User PATs (axp_u_) on routine operations (messages, uploads, tasks)
now EXIT 1 with a clear error instead of just warning. User tokens
send messages as the user, not the agent — causing attribution errors.

The block message tells you exactly what to do:
  ax token mint <agent-name>
  ax credentials issue-enrollment

Override: AX_I_KNOW_WHAT_IM_DOING=1 (not recommended)
Management commands (ax token mint, ax credentials) auto-suppress.

Addresses night_owl QA feedback on PR #43.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* feat: ax token mint --create creates agent if not found

When the agent doesn't exist:
- --create flag: creates it automatically, then mints
- Interactive TTY: prompts "Create it? [y/N]"
- Non-interactive: fails with "Use --create to create it"

This makes mint the single entry point for the entire bootstrap:
  ax token mint new-agent --create --save-to /path --profile name

One command: create agent + mint PAT + save token + create profile.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix: rename AX_I_KNOW_WHAT_IM_DOING to AX_ALLOW_USER_TOKEN

Unprofessional env var name for a production CLI. Renamed to
AX_ALLOW_USER_TOKEN=1 which is clear and descriptive.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* docs: clarify user PAT exchange guardrails

* fix: remove user token guardrail bypass

* fix: route agent registration through api v1

* fix(channel): deliver thread replies to listeners

* feat: replace orchestration verbs with handoff

* style: format cli files

* feat: add context artifact loader

* feat: attach sent files to context

* fix: promote context after storing it

* fix: surface handoff progress replies

* feat: add interactive handoff follow-up

* fix: show short message IDs in table (#44)

* fix: show short message IDs in table to prevent truncation

UUIDs were being silently truncated by Rich table auto-sizing,
making them unusable for `ax messages get`. Now displays first
8 chars (like git short hashes). Full IDs available via --json.

Co-Authored-By: Cinder <noreply@anthropic.com>

* fix: resolve short message IDs

---------

Co-authored-by: Cinder <noreply@anthropic.com>
Co-authored-by: anvil <anvil@ax-platform.com>

* ci: build package in pull requests

* ci: automate release versioning and pypi publish

* fix: polish operator qa friction

---------

Co-authored-by: anvil <anvil@ax-platform.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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