ghcrawl 0.7.1 → 0.8.0-beta.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 +102 -22
- package/bin/ghcrawl.js +8 -5
- package/dist/init-wizard.d.ts +2 -0
- package/dist/init-wizard.d.ts.map +1 -1
- package/dist/init-wizard.js +9 -3
- package/dist/init-wizard.js.map +1 -1
- package/dist/main.d.ts +34 -4
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +675 -180
- package/dist/main.js.map +1 -1
- package/dist/tui/app.d.ts +1 -0
- package/dist/tui/app.d.ts.map +1 -1
- package/dist/tui/app.js +47 -12
- package/dist/tui/app.js.map +1 -1
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -36,6 +36,7 @@ GitHub is required to crawl issue and PR data. OpenAI is required for embeddings
|
|
|
36
36
|
|
|
37
37
|
```bash
|
|
38
38
|
ghcrawl init
|
|
39
|
+
ghcrawl configure
|
|
39
40
|
ghcrawl doctor
|
|
40
41
|
ghcrawl refresh owner/repo
|
|
41
42
|
ghcrawl tui owner/repo
|
|
@@ -46,11 +47,33 @@ ghcrawl tui owner/repo
|
|
|
46
47
|
- save plaintext keys in `~/.config/ghcrawl/config.json`
|
|
47
48
|
- or guide you through a 1Password CLI (`op`) setup that keeps keys out of the config file
|
|
48
49
|
|
|
49
|
-
`ghcrawl refresh owner/repo` is the main pipeline command. It pulls the latest open GitHub issues and pull requests,
|
|
50
|
+
`ghcrawl refresh owner/repo` is the main pipeline command. It pulls the latest open GitHub issues and pull requests, summarizes changed items only when the active embedding basis depends on summaries, refreshes vectors, and rebuilds the clusters you browse in the TUI.
|
|
51
|
+
|
|
52
|
+
## One-Time Migration
|
|
53
|
+
|
|
54
|
+
Upgrading to this release changes the local vector and cluster pipeline:
|
|
55
|
+
|
|
56
|
+
- vectors now use a persistent `vectorlite` sidecar index
|
|
57
|
+
- the active vector is one vector per open thread
|
|
58
|
+
- old multi-row `document_embeddings` are removed after the first successful rebuild
|
|
59
|
+
|
|
60
|
+
For an existing repo, the one-time migration command is:
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
ghcrawl refresh owner/repo
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
Important notes:
|
|
67
|
+
|
|
68
|
+
- `refresh` performs the migration; plain `sync` does not
|
|
69
|
+
- with the default `title_original` basis, the migration rebuilds vectors and clusters without running LLM summaries
|
|
70
|
+
- if you switch to `title_summary`, `refresh` also runs the summarize step before embedding
|
|
71
|
+
- after the first successful migration refresh, ghcrawl removes legacy embeddings, compacts the local DB, and rebuilds clusters from the current vectors
|
|
50
72
|
|
|
51
73
|
## Typical Commands
|
|
52
74
|
|
|
53
75
|
```bash
|
|
76
|
+
ghcrawl configure
|
|
54
77
|
ghcrawl doctor
|
|
55
78
|
ghcrawl refresh owner/repo
|
|
56
79
|
ghcrawl tui owner/repo
|
|
@@ -58,10 +81,37 @@ ghcrawl tui owner/repo
|
|
|
58
81
|
|
|
59
82
|
`refresh`, `sync`, and `embed` call remote services and should be run intentionally.
|
|
60
83
|
|
|
61
|
-
`cluster` does not call remote services, but it is still time consuming.
|
|
84
|
+
`cluster` does not call remote services, but it is still time consuming. It now uses a persistent `vectorlite` index instead of exact in-memory scans, so large-repo rebuilds are materially faster, but still not instant.
|
|
62
85
|
|
|
63
86
|
`clusters` explores the clusters already stored in the local SQLite database and is expected to be the fast, read-only inspection path.
|
|
64
87
|
|
|
88
|
+
## CLI Help And Machine Output
|
|
89
|
+
|
|
90
|
+
Every public command now supports both:
|
|
91
|
+
|
|
92
|
+
```bash
|
|
93
|
+
ghcrawl help refresh
|
|
94
|
+
ghcrawl refresh --help
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
For agent-facing and script-facing commands, prefer explicit machine mode:
|
|
98
|
+
|
|
99
|
+
```bash
|
|
100
|
+
ghcrawl configure --json
|
|
101
|
+
ghcrawl doctor --json
|
|
102
|
+
ghcrawl threads owner/repo --numbers 42,43,44 --json
|
|
103
|
+
ghcrawl clusters owner/repo --min-size 10 --limit 20 --sort recent --json
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
Contract notes:
|
|
107
|
+
|
|
108
|
+
- `doctor` keeps a human-readable TTY default unless you pass `--json`
|
|
109
|
+
- JSON-oriented commands accept `--json` explicitly; current JSON-by-default behavior is still available as a compatibility path
|
|
110
|
+
- machine payloads are written to `stdout`
|
|
111
|
+
- progress logs and error messages are written to `stderr`
|
|
112
|
+
- use `--config-path <path>` to force a specific persisted config file
|
|
113
|
+
- use `--workspace-root <path>` to force `.env.local` and workspace-local DB discovery
|
|
114
|
+
|
|
65
115
|
### Refresh Command Example
|
|
66
116
|
|
|
67
117
|
```bash
|
|
@@ -94,11 +144,12 @@ If you need tighter control, you can run the three stages yourself:
|
|
|
94
144
|
|
|
95
145
|
```bash
|
|
96
146
|
ghcrawl sync owner/repo # pull the latest open issues and pull requests from GitHub
|
|
97
|
-
ghcrawl
|
|
147
|
+
ghcrawl summarize owner/repo # optional explicit summary refresh when using title_summary
|
|
148
|
+
ghcrawl embed owner/repo # generate or refresh the single active vector per thread
|
|
98
149
|
ghcrawl cluster owner/repo # rebuild local related-work clusters from the current vectors (local-only, but can take ~10 minutes on a ~12k issue/PR repo)
|
|
99
150
|
```
|
|
100
151
|
|
|
101
|
-
Run them in that order. `refresh`
|
|
152
|
+
Run them in that order. If your embedding basis is `title_summary`, `refresh` automatically inserts the summarize stage before embed for you. With the default `title_original` basis, `refresh` does not summarize unless you run `summarize` explicitly.
|
|
102
153
|
|
|
103
154
|
## Init And Doctor
|
|
104
155
|
|
|
@@ -134,8 +185,29 @@ GitHub token guidance:
|
|
|
134
185
|
- local DB path wiring
|
|
135
186
|
- GitHub token presence, token-shape validation, and a live auth smoke check
|
|
136
187
|
- OpenAI key presence, key-shape validation, and a live auth smoke check
|
|
188
|
+
- `vectorlite` runtime readiness
|
|
137
189
|
- if init is configured for 1Password CLI but you forgot to run through your `op` wrapper, doctor tells you that explicitly
|
|
138
190
|
|
|
191
|
+
## Configure
|
|
192
|
+
|
|
193
|
+
Use `configure` to inspect or change the active summary model and embedding basis:
|
|
194
|
+
|
|
195
|
+
```bash
|
|
196
|
+
ghcrawl configure
|
|
197
|
+
ghcrawl configure --summary-model gpt-5.4-mini
|
|
198
|
+
ghcrawl configure --embedding-basis title_original
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
Current defaults:
|
|
202
|
+
|
|
203
|
+
- summary model: `gpt-5-mini`
|
|
204
|
+
- embedding basis: `title_original` (`title + original body`)
|
|
205
|
+
- vector backend: `vectorlite`
|
|
206
|
+
|
|
207
|
+
Changing the summary model or embedding basis makes the next `refresh` rebuild vectors and clusters for that repo.
|
|
208
|
+
|
|
209
|
+
If you opt into `title_summary`, ghcrawl summarizes before embedding and uses `title + dedupe summary` as the active vector text. On `openclaw/openclaw`, that improved non-solo cluster membership by about 50% versus `title_original`, but it adds OpenAI spend. A first summarize of roughly `18k` open issues and PRs in that repo typically costs about `$15-$30` with `gpt-5-mini`; later refreshes are usually much cheaper because only changed items need summaries.
|
|
210
|
+
|
|
139
211
|
### 1Password CLI Example
|
|
140
212
|
|
|
141
213
|
If you choose 1Password CLI mode, create a 1Password Secure Note with concealed fields named exactly:
|
|
@@ -166,16 +238,16 @@ ghcrawl-op tui owner/repo
|
|
|
166
238
|
These commands are intended more for scripts, bots, and agent integrations than for normal day-to-day terminal browsing:
|
|
167
239
|
|
|
168
240
|
```bash
|
|
169
|
-
ghcrawl threads owner/repo --numbers 42,43,44
|
|
170
|
-
ghcrawl threads owner/repo --numbers 42,43,44 --include-closed
|
|
171
|
-
ghcrawl author owner/repo --login lqquan
|
|
172
|
-
ghcrawl close-thread owner/repo --number 42
|
|
173
|
-
ghcrawl close-cluster owner/repo --id 123
|
|
174
|
-
ghcrawl clusters owner/repo --min-size 10 --limit 20
|
|
175
|
-
ghcrawl clusters owner/repo --min-size 10 --limit 20 --include-closed
|
|
176
|
-
ghcrawl cluster-detail owner/repo --id 123
|
|
177
|
-
ghcrawl cluster-detail owner/repo --id 123 --include-closed
|
|
178
|
-
ghcrawl search owner/repo --query "download stalls"
|
|
241
|
+
ghcrawl threads owner/repo --numbers 42,43,44 --json
|
|
242
|
+
ghcrawl threads owner/repo --numbers 42,43,44 --include-closed --json
|
|
243
|
+
ghcrawl author owner/repo --login lqquan --json
|
|
244
|
+
ghcrawl close-thread owner/repo --number 42 --json
|
|
245
|
+
ghcrawl close-cluster owner/repo --id 123 --json
|
|
246
|
+
ghcrawl clusters owner/repo --min-size 10 --limit 20 --json
|
|
247
|
+
ghcrawl clusters owner/repo --min-size 10 --limit 20 --include-closed --json
|
|
248
|
+
ghcrawl cluster-detail owner/repo --id 123 --json
|
|
249
|
+
ghcrawl cluster-detail owner/repo --id 123 --include-closed --json
|
|
250
|
+
ghcrawl search owner/repo --query "download stalls" --json
|
|
179
251
|
```
|
|
180
252
|
|
|
181
253
|
Use `threads --numbers ...` when you want several specific issue or PR records in one CLI call instead of paying process startup overhead repeatedly.
|
|
@@ -190,10 +262,17 @@ Use `close-cluster` when you want to locally suppress a whole cluster from defau
|
|
|
190
262
|
|
|
191
263
|
## Cost To Operate
|
|
192
264
|
|
|
193
|
-
The main variable
|
|
265
|
+
The main variable costs are summarization and embeddings. Embedding pricing is published by OpenAI here: [OpenAI API pricing](https://developers.openai.com/api/docs/pricing#embeddings).
|
|
194
266
|
|
|
195
267
|
On a real local run against roughly `12k` issues plus about `1.2x` related PR and issue inputs, [`text-embedding-3-large`](https://developers.openai.com/api/docs/pricing#embeddings) came out to about **$0.65 USD** total to embed the repo. Treat that as an approximate data point for something like `~14k` issue and PR inputs, not a hard guarantee.
|
|
196
268
|
|
|
269
|
+
For one-time summary migration planning on a repo around the size of `openclaw/openclaw` (`~20k` issues and PRs), `ghcrawl configure` reports these operator estimates using the April 1, 2026 USD pricing assumptions for this release:
|
|
270
|
+
|
|
271
|
+
- `gpt-5-mini`: about **$12 USD** one time
|
|
272
|
+
- `gpt-5.4-mini`: about **$30 USD** one time
|
|
273
|
+
|
|
274
|
+
`gpt-5-mini` is the default to keep that migration cost lower. `gpt-5.4-mini` is available when you want higher-quality summaries and are comfortable with the higher one-time spend.
|
|
275
|
+
|
|
197
276
|
This screenshot is the reference point for that estimate:
|
|
198
277
|
|
|
199
278
|

|
|
@@ -221,9 +300,9 @@ The skill is built around the stable JSON CLI surface and is intentionally conse
|
|
|
221
300
|
```bash
|
|
222
301
|
ghcrawl doctor --json
|
|
223
302
|
ghcrawl refresh owner/repo
|
|
224
|
-
ghcrawl threads owner/repo --numbers 42,43,44
|
|
225
|
-
ghcrawl clusters owner/repo --min-size 10 --limit 20 --sort recent
|
|
226
|
-
ghcrawl cluster-detail owner/repo --id 123 --member-limit 20 --body-chars 280
|
|
303
|
+
ghcrawl threads owner/repo --numbers 42,43,44 --json
|
|
304
|
+
ghcrawl clusters owner/repo --min-size 10 --limit 20 --sort recent --json
|
|
305
|
+
ghcrawl cluster-detail owner/repo --id 123 --member-limit 20 --body-chars 280 --json
|
|
227
306
|
```
|
|
228
307
|
|
|
229
308
|
### Video Walkthrough
|
|
@@ -241,15 +320,16 @@ The agent and build contract for this repo lives in [SPEC.md](https://github.com
|
|
|
241
320
|
- a plain `sync owner/repo` is incremental by default after the first full completed open scan for that repo
|
|
242
321
|
- `sync` is metadata-only by default
|
|
243
322
|
- `sync --include-comments` enables issue comments, PR reviews, and review comments for deeper context
|
|
244
|
-
- `embed` defaults to `text-embedding-3-large`
|
|
245
|
-
- `embed`
|
|
246
|
-
- `embed` stores an input hash per
|
|
323
|
+
- `embed` defaults to `text-embedding-3-large` with `dimensions=1024`
|
|
324
|
+
- `embed` maintains one active vector per thread, stored in a persistent `vectorlite` sidecar index
|
|
325
|
+
- `embed` stores an input hash per thread and will not resubmit unchanged text for re-embedding
|
|
326
|
+
- the default embedding basis is `title + original body`; use `ghcrawl configure --embedding-basis title_summary` if you want to summarize before embedding
|
|
247
327
|
- `sync --since` accepts ISO timestamps and relative durations like `15m`, `2h`, `7d`, and `1mo`
|
|
248
328
|
- `sync --limit <count>` is the best smoke-test path on a busy repository
|
|
249
329
|
- `tui` remembers sort order and min cluster size per repository in the persisted config file
|
|
250
330
|
- the TUI shows locally closed threads and clusters in gray; press `x` to hide or show them
|
|
251
331
|
- on wide screens, press `l` to toggle between three columns and a wider cluster list with members/detail stacked on the right
|
|
252
|
-
- if you add a brand-new repo from the TUI with `p`, ghcrawl runs sync -> embed -> cluster and opens that repo with min cluster size `1+`
|
|
332
|
+
- if you add a brand-new repo from the TUI with `p`, ghcrawl runs sync -> summarize-if-needed -> embed -> cluster and opens that repo with min cluster size `1+`
|
|
253
333
|
|
|
254
334
|
## Responsibility Attestation
|
|
255
335
|
|
package/bin/ghcrawl.js
CHANGED
|
@@ -10,11 +10,14 @@ const distEntrypoint = path.join(binDir, '..', 'dist', 'main.js');
|
|
|
10
10
|
const sourceEntrypoint = path.join(binDir, '..', 'src', 'main.ts');
|
|
11
11
|
|
|
12
12
|
if (!existsSync(sourceEntrypoint) && existsSync(distEntrypoint)) {
|
|
13
|
-
const
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
13
|
+
const entrypoint = await import(pathToFileURL(distEntrypoint).href);
|
|
14
|
+
const exitCode =
|
|
15
|
+
typeof entrypoint.runCli === 'function'
|
|
16
|
+
? await entrypoint.runCli(process.argv.slice(2))
|
|
17
|
+
: (await entrypoint.run(process.argv.slice(2)), 0);
|
|
18
|
+
if (exitCode !== 0) {
|
|
19
|
+
process.exit(exitCode);
|
|
20
|
+
}
|
|
18
21
|
} else {
|
|
19
22
|
const require = createRequire(import.meta.url);
|
|
20
23
|
const tsxLoader = require.resolve('tsx');
|
package/dist/init-wizard.d.ts
CHANGED
|
@@ -35,6 +35,8 @@ export declare function runInitWizard(options?: {
|
|
|
35
35
|
cwd?: string;
|
|
36
36
|
env?: NodeJS.ProcessEnv;
|
|
37
37
|
reconfigure?: boolean;
|
|
38
|
+
configPathOverride?: string;
|
|
39
|
+
workspaceRootOverride?: string;
|
|
38
40
|
prompter?: InitPrompter;
|
|
39
41
|
isInteractive?: boolean;
|
|
40
42
|
}): Promise<InitWizardResult>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"init-wizard.d.ts","sourceRoot":"","sources":["../src/init-wizard.ts"],"names":[],"mappings":"AAWA,MAAM,MAAM,gBAAgB,GAAG;IAC7B,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,OAAO,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG;IACzB,KAAK,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;IACjD,IAAI,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;IAChE,MAAM,EAAE,CAAC,OAAO,EAAE;QAChB,OAAO,EAAE,MAAM,CAAC;QAChB,YAAY,CAAC,EAAE,MAAM,CAAC;QACtB,OAAO,EAAE,KAAK,CAAC;YAAE,KAAK,EAAE,MAAM,CAAC;YAAC,KAAK,EAAE,MAAM,CAAC;YAAC,IAAI,CAAC,EAAE,MAAM,CAAA;SAAE,CAAC,CAAC;KACjE,KAAK,OAAO,CAAC,MAAM,GAAG,MAAM,CAAC,CAAC;IAC/B,IAAI,EAAE,CAAC,OAAO,EAAE;QACd,OAAO,EAAE,MAAM,CAAC;QAChB,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,GAAG,SAAS,CAAC;KAClD,KAAK,OAAO,CAAC,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC,CAAC;IAC3C,OAAO,EAAE,CAAC,OAAO,EAAE;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,YAAY,CAAC,EAAE,OAAO,CAAA;KAAE,KAAK,OAAO,C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AC,EAAE,MAAM,CAAC;IAC/B,QAAQ,CAAC,EAAE,YAAY,CAAC;IACxB,aAAa,CAAC,EAAE,OAAO,CAAC;CACpB,GACL,OAAO,CAAC,gBAAgB,CAAC,CAqQ3B"}
|
package/dist/init-wizard.js
CHANGED
|
@@ -44,8 +44,14 @@ export async function runInitWizard(options = {}) {
|
|
|
44
44
|
const env = options.env ?? process.env;
|
|
45
45
|
const reconfigure = options.reconfigure ?? false;
|
|
46
46
|
const prompter = options.prompter ?? createClackInitPrompter();
|
|
47
|
-
const
|
|
48
|
-
|
|
47
|
+
const configOptions = {
|
|
48
|
+
cwd,
|
|
49
|
+
env,
|
|
50
|
+
configPathOverride: options.configPathOverride,
|
|
51
|
+
workspaceRootOverride: options.workspaceRootOverride,
|
|
52
|
+
};
|
|
53
|
+
const current = loadConfig(configOptions);
|
|
54
|
+
const stored = readPersistedConfig(configOptions);
|
|
49
55
|
const hasStoredGithub = Boolean(stored.data.githubToken);
|
|
50
56
|
const hasStoredOpenAi = Boolean(stored.data.openaiApiKey);
|
|
51
57
|
if (!reconfigure && hasStoredGithub && hasStoredOpenAi) {
|
|
@@ -265,7 +271,7 @@ export async function runInitWizard(options = {}) {
|
|
|
265
271
|
prompter.cancel('init cancelled');
|
|
266
272
|
throw new Error('init cancelled');
|
|
267
273
|
}
|
|
268
|
-
const result = writePersistedConfig(nextConfig,
|
|
274
|
+
const result = writePersistedConfig(nextConfig, configOptions);
|
|
269
275
|
await prompter.outro(`Saved ghcrawl config to ${result.configPath}`);
|
|
270
276
|
return { configPath: result.configPath, changed };
|
|
271
277
|
}
|
package/dist/init-wizard.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"init-wizard.js","sourceRoot":"","sources":["../src/init-wizard.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,IAA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Z,gBAAgB,CACjB,CAAC;IACF,MAAM,oBAAoB,GAAG,MAAM,QAAQ,CAAC,OAAO,CAAC;QAClD,OAAO,EAAE,sGAAsG;QAC/G,YAAY,EAAE,KAAK;KACpB,CAAC,CAAC;IACH,IAAI,QAAQ,CAAC,oBAAoB,CAAC,IAAI,oBAAoB,KAAK,IAAI,EAAE,CAAC;QACpE,QAAQ,CAAC,MAAM,CAAC,gBAAgB,CAAC,CAAC;QAClC,MAAM,IAAI,KAAK,CAAC,gBAAgB,CAAC,CAAC;IACpC,CAAC;IAED,MAAM,MAAM,GAAG,oBAAoB,CAAC,UAAU,EAAE,aAAa,CAAC,CAAC;IAC/D,MAAM,QAAQ,CAAC,KAAK,CAAC,2BAA2B,MAAM,CAAC,UAAU,EAAE,CAAC,CAAC;IACrE,OAAO,EAAE,UAAU,EAAE,MAAM,CAAC,UAAU,EAAE,OAAO,EAAE,CAAC;AACpD,CAAC"}
|
package/dist/main.d.ts
CHANGED
|
@@ -1,21 +1,51 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { GHCrawlService } from '@ghcrawl/api-core';
|
|
3
|
+
type CommandName = 'init' | 'doctor' | 'configure' | 'version' | 'sync' | 'refresh' | 'threads' | 'author' | 'close-thread' | 'close-cluster' | 'summarize' | 'purge-comments' | 'embed' | 'cluster' | 'cluster-experiment' | 'clusters' | 'cluster-detail' | 'search' | 'neighbors' | 'tui' | 'serve';
|
|
3
4
|
type DoctorResult = Awaited<ReturnType<GHCrawlService['doctor']>>;
|
|
4
5
|
type DoctorReport = DoctorResult & {
|
|
5
6
|
version: string;
|
|
7
|
+
vectorlite?: {
|
|
8
|
+
configured: boolean;
|
|
9
|
+
runtimeOk: boolean;
|
|
10
|
+
error: string | null;
|
|
11
|
+
};
|
|
6
12
|
};
|
|
7
|
-
|
|
13
|
+
type ConfigureReport = {
|
|
14
|
+
configPath: string;
|
|
15
|
+
updated: boolean;
|
|
16
|
+
summaryModel: 'gpt-5-mini' | 'gpt-5.4-mini';
|
|
17
|
+
embeddingBasis: 'title_original' | 'title_summary';
|
|
18
|
+
vectorBackend: 'vectorlite';
|
|
19
|
+
costEstimateUsd: {
|
|
20
|
+
sampleThreads: number;
|
|
21
|
+
pricingDate: string;
|
|
22
|
+
gpt5Mini: number;
|
|
23
|
+
gpt54Mini: number;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
type RunContext = {
|
|
27
|
+
stdout?: NodeJS.WritableStream;
|
|
28
|
+
stderr?: NodeJS.WritableStream;
|
|
29
|
+
env?: NodeJS.ProcessEnv;
|
|
30
|
+
cwd?: string;
|
|
31
|
+
};
|
|
32
|
+
type RepoCommandValues = Record<string, string | boolean>;
|
|
33
|
+
type ParsedRepoFlags = {
|
|
8
34
|
owner: string;
|
|
9
35
|
repo: string;
|
|
36
|
+
values: RepoCommandValues;
|
|
10
37
|
};
|
|
11
|
-
export declare function
|
|
38
|
+
export declare function parseOwnerRepo(value: string): {
|
|
12
39
|
owner: string;
|
|
13
40
|
repo: string;
|
|
14
|
-
values: Record<string, string | boolean>;
|
|
15
41
|
};
|
|
42
|
+
export declare function parseRepoFlags(command: CommandName, args: string[]): ParsedRepoFlags;
|
|
16
43
|
export declare function resolveSinceValue(value: string, now?: Date): string;
|
|
17
44
|
export declare function formatLogLine(message: string, now?: Date): string;
|
|
18
45
|
export declare function formatDoctorReport(result: DoctorReport): string;
|
|
19
|
-
export declare function
|
|
46
|
+
export declare function formatConfigureReport(result: ConfigureReport): string;
|
|
47
|
+
export declare function run(argv: string[], stdoutOrContext?: NodeJS.WritableStream | RunContext, context?: RunContext): Promise<void>;
|
|
48
|
+
export declare function getExitCode(error: unknown): number;
|
|
49
|
+
export declare function runCli(argv: string[], context?: RunContext): Promise<number>;
|
|
20
50
|
export {};
|
|
21
51
|
//# sourceMappingURL=main.d.ts.map
|
package/dist/main.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../src/main.ts"],"names":[],"mappings":";AAOA,OAAO,EAAmB,cAAc,
|
|
1
|
+
{"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../src/main.ts"],"names":[],"mappings":";AAOA,OAAO,EAAmB,cAAc,EAAiF,MAAM,mBAAmB,CAAC;AAKnJ,KAAK,WAAW,GACZ,MAAM,GACN,QAAQ,GACR,WAAW,GACX,SAAS,GACT,MAAM,GACN,SAAS,GACT,SAAS,GACT,QAAQ,GACR,cAAc,GACd,eAAe,GACf,WAAW,GACX,gBAAgB,GAChB,OAAO,GACP,SAAS,GACT,oBAAoB,GACpB,UAAU,GACV,gBAAgB,GAChB,QAAQ,GACR,WAAW,GACX,KAAK,GACL,OAAO,CAAC;AAYZ,KAAK,YAAY,GAAG,OAAO,CAAC,UAAU,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;AAClE,KAAK,YAAY,GAAG,YAAY,GAAG;IACjC,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE;QACX,UAAU,EAAE,OAAO,CAAC;QACpB,SAAS,EAAE,OAAO,CAAC;QACnB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;KACtB,CAAC;CACH,CAAC;AAEF,KAAK,eAAe,GAAG;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,OAAO,CAAC;IACjB,YAAY,EAAE,YAAY,GAAG,cAAc,CAAC;IAC5C,cAAc,EAAE,gBAAgB,GAAG,eAAe,CAAC;IACnD,aAAa,EAAE,YAAY,CAAC;IAC5B,eAAe,EAAE;QACf,aAAa,EAAE,MAAM,CAAC;QACtB,WAAW,EAAE,MAAM,CAAC;QACpB,QAAQ,EAAE,MAAM,CAAC;QACjB,SAAS,EAAE,MAAM,CAAC;KACnB,CAAC;CACH,CAAC;AASF,KAAK,UAAU,GAAG;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC,cAAc,CAAC;IAC/B,MAAM,CAAC,EAAE,MAAM,CAAC,cAAc,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