mirror of
https://github.com/instructkr/claw-code.git
synced 2026-04-27 07:45:08 +08:00
Cycle #46 follow-up to cycle #45's #251 implementation. Closes #250's implementation urgency by aligning docs with reality. SCHEMAS.md Updates: For each of the 4 session-management verbs, added: 1. Status marker (Implemented or Stub only) 2. Actual binary envelope (shape produced by the #251-fixed binary) 3. Aspirational (future) shape (original SCHEMAS.md content, preserved as target) 4. Gap notes where the two diverge Per-verb status: - list-sessions: Implemented, nested field layout - load-session: Implemented, nested session object with local session_not_found error - delete-session: Stub, emits not_yet_implemented (local error, not auth) - flush-transcript: Stub, emits not_yet_implemented (local error, not auth) ROADMAP.md Updates: - #251 marked CLOSED: Full status with commit ref, test counts. - #250 marked SCOPE-REDUCED: Option A resolved by #251, Option C moot, only Option B (doc alignment) remains as future cleanup. Why this matters: Every code change should close its documentation loop. #251 landed on the branch, but SCHEMAS.md still described aspirational shapes without marking which were implemented. Claws reading SCHEMAS.md would have assumed full conformance and hit surprises. Now the document tells the truth about which verbs work, which are stubs, and why. Related: - #251 implementation on feat/jobdori-251-session-dispatch branch - #250 scope-reduced to Option B (field-name harmonization) - #145/#146 parser fall-through fix precedent
This commit is contained in:
77
SCHEMAS.md
77
SCHEMAS.md
@@ -107,6 +107,24 @@ When an entity does not exist (exit code 1, but not a failure):
|
||||
|
||||
### `list-sessions`
|
||||
|
||||
**Status**: ✅ Implemented (closed #251 cycle #45, 2026-04-23).
|
||||
|
||||
**Actual binary envelope** (as of #251 fix):
|
||||
```json
|
||||
{
|
||||
"command": "list-sessions",
|
||||
"sessions": [
|
||||
{
|
||||
"id": "session-1775777421902-1",
|
||||
"path": "/path/to/.claw/sessions/session-1775777421902-1.jsonl",
|
||||
"updated_at_ms": 1775777421902,
|
||||
"message_count": 0
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
**Aspirational (future) shape**:
|
||||
```json
|
||||
{
|
||||
"timestamp": "2026-04-22T10:10:00Z",
|
||||
@@ -128,8 +146,25 @@ When an entity does not exist (exit code 1, but not a failure):
|
||||
}
|
||||
```
|
||||
|
||||
**Gap**: Current impl lacks `timestamp`, `exit_code`, `output_format`, `schema_version`, `directory`, `sessions_count` (derivable), and the session object uses `id`/`updated_at_ms`/`message_count` instead of `session_id`/`last_modified`/`prompt_count`. Follow-up #250 Option B to align field names and add common-envelope fields.
|
||||
|
||||
### `delete-session`
|
||||
|
||||
**Status**: ⚠️ Stub only (closed #251 dispatch-order fix; full impl deferred).
|
||||
|
||||
**Actual binary envelope** (as of #251 fix):
|
||||
```json
|
||||
{
|
||||
"type": "error",
|
||||
"command": "delete-session",
|
||||
"error": "not_yet_implemented",
|
||||
"kind": "not_yet_implemented"
|
||||
}
|
||||
```
|
||||
|
||||
Exit code: 1. No credentials required. The stub ensures the verb does NOT fall through to Prompt/auth (the #251 fix), but the actual delete operation is not yet wired.
|
||||
|
||||
**Aspirational (future) shape**:
|
||||
```json
|
||||
{
|
||||
"timestamp": "2026-04-22T10:10:00Z",
|
||||
@@ -143,6 +178,31 @@ When an entity does not exist (exit code 1, but not a failure):
|
||||
|
||||
### `load-session`
|
||||
|
||||
**Status**: ✅ Implemented (closed #251 cycle #45, 2026-04-23).
|
||||
|
||||
**Actual binary envelope** (as of #251 fix):
|
||||
```json
|
||||
{
|
||||
"command": "load-session",
|
||||
"session": {
|
||||
"id": "session-abc123",
|
||||
"path": "/path/to/.claw/sessions/session-abc123.jsonl",
|
||||
"messages": 5
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
For nonexistent sessions, emits a local `session_not_found` error (NOT `missing_credentials`):
|
||||
```json
|
||||
{
|
||||
"error": "session not found: nonexistent",
|
||||
"kind": "session_not_found",
|
||||
"type": "error",
|
||||
"hint": "Hint: managed sessions live in .claw/sessions/<hash>/ ..."
|
||||
}
|
||||
```
|
||||
|
||||
**Aspirational (future) shape**:
|
||||
```json
|
||||
{
|
||||
"timestamp": "2026-04-22T10:10:00Z",
|
||||
@@ -155,8 +215,25 @@ When an entity does not exist (exit code 1, but not a failure):
|
||||
}
|
||||
```
|
||||
|
||||
**Gap**: Current impl uses nested `session: {...}` instead of flat fields, and omits common-envelope fields. Follow-up #250 Option B to align.
|
||||
|
||||
### `flush-transcript`
|
||||
|
||||
**Status**: ⚠️ Stub only (closed #251 dispatch-order fix; full impl deferred).
|
||||
|
||||
**Actual binary envelope** (as of #251 fix):
|
||||
```json
|
||||
{
|
||||
"type": "error",
|
||||
"command": "flush-transcript",
|
||||
"error": "not_yet_implemented",
|
||||
"kind": "not_yet_implemented"
|
||||
}
|
||||
```
|
||||
|
||||
Exit code: 1. No credentials required. Like `delete-session`, this stub resolves the #251 dispatch-order bug but the actual flush operation is not yet wired.
|
||||
|
||||
**Aspirational (future) shape**:
|
||||
```json
|
||||
{
|
||||
"timestamp": "2026-04-22T10:10:00Z",
|
||||
|
||||
Reference in New Issue
Block a user