@steipete/oracle 1.0.5 → 1.0.6

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 CHANGED
@@ -85,4 +85,5 @@ pnpm test:coverage
85
85
  ---
86
86
 
87
87
  If you’re looking for an even more powerful context-management tool, check out https://repoprompt.com
88
+
88
89
  Name inspired by: https://ampcode.com/news/oracle
@@ -39,7 +39,10 @@ program.hook('preAction', (thisCommand) => {
39
39
  thisCommand.setOptionValue('prompt', positional);
40
40
  }
41
41
  if (shouldRequirePrompt(rawCliArgs, opts)) {
42
- throw new Error('Prompt is required. Provide it via --prompt "<text>".');
42
+ console.log(chalk.yellow('Prompt is required. Provide it via --prompt "<text>" or positional [prompt].'));
43
+ thisCommand.help({ error: false });
44
+ process.exitCode = 1;
45
+ return;
43
46
  }
44
47
  });
45
48
  program
@@ -47,7 +47,7 @@ function renderHelpFooter(program, colors) {
47
47
  `${colors.bullet('•')} The model has no built-in knowledge of your project—open with the architecture, key components, and why you’re asking.`,
48
48
  `${colors.bullet('•')} Run ${colors.accent('--files-report')} to inspect token spend before hitting the API.`,
49
49
  `${colors.bullet('•')} Non-preview runs spawn detached sessions so they keep streaming even if your terminal closes — reattach anytime via ${colors.accent('pnpm oracle session <slug>')}.`,
50
- `${colors.bullet('•')} Ask the model for a memorable 3–5 word slug and pass it via ${colors.accent('--slug "<words>"')} to keep session IDs tidy.`,
50
+ `${colors.bullet('•')} Set a memorable 3–5 word slug via ${colors.accent('--slug "<words>"')} to keep session IDs tidy.`,
51
51
  `${colors.bullet('•')} Need hidden flags? Run ${colors.accent(`${program.name()} --help --verbose`)} to list search/token/browser overrides.`,
52
52
  ].join('\n');
53
53
  const formatExample = (command, description) => `${colors.command(` ${command}`)}\n${colors.muted(` ${description}`)}`;
@@ -51,7 +51,6 @@ export async function attachSession(sessionId, options) {
51
51
  }
52
52
  const initialStatus = metadata.status;
53
53
  if (!options?.suppressMetadata) {
54
- console.log(chalk.bold(`Session: ${sessionId}`));
55
54
  const reattachLine = buildReattachLine(metadata);
56
55
  if (reattachLine) {
57
56
  console.log(chalk.blue(reattachLine));
@@ -92,7 +92,11 @@ export async function runOracle(options, deps = {}) {
92
92
  logVerbose(`Estimated tokens (prompt + files): ${estimatedInputTokens.toLocaleString()}`);
93
93
  const fileCount = files.length;
94
94
  const cliVersion = getCliVersion();
95
- const headerLine = `Oracle (${cliVersion}) consulting ${modelConfig.model}'s crystal ball with ${estimatedInputTokens.toLocaleString()} tokens and ${fileCount} files...`;
95
+ const richTty = process.stdout.isTTY && chalk.level > 0;
96
+ const headerModelLabel = richTty ? chalk.cyan(modelConfig.model) : modelConfig.model;
97
+ const tokenLabel = richTty ? chalk.green(estimatedInputTokens.toLocaleString()) : estimatedInputTokens.toLocaleString();
98
+ const fileLabel = richTty ? chalk.magenta(fileCount.toString()) : fileCount.toString();
99
+ const headerLine = `Oracle (${cliVersion}) consulting ${headerModelLabel}'s crystal ball with ${tokenLabel} tokens and ${fileLabel} files...`;
96
100
  const shouldReportFiles = (options.filesReport || fileTokenInfo.totalTokens > inputTokenBudget) && fileTokenInfo.stats.length > 0;
97
101
  if (!isPreview) {
98
102
  log(headerLine);
@@ -145,6 +149,7 @@ export async function runOracle(options, deps = {}) {
145
149
  let answerHeaderPrinted = false;
146
150
  const ensureAnswerHeader = () => {
147
151
  if (!options.silent && !answerHeaderPrinted) {
152
+ log('');
148
153
  log(chalk.bold('Answer:'));
149
154
  answerHeaderPrinted = true;
150
155
  }
@@ -325,7 +330,7 @@ async function executeBackgroundResponse(params) {
325
330
  isActive: () => heartbeatActive,
326
331
  makeMessage: (elapsedMs) => {
327
332
  const elapsedText = formatElapsed(elapsedMs);
328
- return `OpenAI background run still in progress — ${elapsedText} elapsed (id=${responseId}).`;
333
+ return `OpenAI background run still in progress — ${elapsedText} elapsed.`;
329
334
  },
330
335
  });
331
336
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@steipete/oracle",
3
- "version": "1.0.5",
3
+ "version": "1.0.6",
4
4
  "description": "CLI wrapper around OpenAI Responses API with GPT-5 Pro and GPT-5.1 high reasoning modes.",
5
5
  "type": "module",
6
6
  "main": "dist/bin/oracle-cli.js",