aboutsummaryrefslogtreecommitdiff
path: root/sib
Commit message (Collapse)AuthorAgeFilesLines
* Update licenseHee-Suk Kim10 days1-1/+1
|
* Add sib init to usage synopsisHee-Suk Kim10 days1-0/+1
| | | | Signed-off-by: Hee-Suk Kim <[email protected]>
* Add synopsis on usageHee-Suk Kim10 days1-2/+13
| | | | Signed-off-by: Hee-Suk Kim <[email protected]>
* Add LicenseHee-Suk Kim2026-08-051-0/+2
| | | | Signed-off-by: Hee-Suk Kim <[email protected]>
* Add cmd_versionHee-Suk Kim2026-08-051-0/+5
| | | | Signed-off-by: Hee-Suk Kim <[email protected]>
* Fix argn guards in sibHee-Suk Kim2026-07-281-7/+7
| | | | Signed-off-by: Hee-Suk Kim <[email protected]>
* Change SIB_DIR to ~/.sibHee-Suk Kim2026-07-251-1/+1
| | | | | | | XDG_STATE_DIR is for temp datas, and SIB_DIR contains some important datas along with configs. Signed-off-by: Hee-Suk Kim <[email protected]>
* Add some error guardsHee-Suk Kim2026-07-251-1/+5
| | | | Signed-off-by: Hee-Suk Kim <[email protected]>
* Fix sib ls-trace error handlings within shell quirksHee-Suk Kim2026-07-251-8/+16
| | | | Signed-off-by: Hee-Suk Kim <[email protected]>
* Change ls-trace format to <hash>/t<key>Hee-Suk Kim2026-07-231-11/+14
| | | | | | | | | By arraying the hash first, parsing became slightly easier (<hash> is the normalized value, <key> can be anything), and using \t as a separator allowed whitespace to be entered into <key> (although it is currently rejected). Signed-off-by: Hee-Suk Kim <[email protected]>
* Fix mktrace_json has made empty trace on failHee-Suk Kim2026-07-231-13/+16
| | | | Signed-off-by: Hee-Suk Kim <[email protected]>
* Fix lib.bash not found before dispatchHee-Suk Kim2026-07-231-2/+26
| | | | Signed-off-by: Hee-Suk Kim <[email protected]>
* Add TRACE_VERSION validation on ls_trace and nit fixesHee-Suk Kim2026-07-221-9/+19
| | | | Signed-off-by: Hee-Suk Kim <[email protected]>
* Change list-refs to ls-refsHee-Suk Kim2026-07-221-1/+1
| | | | Signed-off-by: Hee-Suk Kim <[email protected]>
* Fix the responsibility for verifying the ls-trace format to mktraceHee-Suk Kim2026-07-211-36/+37
| | | | Signed-off-by: Hee-Suk Kim <[email protected]>
* No positional argument allowed in sib initHee-Suk Kim2026-07-211-0/+2
| | | | Signed-off-by: Hee-Suk Kim <[email protected]>
* Possable fix for readonly commit_date redefinedHee-Suk Kim2026-07-211-3/+3
| | | | Signed-off-by: Hee-Suk Kim <[email protected]>
* Make PLM_MODEL and PLM_ENDPOINT configurable by sib configHee-Suk Kim2026-07-211-0/+18
| | | | Signed-off-by: Hee-Suk Kim <[email protected]>
* Change the default HEAD name to refs/conv/scratchHee-Suk Kim2026-07-211-1/+1
| | | | | | | | | | Now sib-ask determines unborn status based on whether an actual ref exists rather than the branch name. If a user accidentally commits without using sib-ask during the init state, it does not go into the detach state. In such case, having a friendly name causes less confusion. Signed-off-by: Hee-Suk Kim <[email protected]>
* Fix AUTHOR/COMMITER_DATE to make commits deterministicHee-Suk Kim2026-07-191-1/+6
| | | | | | | | | | | | commit df27dbe ("sib: dont fix git author date when creating chain") removed AUTHOR_DATE for reflog, deterministic chain is still necessary for traces. (I created a prompt with the same content, but new chains kept appearing, making it difficult for the user to understand the conversation structure.) Therefore, fixed the DATE only in `chain_trace` and allowed the date to be used as is for the remaining reflog-related commands. Signed-off-by: Hee-Suk Kim <[email protected]>
* Check refs/conv/$1 first on sib rev-parseHee-Suk Kim2026-07-191-1/+10
| | | | | | | By checking refs/conv first for the arguments received from rev-parse, it enables the direct use of the name used in sib save. Signed-off-by: Hee-Suk Kim <[email protected]>
* sib-status: print ref informations and chain summary tooHee-Suk Kim2026-07-181-10/+0
| | | | Signed-off-by: Hee-Suk Kim <[email protected]>
* Drop refs/conv/scratch and set the detach state to defaultHee-Suk Kim2026-07-181-1/+1
| | | | | | | | | | | | | | | | | | | Currently, the default state inferred by save/switch is detached HEAD, and attach is a special state. However, if there is nothing in HEAD, Git throws a "fatal: not a git dir" error. This resulted in setting HEAD as refs/conv/scratch when init. Consequently, running `sib ask -n' attaches to refs/conv/scratch, while running `sib switch` detaches it, causing a problem of inconsistency. This commit resolved this by introducing a special ref called refs/sib/unborn to represent the ---new and init states, and by checking this in ask to ensure it becomes detached. The reason for changing the name of unborned state, aside from the processing in ask, is that conv/ has become the place where all saves go, so there should be no special indicator there. Signed-off-by: Hee-Suk Kim <[email protected]>
* Enable reinitialize on init, do not delete heads and tags dirsHee-Suk Kim2026-07-181-7/+9
| | | | | | | | | | | | The mere existence of the heads/ and tags/ directories didn't seem to be a significant issue (they are empty directories anyway and can be created if the user wants them), so remaining that. If they are deleted during reinit, user data could be erased. While it is possible to check for the existence of files within the directories and delete them, I don't think it is necessary to go to such lengths. Signed-off-by: Hee-Suk Kim <[email protected]>
* Prepare for release: add Makefile and dispatchHee-Suk Kim2026-07-171-13/+31
| | | | | | | | | | Similar to Git, scripts including the dispatcher sib are grouped into libexec/sib-core, and symlinks are created in bin/sib. Additionally, libexec/sib-core is added to the PATH when executing any script inside sib. I don't really see any downside to adding to the PATH and loading the script. It's clear. Signed-off-by: Hee-Suk Kim <[email protected]>
* Change git author nameHee-Suk Kim2026-07-171-2/+2
| | | | Signed-off-by: Hee-Suk Kim <[email protected]>
* sib: implement sib-statusHee-Suk Kim2026-07-171-0/+10
| | | | Signed-off-by: Hee-Suk Kim <[email protected]>
* Fix update-ref not making reflog for refs/convHee-Suk Kim2026-06-071-2/+1
| | | | | | | | | core.logAllRefUpdates creates new log files only for refs in refs/heads or refs/remotes. It is meaningless so exclude it during init and use the --create-reflog to make all update-refs generate reflogs. Signed-off-by: Hee-Suk Kim <[email protected]>
* sib: detached-friendly setup with conv/scratch defaultHee-Suk Kim2026-05-251-0/+2
| | | | | | | | | | | | | | | | Replace git's default refs/heads/master HEAD with refs/conv/scratch, matching sib's namespace convention. Remove refs/heads and refs/tags directories since sib doesn't use them — keeps the repo layout minimal and signals intent that branches/tags aren't part of the model. Use `echo' instead of the `symbolic-ref' command because using it pollutes the reflog, and I separated them because using the `--branch' command during init forces the refs/heads prefix. Need to use it more to know for sure, but it seems like strict Git-style branch/tag separation isn't really necessary. Signed-off-by: Hee-Suk Kim <[email protected]>
* sib-switch: implementHee-Suk Kim2026-05-251-1/+0
| | | | | | | | The reason there is no distinction like heads or tags is that, unlike Git, there is no need to differentiate between the two. When user set a checkpoint, it can be promoted to a conversation session. Signed-off-by: Hee-Suk Kim <[email protected]>
* sib: dont fix git author date when creating chainHee-Suk Kim2026-05-251-3/+1
| | | | | | | | | Basically, it is good to have the timestamp recorded somewhere. If you record it in the trace, the reproducibility—which was the purpose of fixing it—is lost anyway, also setting it with 0000 makes reflog invisable with ./sib git reflog. Signed-off-by: Hee-Suk Kim <[email protected]>
* sib: implement chain-jsonlHee-Suk Kim2026-05-251-0/+19
| | | | | | | This generates a chain from jsonl. Likely to be used to import prompts or other conversations into the sib repository mainly. Signed-off-by: Hee-Suk Kim <[email protected]>
* 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]>
* 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-181-0/+5
| | | | | | | 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]>
* 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-0/+107
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]>