prior-cli 1.1.0 → 1.1.2

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/bin/prior.js CHANGED
@@ -538,7 +538,7 @@ async function startChat(opts = {}) {
538
538
  banner();
539
539
  console.log(DIVIDER);
540
540
  console.log(c.brand(' Prior AI') + c.muted(' · ') + c.muted(`@${user}`));
541
- if (agentMode) console.log(c.ok(' ◉') + c.muted(' Agent mode'));
541
+ console.log(c.ok(' ◉') + c.muted(' Agent mode ') + c.dim('· file web shell image prior-network'));
542
542
  console.log(DIVIDER);
543
543
  console.log('');
544
544
  return loop();
package/lib/tools.js CHANGED
@@ -160,13 +160,15 @@ const TOOLS = {
160
160
  };
161
161
  },
162
162
 
163
- async web_search({ query }) {
163
+ async web_search({ query }, { token }) {
164
164
  if (!query) throw new Error('"query" is required');
165
- const GOOGLE_API_KEY = 'AIzaSyBqXIej44zdtIxCqmWGqx2Ge7g2kMkSm50';
166
- const SEARCH_ENGINE_ID = '84085043e8c9a44cb';
167
- const url = `https://www.googleapis.com/customsearch/v1?key=${GOOGLE_API_KEY}&cx=${SEARCH_ENGINE_ID}&q=${encodeURIComponent(query)}&num=6`;
168
- const res = await fetch(url, { timeout: 15000 });
169
- if (!res.ok) throw new Error(`Google Search API error: HTTP ${res.status}`);
165
+ const res = await fetch(`${CLI_BASE}/api/web-search`, {
166
+ method: 'POST',
167
+ headers: { 'Content-Type': 'application/json', Authorization: `Bearer ${token}` },
168
+ body: JSON.stringify({ query }),
169
+ timeout: 15000,
170
+ });
171
+ if (!res.ok) throw new Error(`Web search error: HTTP ${res.status}`);
170
172
  const data = await res.json();
171
173
  if (!data.items || !data.items.length) return { output: 'No results found.', summary: '0 results' };
172
174
  const results = data.items.map(item => {
@@ -260,7 +262,7 @@ const TOOLS = {
260
262
  },
261
263
 
262
264
  async prior_feed({}, { token }) {
263
- const res = await fetch(`${PRIOR_BASE}/network/api/posts`, {
265
+ const res = await fetch(`${PRIOR_BASE}/network/api/feed`, {
264
266
  headers: token ? { Authorization: `Bearer ${token}` } : {},
265
267
  timeout: 8000,
266
268
  });
@@ -279,7 +281,7 @@ const TOOLS = {
279
281
  },
280
282
 
281
283
  async prior_profile({}, { token }) {
282
- const res = await fetch(`${PRIOR_BASE}/network/api/profile`, {
284
+ const res = await fetch(`${PRIOR_BASE}/network/api/user/profile`, {
283
285
  headers: token ? { Authorization: `Bearer ${token}` } : {},
284
286
  timeout: 8000,
285
287
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "prior-cli",
3
- "version": "1.1.0",
3
+ "version": "1.1.2",
4
4
  "description": "Prior Network AI — command-line interface",
5
5
  "bin": {
6
6
  "prior": "bin/prior.js"