@cmdctrl/omp 0.0.0-stage → 0.1.0

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
@@ -1,3 +1,25 @@
1
- # Temporary Holding Version
1
+ # @cmdctrl/omp
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ Cmd+Ctrl daemon for [oh-my-pi](https://omp.sh) (`omp`), the fork of the [pi coding agent](https://pi.dev). It runs the [`@cmdctrl/pi`](https://www.npmjs.com/package/@cmdctrl/pi) daemon as its own device, so one machine can run pi and omp through Cmd+Ctrl side by side.
4
+
5
+ ## Prerequisites
6
+
7
+ `omp` installed and authenticated.
8
+
9
+ ## Install
10
+
11
+ ```bash
12
+ npm install -g @cmdctrl/omp
13
+ cmdctrl-omp register -s https://api.cmd-ctrl.ai
14
+ cmdctrl-omp start
15
+ ```
16
+
17
+ Set `OMP_BIN=/path/to/omp` if `omp` is not on your PATH. It ignores `PI_BIN`, which only the pi daemon reads.
18
+
19
+ ## Interoperability
20
+
21
+ Sessions are read from omp's own directory (`~/.omp/agent/sessions/`, or `$PI_CODING_AGENT_DIR/sessions`), so a session started through Cmd+Ctrl can be resumed from your terminal with `omp --resume`, and vice versa. The composer menu offers your markdown commands (`~/.omp/agent/commands/`, `.omp/commands/`).
22
+
23
+ ## Docs
24
+
25
+ Full setup and troubleshooting: <https://docs.cmd-ctrl.ai/installation/omp>
@@ -0,0 +1,6 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * CmdCtrl daemon for oh-my-pi (`omp`): `@cmdctrl/pi`'s daemon, registered as
4
+ * its own device so one machine can run pi and omp side by side.
5
+ */
6
+ export {};
package/dist/index.js ADDED
@@ -0,0 +1,15 @@
1
+ #!/usr/bin/env node
2
+ "use strict";
3
+ /**
4
+ * CmdCtrl daemon for oh-my-pi (`omp`): `@cmdctrl/pi`'s daemon, registered as
5
+ * its own device so one machine can run pi and omp side by side.
6
+ */
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ const fs_1 = require("fs");
9
+ const path_1 = require("path");
10
+ const pi_1 = require("@cmdctrl/pi");
11
+ // This package's version, not @cmdctrl/pi's: the server checks it for updates
12
+ // and a self-update reinstalls @cmdctrl/omp against it.
13
+ const { version } = JSON.parse((0, fs_1.readFileSync)((0, path_1.join)(__dirname, '..', 'package.json'), 'utf-8'));
14
+ (0, pi_1.runDaemon)({ daemonName: 'omp', agentType: 'omp', bin: 'omp', version });
15
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;AAEA;;;GAGG;;AAEH,2BAAkC;AAClC,+BAA4B;AAC5B,oCAAwC;AAExC,8EAA8E;AAC9E,wDAAwD;AACxD,MAAM,EAAE,OAAO,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC,IAAA,iBAAY,EAAC,IAAA,WAAI,EAAC,SAAS,EAAE,IAAI,EAAE,cAAc,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC;AAE7F,IAAA,cAAS,EAAC,EAAE,UAAU,EAAE,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,GAAG,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC,CAAC"}
package/jest.config.js ADDED
@@ -0,0 +1,8 @@
1
+ /** @type {import('ts-jest').JestConfigWithTsJest} */
2
+ module.exports = {
3
+ preset: 'ts-jest',
4
+ testEnvironment: 'node',
5
+ testMatch: ['**/*.test.ts'],
6
+ moduleFileExtensions: ['ts', 'js'],
7
+ testTimeout: 10000,
8
+ };
package/package.json CHANGED
@@ -1,6 +1,39 @@
1
1
  {
2
2
  "name": "@cmdctrl/omp",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "0.1.0",
4
+ "description": "CmdCtrl daemon for oh-my-pi (omp)",
5
+ "main": "./dist/index.js",
6
+ "bin": {
7
+ "cmdctrl-omp": "./dist/index.js"
8
+ },
9
+ "scripts": {
10
+ "build": "tsc",
11
+ "start": "node dist/index.js",
12
+ "test": "jest",
13
+ "clean": "rm -rf dist",
14
+ "prepublishOnly": "npm run build && node -e \"const p=require(\\\"./package.json\\\"); const bad=Object.entries(p.dependencies||{}).filter(([,v])=>v.startsWith(\\\"file:\\\")); if(bad.length){console.error(\\\"ERROR: file: dependencies are not allowed in published packages:\\\",bad.map(([k,v])=>k+\\\"=\\\"+v).join(\\\", \\\")); process.exit(1)}\""
15
+ },
16
+ "keywords": [
17
+ "cmdctrl",
18
+ "daemon",
19
+ "omp",
20
+ "oh-my-pi",
21
+ "coding-agent",
22
+ "ai",
23
+ "agent"
24
+ ],
25
+ "license": "MIT",
26
+ "dependencies": {
27
+ "@cmdctrl/pi": "^0.3.0"
28
+ },
29
+ "devDependencies": {
30
+ "@types/jest": "^29.5.14",
31
+ "@types/node": "^22.10.2",
32
+ "jest": "^29.7.0",
33
+ "ts-jest": "^29.2.5",
34
+ "typescript": "^5.7.2"
35
+ },
36
+ "engines": {
37
+ "node": "^22.23.4 || ^24.22.1 || >=26.12.1"
38
+ }
39
+ }
@@ -0,0 +1,13 @@
1
+ const runDaemon = jest.fn();
2
+ jest.mock('@cmdctrl/pi', () => ({ runDaemon }));
3
+
4
+ test('cmdctrl-omp runs the pi daemon as omp, at its own version', () => {
5
+ require('./index');
6
+ expect(runDaemon).toHaveBeenCalledTimes(1);
7
+ expect(runDaemon).toHaveBeenCalledWith({
8
+ daemonName: 'omp',
9
+ agentType: 'omp',
10
+ bin: 'omp',
11
+ version: require('../package.json').version,
12
+ });
13
+ });
package/src/index.ts ADDED
@@ -0,0 +1,16 @@
1
+ #!/usr/bin/env node
2
+
3
+ /**
4
+ * CmdCtrl daemon for oh-my-pi (`omp`): `@cmdctrl/pi`'s daemon, registered as
5
+ * its own device so one machine can run pi and omp side by side.
6
+ */
7
+
8
+ import { readFileSync } from 'fs';
9
+ import { join } from 'path';
10
+ import { runDaemon } from '@cmdctrl/pi';
11
+
12
+ // This package's version, not @cmdctrl/pi's: the server checks it for updates
13
+ // and a self-update reinstalls @cmdctrl/omp against it.
14
+ const { version } = JSON.parse(readFileSync(join(__dirname, '..', 'package.json'), 'utf-8'));
15
+
16
+ runDaemon({ daemonName: 'omp', agentType: 'omp', bin: 'omp', version });
package/tsconfig.json ADDED
@@ -0,0 +1,18 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "ES2022",
4
+ "module": "commonjs",
5
+ "lib": ["ES2022"],
6
+ "outDir": "./dist",
7
+ "rootDir": "./src",
8
+ "strict": true,
9
+ "esModuleInterop": true,
10
+ "skipLibCheck": true,
11
+ "forceConsistentCasingInFileNames": true,
12
+ "resolveJsonModule": true,
13
+ "declaration": true,
14
+ "sourceMap": true
15
+ },
16
+ "include": ["src/**/*"],
17
+ "exclude": ["node_modules", "dist", "src/**/*.test.ts", "src/**/*.fixture.ts"]
18
+ }