hafez 1.0.1
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/LICENSE +21 -0
- package/README.md +190 -0
- package/dist/cli/batch-errors.d.ts +24 -0
- package/dist/cli/batch-errors.js +236 -0
- package/dist/cli/commands-schema.d.ts +3 -0
- package/dist/cli/commands-schema.js +80 -0
- package/dist/cli/commands.d.ts +133 -0
- package/dist/cli/commands.js +628 -0
- package/dist/cli/format.d.ts +9 -0
- package/dist/cli/format.js +158 -0
- package/dist/cli/help-agent.d.ts +6 -0
- package/dist/cli/help-agent.js +158 -0
- package/dist/cli/index.d.ts +1 -0
- package/dist/cli/index.js +304 -0
- package/dist/cli/resolve-vault.d.ts +13 -0
- package/dist/cli/resolve-vault.js +124 -0
- package/dist/cli/schema-introspect.d.ts +70 -0
- package/dist/cli/schema-introspect.js +372 -0
- package/dist/cli.d.ts +2 -0
- package/dist/cli.js +3 -0
- package/dist/contracts.d.ts +26 -0
- package/dist/contracts.js +87 -0
- package/dist/db.d.ts +68 -0
- package/dist/db.js +663 -0
- package/dist/digest.d.ts +29 -0
- package/dist/digest.js +94 -0
- package/dist/export-okf.d.ts +12 -0
- package/dist/export-okf.js +176 -0
- package/dist/git.d.ts +12 -0
- package/dist/git.js +355 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.js +909 -0
- package/dist/knowledge-index.d.ts +3 -0
- package/dist/knowledge-index.js +135 -0
- package/dist/merge.d.ts +1 -0
- package/dist/merge.js +176 -0
- package/dist/migrate-knowledge-v2.d.ts +11 -0
- package/dist/migrate-knowledge-v2.js +158 -0
- package/dist/migrate-next-actions.d.ts +6 -0
- package/dist/migrate-next-actions.js +32 -0
- package/dist/migrate-types.d.ts +11 -0
- package/dist/migrate-types.js +142 -0
- package/dist/parser.d.ts +18 -0
- package/dist/parser.js +68 -0
- package/dist/query.d.ts +24 -0
- package/dist/query.js +167 -0
- package/dist/schema.d.ts +9 -0
- package/dist/schema.js +59 -0
- package/dist/sections.d.ts +54 -0
- package/dist/sections.js +297 -0
- package/dist/templates.d.ts +8 -0
- package/dist/templates.js +39 -0
- package/dist/types.d.ts +321 -0
- package/dist/types.js +11 -0
- package/dist/vault.d.ts +12 -0
- package/dist/vault.js +45 -0
- package/package.json +67 -0
- package/skill/SKILL.md +190 -0
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import type { Hafez, BatchOperation } from '../types.js';
|
|
3
|
+
export interface CommandOpts {
|
|
4
|
+
json?: boolean;
|
|
5
|
+
}
|
|
6
|
+
export declare function cmdRead(os: Hafez, args: string[], opts?: CommandOpts): Promise<string>;
|
|
7
|
+
export declare function cmdQuery(os: Hafez, args: string[], opts?: CommandOpts): Promise<string>;
|
|
8
|
+
export declare function cmdSearch(os: Hafez, args: string[], opts?: CommandOpts): Promise<string>;
|
|
9
|
+
export declare function cmdCreate(os: Hafez, args: string[], opts?: CommandOpts): Promise<string>;
|
|
10
|
+
export declare function cmdUpdate(os: Hafez, args: string[], opts?: CommandOpts): Promise<string>;
|
|
11
|
+
export declare function cmdLink(os: Hafez, args: string[], opts?: CommandOpts): Promise<string>;
|
|
12
|
+
export declare function cmdUnlink(os: Hafez, args: string[], opts?: CommandOpts): Promise<string>;
|
|
13
|
+
/**
|
|
14
|
+
* Top-level capture command — aliases to the same handler used by
|
|
15
|
+
* `hafez create inbox`. Added to align the CLI verb with the batch op name.
|
|
16
|
+
*/
|
|
17
|
+
export declare function cmdCapture(os: Hafez, args: string[], opts?: CommandOpts): Promise<string>;
|
|
18
|
+
export declare function cmdPromote(os: Hafez, args: string[], opts?: CommandOpts): Promise<string>;
|
|
19
|
+
export declare function cmdValidate(os: Hafez, _args: string[], opts?: CommandOpts): Promise<string>;
|
|
20
|
+
export declare function cmdIndexRebuild(os: Hafez): Promise<string>;
|
|
21
|
+
export declare function cmdSync(os: Hafez, _args: string[]): Promise<string>;
|
|
22
|
+
export declare function cmdStats(os: Hafez, _args: string[], opts?: CommandOpts): Promise<string>;
|
|
23
|
+
export declare function cmdChangelog(os: Hafez, args: string[], opts?: CommandOpts): Promise<string>;
|
|
24
|
+
export declare const SessionLogSchema: z.ZodObject<{
|
|
25
|
+
type: z.ZodEnum<{
|
|
26
|
+
[x: string]: string;
|
|
27
|
+
}>;
|
|
28
|
+
summary: z.ZodString;
|
|
29
|
+
body: z.ZodOptional<z.ZodString>;
|
|
30
|
+
agent: z.ZodString;
|
|
31
|
+
}, z.core.$strict>;
|
|
32
|
+
export declare const UpdateFieldsSchema: z.ZodObject<{
|
|
33
|
+
status: z.ZodOptional<z.ZodEnum<{
|
|
34
|
+
[x: string]: string;
|
|
35
|
+
}>>;
|
|
36
|
+
current_state: z.ZodOptional<z.ZodString>;
|
|
37
|
+
session_log: z.ZodOptional<z.ZodObject<{
|
|
38
|
+
type: z.ZodEnum<{
|
|
39
|
+
[x: string]: string;
|
|
40
|
+
}>;
|
|
41
|
+
summary: z.ZodString;
|
|
42
|
+
body: z.ZodOptional<z.ZodString>;
|
|
43
|
+
agent: z.ZodString;
|
|
44
|
+
}, z.core.$strict>>;
|
|
45
|
+
brief: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
46
|
+
add_action: z.ZodOptional<z.ZodString>;
|
|
47
|
+
add_actions: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
48
|
+
complete_action: z.ZodOptional<z.ZodString>;
|
|
49
|
+
remove_action: z.ZodOptional<z.ZodString>;
|
|
50
|
+
clear_actions: z.ZodOptional<z.ZodBoolean>;
|
|
51
|
+
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
52
|
+
resource: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
53
|
+
domain: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
54
|
+
confidence: z.ZodOptional<z.ZodEnum<{
|
|
55
|
+
[x: string]: string;
|
|
56
|
+
}>>;
|
|
57
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
58
|
+
related: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
59
|
+
synthesis: z.ZodOptional<z.ZodString>;
|
|
60
|
+
insight: z.ZodOptional<z.ZodString>;
|
|
61
|
+
add_evidence: z.ZodOptional<z.ZodString>;
|
|
62
|
+
add_source: z.ZodOptional<z.ZodString>;
|
|
63
|
+
}, z.core.$strict>;
|
|
64
|
+
export declare const BatchOperationSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
65
|
+
op: z.ZodLiteral<"update">;
|
|
66
|
+
slug: z.ZodString;
|
|
67
|
+
fields: z.ZodObject<{
|
|
68
|
+
status: z.ZodOptional<z.ZodEnum<{
|
|
69
|
+
[x: string]: string;
|
|
70
|
+
}>>;
|
|
71
|
+
current_state: z.ZodOptional<z.ZodString>;
|
|
72
|
+
session_log: z.ZodOptional<z.ZodObject<{
|
|
73
|
+
type: z.ZodEnum<{
|
|
74
|
+
[x: string]: string;
|
|
75
|
+
}>;
|
|
76
|
+
summary: z.ZodString;
|
|
77
|
+
body: z.ZodOptional<z.ZodString>;
|
|
78
|
+
agent: z.ZodString;
|
|
79
|
+
}, z.core.$strict>>;
|
|
80
|
+
brief: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
81
|
+
add_action: z.ZodOptional<z.ZodString>;
|
|
82
|
+
add_actions: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
83
|
+
complete_action: z.ZodOptional<z.ZodString>;
|
|
84
|
+
remove_action: z.ZodOptional<z.ZodString>;
|
|
85
|
+
clear_actions: z.ZodOptional<z.ZodBoolean>;
|
|
86
|
+
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
87
|
+
resource: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
88
|
+
domain: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
89
|
+
confidence: z.ZodOptional<z.ZodEnum<{
|
|
90
|
+
[x: string]: string;
|
|
91
|
+
}>>;
|
|
92
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
93
|
+
related: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
94
|
+
synthesis: z.ZodOptional<z.ZodString>;
|
|
95
|
+
insight: z.ZodOptional<z.ZodString>;
|
|
96
|
+
add_evidence: z.ZodOptional<z.ZodString>;
|
|
97
|
+
add_source: z.ZodOptional<z.ZodString>;
|
|
98
|
+
}, z.core.$strict>;
|
|
99
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
100
|
+
op: z.ZodLiteral<"create">;
|
|
101
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
102
|
+
op: z.ZodLiteral<"capture">;
|
|
103
|
+
name: z.ZodString;
|
|
104
|
+
notes: z.ZodOptional<z.ZodString>;
|
|
105
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
106
|
+
op: z.ZodLiteral<"link">;
|
|
107
|
+
slug: z.ZodString;
|
|
108
|
+
target: z.ZodString;
|
|
109
|
+
relation: z.ZodEnum<{
|
|
110
|
+
related: "related";
|
|
111
|
+
parent: "parent";
|
|
112
|
+
}>;
|
|
113
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
114
|
+
op: z.ZodLiteral<"unlink">;
|
|
115
|
+
slug: z.ZodString;
|
|
116
|
+
target: z.ZodString;
|
|
117
|
+
relation: z.ZodEnum<{
|
|
118
|
+
related: "related";
|
|
119
|
+
parent: "parent";
|
|
120
|
+
}>;
|
|
121
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
122
|
+
op: z.ZodLiteral<"promote">;
|
|
123
|
+
slug: z.ZodString;
|
|
124
|
+
target: z.ZodEnum<{
|
|
125
|
+
entity: "entity";
|
|
126
|
+
knowledge: "knowledge";
|
|
127
|
+
project: "project";
|
|
128
|
+
}>;
|
|
129
|
+
}, z.core.$strict>], "op">;
|
|
130
|
+
export declare function parseBatchInput(json: string): BatchOperation[];
|
|
131
|
+
export declare function cmdBatch(os: Hafez, args: string[], opts?: CommandOpts): Promise<string>;
|
|
132
|
+
export declare function cmdDigest(os: Hafez, _args: string[], _opts?: CommandOpts): Promise<string>;
|
|
133
|
+
export declare function cmdMigrateKnowledgeV2(args: string[], vaultPath: string): Promise<void>;
|