Commit Graph

20 Commits

Author SHA1 Message Date
gilesb
9e13a4ce3d Fix JSON decode error by adding Accept header to all API requests
The CLI was getting empty responses from the server because it wasn't
sending Accept: application/json header. The server uses content
negotiation and returns HTML for browser requests.

Changes:
- Updated get_auth_header() to always include Accept: application/json
- Simplified all commands to use get_auth_header(require_token=True)
- Removed redundant token_data checks now handled by get_auth_header

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-12 14:46:55 +00:00
gilesb
84acfc45cf Add CLI feature parity with L1 web UI
New commands:
- stats: Show user counts (runs, recipes, effects, media, storage)
- effect <cid>: Show effect details with --source option
- storage list/add/test/delete: Manage IPFS storage providers
- clear-data: Clear all user L1 data (preserves storage config)

Enhanced commands:
- runs/recipes/effects/cache: Add --offset pagination
- cache: Add --type filter (all/image/video/audio)
- status: Add --plan, --artifacts, --analysis flags for detailed views

Other changes:
- All list commands now require auth and use server-side pagination
- Updated README with comprehensive CLI documentation

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-12 14:35:12 +00:00
gilesb
dce277f1da Show detailed error message on upload failure
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-12 08:30:11 +00:00
gilesb
6c1735e6b4 Rename content_hash to cid in CLI
Update CLI argument names and help text:
- Change argument names from content_hash to cid
- Update user-facing messages to use CID terminology
- Update README examples with CID syntax

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-12 08:04:07 +00:00
gilesb
c0414a9e0d Show CID for asset uploads
- Display IPFS CID after upload
- Show recipe syntax with :cid

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-12 07:36:44 +00:00
gilesb
09edf9f59e Update effect upload to show IPFS CID
- Display CID instead of content hash after upload
- Update example recipe syntax to use :cid

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-12 07:28:44 +00:00
gilesb
fa540f4441 Add upload-effect and effects commands
- artdag upload-effect: upload effect files with metadata parsing
- artdag effects: list uploaded effects

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-12 06:37:24 +00:00
gilesb
e642ffe301 Fix auth to use form data instead of JSON
L2 server now uses HTML form endpoints for login/register.
Updated client to:
- Send form data instead of JSON
- Extract token from cookie response
- Decode JWT to get username and expiry
- Handle HTML success/error responses

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-11 15:36:59 +00:00
gilesb
2b1e699ab0 Add v2 API commands for 3-phase execution
- plan: Generate and preview execution plan
- execute-plan: Execute pre-generated plan
- run-v2: Full 3-phase pipeline (Analyze → Plan → Execute)
- run-status: Check v2 run status

Uses new /api/v2/* endpoints for the 3-phase execution model.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-10 11:51:43 +00:00
gilesb
f4da1fffb2 Rename config commands to recipe
- upload-config -> upload-recipe
- configs -> recipes
- config -> recipe
- run-config -> run-recipe
- delete-config -> delete-recipe
- Update all API URLs to use /recipes/ endpoints
- Update all display messages and help text

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-08 14:59:31 +00:00
gilesb
d185683e93 Add config CLI commands
- Add PyYAML dependency
- Add upload-config: upload config YAML files
- Add configs: list uploaded configs
- Add config: show config details
- Add run-config: run config with variable inputs
- Add delete-config: delete configs (with pinning check)

Example workflow:
  artdag upload-config recipe.yaml
  artdag configs
  artdag run-config <config_id> -i node_id:content_hash --wait

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-08 03:18:17 +00:00
gilesb
2cba9c3ba6 Add delete-run and delete-cache commands
- delete-run: Delete a run by ID (with confirmation unless -f)
- delete-cache: Delete a cached item by hash (with confirmation unless -f)
- Both require login

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-08 02:03:29 +00:00
gilesb
147457d913 feat: send L1 server URL when publishing to L2
- Include l1_server in record-run request
- Enables many-to-many L1/L2 topology

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-07 19:41:04 +00:00
gilesb
f261d20493 feat: add --publish and --republish options to meta command
- Add --publish <name> to publish cache items to L2 with asset name
- Add --publish-type to specify asset type (image, video)
- Add --republish to sync metadata updates to already-published items
- Requires origin to be set before publishing

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-07 19:09:11 +00:00
gilesb
b82843f1c0 feat: add cache metadata, folders, and collections (L1 + CLI)
L1 Server:
- Extended save_cache_meta to support updates
- Added GET/PATCH /cache/{hash}/meta endpoints
- Added user data storage for folders/collections
- Added folder CRUD endpoints (/user/folders)
- Added collection CRUD endpoints (/user/collections)
- Cache list now supports filtering by folder/collection/tag

CLI:
- Added `meta` command to view/update cache item metadata
- Added `folder` command group (list, create, delete)
- Added `collection` command group (list, create, delete)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-07 18:54:40 +00:00
gilesb
9eca507d84 feat: require login for upload command
Upload now requires authentication and sends Bearer token.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-07 18:22:56 +00:00
gilesb
122d8a89d0 feat: add auth to publish command and document authentication
- Publish command now requires login and sends auth token
- Added Authentication section to README with login/register docs
- Uses L2 server for authentication when publishing runs

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-07 17:23:01 +00:00
gilesb
c505e0a33a feat: add authentication commands
- login <username> - login and save token
- register <username> - create account
- logout - clear saved token
- whoami - show current user
- run command now requires auth
- Token stored in ~/.artdag/token.json

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-07 14:44:16 +00:00
gilesb
fc00a2fc88 feat: add upload and publish commands 2026-01-07 12:57:24 +00:00
gilesb
864cada65e feat: Art DAG CLI client
- artdag.py CLI for L1 server interaction
- run: start rendering jobs
- runs: list all runs
- status: check run status
- cache/view: manage cached content (pipe to mpv with -o -)
- assets: list known assets
- import: add files to cache

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-07 11:04:49 +00:00