Repository navigation
feat(automations): set a field, move to a collection, write a note - #444
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CyjR2zEfmTXBewKAx9Taw5
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.
Description
Before: automations could message people, use the model, call a web address and run Lens work. They couldn't change an asset or write anything down.
After: the last group of workflow studio M7 actions.
set_field(effectlens)asset's custom fields, named by id or label, tovalue. An empty value clears it.{asset, field, label, value, changed}.add_to_collection(effectlens)assetinto acollectionin its own namespace.{asset, collection, name, moved, newly_see}.write_noteabout, else the one named, else the automation's only namespace. A thing has one page, so a second note about it goes at that page's end.on: asset, it writes a note on the asset as the person. A private note is effectself, so it runs at once; asharednote is effectlens.{on, page or note, added, url}.The asset actions default
assetto the event's object. On that asset, inside the automation's namespaces, they are routine; on any other asset, they ask first. They check the person's role now:edit, orreadfor a private note.Calendar writes are left out. Lens signs in to Google Calendar read-only, and writing needs a new consent, which would change existing installs. This is written down as refine-later in the docs.
Motivation and Context
Workflow studio, module M7 (plan:
/mnt/project-files/workflow-studio/plan.md§5 M7), PR 5 of 5. Earlier PRs: #433 (notify), #438 (AI), #439 (web) and #441 (run). This completes the brief's action list.Choices taken (reversible):
resolve_riskhas no database access to tell when a move would widen access. A risk that reads the database is in refine-later.Types of changes
!in the title)Checklist:
tests/api/test_actions_lens.pycovers:set_field: history and audit entries, choice checks, an unknown field, and permissions.add_to_collection: a move that widens access is refused, then done once approved; another namespace and an unknown collection are refused.write_note: a page, appending to a thing's own page, private and shared asset notes, a viewer's limits, and namespaces.docs/accordingly (docs/automations.md"Changing assets and writing notes", Actions rows, refine later).Done questions (AGENTS.md)
actions.catalog(), which M6 serves to the API, MCP and the assistant.assetdefaults to the event's object, a page's title defaults to the first line, and the namespace defaults to the automation's.docs/automations.md:edit.🤖 Generated with Claude Code
https://claude.ai/code/session_01CyjR2zEfmTXBewKAx9Taw5
Generated by Claude Code