Update documentation to include snapshot functions
- Added snapshot functions to SDK requirements - Updated testing guide with snapshot examples - Added snapshot checklist items for refactoring - Clarified image() function in utilities section All agents refactoring SDKs must now implement: - sessionSnapshot(session_id, opts) - serviceSnapshot(service_id, opts) - listSnapshots(opts) - restoreSnapshot(snapshot_id, opts) - deleteSnapshot(snapshot_id, opts)
This commit is contained in:
parent
e433bc28c8
commit
67a14eae4a
3 changed files with 35 additions and 3 deletions
|
|
@ -24,6 +24,13 @@ Use this checklist when refactoring a UN SDK to ensure nothing is missed.
|
|||
- [ ] `cancelJob(job_id)` - Cancel running job
|
||||
- [ ] `listJobs(limit)` - List active jobs
|
||||
|
||||
### Snapshots (NEW!)
|
||||
- [ ] `sessionSnapshot(session_id)` - Create session snapshot
|
||||
- [ ] `serviceSnapshot(service_id)` - Create service snapshot
|
||||
- [ ] `listSnapshots()` - List all snapshots
|
||||
- [ ] `restoreSnapshot(snapshot_id)` - Restore from snapshot
|
||||
- [ ] `deleteSnapshot(snapshot_id)` - Delete snapshot
|
||||
|
||||
### Utilities
|
||||
- [ ] `languages(cache_ttl)` - Get supported languages
|
||||
- [ ] `languageInfo(language)` - Get language details
|
||||
|
|
|
|||
|
|
@ -25,7 +25,14 @@ Every refactored SDK needs:
|
|||
listJobs()
|
||||
languages()
|
||||
detectLanguage(filename)
|
||||
image(code, output_format)
|
||||
image(prompt, opts)
|
||||
|
||||
# Snapshot functions (NEW!)
|
||||
sessionSnapshot(session_id, opts)
|
||||
serviceSnapshot(service_id, opts)
|
||||
listSnapshots(opts)
|
||||
restoreSnapshot(snapshot_id, opts)
|
||||
deleteSnapshot(snapshot_id, opts)
|
||||
```
|
||||
|
||||
2. **Credential system** (4-tier with fallback)
|
||||
|
|
|
|||
|
|
@ -134,8 +134,26 @@ jobs = list_jobs(limit: int = 100) -> list[dict]
|
|||
# Get supported languages
|
||||
languages = languages(cache_ttl: int = 3600) -> list[str]
|
||||
|
||||
# Get language info
|
||||
info = language_info(language: str) -> dict
|
||||
# Generate image from text prompt
|
||||
result = image(prompt: str, model: str = None, size: str = "1024x1024") -> dict
|
||||
```
|
||||
|
||||
### Snapshot Functions
|
||||
```python
|
||||
# Create session snapshot
|
||||
snap = session_snapshot(session_id: str) -> dict
|
||||
|
||||
# Create service snapshot
|
||||
snap = service_snapshot(service_id: str) -> dict
|
||||
|
||||
# List all snapshots
|
||||
snaps = list_snapshots() -> dict
|
||||
|
||||
# Restore from snapshot
|
||||
result = restore_snapshot(snapshot_id: str) -> dict
|
||||
|
||||
# Delete snapshot
|
||||
delete_snapshot(snapshot_id: str) -> dict
|
||||
```
|
||||
|
||||
### Credential Functions
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue