mirra-cc-bridge 0.1.2 → 0.1.4
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/cli.js +18 -6
- package/dist/cli.js.map +1 -1
- package/dist/commands/configure.d.ts.map +1 -1
- package/dist/commands/configure.js +29 -23
- package/dist/commands/configure.js.map +1 -1
- package/dist/commands/hook.d.ts.map +1 -1
- package/dist/commands/hook.js +50 -22
- package/dist/commands/hook.js.map +1 -1
- package/dist/commands/index.d.ts +1 -1
- package/dist/commands/index.d.ts.map +1 -1
- package/dist/commands/index.js +2 -1
- package/dist/commands/index.js.map +1 -1
- package/dist/commands/register.d.ts +9 -0
- package/dist/commands/register.d.ts.map +1 -1
- package/dist/commands/register.js +174 -0
- package/dist/commands/register.js.map +1 -1
- package/dist/commands/start.d.ts.map +1 -1
- package/dist/commands/start.js +98 -16
- package/dist/commands/start.js.map +1 -1
- package/dist/commands/status.d.ts.map +1 -1
- package/dist/commands/status.js +22 -2
- package/dist/commands/status.js.map +1 -1
- package/dist/session-manager.d.ts +0 -1
- package/dist/session-manager.d.ts.map +1 -1
- package/dist/session-manager.js +1 -2
- package/dist/session-manager.js.map +1 -1
- package/dist/tunnel.d.ts +34 -0
- package/dist/tunnel.d.ts.map +1 -0
- package/dist/tunnel.js +318 -0
- package/dist/tunnel.js.map +1 -0
- package/dist/types.d.ts +1 -3
- package/dist/types.d.ts.map +1 -1
- package/package.json +6 -4
- package/README.md +0 -62
package/dist/cli.js
CHANGED
|
@@ -33,17 +33,29 @@ ${chalk_1.default.gray(' claude code bridge v0.1.0 ')}
|
|
|
33
33
|
async function runSetupWizard() {
|
|
34
34
|
console.log(MIRRA_ASCII);
|
|
35
35
|
console.log(chalk_1.default.gray('Initializing bridge setup...\n'));
|
|
36
|
-
// Step 1: Configure API key
|
|
37
|
-
console.log(chalk_1.default.bold('[1/
|
|
36
|
+
// Step 1: Configure API key and destination
|
|
37
|
+
console.log(chalk_1.default.bold('[1/3]') + chalk_1.default.gray(' Configuring API key and destination\n'));
|
|
38
38
|
await (0, configure_1.configure)({});
|
|
39
|
-
// Step 2: Setup hooks
|
|
40
|
-
console.log(chalk_1.default.bold('\n[2/
|
|
39
|
+
// Step 2: Setup hooks (enables Claude → Mirra)
|
|
40
|
+
console.log(chalk_1.default.bold('\n[2/3]') + chalk_1.default.gray(' Configuring Claude Code hooks\n'));
|
|
41
41
|
await (0, setup_hooks_1.setupHooks)();
|
|
42
|
+
// Step 3: Register PC as resource (tunnel uses API key automatically)
|
|
43
|
+
console.log(chalk_1.default.bold('\n[3/3]') + chalk_1.default.gray(' Registering PC for remote control\n'));
|
|
44
|
+
console.log(chalk_1.default.gray('The tunnel will connect automatically using your API key.\n'));
|
|
45
|
+
await (0, register_1.registerWithTunnel)({});
|
|
42
46
|
// Mark setup as complete
|
|
43
47
|
(0, config_1.setConfigValue)('setupComplete', true);
|
|
48
|
+
const config = (0, config_1.loadConfig)();
|
|
44
49
|
console.log(chalk_1.default.bold.green('\n> Setup complete.\n'));
|
|
45
|
-
|
|
46
|
-
|
|
50
|
+
if (config?.pcResourceId) {
|
|
51
|
+
console.log(chalk_1.default.green('Bidirectional communication enabled!'));
|
|
52
|
+
console.log(chalk_1.default.gray(' - Claude Code output syncs to your Mirra app'));
|
|
53
|
+
console.log(chalk_1.default.gray(' - You can control Claude Code from your phone\n'));
|
|
54
|
+
}
|
|
55
|
+
else {
|
|
56
|
+
console.log(chalk_1.default.gray('Claude Code output will now sync to your Mirra app.\n'));
|
|
57
|
+
}
|
|
58
|
+
console.log(chalk_1.default.gray('Start the bridge with: ') + chalk_1.default.white('mirra-cc-bridge start\n'));
|
|
47
59
|
}
|
|
48
60
|
/**
|
|
49
61
|
* Default action when running without a command
|
package/dist/cli.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";;AAEA;;;;GAIG;;;;;AAEH,yCAA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C,CAAC;QACxF,OAAO;IACT,CAAC;IAED,OAAO,CAAC,GAAG,CAAC,eAAK,CAAC,IAAI,CAAC,wBAAwB,CAAC,CAAC,CAAC;IAClD,OAAO,CAAC,GAAG,CAAC,eAAK,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;IACxC,OAAO,CAAC,GAAG,CAAC,YAAY,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,eAAK,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,eAAK,CAAC,GAAG,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC;IAC5F,OAAO,CAAC,GAAG,CAAC,YAAY,MAAM,CAAC,MAAM,IAAI,eAAK,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC;IAClE,OAAO,CAAC,GAAG,CAAC,qBAAqB,MAAM,CAAC,cAAc,IAAI,eAAK,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC;IACnF,OAAO,CAAC,GAAG,CAAC,mBAAmB,MAAM,CAAC,YAAY,IAAI,eAAK,CAAC,IAAI,CAAC,gBAAgB,CAAC,EAAE,CAAC,CAAC;IACtF,OAAO,CAAC,GAAG,CAAC,gBAAgB,eAAK,CAAC,IAAI,CAAC,IAAA,sBAAa,GAAE,CAAC,EAAE,CAAC,CAAC;AAC7D,CAAC,CAAC,CAAC;AAEL,gBAAgB;AAChB,OAAO,CAAC,KAAK,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"configure.d.ts","sourceRoot":"","sources":["../../src/commands/configure.ts"],"names":[],"mappings":"AAAA;;GAEG;AAQH,UAAU,gBAAgB;IACxB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;
|
|
1
|
+
{"version":3,"file":"configure.d.ts","sourceRoot":"","sources":["../../src/commands/configure.ts"],"names":[],"mappings":"AAAA;;GAEG;AAQH,UAAU,gBAAgB;IACxB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAwED;;GAEG;AACH,wBAAsB,SAAS,CAAC,OAAO,EAAE,gBAAgB,GAAG,OAAO,CAAC,IAAI,CAAC,CA0FxE"}
|
|
@@ -63,31 +63,36 @@ function prompt(question, defaultValue) {
|
|
|
63
63
|
});
|
|
64
64
|
}
|
|
65
65
|
/**
|
|
66
|
-
* Fetch available chats
|
|
66
|
+
* Fetch available chats from Mirra (all chats are groups internally)
|
|
67
|
+
* Fetches both multi-person groups and 1-1 direct chats
|
|
67
68
|
*/
|
|
68
69
|
async function fetchChats(apiKey) {
|
|
69
70
|
const sdk = new sdk_1.MirraSDK({ apiKey }); // Cast to any for dynamic adapter access
|
|
70
71
|
const chats = [];
|
|
71
72
|
try {
|
|
72
|
-
// Fetch groups
|
|
73
|
+
// Fetch multi-person groups
|
|
73
74
|
const groupsResult = await sdk.mirraMessaging.getGroups({ limit: 50 });
|
|
74
75
|
const groups = groupsResult?.data?.groups || [];
|
|
75
76
|
for (const group of groups) {
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
77
|
+
if (group.groupId) {
|
|
78
|
+
chats.push({
|
|
79
|
+
groupId: group.groupId,
|
|
80
|
+
name: group.name || `Group ${group.groupId.substring(0, 8)}`,
|
|
81
|
+
type: 'group',
|
|
82
|
+
});
|
|
83
|
+
}
|
|
81
84
|
}
|
|
82
|
-
// Fetch direct chats
|
|
85
|
+
// Fetch 1-1 direct chats (contacts with groupId)
|
|
83
86
|
const contactsResult = await sdk.mirraMessaging.getContacts({ limit: 50, offset: 0 });
|
|
84
87
|
const contacts = contactsResult?.data?.contacts || [];
|
|
85
88
|
for (const contact of contacts) {
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
89
|
+
if (contact.groupId) {
|
|
90
|
+
chats.push({
|
|
91
|
+
groupId: contact.groupId,
|
|
92
|
+
name: contact.username || contact.name || `Chat ${contact.groupId.substring(0, 8)}`,
|
|
93
|
+
type: 'direct',
|
|
94
|
+
});
|
|
95
|
+
}
|
|
91
96
|
}
|
|
92
97
|
}
|
|
93
98
|
catch (error) {
|
|
@@ -123,47 +128,48 @@ async function configure(options) {
|
|
|
123
128
|
// Fetch and select chat destination
|
|
124
129
|
console.log(chalk_1.default.gray('\nFetching your chats...'));
|
|
125
130
|
const chats = await fetchChats(apiKey);
|
|
126
|
-
let
|
|
131
|
+
let groupId = existingConfig?.groupId;
|
|
127
132
|
if (chats.length > 0) {
|
|
128
133
|
console.log(chalk_1.default.gray('\nWhere should Claude Code output be sent?\n'));
|
|
129
134
|
// Display chat options
|
|
130
135
|
chats.forEach((chat, index) => {
|
|
131
|
-
const typeLabel = chat.type === 'group' ? chalk_1.default.cyan('[group]') : chalk_1.default.gray('[
|
|
132
|
-
const isCurrentSelection = chat.
|
|
136
|
+
const typeLabel = chat.type === 'group' ? chalk_1.default.cyan('[group]') : chalk_1.default.gray('[direct]');
|
|
137
|
+
const isCurrentSelection = chat.groupId === existingConfig?.groupId;
|
|
133
138
|
const marker = isCurrentSelection ? chalk_1.default.green(' *') : ' ';
|
|
134
139
|
console.log(`${marker}${index + 1}. ${typeLabel} ${chat.name}`);
|
|
135
140
|
});
|
|
136
141
|
console.log('');
|
|
137
142
|
// Find current selection index for default
|
|
138
|
-
const currentIndex = chats.findIndex((c) => c.
|
|
143
|
+
const currentIndex = chats.findIndex((c) => c.groupId === existingConfig?.groupId);
|
|
139
144
|
const defaultSelection = currentIndex >= 0 ? String(currentIndex + 1) : '1';
|
|
140
145
|
const selection = await prompt('Select destination', defaultSelection);
|
|
141
146
|
const selectedIndex = parseInt(selection, 10) - 1;
|
|
142
147
|
if (selectedIndex >= 0 && selectedIndex < chats.length) {
|
|
143
|
-
|
|
144
|
-
|
|
148
|
+
const selectedChat = chats[selectedIndex];
|
|
149
|
+
groupId = selectedChat.groupId;
|
|
150
|
+
console.log(chalk_1.default.green(`\n[+] Selected: ${selectedChat.name}`));
|
|
145
151
|
}
|
|
146
152
|
else {
|
|
147
153
|
console.log(chalk_1.default.yellow('Invalid selection, keeping existing'));
|
|
148
154
|
}
|
|
149
155
|
}
|
|
150
156
|
else {
|
|
151
|
-
console.log(chalk_1.default.gray(' No chats found. You can set
|
|
157
|
+
console.log(chalk_1.default.gray(' No chats found. You can set MIRRA_GROUP_ID manually.'));
|
|
152
158
|
}
|
|
153
159
|
// Save configuration
|
|
154
160
|
const config = {
|
|
155
161
|
...existingConfig,
|
|
156
162
|
apiKey,
|
|
157
163
|
defaultWorkDir: workDir,
|
|
158
|
-
|
|
164
|
+
groupId,
|
|
159
165
|
};
|
|
160
166
|
(0, config_1.saveConfig)(config);
|
|
161
167
|
console.log(chalk_1.default.green('\n[+] Configuration saved'));
|
|
162
168
|
console.log(chalk_1.default.gray(` config: ${(0, config_1.getConfigPath)()}`));
|
|
163
169
|
console.log(chalk_1.default.gray(` key: ${apiKey.substring(0, 10)}...${apiKey.substring(apiKey.length - 4)}`));
|
|
164
170
|
console.log(chalk_1.default.gray(` dir: ${workDir}`));
|
|
165
|
-
if (
|
|
166
|
-
console.log(chalk_1.default.gray(`
|
|
171
|
+
if (groupId) {
|
|
172
|
+
console.log(chalk_1.default.gray(` group: ${groupId.substring(0, 12)}...`));
|
|
167
173
|
}
|
|
168
174
|
}
|
|
169
175
|
//# sourceMappingURL=configure.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"configure.js","sourceRoot":"","sources":["../../src/commands/configure.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"configure.js","sourceRoot":"","sources":["../../src/commands/configure.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsFH,8BA0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CAAC;IACH,CAAC;SAAM,CAAC;QACN,OAAO,CAAC,GAAG,CAAC,eAAK,CAAC,IAAI,CAAC,0DAA0D,CAAC,CAAC,CAAC;IACtF,CAAC;IAED,qBAAqB;IACrB,MAAM,MAAM,GAAiB;QAC3B,GAAG,cAAc;QACjB,MAAM;QACN,cAAc,EAAE,OAAO;QACvB,OAAO;KACR,CAAC;IAEF,IAAA,mBAAU,EAAC,MAAM,CAAC,CAAC;IAEnB,OAAO,CAAC,GAAG,CAAC,eAAK,CAAC,KAAK,CAAC,2BAA2B,CAAC,CAAC,CAAC;IACtD,OAAO,CAAC,GAAG,CAAC,eAAK,CAAC,IAAI,CAAC,kBAAkB,IAAA,sBAAa,GAAE,EAAE,CAAC,CAAC,CAAC;IAC7D,OAAO,CAAC,GAAG,CACT,eAAK,CAAC,IAAI,CAAC,kBAAkB,MAAM,CAAC,SAAS,CAAC,CAAC,EAAE,EAAE,CAAC,MAAM,MAAM,CAAC,SAAS,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC,EAAE,CAAC,CACjG,CAAC;IACF,OAAO,CAAC,GAAG,CAAC,eAAK,CAAC,IAAI,CAAC,kBAAkB,OAAO,EAAE,CAAC,CAAC,CAAC;IACrD,IAAI,OAAO,EAAE,CAAC;QACZ,OAAO,CAAC,GAAG,CAAC,eAAK,CAAC,IAAI,CAAC,kBAAkB,OAAO,CAAC,SAAS,CAAC,CAAC,EAAE,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC;IAC3E,CAAC;AACH,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hook.d.ts","sourceRoot":"","sources":["../../src/commands/hook.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;
|
|
1
|
+
{"version":3,"file":"hook.d.ts","sourceRoot":"","sources":["../../src/commands/hook.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAyMH;;GAEG;AACH,wBAAsB,UAAU,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAoB7E"}
|
package/dist/commands/hook.js
CHANGED
|
@@ -48,20 +48,20 @@ function getSDK() {
|
|
|
48
48
|
});
|
|
49
49
|
}
|
|
50
50
|
/**
|
|
51
|
-
* Get
|
|
51
|
+
* Get group ID (all chats are groups in Mirra)
|
|
52
52
|
*/
|
|
53
|
-
function
|
|
53
|
+
function getGroupId() {
|
|
54
54
|
// First check environment variable (set when spawning via PC resource service)
|
|
55
|
-
const
|
|
56
|
-
if (
|
|
57
|
-
return
|
|
55
|
+
const envGroupId = process.env.MIRRA_GROUP_ID;
|
|
56
|
+
if (envGroupId) {
|
|
57
|
+
return envGroupId;
|
|
58
58
|
}
|
|
59
59
|
// Fall back to config
|
|
60
60
|
const config = (0, config_1.loadConfig)();
|
|
61
|
-
if (config?.
|
|
62
|
-
return config.
|
|
61
|
+
if (config?.groupId) {
|
|
62
|
+
return config.groupId;
|
|
63
63
|
}
|
|
64
|
-
throw new Error('
|
|
64
|
+
throw new Error('Group not configured. Run `mirra-cc-bridge configure` to select where to send output.');
|
|
65
65
|
}
|
|
66
66
|
/**
|
|
67
67
|
* Get session ID
|
|
@@ -75,27 +75,55 @@ function getSessionId() {
|
|
|
75
75
|
// Generate a default session ID based on timestamp
|
|
76
76
|
return `cc_local_${Date.now()}`;
|
|
77
77
|
}
|
|
78
|
+
/**
|
|
79
|
+
* Extract text content from a message for display
|
|
80
|
+
*/
|
|
81
|
+
function extractTextContent(message) {
|
|
82
|
+
switch (message.type) {
|
|
83
|
+
case 'claude_code_output':
|
|
84
|
+
return message.data.content || '';
|
|
85
|
+
case 'claude_code_tool':
|
|
86
|
+
const tool = message;
|
|
87
|
+
const output = tool.data.output;
|
|
88
|
+
if (typeof output === 'string') {
|
|
89
|
+
return `[${tool.data.toolName}] ${output.substring(0, 200)}${output.length > 200 ? '...' : ''}`;
|
|
90
|
+
}
|
|
91
|
+
return `[${tool.data.toolName}] completed`;
|
|
92
|
+
case 'claude_code_status':
|
|
93
|
+
return message.data.message || `Session ${message.data.status}`;
|
|
94
|
+
default:
|
|
95
|
+
return '';
|
|
96
|
+
}
|
|
97
|
+
}
|
|
78
98
|
/**
|
|
79
99
|
* Send a message to Mirra via the messaging adapter
|
|
80
100
|
*/
|
|
81
101
|
async function sendToMirra(message) {
|
|
82
102
|
const sdk = getSDK();
|
|
83
|
-
const
|
|
103
|
+
const groupId = getGroupId();
|
|
84
104
|
const sessionId = getSessionId();
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
sessionId,
|
|
97
|
-
},
|
|
105
|
+
// Extract readable text content
|
|
106
|
+
const textContent = extractTextContent(message);
|
|
107
|
+
await sdk.mirraMessaging.sendMessage({
|
|
108
|
+
groupId,
|
|
109
|
+
content: textContent,
|
|
110
|
+
automation: {
|
|
111
|
+
source: 'sdk',
|
|
112
|
+
flowTitle: 'Claude Code Session',
|
|
113
|
+
// Critical for Flow-based reply routing: allows Flows to filter
|
|
114
|
+
// replies to this specific Claude Code session
|
|
115
|
+
sessionId,
|
|
98
116
|
},
|
|
117
|
+
structuredData: [{
|
|
118
|
+
displayType: message.type,
|
|
119
|
+
templateId: `cc_${message.type}`,
|
|
120
|
+
data: message.data,
|
|
121
|
+
metadata: {
|
|
122
|
+
sessionId: message.sessionId,
|
|
123
|
+
timestamp: message.timestamp,
|
|
124
|
+
type: message.type
|
|
125
|
+
}
|
|
126
|
+
}]
|
|
99
127
|
});
|
|
100
128
|
}
|
|
101
129
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hook.js","sourceRoot":"","sources":["../../src/commands/hook.ts"],"names":[],"mappings":";AAAA;;;;;;;;;GASG;;
|
|
1
|
+
{"version":3,"file":"hook.js","sourceRoot":"","sources":["../../src/commands/hook.ts"],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AK,cAAc,EAAG,iBAAiB;YACrC,MAAM,iBAAiB,CAAC,SAAS,CAAC,CAAC;YACnC,MAAM;QAER,KAAK,WAAW;YACd,MAAM,iBAAiB,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;YAC5C,MAAM;QAER,KAAK,MAAM;YACT,MAAM,UAAU,CAAC,SAAS,CAAC,CAAC;YAC5B,MAAM;QAER;YACE,MAAM,IAAI,KAAK,CAAC,uBAAuB,KAAK,EAAE,CAAC,CAAC;IACpD,CAAC;AACH,CAAC"}
|
package/dist/commands/index.d.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
export { configure } from './configure';
|
|
5
5
|
export { setupHooks } from './setup-hooks';
|
|
6
|
-
export { registerPC } from './register';
|
|
6
|
+
export { registerPC, registerWithTunnel } from './register';
|
|
7
7
|
export { startServer } from './start';
|
|
8
8
|
export { showStatus } from './status';
|
|
9
9
|
export { handleHook } from './hook';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/commands/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/commands/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAC5D,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AACtC,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AACtC,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC"}
|
package/dist/commands/index.js
CHANGED
|
@@ -3,13 +3,14 @@
|
|
|
3
3
|
* Command exports
|
|
4
4
|
*/
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.handleHook = exports.showStatus = exports.startServer = exports.registerPC = exports.setupHooks = exports.configure = void 0;
|
|
6
|
+
exports.handleHook = exports.showStatus = exports.startServer = exports.registerWithTunnel = exports.registerPC = exports.setupHooks = exports.configure = void 0;
|
|
7
7
|
var configure_1 = require("./configure");
|
|
8
8
|
Object.defineProperty(exports, "configure", { enumerable: true, get: function () { return configure_1.configure; } });
|
|
9
9
|
var setup_hooks_1 = require("./setup-hooks");
|
|
10
10
|
Object.defineProperty(exports, "setupHooks", { enumerable: true, get: function () { return setup_hooks_1.setupHooks; } });
|
|
11
11
|
var register_1 = require("./register");
|
|
12
12
|
Object.defineProperty(exports, "registerPC", { enumerable: true, get: function () { return register_1.registerPC; } });
|
|
13
|
+
Object.defineProperty(exports, "registerWithTunnel", { enumerable: true, get: function () { return register_1.registerWithTunnel; } });
|
|
13
14
|
var start_1 = require("./start");
|
|
14
15
|
Object.defineProperty(exports, "startServer", { enumerable: true, get: function () { return start_1.startServer; } });
|
|
15
16
|
var status_1 = require("./status");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/commands/index.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,yCAAwC;AAA/B,sGAAA,SAAS,OAAA;AAClB,6CAA2C;AAAlC,yGAAA,UAAU,OAAA;AACnB,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/commands/index.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,yCAAwC;AAA/B,sGAAA,SAAS,OAAA;AAClB,6CAA2C;AAAlC,yGAAA,UAAU,OAAA;AACnB,uCAA4D;AAAnD,sGAAA,UAAU,OAAA;AAAE,8GAAA,kBAAkB,OAAA;AACvC,iCAAsC;AAA7B,oGAAA,WAAW,OAAA;AACpB,mCAAsC;AAA7B,oGAAA,UAAU,OAAA;AACnB,+BAAoC;AAA3B,kGAAA,UAAU,OAAA"}
|
|
@@ -9,5 +9,14 @@ interface RegisterOptions {
|
|
|
9
9
|
* Register this PC as a Mirra resource
|
|
10
10
|
*/
|
|
11
11
|
export declare function registerPC(options: RegisterOptions): Promise<void>;
|
|
12
|
+
interface RegisterWithTunnelOptions {
|
|
13
|
+
name?: string;
|
|
14
|
+
port?: number;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Register this PC using the configured ngrok tunnel
|
|
18
|
+
* This starts a temporary tunnel to get the URL, then stops it
|
|
19
|
+
*/
|
|
20
|
+
export declare function registerWithTunnel(options: RegisterWithTunnelOptions): Promise<void>;
|
|
12
21
|
export {};
|
|
13
22
|
//# sourceMappingURL=register.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"register.d.ts","sourceRoot":"","sources":["../../src/commands/register.ts"],"names":[],"mappings":"AAAA;;GAEG;
|
|
1
|
+
{"version":3,"file":"register.d.ts","sourceRoot":"","sources":["../../src/commands/register.ts"],"names":[],"mappings":"AAAA;;GAEG;AASH,UAAU,eAAe;IACvB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AA6KD;;GAEG;AACH,wBAAsB,UAAU,CAAC,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC,IAAI,CAAC,CA+KxE;AAED,UAAU,yBAAyB;IACjC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED;;;GAGG;AACH,wBAAsB,kBAAkB,CAAC,OAAO,EAAE,yBAAyB,GAAG,OAAO,CAAC,IAAI,CAAC,CAiL1F"}
|
|
@@ -40,11 +40,13 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
40
40
|
};
|
|
41
41
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
42
42
|
exports.registerPC = registerPC;
|
|
43
|
+
exports.registerWithTunnel = registerWithTunnel;
|
|
43
44
|
const chalk_1 = __importDefault(require("chalk"));
|
|
44
45
|
const readline = __importStar(require("readline"));
|
|
45
46
|
const os = __importStar(require("os"));
|
|
46
47
|
const sdk_1 = require("@mirra-messenger/sdk");
|
|
47
48
|
const config_1 = require("../config");
|
|
49
|
+
const tunnel_1 = require("../tunnel");
|
|
48
50
|
/**
|
|
49
51
|
* Prompt for input
|
|
50
52
|
*/
|
|
@@ -380,4 +382,176 @@ async function registerPC(options) {
|
|
|
380
382
|
throw new Error(`Registration failed: ${error.message}`);
|
|
381
383
|
}
|
|
382
384
|
}
|
|
385
|
+
/**
|
|
386
|
+
* Register this PC using the configured ngrok tunnel
|
|
387
|
+
* This starts a temporary tunnel to get the URL, then stops it
|
|
388
|
+
*/
|
|
389
|
+
async function registerWithTunnel(options) {
|
|
390
|
+
console.log(chalk_1.default.gray('Registering PC with embedded tunnel...\n'));
|
|
391
|
+
const config = (0, config_1.loadConfig)();
|
|
392
|
+
if (!config?.apiKey) {
|
|
393
|
+
throw new Error('Not configured. Run `mirra-cc-bridge configure` first.');
|
|
394
|
+
}
|
|
395
|
+
if (!config?.tunnel?.authToken) {
|
|
396
|
+
throw new Error('Tunnel not configured. Run `mirra-cc-bridge configure` first.');
|
|
397
|
+
}
|
|
398
|
+
const port = options.port || config.server?.port || 3847;
|
|
399
|
+
// Start temporary tunnel to get URL
|
|
400
|
+
console.log(chalk_1.default.gray('Starting temporary tunnel to get URL...'));
|
|
401
|
+
let tunnelUrl;
|
|
402
|
+
try {
|
|
403
|
+
tunnelUrl = await (0, tunnel_1.startTunnel)(port);
|
|
404
|
+
}
|
|
405
|
+
catch (error) {
|
|
406
|
+
throw new Error(`Failed to start tunnel: ${error.message}`);
|
|
407
|
+
}
|
|
408
|
+
// Get PC name
|
|
409
|
+
const defaultName = `${os.hostname()} - Claude Code`;
|
|
410
|
+
const pcName = options.name || defaultName;
|
|
411
|
+
console.log(chalk_1.default.gray('\nRegistering with Mirra...'));
|
|
412
|
+
const sdk = new sdk_1.MirraSDK({ apiKey: config.apiKey });
|
|
413
|
+
try {
|
|
414
|
+
// Check if already registered
|
|
415
|
+
if (config.pcResourceId) {
|
|
416
|
+
console.log(chalk_1.default.yellow('PC already registered. Updating endpoint...'));
|
|
417
|
+
// Update existing resource
|
|
418
|
+
await sdk.resources.update({
|
|
419
|
+
id: config.pcResourceId,
|
|
420
|
+
endpoint: {
|
|
421
|
+
baseUrl: tunnelUrl,
|
|
422
|
+
authentication: 'none',
|
|
423
|
+
methods: [
|
|
424
|
+
{
|
|
425
|
+
name: 'spawnSession',
|
|
426
|
+
httpMethod: 'POST',
|
|
427
|
+
path: '/sessions',
|
|
428
|
+
description: 'Spawn a new Claude Code session',
|
|
429
|
+
parameters: {
|
|
430
|
+
workingDir: { type: 'string', required: false },
|
|
431
|
+
initialPrompt: { type: 'string', required: true },
|
|
432
|
+
recipientId: { type: 'string', required: true },
|
|
433
|
+
},
|
|
434
|
+
response: { type: 'object' },
|
|
435
|
+
},
|
|
436
|
+
{
|
|
437
|
+
name: 'sendInput',
|
|
438
|
+
httpMethod: 'POST',
|
|
439
|
+
path: '/sessions/{sessionId}/input',
|
|
440
|
+
description: 'Send input to a session',
|
|
441
|
+
parameters: {
|
|
442
|
+
sessionId: { type: 'string', required: true },
|
|
443
|
+
input: { type: 'string', required: true },
|
|
444
|
+
},
|
|
445
|
+
response: { type: 'object' },
|
|
446
|
+
},
|
|
447
|
+
{
|
|
448
|
+
name: 'killSession',
|
|
449
|
+
httpMethod: 'DELETE',
|
|
450
|
+
path: '/sessions/{sessionId}',
|
|
451
|
+
description: 'Kill a session',
|
|
452
|
+
parameters: {
|
|
453
|
+
sessionId: { type: 'string', required: true },
|
|
454
|
+
},
|
|
455
|
+
response: { type: 'object' },
|
|
456
|
+
},
|
|
457
|
+
{
|
|
458
|
+
name: 'listSessions',
|
|
459
|
+
httpMethod: 'GET',
|
|
460
|
+
path: '/sessions',
|
|
461
|
+
description: 'List active sessions',
|
|
462
|
+
parameters: {},
|
|
463
|
+
response: { type: 'array' },
|
|
464
|
+
},
|
|
465
|
+
],
|
|
466
|
+
},
|
|
467
|
+
});
|
|
468
|
+
console.log(chalk_1.default.green('\n[+] PC resource updated'));
|
|
469
|
+
}
|
|
470
|
+
else {
|
|
471
|
+
// Create new resource
|
|
472
|
+
const resource = await sdk.resources.create({
|
|
473
|
+
name: pcName,
|
|
474
|
+
description: `Claude Code on ${os.hostname()}`,
|
|
475
|
+
resourceType: 'integration',
|
|
476
|
+
category: 'development',
|
|
477
|
+
isPrivate: true,
|
|
478
|
+
endpoint: {
|
|
479
|
+
baseUrl: tunnelUrl,
|
|
480
|
+
authentication: 'none',
|
|
481
|
+
methods: [
|
|
482
|
+
{
|
|
483
|
+
name: 'spawnSession',
|
|
484
|
+
httpMethod: 'POST',
|
|
485
|
+
path: '/sessions',
|
|
486
|
+
description: 'Spawn a new Claude Code session',
|
|
487
|
+
parameters: {
|
|
488
|
+
workingDir: { type: 'string', required: false },
|
|
489
|
+
initialPrompt: { type: 'string', required: true },
|
|
490
|
+
recipientId: { type: 'string', required: true },
|
|
491
|
+
},
|
|
492
|
+
response: { type: 'object' },
|
|
493
|
+
},
|
|
494
|
+
{
|
|
495
|
+
name: 'sendInput',
|
|
496
|
+
httpMethod: 'POST',
|
|
497
|
+
path: '/sessions/{sessionId}/input',
|
|
498
|
+
description: 'Send input to a session',
|
|
499
|
+
parameters: {
|
|
500
|
+
sessionId: { type: 'string', required: true },
|
|
501
|
+
input: { type: 'string', required: true },
|
|
502
|
+
},
|
|
503
|
+
response: { type: 'object' },
|
|
504
|
+
},
|
|
505
|
+
{
|
|
506
|
+
name: 'killSession',
|
|
507
|
+
httpMethod: 'DELETE',
|
|
508
|
+
path: '/sessions/{sessionId}',
|
|
509
|
+
description: 'Kill a session',
|
|
510
|
+
parameters: {
|
|
511
|
+
sessionId: { type: 'string', required: true },
|
|
512
|
+
},
|
|
513
|
+
response: { type: 'object' },
|
|
514
|
+
},
|
|
515
|
+
{
|
|
516
|
+
name: 'listSessions',
|
|
517
|
+
httpMethod: 'GET',
|
|
518
|
+
path: '/sessions',
|
|
519
|
+
description: 'List active sessions',
|
|
520
|
+
parameters: {},
|
|
521
|
+
response: { type: 'array' },
|
|
522
|
+
},
|
|
523
|
+
],
|
|
524
|
+
},
|
|
525
|
+
pricing: { model: 'free' },
|
|
526
|
+
openApiSpec: generateOpenAPISpec(),
|
|
527
|
+
});
|
|
528
|
+
// Save resource ID
|
|
529
|
+
(0, config_1.setConfigValue)('pcResourceId', resource.id);
|
|
530
|
+
console.log(chalk_1.default.green('\n[+] PC registered'));
|
|
531
|
+
console.log(chalk_1.default.gray(` resource_id: ${resource.id}`));
|
|
532
|
+
}
|
|
533
|
+
// Install the resource for the user
|
|
534
|
+
console.log(chalk_1.default.gray('\nInstalling resource...'));
|
|
535
|
+
try {
|
|
536
|
+
const resourceId = config.pcResourceId || (0, config_1.loadConfig)()?.pcResourceId || '';
|
|
537
|
+
await sdk.resources.install(resourceId);
|
|
538
|
+
console.log(chalk_1.default.green('[+] Resource installed'));
|
|
539
|
+
}
|
|
540
|
+
catch (e) {
|
|
541
|
+
if (e.message?.includes('already installed')) {
|
|
542
|
+
console.log(chalk_1.default.gray(' Already installed'));
|
|
543
|
+
}
|
|
544
|
+
else {
|
|
545
|
+
console.log(chalk_1.default.yellow(` Could not auto-install: ${e.message}`));
|
|
546
|
+
}
|
|
547
|
+
}
|
|
548
|
+
console.log(chalk_1.default.green('\n[+] Registration complete'));
|
|
549
|
+
console.log(chalk_1.default.gray(` tunnel: ${tunnelUrl}`));
|
|
550
|
+
}
|
|
551
|
+
finally {
|
|
552
|
+
// Stop the temporary tunnel
|
|
553
|
+
console.log(chalk_1.default.gray('\nStopping temporary tunnel...'));
|
|
554
|
+
await (0, tunnel_1.stopTunnel)();
|
|
555
|
+
}
|
|
556
|
+
}
|
|
383
557
|
//# sourceMappingURL=register.js.map
|