kira-glasses-bridge 2.2.0 → 2.3.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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/index.mjs +13 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kira-glasses-bridge",
3
- "version": "2.2.0",
3
+ "version": "2.3.0",
4
4
  "description": "Connects your Mac to Kira, the assistant for Even G2 glasses: Claude Code sessions, files, folders and apps, by voice.",
5
5
  "type": "module",
6
6
  "bin": {
package/src/index.mjs CHANGED
@@ -124,6 +124,19 @@ const tools = {
124
124
  return setupProjectFolder({ dir, name: args.name, description: args.description, sshUrl: args.ssh_url, httpsUrl: args.https_url })
125
125
  },
126
126
 
127
+ /** Open Terminal on this Mac in a folder and run a command there (used to hand a Claude session to the person). */
128
+ async open_terminal(args) {
129
+ const dir = resolveUserPath(String(args.cwd ?? ''))
130
+ const command = String(args.command ?? '').replace(/[^\w\s./:@=-]/g, '')
131
+ if (process.platform !== 'darwin') return { error: 'opening a terminal is only supported on macOS' }
132
+ const { execFile } = await import('node:child_process')
133
+ const script = `tell application "Terminal"
134
+ activate
135
+ do script "cd ${JSON.stringify(dir)} && ${command}"
136
+ end tell`
137
+ return new Promise(resolve => execFile('osascript', ['-e', script], err => resolve(err ? { error: err.message } : { opened: true, cwd: display(dir), command })))
138
+ },
139
+
127
140
  /** Read-only git facts for a folder: repo, branch, head, dirty files. */
128
141
  async git_status(args) {
129
142
  const s = await snapshot(resolveCwd(args.path ?? args.cwd))