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
19 changes: 19 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,25 @@

## Unreleased


### Changed

- Automatic triggers whose condition does not match, or that are suppressed by an idempotency key or minimum interval, no longer write a skipped run to history. Manual runs are still recorded.
- Migrated CEL conditions are strict: reading a field that is missing is an evaluation error and fails the run, where the old Bases expressions treated it as false. Use `has()` or optional selection (`event.data.?after.?status.orValue("")`) when a field may be absent.
- Execute Runtime 0.2 workflow records directly with CEL expressions, trigger guards, ordered variables/iteration, persistent seven-day idempotency reservations, concurrency policies, debounce/minimum intervals, deadlines and item limits. Missed cron/interval schedules fire once after downtime; cron respects its timezone.
- Migrate Bases expressions, templates and structured conditions through the reviewed backup/apply/rollback flow. Unsupported conversions disable the workflow with an explanation. Unmigrated v1 files keep the original evaluator; CEL notes open directly for YAML editing.
- Store runtime run and action-attempt evidence in plugin configuration storage while retaining the history UI and read-only compatibility with old history. Interrupted work is not replayed.
- Add the device-local “Run workflows on this device” setting, enabled by default on desktop and disabled on mobile. Manual runs remain available. Obsidian 1.8.7 is now required for its local-storage API. Turning it off persists across restarts.
- Use stable mdbase interop 0.1.0 and runtime 0.2.0 packages; remove the vendored prerelease archive. Connect to the published `mdbase-sync` plugin and validate API/profile versions. Settings and documentation use “Allow plugin integrations”.
- Preserve TaskNotes v5 task IDs in event data; support stable-ID task reads/mutations and correct the scaffolded time-entry DTO. Metadata-change events use the `mdbase.record.modified` data shape. New/migrated workflows respect collection type keys and suggest the runtime standard pack when its type is missing.
- Generate disabled CEL starter workflows and recognize runtime notes in the workflow Base/note cards.

### Fixed

- Disabled workflows no longer execute or create skipped-run history on contract events.
- Interop step idempotency derives from the run idempotency key, step ID and item index.


## [0.1.6] - 2026-11-11

### Changed
Expand Down
33 changes: 20 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ Use it for things like:

## Requirements

- Obsidian 1.8.0 or newer
- Obsidian 1.8.7 or newer
- TaskNotes installed and enabled
- `mdbase-obsidian` is optional for local TaskNotes-only workflows and required
- `mdbase-sync` is optional for local TaskNotes-only workflows and required
for cross-application contract events and contract actions

## Install
Expand All @@ -37,6 +37,12 @@ Useful commands:
- **Migrate workflow files to the mdbase runtime format**
- `Run: <workflow name>` for enabled workflows that include a manual trigger

Automatic execution is controlled by **Run workflows on this device**, a device-local setting that defaults on for desktop and off for mobile. Manual runs remain available when it is off. Keep automatic execution enabled on one device for a synced vault.

Run idempotency reservations persist for seven days; cron/interval downtime coalesces into one firing. Concurrency supports skip, queue, replace, and allow. This client does not provide distributed leases, a transactional event journal, or interrupted-run replay; see the [schema and execution limits](docs/workflow-schema.md).

In an mdbase 0.3 collection, new/migrated notes use its configured explicit type key (including TaskNotes v5's `mdbase_type`). If the runtime type is missing, the plugin suggests installing the **mdbase runtime standard** pack.

## Included Workflows

The default set includes disabled examples for time tracking, status-triggered date cleanup, started timestamps, overdue review, scheduled-date rollover, due-date priority escalation, blocked-task review, folder movement, subtask inheritance, dependency inheritance, and parent-to-subtask mirroring.
Expand All @@ -60,7 +66,8 @@ triggers:
version: 1.0.0
x-tasknotes:
type: tasknotes.event
to: active
if:
$expr: 'event.data.after.status == "active"'

steps:
- id: start-time
Expand All @@ -69,17 +76,18 @@ steps:
version: 1.0.0
input:
task:
$expr: event.after.path
$expr: event.data.after.path

run:
concurrency:
group: workflow
group:
$expr: workflow.id
policy: skip
limits:
max_items: 25
on_error: stop
x-tasknotes:
format_version: 1
format_version: 2
source: tasknotes-workflows
---
```
Expand All @@ -102,7 +110,7 @@ New files and editor saves validate against the canonical mdbase runtime
`runtime_workflow` schema from Runtime profile 0.2. Files created by TaskNotes Workflows 0.1.x continue to
run through the compatibility reader. The migration command shows a per-file
diff, checks for changes after analysis, and creates a backup before rewriting
legacy frontmatter; it never runs automatically during plugin startup.
legacy frontmatter; it never runs automatically during plugin startup. It also converts format v1 expressions to CEL. Unsupported conversions disable the workflow and explain the required manual work.

## Contract Events And Actions

Expand Down Expand Up @@ -131,16 +139,15 @@ steps:
canvas_path: TaskNotes/Canvases/Completed tasks.canvas
card:
kind: file
file: "{{event.data.task_path}}"
file:
$expr: event.data.task_path
```

The included **Add completed tasks to a canvas** workflow demonstrates this
flow and is disabled by default. Enable **Allow local application
interoperability** in mdbase settings before enabling it.
flow and is disabled by default. Enable **Allow plugin integrations** in mdbase settings before enabling it.

Contract events use CloudEvents and are multicast. Action execution requires
exactly one compatible provider. Run details preserve the exact contract,
source, provider, request, attempt, and outcome evidence. Compatibility never
exactly one compatible provider. Run details preserve contract, provider, request, attempt, and outcome evidence. Compatibility never
acts as authorization; the mdbase host grant remains default-deny.

## Editing Workflows
Expand All @@ -149,7 +156,7 @@ Use the workflow Base as the primary UI. Workflow cards open a modal editor for

The Markdown note remains the source of truth. Use the card's note action when direct YAML editing is useful.

Workflows are typed YAML pipelines. Advanced guards and computed input values use Obsidian Bases formulas via the same expression engine as Bases. Date fields in the editor include fixed, workflow value, relative date, and formula modes, and run history shows both the source input and resolved input for dry-run review.
Workflows execute in this client using Runtime 0.2 records and CEL expressions. CEL workflows open their YAML note for editing; v1 workflows keep the original visual editor and Bases evaluator until migrated. Plain strings are literals in CEL workflows. Run history keeps its existing interface and stores runtime run/action-attempt evidence.

See [Workflow Schema](docs/workflow-schema.md) and [AI Agent Authoring Script](docs/ai-agent-authoring-script.md) for the full format.

Expand Down
12 changes: 8 additions & 4 deletions docs/ai-agent-authoring-script.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,15 @@ safe testing steps.
`maxItems`, or `onError` in a new file.
4. Put TaskNotes-only trigger configuration under `x-tasknotes`.
5. Prefer `enabled: false` for workflows that mutate tasks or vault files.
6. Use `$expr` objects for computed values. Plain strings are literals.
6. Set `x-tasknotes.format_version: 2`. Use CEL `$expr` objects for computed values. Plain strings, including `{{...}}`, are literals. Runtime payloads are under `event.data`.
7. Give every trigger and step a stable runtime identifier.
8. Keep `run.limits.max_items` bounded.
9. Do not use arbitrary JavaScript, shell commands, or unrestricted HTTP.
10. Use the TaskNotes action catalog rather than editing task frontmatter.
11. Explain dry-run checks and mutations in the Markdown body.

In an mdbase 0.3 collection, use the first configured `settings.explicit_type_keys` key (for example `mdbase_type`) instead of `type`. Cross-application actions require `mdbase-sync` and **Allow plugin integrations**. Run automatic workflows on one device using the device-local executor setting.

TaskNotes-specific trigger metadata is a runtime extension:

```yaml
Expand All @@ -34,7 +36,8 @@ triggers:
version: 1.0.0
x-tasknotes:
type: tasknotes.event
to: active
if:
$expr: 'event.data.after.status == "active"'
```

Scheduled triggers use a canonical event ID plus executor metadata:
Expand Down Expand Up @@ -87,13 +90,14 @@ steps:
message: Workflow is wired.
run:
concurrency:
group: workflow
group:
$expr: workflow.id
policy: skip
limits:
max_items: 25
on_error: stop
x-tasknotes:
format_version: 1
format_version: 2
source: tasknotes-workflows
---

Expand Down
Loading
Loading