Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .claude-plugin/marketplace.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@
},
"metadata": {
"description": "Basalt — the trust layer for AI-generated work. Connect your AI to publish, update and share governed docs by URL.",
"version": "0.3.3"
"version": "0.3.4"
},
"plugins": [
{
"name": "basalt",
"source": "./plugins/basalt",
"description": "Connect your AI to Basalt — publish, update and share governed docs by URL. Bundles the Basalt MCP server (OAuth) + a skill that converges on it when you ask to publish or share written work.",
"version": "0.3.3",
"version": "0.3.4",
"author": {
"name": "Cofoundy SAC"
},
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,8 @@ that talks when it doesn't need to is just noise:
network, no output).
- **At the end of a turn** — if you edited vault docs but didn't publish, one line
asks whether to publish. Set `publish: auto` in that `vault.yaml` and it publishes
the changed files for you (diff-aware, once per turn — never on every keystroke).
the changed files for you (diff-aware, once per turn — never on every keystroke),
even when the repo's own publish Action would get to them a minute later.

Per-vault policy lives in `vault.yaml`: `publish: prompt` (default) · `auto` ·
`manual`. When one doc needs a different answer than its vault — the server refuses
Expand Down
2 changes: 1 addition & 1 deletion plugins/basalt/.claude-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "basalt",
"description": "Connect your AI to Basalt — publish, update and share governed docs by URL. Bundles the Basalt MCP server (OAuth), a skill that converges on it when you ask to publish or share written work, and quiet session hooks (auth probe · edit tracking · publish nudge).",
"version": "0.3.3",
"version": "0.3.4",
"author": {
"name": "Cofoundy SAC",
"url": "https://cofoundy.dev"
Expand Down
7 changes: 5 additions & 2 deletions plugins/basalt/hooks/stop.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,12 @@ auto_files=(); prompt_n=0
if [ -f "$df" ]; then
while IFS= read -r f; do
[ -n "$f" ] || continue
policy="$(doc_policy "$(find_vault "$f")" "$f")"
# `auto` asked for THIS turn: the Action would publish a minute later, and a second
# publish of the same source is a server sha-skip. So `auto` never defers to it.
[ "$policy" = "auto" ] && { auto_files+=("$f"); continue; }
published_by_repo_action "$f" && continue # Mechanism B → already publishing
case "$(doc_policy "$(find_vault "$f")" "$f")" in
auto) auto_files+=("$f") ;;
case "$policy" in
manual) : ;; # explicitly silent
*) prompt_n=$((prompt_n + 1)) ;; # prompt (default)
esac
Expand Down
14 changes: 14 additions & 0 deletions plugins/basalt/hooks/tests/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -568,6 +568,20 @@ D3="$(add_doc "$R_BLOCK" docs/note.mdx push)"
seed_stop "$D3"
expect_silent "(a) block-sequence list form (paths:\\n - '**.md'\\n - '**.mdx') is read too"

# (a′) `publish: auto` wins over Mechanism B. The Action publishes a pushed doc a minute
# later; a vault that asked for `auto` asked for THIS turn. Publishing what the Action will
# also publish costs nothing (the server sha-skips the second one), so `auto` publishes it
# now instead of leaving it to the runner queue.
R_AUTOWF="$(mk_repo autowfvault "$WF_CANON")"
printf 'name: autowfvault\npublish: auto\n' > "$R_AUTOWF/vault.yaml"
git -C "$R_AUTOWF" commit -qam auto >/dev/null 2>&1 && git -C "$R_AUTOWF" push -q origin main >/dev/null 2>&1
D_AUTOWF="$(add_doc "$R_AUTOWF" docs/note.md push)"
seed_stop "$D_AUTOWF"; : > "$BASALT_STUB_CALLS"
out="$(BASALT_STUB_MODE=publish-ok stop_out)"
{ printf '%s' "$out" | grep -qi 'auto-published' && grep -Fxq "$D_AUTOWF" "$BASALT_STUB_CALLS"; } \
&& ok "(a′) publish: auto + doc the Action covers → published THIS turn, not left to the runner" \
|| no "(a′) auto must not defer to the Action (out:${out:-<silence>} calls:$(cat "$BASALT_STUB_CALLS"))"

# (b) THE NEGATIVE ARM — the one that gets skipped. A fix that silences the hook in all
# three arms has deleted the feature instead of repairing it.
D_DIRTY="$(add_doc "$R_CANON" docs/uncommitted.md dirty)"
Expand Down
Loading