docs: update stale comments and prompts referencing old storage formats
CI / check (pull_request) Failing after 10m12s

- architecture-reference.ts: threads.yaml/history.jsonl/registry.yaml → variable store, storage layout updated (~/.ocas/ + ~/.uwf/)
- protocol types.ts: JSDoc comments updated
- thread-index.ts: serialization comment updated
- util-agent context.ts: buildContext JSDoc updated

Only migration code in store.ts retains old file references (needed to read legacy files).
This commit is contained in:
2026-06-02 23:59:07 +08:00
parent dea6ed629e
commit e2098e7371
4 changed files with 12 additions and 10 deletions
+1 -1
View File
@@ -50,7 +50,7 @@ export function markThreadSuspended(
};
}
/** Serialize for threads.yaml — compact string when not suspended. */
/** Serialize for variable store — compact string when not suspended. */
export function serializeThreadIndexEntry(
entry: ThreadIndexEntry,
): string | Record<string, string> {
+2 -2
View File
@@ -113,7 +113,7 @@ export type StepOutput = {
background: boolean | null;
};
/** Active thread entry in ~/.uwf/threads.yaml */
/** Active thread entry in @uwf/thread/* variable store */
export type ThreadIndexEntry = {
head: CasRef;
suspendedRole: string | null;
@@ -210,5 +210,5 @@ export type WorkflowConfig = {
modelOverrides: Record<Scenario, ModelAlias> | null;
};
/** ~/.uwf/threads.yaml */
/** @uwf/thread/* variable store index */
export type ThreadsIndex = Record<ThreadId, ThreadIndexEntry>;
+1 -1
View File
@@ -150,7 +150,7 @@ async function loadWorkflow(store: Store, schemas: AgentStore["schemas"], workfl
}
/**
* Build agent execution context from thread head in threads.yaml.
* Build agent execution context from thread head in the variable store.
* Walks the CAS chain from head to StartNode and expands step outputs.
*/
export async function buildContext(
+8 -6
View File
@@ -15,7 +15,7 @@ Stored artifacts include:
### Thread
A Thread is a single execution of a Workflow, identified by a ULID (26-char Crockford Base32: 10 timestamp + 16 random). Thread state is an immutable CAS chain — each step points to its predecessor via a \`prev\` hash, forming a linked list.
Active threads are indexed in \`threads.yaml\`; completed threads move to \`history.jsonl\`.
Active threads are indexed as \`@uwf/thread/*\` variables; completed threads move to \`@uwf/history/*\` variables in the ocas variable store.
A thread progresses by running \`uwf thread exec\`, which performs one moderator→agent→extract cycle per step.
@@ -51,10 +51,12 @@ uwf thread exec <thread-id>
## Storage Layout
All data lives under \`~/.uwf/\`:
- \`cas/\` — content-addressed store (XXH64-keyed)
- \`threads.yaml\`active thread index
- \`history.jsonl\` — completed thread archive
- \`registry.yaml\` — workflow name → CAS hash mapping
CAS data lives under \`~/.ocas/\`:
- \`objects/\` — content-addressed store (XXH64-keyed)
- \`variables.db\`variable store (\`@uwf/registry/*\`, \`@uwf/thread/*\`, \`@uwf/history/*\`)
Config lives under \`~/.uwf/\`:
- \`config.yaml\` — provider, model, agent settings
- \`.env\` — API keys
`;
}