@blunking/codexlink 0.1.19 → 0.1.20
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 +222 -220
- package/blun-codex.ps1 +140 -140
- package/package.json +37 -37
- package/start-codex-agent.ps1 +715 -715
- package/telegram-doctor.ps1 +205 -205
- package/telegram-plugin/lib/bridge.js +14 -1
- package/telegram-plugin/lib/storage.js +25 -25
- package/telegram-setup.ps1 +143 -143
- package/telegram-status.ps1 +256 -256
- package/telegram-title-embed.ps1 +98 -98
- package/telegram-title-watcher.ps1 +102 -102
package/blun-codex.ps1
CHANGED
|
@@ -1,140 +1,140 @@
|
|
|
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
|
-
$skipTelegramSetup = $false
|
|
10
|
-
$promptParts = @()
|
|
11
|
-
$parsedArgs = @($args)
|
|
12
|
-
|
|
13
|
-
if ($parsedArgs.Count -gt 0) {
|
|
14
|
-
switch ($parsedArgs[0]) {
|
|
15
|
-
"telegram-status" {
|
|
16
|
-
$commandArgs = @()
|
|
17
|
-
if ($parsedArgs.Count -gt 1) {
|
|
18
|
-
$commandArgs = @($parsedArgs[1..($parsedArgs.Count - 1)])
|
|
19
|
-
}
|
|
20
|
-
& powershell -ExecutionPolicy Bypass -File (Join-Path $runtimeRoot "telegram-status.ps1") @commandArgs
|
|
21
|
-
exit $LASTEXITCODE
|
|
22
|
-
}
|
|
23
|
-
"telegram-doctor" {
|
|
24
|
-
$commandArgs = @()
|
|
25
|
-
if ($parsedArgs.Count -gt 1) {
|
|
26
|
-
$commandArgs = @($parsedArgs[1..($parsedArgs.Count - 1)])
|
|
27
|
-
}
|
|
28
|
-
& powershell -ExecutionPolicy Bypass -File (Join-Path $runtimeRoot "telegram-doctor.ps1") @commandArgs
|
|
29
|
-
exit $LASTEXITCODE
|
|
30
|
-
}
|
|
31
|
-
"telegram-setup" {
|
|
32
|
-
$commandArgs = @()
|
|
33
|
-
if ($parsedArgs.Count -gt 1) {
|
|
34
|
-
$commandArgs = @($parsedArgs[1..($parsedArgs.Count - 1)])
|
|
35
|
-
}
|
|
36
|
-
& powershell -ExecutionPolicy Bypass -File (Join-Path $runtimeRoot "telegram-setup.ps1") @commandArgs
|
|
37
|
-
exit $LASTEXITCODE
|
|
38
|
-
}
|
|
39
|
-
"doctor" {
|
|
40
|
-
$commandArgs = @()
|
|
41
|
-
if ($parsedArgs.Count -gt 1) {
|
|
42
|
-
$commandArgs = @($parsedArgs[1..($parsedArgs.Count - 1)])
|
|
43
|
-
}
|
|
44
|
-
& powershell -ExecutionPolicy Bypass -File (Join-Path $runtimeRoot "telegram-doctor.ps1") @commandArgs
|
|
45
|
-
exit $LASTEXITCODE
|
|
46
|
-
}
|
|
47
|
-
"telegram-plugin" {
|
|
48
|
-
$telegramMode = "plugin"
|
|
49
|
-
if ($parsedArgs.Count -gt 1) {
|
|
50
|
-
$parsedArgs = @($parsedArgs[1..($parsedArgs.Count - 1)])
|
|
51
|
-
} else {
|
|
52
|
-
$parsedArgs = @()
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
for ($i = 0; $i -lt $parsedArgs.Count; $i++) {
|
|
59
|
-
$arg = $parsedArgs[$i]
|
|
60
|
-
switch ($arg) {
|
|
61
|
-
"--profile" {
|
|
62
|
-
$i++
|
|
63
|
-
if ($i -ge $parsedArgs.Count) { throw "--profile requires a value" }
|
|
64
|
-
$profile = $parsedArgs[$i]
|
|
65
|
-
continue
|
|
66
|
-
}
|
|
67
|
-
"--telegram" {
|
|
68
|
-
$i++
|
|
69
|
-
if ($i -ge $parsedArgs.Count) { throw "--telegram requires a value" }
|
|
70
|
-
$telegramMode = $parsedArgs[$i]
|
|
71
|
-
continue
|
|
72
|
-
}
|
|
73
|
-
"--workspace" {
|
|
74
|
-
$i++
|
|
75
|
-
if ($i -ge $parsedArgs.Count) { throw "--workspace requires a value" }
|
|
76
|
-
$workspace = $parsedArgs[$i]
|
|
77
|
-
continue
|
|
78
|
-
}
|
|
79
|
-
"--remote-control" {
|
|
80
|
-
$remoteControl = $true
|
|
81
|
-
continue
|
|
82
|
-
}
|
|
83
|
-
"--print-only" {
|
|
84
|
-
$printOnly = $true
|
|
85
|
-
continue
|
|
86
|
-
}
|
|
87
|
-
"--skip-telegram-setup" {
|
|
88
|
-
$skipTelegramSetup = $true
|
|
89
|
-
continue
|
|
90
|
-
}
|
|
91
|
-
"telegram-plugin" {
|
|
92
|
-
$telegramMode = "plugin"
|
|
93
|
-
continue
|
|
94
|
-
}
|
|
95
|
-
default {
|
|
96
|
-
$promptParts += $arg
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
if ($telegramMode -eq "plugin" -and -not $skipTelegramSetup -and -not $printOnly) {
|
|
102
|
-
$setupArgs = @(
|
|
103
|
-
"-ExecutionPolicy", "Bypass",
|
|
104
|
-
"-File", (Join-Path $runtimeRoot "telegram-setup.ps1"),
|
|
105
|
-
"-Profile", $profile,
|
|
106
|
-
"-EnsureConfigured"
|
|
107
|
-
)
|
|
108
|
-
& powershell @setupArgs
|
|
109
|
-
if ($LASTEXITCODE -ne 0) {
|
|
110
|
-
exit $LASTEXITCODE
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
$invokeArgs = @(
|
|
115
|
-
"-ExecutionPolicy", "Bypass",
|
|
116
|
-
"-File", (Join-Path $runtimeRoot "start-codex-agent.ps1"),
|
|
117
|
-
"-Agent", $profile,
|
|
118
|
-
"-TelegramMode", $telegramMode
|
|
119
|
-
)
|
|
120
|
-
|
|
121
|
-
if ($workspace) {
|
|
122
|
-
$invokeArgs += "-Workspace"
|
|
123
|
-
$invokeArgs += $workspace
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
if ($remoteControl) {
|
|
127
|
-
$invokeArgs += "-RemoteControl"
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
if ($printOnly) {
|
|
131
|
-
$invokeArgs += "-PrintOnly"
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
if ($promptParts.Count -gt 0) {
|
|
135
|
-
$invokeArgs += "-Prompt"
|
|
136
|
-
$invokeArgs += ($promptParts -join " ")
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
& powershell @invokeArgs
|
|
140
|
-
exit $LASTEXITCODE
|
|
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
|
+
$skipTelegramSetup = $false
|
|
10
|
+
$promptParts = @()
|
|
11
|
+
$parsedArgs = @($args)
|
|
12
|
+
|
|
13
|
+
if ($parsedArgs.Count -gt 0) {
|
|
14
|
+
switch ($parsedArgs[0]) {
|
|
15
|
+
"telegram-status" {
|
|
16
|
+
$commandArgs = @()
|
|
17
|
+
if ($parsedArgs.Count -gt 1) {
|
|
18
|
+
$commandArgs = @($parsedArgs[1..($parsedArgs.Count - 1)])
|
|
19
|
+
}
|
|
20
|
+
& powershell -ExecutionPolicy Bypass -File (Join-Path $runtimeRoot "telegram-status.ps1") @commandArgs
|
|
21
|
+
exit $LASTEXITCODE
|
|
22
|
+
}
|
|
23
|
+
"telegram-doctor" {
|
|
24
|
+
$commandArgs = @()
|
|
25
|
+
if ($parsedArgs.Count -gt 1) {
|
|
26
|
+
$commandArgs = @($parsedArgs[1..($parsedArgs.Count - 1)])
|
|
27
|
+
}
|
|
28
|
+
& powershell -ExecutionPolicy Bypass -File (Join-Path $runtimeRoot "telegram-doctor.ps1") @commandArgs
|
|
29
|
+
exit $LASTEXITCODE
|
|
30
|
+
}
|
|
31
|
+
"telegram-setup" {
|
|
32
|
+
$commandArgs = @()
|
|
33
|
+
if ($parsedArgs.Count -gt 1) {
|
|
34
|
+
$commandArgs = @($parsedArgs[1..($parsedArgs.Count - 1)])
|
|
35
|
+
}
|
|
36
|
+
& powershell -ExecutionPolicy Bypass -File (Join-Path $runtimeRoot "telegram-setup.ps1") @commandArgs
|
|
37
|
+
exit $LASTEXITCODE
|
|
38
|
+
}
|
|
39
|
+
"doctor" {
|
|
40
|
+
$commandArgs = @()
|
|
41
|
+
if ($parsedArgs.Count -gt 1) {
|
|
42
|
+
$commandArgs = @($parsedArgs[1..($parsedArgs.Count - 1)])
|
|
43
|
+
}
|
|
44
|
+
& powershell -ExecutionPolicy Bypass -File (Join-Path $runtimeRoot "telegram-doctor.ps1") @commandArgs
|
|
45
|
+
exit $LASTEXITCODE
|
|
46
|
+
}
|
|
47
|
+
"telegram-plugin" {
|
|
48
|
+
$telegramMode = "plugin"
|
|
49
|
+
if ($parsedArgs.Count -gt 1) {
|
|
50
|
+
$parsedArgs = @($parsedArgs[1..($parsedArgs.Count - 1)])
|
|
51
|
+
} else {
|
|
52
|
+
$parsedArgs = @()
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
for ($i = 0; $i -lt $parsedArgs.Count; $i++) {
|
|
59
|
+
$arg = $parsedArgs[$i]
|
|
60
|
+
switch ($arg) {
|
|
61
|
+
"--profile" {
|
|
62
|
+
$i++
|
|
63
|
+
if ($i -ge $parsedArgs.Count) { throw "--profile requires a value" }
|
|
64
|
+
$profile = $parsedArgs[$i]
|
|
65
|
+
continue
|
|
66
|
+
}
|
|
67
|
+
"--telegram" {
|
|
68
|
+
$i++
|
|
69
|
+
if ($i -ge $parsedArgs.Count) { throw "--telegram requires a value" }
|
|
70
|
+
$telegramMode = $parsedArgs[$i]
|
|
71
|
+
continue
|
|
72
|
+
}
|
|
73
|
+
"--workspace" {
|
|
74
|
+
$i++
|
|
75
|
+
if ($i -ge $parsedArgs.Count) { throw "--workspace requires a value" }
|
|
76
|
+
$workspace = $parsedArgs[$i]
|
|
77
|
+
continue
|
|
78
|
+
}
|
|
79
|
+
"--remote-control" {
|
|
80
|
+
$remoteControl = $true
|
|
81
|
+
continue
|
|
82
|
+
}
|
|
83
|
+
"--print-only" {
|
|
84
|
+
$printOnly = $true
|
|
85
|
+
continue
|
|
86
|
+
}
|
|
87
|
+
"--skip-telegram-setup" {
|
|
88
|
+
$skipTelegramSetup = $true
|
|
89
|
+
continue
|
|
90
|
+
}
|
|
91
|
+
"telegram-plugin" {
|
|
92
|
+
$telegramMode = "plugin"
|
|
93
|
+
continue
|
|
94
|
+
}
|
|
95
|
+
default {
|
|
96
|
+
$promptParts += $arg
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
if ($telegramMode -eq "plugin" -and -not $skipTelegramSetup -and -not $printOnly) {
|
|
102
|
+
$setupArgs = @(
|
|
103
|
+
"-ExecutionPolicy", "Bypass",
|
|
104
|
+
"-File", (Join-Path $runtimeRoot "telegram-setup.ps1"),
|
|
105
|
+
"-Profile", $profile,
|
|
106
|
+
"-EnsureConfigured"
|
|
107
|
+
)
|
|
108
|
+
& powershell @setupArgs
|
|
109
|
+
if ($LASTEXITCODE -ne 0) {
|
|
110
|
+
exit $LASTEXITCODE
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
$invokeArgs = @(
|
|
115
|
+
"-ExecutionPolicy", "Bypass",
|
|
116
|
+
"-File", (Join-Path $runtimeRoot "start-codex-agent.ps1"),
|
|
117
|
+
"-Agent", $profile,
|
|
118
|
+
"-TelegramMode", $telegramMode
|
|
119
|
+
)
|
|
120
|
+
|
|
121
|
+
if ($workspace) {
|
|
122
|
+
$invokeArgs += "-Workspace"
|
|
123
|
+
$invokeArgs += $workspace
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
if ($remoteControl) {
|
|
127
|
+
$invokeArgs += "-RemoteControl"
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
if ($printOnly) {
|
|
131
|
+
$invokeArgs += "-PrintOnly"
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
if ($promptParts.Count -gt 0) {
|
|
135
|
+
$invokeArgs += "-Prompt"
|
|
136
|
+
$invokeArgs += ($promptParts -join " ")
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
& powershell @invokeArgs
|
|
140
|
+
exit $LASTEXITCODE
|
package/package.json
CHANGED
|
@@ -1,41 +1,41 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@blunking/codexlink",
|
|
3
|
-
"version": "0.1.
|
|
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/default.json",
|
|
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-title-embed.ps1",
|
|
22
|
-
"telegram-status.ps1",
|
|
23
|
-
"telegram-doctor.ps1",
|
|
1
|
+
{
|
|
2
|
+
"name": "@blunking/codexlink",
|
|
3
|
+
"version": "0.1.20",
|
|
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/default.json",
|
|
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-title-embed.ps1",
|
|
22
|
+
"telegram-status.ps1",
|
|
23
|
+
"telegram-doctor.ps1",
|
|
24
24
|
"telegram-setup.ps1",
|
|
25
25
|
"telegram-console-input.ps1",
|
|
26
26
|
"telegram-title-watcher.ps1"
|
|
27
27
|
],
|
|
28
|
-
"keywords": [
|
|
29
|
-
"blun",
|
|
30
|
-
"codexlink",
|
|
31
|
-
"telegram",
|
|
32
|
-
"runtime",
|
|
33
|
-
"cli"
|
|
34
|
-
],
|
|
35
|
-
"dependencies": {
|
|
36
|
-
"@modelcontextprotocol/sdk": "^1.0.0"
|
|
37
|
-
},
|
|
38
|
-
"engines": {
|
|
39
|
-
"node": ">=20"
|
|
40
|
-
}
|
|
41
|
-
}
|
|
28
|
+
"keywords": [
|
|
29
|
+
"blun",
|
|
30
|
+
"codexlink",
|
|
31
|
+
"telegram",
|
|
32
|
+
"runtime",
|
|
33
|
+
"cli"
|
|
34
|
+
],
|
|
35
|
+
"dependencies": {
|
|
36
|
+
"@modelcontextprotocol/sdk": "^1.0.0"
|
|
37
|
+
},
|
|
38
|
+
"engines": {
|
|
39
|
+
"node": ">=20"
|
|
40
|
+
}
|
|
41
|
+
}
|