| Commit message (Collapse) | Author | Age | Files | Lines |
| ... | |
| |
|
|
|
|
|
| |
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]>
|
| |
|
|
|
|
| |
No idea what on earth I was thinking when I made this back then.
Signed-off-by: Hee-Suk Kim <[email protected]>
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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]>
|
| |
|
|
|
|
| |
yes
Signed-off-by: Hee-Suk Kim <[email protected]>
|
| |
|
|
|
|
|
| |
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]>
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
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]>
|
| |
|
|
|
|
|
| |
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]>
|
| |
|
|
|
|
|
|
|
| |
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]>
|
| |
|
|
| |
Signed-off-by: Hee-Suk Kim <[email protected]>
|
| |
|
|
| |
Signed-off-by: Hee-Suk Kim <[email protected]>
|
| |
|
|
|
|
| |
Just a git wrapper
Signed-off-by: Hee-Suk Kim <[email protected]>
|
| |
|
|
|
|
|
| |
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]>
|
| |
|
|
|
|
| |
Very thin wrapper between git ref commands.
Signed-off-by: Hee-Suk Kim <[email protected]>
|
| |
|
|
|
|
|
| |
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]>
|
| |
|
|
| |
Signed-off-by: Hee-Suk Kim <[email protected]>
|
| |
|
|
|
|
|
|
|
| |
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]>
|
| |
|
|
| |
Signed-off-by: Hee-Suk Kim <[email protected]>
|
| |
|
|
|
|
|
| |
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]>
|
| |
|
|
|
|
| |
Chain plm-wrap output directly in future.
Signed-off-by: Hee-Suk Kim <[email protected]>
|
| |
|
|
|
|
|
|
| |
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]>
|
| |
|
|
| |
Signed-off-by: Hee-Suk Kim <[email protected]>
|
| |
|
|
|
|
|
|
|
|
| |
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]>
|
| |
|
|
|
|
|
|
|
| |
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]>
|
| |
|
|
| |
Signed-off-by: Hee-Suk Kim <[email protected]>
|
| |
|
|
|
|
|
|
|
|
|
| |
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]>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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]>
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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]>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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]>
|
| |
|
|
|
|
|
|
| |
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]>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
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]>
|
|
|
"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]>
|