@steipete/oracle 0.4.3 → 0.4.5

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/dist/.DS_Store ADDED
Binary file
@@ -1,4 +1,5 @@
1
- import { APIConnectionError, APIConnectionTimeoutError, APIUserAbortError, } from 'openai';
1
+ import { APIConnectionError, APIConnectionTimeoutError, APIUserAbortError } from 'openai';
2
+ import { APIError } from 'openai/error';
2
3
  import { formatElapsed } from './format.js';
3
4
  export class OracleUserError extends Error {
4
5
  category;
@@ -86,6 +87,11 @@ export function toTransportError(error) {
86
87
  if (error instanceof APIConnectionError) {
87
88
  return new OracleTransportError('connection-lost', 'Connection to OpenAI dropped before the response completed.', error);
88
89
  }
90
+ if (error instanceof APIError) {
91
+ if (error.status === 404 || error.status === 405) {
92
+ return new OracleTransportError('unsupported-endpoint', 'HTTP 404/405 from the Responses API; this base URL or gateway likely does not expose /v1/responses. Set OPENAI_BASE_URL to api.openai.com/v1, update your Azure API version/deployment, or use the browser engine.', error);
93
+ }
94
+ }
89
95
  return new OracleTransportError('unknown', error instanceof Error ? error.message : 'Unknown transport failure.', error);
90
96
  }
91
97
  export function describeTransportError(error, deadlineMs) {
@@ -98,6 +104,8 @@ export function describeTransportError(error, deadlineMs) {
98
104
  return 'Connection to OpenAI ended unexpectedly before the response completed.';
99
105
  case 'client-abort':
100
106
  return 'Request was aborted before OpenAI completed the response.';
107
+ case 'unsupported-endpoint':
108
+ return 'The Responses API returned 404/405 — your base URL/gateway probably lacks /v1/responses (check OPENAI_BASE_URL or switch to api.openai.com / browser engine).';
101
109
  default:
102
110
  return 'OpenAI streaming call ended with an unknown transport error.';
103
111
  }
File without changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@steipete/oracle",
3
- "version": "0.4.3",
3
+ "version": "0.4.5",
4
4
  "description": "CLI wrapper around OpenAI Responses API with GPT-5.1 Pro, GPT-5.1, and GPT-5.1 Codex high reasoning modes.",
5
5
  "type": "module",
6
6
  "main": "dist/bin/oracle-cli.js",
@@ -8,26 +8,6 @@
8
8
  "oracle": "dist/bin/oracle-cli.js",
9
9
  "oracle-mcp": "dist/bin/oracle-mcp.js"
10
10
  },
11
- "scripts": {
12
- "docs:list": "tsx scripts/docs-list.ts",
13
- "build": "tsc -p tsconfig.build.json && pnpm run build:vendor",
14
- "build:vendor": "mkdir -p dist/vendor && cp -R vendor/oracle-notifier dist/vendor/oracle-notifier || true",
15
- "start": "pnpm run build && node ./dist/scripts/run-cli.js",
16
- "oracle": "pnpm start",
17
- "check": "pnpm run typecheck",
18
- "typecheck": "tsc --noEmit",
19
- "lint": "pnpm run typecheck && biome lint .",
20
- "test": "vitest run",
21
- "test:mcp": "pnpm run build && pnpm run test:mcp:unit && pnpm run test:mcp:mcporter",
22
- "test:mcp:unit": "vitest run tests/mcp*.test.ts tests/mcp/**/*.test.ts",
23
- "test:mcp:mcporter": "npx -y mcporter list oracle-local --schema --config config/mcporter.json && npx -y mcporter call oracle-local.sessions limit:1 --config config/mcporter.json",
24
- "test:browser": "pnpm run build && ./scripts/browser-smoke.sh",
25
- "test:live": "ORACLE_LIVE_TEST=1 vitest run tests/live --exclude tests/live/openai-live.test.ts",
26
- "test:pro": "ORACLE_LIVE_TEST=1 vitest run tests/live/openai-live.test.ts",
27
- "test:coverage": "vitest run --coverage",
28
- "prepare": "pnpm run build",
29
- "mcp": "pnpm run build && node ./dist/bin/oracle-mcp.js"
30
- },
31
11
  "files": [
32
12
  "dist/**/*",
33
13
  "assets-oracle-icon.png",
@@ -41,6 +21,21 @@
41
21
  "type": "git",
42
22
  "url": "git+https://github.com/steipete/oracle.git"
43
23
  },
24
+ "engines": {
25
+ "node": ">=20"
26
+ },
27
+ "devEngines": {
28
+ "runtime": [
29
+ {
30
+ "name": "node",
31
+ "version": ">=20"
32
+ }
33
+ ],
34
+ "packageManager": {
35
+ "name": "pnpm",
36
+ "version": ">=8"
37
+ }
38
+ },
44
39
  "keywords": [],
45
40
  "author": "",
46
41
  "license": "MIT",
@@ -93,17 +88,23 @@
93
88
  "optionalDependencies": {
94
89
  "win-dpapi": "^1.1.0"
95
90
  },
96
- "pnpm": {
97
- "overrides": {
98
- "zod": "3.24.1",
99
- "win-dpapi": "npm:@primno/dpapi@2.0.1"
100
- },
101
- "onlyBuiltDependencies": [
102
- "@cdktf/node-pty-prebuilt-multiarch",
103
- "keytar",
104
- "sqlite3",
105
- "win-dpapi"
106
- ]
107
- },
108
- "packageManager": "pnpm@10.23.0+sha512.21c4e5698002ade97e4efe8b8b4a89a8de3c85a37919f957e7a0f30f38fbc5bbdd05980ffe29179b2fb6e6e691242e098d945d1601772cad0fef5fb6411e2a4b"
109
- }
91
+ "scripts": {
92
+ "docs:list": "tsx scripts/docs-list.ts",
93
+ "build": "tsc -p tsconfig.build.json && pnpm run build:vendor",
94
+ "build:vendor": "mkdir -p dist/vendor && cp -R vendor/oracle-notifier dist/vendor/oracle-notifier || true",
95
+ "start": "pnpm run build && node ./dist/scripts/run-cli.js",
96
+ "oracle": "pnpm start",
97
+ "check": "pnpm run typecheck",
98
+ "typecheck": "tsc --noEmit",
99
+ "lint": "pnpm run typecheck && biome lint .",
100
+ "test": "vitest run",
101
+ "test:mcp": "pnpm run build && pnpm run test:mcp:unit && pnpm run test:mcp:mcporter",
102
+ "test:mcp:unit": "vitest run tests/mcp*.test.ts tests/mcp/**/*.test.ts",
103
+ "test:mcp:mcporter": "npx -y mcporter list oracle-local --schema --config config/mcporter.json && npx -y mcporter call oracle-local.sessions limit:1 --config config/mcporter.json",
104
+ "test:browser": "pnpm run build && ./scripts/browser-smoke.sh",
105
+ "test:live": "ORACLE_LIVE_TEST=1 vitest run tests/live --exclude tests/live/openai-live.test.ts",
106
+ "test:pro": "ORACLE_LIVE_TEST=1 vitest run tests/live/openai-live.test.ts",
107
+ "test:coverage": "vitest run --coverage",
108
+ "mcp": "pnpm run build && node ./dist/bin/oracle-mcp.js"
109
+ }
110
+ }
File without changes
@@ -1,24 +0,0 @@
1
- # Oracle Notifier helper (macOS, arm64)
2
-
3
- Builds a tiny signed helper app for macOS notifications with the Oracle icon.
4
-
5
- ## Build
6
-
7
- ```bash
8
- cd vendor/oracle-notifier
9
- # Optional: notarize by setting App Store Connect key credentials
10
- export APP_STORE_CONNECT_API_KEY_P8="$(cat AuthKey_XXXXXX.p8)" # with literal newlines or \n escaped
11
- export APP_STORE_CONNECT_KEY_ID=XXXXXX
12
- export APP_STORE_CONNECT_ISSUER_ID=YYYYYYYY-YYYY-YYYY-YYYY-YYYYYYYYYYYY
13
- ./build-notifier.sh
14
- ```
15
-
16
- - Requires Xcode command line tools (swiftc) and a macOS Developer ID certificate. Without a valid cert, the build fails (no ad-hoc fallback).
17
- - If `APP_STORE_CONNECT_*` vars are set, the script notarizes and staples the ticket.
18
- - Output: `OracleNotifier.app` (arm64 only), bundled with `OracleIcon.icns`.
19
-
20
- ## Usage
21
- The CLI prefers this helper on macOS; if it fails or is missing, it falls back to toasted-notifier/terminal-notifier.
22
-
23
- ## Permissions
24
- After first run, allow notifications for “Oracle Notifier” in System Settings → Notifications.