@albireo3754/agentlog 0.1.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/LICENSE +21 -0
- package/README.md +196 -0
- package/docs/cc/hook-integration.md +125 -0
- package/docs/obsidian/06-official-cli-research.md +178 -0
- package/docs/obsidian/README.md +19 -0
- package/package.json +34 -0
- package/scripts/postinstall.mjs +27 -0
- package/src/claude-settings.ts +102 -0
- package/src/cli.ts +419 -0
- package/src/config.ts +41 -0
- package/src/detect.ts +88 -0
- package/src/hook.ts +74 -0
- package/src/note-writer.ts +255 -0
- package/src/obsidian-cli.ts +86 -0
- package/src/schema/daily-note.ts +84 -0
- package/src/schema/hook-input.ts +108 -0
- package/src/schema/pretty-prompt.ts +91 -0
- package/src/types.ts +23 -0
package/src/types.ts
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/** AgentLog core types */
|
|
2
|
+
|
|
3
|
+
/** Config stored at ~/.agentlog/config.json */
|
|
4
|
+
export interface AgentLogConfig {
|
|
5
|
+
vault: string;
|
|
6
|
+
plain?: boolean;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
/** A single log entry to be written into a Daily Note */
|
|
10
|
+
export interface LogEntry {
|
|
11
|
+
time: string; // "HH:MM"
|
|
12
|
+
prompt: string; // sanitized by prettyPrompt()
|
|
13
|
+
sessionId: string; // from hook session_id
|
|
14
|
+
project: string; // derived from cwd: parent/basename
|
|
15
|
+
cwd: string; // full cwd path, used as section matching key
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
/** Result of writing a log entry */
|
|
19
|
+
export interface WriteResult {
|
|
20
|
+
filePath: string;
|
|
21
|
+
created: boolean; // true if new file was created
|
|
22
|
+
section: "agentlog" | "plain";
|
|
23
|
+
}
|