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
7 changes: 4 additions & 3 deletions .agents/capture/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,17 @@ eval "$(pnpm exec obsidian-e2e capture launch --vault /tmp/qa-capture/Notes --pr
amp orb service start quickadd-capture \
--command "$PWD/node_modules/.bin/obsidian-e2e capture launch --vault /tmp/qa-capture/Notes"
# `obsidian` is the CLI bridge from .agents/setup (~/.local/bin/obsidian).
HOME=$OBSIDIAN_E2E_CAPTURE_HOME obsidian vault=Notes plugins:restrict off
HOME=$OBSIDIAN_E2E_CAPTURE_HOME obsidian vault=Notes quickadd:list # lists "Add to inbox"
# On Linux the CLI socket follows XDG_RUNTIME_DIR, which the capture app sets to its HOME.
HOME=$OBSIDIAN_E2E_CAPTURE_HOME XDG_RUNTIME_DIR=$OBSIDIAN_E2E_CAPTURE_HOME obsidian vault=Notes plugins:restrict off
HOME=$OBSIDIAN_E2E_CAPTURE_HOME XDG_RUNTIME_DIR=$OBSIDIAN_E2E_CAPTURE_HOME obsidian vault=Notes quickadd:list # lists "Add to inbox"

# After the restrict-off reload (any reload drops the injected capture CSS):
pnpm exec obsidian-e2e capture prepare --width 1280 --height 800 --scale 2 \
--theme light --font Inter --hide-secret-warning
```

After `pnpm run build`, reload the plugin in the capture instance with
`HOME=$OBSIDIAN_E2E_CAPTURE_HOME obsidian vault=Notes plugin:reload id=quickadd`,
`HOME=$OBSIDIAN_E2E_CAPTURE_HOME XDG_RUNTIME_DIR=$OBSIDIAN_E2E_CAPTURE_HOME obsidian vault=Notes plugin:reload id=quickadd`,
then re-run `pnpm exec obsidian-e2e capture prepare` (any app reload drops the injected capture CSS).

## Recipes
Expand Down
78 changes: 0 additions & 78 deletions .agents/obsidian-open

This file was deleted.

112 changes: 0 additions & 112 deletions .agents/patch-obsidian-e2e-linux.mjs

This file was deleted.

5 changes: 0 additions & 5 deletions .agents/resume
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,9 @@ done
echo "Invalid Obsidian CLI bridge; rerun .agents/setup." >&2
exit 1
}
[[ -x "$SCRIPT_DIR/obsidian-open" && -r /opt/Obsidian/resources/obsidian.asar ]] || {
echo "Invalid Obsidian app bridge; rerun .agents/setup." >&2
exit 1
}
[[ -z "$(dpkg -V obsidian 2>/dev/null || true)" ]] || {
echo "Obsidian package integrity check failed; rerun .agents/setup." >&2
exit 1
}
node "$SCRIPT_DIR/patch-obsidian-e2e-linux.mjs" --check >/dev/null

echo "QuickAdd E2E prerequisites are available; Obsidian starts on demand."
7 changes: 0 additions & 7 deletions .agents/run-e2e
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,6 @@ export COREPACK_HOME="${COREPACK_HOME:-$ORIGINAL_HOME/.cache/quickadd-corepack}"

cd "$REPO_ROOT"

# `pnpm install` rewrites obsidian-e2e's dist, which drops the orb's Linux
# launcher patch that .agents/setup applied. Reapply it (idempotent) so a
# dependency bump mid-session doesn't stop the suite from starting.
if [[ -e /opt/Obsidian/resources/obsidian.asar ]]; then
node "$SCRIPT_DIR/patch-obsidian-e2e-linux.mjs" >/dev/null
fi

# The runner loads whatever main.js is on disk. Build it from the checked-out
# source so a stale bundle can't pass or fail a run for code it doesn't hold.
pnpm run --silent build >/dev/null
Expand Down
26 changes: 0 additions & 26 deletions .agents/setup
Original file line number Diff line number Diff line change
Expand Up @@ -163,34 +163,8 @@ ln -sfn /opt/Obsidian/obsidian-cli "$HOME/.local/bin/obsidian"
exit 1
}

# Undo global bridges installed by the first iteration of this setup, but only
# when they still point at the exact paths QuickAdd managed.
managed_legacy_open=false
if [[ "$(readlink -f /usr/bin/open 2>/dev/null || true)" == "/usr/local/lib/quickadd-obsidian-open" ]]; then
managed_legacy_open=true
sudo rm -f /usr/bin/open
sudo update-alternatives --auto open >/dev/null
fi
if [[ "$managed_legacy_open" == true ]]; then
sudo rm -f /usr/local/lib/quickadd-obsidian-open
fi
legacy_asar=/Applications/Obsidian.app/Contents/Resources/obsidian.asar
if [[ -L "$legacy_asar" ]] && \
[[ "$(readlink -f "$legacy_asar")" == "/opt/Obsidian/resources/obsidian.asar" ]]; then
sudo rm -f "$legacy_asar"
sudo rmdir --ignore-fail-on-non-empty \
/Applications/Obsidian.app/Contents/Resources \
/Applications/Obsidian.app/Contents /Applications/Obsidian.app /Applications
fi
[[ "$(readlink -f /usr/bin/open 2>/dev/null || true)" != "/usr/local/lib/quickadd-obsidian-open" ]] || {
echo "Failed to restore the system open command." >&2
exit 1
}

echo "[setup] Project dependencies, build, and isolated vault"
pnpm --dir "$REPO_ROOT" install --frozen-lockfile
node "$SCRIPT_DIR/patch-obsidian-e2e-linux.mjs"
node "$SCRIPT_DIR/patch-obsidian-e2e-linux.mjs" --check
pnpm --dir "$REPO_ROOT" run build
pnpm --dir "$REPO_ROOT" run --silent provision:e2e-vault

Expand Down
17 changes: 8 additions & 9 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,16 +44,16 @@ Automation or scripted work should surface disruptive operations in the PR descr

## Obsidian Runtime Workflow
Agents with the `verify-in-obsidian` skill get the generic workflow there:
vault-mode choice, the runner script quartet, the `--print-env` HOME remap,
instance teardown, and the dev-tools loop. This section is the QuickAdd-specific
vault-mode choice, the runner script quartet, `--print-env`, instance
teardown, and the dev-tools loop. This section is the QuickAdd-specific
brief that a skill-less agent still needs.

- Plugin id `quickadd`. Reload with `obsidian vault=<vault> plugin:reload
id=quickadd`; the runner's ready probe is `quickadd:list`. Run a choice with
`pnpm run obsidian:e2e -- quickadd:run choice=<name>` - note that `ok:true`
means the run finished, not that it did what you wanted. Drive anything else
through `pnpm run obsidian:e2e -- eval code=<javascript>`; top-level `await`
is not allowed there, so wrap async work in an IIFE the eval can await.
- Plugin id `quickadd`; the runner's ready probe is `quickadd:list`. Run a
choice with `pnpm run obsidian:e2e -- quickadd:run choice=<name>` - note that
`ok:true` means the run finished, not that it did what you wanted. Drive
anything else through `pnpm run obsidian:e2e -- eval code=<javascript>`;
top-level `await` is not allowed there, so wrap async work in an IIFE the
eval can await.
- The four runner scripts - `provision:e2e-vault`, `start:e2e-obsidian`,
`stop:e2e-obsidian`, `obsidian:e2e` - run the shared `obsidian-e2e` bin,
configured by `obsidian-e2e.config.mjs` at the repo root (plugin id, the
Expand Down Expand Up @@ -91,7 +91,6 @@ pnpm run obsidian:e2e -- dev:errors

# point the Vitest tests/e2e suite at the isolated instance:
eval "$(pnpm run --silent start:e2e-obsidian -- --print-env)"
export HOME="$OBSIDIAN_E2E_OBSIDIAN_HOME" # re-point the CLI socket
pnpm run test:e2e

pnpm run stop:e2e-obsidian # stop this worktree's instance on wrap-up
Expand Down
1 change: 0 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ Obsidian instance, so the tests never touch your own vaults:

```bash
eval "$(pnpm run --silent start:e2e-obsidian -- --print-env)"
export HOME="$OBSIDIAN_E2E_OBSIDIAN_HOME"
pnpm run test:e2e
pnpm run stop:e2e-obsidian
```
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"jsdom": "30",
"moment": "2.31.0",
"obsidian": "1.13.1",
"obsidian-e2e": "^0.12.1",
"obsidian-e2e": "^0.13.0",
"svelte": "^5",
"svelte-check": "^4",
"svelte-eslint-parser": "^1.8.1",
Expand Down
10 changes: 5 additions & 5 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading