@plasm_lang/vercel-agent 0.3.78 → 0.3.81

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 (49) hide show
  1. package/agent/instructions.md +1 -2
  2. package/bin/plasm-agent.mjs +5 -7
  3. package/package.json +26 -19
  4. package/scripts/plasm-cli.ts +4 -3
  5. package/scripts/run-plasm-cli.mjs +41 -0
  6. package/src/cli/init-scaffold.ts +198 -0
  7. package/src/cli/init.ts +16 -278
  8. package/src/cli/nitro-dev.ts +2 -6
  9. package/src/cli/node-dev-imports.ts +14 -0
  10. package/src/package-version.ts +14 -0
  11. package/src/project-info.ts +2 -1
  12. package/templates/mcp-radar/.vercelignore +3 -0
  13. package/templates/mcp-radar/README.md +139 -0
  14. package/templates/mcp-radar/agent/agent.ts +38 -0
  15. package/templates/mcp-radar/agent/catalogs/hackernews/README.md +23 -0
  16. package/templates/mcp-radar/agent/catalogs/hackernews/domain.yaml +329 -0
  17. package/templates/mcp-radar/agent/catalogs/hackernews/eval/cases.yaml +112 -0
  18. package/templates/mcp-radar/agent/catalogs/hackernews/mappings.yaml +129 -0
  19. package/templates/mcp-radar/agent/catalogs/tavily/README.md +218 -0
  20. package/templates/mcp-radar/agent/catalogs/tavily/domain.yaml +373 -0
  21. package/templates/mcp-radar/agent/catalogs/tavily/eval/cases.yaml +56 -0
  22. package/templates/mcp-radar/agent/catalogs/tavily/eval/google-gemma-3-4b-it.latest.human.txt +67 -0
  23. package/templates/mcp-radar/agent/catalogs/tavily/eval/google-gemma-3-4b-it.latest.json +363 -0
  24. package/templates/mcp-radar/agent/catalogs/tavily/mappings.yaml +171 -0
  25. package/templates/mcp-radar/agent/channels/mcp-radar.ts +85 -0
  26. package/templates/mcp-radar/agent/hooks/proof-audit.ts +10 -0
  27. package/templates/mcp-radar/agent/instructions.md +24 -0
  28. package/templates/mcp-radar/agent/research/mcp-innovations-proof.md +4 -0
  29. package/templates/mcp-radar/agent/schedules/mcp-radar-scan.ts +14 -0
  30. package/templates/mcp-radar/agent/skills/mcp-proof-format.md +19 -0
  31. package/templates/mcp-radar/api/[[...path]].ts +23 -0
  32. package/templates/mcp-radar/evals/mcp-radar-discover.eval.ts +14 -0
  33. package/templates/mcp-radar/lib/proof-store.ts +265 -0
  34. package/templates/mcp-radar/lib/run-radar.ts +214 -0
  35. package/templates/mcp-radar/nitro.config.ts +17 -0
  36. package/templates/mcp-radar/package.json +14 -0
  37. package/templates/mcp-radar/public/index.html +10 -0
  38. package/templates/mcp-radar/routes/[...path].ts +29 -0
  39. package/templates/mcp-radar/scripts/run-evals.ts +46 -0
  40. package/templates/mcp-radar/scripts/smoke-channel.ts +66 -0
  41. package/templates/mcp-radar/vercel.json +15 -0
  42. package/templates/scaffold/.vercelignore +3 -0
  43. package/templates/scaffold/api/[[...path]].ts +23 -0
  44. package/templates/scaffold/nitro.config.ts +17 -0
  45. package/templates/scaffold/public/index.html +10 -0
  46. package/templates/scaffold/public/index.mcp-radar.html +10 -0
  47. package/templates/scaffold/routes/[...path].ts +29 -0
  48. package/templates/scaffold/vercel.default.json +4 -0
  49. package/templates/scaffold/vercel.mcp-radar.json +15 -0
@@ -0,0 +1,329 @@
1
+ version: 2
2
+ auth:
3
+ scheme: none
4
+ http_backend: https://hacker-news.firebaseio.com
5
+ entities:
6
+ Item:
7
+ id_field: id
8
+ description: A Hacker News item (story, comment, job, poll, or poll option). Use item_search (Algolia) to discover ids.
9
+ from text, then item_get for full rows from Firebase. Feed endpoints return only numeric ids; use item_get to load title,
10
+ text, score, and comment trees. Direct replies are listed under kids as further item ids. Poll posts expose poll option
11
+ ids under parts; each option is another Item row.
12
+ fields:
13
+ id:
14
+ required: true
15
+ value_ref: nv_item_id
16
+ type:
17
+ required: false
18
+ value_ref: nv_item_type
19
+ by:
20
+ required: false
21
+ value_ref: nv_item_by
22
+ time:
23
+ required: false
24
+ value_ref: nv_item_time
25
+ title:
26
+ required: false
27
+ value_ref: nv_item_title
28
+ text:
29
+ required: false
30
+ value_ref: nv_item_text
31
+ url:
32
+ required: false
33
+ value_ref: nv_item_url
34
+ score:
35
+ required: false
36
+ value_ref: nv_item_score
37
+ descendants:
38
+ required: false
39
+ value_ref: nv_item_descendants
40
+ parent:
41
+ required: false
42
+ value_ref: nv_item_parent
43
+ poll:
44
+ required: false
45
+ value_ref: nv_item_poll
46
+ parts:
47
+ required: false
48
+ value_ref: nv_item_parts
49
+ deleted:
50
+ required: false
51
+ value_ref: nv_item_deleted
52
+ dead:
53
+ required: false
54
+ value_ref: nv_item_dead
55
+ relations:
56
+ kids:
57
+ description: Direct child item ids (typically comments under a story).
58
+ target: Item
59
+ cardinality: many
60
+ materialize:
61
+ kind: from_parent_get
62
+ path:
63
+ - key: kids
64
+ - wildcard: true
65
+ poll_options:
66
+ description: Poll option rows referenced by parts (each id is an Item).
67
+ target: Item
68
+ cardinality: many
69
+ materialize:
70
+ kind: from_parent_get
71
+ path:
72
+ - key: parts
73
+ - wildcard: true
74
+ User:
75
+ id_field: id
76
+ description: A Hacker News user profile keyed by username. The submitted list holds item ids only; fetch each via item_get.
77
+ when you need titles or comment bodies.
78
+ fields:
79
+ id:
80
+ required: true
81
+ value_ref: nv_user_id
82
+ created:
83
+ required: false
84
+ value_ref: nv_user_created
85
+ karma:
86
+ required: false
87
+ value_ref: nv_user_karma
88
+ about:
89
+ required: false
90
+ value_ref: nv_user_about
91
+ delay:
92
+ required: false
93
+ value_ref: nv_user_delay
94
+ relations:
95
+ submitted:
96
+ description: Item ids this user has submitted.
97
+ target: Item
98
+ cardinality: many
99
+ materialize:
100
+ kind: from_parent_get
101
+ path:
102
+ - key: submitted
103
+ - wildcard: true
104
+ MaxItemId:
105
+ id_field: id
106
+ description: Current largest item id reported by maxitem.json (a bare JSON integer on the wire). Hydrate the referenced.
107
+ row with item_get when you need the full record.
108
+ fields:
109
+ id:
110
+ required: true
111
+ value_ref: nv_max_item_id_id
112
+ RecentUpdatedItem:
113
+ id_field: id
114
+ description: Item ids listed under updates.json items (live slice of ids with recent activity). Each entry is an id only.
115
+ use item_get for payloads.
116
+ fields:
117
+ id:
118
+ required: true
119
+ value_ref: nv_recent_updated_item_id
120
+ RecentUpdatedUser:
121
+ id_field: id
122
+ description: Usernames listed under updates.json profiles (accounts whose profile data changed). Each entry is the username.
123
+ string only; use user_get for karma and about text.
124
+ fields:
125
+ id:
126
+ required: true
127
+ value_ref: nv_recent_updated_user_id
128
+ capabilities:
129
+ item_search:
130
+ description: Full-text search over HN via the public Algolia index (https://hn.algolia.com/api). Returns story Item rows.
131
+ with id from objectID and title/url from the hit; use item_get to hydrate the full Firebase record, kids, and score.
132
+ kind: search
133
+ entity: Item
134
+ provides:
135
+ - id
136
+ - title
137
+ - url
138
+ parameters:
139
+ - name: query
140
+ value_ref: nv_wire_str_short
141
+ required: true
142
+ role: search
143
+ - name: tags
144
+ value_ref: nv_wire_str_short
145
+ required: false
146
+ role: filter
147
+ - name: page
148
+ value_ref: nv_wire_int
149
+ required: false
150
+ role: response_control
151
+ - name: per_page
152
+ value_ref: nv_wire_int
153
+ required: false
154
+ role: response_control
155
+ item_search_by_date:
156
+ description: Same as item_search but sorted by time (search_by_date). Use for recency; combine with item_get for full.
157
+ items.
158
+ kind: search
159
+ entity: Item
160
+ provides:
161
+ - id
162
+ - title
163
+ - url
164
+ parameters:
165
+ - name: query
166
+ value_ref: nv_wire_str_short
167
+ required: true
168
+ role: search
169
+ - name: tags
170
+ value_ref: nv_wire_str_short
171
+ required: false
172
+ role: filter
173
+ - name: page
174
+ value_ref: nv_wire_int
175
+ required: false
176
+ role: response_control
177
+ - name: per_page
178
+ value_ref: nv_wire_int
179
+ required: false
180
+ role: response_control
181
+ item_feed_query:
182
+ description: Ordered list of item ids for a public feed (top, new, best, ask, show, or job). Each entry is an Item id only.
183
+ hydrate with item_get for full records and kids.
184
+ kind: query
185
+ entity: Item
186
+ provides:
187
+ - id
188
+ parameters:
189
+ - name: feed
190
+ value_ref: nv_item_feed_query_feed
191
+ required: true
192
+ role: filter
193
+ max_item_id_query:
194
+ description: Current largest item id (maxitem.json).
195
+ kind: query
196
+ entity: MaxItemId
197
+ provides:
198
+ - id
199
+ recent_updated_item_query:
200
+ description: Item ids from the live updates snapshot (updates.json items array).
201
+ kind: query
202
+ entity: RecentUpdatedItem
203
+ provides:
204
+ - id
205
+ recent_updated_user_query:
206
+ description: Usernames from the live updates snapshot (updates.json profiles array).
207
+ kind: query
208
+ entity: RecentUpdatedUser
209
+ provides:
210
+ - id
211
+ item_get:
212
+ kind: get
213
+ entity: Item
214
+ provides:
215
+ - id
216
+ - type
217
+ - by
218
+ - time
219
+ - title
220
+ - text
221
+ - url
222
+ - score
223
+ - descendants
224
+ - parent
225
+ - poll
226
+ - parts
227
+ - deleted
228
+ - dead
229
+ user_get:
230
+ description: Load a user profile by username.
231
+ kind: get
232
+ entity: User
233
+ provides:
234
+ - id
235
+ - created
236
+ - karma
237
+ - about
238
+ - delay
239
+ values:
240
+ nv_item_by:
241
+ type: string
242
+ string_semantics: short
243
+ description: Username of the author when present.
244
+ nv_item_dead:
245
+ type: boolean
246
+ description: Whether the item is dead.
247
+ nv_item_deleted:
248
+ type: boolean
249
+ description: Whether the item was deleted.
250
+ nv_item_descendants:
251
+ type: integer
252
+ description: Comment count for stories when known.
253
+ nv_item_feed_query_feed:
254
+ type: select
255
+ allowed_values:
256
+ - top
257
+ - new
258
+ - best
259
+ - ask
260
+ - show
261
+ - job
262
+ nv_item_id:
263
+ type: integer
264
+ description: Numeric item id used in Firebase paths.
265
+ nv_item_parent:
266
+ type: integer
267
+ description: Parent item id for comments and poll options.
268
+ nv_item_poll:
269
+ type: integer
270
+ description: Poll id when this item is a story that hosts a poll.
271
+ nv_item_score:
272
+ type: integer
273
+ description: Net votes for stories and jobs when present.
274
+ nv_item_text:
275
+ type: string
276
+ string_semantics: markdown
277
+ description: Comment or story text payload when present.
278
+ nv_item_time:
279
+ type: integer
280
+ description: Unix time the item was created.
281
+ nv_item_title:
282
+ type: string
283
+ string_semantics: short
284
+ description: Story or job title when applicable.
285
+ nv_item_type:
286
+ type: string
287
+ string_semantics: short
288
+ description: Wire kind such as story, comment, job, poll, or pollopt.
289
+ nv_item_url:
290
+ type: string
291
+ string_semantics: short
292
+ description: Outbound link for link posts when present.
293
+ nv_max_item_id_id:
294
+ type: integer
295
+ description: Largest item id currently allocated on HN.
296
+ nv_recent_updated_item_id:
297
+ type: integer
298
+ description: Item id from the live updates snapshot.
299
+ nv_recent_updated_user_id:
300
+ type: string
301
+ string_semantics: short
302
+ description: Username from the live updates snapshot.
303
+ nv_user_about:
304
+ type: string
305
+ string_semantics: markdown
306
+ description: Self-description text when set.
307
+ nv_user_created:
308
+ type: integer
309
+ description: Unix time the account was created.
310
+ nv_user_delay:
311
+ type: integer
312
+ description: Account delay setting when present.
313
+ nv_user_id:
314
+ type: string
315
+ string_semantics: short
316
+ description: Unique username.
317
+ nv_user_karma:
318
+ type: integer
319
+ description: User karma score.
320
+ nv_wire_int:
321
+ type: integer
322
+ nv_wire_str_short:
323
+ type: string
324
+ string_semantics: short
325
+ nv_item_parts:
326
+ type: array
327
+ items:
328
+ value_ref: nv_wire_int
329
+ description: Poll option item ids when type is poll (empty or absent otherwise).
@@ -0,0 +1,112 @@
1
+ # Hacker News — NL→Plasm eval cases (schema: hackernews)
2
+ - id: hn-01
3
+ schema: hackernews
4
+ goal: Top story id list from the front page feed
5
+ tags: [query, enum]
6
+ covers: [query_filtered]
7
+ expect:
8
+ entities_any: [Item]
9
+ pred_fields_any: [feed]
10
+ pred_values_any: [top]
11
+
12
+ - id: hn-02
13
+ schema: hackernews
14
+ goal: Newest story ids
15
+ tags: [query, enum]
16
+ covers: [query_filtered]
17
+ expect:
18
+ entities_any: [Item]
19
+ pred_fields_any: [feed]
20
+ pred_values_any: [new]
21
+
22
+ - id: hn-03
23
+ schema: hackernews
24
+ goal: Show HN category story ids
25
+ tags: [query, enum]
26
+ covers: [query_filtered]
27
+ expect:
28
+ entities_any: [Item]
29
+ pred_fields_any: [feed]
30
+ pred_values_any: [show]
31
+
32
+ - id: hn-04
33
+ schema: hackernews
34
+ goal: Fetch item 8863
35
+ tags: [get]
36
+ covers: [get]
37
+ expect:
38
+ entities_any: [Item]
39
+
40
+ - id: hn-05
41
+ schema: hackernews
42
+ goal: Load user jl
43
+ tags: [get]
44
+ covers: [get]
45
+ expect:
46
+ entities_any: [User]
47
+
48
+ - id: hn-06
49
+ schema: hackernews
50
+ goal: Item 1 and only its title field
51
+ tags: [get, projection]
52
+ covers: [get, projection]
53
+ expect:
54
+ entities_any: [Item]
55
+ projection_contains: [title]
56
+
57
+ - id: hn-07
58
+ schema: hackernews
59
+ goal: Story 8863 and expand its direct replies
60
+ tags: [chain]
61
+ covers: [chain]
62
+ expect:
63
+ entities_any: [Item]
64
+ chain_selectors_any: [kids]
65
+
66
+ - id: hn-08
67
+ schema: hackernews
68
+ goal: >-
69
+ Compare item 1 and user jl in one pass so both profiles are available for discussion.
70
+ tags: [multi_step]
71
+ covers: [multi_step]
72
+ expect:
73
+ entities_any: [Item, User]
74
+
75
+ - id: hn-09
76
+ schema: hackernews
77
+ goal: >-
78
+ Snapshot the live max item id, the recent item id slice from updates, and the recent
79
+ username slice from updates in one analysis pass.
80
+ tags: [query_all]
81
+ covers: [query_all]
82
+ expect:
83
+ entities_any: [MaxItemId, RecentUpdatedItem, RecentUpdatedUser]
84
+
85
+ - id: hn-10
86
+ schema: hackernews
87
+ goal: Poll item 126809 and list its poll option rows
88
+ tags: [chain]
89
+ covers: [chain]
90
+ expect:
91
+ entities_any: [Item]
92
+ chain_selectors_any: [poll_options]
93
+
94
+ - id: hn-11
95
+ schema: hackernews
96
+ goal: Search HN stories for “rust memory safety” and list matching item ids
97
+ tags: [search]
98
+ covers: [search_text]
99
+ expect:
100
+ entities_any: [Item]
101
+ pred_fields_any: [query]
102
+
103
+ - id: hn-12
104
+ schema: hackernews
105
+ goal: >-
106
+ Find HN stories mentioning “Show HN”, then load item 1 by id for the classic “Y Combinator”
107
+ post in one pass.
108
+ tags: [search, get, multi_step]
109
+ covers: [search_text, get, multi_step]
110
+ expect:
111
+ entities_any: [Item]
112
+ pred_fields_any: [query]
@@ -0,0 +1,129 @@
1
+ # Hacker News: Firebase v0 (https://github.com/HackerNews/API) plus the public
2
+ # Algolia HN search API (https://hn.algolia.com/api) — two origins, one CGS. Firebase paths are
3
+ # relative to http_backend; search uses a full https:// URL so plasm-runtime joins the absolute
4
+ # request URL without double-prefixing the catalog origin (see `join_base_url_path`).
5
+
6
+ item_search:
7
+ method: GET
8
+ path:
9
+ - type: literal
10
+ value: "https://hn.algolia.com/api/v1/search"
11
+ response:
12
+ items: hits
13
+ query:
14
+ type: object
15
+ fields:
16
+ - - query
17
+ - type: var
18
+ name: query
19
+ - - tags
20
+ - type: if
21
+ condition: { type: exists, var: tags }
22
+ then_expr: { type: var, name: tags }
23
+ else_expr: { type: const, value: "story" }
24
+ - - page
25
+ - type: if
26
+ condition: { type: exists, var: page }
27
+ then_expr: { type: var, name: page }
28
+ else_expr: { type: const, value: null }
29
+ - - hitsPerPage
30
+ - type: if
31
+ condition: { type: exists, var: per_page }
32
+ then_expr: { type: var, name: per_page }
33
+ else_expr: { type: const, value: null }
34
+
35
+ item_search_by_date:
36
+ method: GET
37
+ path:
38
+ - type: literal
39
+ value: "https://hn.algolia.com/api/v1/search_by_date"
40
+ response:
41
+ items: hits
42
+ query:
43
+ type: object
44
+ fields:
45
+ - - query
46
+ - type: var
47
+ name: query
48
+ - - tags
49
+ - type: if
50
+ condition: { type: exists, var: tags }
51
+ then_expr: { type: var, name: tags }
52
+ else_expr: { type: const, value: "story" }
53
+ - - page
54
+ - type: if
55
+ condition: { type: exists, var: page }
56
+ then_expr: { type: var, name: page }
57
+ else_expr: { type: const, value: null }
58
+ - - hitsPerPage
59
+ - type: if
60
+ condition: { type: exists, var: per_page }
61
+ then_expr: { type: var, name: per_page }
62
+ else_expr: { type: const, value: null }
63
+
64
+ item_feed_query:
65
+ method: GET
66
+ path:
67
+ - type: literal
68
+ value: v0
69
+ - type: var
70
+ name: feed
71
+ suffix: stories.json
72
+
73
+ max_item_id_query:
74
+ method: GET
75
+ path:
76
+ - type: literal
77
+ value: v0
78
+ - type: literal
79
+ value: maxitem.json
80
+ response:
81
+ wrap_root_scalar: true
82
+
83
+ recent_updated_item_query:
84
+ method: GET
85
+ path:
86
+ - type: literal
87
+ value: v0
88
+ - type: literal
89
+ value: updates.json
90
+ response:
91
+ items_path:
92
+ - items
93
+
94
+ recent_updated_user_query:
95
+ method: GET
96
+ path:
97
+ - type: literal
98
+ value: v0
99
+ - type: literal
100
+ value: updates.json
101
+ response:
102
+ items_path:
103
+ - profiles
104
+
105
+ item_get:
106
+ method: GET
107
+ response:
108
+ single: true
109
+ path:
110
+ - type: literal
111
+ value: v0
112
+ - type: literal
113
+ value: item
114
+ - type: var
115
+ name: id
116
+ suffix: .json
117
+
118
+ user_get:
119
+ method: GET
120
+ response:
121
+ single: true
122
+ path:
123
+ - type: literal
124
+ value: v0
125
+ - type: literal
126
+ value: user
127
+ - type: var
128
+ name: id
129
+ suffix: .json