Feat/automation nodes - #2
Merged
Merged
Conversation
Contributes this plugin's own trigger, Condition, and Action node types to the automation graph: - com.paca.time-logging.entry_created (trigger): fires whenever a time log entry is created. Backed by a new event emitted from createTimeLog in timelogs.go. - com.paca.time-logging.total_minutes_exceeds (condition): sums minutes logged against a task (optionally filtered to one member) and matches when the total exceeds a configured threshold. Summed in Go rather than via SQL SUM/COALESCE so it works identically against both the real Postgres backend and the plugintest in-memory DB, which only supports simple column-projection + WHERE matching (see plugin-sdk-go/plugintest/backends.go). - com.paca.time-logging.log_time (action): logs a time entry against a task on a plugin's/automation's behalf, with idempotency-key based retry protection (verified by a test that checks a retried run does not double-insert). Registers all three via ctx.Condition()/ctx.Action() in plugin.go (trigger registration is manifest-only - the event is emitted from existing application code), and adds the automation block to plugin.json. NOTE: go.mod has a temporary 'replace' pointing at the sibling plugin-sdk-go checkout, needed because this PR depends on plugin-sdk-go's not-yet-released Condition/Action SDK support (see Paca-AI/plugin-sdk-go branch feat/automation-condition-action-nodes). Must be swapped for a real pinned version once that SDK change is tagged and released - do not merge with the replace directive still in place. Verified: go vet clean, 8 new tests pass (including the idempotency retry test), GOOS=wasip1 GOARCH=wasm build succeeds (produces a working .wasm binary).
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.
No description provided.