clawvault 3.2.0 → 3.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +54 -14
- package/bin/clawvault.js +0 -2
- package/bin/command-registration.test.js +13 -1
- package/bin/help-contract.test.js +14 -0
- package/bin/register-core-commands.js +88 -0
- package/bin/register-core-commands.test.js +80 -0
- package/bin/register-maintenance-commands.js +57 -6
- package/bin/register-query-commands.js +10 -28
- package/bin/test-helpers/cli-command-fixtures.js +1 -0
- package/dist/chunk-2PKBIKDH.js +130 -0
- package/dist/{chunk-2JQ3O2YL.js → chunk-5EFSWZO6.js} +3 -3
- package/dist/{chunk-77Q5CSPJ.js → chunk-7SWP5FKU.js} +33 -701
- package/dist/{chunk-URXDAUVH.js → chunk-AXSJIFOJ.js} +174 -1
- package/dist/{chunk-23YDQ3QU.js → chunk-BLQXXX7Q.js} +6 -6
- package/dist/chunk-CSHO3PJB.js +684 -0
- package/dist/{chunk-SLXOR3CC.js → chunk-DOIUYIXV.js} +2 -2
- package/dist/{chunk-NCKFNBHJ.js → chunk-DVOUSOR3.js} +79 -5
- package/dist/{chunk-CLJTREDS.js → chunk-ECGJYWNA.js} +193 -41
- package/dist/{chunk-BUEW6IIK.js → chunk-EL6UBSX5.js} +5 -5
- package/dist/{chunk-6FH3IULF.js → chunk-FZ5I2NF7.js} +1 -1
- package/dist/{chunk-ZN54U2OZ.js → chunk-GFCHWMGD.js} +3 -3
- package/dist/{chunk-GNJL4YGR.js → chunk-GJO3CFUN.js} +30 -6
- package/dist/chunk-H3JZIB5O.js +322 -0
- package/dist/chunk-HEHO7SMV.js +51 -0
- package/dist/{chunk-STCQGCEQ.js → chunk-HGDDW24U.js} +3 -3
- package/dist/chunk-J3YUXVID.js +907 -0
- package/dist/{chunk-Y6VJKXGL.js → chunk-KCYWJDDW.js} +1 -1
- package/dist/{chunk-W4SPAEE7.js → chunk-OFOCU2V4.js} +5 -4
- package/dist/chunk-PTWPPVC7.js +972 -0
- package/dist/{chunk-QSHD36LH.js → chunk-QFWERBDP.js} +2 -2
- package/dist/{chunk-QSRRMEYM.js → chunk-S7N7HI5E.js} +1 -1
- package/dist/{chunk-PBACDKKP.js → chunk-T7E764W3.js} +3 -3
- package/dist/chunk-TDWFBDAQ.js +1016 -0
- package/dist/{chunk-ESVS6K2B.js → chunk-TWMI3SNN.js} +6 -5
- package/dist/{chunk-2RAZ4ZFE.js → chunk-VBILES4B.js} +1 -1
- package/dist/{chunk-ESFLMDRB.js → chunk-VXAGOLDP.js} +3 -3
- package/dist/chunk-YCUVAOFC.js +158 -0
- package/dist/{chunk-SS4B7P7V.js → chunk-YIDV4VV2.js} +1 -1
- package/dist/chunk-ZKWPCBYT.js +600 -0
- package/dist/cli/index.js +24 -24
- package/dist/commands/archive.js +2 -2
- package/dist/commands/benchmark.d.ts +12 -0
- package/dist/commands/benchmark.js +12 -0
- package/dist/commands/context.js +6 -5
- package/dist/commands/doctor.d.ts +8 -3
- package/dist/commands/doctor.js +6 -20
- package/dist/commands/embed.js +5 -4
- package/dist/commands/entities.js +1 -1
- package/dist/commands/graph.js +2 -2
- package/dist/commands/inbox.d.ts +23 -0
- package/dist/commands/inbox.js +11 -0
- package/dist/commands/inject.d.ts +1 -1
- package/dist/commands/inject.js +3 -3
- package/dist/commands/link.js +6 -6
- package/dist/commands/maintain.d.ts +32 -0
- package/dist/commands/maintain.js +12 -0
- package/dist/commands/migrate-observations.js +2 -2
- package/dist/commands/observe.js +9 -8
- package/dist/commands/rebuild-embeddings.js +47 -16
- package/dist/commands/rebuild.js +7 -6
- package/dist/commands/reflect.js +5 -5
- package/dist/commands/replay.js +8 -7
- package/dist/commands/setup.js +3 -2
- package/dist/commands/sleep.d.ts +1 -1
- package/dist/commands/sleep.js +17 -15
- package/dist/commands/status.js +26 -24
- package/dist/commands/sync-bd.js +2 -2
- package/dist/commands/tailscale.js +2 -2
- package/dist/commands/wake.d.ts +1 -1
- package/dist/commands/wake.js +8 -7
- package/dist/index.d.ts +168 -16
- package/dist/index.js +271 -108
- package/dist/{inject-DYUrDqQO.d.ts → inject-DEb_jpLi.d.ts} +3 -1
- package/dist/lib/config.js +1 -1
- package/dist/{types-BbWJoC1c.d.ts → types-DslKvCaj.d.ts} +51 -1
- package/hooks/clawvault/HOOK.md +22 -5
- package/hooks/clawvault/handler.js +213 -78
- package/hooks/clawvault/handler.test.js +109 -43
- package/hooks/clawvault/integrity.js +112 -0
- package/hooks/clawvault/integrity.test.js +32 -0
- package/hooks/clawvault/openclaw.plugin.json +133 -15
- package/openclaw.plugin.json +126 -20
- package/package.json +2 -2
- package/bin/register-workgraph-commands.js +0 -1368
- package/dist/chunk-33VSQP4J.js +0 -37
- package/dist/chunk-4BQTQMJP.js +0 -93
- package/dist/chunk-EK6S23ZB.js +0 -469
- package/dist/chunk-GAOWA7GR.js +0 -501
- package/dist/chunk-GGA32J2R.js +0 -784
- package/dist/chunk-MM6QGW3P.js +0 -207
- package/dist/chunk-QVEERJSP.js +0 -152
- package/dist/chunk-U4O6C46S.js +0 -154
- package/dist/chunk-VSL7KY3M.js +0 -189
- package/dist/chunk-WMGIIABP.js +0 -15
- package/dist/commands/workgraph.d.ts +0 -124
- package/dist/commands/workgraph.js +0 -38
- package/dist/ledger-B7g7jhqG.d.ts +0 -44
- package/dist/registry-BR4326o0.d.ts +0 -30
- package/dist/store-CA-6sKCJ.d.ts +0 -34
- package/dist/thread-B9LhXNU0.d.ts +0 -41
- package/dist/workgraph/index.d.ts +0 -5
- package/dist/workgraph/index.js +0 -23
- package/dist/workgraph/ledger.d.ts +0 -2
- package/dist/workgraph/ledger.js +0 -25
- package/dist/workgraph/registry.d.ts +0 -2
- package/dist/workgraph/registry.js +0 -19
- package/dist/workgraph/store.d.ts +0 -2
- package/dist/workgraph/store.js +0 -25
- package/dist/workgraph/thread.d.ts +0 -2
- package/dist/workgraph/thread.js +0 -25
- package/dist/workgraph/types.d.ts +0 -54
- package/dist/workgraph/types.js +0 -7
package/dist/chunk-WMGIIABP.js
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
// src/workgraph/types.ts
|
|
2
|
-
var THREAD_STATUS_TRANSITIONS = {
|
|
3
|
-
open: ["active", "cancelled"],
|
|
4
|
-
active: ["blocked", "done", "cancelled", "open"],
|
|
5
|
-
// open = release
|
|
6
|
-
blocked: ["active", "cancelled"],
|
|
7
|
-
done: [],
|
|
8
|
-
// terminal
|
|
9
|
-
cancelled: ["open"]
|
|
10
|
-
// can be reopened
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
export {
|
|
14
|
-
THREAD_STATUS_TRANSITIONS
|
|
15
|
-
};
|
|
@@ -1,124 +0,0 @@
|
|
|
1
|
-
import { Command } from 'commander';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Workgraph CLI commands — agent-native coordination tools.
|
|
5
|
-
*
|
|
6
|
-
* Commands under 'clawvault wg' namespace:
|
|
7
|
-
* - wg status Agent morning briefing with rich terminal output
|
|
8
|
-
* - wg thread create Create a new thread
|
|
9
|
-
* - wg thread list List threads with filters
|
|
10
|
-
* - wg thread claim Claim a thread for work
|
|
11
|
-
* - wg thread done Mark thread complete
|
|
12
|
-
* - wg thread block Block thread on dependency
|
|
13
|
-
* - wg thread release Release thread back to pool
|
|
14
|
-
* - wg thread decompose Break thread into sub-threads
|
|
15
|
-
* - wg ledger View coordination history
|
|
16
|
-
* - wg define Define new primitive type
|
|
17
|
-
* - wg types List all primitive types
|
|
18
|
-
* - wg create Create any primitive
|
|
19
|
-
* - wg board Terminal kanban board
|
|
20
|
-
*/
|
|
21
|
-
|
|
22
|
-
/**
|
|
23
|
-
* Agent morning briefing with rich terminal output.
|
|
24
|
-
*/
|
|
25
|
-
declare function statusCommand(vaultPath: string): Promise<void>;
|
|
26
|
-
interface ThreadCreateOptions {
|
|
27
|
-
goal?: string;
|
|
28
|
-
priority?: string;
|
|
29
|
-
deps?: string;
|
|
30
|
-
tags?: string;
|
|
31
|
-
}
|
|
32
|
-
/**
|
|
33
|
-
* Create a new thread.
|
|
34
|
-
*/
|
|
35
|
-
declare function threadCreateCommand(vaultPath: string, title: string, options: ThreadCreateOptions): Promise<void>;
|
|
36
|
-
interface ThreadListOptions {
|
|
37
|
-
status?: string;
|
|
38
|
-
owner?: string;
|
|
39
|
-
json?: boolean;
|
|
40
|
-
}
|
|
41
|
-
/**
|
|
42
|
-
* List threads with filters.
|
|
43
|
-
*/
|
|
44
|
-
declare function threadListCommand(vaultPath: string, options: ThreadListOptions): Promise<void>;
|
|
45
|
-
/**
|
|
46
|
-
* Claim a thread and show work brief.
|
|
47
|
-
*/
|
|
48
|
-
declare function threadClaimCommand(vaultPath: string, threadPath: string): Promise<void>;
|
|
49
|
-
interface ThreadDoneOptions {
|
|
50
|
-
output?: string;
|
|
51
|
-
}
|
|
52
|
-
/**
|
|
53
|
-
* Mark thread as complete.
|
|
54
|
-
*/
|
|
55
|
-
declare function threadDoneCommand(vaultPath: string, threadPath: string, options: ThreadDoneOptions): Promise<void>;
|
|
56
|
-
interface ThreadBlockOptions {
|
|
57
|
-
by: string;
|
|
58
|
-
reason?: string;
|
|
59
|
-
}
|
|
60
|
-
/**
|
|
61
|
-
* Block thread on dependency.
|
|
62
|
-
*/
|
|
63
|
-
declare function threadBlockCommand(vaultPath: string, threadPath: string, options: ThreadBlockOptions): Promise<void>;
|
|
64
|
-
interface ThreadReleaseOptions {
|
|
65
|
-
reason?: string;
|
|
66
|
-
}
|
|
67
|
-
/**
|
|
68
|
-
* Release thread back to pool.
|
|
69
|
-
*/
|
|
70
|
-
declare function threadReleaseCommand(vaultPath: string, threadPath: string, options: ThreadReleaseOptions): Promise<void>;
|
|
71
|
-
interface ThreadDecomposeOptions {
|
|
72
|
-
into: string[];
|
|
73
|
-
}
|
|
74
|
-
/**
|
|
75
|
-
* Break thread into sub-threads.
|
|
76
|
-
*/
|
|
77
|
-
declare function threadDecomposeCommand(vaultPath: string, threadPath: string, options: ThreadDecomposeOptions): Promise<void>;
|
|
78
|
-
interface LedgerOptions {
|
|
79
|
-
last?: number;
|
|
80
|
-
actor?: string;
|
|
81
|
-
target?: string;
|
|
82
|
-
json?: boolean;
|
|
83
|
-
}
|
|
84
|
-
/**
|
|
85
|
-
* View coordination history.
|
|
86
|
-
*/
|
|
87
|
-
declare function ledgerCommand(vaultPath: string, options: LedgerOptions): Promise<void>;
|
|
88
|
-
interface DefineOptions {
|
|
89
|
-
fields?: string;
|
|
90
|
-
dir?: string;
|
|
91
|
-
description?: string;
|
|
92
|
-
}
|
|
93
|
-
/**
|
|
94
|
-
* Define a new primitive type.
|
|
95
|
-
*/
|
|
96
|
-
declare function defineCommand(vaultPath: string, typeName: string, options: DefineOptions): Promise<void>;
|
|
97
|
-
interface TypesOptions {
|
|
98
|
-
json?: boolean;
|
|
99
|
-
}
|
|
100
|
-
/**
|
|
101
|
-
* List all primitive types.
|
|
102
|
-
*/
|
|
103
|
-
declare function typesCommand(vaultPath: string, options: TypesOptions): Promise<void>;
|
|
104
|
-
interface CreateOptions {
|
|
105
|
-
body?: string;
|
|
106
|
-
[key: string]: string | undefined;
|
|
107
|
-
}
|
|
108
|
-
/**
|
|
109
|
-
* Create any primitive instance.
|
|
110
|
-
*/
|
|
111
|
-
declare function createCommand(vaultPath: string, typeName: string, title: string, options: CreateOptions): Promise<void>;
|
|
112
|
-
interface BoardOptions {
|
|
113
|
-
width?: number;
|
|
114
|
-
}
|
|
115
|
-
/**
|
|
116
|
-
* Terminal kanban board with box-drawing characters.
|
|
117
|
-
*/
|
|
118
|
-
declare function boardCommand(vaultPath: string, options: BoardOptions): Promise<void>;
|
|
119
|
-
/**
|
|
120
|
-
* Register all workgraph commands under the 'wg' namespace.
|
|
121
|
-
*/
|
|
122
|
-
declare function registerWorkgraphCommands(program: Command): void;
|
|
123
|
-
|
|
124
|
-
export { type BoardOptions, type CreateOptions, type DefineOptions, type LedgerOptions, type ThreadBlockOptions, type ThreadCreateOptions, type ThreadDecomposeOptions, type ThreadDoneOptions, type ThreadListOptions, type ThreadReleaseOptions, type TypesOptions, boardCommand, createCommand, defineCommand, ledgerCommand, registerWorkgraphCommands, statusCommand, threadBlockCommand, threadClaimCommand, threadCreateCommand, threadDecomposeCommand, threadDoneCommand, threadListCommand, threadReleaseCommand, typesCommand };
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
boardCommand,
|
|
3
|
-
createCommand,
|
|
4
|
-
defineCommand,
|
|
5
|
-
ledgerCommand,
|
|
6
|
-
registerWorkgraphCommands,
|
|
7
|
-
statusCommand,
|
|
8
|
-
threadBlockCommand,
|
|
9
|
-
threadClaimCommand,
|
|
10
|
-
threadCreateCommand,
|
|
11
|
-
threadDecomposeCommand,
|
|
12
|
-
threadDoneCommand,
|
|
13
|
-
threadListCommand,
|
|
14
|
-
threadReleaseCommand,
|
|
15
|
-
typesCommand
|
|
16
|
-
} from "../chunk-GGA32J2R.js";
|
|
17
|
-
import "../chunk-VSL7KY3M.js";
|
|
18
|
-
import "../chunk-QVEERJSP.js";
|
|
19
|
-
import "../chunk-4BQTQMJP.js";
|
|
20
|
-
import "../chunk-MM6QGW3P.js";
|
|
21
|
-
import "../chunk-WMGIIABP.js";
|
|
22
|
-
import "../chunk-2ZDO52B4.js";
|
|
23
|
-
export {
|
|
24
|
-
boardCommand,
|
|
25
|
-
createCommand,
|
|
26
|
-
defineCommand,
|
|
27
|
-
ledgerCommand,
|
|
28
|
-
registerWorkgraphCommands,
|
|
29
|
-
statusCommand,
|
|
30
|
-
threadBlockCommand,
|
|
31
|
-
threadClaimCommand,
|
|
32
|
-
threadCreateCommand,
|
|
33
|
-
threadDecomposeCommand,
|
|
34
|
-
threadDoneCommand,
|
|
35
|
-
threadListCommand,
|
|
36
|
-
threadReleaseCommand,
|
|
37
|
-
typesCommand
|
|
38
|
-
};
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { LedgerEntry, LedgerOp } from './workgraph/types.js';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Append-only event ledger.
|
|
5
|
-
*
|
|
6
|
-
* Every mutation to the workgraph is logged here. This is the source of truth
|
|
7
|
-
* for coordination: who claimed what, when, and what's available.
|
|
8
|
-
*
|
|
9
|
-
* Format: one JSON object per line (.jsonl) in `.clawvault/ledger.jsonl`.
|
|
10
|
-
* Agents read the ledger to know the state of the world.
|
|
11
|
-
*/
|
|
12
|
-
|
|
13
|
-
declare function ledgerPath(vaultPath: string): string;
|
|
14
|
-
declare function append(vaultPath: string, actor: string, op: LedgerOp, target: string, type?: string, data?: Record<string, unknown>): LedgerEntry;
|
|
15
|
-
declare function readAll(vaultPath: string): LedgerEntry[];
|
|
16
|
-
declare function readSince(vaultPath: string, since: string): LedgerEntry[];
|
|
17
|
-
/** Get the current owner of a target (last claim without a subsequent release/done). */
|
|
18
|
-
declare function currentOwner(vaultPath: string, target: string): string | null;
|
|
19
|
-
/** Check if a target is currently claimed by any agent. */
|
|
20
|
-
declare function isClaimed(vaultPath: string, target: string): boolean;
|
|
21
|
-
/** Get all entries for a specific target. */
|
|
22
|
-
declare function historyOf(vaultPath: string, target: string): LedgerEntry[];
|
|
23
|
-
/** Get all entries by a specific actor. */
|
|
24
|
-
declare function activityOf(vaultPath: string, actor: string): LedgerEntry[];
|
|
25
|
-
/** Get all currently claimed targets and their owners. */
|
|
26
|
-
declare function allClaims(vaultPath: string): Map<string, string>;
|
|
27
|
-
/** Get recent ledger entries (last N). */
|
|
28
|
-
declare function recent(vaultPath: string, count?: number): LedgerEntry[];
|
|
29
|
-
|
|
30
|
-
declare const ledger_activityOf: typeof activityOf;
|
|
31
|
-
declare const ledger_allClaims: typeof allClaims;
|
|
32
|
-
declare const ledger_append: typeof append;
|
|
33
|
-
declare const ledger_currentOwner: typeof currentOwner;
|
|
34
|
-
declare const ledger_historyOf: typeof historyOf;
|
|
35
|
-
declare const ledger_isClaimed: typeof isClaimed;
|
|
36
|
-
declare const ledger_ledgerPath: typeof ledgerPath;
|
|
37
|
-
declare const ledger_readAll: typeof readAll;
|
|
38
|
-
declare const ledger_readSince: typeof readSince;
|
|
39
|
-
declare const ledger_recent: typeof recent;
|
|
40
|
-
declare namespace ledger {
|
|
41
|
-
export { ledger_activityOf as activityOf, ledger_allClaims as allClaims, ledger_append as append, ledger_currentOwner as currentOwner, ledger_historyOf as historyOf, ledger_isClaimed as isClaimed, ledger_ledgerPath as ledgerPath, ledger_readAll as readAll, ledger_readSince as readSince, ledger_recent as recent };
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
export { activityOf as a, allClaims as b, append as c, currentOwner as d, ledgerPath as e, readSince as f, recent as g, historyOf as h, isClaimed as i, ledger as l, readAll as r };
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { FieldDefinition, PrimitiveTypeDefinition, Registry } from './workgraph/types.js';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Dynamic primitive type registry.
|
|
5
|
-
*
|
|
6
|
-
* Agents can define new primitive types at runtime. The registry is stored
|
|
7
|
-
* as `.clawvault/registry.json` in the vault. Built-in types are seeded on
|
|
8
|
-
* first access and cannot be deleted (but CAN be extended with new fields).
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
declare function registryPath(vaultPath: string): string;
|
|
12
|
-
declare function loadRegistry(vaultPath: string): Registry;
|
|
13
|
-
declare function saveRegistry(vaultPath: string, registry: Registry): void;
|
|
14
|
-
declare function defineType(vaultPath: string, name: string, description: string, fields: Record<string, FieldDefinition>, actor: string, directory?: string): PrimitiveTypeDefinition;
|
|
15
|
-
declare function getType(vaultPath: string, name: string): PrimitiveTypeDefinition | undefined;
|
|
16
|
-
declare function listTypes(vaultPath: string): PrimitiveTypeDefinition[];
|
|
17
|
-
declare function extendType(vaultPath: string, name: string, newFields: Record<string, FieldDefinition>, actor: string): PrimitiveTypeDefinition;
|
|
18
|
-
|
|
19
|
-
declare const registry_defineType: typeof defineType;
|
|
20
|
-
declare const registry_extendType: typeof extendType;
|
|
21
|
-
declare const registry_getType: typeof getType;
|
|
22
|
-
declare const registry_listTypes: typeof listTypes;
|
|
23
|
-
declare const registry_loadRegistry: typeof loadRegistry;
|
|
24
|
-
declare const registry_registryPath: typeof registryPath;
|
|
25
|
-
declare const registry_saveRegistry: typeof saveRegistry;
|
|
26
|
-
declare namespace registry {
|
|
27
|
-
export { registry_defineType as defineType, registry_extendType as extendType, registry_getType as getType, registry_listTypes as listTypes, registry_loadRegistry as loadRegistry, registry_registryPath as registryPath, registry_saveRegistry as saveRegistry };
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
export { loadRegistry as a, registryPath as b, defineType as d, extendType as e, getType as g, listTypes as l, registry as r, saveRegistry as s };
|
package/dist/store-CA-6sKCJ.d.ts
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { PrimitiveInstance } from './workgraph/types.js';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Workgraph store — CRUD for primitive instances.
|
|
5
|
-
*
|
|
6
|
-
* Primitives are markdown files with YAML frontmatter. The store reads/writes
|
|
7
|
-
* them and logs every mutation to the ledger. Schemas are soft: unknown fields
|
|
8
|
-
* are preserved, missing optional fields get defaults.
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
declare function create(vaultPath: string, typeName: string, fields: Record<string, unknown>, body: string, actor: string): PrimitiveInstance;
|
|
12
|
-
declare function read(vaultPath: string, relPath: string): PrimitiveInstance | null;
|
|
13
|
-
declare function list(vaultPath: string, typeName: string): PrimitiveInstance[];
|
|
14
|
-
declare function update(vaultPath: string, relPath: string, fieldUpdates: Record<string, unknown>, bodyUpdate: string | undefined, actor: string): PrimitiveInstance;
|
|
15
|
-
declare function remove(vaultPath: string, relPath: string, actor: string): void;
|
|
16
|
-
declare function findByField(vaultPath: string, typeName: string, field: string, value: unknown): PrimitiveInstance[];
|
|
17
|
-
declare function openThreads(vaultPath: string): PrimitiveInstance[];
|
|
18
|
-
declare function activeThreads(vaultPath: string): PrimitiveInstance[];
|
|
19
|
-
declare function blockedThreads(vaultPath: string): PrimitiveInstance[];
|
|
20
|
-
|
|
21
|
-
declare const store_activeThreads: typeof activeThreads;
|
|
22
|
-
declare const store_blockedThreads: typeof blockedThreads;
|
|
23
|
-
declare const store_create: typeof create;
|
|
24
|
-
declare const store_findByField: typeof findByField;
|
|
25
|
-
declare const store_list: typeof list;
|
|
26
|
-
declare const store_openThreads: typeof openThreads;
|
|
27
|
-
declare const store_read: typeof read;
|
|
28
|
-
declare const store_remove: typeof remove;
|
|
29
|
-
declare const store_update: typeof update;
|
|
30
|
-
declare namespace store {
|
|
31
|
-
export { store_activeThreads as activeThreads, store_blockedThreads as blockedThreads, store_create as create, store_findByField as findByField, store_list as list, store_openThreads as openThreads, store_read as read, store_remove as remove, store_update as update };
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
export { activeThreads as a, blockedThreads as b, create as c, remove as d, findByField as f, list as l, openThreads as o, read as r, store as s, update as u };
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { PrimitiveInstance } from './workgraph/types.js';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Thread lifecycle operations.
|
|
5
|
-
*
|
|
6
|
-
* Threads are the core coordination primitive. This module handles the
|
|
7
|
-
* claim/release/block/done lifecycle with ledger-backed exclusivity.
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
declare function createThread(vaultPath: string, title: string, goal: string, actor: string, opts?: {
|
|
11
|
-
priority?: string;
|
|
12
|
-
deps?: string[];
|
|
13
|
-
parent?: string;
|
|
14
|
-
context_refs?: string[];
|
|
15
|
-
tags?: string[];
|
|
16
|
-
}): PrimitiveInstance;
|
|
17
|
-
declare function claim(vaultPath: string, threadPath: string, actor: string): PrimitiveInstance;
|
|
18
|
-
declare function release(vaultPath: string, threadPath: string, actor: string, reason?: string): PrimitiveInstance;
|
|
19
|
-
declare function block(vaultPath: string, threadPath: string, actor: string, blockedBy: string, reason?: string): PrimitiveInstance;
|
|
20
|
-
declare function unblock(vaultPath: string, threadPath: string, actor: string): PrimitiveInstance;
|
|
21
|
-
declare function done(vaultPath: string, threadPath: string, actor: string, output?: string): PrimitiveInstance;
|
|
22
|
-
declare function cancel(vaultPath: string, threadPath: string, actor: string, reason?: string): PrimitiveInstance;
|
|
23
|
-
declare function decompose(vaultPath: string, parentPath: string, subthreads: Array<{
|
|
24
|
-
title: string;
|
|
25
|
-
goal: string;
|
|
26
|
-
deps?: string[];
|
|
27
|
-
}>, actor: string): PrimitiveInstance[];
|
|
28
|
-
|
|
29
|
-
declare const thread_block: typeof block;
|
|
30
|
-
declare const thread_cancel: typeof cancel;
|
|
31
|
-
declare const thread_claim: typeof claim;
|
|
32
|
-
declare const thread_createThread: typeof createThread;
|
|
33
|
-
declare const thread_decompose: typeof decompose;
|
|
34
|
-
declare const thread_done: typeof done;
|
|
35
|
-
declare const thread_release: typeof release;
|
|
36
|
-
declare const thread_unblock: typeof unblock;
|
|
37
|
-
declare namespace thread {
|
|
38
|
-
export { thread_block as block, thread_cancel as cancel, thread_claim as claim, thread_createThread as createThread, thread_decompose as decompose, thread_done as done, thread_release as release, thread_unblock as unblock };
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
export { claim as a, block as b, cancel as c, createThread as d, decompose as e, done as f, release as r, thread as t, unblock as u };
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
export { FieldDefinition, LedgerEntry, LedgerOp, PrimitiveInstance, PrimitiveTypeDefinition, Registry, THREAD_STATUS_TRANSITIONS, ThreadStatus } from './types.js';
|
|
2
|
-
export { r as registry } from '../registry-BR4326o0.js';
|
|
3
|
-
export { l as ledger } from '../ledger-B7g7jhqG.js';
|
|
4
|
-
export { s as store } from '../store-CA-6sKCJ.js';
|
|
5
|
-
export { t as thread } from '../thread-B9LhXNU0.js';
|
package/dist/workgraph/index.js
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
thread_exports
|
|
3
|
-
} from "../chunk-VSL7KY3M.js";
|
|
4
|
-
import {
|
|
5
|
-
store_exports
|
|
6
|
-
} from "../chunk-QVEERJSP.js";
|
|
7
|
-
import {
|
|
8
|
-
ledger_exports
|
|
9
|
-
} from "../chunk-4BQTQMJP.js";
|
|
10
|
-
import {
|
|
11
|
-
registry_exports
|
|
12
|
-
} from "../chunk-MM6QGW3P.js";
|
|
13
|
-
import {
|
|
14
|
-
THREAD_STATUS_TRANSITIONS
|
|
15
|
-
} from "../chunk-WMGIIABP.js";
|
|
16
|
-
import "../chunk-2ZDO52B4.js";
|
|
17
|
-
export {
|
|
18
|
-
THREAD_STATUS_TRANSITIONS,
|
|
19
|
-
ledger_exports as ledger,
|
|
20
|
-
registry_exports as registry,
|
|
21
|
-
store_exports as store,
|
|
22
|
-
thread_exports as thread
|
|
23
|
-
};
|
package/dist/workgraph/ledger.js
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
activityOf,
|
|
3
|
-
allClaims,
|
|
4
|
-
append,
|
|
5
|
-
currentOwner,
|
|
6
|
-
historyOf,
|
|
7
|
-
isClaimed,
|
|
8
|
-
ledgerPath,
|
|
9
|
-
readAll,
|
|
10
|
-
readSince,
|
|
11
|
-
recent
|
|
12
|
-
} from "../chunk-4BQTQMJP.js";
|
|
13
|
-
import "../chunk-2ZDO52B4.js";
|
|
14
|
-
export {
|
|
15
|
-
activityOf,
|
|
16
|
-
allClaims,
|
|
17
|
-
append,
|
|
18
|
-
currentOwner,
|
|
19
|
-
historyOf,
|
|
20
|
-
isClaimed,
|
|
21
|
-
ledgerPath,
|
|
22
|
-
readAll,
|
|
23
|
-
readSince,
|
|
24
|
-
recent
|
|
25
|
-
};
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
defineType,
|
|
3
|
-
extendType,
|
|
4
|
-
getType,
|
|
5
|
-
listTypes,
|
|
6
|
-
loadRegistry,
|
|
7
|
-
registryPath,
|
|
8
|
-
saveRegistry
|
|
9
|
-
} from "../chunk-MM6QGW3P.js";
|
|
10
|
-
import "../chunk-2ZDO52B4.js";
|
|
11
|
-
export {
|
|
12
|
-
defineType,
|
|
13
|
-
extendType,
|
|
14
|
-
getType,
|
|
15
|
-
listTypes,
|
|
16
|
-
loadRegistry,
|
|
17
|
-
registryPath,
|
|
18
|
-
saveRegistry
|
|
19
|
-
};
|
package/dist/workgraph/store.js
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
activeThreads,
|
|
3
|
-
blockedThreads,
|
|
4
|
-
create,
|
|
5
|
-
findByField,
|
|
6
|
-
list,
|
|
7
|
-
openThreads,
|
|
8
|
-
read,
|
|
9
|
-
remove,
|
|
10
|
-
update
|
|
11
|
-
} from "../chunk-QVEERJSP.js";
|
|
12
|
-
import "../chunk-4BQTQMJP.js";
|
|
13
|
-
import "../chunk-MM6QGW3P.js";
|
|
14
|
-
import "../chunk-2ZDO52B4.js";
|
|
15
|
-
export {
|
|
16
|
-
activeThreads,
|
|
17
|
-
blockedThreads,
|
|
18
|
-
create,
|
|
19
|
-
findByField,
|
|
20
|
-
list,
|
|
21
|
-
openThreads,
|
|
22
|
-
read,
|
|
23
|
-
remove,
|
|
24
|
-
update
|
|
25
|
-
};
|
package/dist/workgraph/thread.js
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
block,
|
|
3
|
-
cancel,
|
|
4
|
-
claim,
|
|
5
|
-
createThread,
|
|
6
|
-
decompose,
|
|
7
|
-
done,
|
|
8
|
-
release,
|
|
9
|
-
unblock
|
|
10
|
-
} from "../chunk-VSL7KY3M.js";
|
|
11
|
-
import "../chunk-QVEERJSP.js";
|
|
12
|
-
import "../chunk-4BQTQMJP.js";
|
|
13
|
-
import "../chunk-MM6QGW3P.js";
|
|
14
|
-
import "../chunk-WMGIIABP.js";
|
|
15
|
-
import "../chunk-2ZDO52B4.js";
|
|
16
|
-
export {
|
|
17
|
-
block,
|
|
18
|
-
cancel,
|
|
19
|
-
claim,
|
|
20
|
-
createThread,
|
|
21
|
-
decompose,
|
|
22
|
-
done,
|
|
23
|
-
release,
|
|
24
|
-
unblock
|
|
25
|
-
};
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Workgraph type definitions.
|
|
3
|
-
*
|
|
4
|
-
* Three layers:
|
|
5
|
-
* 1. Registry — what primitive types exist (agent-extensible)
|
|
6
|
-
* 2. Ledger — what happened (append-only, source of truth for claims/state)
|
|
7
|
-
* 3. Store — the actual markdown files (the primitives themselves)
|
|
8
|
-
*/
|
|
9
|
-
interface FieldDefinition {
|
|
10
|
-
type: 'string' | 'number' | 'boolean' | 'list' | 'date' | 'ref' | 'any';
|
|
11
|
-
required?: boolean;
|
|
12
|
-
default?: unknown;
|
|
13
|
-
description?: string;
|
|
14
|
-
}
|
|
15
|
-
interface PrimitiveTypeDefinition {
|
|
16
|
-
name: string;
|
|
17
|
-
description: string;
|
|
18
|
-
fields: Record<string, FieldDefinition>;
|
|
19
|
-
/** Directory under vault root where instances live (default: `<name>s/`). */
|
|
20
|
-
directory: string;
|
|
21
|
-
/** Whether this type was defined by an agent at runtime vs built-in. */
|
|
22
|
-
builtIn: boolean;
|
|
23
|
-
/** ISO timestamp of when this type was registered. */
|
|
24
|
-
createdAt: string;
|
|
25
|
-
/** Who registered it (agent name or "system"). */
|
|
26
|
-
createdBy: string;
|
|
27
|
-
}
|
|
28
|
-
interface Registry {
|
|
29
|
-
version: number;
|
|
30
|
-
types: Record<string, PrimitiveTypeDefinition>;
|
|
31
|
-
}
|
|
32
|
-
type LedgerOp = 'create' | 'update' | 'delete' | 'claim' | 'release' | 'block' | 'unblock' | 'done' | 'cancel' | 'define' | 'decompose';
|
|
33
|
-
interface LedgerEntry {
|
|
34
|
-
ts: string;
|
|
35
|
-
actor: string;
|
|
36
|
-
op: LedgerOp;
|
|
37
|
-
target: string;
|
|
38
|
-
type?: string;
|
|
39
|
-
data?: Record<string, unknown>;
|
|
40
|
-
}
|
|
41
|
-
type ThreadStatus = 'open' | 'active' | 'blocked' | 'done' | 'cancelled';
|
|
42
|
-
declare const THREAD_STATUS_TRANSITIONS: Record<ThreadStatus, ThreadStatus[]>;
|
|
43
|
-
interface PrimitiveInstance {
|
|
44
|
-
/** File path relative to vault root. */
|
|
45
|
-
path: string;
|
|
46
|
-
/** Primitive type name. */
|
|
47
|
-
type: string;
|
|
48
|
-
/** Frontmatter fields. */
|
|
49
|
-
fields: Record<string, unknown>;
|
|
50
|
-
/** Markdown body content. */
|
|
51
|
-
body: string;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
export { type FieldDefinition, type LedgerEntry, type LedgerOp, type PrimitiveInstance, type PrimitiveTypeDefinition, type Registry, THREAD_STATUS_TRANSITIONS, type ThreadStatus };
|