bit-office 0.1.8 → 0.2.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.
- package/dist/index.js +21 -8
- package/dist/index.js.map +1 -1
- package/dist/web/out/404.html +2 -2
- package/dist/web/out/_next/static/chunks/904.4649cb92e3c1355c.js +1 -0
- package/dist/web/out/_next/static/chunks/app/office/page-75459bb9d7bfe004.js +1 -0
- package/dist/web/out/_next/static/chunks/{webpack-1075fa19d83199c2.js → webpack-131b3d260a3d9ce4.js} +1 -1
- package/dist/web/out/index.html +2 -2
- package/dist/web/out/index.txt +1 -1
- package/dist/web/out/office.html +2 -2
- package/dist/web/out/office.txt +2 -2
- package/dist/web/out/pair.html +2 -2
- package/dist/web/out/pair.txt +1 -1
- package/dist/web/out/sw.js +1 -1
- package/package.json +1 -1
- package/dist/web/out/_next/static/chunks/904.8b3ff312a1556d6a.js +0 -1
- package/dist/web/out/_next/static/chunks/app/office/page-81d7bad541583f85.js +0 -1
- /package/dist/web/out/_next/static/{Ini5NsYvSy_jIXndBUoc4 → KVUUasWqYxW6SNCIo9Tbn}/_buildManifest.js +0 -0
- /package/dist/web/out/_next/static/{Ini5NsYvSy_jIXndBUoc4 → KVUUasWqYxW6SNCIo9Tbn}/_ssgManifest.js +0 -0
package/dist/index.js
CHANGED
|
@@ -4287,7 +4287,8 @@ function buildConfig() {
|
|
|
4287
4287
|
webDir: resolveWebDir(),
|
|
4288
4288
|
telegramBotTokens: process.env.TELEGRAM_BOT_TOKENS ? process.env.TELEGRAM_BOT_TOKENS.split(",").map((t) => t.trim() || void 0) : (saved.telegramBotTokens ?? []).map((t) => t || void 0),
|
|
4289
4289
|
detectedBackends: saved.detectedBackends ?? [],
|
|
4290
|
-
defaultBackend: saved.defaultBackend ?? "claude"
|
|
4290
|
+
defaultBackend: saved.defaultBackend ?? "claude",
|
|
4291
|
+
sandboxMode: saved.sandboxMode ?? "full"
|
|
4291
4292
|
};
|
|
4292
4293
|
}
|
|
4293
4294
|
var config = buildConfig();
|
|
@@ -4588,8 +4589,11 @@ var backends = [
|
|
|
4588
4589
|
id: "codex",
|
|
4589
4590
|
name: "Codex CLI",
|
|
4590
4591
|
command: "codex",
|
|
4591
|
-
buildArgs(prompt) {
|
|
4592
|
-
|
|
4592
|
+
buildArgs(prompt, opts) {
|
|
4593
|
+
if (opts.fullAccess) {
|
|
4594
|
+
return ["exec", prompt, "--dangerously-bypass-approvals-and-sandbox", "--skip-git-repo-check"];
|
|
4595
|
+
}
|
|
4596
|
+
return ["exec", prompt, "--full-auto", "--skip-git-repo-check"];
|
|
4593
4597
|
}
|
|
4594
4598
|
},
|
|
4595
4599
|
{
|
|
@@ -4605,7 +4609,7 @@ var backends = [
|
|
|
4605
4609
|
name: "Aider",
|
|
4606
4610
|
command: "aider",
|
|
4607
4611
|
buildArgs(prompt) {
|
|
4608
|
-
return ["--message", prompt, "--yes", "--no-pretty"];
|
|
4612
|
+
return ["--message", prompt, "--yes", "--no-pretty", "--no-git"];
|
|
4609
4613
|
}
|
|
4610
4614
|
},
|
|
4611
4615
|
{
|
|
@@ -4669,7 +4673,7 @@ var AgentSession = class {
|
|
|
4669
4673
|
type: "TASK_FAILED",
|
|
4670
4674
|
agentId: this.agentId,
|
|
4671
4675
|
taskId,
|
|
4672
|
-
error: "Agent is
|
|
4676
|
+
error: "Agent is working hard, please wait..."
|
|
4673
4677
|
});
|
|
4674
4678
|
return;
|
|
4675
4679
|
}
|
|
@@ -4695,7 +4699,8 @@ var AgentSession = class {
|
|
|
4695
4699
|
` : "";
|
|
4696
4700
|
const delegationHint = "To delegate a task to another agent, output on its own line: @AgentName: <task description>\n\n";
|
|
4697
4701
|
const identityPrompt = `Your name is ${this.name}, your role is ${this.role}. ${personalityClause}${delegationHint}${prompt}`;
|
|
4698
|
-
const
|
|
4702
|
+
const fullAccess = config.sandboxMode === "full";
|
|
4703
|
+
const args = this.backend.buildArgs(identityPrompt, { continue: this.hasHistory, fullAccess });
|
|
4699
4704
|
this.process = spawn(this.backend.command, args, {
|
|
4700
4705
|
cwd,
|
|
4701
4706
|
env: cleanEnv,
|
|
@@ -5069,7 +5074,7 @@ async function runSetup() {
|
|
|
5069
5074
|
const detectedNames = detected.map((id) => getBackend(id)?.name ?? id).join(", ");
|
|
5070
5075
|
console.log(`[Setup] Found: ${detectedNames || "none"}`);
|
|
5071
5076
|
if (!process.stdin.isTTY) {
|
|
5072
|
-
saveConfig({ detectedBackends: detected, defaultBackend: detected[0] ?? "claude" });
|
|
5077
|
+
saveConfig({ detectedBackends: detected, defaultBackend: detected[0] ?? "claude", sandboxMode: "full" });
|
|
5073
5078
|
console.log("\u2713 Default config saved to ~/.bit-office/config.json");
|
|
5074
5079
|
console.log(" Run with --setup in a terminal to configure.\n");
|
|
5075
5080
|
return;
|
|
@@ -5099,15 +5104,22 @@ async function runSetup() {
|
|
|
5099
5104
|
defaultBackend = detected[idx];
|
|
5100
5105
|
}
|
|
5101
5106
|
}
|
|
5107
|
+
console.log("\n\u2500\u2500 Agent Permissions \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500");
|
|
5108
|
+
console.log("1 = Full access (agents can access entire machine)");
|
|
5109
|
+
console.log("2 = Sandbox (agents restricted to working directory)");
|
|
5110
|
+
const sandboxPick = await ask(rl, "Permission mode (1/2, default=1): ");
|
|
5111
|
+
const sandboxMode = sandboxPick === "2" ? "safe" : "full";
|
|
5102
5112
|
rl.close();
|
|
5103
5113
|
saveConfig({
|
|
5104
5114
|
ablyApiKey: ablyApiKey || void 0,
|
|
5105
5115
|
detectedBackends: detected,
|
|
5106
|
-
defaultBackend
|
|
5116
|
+
defaultBackend,
|
|
5117
|
+
sandboxMode
|
|
5107
5118
|
});
|
|
5108
5119
|
console.log("\n\u2713 Config saved to ~/.bit-office/config.json");
|
|
5109
5120
|
if (ablyApiKey) console.log(" \u2022 Ably: enabled");
|
|
5110
5121
|
console.log(` \u2022 Default AI: ${getBackend(defaultBackend)?.name ?? defaultBackend}`);
|
|
5122
|
+
console.log(` \u2022 Permissions: ${sandboxMode === "full" ? "Full access" : "Sandbox"}`);
|
|
5111
5123
|
console.log(" \u2022 Run with --setup to reconfigure\n");
|
|
5112
5124
|
}
|
|
5113
5125
|
|
|
@@ -5270,6 +5282,7 @@ async function main() {
|
|
|
5270
5282
|
}
|
|
5271
5283
|
const backendNames = config.detectedBackends.map((id) => getBackend(id)?.name ?? id).join(", ");
|
|
5272
5284
|
console.log(`[Gateway] AI backends: ${backendNames || "none detected"} (default: ${getBackend(config.defaultBackend)?.name ?? config.defaultBackend})`);
|
|
5285
|
+
console.log(`[Gateway] Permissions: ${config.sandboxMode === "full" ? "Full access" : "Sandbox"}`);
|
|
5273
5286
|
console.log(`[Gateway] Starting for machine: ${config.machineId}`);
|
|
5274
5287
|
showPairCode();
|
|
5275
5288
|
await initTransports(handleCommand);
|