@metis_agent/metis-tui 1.0.0-rc.1
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/bin/metis +56 -0
- package/dist/LICENSE +21 -0
- package/dist/cli/cli/cmd/tui/photon_rs_bg-bq08arze.wasm +0 -0
- package/dist/cli/cli/cmd/tui/worker.js +3731 -0
- package/dist/cli/highlights-eq9cgrbb.scm +604 -0
- package/dist/cli/highlights-ghv9g403.scm +205 -0
- package/dist/cli/highlights-hk7bwhj4.scm +284 -0
- package/dist/cli/highlights-r812a2qc.scm +150 -0
- package/dist/cli/highlights-x6tmsnaa.scm +115 -0
- package/dist/cli/index.js +4464 -0
- package/dist/cli/injections-73j83es3.scm +27 -0
- package/dist/cli/parser.worker.js +1025 -0
- package/dist/cli/photon_rs_bg-bq08arze.wasm +0 -0
- package/dist/cli/tree-sitter-javascript-nd0q4pe9.wasm +0 -0
- package/dist/cli/tree-sitter-markdown-411r6y9b.wasm +0 -0
- package/dist/cli/tree-sitter-markdown_inline-j5349f42.wasm +0 -0
- package/dist/cli/tree-sitter-typescript-zxjzwt75.wasm +0 -0
- package/dist/cli/tree-sitter-zig-e78zbjpm.wasm +0 -0
- package/migration/20260127222353_familiar_lady_ursula/migration.sql +90 -0
- package/migration/20260127222353_familiar_lady_ursula/snapshot.json +796 -0
- package/migration/20260211171708_add_project_commands/migration.sql +1 -0
- package/migration/20260211171708_add_project_commands/snapshot.json +806 -0
- package/migration/20260213144116_wakeful_the_professor/migration.sql +11 -0
- package/migration/20260213144116_wakeful_the_professor/snapshot.json +897 -0
- package/migration/20260225215848_workspace/migration.sql +7 -0
- package/migration/20260225215848_workspace/snapshot.json +959 -0
- package/migration/20260227213759_add_session_workspace_id/migration.sql +2 -0
- package/migration/20260227213759_add_session_workspace_id/snapshot.json +983 -0
- package/migration/20260228203230_blue_harpoon/migration.sql +17 -0
- package/migration/20260228203230_blue_harpoon/snapshot.json +1102 -0
- package/migration/20260303231226_add_workspace_fields/migration.sql +5 -0
- package/migration/20260303231226_add_workspace_fields/snapshot.json +1013 -0
- package/migration/20260309230000_move_org_to_state/migration.sql +3 -0
- package/migration/20260309230000_move_org_to_state/snapshot.json +1156 -0
- package/migration/20260312043431_session_message_cursor/migration.sql +4 -0
- package/migration/20260312043431_session_message_cursor/snapshot.json +1168 -0
- package/migration/20260323234822_events/migration.sql +13 -0
- package/migration/20260323234822_events/snapshot.json +1271 -0
- package/migration/20260410174513_workspace-name/migration.sql +16 -0
- package/migration/20260410174513_workspace-name/snapshot.json +1271 -0
- package/migration/20260413175956_chief_energizer/migration.sql +13 -0
- package/migration/20260413175956_chief_energizer/snapshot.json +1399 -0
- package/migration/20260423070820_add_icon_url_override/migration.sql +2 -0
- package/migration/20260423070820_add_icon_url_override/snapshot.json +1409 -0
- package/migration/20260427172553_slow_nightmare/migration.sql +17 -0
- package/migration/20260427172553_slow_nightmare/snapshot.json +1409 -0
- package/migration/20260428004200_add_session_path/migration.sql +1 -0
- package/migration/20260428004200_add_session_path/snapshot.json +1419 -0
- package/migration/20260501142318_next_venus/migration.sql +2 -0
- package/migration/20260501142318_next_venus/snapshot.json +1439 -0
- package/migration/20260504145000_add_sync_owner/migration.sql +1 -0
- package/migration/20260504145000_add_sync_owner/snapshot.json +1449 -0
- package/migration/20260507164347_add_workspace_time/migration.sql +1 -0
- package/migration/20260507164347_add_workspace_time/snapshot.json +1459 -0
- package/migration/20260511000411_data_migration_state/migration.sql +4 -0
- package/migration/20260511000411_data_migration_state/snapshot.json +1490 -0
- package/package.json +168 -0
package/bin/metis
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
const childProcess = require("child_process")
|
|
4
|
+
const fs = require("fs")
|
|
5
|
+
const path = require("path")
|
|
6
|
+
|
|
7
|
+
const forwardedSignals = ["SIGINT", "SIGTERM", "SIGHUP"]
|
|
8
|
+
const scriptPath = fs.realpathSync(__filename)
|
|
9
|
+
const scriptDir = path.dirname(scriptPath)
|
|
10
|
+
const cliEntry = path.resolve(scriptDir, "..", "dist", "cli", "index.js")
|
|
11
|
+
const currentBunEnvKey = "metis_BUN_PATH"
|
|
12
|
+
const previousBunEnvKey = `code${"mate"}${currentBunEnvKey.slice("metis".length)}`
|
|
13
|
+
const bunPath = process.env[currentBunEnvKey] || process.env[previousBunEnvKey] || "bun"
|
|
14
|
+
|
|
15
|
+
if (!fs.existsSync(cliEntry)) {
|
|
16
|
+
console.error(`Could not find CLI entry at ${cliEntry}. Please reinstall @metis_agent/metis-tui.`)
|
|
17
|
+
process.exit(1)
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
const child = childProcess.spawn(bunPath, ["--conditions=browser", cliEntry, ...process.argv.slice(2)], {
|
|
21
|
+
stdio: "inherit",
|
|
22
|
+
})
|
|
23
|
+
|
|
24
|
+
child.on("error", (error) => {
|
|
25
|
+
if (error && error.code === "ENOENT") {
|
|
26
|
+
console.error("Bun is required to run metis. Install Bun >= 1.3.13 and ensure `bun` is in PATH.")
|
|
27
|
+
process.exit(1)
|
|
28
|
+
}
|
|
29
|
+
console.error(error.message)
|
|
30
|
+
process.exit(1)
|
|
31
|
+
})
|
|
32
|
+
|
|
33
|
+
const forwarders = {}
|
|
34
|
+
for (const signal of forwardedSignals) {
|
|
35
|
+
forwarders[signal] = () => {
|
|
36
|
+
try {
|
|
37
|
+
child.kill(signal)
|
|
38
|
+
} catch {
|
|
39
|
+
// Child may already be exiting.
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
process.on(signal, forwarders[signal])
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
child.on("exit", (code, signal) => {
|
|
46
|
+
for (const forwardedSignal of forwardedSignals) {
|
|
47
|
+
process.removeListener(forwardedSignal, forwarders[forwardedSignal])
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
if (signal) {
|
|
51
|
+
process.kill(process.pid, signal)
|
|
52
|
+
return
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
process.exit(typeof code === "number" ? code : 0)
|
|
56
|
+
})
|
package/dist/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 metis
|
|
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.
|
|
Binary file
|