radar-cli 0.1.0 → 0.2.0

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 (2) hide show
  1. package/dist/index.js +24 -2
  2. package/package.json +2 -1
package/dist/index.js CHANGED
@@ -12,7 +12,7 @@ var api = anyApi;
12
12
  var components = componentsGeneric();
13
13
 
14
14
  // src/convex-client.ts
15
- var DEFAULT_CONVEX_URL = "https://tough-bird-920.convex.cloud";
15
+ var DEFAULT_CONVEX_URL = "https://fine-vole-489.convex.cloud";
16
16
  var cachedClient = null;
17
17
  function getConvexClient() {
18
18
  if (cachedClient) return cachedClient;
@@ -182,10 +182,29 @@ import { parse } from "zod-matter";
182
182
 
183
183
  // src/schemas/frontmatter.ts
184
184
  import { z } from "zod";
185
+ var FILE_TYPES = [
186
+ "readme",
187
+ "sitemap",
188
+ "flow",
189
+ "script",
190
+ "selectors",
191
+ "api",
192
+ "guide"
193
+ ];
194
+ var SCRIPT_LANGUAGES = [
195
+ "playwright-ts",
196
+ "playwright-py",
197
+ "puppeteer",
198
+ "selenium-py",
199
+ "selenium-java",
200
+ "cypress",
201
+ "other"
202
+ ];
185
203
  var knowledgeFrontmatterSchema = z.object({
186
204
  title: z.string(),
187
205
  domain: z.string(),
188
206
  path: z.string(),
207
+ type: z.enum(FILE_TYPES),
189
208
  summary: z.string().max(300),
190
209
  tags: z.array(z.string()),
191
210
  entities: z.object({
@@ -199,6 +218,7 @@ var knowledgeFrontmatterSchema = z.object({
199
218
  }),
200
219
  confidence: z.enum(["low", "medium", "high"]),
201
220
  requires_auth: z.boolean(),
221
+ script_language: z.enum(SCRIPT_LANGUAGES).optional(),
202
222
  selectors_count: z.number().int().min(0).optional(),
203
223
  related_files: z.array(z.string()).default([]),
204
224
  version: z.number().int().positive(),
@@ -248,6 +268,7 @@ Ensure the markdown has valid YAML frontmatter matching the knowledge file schem
248
268
  const result = await client.mutation(api.files.submit, {
249
269
  domain: fm.domain,
250
270
  path: fm.path,
271
+ type: fm.type,
251
272
  title: fm.title,
252
273
  summary: fm.summary,
253
274
  tags: fm.tags,
@@ -262,6 +283,7 @@ Ensure the markdown has valid YAML frontmatter matching the knowledge file schem
262
283
  },
263
284
  confidence: fm.confidence,
264
285
  requiresAuth: fm.requires_auth,
286
+ scriptLanguage: fm.script_language,
265
287
  selectorsCount: fm.selectors_count,
266
288
  relatedFiles: fm.related_files,
267
289
  content: body.trim(),
@@ -319,7 +341,7 @@ The Browser Use agent will explore the site and generate knowledge files. Check
319
341
 
320
342
  // src/index.ts
321
343
  var program = new Command();
322
- program.name("radar").description(
344
+ program.name("radar-cli").description(
323
345
  "Radar CLI \u2014 query and contribute to the shared knowledge base for web agents"
324
346
  ).version("0.1.0");
325
347
  registerContext(program);
package/package.json CHANGED
@@ -1,9 +1,10 @@
1
1
  {
2
2
  "name": "radar-cli",
3
- "version": "0.1.0",
3
+ "version": "0.2.0",
4
4
  "description": "CLI for Radar — the shared knowledge base for web agents",
5
5
  "type": "module",
6
6
  "bin": {
7
+ "radar-cli": "./dist/index.js",
7
8
  "radar": "./dist/index.js"
8
9
  },
9
10
  "files": [