Skip to content

Add task→resource dependencies#36

Merged
llambeau merged 3 commits intomasterfrom
feat/task-dependencies
Apr 23, 2026
Merged

Add task→resource dependencies#36
llambeau merged 3 commits intomasterfrom
feat/task-dependencies

Conversation

@llambeau
Copy link
Copy Markdown
Contributor

Tasks can now declare dependencies: [...] listing resource refs that must be built before the task script runs. Bare names are resolved against the task's own component first, then fall back to a global name lookup, matching how pre works for task refs. Fully qualified component:resource refs are supported too.

Also fixes CreateFileOperation to mkdir -p the target's parent directory, which was missing and made file resources with nested paths fail with ENOENT.

llambeau and others added 3 commits April 23, 2026 14:38
Tasks can now declare `dependencies: [...]` listing resource refs that
must be built before the task script runs. Bare names are resolved
against the task's own component first, then fall back to a global name
lookup, matching how `pre` works for task refs. Fully qualified
`component:resource` refs are supported too.

Also fixes CreateFileOperation to `mkdir -p` the target's parent
directory, which was missing and made file resources with nested paths
fail with ENOENT.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Resource names can already contain `/` (they come from the YAML map
key), so refs to them in task `pre`/`dependencies` and resource
`dependencies` need to permit `/` too. Without this, declaring a task
that depends on a path-style resource like `fastlane/key.p8` fails
config validation even though the resource itself is valid.

Component/plugin names (the `Identifier` type) keep the stricter
pattern — slashes are only allowed in the name suffix of a qualified
ref, not in the `component:` prefix.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Introduces a dedicated resource type to materialize a 1Password file
attachment on disk. Unlike a text-interpolation `${op:...}` reference —
which can't safely carry binary bytes through the template pipeline —
`op/file` expresses the intent literally and writes raw bytes via
`op read --force --out-file`.

Usage:

    resources:
      fastlane/keystore.jks:
        type: op/file
        params:
          reference: op://MyVault/MyItem/keystore.jks

Internals:
- OnePasswordProvider.fetchFileAttachment(reference, destPath) shells
  out to `op read --force --out-file <destPath> <reference>`, which is
  the only binary-safe output path on the `op` CLI (stdout replaces
  invalid UTF-8 bytes with U+FFFD, corrupting keystores, .p8 keys, etc.).
- OpFileResourceBuilder + FetchOpFileOperation registered as `op/file`.
- schema.json gains an `op/file` branch requiring a `reference` that
  starts with `op://`.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@llambeau llambeau force-pushed the feat/task-dependencies branch from c444090 to 7f9e8cd Compare April 23, 2026 15:01
@llambeau llambeau merged commit 8e97070 into master Apr 23, 2026
3 of 4 checks passed
llambeau added a commit that referenced this pull request Apr 23, 2026
Both shipped in #36 but the website reference and secrets guide were
never updated, so users had no way to discover either feature from the
docs.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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