-
Notifications
You must be signed in to change notification settings - Fork 295
Description
imports
A frontmatter section that allows to declare dependencies that will be resolved and imported at compile time.
---
imports:
- microsoft/genaiscript v1.5 agentics/engine.md
---
The genaiscript script was imported.
Frontmatter
The imports field takes an array of string formatted as follows (go.mod style):
<owner>/<repo> <ref> <path>
The compiler will resolve a copy of the import at compile time (and probably cache it locally). The resolution follows semver rules (add Go package that implements npm-like semver syntax).
install
The gh aw install command takes care of resolving, downloading all the imports and caching them locally.
# install transitive closure of imports
gh aw install
# install for a single workflow
gh aw install research
The install algorithm is as follows:
collect the set of imports from the selected workflows
resolve the sha of the commit for each import
do a shallow clone of each <owner>/<repo>@<sha> under `.aw/imports`
validate that each path exists, including transitive closure of @includes
The install algorithm produces lock file that contains the list of resolved paths and sha of the commit, similar to go.sum. The install command always uses the information in the lock file if avaiable.
compile
The gh aw compile command will go through the set of import and apply the same logic as @include to merge them in the compiled workflow. It assumes install was run and fails if one of the imports is not found in the cached copies.
update
The gh aw update resolves the latest version according to semver rules. It updates the frontmatter with the new versions. Updates the lock file.