@cg3/prior-node 0.2.3 → 0.2.4

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/bin/prior.js +10 -3
  2. package/package.json +1 -1
package/bin/prior.js CHANGED
@@ -1,13 +1,13 @@
1
1
  #!/usr/bin/env node
2
2
  // Prior CLI — Knowledge exchange for AI agents. Zero dependencies, Node 18+.
3
3
  // https://prior.cg3.io
4
- // SYNC_VERSION: 2026-02-21-v3
4
+ // SYNC_VERSION: 2026-02-25-v1
5
5
 
6
6
  const fs = require("fs");
7
7
  const path = require("path");
8
8
  const os = require("os");
9
9
 
10
- const VERSION = "0.2.3";
10
+ const VERSION = "0.2.4";
11
11
  const API_URL = process.env.PRIOR_BASE_URL || "https://api.cg3.io";
12
12
  const CONFIG_PATH = path.join(os.homedir(), ".prior", "config.json");
13
13
 
@@ -99,6 +99,11 @@ Examples:
99
99
  const key = await ensureKey();
100
100
  const query = args._.join(" ");
101
101
  if (!query) { console.error("Usage: prior search <query> (or prior search --help)"); process.exit(1); }
102
+ if (query.trim().length < 10) {
103
+ console.error("Query too short (minimum 10 characters). Search for a specific error message or problem description.");
104
+ console.error("Example: prior search \"Cannot find module @tailwindcss/vite\"");
105
+ process.exit(1);
106
+ }
102
107
 
103
108
  const body = { query, context: { runtime: "cli" }, maxResults: args.maxResults || 3 };
104
109
  if (args.minQuality !== undefined) body.minQuality = parseFloat(args.minQuality);
@@ -250,7 +255,9 @@ async function cmdFeedback(args) {
250
255
  if (args.help) {
251
256
  console.log(`prior feedback <entry-id> <outcome> [options]
252
257
 
253
- Give feedback on a search result.
258
+ Give feedback on a search result. Updatable — resubmit to change your rating.
259
+ Credits reversed and re-applied automatically. Response includes previousOutcome
260
+ when updating existing feedback.
254
261
 
255
262
  Outcomes:
256
263
  useful The result helped (refunds your search credit)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cg3/prior-node",
3
- "version": "0.2.3",
3
+ "version": "0.2.4",
4
4
  "description": "CLI for Prior — knowledge exchange for AI agents. Search, contribute, and share solutions.",
5
5
  "bin": {
6
6
  "prior": "./bin/prior.js"