@ozzylabs/feedradar 0.2.1 → 0.2.3

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 (192) hide show
  1. package/README.ja.md +51 -13
  2. package/README.md +51 -13
  3. package/dist/agents/_boundary.d.ts +21 -0
  4. package/dist/agents/_boundary.d.ts.map +1 -1
  5. package/dist/agents/_boundary.js +34 -0
  6. package/dist/agents/_boundary.js.map +1 -1
  7. package/dist/agents/claude-code.d.ts.map +1 -1
  8. package/dist/agents/claude-code.js +14 -6
  9. package/dist/agents/claude-code.js.map +1 -1
  10. package/dist/agents/codex-cli.d.ts.map +1 -1
  11. package/dist/agents/codex-cli.js +13 -7
  12. package/dist/agents/codex-cli.js.map +1 -1
  13. package/dist/agents/copilot.d.ts.map +1 -1
  14. package/dist/agents/copilot.js +13 -6
  15. package/dist/agents/copilot.js.map +1 -1
  16. package/dist/agents/gemini-cli.d.ts.map +1 -1
  17. package/dist/agents/gemini-cli.js +13 -6
  18. package/dist/agents/gemini-cli.js.map +1 -1
  19. package/dist/agents/types.d.ts +26 -0
  20. package/dist/agents/types.d.ts.map +1 -1
  21. package/dist/claude-skills/dismiss/SKILL.md +4 -4
  22. package/dist/claude-skills/research/SKILL.md +2 -3
  23. package/dist/claude-skills/review/SKILL.md +2 -2
  24. package/dist/claude-skills/update/SKILL.md +7 -7
  25. package/dist/cli/_locale.d.ts +96 -0
  26. package/dist/cli/_locale.d.ts.map +1 -0
  27. package/dist/cli/_locale.js +130 -0
  28. package/dist/cli/_locale.js.map +1 -0
  29. package/dist/cli/_progress.d.ts +30 -1
  30. package/dist/cli/_progress.d.ts.map +1 -1
  31. package/dist/cli/_progress.js +9 -1
  32. package/dist/cli/_progress.js.map +1 -1
  33. package/dist/cli/dismiss.d.ts.map +1 -1
  34. package/dist/cli/dismiss.js +61 -54
  35. package/dist/cli/dismiss.js.map +1 -1
  36. package/dist/cli/doctor.d.ts +8 -0
  37. package/dist/cli/doctor.d.ts.map +1 -1
  38. package/dist/cli/doctor.js +91 -60
  39. package/dist/cli/doctor.js.map +1 -1
  40. package/dist/cli/index.d.ts +36 -1
  41. package/dist/cli/index.d.ts.map +1 -1
  42. package/dist/cli/index.js +81 -18
  43. package/dist/cli/index.js.map +1 -1
  44. package/dist/cli/init.d.ts +15 -0
  45. package/dist/cli/init.d.ts.map +1 -1
  46. package/dist/cli/init.js +149 -51
  47. package/dist/cli/init.js.map +1 -1
  48. package/dist/cli/items.d.ts.map +1 -1
  49. package/dist/cli/items.js +51 -30
  50. package/dist/cli/items.js.map +1 -1
  51. package/dist/cli/research.d.ts.map +1 -1
  52. package/dist/cli/research.js +138 -109
  53. package/dist/cli/research.js.map +1 -1
  54. package/dist/cli/review.d.ts.map +1 -1
  55. package/dist/cli/review.js +114 -92
  56. package/dist/cli/review.js.map +1 -1
  57. package/dist/cli/routine/fire.d.ts +3 -2
  58. package/dist/cli/routine/fire.d.ts.map +1 -1
  59. package/dist/cli/routine/fire.js +30 -25
  60. package/dist/cli/routine/fire.js.map +1 -1
  61. package/dist/cli/routine/generate-pipeline.d.ts +24 -10
  62. package/dist/cli/routine/generate-pipeline.d.ts.map +1 -1
  63. package/dist/cli/routine/generate-pipeline.js +158 -83
  64. package/dist/cli/routine/generate-pipeline.js.map +1 -1
  65. package/dist/cli/routine/generate-watch.d.ts +56 -1
  66. package/dist/cli/routine/generate-watch.d.ts.map +1 -1
  67. package/dist/cli/routine/generate-watch.js +116 -42
  68. package/dist/cli/routine/generate-watch.js.map +1 -1
  69. package/dist/cli/routine.d.ts.map +1 -1
  70. package/dist/cli/routine.js +28 -24
  71. package/dist/cli/routine.js.map +1 -1
  72. package/dist/cli/source.d.ts.map +1 -1
  73. package/dist/cli/source.js +212 -182
  74. package/dist/cli/source.js.map +1 -1
  75. package/dist/cli/state.d.ts +43 -0
  76. package/dist/cli/state.d.ts.map +1 -0
  77. package/dist/cli/state.js +177 -0
  78. package/dist/cli/state.js.map +1 -0
  79. package/dist/cli/triage.d.ts.map +1 -1
  80. package/dist/cli/triage.js +146 -130
  81. package/dist/cli/triage.js.map +1 -1
  82. package/dist/cli/undismiss.d.ts.map +1 -1
  83. package/dist/cli/undismiss.js +32 -25
  84. package/dist/cli/undismiss.js.map +1 -1
  85. package/dist/cli/update.d.ts.map +1 -1
  86. package/dist/cli/update.js +77 -61
  87. package/dist/cli/update.js.map +1 -1
  88. package/dist/cli/watch.d.ts.map +1 -1
  89. package/dist/cli/watch.js +71 -31
  90. package/dist/cli/watch.js.map +1 -1
  91. package/dist/cli/workflow/generate-combined-with-triage.d.ts +9 -2
  92. package/dist/cli/workflow/generate-combined-with-triage.d.ts.map +1 -1
  93. package/dist/cli/workflow/generate-combined-with-triage.js +120 -71
  94. package/dist/cli/workflow/generate-combined-with-triage.js.map +1 -1
  95. package/dist/cli/workflow/generate-combined.d.ts +8 -1
  96. package/dist/cli/workflow/generate-combined.d.ts.map +1 -1
  97. package/dist/cli/workflow/generate-combined.js +39 -33
  98. package/dist/cli/workflow/generate-combined.js.map +1 -1
  99. package/dist/cli/workflow/generate-watch.d.ts +10 -1
  100. package/dist/cli/workflow/generate-watch.d.ts.map +1 -1
  101. package/dist/cli/workflow/generate-watch.js +37 -30
  102. package/dist/cli/workflow/generate-watch.js.map +1 -1
  103. package/dist/cli/workflow.d.ts.map +1 -1
  104. package/dist/cli/workflow.js +28 -23
  105. package/dist/cli/workflow.js.map +1 -1
  106. package/dist/core/config.d.ts +2 -1
  107. package/dist/core/config.d.ts.map +1 -1
  108. package/dist/core/config.js +14 -4
  109. package/dist/core/config.js.map +1 -1
  110. package/dist/core/feeds/html-js.d.ts.map +1 -1
  111. package/dist/core/feeds/html-js.js +16 -9
  112. package/dist/core/feeds/html-js.js.map +1 -1
  113. package/dist/core/feeds/json-api.d.ts.map +1 -1
  114. package/dist/core/feeds/json-api.js +38 -21
  115. package/dist/core/feeds/json-api.js.map +1 -1
  116. package/dist/core/feeds/types.d.ts +9 -0
  117. package/dist/core/feeds/types.d.ts.map +1 -1
  118. package/dist/core/filter.d.ts +20 -12
  119. package/dist/core/filter.d.ts.map +1 -1
  120. package/dist/core/filter.js +87 -46
  121. package/dist/core/filter.js.map +1 -1
  122. package/dist/core/locale.d.ts +69 -0
  123. package/dist/core/locale.d.ts.map +1 -0
  124. package/dist/core/locale.js +74 -0
  125. package/dist/core/locale.js.map +1 -0
  126. package/dist/core/state.d.ts +20 -0
  127. package/dist/core/state.d.ts.map +1 -1
  128. package/dist/core/state.js +26 -0
  129. package/dist/core/state.js.map +1 -1
  130. package/dist/core/triage/prompt.d.ts.map +1 -1
  131. package/dist/core/triage/prompt.js +18 -4
  132. package/dist/core/triage/prompt.js.map +1 -1
  133. package/dist/core/watcher.d.ts +28 -0
  134. package/dist/core/watcher.d.ts.map +1 -1
  135. package/dist/core/watcher.js +77 -8
  136. package/dist/core/watcher.js.map +1 -1
  137. package/dist/i18n/index.d.ts +57 -0
  138. package/dist/i18n/index.d.ts.map +1 -0
  139. package/dist/i18n/index.js +49 -0
  140. package/dist/i18n/index.js.map +1 -0
  141. package/dist/i18n/messages/en.d.ts +1049 -0
  142. package/dist/i18n/messages/en.d.ts.map +1 -0
  143. package/dist/i18n/messages/en.js +1152 -0
  144. package/dist/i18n/messages/en.js.map +1 -0
  145. package/dist/i18n/messages/ja.d.ts +13 -0
  146. package/dist/i18n/messages/ja.d.ts.map +1 -0
  147. package/dist/i18n/messages/ja.js +1010 -0
  148. package/dist/i18n/messages/ja.js.map +1 -0
  149. package/dist/schemas/config.d.ts +7 -0
  150. package/dist/schemas/config.d.ts.map +1 -1
  151. package/dist/schemas/config.js +5 -0
  152. package/dist/schemas/config.js.map +1 -1
  153. package/dist/schemas/item.d.ts +1 -0
  154. package/dist/schemas/item.d.ts.map +1 -1
  155. package/dist/schemas/item.js +15 -0
  156. package/dist/schemas/item.js.map +1 -1
  157. package/dist/schemas/recipe.d.ts +7 -1
  158. package/dist/schemas/recipe.d.ts.map +1 -1
  159. package/dist/schemas/recipe.js +1 -0
  160. package/dist/schemas/recipe.js.map +1 -1
  161. package/dist/schemas/source.d.ts +40 -18
  162. package/dist/schemas/source.d.ts.map +1 -1
  163. package/dist/schemas/source.js +84 -23
  164. package/dist/schemas/source.js.map +1 -1
  165. package/dist/skills/research/SKILL.md +13 -12
  166. package/dist/skills/review/SKILL.md +13 -12
  167. package/dist/skills/update/SKILL.md +19 -19
  168. package/dist/templates/en/agents/AGENTS.md +284 -0
  169. package/dist/templates/en/claude/CLAUDE.md +5 -0
  170. package/dist/templates/en/default.md +16 -0
  171. package/dist/templates/en/digest.md +66 -0
  172. package/dist/templates/en/feedradar.md +235 -0
  173. package/dist/templates/{routines → en/routines}/pipeline.yaml.tmpl +93 -34
  174. package/dist/templates/{routines → en/routines}/watch-daily.yaml +12 -15
  175. package/dist/templates/{routines → en/routines}/watch.yaml.tmpl +11 -14
  176. package/dist/templates/{workflows → en/workflows}/combined-with-triage.template.yaml.tmpl +3 -3
  177. package/dist/templates/{workflows → en/workflows}/combined.template.yaml.tmpl +6 -6
  178. package/dist/templates/{workflows → en/workflows}/watch.template.yaml.tmpl +8 -8
  179. package/dist/templates/{workflows → en/workflows}/watch.yaml +3 -3
  180. package/dist/templates/{agents → ja/agents}/AGENTS.md +16 -16
  181. package/dist/templates/{digest.md → ja/digest.md} +5 -6
  182. package/dist/templates/{feedradar.md → ja/feedradar.md} +12 -12
  183. package/dist/templates/ja/routines/pipeline.yaml.tmpl +267 -0
  184. package/dist/templates/ja/routines/watch-daily.yaml +151 -0
  185. package/dist/templates/ja/routines/watch.yaml.tmpl +145 -0
  186. package/dist/templates/ja/workflows/combined-with-triage.template.yaml.tmpl +123 -0
  187. package/dist/templates/ja/workflows/combined.template.yaml.tmpl +109 -0
  188. package/dist/templates/ja/workflows/watch.template.yaml.tmpl +100 -0
  189. package/dist/templates/ja/workflows/watch.yaml +73 -0
  190. package/package.json +1 -1
  191. /package/dist/templates/{claude → ja/claude}/CLAUDE.md +0 -0
  192. /package/dist/templates/{default.md → ja/default.md} +0 -0
@@ -0,0 +1,57 @@
1
+ /**
2
+ * Type-safe translator factory (ADR-0021, epic #307 P2).
3
+ *
4
+ * `createTranslator(locale)` returns a `t(key, params?)` function bound to a
5
+ * locale. The design constraints (from issue #310):
6
+ *
7
+ * - **Type-safe keys.** `key` is `keyof typeof en` (= {@link MessageKey}); a
8
+ * typo is a compile error.
9
+ * - **Type-safe params.** Whether `t` accepts (and requires) a `params`
10
+ * argument is derived per-key from the catalog entry: string entries take
11
+ * no params, function entries require their declared params object. This is
12
+ * the single unified interpolation scheme — function args, no placeholder
13
+ * string-replacement.
14
+ * - **en fallback for missing keys.** If a locale catalog is somehow missing
15
+ * a key at runtime (it cannot be under the {@link Messages} type, but we
16
+ * stay defensive for hand-edited / future dynamically-merged catalogs), the
17
+ * English entry is used.
18
+ * - **No global singleton.** Each command resolves its own locale (config is
19
+ * cwd-dependent and read per command — see `src/core/config.ts`) and builds
20
+ * its own translator; there is no module-level shared translator.
21
+ * - **No new runtime dependency.**
22
+ *
23
+ * Wiring convention established here (followed by later P3/P4/P5 issues): a
24
+ * command resolves its locale (`src/cli/_locale.ts` + `resolveLocale`, plus
25
+ * `loadRadarConfig` for config-aware commands), calls {@link createTranslator},
26
+ * and threads the resulting `t` through `options` alongside the existing
27
+ * `options.io` log/warn/error sinks. `t` produces the strings, `io` writes
28
+ * them — same output path as today, just localized copy.
29
+ */
30
+ import type { Locale } from "../core/locale.js";
31
+ import { en, type MessageKey } from "./messages/en.js";
32
+ /**
33
+ * Params accepted by a single catalog entry. A `string` entry has no params
34
+ * (`undefined`); a function entry has the type of its first argument.
35
+ */
36
+ type ParamsOf<K extends MessageKey> = (typeof en)[K] extends (params: infer P) => string ? P : undefined;
37
+ /**
38
+ * `t` overloads keep call sites honest: keys whose catalog value is a plain
39
+ * string reject a params argument, keys whose value is a function require the
40
+ * matching params object.
41
+ */
42
+ export interface Translator {
43
+ <K extends MessageKey>(key: ParamsOf<K> extends undefined ? K : never): string;
44
+ <K extends MessageKey>(key: K, params: ParamsOf<K>): string;
45
+ }
46
+ /**
47
+ * Build a translator bound to `locale`.
48
+ *
49
+ * Resolution order per key: the requested locale's entry, else the English
50
+ * entry (defensive fallback — see module docs). The resolved entry is rendered
51
+ * by calling it with `params` when it is a function, or returned verbatim when
52
+ * it is a string.
53
+ */
54
+ export declare function createTranslator(locale: Locale): Translator;
55
+ export type { Locale } from "../core/locale.js";
56
+ export type { MessageKey, Messages } from "./messages/en.js";
57
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/i18n/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,EAAE,EAAE,KAAK,UAAU,EAAiB,MAAM,kBAAkB,CAAC;AAMtE;;;GAGG;AACH,KAAK,QAAQ,CAAC,CAAC,SAAS,UAAU,IAAI,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC,KAAK,MAAM,GACpF,CAAC,GACD,SAAS,CAAC;AAEd;;;;GAIG;AACH,MAAM,WAAW,UAAU;IACzB,CAAC,CAAC,SAAS,UAAU,EAAE,GAAG,EAAE,QAAQ,CAAC,CAAC,CAAC,SAAS,SAAS,GAAG,CAAC,GAAG,KAAK,GAAG,MAAM,CAAC;IAC/E,CAAC,CAAC,SAAS,UAAU,EAAE,GAAG,EAAE,CAAC,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC;CAC7D;AAED;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,MAAM,GAAG,UAAU,CAM3D;AAED,YAAY,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAChD,YAAY,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC"}
@@ -0,0 +1,49 @@
1
+ /**
2
+ * Type-safe translator factory (ADR-0021, epic #307 P2).
3
+ *
4
+ * `createTranslator(locale)` returns a `t(key, params?)` function bound to a
5
+ * locale. The design constraints (from issue #310):
6
+ *
7
+ * - **Type-safe keys.** `key` is `keyof typeof en` (= {@link MessageKey}); a
8
+ * typo is a compile error.
9
+ * - **Type-safe params.** Whether `t` accepts (and requires) a `params`
10
+ * argument is derived per-key from the catalog entry: string entries take
11
+ * no params, function entries require their declared params object. This is
12
+ * the single unified interpolation scheme — function args, no placeholder
13
+ * string-replacement.
14
+ * - **en fallback for missing keys.** If a locale catalog is somehow missing
15
+ * a key at runtime (it cannot be under the {@link Messages} type, but we
16
+ * stay defensive for hand-edited / future dynamically-merged catalogs), the
17
+ * English entry is used.
18
+ * - **No global singleton.** Each command resolves its own locale (config is
19
+ * cwd-dependent and read per command — see `src/core/config.ts`) and builds
20
+ * its own translator; there is no module-level shared translator.
21
+ * - **No new runtime dependency.**
22
+ *
23
+ * Wiring convention established here (followed by later P3/P4/P5 issues): a
24
+ * command resolves its locale (`src/cli/_locale.ts` + `resolveLocale`, plus
25
+ * `loadRadarConfig` for config-aware commands), calls {@link createTranslator},
26
+ * and threads the resulting `t` through `options` alongside the existing
27
+ * `options.io` log/warn/error sinks. `t` produces the strings, `io` writes
28
+ * them — same output path as today, just localized copy.
29
+ */
30
+ import { en } from "./messages/en.js";
31
+ import { ja } from "./messages/ja.js";
32
+ /** Locale → catalog lookup. `en` is also the missing-key fallback source. */
33
+ const catalogs = { en, ja };
34
+ /**
35
+ * Build a translator bound to `locale`.
36
+ *
37
+ * Resolution order per key: the requested locale's entry, else the English
38
+ * entry (defensive fallback — see module docs). The resolved entry is rendered
39
+ * by calling it with `params` when it is a function, or returned verbatim when
40
+ * it is a string.
41
+ */
42
+ export function createTranslator(locale) {
43
+ const primary = catalogs[locale] ?? en;
44
+ return ((key, params) => {
45
+ const entry = (primary[key] ?? en[key]);
46
+ return typeof entry === "function" ? entry(params) : entry;
47
+ });
48
+ }
49
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/i18n/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAGH,OAAO,EAAE,EAAE,EAAkC,MAAM,kBAAkB,CAAC;AACtE,OAAO,EAAE,EAAE,EAAE,MAAM,kBAAkB,CAAC;AAEtC,6EAA6E;AAC7E,MAAM,QAAQ,GAA6B,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC;AAoBtD;;;;;;;GAOG;AACH,MAAM,UAAU,gBAAgB,CAAC,MAAc;IAC7C,MAAM,OAAO,GAAG,QAAQ,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC;IACvC,OAAO,CAAC,CAAC,GAAe,EAAE,MAAgB,EAAU,EAAE;QACpD,MAAM,KAAK,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,CAA2C,CAAC;QAClF,OAAO,OAAO,KAAK,KAAK,UAAU,CAAC,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;IAC7D,CAAC,CAAe,CAAC;AACnB,CAAC"}