omnius 1.0.274 → 1.0.276

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.
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "omnius",
3
- "version": "1.0.274",
3
+ "version": "1.0.276",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "omnius",
9
- "version": "1.0.274",
9
+ "version": "1.0.276",
10
10
  "bundleDependencies": [
11
11
  "image-to-ascii"
12
12
  ],
@@ -1985,9 +1985,9 @@
1985
1985
  }
1986
1986
  },
1987
1987
  "node_modules/@types/node": {
1988
- "version": "25.9.2",
1989
- "resolved": "https://registry.npmjs.org/@types/node/-/node-25.9.2.tgz",
1990
- "integrity": "sha512-G05zqtJhcDLb8uslf5EjCxXg9G1KQxiV8OS0R26IC//Eoyitzqe8z37I7cqvnZlrlSfgocQRfSn/AHBZJJFyGw==",
1988
+ "version": "25.9.3",
1989
+ "resolved": "https://registry.npmjs.org/@types/node/-/node-25.9.3.tgz",
1990
+ "integrity": "sha512-603BddQMv3pUcr4U2dhujk83N2tTDVr/34wII2B6bJy6g+8WD6yUb11jszNs0gdi4PesVWl7ABt8nYMVpnLUcg==",
1991
1991
  "license": "MIT",
1992
1992
  "dependencies": {
1993
1993
  "undici-types": ">=7.24.0 <7.24.7"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "omnius",
3
- "version": "1.0.274",
3
+ "version": "1.0.276",
4
4
  "description": "AI coding agent powered by open-source models (Ollama/vLLM) — interactive TUI with agentic tool-calling loop",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -0,0 +1,88 @@
1
+ ## Coding Conventions — Priority 5
2
+
3
+ These rules govern how you write, import, and verify code in this repository. They override any implicit assumptions about TypeScript/Node.js conventions. Violating them produces code the build rejects.
4
+
5
+ ### ESM Import Extensions
6
+
7
+ ALWAYS use `.js` extension for relative imports. TypeScript with ESM (`"module": "NodeNext"`) requires file extensions in relative import paths. The compiled output is `.js`, so the import target is `.js`.
8
+
9
+ - ✅ `import { foo } from "./bar.js"`
10
+ - ❌ `import { foo } from "./bar"`
11
+ - ❌ `import { foo } from "./bar.ts"`
12
+
13
+ Exception: Package-name imports never need extensions:
14
+
15
+ - ✅ `import { foo } from "@omnius/memory"`
16
+
17
+ ### Type Imports
18
+
19
+ When `verbatimModuleSyntax` is enabled (it is), types must use `import type`:
20
+
21
+ - ✅ `import type { Foo } from "./bar.js"`
22
+ - ✅ `import { type Foo, bar } from "./baz.js"`
23
+ - ❌ `import { Foo } from "./bar.js"` (Foo is type-only)
24
+
25
+ When in doubt, prefer a separate `import type` line.
26
+
27
+ ### Cross-Package Imports
28
+
29
+ Use the package name, never a relative source path.
30
+
31
+ - ✅ `import { EpisodeStore } from "@omnius/memory"`
32
+ - ❌ `import { EpisodeStore } from "../../memory/src/store.js"`
33
+
34
+ Package names are defined in each workspace package's `package.json` `name` field. Known packages: `@omnius/core`, `@omnius/memory`, `@omnius/orchestrator`, `@omnius/execution`, `@omnius/cli`, `@omnius/integrations`.
35
+
36
+ ### Build Verification
37
+
38
+ ALWAYS verify the build after modifying TypeScript files. Type errors that look subtle at write time are often caught by the compiler.
39
+
40
+ ```
41
+ pnpm -r build
42
+ ```
43
+
44
+ If errors appear, fix them before proceeding. Do not mark the task complete until `pnpm -r build` exits 0.
45
+
46
+ ### Check Existing Conventions First
47
+
48
+ Before writing new code, check 2-3 existing files in the same directory for patterns:
49
+
50
+ - Import style (extensions, grouping, quoting)
51
+ - Function / class naming conventions
52
+ - Error handling patterns
53
+ - Export style (named vs default)
54
+
55
+ ### Never Assume File Format
56
+
57
+ Do not guess a file's format from its extension alone. Check how existing code reads the file, or use `file <path>` to inspect it.
58
+
59
+ - `.db` files are SQLite, not JSON — use a SQLite library, not `JSON.parse`
60
+ - `.bin` files are binary
61
+ - `.json` files are JSON
62
+
63
+ ### Wire New Commands Into the Dispatcher
64
+
65
+ New CLI slash commands require two things:
66
+
67
+ 1. The handler file (e.g., `mem-metabolize.ts`)
68
+ 2. Registration in the command dispatcher (`commands.ts`) — both a `case "name"` branch AND a `registerSlashCommand()` call
69
+
70
+ ### Export New Modules From Package Index
71
+
72
+ Any new module added to a package must be re-exported from that package's `src/index.ts` so consumers can import it by package name.
73
+
74
+ ### Create Type Dependencies First
75
+
76
+ If your code imports from a file you are creating (e.g., `./types`), create that file before writing the import — or at least in the same batch. A missing file causes a build failure invisible until you run the compiler.
77
+
78
+ ### Type Annotations in Callbacks
79
+
80
+ Always provide explicit type parameters for generic array methods:
81
+
82
+ - ✅ `arr.sort((a: MyType, b: MyType) => a.order - b.order)`
83
+ - ✅ `arr.map((item: InputType): OutputType => transform(item))`
84
+ - ❌ `arr.sort((a, b) => a.order - b.order)`
85
+
86
+ ### Read Before Editing
87
+
88
+ Always read a file with `file_read` before editing it with `file_edit` or `file_write`. Editing a file you have not read will lose any content between the version in your training data and the actual current file.