docs: update stale comments and prompts referencing old storage formats
CI / check (pull_request) Failing after 10m12s
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:
@@ -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(
|
export function serializeThreadIndexEntry(
|
||||||
entry: ThreadIndexEntry,
|
entry: ThreadIndexEntry,
|
||||||
): string | Record<string, string> {
|
): string | Record<string, string> {
|
||||||
|
|||||||
@@ -113,7 +113,7 @@ export type StepOutput = {
|
|||||||
background: boolean | null;
|
background: boolean | null;
|
||||||
};
|
};
|
||||||
|
|
||||||
/** Active thread entry in ~/.uwf/threads.yaml */
|
/** Active thread entry in @uwf/thread/* variable store */
|
||||||
export type ThreadIndexEntry = {
|
export type ThreadIndexEntry = {
|
||||||
head: CasRef;
|
head: CasRef;
|
||||||
suspendedRole: string | null;
|
suspendedRole: string | null;
|
||||||
@@ -210,5 +210,5 @@ export type WorkflowConfig = {
|
|||||||
modelOverrides: Record<Scenario, ModelAlias> | null;
|
modelOverrides: Record<Scenario, ModelAlias> | null;
|
||||||
};
|
};
|
||||||
|
|
||||||
/** ~/.uwf/threads.yaml */
|
/** @uwf/thread/* variable store index */
|
||||||
export type ThreadsIndex = Record<ThreadId, ThreadIndexEntry>;
|
export type ThreadsIndex = Record<ThreadId, ThreadIndexEntry>;
|
||||||
|
|||||||
@@ -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.
|
* Walks the CAS chain from head to StartNode and expands step outputs.
|
||||||
*/
|
*/
|
||||||
export async function buildContext(
|
export async function buildContext(
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ Stored artifacts include:
|
|||||||
### Thread
|
### 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.
|
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.
|
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
|
## Storage Layout
|
||||||
|
|
||||||
All data lives under \`~/.uwf/\`:
|
CAS data lives under \`~/.ocas/\`:
|
||||||
- \`cas/\` — content-addressed store (XXH64-keyed)
|
- \`objects/\` — content-addressed store (XXH64-keyed)
|
||||||
- \`threads.yaml\` — active thread index
|
- \`variables.db\` — variable store (\`@uwf/registry/*\`, \`@uwf/thread/*\`, \`@uwf/history/*\`)
|
||||||
- \`history.jsonl\` — completed thread archive
|
|
||||||
- \`registry.yaml\` — workflow name → CAS hash mapping
|
Config lives under \`~/.uwf/\`:
|
||||||
|
- \`config.yaml\` — provider, model, agent settings
|
||||||
|
- \`.env\` — API keys
|
||||||
`;
|
`;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user