@shadowob/connector 1.1.7 → 1.1.8

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/dist/index.cjs CHANGED
@@ -20,6 +20,11 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
20
20
  // src/index.ts
21
21
  var index_exports = {};
22
22
  __export(index_exports, {
23
+ CONNECTOR_RUNTIME_CATALOG: () => CONNECTOR_RUNTIME_CATALOG,
24
+ connectorRuntimeById: () => connectorRuntimeById,
25
+ connectorRuntimeCatalog: () => connectorRuntimeCatalog,
26
+ connectorRuntimeInstallCommand: () => connectorRuntimeInstallCommand,
27
+ connectorRuntimeInstallCommands: () => connectorRuntimeInstallCommands,
23
28
  createConnectorPlan: () => createConnectorPlan,
24
29
  createConnectorPlans: () => createConnectorPlans
25
30
  });
@@ -31,6 +36,184 @@ var CC_CONNECT_FORK_REF = "63b5d59127b3004bc7002f2d51892b1f2a91ea83";
31
36
  var CC_CONNECT_FORK_SHORT_REF = CC_CONNECT_FORK_REF.slice(0, 7);
32
37
  var CC_CONNECT_FORK_DOCS_URL = `https://github.com/${CC_CONNECT_FORK_REPO}/blob/main/docs/shadowob.md`;
33
38
 
39
+ // src/runtime-catalog.ts
40
+ var CONNECTOR_RUNTIME_CATALOG = [
41
+ {
42
+ id: "openclaw",
43
+ label: "OpenClaw",
44
+ kind: "openclaw",
45
+ command: "openclaw",
46
+ iconId: "openclaw",
47
+ install: {
48
+ commands: {
49
+ darwin: ["curl -fsSL https://openclaw.ai/install.sh | bash -s -- --no-onboard"],
50
+ linux: ["curl -fsSL https://openclaw.ai/install.sh | bash -s -- --no-onboard"],
51
+ win32: [
52
+ 'powershell -NoProfile -ExecutionPolicy Bypass -Command "& ([scriptblock]::Create((iwr -useb https://openclaw.ai/install.ps1))) -NoOnboard"'
53
+ ],
54
+ default: ["curl -fsSL https://openclaw.ai/install.sh | bash -s -- --no-onboard"]
55
+ },
56
+ helpUrl: "https://docs.openclaw.ai/install/index"
57
+ }
58
+ },
59
+ {
60
+ id: "hermes",
61
+ label: "Hermes Agent",
62
+ kind: "cli",
63
+ command: "hermes",
64
+ iconId: "hermes",
65
+ install: {
66
+ commands: {
67
+ darwin: [
68
+ "curl -fsSL https://raw.githubusercontent.com/NousResearch/hermes-agent/main/scripts/install.sh | bash"
69
+ ],
70
+ linux: [
71
+ "curl -fsSL https://raw.githubusercontent.com/NousResearch/hermes-agent/main/scripts/install.sh | bash"
72
+ ],
73
+ win32: [
74
+ 'powershell -NoProfile -ExecutionPolicy Bypass -Command "iex (irm https://raw.githubusercontent.com/NousResearch/hermes-agent/main/scripts/install.ps1)"'
75
+ ],
76
+ default: ["pipx install hermes-agent"]
77
+ },
78
+ helpUrl: "https://hermes-agent.nousresearch.com/docs/getting-started/installation"
79
+ }
80
+ },
81
+ {
82
+ id: "claude-code",
83
+ label: "Claude Code",
84
+ kind: "cli",
85
+ command: "claude",
86
+ iconId: "claude-code",
87
+ install: {
88
+ commands: {
89
+ default: ["npm install -g @anthropic-ai/claude-code"]
90
+ },
91
+ helpUrl: "https://code.claude.com/docs/en/installation"
92
+ }
93
+ },
94
+ {
95
+ id: "codex",
96
+ label: "Codex CLI",
97
+ kind: "cli",
98
+ command: "codex",
99
+ iconId: "codex",
100
+ install: {
101
+ commands: {
102
+ default: ["npm install -g @openai/codex"]
103
+ },
104
+ helpUrl: "https://help.openai.com/en/articles/11096431-openai-codex-cli-getting-started"
105
+ }
106
+ },
107
+ {
108
+ id: "opencode",
109
+ label: "OpenCode",
110
+ kind: "cli",
111
+ command: "opencode",
112
+ iconId: "opencode",
113
+ install: {
114
+ commands: {
115
+ default: ["npm install -g opencode-ai"]
116
+ },
117
+ helpUrl: "https://opencli.co/cli/opencode"
118
+ }
119
+ },
120
+ {
121
+ id: "gemini",
122
+ label: "Gemini CLI",
123
+ kind: "cli",
124
+ command: "gemini",
125
+ iconId: "gemini",
126
+ install: {
127
+ commands: {
128
+ default: ["npm install -g @google/gemini-cli"]
129
+ },
130
+ helpUrl: "https://github.com/google-gemini/gemini-cli"
131
+ }
132
+ },
133
+ {
134
+ id: "cursor",
135
+ label: "Cursor CLI",
136
+ kind: "cli",
137
+ command: "cursor-agent",
138
+ commands: ["cursor-agent", "cursor"],
139
+ iconId: "cursor",
140
+ install: {
141
+ commands: {
142
+ default: ["curl https://cursor.com/install -fsS | bash"],
143
+ win32: ["curl.exe https://cursor.com/install -fsS | bash"]
144
+ },
145
+ helpUrl: "https://docs.cursor.com/en/cli/installation"
146
+ }
147
+ },
148
+ {
149
+ id: "kimi",
150
+ label: "Kimi Code",
151
+ kind: "cli",
152
+ command: "kimi",
153
+ iconId: "kimi",
154
+ install: {
155
+ commands: {
156
+ darwin: ["curl -LsSf https://code.kimi.com/install.sh | bash"],
157
+ linux: ["curl -LsSf https://code.kimi.com/install.sh | bash"],
158
+ win32: [
159
+ 'powershell -NoProfile -ExecutionPolicy Bypass -Command "irm https://code.kimi.com/install.ps1 | iex"'
160
+ ]
161
+ },
162
+ helpUrl: "https://www.kimi.com/code/docs/en/"
163
+ }
164
+ },
165
+ {
166
+ id: "copilot",
167
+ label: "GitHub Copilot CLI",
168
+ kind: "cli",
169
+ command: "copilot",
170
+ iconId: "copilot",
171
+ install: {
172
+ commands: {
173
+ darwin: ["brew install copilot-cli", "curl -fsSL https://gh.io/copilot-install | bash"],
174
+ linux: ["brew install copilot-cli", "curl -fsSL https://gh.io/copilot-install | bash"],
175
+ win32: ["winget install GitHub.Copilot.Prerelease"]
176
+ },
177
+ helpUrl: "https://docs.github.com/en/copilot/how-tos/copilot-cli/install-copilot-cli"
178
+ }
179
+ },
180
+ {
181
+ id: "antigravity",
182
+ label: "Antigravity CLI",
183
+ kind: "cli",
184
+ command: "agy",
185
+ commands: ["agy", "antigravity"],
186
+ iconId: "antigravity",
187
+ install: {
188
+ commands: {
189
+ darwin: ["open https://www.antigravity.google/product/antigravity-cli"],
190
+ linux: ["xdg-open https://www.antigravity.google/product/antigravity-cli"],
191
+ win32: ["start https://www.antigravity.google/product/antigravity-cli"]
192
+ },
193
+ helpUrl: "https://www.antigravity.google/product/antigravity-cli"
194
+ }
195
+ }
196
+ ];
197
+ function connectorRuntimeCatalog() {
198
+ return CONNECTOR_RUNTIME_CATALOG.map((entry) => ({ ...entry }));
199
+ }
200
+ function connectorRuntimeById(runtimeId) {
201
+ if (!runtimeId) return null;
202
+ return CONNECTOR_RUNTIME_CATALOG.find((entry) => entry.id === runtimeId) ?? null;
203
+ }
204
+ function currentRuntimePlatform() {
205
+ return typeof process !== "undefined" && process.platform ? process.platform : "default";
206
+ }
207
+ function connectorRuntimeInstallCommands(runtimeId, targetPlatform = currentRuntimePlatform()) {
208
+ const runtime = connectorRuntimeById(runtimeId);
209
+ if (!runtime) return [];
210
+ const commands = runtime.install.commands;
211
+ return commands?.[targetPlatform] ?? commands?.default ?? [];
212
+ }
213
+ function connectorRuntimeInstallCommand(runtimeId, targetPlatform = currentRuntimePlatform()) {
214
+ return connectorRuntimeInstallCommands(runtimeId, targetPlatform)[0] ?? null;
215
+ }
216
+
34
217
  // src/index.ts
35
218
  var DEFAULT_SERVER_URL = "https://shadowob.com";
36
219
  var DEFAULT_WORK_DIR = ".";
@@ -92,7 +275,7 @@ function buildOpenClawPlan(input) {
92
275
  connectCommand,
93
276
  quickCommand,
94
277
  commands,
95
- configBlocks: [{ label: "openclaw.json", language: "json", content: jsonConfig }],
278
+ configBlocks: [{ label: "~/.openclaw/openclaw.json", language: "json", content: jsonConfig }],
96
279
  aiPrompt: [
97
280
  "Configure this Shadow Buddy in OpenClaw.",
98
281
  "",
@@ -327,6 +510,11 @@ function createConnectorPlans(input) {
327
510
  }
328
511
  // Annotate the CommonJS export names for ESM import in node:
329
512
  0 && (module.exports = {
513
+ CONNECTOR_RUNTIME_CATALOG,
514
+ connectorRuntimeById,
515
+ connectorRuntimeCatalog,
516
+ connectorRuntimeInstallCommand,
517
+ connectorRuntimeInstallCommands,
330
518
  createConnectorPlan,
331
519
  createConnectorPlans
332
520
  });
package/dist/index.d.cts CHANGED
@@ -1,3 +1,26 @@
1
+ type ConnectorRuntimeKind = 'openclaw' | 'cli';
2
+ type ConnectorRuntimeId = 'openclaw' | 'hermes' | 'claude-code' | 'codex' | 'opencode' | 'gemini' | 'cursor' | 'kimi' | 'copilot' | 'antigravity';
3
+ type ConnectorRuntimePlatform = NodeJS.Platform | 'default';
4
+ interface ConnectorRuntimeInstallSpec {
5
+ commands?: Partial<Record<ConnectorRuntimePlatform, string[]>>;
6
+ helpUrl: string;
7
+ }
8
+ interface ConnectorRuntimeCatalogEntry {
9
+ id: ConnectorRuntimeId;
10
+ label: string;
11
+ kind: ConnectorRuntimeKind;
12
+ command: string;
13
+ commands?: string[];
14
+ versionArgs?: string[];
15
+ iconId: string;
16
+ install: ConnectorRuntimeInstallSpec;
17
+ }
18
+ declare const CONNECTOR_RUNTIME_CATALOG: ConnectorRuntimeCatalogEntry[];
19
+ declare function connectorRuntimeCatalog(): ConnectorRuntimeCatalogEntry[];
20
+ declare function connectorRuntimeById(runtimeId: string | null | undefined): ConnectorRuntimeCatalogEntry | null;
21
+ declare function connectorRuntimeInstallCommands(runtimeId: string, targetPlatform?: ConnectorRuntimePlatform): string[];
22
+ declare function connectorRuntimeInstallCommand(runtimeId: string, targetPlatform?: ConnectorRuntimePlatform): string | null;
23
+
1
24
  type ShadowConnectorTarget = 'openclaw' | 'hermes' | 'cc-connect';
2
25
  interface ShadowConnectorInput {
3
26
  target: ShadowConnectorTarget;
@@ -32,4 +55,4 @@ interface ConnectorPlan {
32
55
  declare function createConnectorPlan(input: ShadowConnectorInput): ConnectorPlan;
33
56
  declare function createConnectorPlans(input: Omit<ShadowConnectorInput, 'target'>): ConnectorPlan[];
34
57
 
35
- export { type ConnectorCommand, type ConnectorConfigBlock, type ConnectorPlan, type ShadowConnectorInput, type ShadowConnectorTarget, createConnectorPlan, createConnectorPlans };
58
+ export { CONNECTOR_RUNTIME_CATALOG, type ConnectorCommand, type ConnectorConfigBlock, type ConnectorPlan, type ConnectorRuntimeCatalogEntry, type ConnectorRuntimeId, type ConnectorRuntimeInstallSpec, type ConnectorRuntimeKind, type ConnectorRuntimePlatform, type ShadowConnectorInput, type ShadowConnectorTarget, connectorRuntimeById, connectorRuntimeCatalog, connectorRuntimeInstallCommand, connectorRuntimeInstallCommands, createConnectorPlan, createConnectorPlans };
package/dist/index.d.ts CHANGED
@@ -1,3 +1,26 @@
1
+ type ConnectorRuntimeKind = 'openclaw' | 'cli';
2
+ type ConnectorRuntimeId = 'openclaw' | 'hermes' | 'claude-code' | 'codex' | 'opencode' | 'gemini' | 'cursor' | 'kimi' | 'copilot' | 'antigravity';
3
+ type ConnectorRuntimePlatform = NodeJS.Platform | 'default';
4
+ interface ConnectorRuntimeInstallSpec {
5
+ commands?: Partial<Record<ConnectorRuntimePlatform, string[]>>;
6
+ helpUrl: string;
7
+ }
8
+ interface ConnectorRuntimeCatalogEntry {
9
+ id: ConnectorRuntimeId;
10
+ label: string;
11
+ kind: ConnectorRuntimeKind;
12
+ command: string;
13
+ commands?: string[];
14
+ versionArgs?: string[];
15
+ iconId: string;
16
+ install: ConnectorRuntimeInstallSpec;
17
+ }
18
+ declare const CONNECTOR_RUNTIME_CATALOG: ConnectorRuntimeCatalogEntry[];
19
+ declare function connectorRuntimeCatalog(): ConnectorRuntimeCatalogEntry[];
20
+ declare function connectorRuntimeById(runtimeId: string | null | undefined): ConnectorRuntimeCatalogEntry | null;
21
+ declare function connectorRuntimeInstallCommands(runtimeId: string, targetPlatform?: ConnectorRuntimePlatform): string[];
22
+ declare function connectorRuntimeInstallCommand(runtimeId: string, targetPlatform?: ConnectorRuntimePlatform): string | null;
23
+
1
24
  type ShadowConnectorTarget = 'openclaw' | 'hermes' | 'cc-connect';
2
25
  interface ShadowConnectorInput {
3
26
  target: ShadowConnectorTarget;
@@ -32,4 +55,4 @@ interface ConnectorPlan {
32
55
  declare function createConnectorPlan(input: ShadowConnectorInput): ConnectorPlan;
33
56
  declare function createConnectorPlans(input: Omit<ShadowConnectorInput, 'target'>): ConnectorPlan[];
34
57
 
35
- export { type ConnectorCommand, type ConnectorConfigBlock, type ConnectorPlan, type ShadowConnectorInput, type ShadowConnectorTarget, createConnectorPlan, createConnectorPlans };
58
+ export { CONNECTOR_RUNTIME_CATALOG, type ConnectorCommand, type ConnectorConfigBlock, type ConnectorPlan, type ConnectorRuntimeCatalogEntry, type ConnectorRuntimeId, type ConnectorRuntimeInstallSpec, type ConnectorRuntimeKind, type ConnectorRuntimePlatform, type ShadowConnectorInput, type ShadowConnectorTarget, connectorRuntimeById, connectorRuntimeCatalog, connectorRuntimeInstallCommand, connectorRuntimeInstallCommands, createConnectorPlan, createConnectorPlans };
package/dist/index.js CHANGED
@@ -4,6 +4,184 @@ var CC_CONNECT_FORK_REF = "63b5d59127b3004bc7002f2d51892b1f2a91ea83";
4
4
  var CC_CONNECT_FORK_SHORT_REF = CC_CONNECT_FORK_REF.slice(0, 7);
5
5
  var CC_CONNECT_FORK_DOCS_URL = `https://github.com/${CC_CONNECT_FORK_REPO}/blob/main/docs/shadowob.md`;
6
6
 
7
+ // src/runtime-catalog.ts
8
+ var CONNECTOR_RUNTIME_CATALOG = [
9
+ {
10
+ id: "openclaw",
11
+ label: "OpenClaw",
12
+ kind: "openclaw",
13
+ command: "openclaw",
14
+ iconId: "openclaw",
15
+ install: {
16
+ commands: {
17
+ darwin: ["curl -fsSL https://openclaw.ai/install.sh | bash -s -- --no-onboard"],
18
+ linux: ["curl -fsSL https://openclaw.ai/install.sh | bash -s -- --no-onboard"],
19
+ win32: [
20
+ 'powershell -NoProfile -ExecutionPolicy Bypass -Command "& ([scriptblock]::Create((iwr -useb https://openclaw.ai/install.ps1))) -NoOnboard"'
21
+ ],
22
+ default: ["curl -fsSL https://openclaw.ai/install.sh | bash -s -- --no-onboard"]
23
+ },
24
+ helpUrl: "https://docs.openclaw.ai/install/index"
25
+ }
26
+ },
27
+ {
28
+ id: "hermes",
29
+ label: "Hermes Agent",
30
+ kind: "cli",
31
+ command: "hermes",
32
+ iconId: "hermes",
33
+ install: {
34
+ commands: {
35
+ darwin: [
36
+ "curl -fsSL https://raw.githubusercontent.com/NousResearch/hermes-agent/main/scripts/install.sh | bash"
37
+ ],
38
+ linux: [
39
+ "curl -fsSL https://raw.githubusercontent.com/NousResearch/hermes-agent/main/scripts/install.sh | bash"
40
+ ],
41
+ win32: [
42
+ 'powershell -NoProfile -ExecutionPolicy Bypass -Command "iex (irm https://raw.githubusercontent.com/NousResearch/hermes-agent/main/scripts/install.ps1)"'
43
+ ],
44
+ default: ["pipx install hermes-agent"]
45
+ },
46
+ helpUrl: "https://hermes-agent.nousresearch.com/docs/getting-started/installation"
47
+ }
48
+ },
49
+ {
50
+ id: "claude-code",
51
+ label: "Claude Code",
52
+ kind: "cli",
53
+ command: "claude",
54
+ iconId: "claude-code",
55
+ install: {
56
+ commands: {
57
+ default: ["npm install -g @anthropic-ai/claude-code"]
58
+ },
59
+ helpUrl: "https://code.claude.com/docs/en/installation"
60
+ }
61
+ },
62
+ {
63
+ id: "codex",
64
+ label: "Codex CLI",
65
+ kind: "cli",
66
+ command: "codex",
67
+ iconId: "codex",
68
+ install: {
69
+ commands: {
70
+ default: ["npm install -g @openai/codex"]
71
+ },
72
+ helpUrl: "https://help.openai.com/en/articles/11096431-openai-codex-cli-getting-started"
73
+ }
74
+ },
75
+ {
76
+ id: "opencode",
77
+ label: "OpenCode",
78
+ kind: "cli",
79
+ command: "opencode",
80
+ iconId: "opencode",
81
+ install: {
82
+ commands: {
83
+ default: ["npm install -g opencode-ai"]
84
+ },
85
+ helpUrl: "https://opencli.co/cli/opencode"
86
+ }
87
+ },
88
+ {
89
+ id: "gemini",
90
+ label: "Gemini CLI",
91
+ kind: "cli",
92
+ command: "gemini",
93
+ iconId: "gemini",
94
+ install: {
95
+ commands: {
96
+ default: ["npm install -g @google/gemini-cli"]
97
+ },
98
+ helpUrl: "https://github.com/google-gemini/gemini-cli"
99
+ }
100
+ },
101
+ {
102
+ id: "cursor",
103
+ label: "Cursor CLI",
104
+ kind: "cli",
105
+ command: "cursor-agent",
106
+ commands: ["cursor-agent", "cursor"],
107
+ iconId: "cursor",
108
+ install: {
109
+ commands: {
110
+ default: ["curl https://cursor.com/install -fsS | bash"],
111
+ win32: ["curl.exe https://cursor.com/install -fsS | bash"]
112
+ },
113
+ helpUrl: "https://docs.cursor.com/en/cli/installation"
114
+ }
115
+ },
116
+ {
117
+ id: "kimi",
118
+ label: "Kimi Code",
119
+ kind: "cli",
120
+ command: "kimi",
121
+ iconId: "kimi",
122
+ install: {
123
+ commands: {
124
+ darwin: ["curl -LsSf https://code.kimi.com/install.sh | bash"],
125
+ linux: ["curl -LsSf https://code.kimi.com/install.sh | bash"],
126
+ win32: [
127
+ 'powershell -NoProfile -ExecutionPolicy Bypass -Command "irm https://code.kimi.com/install.ps1 | iex"'
128
+ ]
129
+ },
130
+ helpUrl: "https://www.kimi.com/code/docs/en/"
131
+ }
132
+ },
133
+ {
134
+ id: "copilot",
135
+ label: "GitHub Copilot CLI",
136
+ kind: "cli",
137
+ command: "copilot",
138
+ iconId: "copilot",
139
+ install: {
140
+ commands: {
141
+ darwin: ["brew install copilot-cli", "curl -fsSL https://gh.io/copilot-install | bash"],
142
+ linux: ["brew install copilot-cli", "curl -fsSL https://gh.io/copilot-install | bash"],
143
+ win32: ["winget install GitHub.Copilot.Prerelease"]
144
+ },
145
+ helpUrl: "https://docs.github.com/en/copilot/how-tos/copilot-cli/install-copilot-cli"
146
+ }
147
+ },
148
+ {
149
+ id: "antigravity",
150
+ label: "Antigravity CLI",
151
+ kind: "cli",
152
+ command: "agy",
153
+ commands: ["agy", "antigravity"],
154
+ iconId: "antigravity",
155
+ install: {
156
+ commands: {
157
+ darwin: ["open https://www.antigravity.google/product/antigravity-cli"],
158
+ linux: ["xdg-open https://www.antigravity.google/product/antigravity-cli"],
159
+ win32: ["start https://www.antigravity.google/product/antigravity-cli"]
160
+ },
161
+ helpUrl: "https://www.antigravity.google/product/antigravity-cli"
162
+ }
163
+ }
164
+ ];
165
+ function connectorRuntimeCatalog() {
166
+ return CONNECTOR_RUNTIME_CATALOG.map((entry) => ({ ...entry }));
167
+ }
168
+ function connectorRuntimeById(runtimeId) {
169
+ if (!runtimeId) return null;
170
+ return CONNECTOR_RUNTIME_CATALOG.find((entry) => entry.id === runtimeId) ?? null;
171
+ }
172
+ function currentRuntimePlatform() {
173
+ return typeof process !== "undefined" && process.platform ? process.platform : "default";
174
+ }
175
+ function connectorRuntimeInstallCommands(runtimeId, targetPlatform = currentRuntimePlatform()) {
176
+ const runtime = connectorRuntimeById(runtimeId);
177
+ if (!runtime) return [];
178
+ const commands = runtime.install.commands;
179
+ return commands?.[targetPlatform] ?? commands?.default ?? [];
180
+ }
181
+ function connectorRuntimeInstallCommand(runtimeId, targetPlatform = currentRuntimePlatform()) {
182
+ return connectorRuntimeInstallCommands(runtimeId, targetPlatform)[0] ?? null;
183
+ }
184
+
7
185
  // src/index.ts
8
186
  var DEFAULT_SERVER_URL = "https://shadowob.com";
9
187
  var DEFAULT_WORK_DIR = ".";
@@ -65,7 +243,7 @@ function buildOpenClawPlan(input) {
65
243
  connectCommand,
66
244
  quickCommand,
67
245
  commands,
68
- configBlocks: [{ label: "openclaw.json", language: "json", content: jsonConfig }],
246
+ configBlocks: [{ label: "~/.openclaw/openclaw.json", language: "json", content: jsonConfig }],
69
247
  aiPrompt: [
70
248
  "Configure this Shadow Buddy in OpenClaw.",
71
249
  "",
@@ -299,6 +477,11 @@ function createConnectorPlans(input) {
299
477
  );
300
478
  }
301
479
  export {
480
+ CONNECTOR_RUNTIME_CATALOG,
481
+ connectorRuntimeById,
482
+ connectorRuntimeCatalog,
483
+ connectorRuntimeInstallCommand,
484
+ connectorRuntimeInstallCommands,
302
485
  createConnectorPlan,
303
486
  createConnectorPlans
304
487
  };