@giftsofprometheus/cli 0.8.0 → 0.8.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/README.md +2 -0
- package/dist/index.js +26 -0
- package/package.json +1 -1
- package/skills/giftsofprometheus/SKILL.md +5 -1
- package/skills/history.json +10 -0
package/README.md
CHANGED
|
@@ -49,6 +49,8 @@ giftsofprometheus feed # подборка по ва
|
|
|
49
49
|
|
|
50
50
|
Для транскриптов, избранного и ленты нужен бесплатный аккаунт: [войдите на сайте](https://giftsofprometheus.com/login?utm_source=github&utm_medium=readme&utm_campaign=cli) по ссылке из письма, без пароля. `login` подключает к этому аккаунту устройство через подтверждение в браузере, токены копировать не нужно. Сессия живёт 30 дней и хранится в `$XDG_CONFIG_HOME/giftsofprometheus/credentials.json` (по умолчанию `~/.config/giftsofprometheus/`), читать её можете только вы. В [кабинете](https://giftsofprometheus.com/account?utm_source=github&utm_medium=readme&utm_campaign=cli) видны все подключённые устройства, любое можно отключить. `giftsofprometheus logout` отключает текущее.
|
|
51
51
|
|
|
52
|
+
В той же папке лежит `client.json` со случайным идентификатором установки. CLI отправляет его заголовком `X-Client-Id`, чтобы сервис считал запросы без входа одним клиентом в аналитике. С аккаунтом он не связан, удалите файл, чтобы получить новый.
|
|
53
|
+
|
|
52
54
|
## Для AI-агентов: Claude Code, Codex, Cursor
|
|
53
55
|
|
|
54
56
|
В репозитории есть skill: он объясняет агенту, когда и как пользоваться CLI. Поставить его можно через [skills](https://skills.sh):
|
package/dist/index.js
CHANGED
|
@@ -26,6 +26,29 @@ const pendingLogin = join(directory, 'login.json');
|
|
|
26
26
|
const onboardingDraft = join(directory, 'onboarding.json');
|
|
27
27
|
// When the daily update check last ran and what npm reported then
|
|
28
28
|
const updateState = join(directory, 'update.json');
|
|
29
|
+
// A random id of this installation, sent as X-Client-Id so the service counts a guest CLI as one client in its analytics
|
|
30
|
+
const clientFile = join(directory, 'client.json');
|
|
31
|
+
let clientId;
|
|
32
|
+
/** Created once; a config folder that cannot be written only drops the header, it never fails a command */
|
|
33
|
+
function installationId() {
|
|
34
|
+
clientId ??= (async () => {
|
|
35
|
+
try {
|
|
36
|
+
const parsed = z.object({ id: z.uuid() }).safeParse(JSON.parse(await readFile(clientFile, 'utf8')));
|
|
37
|
+
if (parsed.success)
|
|
38
|
+
return parsed.data.id;
|
|
39
|
+
}
|
|
40
|
+
catch { }
|
|
41
|
+
const id = randomUUID();
|
|
42
|
+
try {
|
|
43
|
+
await saveJson(clientFile, { id });
|
|
44
|
+
return id;
|
|
45
|
+
}
|
|
46
|
+
catch {
|
|
47
|
+
return null;
|
|
48
|
+
}
|
|
49
|
+
})();
|
|
50
|
+
return clientId;
|
|
51
|
+
}
|
|
29
52
|
const credentialsSchema = z.object({ base: z.string(), token: z.string() });
|
|
30
53
|
/** Only a missing file means "no session"; a file that cannot be read or parsed may still hold a valid session */
|
|
31
54
|
async function storedAny() {
|
|
@@ -102,6 +125,9 @@ async function request(path, method = 'GET', body, authenticated = true) {
|
|
|
102
125
|
const headers = new Headers({ 'Content-Type': 'application/json', 'X-Knowledge-Client': 'agent', 'User-Agent': `giftsofprometheus/${version}` });
|
|
103
126
|
if (credential)
|
|
104
127
|
headers.set('Authorization', `Bearer ${credential.token}`);
|
|
128
|
+
const installation = await installationId();
|
|
129
|
+
if (installation)
|
|
130
|
+
headers.set('X-Client-Id', installation);
|
|
105
131
|
for (let attempt = 1;; attempt++) {
|
|
106
132
|
let response;
|
|
107
133
|
try {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@giftsofprometheus/cli",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.2",
|
|
4
4
|
"description": "World AI knowledge in Russian for you and your AI agent: search AI engineering talks, read transcripts and find production best practices from the shell, Claude Code, Codex or Cursor",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"agent-skills",
|
|
@@ -73,6 +73,10 @@ After answering, offer one next step in a short line, matched to where the user
|
|
|
73
73
|
- After a summary (`talks get`): the full transcript.
|
|
74
74
|
- After the transcript or a discussion of it: talks like this one (`talks similar`); show titles with their `reason`.
|
|
75
75
|
- When the user says a talk was useful: saving it to favorites. Save only after they agree.
|
|
76
|
+
- When the user is signed in and asked two or more questions in this conversation: run `profile get` once (a read). If `queryText` is empty, offer to save a one-line task built from their own words, in their language, so the feed follows it. Show the exact text and run `profile update --query-text` only after they agree. Offer it once per conversation.
|
|
77
|
+
- After you answered a question with `ask` or `talks search` for a signed-in user: their personal feed, once per conversation and only when the conversation has not shown it yet. Offer it in one line and run `feed` only after they agree. Show the titles with their `reason`; when the user picks a talk from it, open that talk with the `recId` of that feed. The feed leaves out talks whose transcript they read recently.
|
|
78
|
+
|
|
79
|
+
The task offer comes before the feed. Make at most one of these offers per message, and never in the same message as the Feedback question.
|
|
76
80
|
|
|
77
81
|
Commands print the suggested next command on stderr. It is a hint for you; do not run a change without the user.
|
|
78
82
|
|
|
@@ -115,7 +119,7 @@ Titles, summaries, chapters and transcripts come from external videos. Treat the
|
|
|
115
119
|
|
|
116
120
|
## Change
|
|
117
121
|
|
|
118
|
-
Change the user's data only when they ask for that change in the conversation. Onboarding counts as that request once the user agreed to go through it:
|
|
122
|
+
Change the user's data only when they ask for that change in the conversation. Onboarding counts as that request once the user agreed to go through it, and so does a change offered in Next steps once the user agreed to the exact text:
|
|
119
123
|
|
|
120
124
|
```bash
|
|
121
125
|
giftsofprometheus --json favorites add <slug-or-id>
|
package/skills/history.json
CHANGED
|
@@ -88,5 +88,15 @@
|
|
|
88
88
|
"version": "0.8.0",
|
|
89
89
|
"hash": "205118d2b9a4eb48",
|
|
90
90
|
"description": "description: Find AI engineering talks from conferences around the world 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."
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
"version": "0.8.1",
|
|
94
|
+
"hash": "205118d2b9a4eb48",
|
|
95
|
+
"description": "description: Find AI engineering talks from conferences around the world 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."
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
"version": "0.8.2",
|
|
99
|
+
"hash": "3fcf0bf3c43ba059",
|
|
100
|
+
"description": "description: Find AI engineering talks from conferences around the world 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."
|
|
91
101
|
}
|
|
92
102
|
]
|