@simonesiega/codex-limits 0.1.3 → 0.1.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.
@@ -0,0 +1,34 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 852 132" role="img" aria-labelledby="title description">
2
+ <title id="title">Codex Limits</title>
3
+ <desc id="description">An animated terminal-style Codex Limits title</desc>
4
+ <style>
5
+ .title {
6
+ fill: #24292f;
7
+ font-family: "Fira Code", "Cascadia Code", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
8
+ font-size: 16px;
9
+ font-weight: 600;
10
+ white-space: pre;
11
+ }
12
+
13
+ @media (prefers-color-scheme: dark) {
14
+ .title {
15
+ fill: #f0f6fc;
16
+ }
17
+ }
18
+ </style>
19
+ <defs>
20
+ <clipPath id="typing-mask">
21
+ <rect x="0" y="0" width="0" height="132">
22
+ <animate attributeName="width" values="0;852;852;0" keyTimes="0;0.55;0.92;1" dur="6s" repeatCount="indefinite" />
23
+ </rect>
24
+ </clipPath>
25
+ </defs>
26
+ <g clip-path="url(#typing-mask)">
27
+ <text class="title" x="8" y="20" xml:space="preserve"> ██████╗ ██████╗ ██████╗ ███████╗██╗ ██╗ ██╗ ██╗███╗ ███╗██╗████████╗███████╗</text>
28
+ <text class="title" x="8" y="40" xml:space="preserve">██╔════╝██╔═══██╗██╔══██╗██╔════╝╚██╗██╔╝ ██║ ██║████╗ ████║██║╚══██╔══╝██╔════╝</text>
29
+ <text class="title" x="8" y="60" xml:space="preserve">██║ ██║ ██║██║ ██║█████╗ ╚███╔╝ ██║ ██║██╔████╔██║██║ ██║ ███████╗</text>
30
+ <text class="title" x="8" y="80" xml:space="preserve">██║ ██║ ██║██║ ██║██╔══╝ ██╔██╗ ██║ ██║██║╚██╔╝██║██║ ██║ ╚════██║</text>
31
+ <text class="title" x="8" y="100" xml:space="preserve">╚██████╗╚██████╔╝██████╔╝███████╗██╔╝ ██╗ ███████╗██║██║ ╚═╝ ██║██║ ██║ ███████║</text>
32
+ <text class="title" x="8" y="120" xml:space="preserve"> ╚═════╝ ╚═════╝ ╚═════╝ ╚══════╝╚═╝ ╚═╝ ╚══════╝╚═╝╚═╝ ╚═╝╚═╝ ╚═╝ ╚══════╝</text>
33
+ </g>
34
+ </svg>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@simonesiega/codex-limits",
3
- "version": "0.1.3",
3
+ "version": "0.1.5",
4
4
  "description": "Check Codex usage limits, reset times, and reset-credit coupons from a fast, read-only terminal dashboard.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -20,16 +20,23 @@
20
20
  "scripts/postinstall.cjs",
21
21
  "README.md",
22
22
  "CHANGELOG.md",
23
+ "SECURITY.md",
23
24
  ".env.example",
24
25
  "LICENSE"
25
26
  ],
26
27
  "scripts": {
27
28
  "dev": "bun run src/package/cli.ts",
28
- "build": "bun build src/package/cli.ts --target=node --outfile=dist/cli.js && bun build src/agents/opencode/plugin.tsx --target=node --external \"@opentui/*\" --outfile=dist/index.js",
29
+ "build": "bun run scripts/build.ts",
30
+ "format": "prettier --write .",
31
+ "format:check": "prettier --check .",
32
+ "docs:link": "bun run scripts/check-doc-links.ts",
33
+ "docs:schema": "bun run scripts/check-doc-schema.ts",
34
+ "docs:check": "bun run docs:link && bun run docs:schema",
29
35
  "typecheck": "tsc --noEmit",
30
36
  "test": "bun test",
31
- "check": "bun run typecheck && bun test && bun run build",
32
- "prepack": "bun run check",
37
+ "package:validate": "bun run scripts/validate-package.ts",
38
+ "check": "bun run format:check && bun run docs:check && bun run typecheck && bun test && bun run build && bun run package:validate",
39
+ "prepack": "bun run build",
33
40
  "postinstall": "node ./scripts/postinstall.cjs"
34
41
  },
35
42
  "keywords": [
@@ -58,16 +65,22 @@
58
65
  "node": ">=20"
59
66
  },
60
67
  "packageManager": "bun@1.3.14",
68
+ "overrides": {
69
+ "fast-uri": "3.1.4"
70
+ },
61
71
  "devDependencies": {
62
- "@opencode-ai/plugin": "^1.15.4",
63
- "@types/node": "^22.10.2",
72
+ "@opencode-ai/plugin": "^1.18.4",
73
+ "@types/node": "^22.20.1",
64
74
  "@types/react": "^19.2.17",
65
- "bun-types": "^1.1.42",
75
+ "ajv": "^8.20.0",
76
+ "ajv-formats": "^3.0.1",
77
+ "bun-types": "^1.3.14",
78
+ "ink": "^6.8.0",
66
79
  "ink-testing-library": "^4.0.0",
67
- "typescript": "^5.7.2"
68
- },
69
- "dependencies": {
70
- "ink": "^7.1.0",
71
- "react": "^19.2.7"
80
+ "prettier": "^3.9.6",
81
+ "prettier-plugin-tailwindcss": "^0.8.1",
82
+ "react": "^19.2.8",
83
+ "react-devtools-core": "^7.0.1",
84
+ "typescript": "^5.9.3"
72
85
  }
73
86
  }
@@ -1,13 +1,22 @@
1
- const { existsSync } = require("node:fs");
2
- const { join } = require("node:path");
1
+ const {existsSync} = require("node:fs");
2
+ const {join} = require("node:path");
3
3
 
4
4
  const root = process.cwd();
5
5
  const isSourceCheckout = existsSync(join(root, "src"));
6
6
  const normalizedRoot = root.replace(/\\/g, "/");
7
- const isOpencodeManagedInstall = normalizedRoot.includes("/.cache/opencode/") || normalizedRoot.includes("/.opencode/node_modules/");
8
- const isGlobalInstall = process.env.npm_config_global === "true" || process.env.npm_config_location === "global";
9
- const skip = process.env.CI || process.env.CODEX_LIMITS_SKIP_INIT || isSourceCheckout || isOpencodeManagedInstall;
7
+ const isOpencodeManagedInstall =
8
+ normalizedRoot.includes("/.cache/opencode/") ||
9
+ normalizedRoot.includes("/.opencode/node_modules/");
10
+ const isGlobalInstall =
11
+ process.env.npm_config_global === "true" || process.env.npm_config_location === "global";
12
+ const skip =
13
+ process.env.CI ||
14
+ process.env.CODEX_LIMITS_SKIP_INIT ||
15
+ isSourceCheckout ||
16
+ isOpencodeManagedInstall;
10
17
 
11
18
  if (!skip && isGlobalInstall) {
12
- process.stdout.write("codex-limits: installed. Run `codex-limits init` to install optional agent integrations.\n");
19
+ process.stdout.write(
20
+ "codex-limits: installed. Run `codex-limits agents install` to install optional agent integrations.\n"
21
+ );
13
22
  }
package/types/index.d.ts CHANGED
@@ -1,9 +1,8 @@
1
+ /** Public root-module contract loaded by OpenCode. */
1
2
  export interface CodexLimitsTuiPluginModule {
2
3
  id: "codex-limits";
3
4
  tui: (api: unknown) => void | Promise<void>;
4
5
  }
5
-
6
6
  declare const plugin: CodexLimitsTuiPluginModule;
7
-
8
7
  export default plugin;
9
- export const tui: CodexLimitsTuiPluginModule["tui"];
8
+ export declare const tui: CodexLimitsTuiPluginModule["tui"];