@cosmicstack/mercury-agent 0.2.0 → 0.2.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/README.md +13 -1
- package/dist/index.js +7 -5
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -193,4 +193,16 @@ Configure multiple LLM providers. Mercury tries them in order and falls back aut
|
|
|
193
193
|
|
|
194
194
|
## License
|
|
195
195
|
|
|
196
|
-
MIT © [Cosmic Stack](https://github.com/cosmicstack-labs)
|
|
196
|
+
MIT © [Cosmic Stack](https://github.com/cosmicstack-labs)
|
|
197
|
+
|
|
198
|
+
---
|
|
199
|
+
|
|
200
|
+
## Disclaimer
|
|
201
|
+
|
|
202
|
+
**This is AI - it can break sometimes, please use this at your own risk.**
|
|
203
|
+
|
|
204
|
+
---
|
|
205
|
+
|
|
206
|
+
## Suggestions and Contributions
|
|
207
|
+
|
|
208
|
+
For suggestions, contributions, or any inquiries, please reach out to us at [support@cosmicstack.org](mailto:support@cosmicstack.org).
|
package/dist/index.js
CHANGED
|
@@ -2165,7 +2165,7 @@ var TokenBudget = class {
|
|
|
2165
2165
|
|
|
2166
2166
|
// src/capabilities/permissions.ts
|
|
2167
2167
|
import { existsSync as existsSync6, readFileSync as readFileSync6, writeFileSync as writeFileSync6, mkdirSync as mkdirSync6 } from "fs";
|
|
2168
|
-
import { join as join6, resolve } from "path";
|
|
2168
|
+
import { join as join6, resolve, sep } from "path";
|
|
2169
2169
|
import { homedir as homedir2 } from "os";
|
|
2170
2170
|
import { parse as parseYaml3, stringify as stringifyYaml3 } from "yaml";
|
|
2171
2171
|
var DEFAULT_MANIFEST = {
|
|
@@ -2421,7 +2421,7 @@ var PermissionManager = class {
|
|
|
2421
2421
|
const scopes = this.manifest.capabilities.filesystem.scopes;
|
|
2422
2422
|
for (const scope of scopes) {
|
|
2423
2423
|
const scopeResolved = resolve(scope.path.replace(/^~/, homedir2()));
|
|
2424
|
-
if (resolvedPath === scopeResolved || resolvedPath.startsWith(scopeResolved +
|
|
2424
|
+
if (resolvedPath === scopeResolved || resolvedPath.startsWith(scopeResolved + sep)) {
|
|
2425
2425
|
return scope;
|
|
2426
2426
|
}
|
|
2427
2427
|
}
|
|
@@ -2455,7 +2455,9 @@ var PermissionManager = class {
|
|
|
2455
2455
|
const pathPatterns = [
|
|
2456
2456
|
/(?:^|\s)(\/[^\s]+)/,
|
|
2457
2457
|
/(?:^|\s)(~\/[^\s]+)/,
|
|
2458
|
-
/(?:^|\s)\.\.\/([^\s]+)
|
|
2458
|
+
/(?:^|\s)\.\.\/([^\s]+)/,
|
|
2459
|
+
/(?:^|\s)([A-Za-z]:\\[^\s]+)/,
|
|
2460
|
+
/(?:^|\s)(\\\\[^\s]+)/
|
|
2459
2461
|
];
|
|
2460
2462
|
for (const p of pathPatterns) {
|
|
2461
2463
|
const match = command.match(p);
|
|
@@ -4196,7 +4198,7 @@ function banner() {
|
|
|
4196
4198
|
}
|
|
4197
4199
|
console.log("");
|
|
4198
4200
|
console.log(chalk6.white(" an AI agent for personal tasks"));
|
|
4199
|
-
console.log(chalk6.dim(" v0.2.
|
|
4201
|
+
console.log(chalk6.dim(" v0.2.1 \xB7 by Cosmic Stack \xB7 mercury.cosmicstack.org"));
|
|
4200
4202
|
console.log("");
|
|
4201
4203
|
}
|
|
4202
4204
|
function splashScreen() {
|
|
@@ -4476,7 +4478,7 @@ async function runAgent(isDaemon = false) {
|
|
|
4476
4478
|
process.on("SIGTERM", shutdown);
|
|
4477
4479
|
}
|
|
4478
4480
|
var program = new Command();
|
|
4479
|
-
program.name("mercury").description("Mercury \u2014 Soul-driven AI agent with permission-hardened tools, token budgets, and multi-channel access.").version("0.2.
|
|
4481
|
+
program.name("mercury").description("Mercury \u2014 Soul-driven AI agent with permission-hardened tools, token budgets, and multi-channel access.").version("0.2.1").option("-v, --verbose", "Show debug logs").action(async () => {
|
|
4480
4482
|
if (!isSetupComplete()) {
|
|
4481
4483
|
await configure();
|
|
4482
4484
|
autoDaemonize();
|