@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.
- package/README.ja.md +51 -13
- package/README.md +51 -13
- package/dist/agents/_boundary.d.ts +21 -0
- package/dist/agents/_boundary.d.ts.map +1 -1
- package/dist/agents/_boundary.js +34 -0
- package/dist/agents/_boundary.js.map +1 -1
- package/dist/agents/claude-code.d.ts.map +1 -1
- package/dist/agents/claude-code.js +14 -6
- package/dist/agents/claude-code.js.map +1 -1
- package/dist/agents/codex-cli.d.ts.map +1 -1
- package/dist/agents/codex-cli.js +13 -7
- package/dist/agents/codex-cli.js.map +1 -1
- package/dist/agents/copilot.d.ts.map +1 -1
- package/dist/agents/copilot.js +13 -6
- package/dist/agents/copilot.js.map +1 -1
- package/dist/agents/gemini-cli.d.ts.map +1 -1
- package/dist/agents/gemini-cli.js +13 -6
- package/dist/agents/gemini-cli.js.map +1 -1
- package/dist/agents/types.d.ts +26 -0
- package/dist/agents/types.d.ts.map +1 -1
- package/dist/claude-skills/dismiss/SKILL.md +4 -4
- package/dist/claude-skills/research/SKILL.md +2 -3
- package/dist/claude-skills/review/SKILL.md +2 -2
- package/dist/claude-skills/update/SKILL.md +7 -7
- package/dist/cli/_locale.d.ts +96 -0
- package/dist/cli/_locale.d.ts.map +1 -0
- package/dist/cli/_locale.js +130 -0
- package/dist/cli/_locale.js.map +1 -0
- package/dist/cli/_progress.d.ts +30 -1
- package/dist/cli/_progress.d.ts.map +1 -1
- package/dist/cli/_progress.js +9 -1
- package/dist/cli/_progress.js.map +1 -1
- package/dist/cli/dismiss.d.ts.map +1 -1
- package/dist/cli/dismiss.js +61 -54
- package/dist/cli/dismiss.js.map +1 -1
- package/dist/cli/doctor.d.ts +8 -0
- package/dist/cli/doctor.d.ts.map +1 -1
- package/dist/cli/doctor.js +91 -60
- package/dist/cli/doctor.js.map +1 -1
- package/dist/cli/index.d.ts +36 -1
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +81 -18
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/init.d.ts +15 -0
- package/dist/cli/init.d.ts.map +1 -1
- package/dist/cli/init.js +149 -51
- package/dist/cli/init.js.map +1 -1
- package/dist/cli/items.d.ts.map +1 -1
- package/dist/cli/items.js +51 -30
- package/dist/cli/items.js.map +1 -1
- package/dist/cli/research.d.ts.map +1 -1
- package/dist/cli/research.js +138 -109
- package/dist/cli/research.js.map +1 -1
- package/dist/cli/review.d.ts.map +1 -1
- package/dist/cli/review.js +114 -92
- package/dist/cli/review.js.map +1 -1
- package/dist/cli/routine/fire.d.ts +3 -2
- package/dist/cli/routine/fire.d.ts.map +1 -1
- package/dist/cli/routine/fire.js +30 -25
- package/dist/cli/routine/fire.js.map +1 -1
- package/dist/cli/routine/generate-pipeline.d.ts +24 -10
- package/dist/cli/routine/generate-pipeline.d.ts.map +1 -1
- package/dist/cli/routine/generate-pipeline.js +158 -83
- package/dist/cli/routine/generate-pipeline.js.map +1 -1
- package/dist/cli/routine/generate-watch.d.ts +56 -1
- package/dist/cli/routine/generate-watch.d.ts.map +1 -1
- package/dist/cli/routine/generate-watch.js +116 -42
- package/dist/cli/routine/generate-watch.js.map +1 -1
- package/dist/cli/routine.d.ts.map +1 -1
- package/dist/cli/routine.js +28 -24
- package/dist/cli/routine.js.map +1 -1
- package/dist/cli/source.d.ts.map +1 -1
- package/dist/cli/source.js +212 -182
- package/dist/cli/source.js.map +1 -1
- package/dist/cli/state.d.ts +43 -0
- package/dist/cli/state.d.ts.map +1 -0
- package/dist/cli/state.js +177 -0
- package/dist/cli/state.js.map +1 -0
- package/dist/cli/triage.d.ts.map +1 -1
- package/dist/cli/triage.js +146 -130
- package/dist/cli/triage.js.map +1 -1
- package/dist/cli/undismiss.d.ts.map +1 -1
- package/dist/cli/undismiss.js +32 -25
- package/dist/cli/undismiss.js.map +1 -1
- package/dist/cli/update.d.ts.map +1 -1
- package/dist/cli/update.js +77 -61
- package/dist/cli/update.js.map +1 -1
- package/dist/cli/watch.d.ts.map +1 -1
- package/dist/cli/watch.js +71 -31
- package/dist/cli/watch.js.map +1 -1
- package/dist/cli/workflow/generate-combined-with-triage.d.ts +9 -2
- package/dist/cli/workflow/generate-combined-with-triage.d.ts.map +1 -1
- package/dist/cli/workflow/generate-combined-with-triage.js +120 -71
- package/dist/cli/workflow/generate-combined-with-triage.js.map +1 -1
- package/dist/cli/workflow/generate-combined.d.ts +8 -1
- package/dist/cli/workflow/generate-combined.d.ts.map +1 -1
- package/dist/cli/workflow/generate-combined.js +39 -33
- package/dist/cli/workflow/generate-combined.js.map +1 -1
- package/dist/cli/workflow/generate-watch.d.ts +10 -1
- package/dist/cli/workflow/generate-watch.d.ts.map +1 -1
- package/dist/cli/workflow/generate-watch.js +37 -30
- package/dist/cli/workflow/generate-watch.js.map +1 -1
- package/dist/cli/workflow.d.ts.map +1 -1
- package/dist/cli/workflow.js +28 -23
- package/dist/cli/workflow.js.map +1 -1
- package/dist/core/config.d.ts +2 -1
- package/dist/core/config.d.ts.map +1 -1
- package/dist/core/config.js +14 -4
- package/dist/core/config.js.map +1 -1
- package/dist/core/feeds/html-js.d.ts.map +1 -1
- package/dist/core/feeds/html-js.js +16 -9
- package/dist/core/feeds/html-js.js.map +1 -1
- package/dist/core/feeds/json-api.d.ts.map +1 -1
- package/dist/core/feeds/json-api.js +38 -21
- package/dist/core/feeds/json-api.js.map +1 -1
- package/dist/core/feeds/types.d.ts +9 -0
- package/dist/core/feeds/types.d.ts.map +1 -1
- package/dist/core/filter.d.ts +20 -12
- package/dist/core/filter.d.ts.map +1 -1
- package/dist/core/filter.js +87 -46
- package/dist/core/filter.js.map +1 -1
- package/dist/core/locale.d.ts +69 -0
- package/dist/core/locale.d.ts.map +1 -0
- package/dist/core/locale.js +74 -0
- package/dist/core/locale.js.map +1 -0
- package/dist/core/state.d.ts +20 -0
- package/dist/core/state.d.ts.map +1 -1
- package/dist/core/state.js +26 -0
- package/dist/core/state.js.map +1 -1
- package/dist/core/triage/prompt.d.ts.map +1 -1
- package/dist/core/triage/prompt.js +18 -4
- package/dist/core/triage/prompt.js.map +1 -1
- package/dist/core/watcher.d.ts +28 -0
- package/dist/core/watcher.d.ts.map +1 -1
- package/dist/core/watcher.js +77 -8
- package/dist/core/watcher.js.map +1 -1
- package/dist/i18n/index.d.ts +57 -0
- package/dist/i18n/index.d.ts.map +1 -0
- package/dist/i18n/index.js +49 -0
- package/dist/i18n/index.js.map +1 -0
- package/dist/i18n/messages/en.d.ts +1049 -0
- package/dist/i18n/messages/en.d.ts.map +1 -0
- package/dist/i18n/messages/en.js +1152 -0
- package/dist/i18n/messages/en.js.map +1 -0
- package/dist/i18n/messages/ja.d.ts +13 -0
- package/dist/i18n/messages/ja.d.ts.map +1 -0
- package/dist/i18n/messages/ja.js +1010 -0
- package/dist/i18n/messages/ja.js.map +1 -0
- package/dist/schemas/config.d.ts +7 -0
- package/dist/schemas/config.d.ts.map +1 -1
- package/dist/schemas/config.js +5 -0
- package/dist/schemas/config.js.map +1 -1
- package/dist/schemas/item.d.ts +1 -0
- package/dist/schemas/item.d.ts.map +1 -1
- package/dist/schemas/item.js +15 -0
- package/dist/schemas/item.js.map +1 -1
- package/dist/schemas/recipe.d.ts +7 -1
- package/dist/schemas/recipe.d.ts.map +1 -1
- package/dist/schemas/recipe.js +1 -0
- package/dist/schemas/recipe.js.map +1 -1
- package/dist/schemas/source.d.ts +40 -18
- package/dist/schemas/source.d.ts.map +1 -1
- package/dist/schemas/source.js +84 -23
- package/dist/schemas/source.js.map +1 -1
- package/dist/skills/research/SKILL.md +13 -12
- package/dist/skills/review/SKILL.md +13 -12
- package/dist/skills/update/SKILL.md +19 -19
- package/dist/templates/en/agents/AGENTS.md +284 -0
- package/dist/templates/en/claude/CLAUDE.md +5 -0
- package/dist/templates/en/default.md +16 -0
- package/dist/templates/en/digest.md +66 -0
- package/dist/templates/en/feedradar.md +235 -0
- package/dist/templates/{routines → en/routines}/pipeline.yaml.tmpl +93 -34
- package/dist/templates/{routines → en/routines}/watch-daily.yaml +12 -15
- package/dist/templates/{routines → en/routines}/watch.yaml.tmpl +11 -14
- package/dist/templates/{workflows → en/workflows}/combined-with-triage.template.yaml.tmpl +3 -3
- package/dist/templates/{workflows → en/workflows}/combined.template.yaml.tmpl +6 -6
- package/dist/templates/{workflows → en/workflows}/watch.template.yaml.tmpl +8 -8
- package/dist/templates/{workflows → en/workflows}/watch.yaml +3 -3
- package/dist/templates/{agents → ja/agents}/AGENTS.md +16 -16
- package/dist/templates/{digest.md → ja/digest.md} +5 -6
- package/dist/templates/{feedradar.md → ja/feedradar.md} +12 -12
- package/dist/templates/ja/routines/pipeline.yaml.tmpl +267 -0
- package/dist/templates/ja/routines/watch-daily.yaml +151 -0
- package/dist/templates/ja/routines/watch.yaml.tmpl +145 -0
- package/dist/templates/ja/workflows/combined-with-triage.template.yaml.tmpl +123 -0
- package/dist/templates/ja/workflows/combined.template.yaml.tmpl +109 -0
- package/dist/templates/ja/workflows/watch.template.yaml.tmpl +100 -0
- package/dist/templates/ja/workflows/watch.yaml +73 -0
- package/package.json +1 -1
- /package/dist/templates/{claude → ja/claude}/CLAUDE.md +0 -0
- /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"}
|