@ozzylabs/feedradar 0.1.4 → 0.1.6
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.
- package/README.ja.md +12 -6
- package/README.md +11 -6
- package/dist/agents/claude-code.d.ts +12 -1
- package/dist/agents/claude-code.d.ts.map +1 -1
- package/dist/agents/claude-code.js +9 -5
- package/dist/agents/claude-code.js.map +1 -1
- package/dist/agents/codex-cli.d.ts +7 -1
- package/dist/agents/codex-cli.d.ts.map +1 -1
- package/dist/agents/codex-cli.js +9 -5
- package/dist/agents/codex-cli.js.map +1 -1
- package/dist/agents/copilot.d.ts +7 -1
- package/dist/agents/copilot.d.ts.map +1 -1
- package/dist/agents/copilot.js +9 -5
- package/dist/agents/copilot.js.map +1 -1
- package/dist/agents/gemini-cli.d.ts +7 -1
- package/dist/agents/gemini-cli.d.ts.map +1 -1
- package/dist/agents/gemini-cli.js +9 -5
- package/dist/agents/gemini-cli.js.map +1 -1
- package/dist/agents/index.d.ts +1 -1
- package/dist/agents/index.d.ts.map +1 -1
- package/dist/agents/types.d.ts +33 -0
- package/dist/agents/types.d.ts.map +1 -1
- package/dist/cli/_progress.d.ts +138 -0
- package/dist/cli/_progress.d.ts.map +1 -0
- package/dist/cli/_progress.js +176 -0
- package/dist/cli/_progress.js.map +1 -0
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +2 -0
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/research.d.ts +18 -20
- package/dist/cli/research.d.ts.map +1 -1
- package/dist/cli/research.js +318 -203
- package/dist/cli/research.js.map +1 -1
- package/dist/cli/review.d.ts +7 -0
- package/dist/cli/review.d.ts.map +1 -1
- package/dist/cli/review.js +46 -1
- package/dist/cli/review.js.map +1 -1
- package/dist/cli/source.d.ts +23 -2
- package/dist/cli/source.d.ts.map +1 -1
- package/dist/cli/source.js +428 -7
- package/dist/cli/source.js.map +1 -1
- package/dist/cli/update.d.ts +7 -0
- package/dist/cli/update.d.ts.map +1 -1
- package/dist/cli/update.js +41 -1
- package/dist/cli/update.js.map +1 -1
- package/dist/cli/watch.d.ts.map +1 -1
- package/dist/cli/watch.js +67 -3
- package/dist/cli/watch.js.map +1 -1
- package/dist/cli/workflow/generate-combined.d.ts +100 -0
- package/dist/cli/workflow/generate-combined.d.ts.map +1 -0
- package/dist/cli/workflow/generate-combined.js +387 -0
- package/dist/cli/workflow/generate-combined.js.map +1 -0
- package/dist/cli/workflow/generate-watch.d.ts +142 -0
- package/dist/cli/workflow/generate-watch.d.ts.map +1 -0
- package/dist/cli/workflow/generate-watch.js +338 -0
- package/dist/cli/workflow/generate-watch.js.map +1 -0
- package/dist/cli/workflow.d.ts +29 -0
- package/dist/cli/workflow.d.ts.map +1 -0
- package/dist/cli/workflow.js +66 -0
- package/dist/cli/workflow.js.map +1 -0
- package/dist/core/feeds/_fetch.d.ts +10 -0
- package/dist/core/feeds/_fetch.d.ts.map +1 -1
- package/dist/core/feeds/_fetch.js +182 -0
- package/dist/core/feeds/_fetch.js.map +1 -1
- package/dist/core/feeds/_jsonpath.d.ts +57 -0
- package/dist/core/feeds/_jsonpath.d.ts.map +1 -0
- package/dist/core/feeds/_jsonpath.js +207 -0
- package/dist/core/feeds/_jsonpath.js.map +1 -0
- package/dist/core/feeds/html-js.d.ts +8 -0
- package/dist/core/feeds/html-js.d.ts.map +1 -1
- package/dist/core/feeds/html-js.js +47 -1
- package/dist/core/feeds/html-js.js.map +1 -1
- package/dist/core/feeds/index.d.ts +1 -1
- package/dist/core/feeds/index.d.ts.map +1 -1
- package/dist/core/feeds/index.js +4 -0
- package/dist/core/feeds/index.js.map +1 -1
- package/dist/core/feeds/json-api.d.ts +29 -0
- package/dist/core/feeds/json-api.d.ts.map +1 -0
- package/dist/core/feeds/json-api.js +860 -0
- package/dist/core/feeds/json-api.js.map +1 -0
- package/dist/core/feeds/json-feed.d.ts +11 -0
- package/dist/core/feeds/json-feed.d.ts.map +1 -0
- package/dist/core/feeds/json-feed.js +242 -0
- package/dist/core/feeds/json-feed.js.map +1 -0
- package/dist/core/feeds/types.d.ts +123 -0
- package/dist/core/feeds/types.d.ts.map +1 -1
- package/dist/core/progress.d.ts +101 -0
- package/dist/core/progress.d.ts.map +1 -0
- package/dist/core/progress.js +212 -0
- package/dist/core/progress.js.map +1 -0
- package/dist/core/recipes.d.ts +138 -0
- package/dist/core/recipes.d.ts.map +1 -0
- package/dist/core/recipes.js +242 -0
- package/dist/core/recipes.js.map +1 -0
- package/dist/core/watcher.d.ts +61 -1
- package/dist/core/watcher.d.ts.map +1 -1
- package/dist/core/watcher.js +99 -2
- package/dist/core/watcher.js.map +1 -1
- package/dist/recipes/aws-whats-new.yaml +87 -0
- package/dist/recipes/dev-to.yaml +40 -0
- package/dist/schemas/index.d.ts +1 -0
- package/dist/schemas/index.d.ts.map +1 -1
- package/dist/schemas/index.js +1 -0
- package/dist/schemas/index.js.map +1 -1
- package/dist/schemas/recipe.d.ts +127 -0
- package/dist/schemas/recipe.d.ts.map +1 -0
- package/dist/schemas/recipe.js +57 -0
- package/dist/schemas/recipe.js.map +1 -0
- package/dist/schemas/source.d.ts +222 -0
- package/dist/schemas/source.d.ts.map +1 -1
- package/dist/schemas/source.js +234 -0
- package/dist/schemas/source.js.map +1 -1
- package/dist/templates/agents/AGENTS.md +33 -3
- package/dist/templates/feedradar.md +23 -8
- package/dist/templates/workflows/combined.template.yaml.tmpl +110 -0
- package/dist/templates/workflows/watch.template.yaml.tmpl +103 -0
- package/package.json +1 -2
|
@@ -24,7 +24,7 @@ radar watch run
|
|
|
24
24
|
# (c) あとは AI エージェントに頼む (次セクション)
|
|
25
25
|
```
|
|
26
26
|
|
|
27
|
-
`source add` と `watch run` は scheduler 連携を想定して CLI のままです。`--with-actions` / `--with-routines` を付けて init すれば、GitHub Actions / Claude Routines
|
|
27
|
+
`source add` と `watch run` は scheduler 連携を想定して CLI のままです。`--with-actions` / `--with-routines` を付けて init すれば、GitHub Actions / Claude Routines で定期実行する雛形が出ます。後から workflow を追加 / cadence 切替 / watch + 自動 research の連鎖が必要になったら `radar workflow generate watch | combined` で後追い生成できます ([ADR-0014](https://github.com/ozzy-labs/feedradar/blob/main/docs/adr/0014-workflow-generate-and-auto-research-safety.md))。
|
|
28
28
|
|
|
29
29
|
## 主要操作: エージェントに頼む
|
|
30
30
|
|
|
@@ -111,19 +111,34 @@ slash で直接呼ぶなら:
|
|
|
111
111
|
エージェントを起動しない自動化文脈では CLI を直接呼びます。`radar <subcommand> --help` で全コマンドのヘルプが出ます。
|
|
112
112
|
|
|
113
113
|
```bash
|
|
114
|
-
radar source add <id> --kind <rss|html|html-js|github-releases|npm-registry> --url <url> [options]
|
|
114
|
+
radar source add <id> --kind <rss|html|html-js|github-releases|npm-registry|json-feed|json-api> --url <url> [options]
|
|
115
|
+
radar source add <id> --recipe <name> [--keywords ... --tags ... --name ...] # バンドル recipe で 1 行追加 (ADR-0012)
|
|
115
116
|
radar source list
|
|
117
|
+
radar source recipes # バンドル recipe を一覧表示
|
|
116
118
|
radar source test <id> [--limit N] [--show-content]
|
|
117
119
|
radar source remove <id>
|
|
118
|
-
radar watch run [--source <id>] [--bootstrap]
|
|
119
|
-
radar research <item-id> --agent <agent>
|
|
120
|
+
radar watch run [--source <id>] [--bootstrap | --backfill [--max-pages N]] [-v|--verbose | -q|--quiet]
|
|
121
|
+
radar research <item-id> --agent <agent> [--verbose | --quiet] # 進捗表示・stdout pass-through は --verbose で有効化 (ADR-0015)
|
|
120
122
|
radar research --digest <item-id> <item-id> ... [--agent <agent>] # 複数 item を 1 digest にまとめる (ADR-0011)
|
|
121
|
-
radar review <research-id> --agent <agent>
|
|
122
|
-
radar update <research-id> --agent <agent>
|
|
123
|
+
radar review <research-id> --agent <agent> [--verbose | --quiet]
|
|
124
|
+
radar update <research-id> --agent <agent> [--verbose | --quiet]
|
|
123
125
|
radar dismiss <item-id>
|
|
126
|
+
radar research --batch [--max-items N] [--filter-tags <list>] [--agent <agent>] [--verbose | --quiet] # detected を一括 research (ADR-0014)
|
|
127
|
+
radar workflow generate watch [--cron "<expr>"] [--agent <agent>] [--output <path>] # GitHub Actions watch 雛形を後追い生成 (ADR-0014)
|
|
128
|
+
radar workflow generate combined [--watch-cron "<expr>"] [--max-items N] [--filter-tags <list>] [--agent <agent>] [--output <path>] # watch + 自動 research を --max-items ハードキャップ付きで生成 (ADR-0014)
|
|
124
129
|
```
|
|
125
130
|
|
|
126
|
-
|
|
131
|
+
JSON API は recipe ベースで、`kind: json-api` を選んで `pagination` を YAML に書く([ADR-0012](https://github.com/ozzy-labs/feedradar/blob/main/docs/adr/0012-json-api-adapter-and-recipe-strategy.md))。JSON Feed 1.0 / 1.1 標準に準拠したサイトは URL だけで動く zero-config kind (`kind: json-feed`)。過去の全件取り込みは `radar watch run --backfill` を使う (kind: json-api / github-releases / npm-registry 対応)。
|
|
132
|
+
|
|
133
|
+
長時間実行コマンド (`research` / `review` / `update` / `watch run --backfill` / html-js fetch / `source test`) は stderr に phase markers + spinner + 副次メトリクス (`stdout` / `output` / `page x/N`) を表示します([ADR-0015](https://github.com/ozzy-labs/feedradar/blob/main/docs/adr/0015-progress-reporting-ux.md))。挙動切替は env > flag > TTY auto-detect の優先順:
|
|
134
|
+
|
|
135
|
+
- `--verbose`(または `-v`): agent CLI / Playwright の stdout/stderr を pass-through。デバッグや「フリーズに見える」ときの第一手
|
|
136
|
+
- `--quiet`(または `-q`): reporter を完全に黙らせ、CLI の従来 1 行ログだけ残す
|
|
137
|
+
- `RADAR_NO_PROGRESS=1`(env): 上記より強い escape hatch。CI script で flag を消さずに reporter だけ off にしたいケース向け
|
|
138
|
+
|
|
139
|
+
詳細・トラブルシュート(`Agent running [mm:ss]` で動いていないように見える時の対処等)は [docs/user-guide.md → 進捗表示 / verbose / quiet](https://github.com/ozzy-labs/feedradar/blob/main/docs/user-guide.md#進捗表示--verbose--quiet) を参照。
|
|
140
|
+
|
|
141
|
+
定期実行の雛形 (GitHub Actions / Claude Routines) は `radar init --with-actions` / `--with-routines` で初回 bootstrap として生成できます。後追いで cadence 切替 / 複数 workflow 共存 / `combined` (watch + 自動 research) を追加したい場合は `radar workflow generate <type>` ([ADR-0014](https://github.com/ozzy-labs/feedradar/blob/main/docs/adr/0014-workflow-generate-and-auto-research-safety.md)) を使います。`combined` は `--max-items` ハードキャップを YAML literal + CLI default の二重防御で焼き込むため、暴走 feed (publisher 側 bug / `--backfill` 事故) による LLM cost 爆発を設計レベルで遮断します。
|
|
127
142
|
|
|
128
143
|
## このディレクトリのレイアウト
|
|
129
144
|
|
|
@@ -154,7 +169,7 @@ radar dismiss <item-id>
|
|
|
154
169
|
|
|
155
170
|
## セキュリティ警告
|
|
156
171
|
|
|
157
|
-
FeedRadar が fetch する外部 feed (RSS / HTML / HTML (JS rendered, `kind: html-js`) / GitHub Releases / npm registry) は **untrusted** として扱われます ([ADR-0009](https://github.com/ozzy-labs/feedradar/blob/main/docs/adr/0009-untrusted-external-content-handling.md))。攻撃者が feed 内容に prompt injection を仕込む可能性があるため:
|
|
172
|
+
FeedRadar が fetch する外部 feed (RSS / HTML / HTML (JS rendered, `kind: html-js`) / GitHub Releases / npm registry / JSON Feed / JSON API) は **untrusted** として扱われます ([ADR-0009](https://github.com/ozzy-labs/feedradar/blob/main/docs/adr/0009-untrusted-external-content-handling.md))。攻撃者が feed 内容に prompt injection を仕込む可能性があるため:
|
|
158
173
|
|
|
159
174
|
- 信頼できる公式 source のみ登録するのが第一の防御線
|
|
160
175
|
- `sources/<id>.yaml` の `trustLevel: trusted` で個別 opt-in 可 (既定 `untrusted`)
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
# `radar workflow generate combined` template (ADR-0014 D2 / D3 / D4 / D5).
|
|
2
|
+
#
|
|
3
|
+
# Chains `radar watch run` -> "skip if no new items" guard -> `radar research
|
|
4
|
+
# --batch` -> `git commit/push --rebase` retry inside a single job so the
|
|
5
|
+
# detection-to-research delay collapses to one cron tick instead of two
|
|
6
|
+
# stacked workflows.
|
|
7
|
+
#
|
|
8
|
+
# Placeholders rendered by `src/cli/workflow/generate-combined.ts`:
|
|
9
|
+
# {{cron}} — schedule cron expression (default "0 0 * * *")
|
|
10
|
+
# {{maxItems}} — `--max-items` hard cap (ADR-0014 D3a; default 10)
|
|
11
|
+
# {{filterTags}} — `--filter-tags` arg as a single CLI literal (empty when
|
|
12
|
+
# filtering is off so the line collapses to bare `--batch`)
|
|
13
|
+
# {{agent}} — agent id literal (claude-code|codex-cli|gemini-cli|copilot)
|
|
14
|
+
# {{secretsBlock}} — agent-specific `env:` body (no shared default; the
|
|
15
|
+
# CLI generator selects one of four prebuilt fragments,
|
|
16
|
+
# never injecting OAuth tokens per ADR-0014 D5)
|
|
17
|
+
#
|
|
18
|
+
# Hard-cap rationale: this YAML embeds `--max-items {{maxItems}}` as a literal
|
|
19
|
+
# so a workflow audit shows the cap without needing to re-read CLI source.
|
|
20
|
+
# The CLI re-enforces the cap (`RESEARCH_BATCH_DEFAULT_MAX_ITEMS` in
|
|
21
|
+
# `src/cli/research.ts`) so even hand-edited YAML cannot blow it inside one
|
|
22
|
+
# invocation (ADR-0014 D3a 二重防御).
|
|
23
|
+
|
|
24
|
+
name: feedradar-combined
|
|
25
|
+
|
|
26
|
+
on:
|
|
27
|
+
schedule:
|
|
28
|
+
- cron: "{{cron}}"
|
|
29
|
+
workflow_dispatch: {}
|
|
30
|
+
|
|
31
|
+
permissions:
|
|
32
|
+
contents: write
|
|
33
|
+
|
|
34
|
+
concurrency:
|
|
35
|
+
# Type-scoped concurrency group: watch-only and combined workflows must not
|
|
36
|
+
# serialize each other (different cadence, different scope), so each type
|
|
37
|
+
# has its own `feedradar-<type>-${{ github.ref }}` group.
|
|
38
|
+
group: feedradar-combined-${{ github.ref }}
|
|
39
|
+
cancel-in-progress: false
|
|
40
|
+
|
|
41
|
+
jobs:
|
|
42
|
+
combined:
|
|
43
|
+
runs-on: ubuntu-latest
|
|
44
|
+
timeout-minutes: 30
|
|
45
|
+
steps:
|
|
46
|
+
- name: Checkout workspace
|
|
47
|
+
uses: actions/checkout@v4
|
|
48
|
+
with:
|
|
49
|
+
fetch-depth: 0
|
|
50
|
+
persist-credentials: true
|
|
51
|
+
|
|
52
|
+
- name: Set up Node.js
|
|
53
|
+
uses: actions/setup-node@v4
|
|
54
|
+
with:
|
|
55
|
+
node-version: "22.21"
|
|
56
|
+
|
|
57
|
+
- name: Install FeedRadar
|
|
58
|
+
run: npm install -g @ozzylabs/feedradar
|
|
59
|
+
|
|
60
|
+
- name: Run watch
|
|
61
|
+
env:
|
|
62
|
+
{{secretsBlock}}
|
|
63
|
+
run: radar watch run
|
|
64
|
+
|
|
65
|
+
- name: Skip research when no new items
|
|
66
|
+
id: detect_changes
|
|
67
|
+
# ADR-0014: skip the research step entirely when `watch run` produced
|
|
68
|
+
# no new items. Otherwise a runaway-detection cap would still burn a
|
|
69
|
+
# full `radar research --batch` invocation (template load, item walk)
|
|
70
|
+
# on a fresh-empty queue.
|
|
71
|
+
run: |
|
|
72
|
+
if [ -z "$(git status --porcelain items/)" ]; then
|
|
73
|
+
echo "no new items in items/; skipping research step"
|
|
74
|
+
echo "has_changes=false" >> "$GITHUB_OUTPUT"
|
|
75
|
+
else
|
|
76
|
+
echo "has_changes=true" >> "$GITHUB_OUTPUT"
|
|
77
|
+
fi
|
|
78
|
+
|
|
79
|
+
- name: Run research on detected items (capped at {{maxItems}}, agent={{agent}})
|
|
80
|
+
if: steps.detect_changes.outputs.has_changes == 'true'
|
|
81
|
+
env:
|
|
82
|
+
{{secretsBlock}}
|
|
83
|
+
# `--batch` walks items/ for status=detected, applies the filter-tags
|
|
84
|
+
# allow-list, and stops once `--max-items` reports are written. The CLI
|
|
85
|
+
# re-enforces the cap so a hand-edited YAML cannot exceed it.
|
|
86
|
+
run: radar research --batch --status detected --max-items {{maxItems}}{{filterTags}} --agent {{agent}}
|
|
87
|
+
|
|
88
|
+
- name: Commit and push with retry
|
|
89
|
+
if: steps.detect_changes.outputs.has_changes == 'true'
|
|
90
|
+
# ADR-0014 D4: three-attempt push with `git pull --rebase --autostash`
|
|
91
|
+
# between failures. Tuned for two concurrent feedradar workflows (e.g.
|
|
92
|
+
# watch-hourly + combined-weekly) racing on items/ / state/ / research/.
|
|
93
|
+
run: |
|
|
94
|
+
git config user.name "feedradar-bot"
|
|
95
|
+
git config user.email "feedradar-bot@users.noreply.github.com"
|
|
96
|
+
git add items/ state/ research/
|
|
97
|
+
if git diff --cached --quiet; then
|
|
98
|
+
echo "nothing staged; exiting cleanly"
|
|
99
|
+
exit 0
|
|
100
|
+
fi
|
|
101
|
+
git commit -m "chore(feedradar): combined watch + research $(date -u +%Y-%m-%d)"
|
|
102
|
+
for attempt in 1 2 3; do
|
|
103
|
+
if git push origin "${GITHUB_REF_NAME}"; then
|
|
104
|
+
exit 0
|
|
105
|
+
fi
|
|
106
|
+
echo "push failed (attempt ${attempt}/3), rebasing..."
|
|
107
|
+
git pull --rebase --autostash origin "${GITHUB_REF_NAME}"
|
|
108
|
+
done
|
|
109
|
+
echo "push failed after 3 attempts" >&2
|
|
110
|
+
exit 1
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
# GitHub Actions scaffold generated by `radar workflow generate watch`.
|
|
2
|
+
# Edit the cron schedule, sources, and commit message to match your workflow.
|
|
3
|
+
# Auth policy: API key only (ADR-0004 / ADR-0014). The Claude Code OAuth token
|
|
4
|
+
# is forbidden for unattended workflows per Anthropic's usage policy.
|
|
5
|
+
#
|
|
6
|
+
# This template is the placeholder-driven, post-init regeneration variant of
|
|
7
|
+
# `src/templates/workflows/watch.yaml`. The latter is emitted by
|
|
8
|
+
# `radar init --with-actions` for first-time workspace bootstrap and is
|
|
9
|
+
# preserved verbatim for backward compatibility (ADR-0014 D1). Differences:
|
|
10
|
+
#
|
|
11
|
+
# - Cron schedule, output path, and agent secret name are substituted by
|
|
12
|
+
# `generate-watch.ts` from CLI flags before the file is written.
|
|
13
|
+
# - `concurrency.group` is scoped to `feedradar-watch-` so multiple workflow
|
|
14
|
+
# types (watch / combined) can run side by side without cancelling each
|
|
15
|
+
# other; ADR-0014 D4 push-conflict mitigation pairs with the rebase retry
|
|
16
|
+
# below.
|
|
17
|
+
# - `Commit and push with retry` step has up to 3 `git pull --rebase`
|
|
18
|
+
# retries to recover from concurrent cron pushes (ADR-0014 D4).
|
|
19
|
+
|
|
20
|
+
name: feedradar-watch
|
|
21
|
+
|
|
22
|
+
on:
|
|
23
|
+
schedule:
|
|
24
|
+
- cron: "{{cron}}"
|
|
25
|
+
workflow_dispatch: {}
|
|
26
|
+
|
|
27
|
+
permissions:
|
|
28
|
+
# Required to commit detected items / state back to the workspace branch.
|
|
29
|
+
contents: write
|
|
30
|
+
|
|
31
|
+
concurrency:
|
|
32
|
+
# Per-type group so `watch` and `combined` workflows don't cancel each other.
|
|
33
|
+
# Same-type concurrent firings still serialize via this group.
|
|
34
|
+
group: feedradar-watch-${{ github.ref }}
|
|
35
|
+
cancel-in-progress: false
|
|
36
|
+
|
|
37
|
+
jobs:
|
|
38
|
+
watch:
|
|
39
|
+
runs-on: ubuntu-latest
|
|
40
|
+
timeout-minutes: 15
|
|
41
|
+
steps:
|
|
42
|
+
- name: Checkout workspace
|
|
43
|
+
uses: actions/checkout@v4
|
|
44
|
+
with:
|
|
45
|
+
# Need history so we can rebase on top of concurrent pushes.
|
|
46
|
+
fetch-depth: 0
|
|
47
|
+
persist-credentials: true
|
|
48
|
+
|
|
49
|
+
- name: Set up Node.js
|
|
50
|
+
uses: actions/setup-node@v4
|
|
51
|
+
with:
|
|
52
|
+
# Node 22.21+ (or 24.5+) is required so radar can auto-detect
|
|
53
|
+
# HTTPS_PROXY / HTTP_PROXY and respawn with --use-env-proxy.
|
|
54
|
+
node-version: "22.21"
|
|
55
|
+
|
|
56
|
+
- name: Install FeedRadar
|
|
57
|
+
# Pin to a release once you've decided on a version; this scaffold
|
|
58
|
+
# installs the latest published build.
|
|
59
|
+
run: npm install -g @ozzylabs/feedradar
|
|
60
|
+
|
|
61
|
+
- name: Run watch
|
|
62
|
+
env:
|
|
63
|
+
# Authenticate against the agent API per ADR-0004 / ADR-0014 D5.
|
|
64
|
+
# The secret name below follows the per-agent convention; see the
|
|
65
|
+
# post-generation stdout for the exact secret you must add.
|
|
66
|
+
{{agentEnvKey}}: ${{ secrets.{{agentEnvKey}} }}
|
|
67
|
+
# Raises GitHub REST API rate limit from 60 → 5000 req/h for the
|
|
68
|
+
# github-releases adapter (ADR-0002 / Phase 3).
|
|
69
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
70
|
+
run: radar watch run
|
|
71
|
+
|
|
72
|
+
- name: Commit and push with retry
|
|
73
|
+
# Persist updates to items/ and state/ so the next scheduled run can
|
|
74
|
+
# diff against the previous lastSeenIds. Routines / Actions both
|
|
75
|
+
# fresh-clone, so state must live in git.
|
|
76
|
+
#
|
|
77
|
+
# Push conflict mitigation (ADR-0014 D4): if another workflow (e.g.
|
|
78
|
+
# combined.yaml) pushed concurrently, `git push` fails with
|
|
79
|
+
# non-fast-forward. We retry up to 3 times, rebasing on each attempt;
|
|
80
|
+
# autostash keeps any unindexed bot-side changes safe across the
|
|
81
|
+
# rebase. 4+ attempts indicate a structural problem (branch
|
|
82
|
+
# protection, token failure, true merge conflict) so we fail fast
|
|
83
|
+
# instead of retrying further.
|
|
84
|
+
run: |
|
|
85
|
+
set -euo pipefail
|
|
86
|
+
git config user.name "github-actions[bot]"
|
|
87
|
+
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
|
88
|
+
if git diff --quiet items/ state/; then
|
|
89
|
+
echo "no changes detected; skipping commit"
|
|
90
|
+
exit 0
|
|
91
|
+
fi
|
|
92
|
+
git add items/ state/
|
|
93
|
+
git commit -m "chore(watch): detected items $(date -u +%Y-%m-%d)"
|
|
94
|
+
for attempt in 1 2 3; do
|
|
95
|
+
if git push origin "${GITHUB_REF_NAME}"; then
|
|
96
|
+
echo "push succeeded on attempt ${attempt}"
|
|
97
|
+
exit 0
|
|
98
|
+
fi
|
|
99
|
+
echo "push failed (attempt ${attempt}/3), rebasing..."
|
|
100
|
+
git pull --rebase --autostash origin "${GITHUB_REF_NAME}"
|
|
101
|
+
done
|
|
102
|
+
echo "push failed after 3 attempts" >&2
|
|
103
|
+
exit 1
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ozzylabs/feedradar",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.6",
|
|
4
4
|
"description": "Multi-agent CLI that watches blogs and release feeds, then turns keyword hits into Markdown research reports",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"publishConfig": {
|
|
@@ -8,7 +8,6 @@
|
|
|
8
8
|
},
|
|
9
9
|
"files": [
|
|
10
10
|
"dist",
|
|
11
|
-
"dist/skills",
|
|
12
11
|
"LICENSE",
|
|
13
12
|
"README.md"
|
|
14
13
|
],
|