@brickhouse-tech/sync-agents 0.1.0 → 0.1.2

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/package.json +10 -7
  2. package/src/sh/sync-agents.sh +50 -48
package/package.json CHANGED
@@ -1,11 +1,14 @@
1
1
  {
2
2
  "name": "@brickhouse-tech/sync-agents",
3
- "version": "0.1.0",
4
- "description": "AWS CFT Utilities to fill the gaps for Cloud Formation",
3
+ "version": "0.1.2",
4
+ "description": "Simple scripts to DRY up common agent interactions across multiple LLM providers.",
5
5
  "keywords": [
6
- "cft",
7
- "aws",
8
- "cloudformation"
6
+ "agents",
7
+ "claude",
8
+ "sync",
9
+ "codex",
10
+ "gpt",
11
+ "windsurf"
9
12
  ],
10
13
  "homepage": "https://github.com/brickhouse-tech/sync-agents#readme",
11
14
  "bugs": {
@@ -23,14 +26,14 @@
23
26
  "src/**/*"
24
27
  ],
25
28
  "scripts": {
29
+ "lint": "shellcheck src/sh/*.sh",
26
30
  "test": "npx bats test/"
27
31
  },
28
- "dependencies": {
29
- },
30
32
  "devDependencies": {
31
33
  "@commitlint/cli": "^20",
32
34
  "@commitlint/config-conventional": "^20",
33
35
  "commitlint": "20",
36
+ "shellcheck": "^4.1.0",
34
37
  "sort-package-json": "3.6"
35
38
  }
36
39
  }
@@ -374,53 +374,55 @@ This file indexes all rules, skills, and workflows defined in `.agents/`.
374
374
 
375
375
  HEADER
376
376
 
377
- # Rules
378
- echo "## Rules" >> "$outfile"
379
- echo "" >> "$outfile"
380
- if compgen -G "$agents_dir/rules/*.md" > /dev/null 2>&1; then
381
- for f in "$agents_dir/rules/"*.md; do
382
- local name
383
- name="$(basename "$f" .md)"
384
- echo "- [$name](.agents/rules/$name.md)" >> "$outfile"
385
- done
386
- else
387
- echo "_No rules defined yet. Add one with \`sync-agents add rule <name>\`._" >> "$outfile"
388
- fi
389
- echo "" >> "$outfile"
390
-
391
- # Skills
392
- echo "## Skills" >> "$outfile"
393
- echo "" >> "$outfile"
394
- if compgen -G "$agents_dir/skills/*.md" > /dev/null 2>&1; then
395
- for f in "$agents_dir/skills/"*.md; do
396
- local name
397
- name="$(basename "$f" .md)"
398
- echo "- [$name](.agents/skills/$name.md)" >> "$outfile"
399
- done
400
- else
401
- echo "_No skills defined yet. Add one with \`sync-agents add skill <name>\`._" >> "$outfile"
402
- fi
403
- echo "" >> "$outfile"
404
-
405
- # Workflows
406
- echo "## Workflows" >> "$outfile"
407
- echo "" >> "$outfile"
408
- if compgen -G "$agents_dir/workflows/*.md" > /dev/null 2>&1; then
409
- for f in "$agents_dir/workflows/"*.md; do
410
- local name
411
- name="$(basename "$f" .md)"
412
- echo "- [$name](.agents/workflows/$name.md)" >> "$outfile"
413
- done
414
- else
415
- echo "_No workflows defined yet. Add one with \`sync-agents add workflow <name>\`._" >> "$outfile"
416
- fi
417
- echo "" >> "$outfile"
418
-
419
- # State reference
420
- echo "## State" >> "$outfile"
421
- echo "" >> "$outfile"
422
- echo "- [STATE.md](.agents/STATE.md)" >> "$outfile"
423
- echo "" >> "$outfile"
377
+ {
378
+ # Rules
379
+ echo "## Rules"
380
+ echo ""
381
+ if compgen -G "$agents_dir/rules/*.md" > /dev/null 2>&1; then
382
+ for f in "$agents_dir/rules/"*.md; do
383
+ local name
384
+ name="$(basename "$f" .md)"
385
+ echo "- [$name](.agents/rules/$name.md)"
386
+ done
387
+ else
388
+ echo "_No rules defined yet. Add one with \`sync-agents add rule <name>\`._"
389
+ fi
390
+ echo ""
391
+
392
+ # Skills
393
+ echo "## Skills"
394
+ echo ""
395
+ if compgen -G "$agents_dir/skills/*.md" > /dev/null 2>&1; then
396
+ for f in "$agents_dir/skills/"*.md; do
397
+ local name
398
+ name="$(basename "$f" .md)"
399
+ echo "- [$name](.agents/skills/$name.md)"
400
+ done
401
+ else
402
+ echo "_No skills defined yet. Add one with \`sync-agents add skill <name>\`._"
403
+ fi
404
+ echo ""
405
+
406
+ # Workflows
407
+ echo "## Workflows"
408
+ echo ""
409
+ if compgen -G "$agents_dir/workflows/*.md" > /dev/null 2>&1; then
410
+ for f in "$agents_dir/workflows/"*.md; do
411
+ local name
412
+ name="$(basename "$f" .md)"
413
+ echo "- [$name](.agents/workflows/$name.md)"
414
+ done
415
+ else
416
+ echo "_No workflows defined yet. Add one with \`sync-agents add workflow <name>\`._"
417
+ fi
418
+ echo ""
419
+
420
+ # State reference
421
+ echo "## State"
422
+ echo ""
423
+ echo "- [STATE.md](.agents/STATE.md)"
424
+ echo ""
425
+ } >> "$outfile"
424
426
  }
425
427
 
426
428
  # --------------------------------------------------------------------------
@@ -435,7 +437,7 @@ print_tree() {
435
437
  # Collect entries
436
438
  while IFS= read -r entry; do
437
439
  entries+=("$entry")
438
- done < <(ls -1A "$dir" 2>/dev/null | sort)
440
+ done < <(find "$dir" -maxdepth 1 -mindepth 1 -exec basename {} \; 2>/dev/null | sort)
439
441
 
440
442
  local count=${#entries[@]}
441
443
  if [[ $count -eq 0 ]]; then