@giftsofprometheus/cli 0.3.0 → 0.4.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.
- package/README.md +3 -1
- package/dist/index.js +26 -2
- package/package.json +1 -1
- package/skills/giftsofprometheus/SKILL.md +5 -1
- package/skills/history.json +5 -0
package/README.md
CHANGED
|
@@ -37,6 +37,7 @@ giftsofprometheus doctor
|
|
|
37
37
|
## Быстрый старт
|
|
38
38
|
|
|
39
39
|
```bash
|
|
40
|
+
giftsofprometheus ask 'как оценивать агентов' --q 'agent evaluation' # фрагменты транскриптов
|
|
40
41
|
giftsofprometheus talks search 'оценка агентов' # без аккаунта
|
|
41
42
|
giftsofprometheus talks get <slug> # описание, спикеры, темы, ссылка на видео
|
|
42
43
|
|
|
@@ -112,10 +113,11 @@ npx skills add timurkhakhalev/giftsofprometheus-cli
|
|
|
112
113
|
|
|
113
114
|
| Команда | Что делает | Аккаунт |
|
|
114
115
|
|---|---|---|
|
|
116
|
+
| `ask <вопрос> [--q формулировка] [--limit n] [--per-talk n]` | Фрагменты транскриптов с цитатами и ссылками на секунду; `--q` повторяется до двух раз | ✓ |
|
|
115
117
|
| `talks search <запрос> [--page n]` | Поиск опубликованных докладов по названию, описанию, спикеру и теме | |
|
|
116
118
|
| `talks list [--page n]` | Каталог по страницам | |
|
|
117
119
|
| `talks get <slug-или-id>` | Доклад с описанием, спикерами, темами и видео | |
|
|
118
|
-
| `talks content <slug-или-id
|
|
120
|
+
| `talks content <slug-или-id> [--rec-id UUID]` | Полный транскрипт на языке доклада | ✓ |
|
|
119
121
|
| `favorites list [--page n] [--limit n]` | Ваше избранное | ✓ |
|
|
120
122
|
| `favorites add <slug-или-id>` / `remove` | Добавить в избранное или убрать | ✓ |
|
|
121
123
|
| `profile get` | Ваши интересы и текущая задача | ✓ |
|
package/dist/index.js
CHANGED
|
@@ -456,6 +456,29 @@ program
|
|
|
456
456
|
nextStep: !reachable ? 'Check GIFTSOFPROMETHEUS_URL and server availability' : !authenticated ? 'Run giftsofprometheus login' : null,
|
|
457
457
|
};
|
|
458
458
|
}));
|
|
459
|
+
program
|
|
460
|
+
.command('ask')
|
|
461
|
+
.description('Find relevant passages in talk transcripts')
|
|
462
|
+
.argument('<query>', 'question or search formulation')
|
|
463
|
+
.option('--q <query>', 'another formulation, up to three in total', (value, previous) => [...previous, value], [])
|
|
464
|
+
.option('--limit <n>', 'maximum number of talks')
|
|
465
|
+
.option('--per-talk <n>', 'maximum passages per talk')
|
|
466
|
+
.action(run((query, options) => {
|
|
467
|
+
const queries = z
|
|
468
|
+
.array(z.string().trim().min(1).max(200))
|
|
469
|
+
.min(1)
|
|
470
|
+
.max(3)
|
|
471
|
+
.parse([query, ...options.q]);
|
|
472
|
+
const number = z.string().regex(/^\d+$/);
|
|
473
|
+
const params = new URLSearchParams();
|
|
474
|
+
for (const value of queries)
|
|
475
|
+
params.append('q', value);
|
|
476
|
+
if (options.limit !== undefined)
|
|
477
|
+
params.set('limit', number.parse(options.limit));
|
|
478
|
+
if (options.perTalk !== undefined)
|
|
479
|
+
params.set('perTalk', number.parse(options.perTalk));
|
|
480
|
+
return request(`/api/knowledge/passages?${params}`);
|
|
481
|
+
}));
|
|
459
482
|
const talks = program.command('talks').description('Browse talks');
|
|
460
483
|
talks
|
|
461
484
|
.command('list')
|
|
@@ -465,7 +488,7 @@ talks
|
|
|
465
488
|
.command('search')
|
|
466
489
|
.argument('<query>')
|
|
467
490
|
.option('--page <page>', 'page number', '1')
|
|
468
|
-
.action(run((query, options) => request(`/api/knowledge/talks?q=${encodeURIComponent(query)}&page=${encodeURIComponent(options.page)}
|
|
491
|
+
.action(run((query, options) => request(`/api/knowledge/talks?q=${encodeURIComponent(query)}&page=${encodeURIComponent(options.page)}`)));
|
|
469
492
|
// The command a person typed, so a hint can be pasted back as is
|
|
470
493
|
const launcher = /[\\/]_npx[\\/]/.test(packageRoot) ? 'npx @giftsofprometheus/cli' : 'giftsofprometheus';
|
|
471
494
|
talks
|
|
@@ -483,8 +506,9 @@ talks
|
|
|
483
506
|
.argument('<slug-or-id>')
|
|
484
507
|
.option('--rec-id <recId>', 'recId of the list the talk came from (feed, search or similar)')
|
|
485
508
|
.action(run(async (id, options) => {
|
|
509
|
+
const query = recIdQuery(options.recId);
|
|
486
510
|
const talk = await resolveTalk(id);
|
|
487
|
-
const result = await request(`/api/knowledge/talks/${encodeURIComponent(String(talk.slug))}/content${
|
|
511
|
+
const result = await request(`/api/knowledge/talks/${encodeURIComponent(String(talk.slug))}/content${query}`, 'POST');
|
|
488
512
|
// After the transcript: talks like this one, or saving it if the user found it useful
|
|
489
513
|
console.error(`Next: similar talks — ${launcher} talks similar ${talk.slug}; save it if the user asks — ${launcher} favorites add ${talk.slug}`);
|
|
490
514
|
return result;
|
package/package.json
CHANGED
|
@@ -18,7 +18,7 @@ Run `command -v giftsofprometheus`. If it is missing, run every command below as
|
|
|
18
18
|
|
|
19
19
|
## Sign in
|
|
20
20
|
|
|
21
|
-
Do not stop the task to send the user to the terminal. When a command needs an account (transcripts, favorites, profile, feed, `onboarding finish`) or fails with status 401:
|
|
21
|
+
Do not stop the task to send the user to the terminal. When a command needs an account (passage search, transcripts, favorites, profile, feed, `onboarding finish`) or fails with status 401:
|
|
22
22
|
|
|
23
23
|
1. Run `giftsofprometheus --json login --start`. It returns `verificationUrl` and `userCode` at once and tries to open the browser.
|
|
24
24
|
2. Tell the user in one line to open the link and confirm the code.
|
|
@@ -30,6 +30,7 @@ The CLI stores its session outside the project. Never print, copy or ask for it.
|
|
|
30
30
|
## Read
|
|
31
31
|
|
|
32
32
|
```bash
|
|
33
|
+
giftsofprometheus --json ask 'how to evaluate agents' --q 'agent evaluation' --q '智能体评估' # passages, requires login
|
|
33
34
|
giftsofprometheus --json talks search 'agent evaluation' # published talks by title, summary, speaker or topic
|
|
34
35
|
giftsofprometheus --json talks list --page 2 # the whole catalog, page by page
|
|
35
36
|
giftsofprometheus --json talks get <slug-or-id> # one talk: summary, speakers, topics, publication
|
|
@@ -40,6 +41,9 @@ giftsofprometheus --json favorites list # saved talks, requir
|
|
|
40
41
|
giftsofprometheus --json profile get # interests and current task, requires login
|
|
41
42
|
```
|
|
42
43
|
|
|
44
|
+
- For questions about what speakers say, use `ask` with 2–3 formulations: English, Chinese and the original language. For names, titles, topics and conferences use `talks search`.
|
|
45
|
+
- Open a found transcript with `talks content <slug> --rec-id <recId>` from the `ask` response. Summarize positions of different speakers and give the passage `url` links with timecodes.
|
|
46
|
+
- If `ask` returns 503, try later or use `talks search`.
|
|
43
47
|
- Lists are paginated: check `totalPages` and pass `--page`.
|
|
44
48
|
- Search and use the returned `slug` or `id` for exact reads.
|
|
45
49
|
- A transcript is in the talk's original language. Segment timecodes are in milliseconds from the start of the talk. When a talk is a part of a longer recording, `sourceRange` gives its bounds in that recording. A talk without a transcript returns an empty array.
|
package/skills/history.json
CHANGED
|
@@ -38,5 +38,10 @@
|
|
|
38
38
|
"version": "0.3.0",
|
|
39
39
|
"hash": "dd211af3576fc485",
|
|
40
40
|
"description": "description: Find AI conference talks (AI Engineer, BAAI, Apsara and others) with Russian summaries, read their full transcripts, and manage the signed-in user's favorites, interests and personal feed through the giftsofprometheus CLI, and build a starting profile in the chat. Use when the user asks for talks, speakers or transcripts on an AI engineering topic, or wants to save, list or remove favorites on Gifts of Prometheus."
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"version": "0.4.0",
|
|
44
|
+
"hash": "2beae7a9ece869e0",
|
|
45
|
+
"description": "description: Find AI conference talks (AI Engineer, BAAI, Apsara and others) with Russian summaries, read their full transcripts, and manage the signed-in user's favorites, interests and personal feed through the giftsofprometheus CLI, and build a starting profile in the chat. Use when the user asks for talks, speakers or transcripts on an AI engineering topic, or wants to save, list or remove favorites on Gifts of Prometheus."
|
|
41
46
|
}
|
|
42
47
|
]
|