Skip to content

Feat/automation nodes - #2

Merged
pikann merged 3 commits into
masterfrom
feat/automation-nodes
Aug 3, 2026
Merged

Feat/automation nodes#2
pikann merged 3 commits into
masterfrom
feat/automation-nodes

Conversation

@pikann

@pikann pikann commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

No description provided.

pikann added 3 commits July 30, 2026 11:59
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).
@pikann
pikann merged commit 11563b0 into master Aug 3, 2026
3 checks passed
@pikann
pikann deleted the feat/automation-nodes branch August 3, 2026 15:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant