@ozzylabs/feedradar 0.1.6 → 0.1.8

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 (106) hide show
  1. package/README.md +2 -1
  2. package/dist/agents/_boundary.d.ts +74 -1
  3. package/dist/agents/_boundary.d.ts.map +1 -1
  4. package/dist/agents/_boundary.js +152 -0
  5. package/dist/agents/_boundary.js.map +1 -1
  6. package/dist/claude-skills/dismiss/SKILL.md +18 -12
  7. package/dist/claude-skills/research/SKILL.md +21 -1
  8. package/dist/claude-skills/review/SKILL.md +23 -1
  9. package/dist/claude-skills/update/SKILL.md +24 -2
  10. package/dist/cli/_commit-path.d.ts +33 -0
  11. package/dist/cli/_commit-path.d.ts.map +1 -0
  12. package/dist/cli/_commit-path.js +43 -0
  13. package/dist/cli/_commit-path.js.map +1 -0
  14. package/dist/cli/dismiss.d.ts +38 -7
  15. package/dist/cli/dismiss.d.ts.map +1 -1
  16. package/dist/cli/dismiss.js +239 -54
  17. package/dist/cli/dismiss.js.map +1 -1
  18. package/dist/cli/index.d.ts.map +1 -1
  19. package/dist/cli/index.js +7 -1
  20. package/dist/cli/index.js.map +1 -1
  21. package/dist/cli/items.d.ts +44 -0
  22. package/dist/cli/items.d.ts.map +1 -0
  23. package/dist/cli/items.js +288 -0
  24. package/dist/cli/items.js.map +1 -0
  25. package/dist/cli/research.d.ts +21 -0
  26. package/dist/cli/research.d.ts.map +1 -1
  27. package/dist/cli/research.js +360 -54
  28. package/dist/cli/research.js.map +1 -1
  29. package/dist/cli/review.d.ts +23 -0
  30. package/dist/cli/review.d.ts.map +1 -1
  31. package/dist/cli/review.js +462 -2
  32. package/dist/cli/review.js.map +1 -1
  33. package/dist/cli/source.d.ts.map +1 -1
  34. package/dist/cli/source.js +18 -0
  35. package/dist/cli/source.js.map +1 -1
  36. package/dist/cli/triage.d.ts +136 -0
  37. package/dist/cli/triage.d.ts.map +1 -0
  38. package/dist/cli/triage.js +1110 -0
  39. package/dist/cli/triage.js.map +1 -0
  40. package/dist/cli/undismiss.d.ts +30 -0
  41. package/dist/cli/undismiss.d.ts.map +1 -0
  42. package/dist/cli/undismiss.js +133 -0
  43. package/dist/cli/undismiss.js.map +1 -0
  44. package/dist/cli/update.d.ts.map +1 -1
  45. package/dist/cli/update.js +429 -141
  46. package/dist/cli/update.js.map +1 -1
  47. package/dist/cli/workflow/generate-combined-with-triage.d.ts +163 -0
  48. package/dist/cli/workflow/generate-combined-with-triage.d.ts.map +1 -0
  49. package/dist/cli/workflow/generate-combined-with-triage.js +582 -0
  50. package/dist/cli/workflow/generate-combined-with-triage.js.map +1 -0
  51. package/dist/cli/workflow.d.ts +6 -5
  52. package/dist/cli/workflow.d.ts.map +1 -1
  53. package/dist/cli/workflow.js +13 -8
  54. package/dist/cli/workflow.js.map +1 -1
  55. package/dist/core/feeds/json-api.d.ts +5 -2
  56. package/dist/core/feeds/json-api.d.ts.map +1 -1
  57. package/dist/core/feeds/json-api.js +99 -13
  58. package/dist/core/feeds/json-api.js.map +1 -1
  59. package/dist/core/feeds/types.d.ts +26 -0
  60. package/dist/core/feeds/types.d.ts.map +1 -1
  61. package/dist/core/recipes.d.ts.map +1 -1
  62. package/dist/core/recipes.js +6 -0
  63. package/dist/core/recipes.js.map +1 -1
  64. package/dist/core/transitions.d.ts +30 -0
  65. package/dist/core/transitions.d.ts.map +1 -0
  66. package/dist/core/transitions.js +103 -0
  67. package/dist/core/transitions.js.map +1 -0
  68. package/dist/core/triage/adapter.d.ts +80 -0
  69. package/dist/core/triage/adapter.d.ts.map +1 -0
  70. package/dist/core/triage/adapter.js +128 -0
  71. package/dist/core/triage/adapter.js.map +1 -0
  72. package/dist/core/triage/index.d.ts +105 -0
  73. package/dist/core/triage/index.d.ts.map +1 -0
  74. package/dist/core/triage/index.js +246 -0
  75. package/dist/core/triage/index.js.map +1 -0
  76. package/dist/core/triage/prompt.d.ts +30 -0
  77. package/dist/core/triage/prompt.d.ts.map +1 -0
  78. package/dist/core/triage/prompt.js +157 -0
  79. package/dist/core/triage/prompt.js.map +1 -0
  80. package/dist/core/triage/response.d.ts +114 -0
  81. package/dist/core/triage/response.d.ts.map +1 -0
  82. package/dist/core/triage/response.js +188 -0
  83. package/dist/core/triage/response.js.map +1 -0
  84. package/dist/gemini-commands/research.toml +1 -1
  85. package/dist/gemini-commands/review.toml +1 -1
  86. package/dist/gemini-commands/update.toml +1 -1
  87. package/dist/recipes/aws-whats-new.yaml +36 -1
  88. package/dist/recipes/dev-to.yaml +24 -0
  89. package/dist/schemas/item.d.ts +151 -5
  90. package/dist/schemas/item.d.ts.map +1 -1
  91. package/dist/schemas/item.js +164 -4
  92. package/dist/schemas/item.js.map +1 -1
  93. package/dist/schemas/recipe.d.ts +11 -1
  94. package/dist/schemas/recipe.d.ts.map +1 -1
  95. package/dist/schemas/recipe.js +10 -1
  96. package/dist/schemas/recipe.js.map +1 -1
  97. package/dist/schemas/source.d.ts +65 -4
  98. package/dist/schemas/source.d.ts.map +1 -1
  99. package/dist/schemas/source.js +65 -3
  100. package/dist/schemas/source.js.map +1 -1
  101. package/dist/skills/research/SKILL.md +57 -1
  102. package/dist/skills/review/SKILL.md +65 -1
  103. package/dist/skills/update/SKILL.md +54 -1
  104. package/dist/templates/agents/AGENTS.md +30 -0
  105. package/dist/templates/workflows/combined-with-triage.template.yaml.tmpl +132 -0
  106. package/package.json +1 -1
@@ -1,21 +1,139 @@
1
1
  import { z } from "zod";
2
2
  /**
3
- * Item status state machine (ADR-0008).
3
+ * Item status state machine (ADR-0008 + ADR-0018).
4
+ *
5
+ * Original 4-state machine:
4
6
  *
5
7
  * detected ──► (dismissed | researched) ──► reviewed
6
8
  *
7
- * - `detected`: watch run emitted the item after filter
8
- * - `dismissed`: user decided not to research (terminal)
9
+ * Triage extension (ADR-0018) adds 3 intermediate states. `triaged_dismiss`
10
+ * is intentionally **not** a separate status it is collapsed into existing
11
+ * `dismissed` with the `dismissedBy: "human" | "triage_<agent>"` sub-field
12
+ * recording the origin. Total status count: 4 → 7.
13
+ *
14
+ * detected
15
+ * ├── triage ──► triaged_research ──► researched ──► reviewed
16
+ * ├── triage ──► triaged_digest ──► researched (digest 合流)
17
+ * ├── triage ──► triaged_unsure ──► (human loop) ──► research / dismiss
18
+ * └── triage ──► dismissed (dismissedBy: triage_<agent>)
19
+ *
20
+ * dismissed ──► detected (via `radar undismiss`)
21
+ *
22
+ * Status semantics (per ADR-0018 §W-B):
23
+ *
24
+ * - `detected`: watch run emitted the item after filter, triage not yet run
25
+ * - `triaged_research`: triage classified as research-worthy
26
+ * - `triaged_digest`: triage classified as digest candidate (group key in `triage.group`)
27
+ * - `triaged_unsure`: triage confidence below threshold; human judgment needed
9
28
  * - `researched`: research report written
10
29
  * - `reviewed`: research report reviewed (terminal happy path)
30
+ * - `dismissed`: human or triage agent decided not to research (terminal,
31
+ * reversible via `radar undismiss`; origin in `dismissedBy`)
11
32
  */
12
33
  export declare const ItemStatusSchema: z.ZodEnum<{
13
34
  detected: "detected";
14
- dismissed: "dismissed";
35
+ triaged_research: "triaged_research";
36
+ triaged_digest: "triaged_digest";
37
+ triaged_unsure: "triaged_unsure";
15
38
  researched: "researched";
16
39
  reviewed: "reviewed";
40
+ dismissed: "dismissed";
17
41
  }>;
18
42
  export type ItemStatus = z.infer<typeof ItemStatusSchema>;
43
+ /**
44
+ * Decision values produced by a triage agent (ADR-0018).
45
+ *
46
+ * - `research`: item is research-worthy on its own
47
+ * - `digest`: item belongs to a group worth summarizing as a single digest
48
+ * - `dismiss`: item is not research-worthy; collapse into `dismissed`
49
+ * - `unsure`: triage agent's confidence is below `confidenceThreshold`; defer
50
+ * to human judgment
51
+ */
52
+ export declare const TriageDecisionValueSchema: z.ZodEnum<{
53
+ research: "research";
54
+ digest: "digest";
55
+ dismiss: "dismiss";
56
+ unsure: "unsure";
57
+ }>;
58
+ export type TriageDecisionValue = z.infer<typeof TriageDecisionValueSchema>;
59
+ /**
60
+ * One feedback datapoint on a prior triage decision (ADR-0018 §W5).
61
+ *
62
+ * `radar triage feedback <item-id> --correct | --wrong [--reason <text>]`
63
+ * appends to the array. Stored as a list so multiple reviewers (or the same
64
+ * reviewer revisiting later) can leave independent verdicts without
65
+ * overwriting each other; downstream stats aggregations decide how to
66
+ * combine them.
67
+ */
68
+ export declare const TriageFeedbackSchema: z.ZodObject<{
69
+ correct: z.ZodBoolean;
70
+ reason: z.ZodOptional<z.ZodString>;
71
+ feedbackAt: z.ZodString;
72
+ }, z.core.$strip>;
73
+ export type TriageFeedback = z.infer<typeof TriageFeedbackSchema>;
74
+ /**
75
+ * Triage decision attached to an item by a triage agent (ADR-0018 §W2 / §W5).
76
+ *
77
+ * Schema rationale (post-review #238 W-I):
78
+ *
79
+ * - The outer field on `Item` is the **singular** `triage` (not `triages`).
80
+ * This preserves the option of moving to a multi-agent shape (`triage: {
81
+ * decisions: [...], consensus: ... }`) later via a Zod union without
82
+ * renaming the field. PR-1 ships the single-agent inner shape only;
83
+ * multi-agent extension is a future PR and explicitly NOT in scope.
84
+ * - `decision` is a discriminated string, not a nested object, so the same
85
+ * union-extension pattern can reuse the field name on the inner decision
86
+ * list without ambiguity.
87
+ * - `feedback` is an array, not a single object — multiple human reviewers
88
+ * can leave independent verdicts (see `TriageFeedbackSchema` docstring).
89
+ */
90
+ export declare const TriageDecisionSchema: z.ZodObject<{
91
+ decision: z.ZodEnum<{
92
+ research: "research";
93
+ digest: "digest";
94
+ dismiss: "dismiss";
95
+ unsure: "unsure";
96
+ }>;
97
+ confidence: z.ZodNumber;
98
+ reason: z.ZodString;
99
+ group: z.ZodOptional<z.ZodString>;
100
+ agent: z.ZodString;
101
+ triagedAt: z.ZodString;
102
+ feedback: z.ZodDefault<z.ZodArray<z.ZodObject<{
103
+ correct: z.ZodBoolean;
104
+ reason: z.ZodOptional<z.ZodString>;
105
+ feedbackAt: z.ZodString;
106
+ }, z.core.$strip>>>;
107
+ }, z.core.$strip>;
108
+ export type TriageDecision = z.infer<typeof TriageDecisionSchema>;
109
+ /**
110
+ * Origin of a `dismissed` decision (ADR-0018 §W2 / §W6).
111
+ *
112
+ * Distinguishes human dismiss from triage-agent dismiss so `radar undismiss`
113
+ * can apply the right safety behavior: triage-origin dismisses are reversible
114
+ * without a flag, human-origin dismisses require `--force` (= confirms the
115
+ * user is overriding their own prior decision, not just an agent's).
116
+ *
117
+ * Defined as a string enum (not a union with `AgentIdSchema`) because the
118
+ * `triage_` prefix lets schema validation reject malformed values like
119
+ * `"claude-code"` (missing prefix) that would silently collide with the
120
+ * `human` case.
121
+ *
122
+ * Maintenance note: this enum mirrors `AgentIdSchema` (`src/schemas/research.ts`)
123
+ * with a `triage_` prefix. When a new agent adapter is added, both enums
124
+ * must be updated in lockstep. A test (`tests/schemas/item.test.ts`)
125
+ * iterates each `AgentIdSchema` value and asserts the corresponding
126
+ * `triage_<agent>` variant parses; that test will fail loudly if the two
127
+ * lists drift out of sync.
128
+ */
129
+ export declare const DismissedBySchema: z.ZodEnum<{
130
+ human: "human";
131
+ "triage_claude-code": "triage_claude-code";
132
+ "triage_codex-cli": "triage_codex-cli";
133
+ "triage_gemini-cli": "triage_gemini-cli";
134
+ triage_copilot: "triage_copilot";
135
+ }>;
136
+ export type DismissedBy = z.infer<typeof DismissedBySchema>;
19
137
  export declare const ItemSchema: z.ZodObject<{
20
138
  id: z.ZodString;
21
139
  sourceId: z.ZodString;
@@ -28,11 +146,39 @@ export declare const ItemSchema: z.ZodObject<{
28
146
  matchedKeywords: z.ZodDefault<z.ZodArray<z.ZodString>>;
29
147
  status: z.ZodDefault<z.ZodEnum<{
30
148
  detected: "detected";
31
- dismissed: "dismissed";
149
+ triaged_research: "triaged_research";
150
+ triaged_digest: "triaged_digest";
151
+ triaged_unsure: "triaged_unsure";
32
152
  researched: "researched";
33
153
  reviewed: "reviewed";
154
+ dismissed: "dismissed";
34
155
  }>>;
35
156
  injectionFlags: z.ZodDefault<z.ZodArray<z.ZodString>>;
157
+ triage: z.ZodOptional<z.ZodObject<{
158
+ decision: z.ZodEnum<{
159
+ research: "research";
160
+ digest: "digest";
161
+ dismiss: "dismiss";
162
+ unsure: "unsure";
163
+ }>;
164
+ confidence: z.ZodNumber;
165
+ reason: z.ZodString;
166
+ group: z.ZodOptional<z.ZodString>;
167
+ agent: z.ZodString;
168
+ triagedAt: z.ZodString;
169
+ feedback: z.ZodDefault<z.ZodArray<z.ZodObject<{
170
+ correct: z.ZodBoolean;
171
+ reason: z.ZodOptional<z.ZodString>;
172
+ feedbackAt: z.ZodString;
173
+ }, z.core.$strip>>>;
174
+ }, z.core.$strip>>;
175
+ dismissedBy: z.ZodOptional<z.ZodEnum<{
176
+ human: "human";
177
+ "triage_claude-code": "triage_claude-code";
178
+ "triage_codex-cli": "triage_codex-cli";
179
+ "triage_gemini-cli": "triage_gemini-cli";
180
+ triage_copilot: "triage_copilot";
181
+ }>>;
36
182
  }, z.core.$strip>;
37
183
  export type Item = z.infer<typeof ItemSchema>;
38
184
  //# sourceMappingURL=item.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"item.d.ts","sourceRoot":"","sources":["../../src/schemas/item.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;;;;;;GASG;AACH,eAAO,MAAM,gBAAgB;;;;;EAA8D,CAAC;AAC5F,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAE1D,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;iBAoBrB,CAAC;AACH,MAAM,MAAM,IAAI,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,UAAU,CAAC,CAAC"}
1
+ {"version":3,"file":"item.d.ts","sourceRoot":"","sources":["../../src/schemas/item.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,eAAO,MAAM,gBAAgB;;;;;;;;EAQ3B,CAAC;AACH,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAE1D;;;;;;;;GAQG;AACH,eAAO,MAAM,yBAAyB;;;;;EAAsD,CAAC;AAC7F,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAE5E;;;;;;;;GAQG;AACH,eAAO,MAAM,oBAAoB;;;;iBAW/B,CAAC;AACH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAElE;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;iBAmC/B,CAAC;AACH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAElE;;;;;;;;;;;;;;;;;;;GAmBG;AACH,eAAO,MAAM,iBAAiB;;;;;;EAM5B,CAAC;AACH,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAE5D,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAyCrB,CAAC;AACH,MAAM,MAAM,IAAI,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,UAAU,CAAC,CAAC"}
@@ -1,15 +1,154 @@
1
1
  import { z } from "zod";
2
2
  /**
3
- * Item status state machine (ADR-0008).
3
+ * Item status state machine (ADR-0008 + ADR-0018).
4
+ *
5
+ * Original 4-state machine:
4
6
  *
5
7
  * detected ──► (dismissed | researched) ──► reviewed
6
8
  *
7
- * - `detected`: watch run emitted the item after filter
8
- * - `dismissed`: user decided not to research (terminal)
9
+ * Triage extension (ADR-0018) adds 3 intermediate states. `triaged_dismiss`
10
+ * is intentionally **not** a separate status it is collapsed into existing
11
+ * `dismissed` with the `dismissedBy: "human" | "triage_<agent>"` sub-field
12
+ * recording the origin. Total status count: 4 → 7.
13
+ *
14
+ * detected
15
+ * ├── triage ──► triaged_research ──► researched ──► reviewed
16
+ * ├── triage ──► triaged_digest ──► researched (digest 合流)
17
+ * ├── triage ──► triaged_unsure ──► (human loop) ──► research / dismiss
18
+ * └── triage ──► dismissed (dismissedBy: triage_<agent>)
19
+ *
20
+ * dismissed ──► detected (via `radar undismiss`)
21
+ *
22
+ * Status semantics (per ADR-0018 §W-B):
23
+ *
24
+ * - `detected`: watch run emitted the item after filter, triage not yet run
25
+ * - `triaged_research`: triage classified as research-worthy
26
+ * - `triaged_digest`: triage classified as digest candidate (group key in `triage.group`)
27
+ * - `triaged_unsure`: triage confidence below threshold; human judgment needed
9
28
  * - `researched`: research report written
10
29
  * - `reviewed`: research report reviewed (terminal happy path)
30
+ * - `dismissed`: human or triage agent decided not to research (terminal,
31
+ * reversible via `radar undismiss`; origin in `dismissedBy`)
32
+ */
33
+ export const ItemStatusSchema = z.enum([
34
+ "detected",
35
+ "triaged_research",
36
+ "triaged_digest",
37
+ "triaged_unsure",
38
+ "researched",
39
+ "reviewed",
40
+ "dismissed",
41
+ ]);
42
+ /**
43
+ * Decision values produced by a triage agent (ADR-0018).
44
+ *
45
+ * - `research`: item is research-worthy on its own
46
+ * - `digest`: item belongs to a group worth summarizing as a single digest
47
+ * - `dismiss`: item is not research-worthy; collapse into `dismissed`
48
+ * - `unsure`: triage agent's confidence is below `confidenceThreshold`; defer
49
+ * to human judgment
50
+ */
51
+ export const TriageDecisionValueSchema = z.enum(["research", "digest", "dismiss", "unsure"]);
52
+ /**
53
+ * One feedback datapoint on a prior triage decision (ADR-0018 §W5).
54
+ *
55
+ * `radar triage feedback <item-id> --correct | --wrong [--reason <text>]`
56
+ * appends to the array. Stored as a list so multiple reviewers (or the same
57
+ * reviewer revisiting later) can leave independent verdicts without
58
+ * overwriting each other; downstream stats aggregations decide how to
59
+ * combine them.
60
+ */
61
+ export const TriageFeedbackSchema = z.object({
62
+ /**
63
+ * `true` when the human agrees with the triage decision; `false` when they
64
+ * judge it wrong. Stored as a boolean rather than free-text verdict so the
65
+ * `radar triage stats` aggregation (#242) has a deterministic field to
66
+ * count on.
67
+ */
68
+ correct: z.boolean(),
69
+ /** Optional rationale shown alongside `--wrong` (or `--correct` for nuance). */
70
+ reason: z.string().optional(),
71
+ feedbackAt: z.string().datetime(),
72
+ });
73
+ /**
74
+ * Triage decision attached to an item by a triage agent (ADR-0018 §W2 / §W5).
75
+ *
76
+ * Schema rationale (post-review #238 W-I):
77
+ *
78
+ * - The outer field on `Item` is the **singular** `triage` (not `triages`).
79
+ * This preserves the option of moving to a multi-agent shape (`triage: {
80
+ * decisions: [...], consensus: ... }`) later via a Zod union without
81
+ * renaming the field. PR-1 ships the single-agent inner shape only;
82
+ * multi-agent extension is a future PR and explicitly NOT in scope.
83
+ * - `decision` is a discriminated string, not a nested object, so the same
84
+ * union-extension pattern can reuse the field name on the inner decision
85
+ * list without ambiguity.
86
+ * - `feedback` is an array, not a single object — multiple human reviewers
87
+ * can leave independent verdicts (see `TriageFeedbackSchema` docstring).
11
88
  */
12
- export const ItemStatusSchema = z.enum(["detected", "dismissed", "researched", "reviewed"]);
89
+ export const TriageDecisionSchema = z.object({
90
+ decision: TriageDecisionValueSchema,
91
+ /**
92
+ * Triage agent's self-reported confidence in the decision. Compared against
93
+ * the source's `triagePolicy.confidenceThreshold` (default 0.7) to decide
94
+ * whether to promote `dismiss` / `research` / `digest` outright or
95
+ * downgrade to `unsure` for human review. Stored regardless of outcome so
96
+ * later feedback analysis can correlate confidence with correctness.
97
+ */
98
+ confidence: z.number().min(0).max(1),
99
+ /** Short natural-language rationale from the triage agent. */
100
+ reason: z.string().min(1),
101
+ /**
102
+ * Grouping key used when `decision === "digest"`. Stored as a free-form
103
+ * slug — `radar research --digest --triage-group <group>` collects every
104
+ * `triaged_digest` item sharing this key (ADR-0018 §W-H). Optional because
105
+ * non-digest decisions do not produce a group.
106
+ */
107
+ group: z.string().optional(),
108
+ /**
109
+ * Identifier of the agent that produced the decision. Free-form string
110
+ * rather than `AgentIdSchema` because the triage channel may use a more
111
+ * specific model identifier (e.g. `"gemini-2.5-flash-lite"`) than the
112
+ * coarse adapter id used elsewhere.
113
+ */
114
+ agent: z.string().min(1),
115
+ triagedAt: z.string().datetime(),
116
+ /**
117
+ * Append-only feedback log. Defaults to `[]` so items written before the
118
+ * feedback CLI runs (the common case) deserialize cleanly. Existing items
119
+ * predating ADR-0018 have no `triage` field at all and therefore never
120
+ * need a default for this nested array — the default exists for the
121
+ * `triage` exists, `feedback` not yet populated case.
122
+ */
123
+ feedback: z.array(TriageFeedbackSchema).default([]),
124
+ });
125
+ /**
126
+ * Origin of a `dismissed` decision (ADR-0018 §W2 / §W6).
127
+ *
128
+ * Distinguishes human dismiss from triage-agent dismiss so `radar undismiss`
129
+ * can apply the right safety behavior: triage-origin dismisses are reversible
130
+ * without a flag, human-origin dismisses require `--force` (= confirms the
131
+ * user is overriding their own prior decision, not just an agent's).
132
+ *
133
+ * Defined as a string enum (not a union with `AgentIdSchema`) because the
134
+ * `triage_` prefix lets schema validation reject malformed values like
135
+ * `"claude-code"` (missing prefix) that would silently collide with the
136
+ * `human` case.
137
+ *
138
+ * Maintenance note: this enum mirrors `AgentIdSchema` (`src/schemas/research.ts`)
139
+ * with a `triage_` prefix. When a new agent adapter is added, both enums
140
+ * must be updated in lockstep. A test (`tests/schemas/item.test.ts`)
141
+ * iterates each `AgentIdSchema` value and asserts the corresponding
142
+ * `triage_<agent>` variant parses; that test will fail loudly if the two
143
+ * lists drift out of sync.
144
+ */
145
+ export const DismissedBySchema = z.enum([
146
+ "human",
147
+ "triage_claude-code",
148
+ "triage_codex-cli",
149
+ "triage_gemini-cli",
150
+ "triage_copilot",
151
+ ]);
13
152
  export const ItemSchema = z.object({
14
153
  id: z.string().min(1),
15
154
  sourceId: z.string().min(1),
@@ -30,5 +169,26 @@ export const ItemSchema = z.object({
30
169
  * automatic.
31
170
  */
32
171
  injectionFlags: z.array(z.string()).default([]),
172
+ /**
173
+ * Triage decision attached by `radar triage` (ADR-0018). Optional so:
174
+ *
175
+ * 1. Items written before PR-1 (no `triage:` key in YAML) validate cleanly
176
+ * (W-F migration requirement).
177
+ * 2. Items detected after PR-1 but before triage runs also validate.
178
+ *
179
+ * Field name is intentionally singular even though a future multi-agent
180
+ * triage extension will hold an array of decisions — the migration plan
181
+ * is to widen this field to `z.union([TriageDecisionSchema, MultiAgentTriageSchema])`
182
+ * without renaming, preserving on-disk compat (W-I post-review).
183
+ */
184
+ triage: TriageDecisionSchema.optional(),
185
+ /**
186
+ * Origin of a `dismissed` decision (ADR-0018 §W6). Only meaningful when
187
+ * `status === "dismissed"`; we intentionally do NOT enforce this with a
188
+ * superRefine so legacy `dismissed` items (no `dismissedBy` field, written
189
+ * before ADR-0018) keep validating. Consumers needing origin information
190
+ * should treat `undefined` as "human" for those legacy items.
191
+ */
192
+ dismissedBy: DismissedBySchema.optional(),
33
193
  });
34
194
  //# sourceMappingURL=item.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"item.js","sourceRoot":"","sources":["../../src/schemas/item.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,UAAU,EAAE,WAAW,EAAE,YAAY,EAAE,UAAU,CAAC,CAAC,CAAC;AAG5F,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,CAAC,MAAM,CAAC;IACjC,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACrB,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAC3B,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;IACjB,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE;IACrB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,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE;IACrB,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;IAC7C,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAChC,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC9B,GAAG,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;IAC3B,eAAe,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC;IAChD,MAAM,EAAE,gBAAgB,CAAC,OAAO,CAAC,UAAU,CAAC;IAC5C;;;;;;;OAOG;IACH,cAAc,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC;IAC/C;;;;;;;;;;;OAWG;IACH,MAAM,EAAE,oBAAoB,CAAC,QAAQ,EAAE;IACvC;;;;;;OAMG;IACH,WAAW,EAAE,iBAAiB,CAAC,QAAQ,EAAE;CAC1C,CAAC,CAAC"}
@@ -110,7 +110,7 @@ export declare const RecipeFileSchema: z.ZodObject<{
110
110
  type: z.ZodLiteral<"range">;
111
111
  param: z.ZodString;
112
112
  template: z.ZodString;
113
- range: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
113
+ range: z.ZodTuple<[z.ZodNumber, z.ZodUnion<readonly [z.ZodNumber, z.ZodLiteral<"current-year">]>], null>;
114
114
  step: z.ZodDefault<z.ZodNumber>;
115
115
  }, z.core.$strip>, z.ZodObject<{
116
116
  type: z.ZodLiteral<"enum">;
@@ -122,6 +122,16 @@ export declare const RecipeFileSchema: z.ZodObject<{
122
122
  trusted: "trusted";
123
123
  untrusted: "untrusted";
124
124
  }>>;
125
+ triagePolicy: z.ZodOptional<z.ZodObject<{
126
+ agent: z.ZodEnum<{
127
+ "claude-code": "claude-code";
128
+ "codex-cli": "codex-cli";
129
+ "gemini-cli": "gemini-cli";
130
+ copilot: "copilot";
131
+ }>;
132
+ confidenceThreshold: z.ZodDefault<z.ZodNumber>;
133
+ rules: z.ZodString;
134
+ }, z.core.$strip>>;
125
135
  }, z.core.$strip>;
126
136
  export type RecipeFile = z.infer<typeof RecipeFileSchema>;
127
137
  //# sourceMappingURL=recipe.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"recipe.d.ts","sourceRoot":"","sources":["../../src/schemas/recipe.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAaxB;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA2B3B,CAAC;AAEH,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC"}
1
+ {"version":3,"file":"recipe.d.ts","sourceRoot":"","sources":["../../src/schemas/recipe.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAcxB;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAoC3B,CAAC;AAEH,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import { z } from "zod";
2
- import { SourceFacetsSchema, SourceFiltersSchema, SourceHttpOptionsSchema, SourceJsOptionsSchema, SourceJsonApiSelectorsSchema, SourceKindSchema, SourcePaginationSchema, SourceSelectorsSchema, TrustLevelSchema, } from "./source.js";
2
+ import { SourceFacetsSchema, SourceFiltersSchema, SourceHttpOptionsSchema, SourceJsOptionsSchema, SourceJsonApiSelectorsSchema, SourceKindSchema, SourcePaginationSchema, SourceSelectorsSchema, SourceTriagePolicySchema, TrustLevelSchema, } from "./source.js";
3
3
  /**
4
4
  * Schema for a bundled recipe YAML file (ADR-0012 §D3, strategy A —
5
5
  * "リポ同梱").
@@ -53,5 +53,14 @@ export const RecipeFileSchema = z.object({
53
53
  // without `facets:` keep working unchanged.
54
54
  facets: SourceFacetsSchema.optional(),
55
55
  trustLevel: TrustLevelSchema.default("untrusted"),
56
+ /**
57
+ * Default triage policy bundled with the recipe (ADR-0018 §W3). When
58
+ * `radar source add --recipe <name>` materializes a source from this
59
+ * recipe, the policy propagates onto `sources/<id>.yaml > triagePolicy:`
60
+ * so the user gets a sensible default without authoring rules by hand.
61
+ * Optional: existing bundled recipes (PR #229 / #232) ship without
62
+ * `triagePolicy:` and continue to validate.
63
+ */
64
+ triagePolicy: SourceTriagePolicySchema.optional(),
56
65
  });
57
66
  //# sourceMappingURL=recipe.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"recipe.js","sourceRoot":"","sources":["../../src/schemas/recipe.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,kBAAkB,EAClB,mBAAmB,EACnB,uBAAuB,EACvB,qBAAqB,EACrB,4BAA4B,EAC5B,gBAAgB,EAChB,sBAAsB,EACtB,qBAAqB,EACrB,gBAAgB,GACjB,MAAM,aAAa,CAAC;AAErB;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,CAAC,MAAM,CAAC;IACvC,sDAAsD;IACtD,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC3B;;;OAGG;IACH,W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MAAM,CAAC;IACvC,sDAAsD;IACtD,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC3B;;;OAGG;IACH,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAClC,IAAI,EAAE,gBAAgB;IACtB,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACtB,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC;IACrC,OAAO,EAAE,mBAAmB,CAAC,OAAO,CAAC;QACnC,QAAQ,EAAE,EAAE;QACZ,eAAe,EAAE,EAAE;QACnB,SAAS,EAAE,MAAM;QACjB,WAAW,EAAE,CAAC,OAAO,EAAE,SAAS,CAAC;QACjC,aAAa,EAAE,KAAK;KACrB,CAAC;IACF,SAAS,EAAE,qBAAqB,CAAC,QAAQ,EAAE;IAC3C,EAAE,EAAE,qBAAqB,CAAC,QAAQ,EAAE;IACpC,IAAI,EAAE,uBAAuB,CAAC,QAAQ,EAAE;IACxC,UAAU,EAAE,sBAAsB,CAAC,QAAQ,EAAE;IAC7C,aAAa,EAAE,4BAA4B,CAAC,QAAQ,EAAE;IACtD,wEAAwE;IACxE,4CAA4C;IAC5C,MAAM,EAAE,kBAAkB,CAAC,QAAQ,EAAE;IACrC,UAAU,EAAE,gBAAgB,CAAC,OAAO,CAAC,WAAW,CAAC;IACjD;;;;;;;OAOG;IACH,YAAY,EAAE,wBAAwB,CAAC,QAAQ,EAAE;CAClD,CAAC,CAAC"}
@@ -49,6 +49,39 @@ export declare const TrustLevelSchema: z.ZodEnum<{
49
49
  untrusted: "untrusted";
50
50
  }>;
51
51
  export type TrustLevel = z.infer<typeof TrustLevelSchema>;
52
+ /**
53
+ * Per-source triage policy (ADR-0018 §W3).
54
+ *
55
+ * Drives `radar triage` for items emitted from this source. Optional on
56
+ * `SourceSchema`: existing source YAMLs (which omit `triagePolicy:` entirely)
57
+ * remain valid and `radar triage` simply skips them.
58
+ *
59
+ * - `agent`: which adapter runs the triage call. Reuses `AgentIdSchema` so
60
+ * the same enum gates both research and triage agents (a workspace can
61
+ * only triage with an adapter it has wired up). The adapter is free to
62
+ * route the triage channel to a cheaper model than the research channel
63
+ * (e.g. `gemini-2.5-flash-lite` vs `gemini-2.5-pro`), but that mapping is
64
+ * adapter-internal and not schema-modeled here.
65
+ * - `confidenceThreshold`: minimum confidence for a non-`unsure` decision to
66
+ * stick. Decisions below the threshold are demoted to `unsure` regardless
67
+ * of what the agent returned. Default `0.7` reflects ADR-0018's
68
+ * recommendation for cheap-model triage.
69
+ * - `rules`: free-form markdown describing how this source should be
70
+ * classified ("AWS GA は research、リージョン拡張は dismiss" 等). Wrapped
71
+ * in a `<policy>` boundary marker at prompt time per ADR-0018 §W-A; never
72
+ * parsed by the schema beyond non-empty.
73
+ */
74
+ export declare const SourceTriagePolicySchema: z.ZodObject<{
75
+ agent: z.ZodEnum<{
76
+ "claude-code": "claude-code";
77
+ "codex-cli": "codex-cli";
78
+ "gemini-cli": "gemini-cli";
79
+ copilot: "copilot";
80
+ }>;
81
+ confidenceThreshold: z.ZodDefault<z.ZodNumber>;
82
+ rules: z.ZodString;
83
+ }, z.core.$strip>;
84
+ export type SourceTriagePolicy = z.infer<typeof SourceTriagePolicySchema>;
52
85
  export declare const SourceFiltersSchema: z.ZodObject<{
53
86
  keywords: z.ZodDefault<z.ZodArray<z.ZodString>>;
54
87
  excludeKeywords: z.ZodDefault<z.ZodArray<z.ZodString>>;
@@ -254,11 +287,29 @@ export type SourceJsonApiSelectors = z.infer<typeof SourceJsonApiSelectorsSchema
254
287
  * `pagination.type: facet`, lastSeenIds-as-global semantics, conditional
255
288
  * GET disablement in facet sweep mode).
256
289
  */
290
+ /**
291
+ * Sentinel for a relative range upper bound (#257).
292
+ *
293
+ * When the `range` end element is the literal string `"current-year"` instead
294
+ * of a number, the adapter resolves it to the current calendar year at fetch
295
+ * time (`generateFacetValues`). This keeps year-axis facet recipes from
296
+ * silently dropping new items at year boundaries: a hardcoded upper bound
297
+ * (e.g. `[2004, 2026]`) stops querying `…#year#2027` once 2027 arrives, with
298
+ * no error (out-of-range years simply return 0 items). The sentinel auto-
299
+ * extends the swept range so coverage tracks wall-clock time without manual
300
+ * recipe bumps.
301
+ *
302
+ * Only the upper bound supports this today; the lower bound stays a literal
303
+ * number (AWS's first announcement year is fixed at 2004).
304
+ */
305
+ export declare const FACET_RANGE_CURRENT_YEAR = "current-year";
306
+ export declare const FacetRangeEndSchema: z.ZodUnion<readonly [z.ZodNumber, z.ZodLiteral<"current-year">]>;
307
+ export type FacetRangeEnd = z.infer<typeof FacetRangeEndSchema>;
257
308
  export declare const SourceFacetRangeSchema: z.ZodObject<{
258
309
  type: z.ZodLiteral<"range">;
259
310
  param: z.ZodString;
260
311
  template: z.ZodString;
261
- range: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
312
+ range: z.ZodTuple<[z.ZodNumber, z.ZodUnion<readonly [z.ZodNumber, z.ZodLiteral<"current-year">]>], null>;
262
313
  step: z.ZodDefault<z.ZodNumber>;
263
314
  }, z.core.$strip>;
264
315
  export type SourceFacetRange = z.infer<typeof SourceFacetRangeSchema>;
@@ -273,7 +324,7 @@ export declare const SourceFacetSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
273
324
  type: z.ZodLiteral<"range">;
274
325
  param: z.ZodString;
275
326
  template: z.ZodString;
276
- range: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
327
+ range: z.ZodTuple<[z.ZodNumber, z.ZodUnion<readonly [z.ZodNumber, z.ZodLiteral<"current-year">]>], null>;
277
328
  step: z.ZodDefault<z.ZodNumber>;
278
329
  }, z.core.$strip>, z.ZodObject<{
279
330
  type: z.ZodLiteral<"enum">;
@@ -292,7 +343,7 @@ export declare const SourceFacetsSchema: z.ZodRecord<z.ZodString, z.ZodDiscrimin
292
343
  type: z.ZodLiteral<"range">;
293
344
  param: z.ZodString;
294
345
  template: z.ZodString;
295
- range: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
346
+ range: z.ZodTuple<[z.ZodNumber, z.ZodUnion<readonly [z.ZodNumber, z.ZodLiteral<"current-year">]>], null>;
296
347
  step: z.ZodDefault<z.ZodNumber>;
297
348
  }, z.core.$strip>, z.ZodObject<{
298
349
  type: z.ZodLiteral<"enum">;
@@ -386,7 +437,7 @@ export declare const SourceSchema: z.ZodObject<{
386
437
  type: z.ZodLiteral<"range">;
387
438
  param: z.ZodString;
388
439
  template: z.ZodString;
389
- range: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
440
+ range: z.ZodTuple<[z.ZodNumber, z.ZodUnion<readonly [z.ZodNumber, z.ZodLiteral<"current-year">]>], null>;
390
441
  step: z.ZodDefault<z.ZodNumber>;
391
442
  }, z.core.$strip>, z.ZodObject<{
392
443
  type: z.ZodLiteral<"enum">;
@@ -398,6 +449,16 @@ export declare const SourceSchema: z.ZodObject<{
398
449
  trusted: "trusted";
399
450
  untrusted: "untrusted";
400
451
  }>>;
452
+ triagePolicy: z.ZodOptional<z.ZodObject<{
453
+ agent: z.ZodEnum<{
454
+ "claude-code": "claude-code";
455
+ "codex-cli": "codex-cli";
456
+ "gemini-cli": "gemini-cli";
457
+ copilot: "copilot";
458
+ }>;
459
+ confidenceThreshold: z.ZodDefault<z.ZodNumber>;
460
+ rules: z.ZodString;
461
+ }, z.core.$strip>>;
401
462
  }, z.core.$strip>;
402
463
  export type Source = z.infer<typeof SourceSchema>;
403
464
  //# sourceMappingURL=source.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"source.d.ts","sourceRoot":"","sources":["../../src/schemas/source.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,gBAAgB;;;;;;;;EAQ3B,CAAC;AACH,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CA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