aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* sib: set core.logAllRefUpdates during initHee-Suk Kim2026-05-191-1/+2
| | | | | | | If it is bare, this is probably false, in which case new reflogs are not created for items that are not in logs/. Signed-off-by: Hee-Suk Kim <[email protected]>
* plm: remove strange error handling quirkHee-Suk Kim2026-05-191-7/+0
| | | | | | No idea what on earth I was thinking when I made this back then. Signed-off-by: Hee-Suk Kim <[email protected]>
* sib-log: create single-output sib-show and change sib-log to use itHee-Suk Kim2026-05-192-30/+72
| | | | | | | | | | | | It seems to be slowing down a bit due to the fork cost, but doing it this way makes it easier to maintain the output format. Additionally configured the output format to iterate through the JSON and print everything except the content key. Git, on the other hand, seems to use `git show` and `git log` for output, but that will be an issue when optimizing later. Signed-off-by: Hee-Suk Kim <[email protected]>
* Add TODOHee-Suk Kim2026-05-191-0/+3
| | | | | | yes Signed-off-by: Hee-Suk Kim <[email protected]>
* sib-ask: implement -n, --new; start new conversationHee-Suk Kim2026-05-191-0/+8
| | | | | | | If you don't pass -p to chain-trace-json, it just creates the root chain. Also added comments because the code didn't seem very clear. Signed-off-by: Hee-Suk Kim <[email protected]>
* sib-log: implement basic chat log printingHee-Suk Kim2026-05-181-0/+55
| | | | | | | | | | | | | The initial version was paste <(sib rev-list $1) <(sib rev-jsonl $1). Nothing has changed significantly since then; just made it output nicely, like a git log. If glow is possible, also render Markdown. Just a side note, while Markdown might be easy to write, reading the unrendered raw text is the worst. Signed-off-by: Hee-Suk Kim <[email protected]>
* Remove DESIGN.asciidocHee-Suk Kim2026-05-181-177/+0
| | | | | | | At this point, this is too far removed from the actual implementation. I plan to rewrite it later. Signed-off-by: Hee-Suk Kim <[email protected]>
* sib-ask: support option parsing retrieve from plm-askHee-Suk Kim2026-05-182-32/+58
| | | | | | | | | Excluded receiving the prompt as an argument because it increases code complexity. Besides, inputting from stdin is more convenient in the first place... Since it is difficult to distinguish between input blocking and API call blocking, print a warning message in that case. Signed-off-by: Hee-Suk Kim <[email protected]>
* plm-wrap: remove meta field on plm formatHee-Suk Kim2026-05-181-1/+3
| | | | Signed-off-by: Hee-Suk Kim <[email protected]>
* sib: ls-trace-json: guard empty trace printed as '{"":""}'Hee-Suk Kim2026-05-181-1/+1
| | | | Signed-off-by: Hee-Suk Kim <[email protected]>
* Add rev-listHee-Suk Kim2026-05-181-1/+5
| | | | | | Just a git wrapper Signed-off-by: Hee-Suk Kim <[email protected]>
* Implement sib-askHee-Suk Kim2026-05-182-0/+40
| | | | | | | It seems like there are quite a few bugs in edge cases. But for now, it works. Signed-off-by: Hee-Suk Kim <[email protected]>
* Add ref commandsHee-Suk Kim2026-05-181-0/+23
| | | | | | Very thin wrapper between git ref commands. Signed-off-by: Hee-Suk Kim <[email protected]>
* Fix ls-trace return 1 for empty traceHee-Suk Kim2026-05-181-1/+1
| | | | | | | The reason is that after removing _SIBTRACE with grep -v, there is nothing to output, and in this case, grep is set to return 1. Signed-off-by: Hee-Suk Kim <[email protected]>
* Add test.shHee-Suk Kim2026-05-181-0/+123
| | | | Signed-off-by: Hee-Suk Kim <[email protected]>
* Changed mktrace_json to make the actual trace objectHee-Suk Kim2026-05-181-5/+9
| | | | | | | | | Since mktrace creates the actual trace, it makes sense for mktrace_json to do the same. I separated the existing function for converting JSON to tf into a separate tf_helper rather than exposing it externally, as I figured users wouldn't need to use it much anyway. Signed-off-by: Hee-Suk Kim <[email protected]>
* Implement rev-jsonlHee-Suk Kim2026-05-181-2/+29
| | | | Signed-off-by: Hee-Suk Kim <[email protected]>
* Refine naming, implement ls_trace_jsonHee-Suk Kim2026-05-181-5/+22
| | | | | | | Passing everything to jq at once is faster than calling jq on each line, but the code became difficult to read, so just did it this way. Signed-off-by: Hee-Suk Kim <[email protected]>
* Implement trace-jsonHee-Suk Kim2026-05-161-0/+30
| | | | | | Chain plm-wrap output directly in future. Signed-off-by: Hee-Suk Kim <[email protected]>
* Rename lore to sibHee-Suk Kim2026-05-161-12/+12
| | | | | | | | Lore is too widely known a name to be used as a command line name. sib is named after the Sibylline Books, oracular texts consulted by the Roman Senate in times of crisis. Signed-off-by: Hee-Suk Kim <[email protected]>
* Remove unneeded add-key commandHee-Suk Kim2026-05-163-16/+194
| | | | Signed-off-by: Hee-Suk Kim <[email protected]>
* Rewrite add-key using ls-trace and mktraceHee-Suk Kim2026-05-031-55/+37
| | | | | | | | | | Not sure if add-key is necessary, but wrote it for the POC. Also ensured that magic and similar things are properly filtered out using grep -xF, and abstracted the routine for extracting keys from tf (trace format, the format used by ls-trace and mktree) for consistency. Signed-off-by: Hee-Suk Kim <[email protected]>
* Implement mktraceHee-Suk Kim2026-05-031-4/+16
| | | | | | | | | Now, what-so-called mktrace format is declared. Unlike Git's mktree, which accepts duplicate field names, this format does not accept them. There is no reason to do so, and checking is performed only in mktrace/ls-trace, while the rest of the commands can simply use those. Signed-off-by: Hee-Suk Kim <[email protected]>
* Add deduplicate checker on trace_ver and use it to cmd_add_keyHee-Suk Kim2026-05-031-2/+20
| | | | Signed-off-by: Hee-Suk Kim <[email protected]>
* Implement trace checker and ls-traceHee-Suk Kim2026-05-031-1/+21
| | | | | | | | | | | Since 'magic' is in LORETRACE anyway, simply changed the version name and added the ls-trace command to print the contents in batches. The 'ver' variable isn't used right now, but since a call is necessary to check for TRACE anyway, there is no overhead. If a version is added later, I think we should branch here and abstract it appropriately. Signed-off-by: Hee-Suk Kim <[email protected]>
* Replace span-encoded keys with direct blobsHee-Suk Kim2026-04-301-54/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Originally each key was a tree containing span-encoded blobs (<index>-O<offset>-L<length>), allowing one raw response to back multiple spans of the same key, with future dedup. However, after creating the first chain and running `git show` as an experiment, the problem was clear. If the value were simply stored in the key, the diff would be clearly visible in the UI, but the current encoding model only displays unreadable filenames and the original blob. Stepping back, I am too lazy to write something like a JSON offset parser at the MVP stage, so it will always carry offset=0, len=full; with no actual information. The complexity was paying for capability not yet exercised, while costing several concrete properties: - GitHub's commit diff view becomes directly readable as conversation flow when keys are blobs. Each turn's `content` diffs against the previous turn's, making `lore` repos browsable as conversations without the lore toolchain. This matters for the "share a lore repo as a github link" use case. - `git show <chain>:content` works without knowing any encoding, extending pass(1)'s "standard unix" philosophy from object storage to direct read access. - Trace integrity check becomes trivial: a tree is a valid lore trace iff its first entry is a blob named _LORETRACE containing "LOREv1" and all other entries are blobs. No recursive descent into key subtrees, no filename format validation, no index ordering check. Verification is possible with standard git tooling alone. - Parser no longer needs to track byte offsets in the raw response. It extracts semantic values and stores them as blobs directly. Vendor metadata (request_id, fingerprint) is naturally excluded rather than always present in raw blobs. Span encoding is deferred. If dedup ever becomes a real bottleneck, the format from this commit's parents (<12-digit>-O<offset>-L<length>) is preserved in history as a starting point. A new helper hf_blob() (hash-format blob) replaces format_key/ append_kob/format_tree, since all keys now serialize the same way. add-key (renamed from append-key) currently dies on duplicate keys; update semantics will come with the index-based batching mentioned in the inline comment. Signed-off-by: Hee-Suk Kim <[email protected]>
* Implement chain-traceHee-Suk Kim2026-04-302-3/+28
| | | | | | | | | | | | The main point is that, unlike commits, chains must be deterministic. Therefore, strict argument parsing was performed to prevent -m from being passed to the commit-tree. A minor issue is that if email field is left blank, Git didn't remove it but displayed it as `Lore <>', which didn't look nice, so just made it append `[email protected]' by default. Signed-off-by: Hee-Suk Kim <[email protected]>
* Implement append span to existing key on append-keyHee-Suk Kim2026-04-301-10/+48
| | | | | | | | | | | | | | | | I wanted to handle the logic of updating rather than appending when a key already exists in the trace object (just learned that Git can create fields with the same name within a single tree. How does checkout work in this case?) using a clean helper like update_trace(). But since I would have to branch to grep/awk anyway to create the format that mktree accepts within bash, just processed it within cmd_append_key(), which had already been checked once to perform append_kob(). One issue is that if tob is "corrupted", there might be more than one hash in the kob variable, but let's leave that for later. Signed-off-by: Hee-Suk Kim <[email protected]>
* Implement very first version of append-keyHee-Suk Kim2026-04-303-1/+27
| | | | | | | | Does not reverse nor accept offset or len. Simply stores the total length of the received blob. Kept getting the tree format wrong, so I just added a helper function. Signed-off-by: Hee-Suk Kim <[email protected]>
* Implement cmd_init and cmd_init_traceHee-Suk Kim2026-04-301-0/+36
| | | | | | | | | | | | | | To separate the CAS (or CARS) layer from the actual client, I will simply set LORE_DIR = GIT_DIR and make it fail if the LORE_DIR is not specified. Since lore is a database store independent of directories anyway, even if users want to have separate repositories for each project, features like auto-exploration should be considered later when building the user UI rather than hardcoding rules here. Currently, I am considering just using $HOME/.lore or XDG stuff (which I do not particularly prefer) as a single global repository. Signed-off-by: Hee-Suk Kim <[email protected]>
* Initial commitHee-Suk Kim2026-04-301-0/+177
"git is the stupid content tracker." — Linus Torvalds, 2005 Turns out, stupid is exactly what storing LLM conversations needs. Signed-off-by: Hee-Suk Kim <[email protected]>