@blunking/codexlink 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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Mayk Biletti / BLUN
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,127 @@
1
+ <div align="center">
2
+
3
+ # CodexLink
4
+
5
+ **Your agent in your pocket.**
6
+
7
+ [![MIT License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
8
+ [![Powered by BLUN](https://img.shields.io/badge/Powered%20by-BLUN-22D3EE.svg)](https://blun.ai)
9
+
10
+ </div>
11
+
12
+ CodexLink is the BLUN launcher for one visible CLI session with optional Telegram delivery.
13
+
14
+ It keeps transport and queueing around the operator, without spinning up a hidden second session.
15
+
16
+ ## Install
17
+
18
+ From GitHub:
19
+
20
+ ```powershell
21
+ npm install -g github:maykbiletti/codexlink
22
+ ```
23
+
24
+ From npm:
25
+
26
+ ```powershell
27
+ npm install -g @blunking/codexlink
28
+ ```
29
+
30
+ Local development:
31
+
32
+ ```powershell
33
+ cd codexlink
34
+ npm install
35
+ npm link
36
+ ```
37
+
38
+ ## Commands
39
+
40
+ Normal startup:
41
+
42
+ ```powershell
43
+ blun-codex
44
+ ```
45
+
46
+ Alias:
47
+
48
+ ```powershell
49
+ codexlink
50
+ ```
51
+
52
+ Telegram mode:
53
+
54
+ ```powershell
55
+ blun-codex telegram-plugin
56
+ ```
57
+
58
+ Legacy equivalent:
59
+
60
+ ```powershell
61
+ blun-codex --telegram plugin
62
+ ```
63
+
64
+ Status:
65
+
66
+ ```powershell
67
+ blun-codex telegram-status
68
+ ```
69
+
70
+ Doctor:
71
+
72
+ ```powershell
73
+ blun-codex telegram-doctor
74
+ ```
75
+
76
+ Dry run:
77
+
78
+ ```powershell
79
+ blun-codex telegram-plugin --print-only
80
+ ```
81
+
82
+ ## What it does
83
+
84
+ - starts one consistent local CLI runtime
85
+ - writes a launch record into `.codex/runtimes/default/`
86
+ - keeps Telegram queue state under `.codex/channels/telegram-default/`
87
+ - attaches Telegram delivery to the same visible session
88
+ - keeps poller, dispatcher, and reply relay separate from the foreground operator
89
+
90
+ ## What it does not do
91
+
92
+ - no hidden autonomous answer bot
93
+ - no second shadow session
94
+ - no per-agent internal company presets in the public package
95
+
96
+ ## Public profile
97
+
98
+ The shipped default profile is intentionally generic:
99
+
100
+ - display name: `CodexLink`
101
+ - lane: `general`
102
+ - workspace: current directory by default
103
+ - model: inherited from the local host unless explicitly set
104
+
105
+ If you need custom paths or lane rules, add your own profile JSON next to `profiles/default.json`.
106
+
107
+ ## Telegram plugin folder
108
+
109
+ The bundled plugin lives under `telegram-plugin/` and contains:
110
+
111
+ - `.codex-plugin/plugin.json`
112
+ - `.mcp.json`
113
+ - `server.js`
114
+ - sidecars and bridge helpers
115
+
116
+ ## Requirements
117
+
118
+ - Windows PowerShell
119
+ - Node.js 20+
120
+ - a working local `codex` command in `PATH`
121
+ - a Telegram bot token when Telegram mode is enabled
122
+
123
+ ## Notes
124
+
125
+ - the package currently targets local Windows operators first
126
+ - the package is installable from GitHub before registry publishing
127
+ - once an npm token is available, the same package can be published without changing the command shape
@@ -0,0 +1,26 @@
1
+ #!/usr/bin/env node
2
+
3
+ const { spawnSync } = require("node:child_process");
4
+ const path = require("node:path");
5
+ const process = require("node:process");
6
+
7
+ const runtimeRoot = path.resolve(__dirname, "..");
8
+ const scriptPath = path.join(runtimeRoot, "blun-codex.ps1");
9
+ const shell = process.platform === "win32" ? "powershell.exe" : "pwsh";
10
+
11
+ const result = spawnSync(
12
+ shell,
13
+ ["-ExecutionPolicy", "Bypass", "-File", scriptPath, ...process.argv.slice(2)],
14
+ {
15
+ cwd: process.cwd(),
16
+ stdio: "inherit",
17
+ env: process.env
18
+ }
19
+ );
20
+
21
+ if (result.error) {
22
+ console.error(result.error.message);
23
+ process.exit(1);
24
+ }
25
+
26
+ process.exit(result.status ?? 0);
package/blun-codex.cmd ADDED
@@ -0,0 +1,3 @@
1
+ @echo off
2
+ setlocal
3
+ powershell -ExecutionPolicy Bypass -File "%~dp0blun-codex.ps1" %*
package/blun-codex.ps1 ADDED
@@ -0,0 +1,110 @@
1
+ $ErrorActionPreference = "Stop"
2
+
3
+ $runtimeRoot = Split-Path -Parent $MyInvocation.MyCommand.Path
4
+ $profile = "default"
5
+ $telegramMode = "inherit"
6
+ $workspace = ""
7
+ $remoteControl = $false
8
+ $printOnly = $false
9
+ $promptParts = @()
10
+ $parsedArgs = @($args)
11
+
12
+ if ($parsedArgs.Count -gt 0) {
13
+ switch ($parsedArgs[0]) {
14
+ "telegram-status" {
15
+ $commandArgs = @()
16
+ if ($parsedArgs.Count -gt 1) {
17
+ $commandArgs = @($parsedArgs[1..($parsedArgs.Count - 1)])
18
+ }
19
+ & powershell -ExecutionPolicy Bypass -File (Join-Path $runtimeRoot "telegram-status.ps1") @commandArgs
20
+ exit $LASTEXITCODE
21
+ }
22
+ "telegram-doctor" {
23
+ $commandArgs = @()
24
+ if ($parsedArgs.Count -gt 1) {
25
+ $commandArgs = @($parsedArgs[1..($parsedArgs.Count - 1)])
26
+ }
27
+ & powershell -ExecutionPolicy Bypass -File (Join-Path $runtimeRoot "telegram-doctor.ps1") @commandArgs
28
+ exit $LASTEXITCODE
29
+ }
30
+ "doctor" {
31
+ $commandArgs = @()
32
+ if ($parsedArgs.Count -gt 1) {
33
+ $commandArgs = @($parsedArgs[1..($parsedArgs.Count - 1)])
34
+ }
35
+ & powershell -ExecutionPolicy Bypass -File (Join-Path $runtimeRoot "telegram-doctor.ps1") @commandArgs
36
+ exit $LASTEXITCODE
37
+ }
38
+ "telegram-plugin" {
39
+ $telegramMode = "plugin"
40
+ if ($parsedArgs.Count -gt 1) {
41
+ $parsedArgs = @($parsedArgs[1..($parsedArgs.Count - 1)])
42
+ } else {
43
+ $parsedArgs = @()
44
+ }
45
+ }
46
+ }
47
+ }
48
+
49
+ for ($i = 0; $i -lt $parsedArgs.Count; $i++) {
50
+ $arg = $parsedArgs[$i]
51
+ switch ($arg) {
52
+ "--profile" {
53
+ $i++
54
+ if ($i -ge $parsedArgs.Count) { throw "--profile requires a value" }
55
+ $profile = $parsedArgs[$i]
56
+ continue
57
+ }
58
+ "--telegram" {
59
+ $i++
60
+ if ($i -ge $parsedArgs.Count) { throw "--telegram requires a value" }
61
+ $telegramMode = $parsedArgs[$i]
62
+ continue
63
+ }
64
+ "--workspace" {
65
+ $i++
66
+ if ($i -ge $parsedArgs.Count) { throw "--workspace requires a value" }
67
+ $workspace = $parsedArgs[$i]
68
+ continue
69
+ }
70
+ "--remote-control" {
71
+ $remoteControl = $true
72
+ continue
73
+ }
74
+ "--print-only" {
75
+ $printOnly = $true
76
+ continue
77
+ }
78
+ default {
79
+ $promptParts += $arg
80
+ }
81
+ }
82
+ }
83
+
84
+ $invokeArgs = @(
85
+ "-ExecutionPolicy", "Bypass",
86
+ "-File", (Join-Path $runtimeRoot "start-codex-agent.ps1"),
87
+ "-Agent", $profile,
88
+ "-TelegramMode", $telegramMode
89
+ )
90
+
91
+ if ($workspace) {
92
+ $invokeArgs += "-Workspace"
93
+ $invokeArgs += $workspace
94
+ }
95
+
96
+ if ($remoteControl) {
97
+ $invokeArgs += "-RemoteControl"
98
+ }
99
+
100
+ if ($printOnly) {
101
+ $invokeArgs += "-PrintOnly"
102
+ }
103
+
104
+ if ($promptParts.Count -gt 0) {
105
+ $invokeArgs += "-Prompt"
106
+ $invokeArgs += ($promptParts -join " ")
107
+ }
108
+
109
+ & powershell @invokeArgs
110
+ exit $LASTEXITCODE
package/package.json ADDED
@@ -0,0 +1,37 @@
1
+ {
2
+ "name": "@blunking/codexlink",
3
+ "version": "0.1.0",
4
+ "description": "BLUN CLI launcher with Telegram channel support for one visible session.",
5
+ "license": "MIT",
6
+ "private": false,
7
+ "bin": {
8
+ "blun-codex": "./bin/blun-codex.js",
9
+ "codexlink": "./bin/blun-codex.js"
10
+ },
11
+ "files": [
12
+ "bin/",
13
+ "profiles/",
14
+ "telegram-plugin/",
15
+ "README.md",
16
+ "LICENSE",
17
+ "blun-codex.cmd",
18
+ "blun-codex.ps1",
19
+ "start-codex-agent.ps1",
20
+ "start-codex.cmd",
21
+ "telegram-status.ps1",
22
+ "telegram-doctor.ps1"
23
+ ],
24
+ "keywords": [
25
+ "blun",
26
+ "codexlink",
27
+ "telegram",
28
+ "runtime",
29
+ "cli"
30
+ ],
31
+ "dependencies": {
32
+ "@modelcontextprotocol/sdk": "^1.0.0"
33
+ },
34
+ "engines": {
35
+ "node": ">=20"
36
+ }
37
+ }
@@ -0,0 +1,20 @@
1
+ {
2
+ "agent_name": "default",
3
+ "display_name": "CodexLink",
4
+ "lane": "general",
5
+ "workspace": "",
6
+ "model": "",
7
+ "reasoning_effort": "xhigh",
8
+ "sandbox": "danger-full-access",
9
+ "approval_policy": "never",
10
+ "personality": "friendly",
11
+ "mnemo": {
12
+ "inherit": true,
13
+ "notes": "Public default profile. Uses the host-default Mnemo binding unless a custom profile is selected."
14
+ },
15
+ "telegram": {
16
+ "enabled": false,
17
+ "state_dir": "",
18
+ "allowed_chat_id": ""
19
+ }
20
+ }