@brickhouse-tech/sync-agents 1.0.1 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +30 -0
  2. package/package.json +6 -6
package/README.md CHANGED
@@ -106,6 +106,13 @@ AGENTS.md is also symlinked to CLAUDE.md so that Claude reads the index natively
106
106
  | `sync` | Create symlinks from `.agents/` into all target directories, and symlink `AGENTS.md` to `CLAUDE.md` |
107
107
  | `watch` | Watch `.agents/` for changes and auto-regenerate `AGENTS.md` |
108
108
  | `import <url>` | Import a rule/skill/workflow from a URL |
109
+ | `pull [--dry-run\|--offline\|--force\|--only NAME\|--global]` | Fetch every `sources.yaml` entry, verify integrity, install into the matching buckets |
110
+ | `update [NAME]` | Re-resolve refs and re-pull entries whose upstream moved; SHA-pinned entries are skipped |
111
+ | `source add <entry>` | Append an entry to `sources.yaml` and pull it |
112
+ | `source remove <name> [--keep]` | Remove the manifest entry and delete the artifact (`--keep` converts it to manual) |
113
+ | `source list [--json]` | Show each entry's local state: `ok` / `outdated` / `modified` / `missing` |
114
+ | `source bundle` | Rebuild `sources.yaml` from installed artifacts' origin metadata |
115
+ | `source detach <name>` | Un-manage an artifact: flip its origin to manual and drop the manifest entry |
109
116
  | `git-hook` | Install a pre-commit git hook for auto-sync (`hook` remains as a deprecated alias) |
110
117
  | `inherit <label> <path>` | Add an inheritance link to AGENTS.md |
111
118
  | `inherit --list` | List current inheritance links |
@@ -193,6 +200,29 @@ sync-agents lint
193
200
  sync-agents lint --fix
194
201
  ```
195
202
 
203
+ ## Source manifest (pull, lockfile & provenance)
204
+
205
+ Declare upstream rules, skills, workflows — or whole `.agents/` trees — in `.agents/sources.yaml` and install them reproducibly:
206
+
207
+ ```yaml
208
+ version: 1
209
+ sources:
210
+ - skill:anthropic/skill-pack@v1.2.0/skills/code-review
211
+ - rule:my-org/agent-norms@main/rules/security.md
212
+ - tree:my-org/team-agents@v2.0.0 # fans out to every bucket in the upstream .agents/
213
+ ```
214
+
215
+ `sync-agents pull` resolves each ref to a commit SHA via the GitHub API, fetches the repo tarball (cached by SHA under `$XDG_CACHE_HOME/sync-agents/`, no `git` binary needed), verifies a deterministic sha256 content hash against `.agents/sources.lock`, and only then installs — a tampered tarball or corrupted cache aborts before anything is written. Every installed artifact carries provenance (`_origin.json` inside skill dirs, `<name>.origin.json` beside flat files) recording owner/repo/ref/SHA/hash; commit these so clones keep their provenance.
216
+
217
+ Safety rules: locally-edited artifacts are never overwritten without `--force`; a destination without origin metadata is treated as a manual conflict. Private repos use your token (`SYNC_AGENTS_GITHUB_TOKEN` > `GITHUB_TOKEN` > `GH_TOKEN` > `gh auth token`). All commands accept `--global` to operate on `~/.agents/` instead of the project.
218
+
219
+ ```bash
220
+ sync-agents source add skill:anthropic/skill-pack@v1.2.0/skills/code-review
221
+ sync-agents source list # ok / outdated / modified / missing per entry
222
+ sync-agents update # bump tag-tracked entries when upstream moves
223
+ sync-agents pull --offline # cache-only, for CI or airplanes
224
+ ```
225
+
196
226
  ## ADRs (Architecture Decision Records)
197
227
 
198
228
  ADRs live in `.agents/adrs/` with **status encoded by subdirectory**: `proposed/`, `accepted/`, `denied/`. `add adr <name>` scaffolds into `proposed/`; `sync-agents adr accept|deny|propose <name>` moves a record between statuses (nested grouping subdirs are preserved) and regenerates the index.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brickhouse-tech/sync-agents",
3
- "version": "1.0.1",
3
+ "version": "1.1.0",
4
4
  "description": "Simple scripts to DRY up common agent interactions across multiple LLM providers.",
5
5
  "keywords": [
6
6
  "agents",
@@ -26,11 +26,11 @@
26
26
  "bin/sync-agents.js"
27
27
  ],
28
28
  "optionalDependencies": {
29
- "@brickhouse-tech/sync-agents-darwin-arm64": "1.0.1",
30
- "@brickhouse-tech/sync-agents-darwin-x64": "1.0.1",
31
- "@brickhouse-tech/sync-agents-linux-arm64": "1.0.1",
32
- "@brickhouse-tech/sync-agents-linux-x64": "1.0.1",
33
- "@brickhouse-tech/sync-agents-win32-x64": "1.0.1"
29
+ "@brickhouse-tech/sync-agents-darwin-arm64": "1.1.0",
30
+ "@brickhouse-tech/sync-agents-darwin-x64": "1.1.0",
31
+ "@brickhouse-tech/sync-agents-linux-arm64": "1.1.0",
32
+ "@brickhouse-tech/sync-agents-linux-x64": "1.1.0",
33
+ "@brickhouse-tech/sync-agents-win32-x64": "1.1.0"
34
34
  },
35
35
  "overrides": {
36
36
  "file-type": ">=22",