feat(skills): file notes with notes.sh move, and stop a failed retitle from wiping them - #46
Merged
Merged
Conversation
Recently published versions are the window where supply chain compromises are still undetected. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DUKBFkNf9KaDiKiWqfW2Vq
Triaging the Apple Notes inbox was the one workflow the skill left to hand-written AppleScript every time. `notes.sh move` now takes nested slash-separated paths, creates the missing destination levels, refuses to move out of a shared folder, and optionally retitles the note as it files it. Retitling rewrites the body's first line, since Notes derives the name from it. That round-trip goes through `get body`, which omits attachment markup — writing the HTML back deletes every attachment for good, and the note lands in Recently Deleted already emptied of them. Guard against it rather than destroy: refuse to retitle a note that has any. Also record the two traps found the hard way: a prefix env assignment in front of a pipeline reaches only the first command, so perl read an empty header and silently inserted nothing; and a title's segment count has to mirror the destination's depth, or freshly filed notes come out inconsistent. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016sULBMwNmi5seHJ8FF5a67
An empty rewritten body was written back verbatim, and `set body of n to ""` succeeds silently: the note kept its place but lost its content and its title. Bail out while the original body is still intact, and record the two other traps found while triaging the inbox — a header must sit on line 2 because retitling replaces the first div, and a link attachment still exposes its URL. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016sULBMwNmi5seHJ8FF5a67
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Contexte
Sortie du triage de l'inbox Apple Notes :
notes.sh moveclasse et retitre une note en une commande, et les pièges rencontrés en s'en servant sont désormais soit bloqués par le script, soit documentés.Contenu
feat(skills):notes.sh move— chemins imbriqués, création des niveaux manquants, refus de sortir d'un dossier partagé, retitrage optionnel.fix(skills): un body réécrit vide n'est plus écrit —set body of n to ""réussit silencieusement et vide la note (elle réapparaît enNew Note, le titre vivant dans la première ligne du body).docs(skills): un en-tête doit être en ligne 2 (le retitrage remplace le premier<div>) ; une pièce jointe de type lien expose son URL viaget URL of, donc elle peut être réécrite en<a href>.feat(upgrade): quarantaine de 3 jours sur les mises à jour npm globales (indépendant du sujet Notes, embarqué dans la même branche).Vérification
bash -n .agents/skills/apple-notes/scripts/notes.sh4 Archives/Bigfoot,2 Areas/Septeoet3 Resources/IA; le garde-fou a été écrit après avoir constaté l'effacement de 3 bodies (contenu restauré).🤖 Generated with Claude Code
https://claude.ai/code/session_016sULBMwNmi5seHJ8FF5a67