@a3t/rapid 0.1.9 → 0.1.11

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/bin.js CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  program
4
- } from "./chunk-C6XSZWFT.js";
4
+ } from "./chunk-J7OOLQCF.js";
5
5
 
6
6
  // src/bin.ts
7
7
  program.parse(process.argv);
@@ -286,14 +286,13 @@ function getPrebuiltConfig(templateName, containerEnv, postStartCommand) {
286
286
  function getDevContainerConfig(detected, usePrebuilt = false) {
287
287
  const baseFeatures = {
288
288
  "ghcr.io/devcontainers/features/git:1": {},
289
- "ghcr.io/devcontainers-contrib/features/direnv:1": {},
290
- "ghcr.io/devcontainers-contrib/features/starship:1": {},
291
- "ghcr.io/devcontainers-contrib/features/1password-cli:1": {}
289
+ "ghcr.io/devcontainers/features/github-cli:1": {}
292
290
  };
293
291
  const containerEnv = {
294
292
  OP_SERVICE_ACCOUNT_TOKEN: "${localEnv:OP_SERVICE_ACCOUNT_TOKEN}"
295
293
  };
296
- const postCreateBase = "npm install -g @anthropic-ai/claude-code && curl -fsSL https://opencode.ai/install | bash";
294
+ const installTools = "sudo apt-get update -qq && sudo apt-get install -y -qq jq direnv && curl -sS https://downloads.1password.com/linux/keys/1password.asc | sudo gpg --dearmor -o /usr/share/keyrings/1password.gpg && echo 'deb [arch=amd64 signed-by=/usr/share/keyrings/1password.gpg] https://downloads.1password.com/linux/debian/amd64 stable main' | sudo tee /etc/apt/sources.list.d/1password.list && sudo apt-get update -qq && sudo apt-get install -y -qq 1password-cli && curl -fsSL https://starship.rs/install.sh | sh -s -- -y";
295
+ const postCreateBase = `${installTools} && npm install -g @anthropic-ai/claude-code && curl -fsSL https://opencode.ai/install | bash`;
297
296
  const postStartCommand = "direnv allow 2>/dev/null || true";
298
297
  const language = detected?.language || "unknown";
299
298
  const templateName = language === "javascript" ? "typescript" : language === "unknown" ? "universal" : language;
@@ -307,8 +306,7 @@ function getDevContainerConfig(detected, usePrebuilt = false) {
307
306
  name: "RAPID TypeScript",
308
307
  image: "mcr.microsoft.com/devcontainers/typescript-node:22",
309
308
  features: {
310
- ...baseFeatures,
311
- "ghcr.io/devcontainers-contrib/features/pnpm:2": {}
309
+ ...baseFeatures
312
310
  },
313
311
  customizations: {
314
312
  vscode: {
@@ -339,9 +337,7 @@ function getDevContainerConfig(detected, usePrebuilt = false) {
339
337
  image: "mcr.microsoft.com/devcontainers/python:3.12",
340
338
  features: {
341
339
  ...baseFeatures,
342
- "ghcr.io/devcontainers/features/node:1": { version: "22" },
343
- "ghcr.io/devcontainers-contrib/features/poetry:2": {},
344
- "ghcr.io/devcontainers-contrib/features/uv:1": {}
340
+ "ghcr.io/devcontainers/features/node:1": { version: "22" }
345
341
  },
346
342
  customizations: {
347
343
  vscode: {
@@ -367,7 +363,7 @@ function getDevContainerConfig(detected, usePrebuilt = false) {
367
363
  }
368
364
  },
369
365
  containerEnv,
370
- postCreateCommand: `${postCreateBase} && pip install aider-chat`,
366
+ postCreateCommand: `${postCreateBase} && pip install poetry uv aider-chat`,
371
367
  postStartCommand,
372
368
  remoteUser: "vscode"
373
369
  };
@@ -1954,6 +1950,7 @@ var statusCommand = new Command3("status").description("Show environment status"
1954
1950
  });
1955
1951
 
1956
1952
  // src/commands/agent.ts
1953
+ import { writeFile as writeFile4 } from "fs/promises";
1957
1954
  import { Command as Command4 } from "commander";
1958
1955
  import { loadConfig as loadConfig3, checkAllAgents as checkAllAgents2, logger as logger4 } from "@a3t/rapid-core";
1959
1956
  var agentCommand = new Command4("agent").description("Manage AI agents");
@@ -2008,8 +2005,9 @@ agentCommand.command("default [name]").description("Get or set default agent").a
2008
2005
  });
2009
2006
  process.exit(1);
2010
2007
  }
2011
- logger4.warn("Setting default agent requires editing rapid.json");
2012
- logger4.info(`Set "agents.default" to "${name}" in your rapid.json`);
2008
+ config.agents.default = name;
2009
+ await writeFile4(loaded.filepath, JSON.stringify(config, null, 2) + "\n");
2010
+ logger4.success(`Default agent set to "${name}"`);
2013
2011
  } catch (error) {
2014
2012
  logger4.error(error instanceof Error ? error.message : String(error));
2015
2013
  process.exit(1);
@@ -2688,7 +2686,7 @@ authCommand.command("env").description("Show environment variables for detected
2688
2686
 
2689
2687
  // src/commands/mcp.ts
2690
2688
  import { Command as Command9 } from "commander";
2691
- import { writeFile as writeFile4 } from "fs/promises";
2689
+ import { writeFile as writeFile5 } from "fs/promises";
2692
2690
  import { join as join5 } from "path";
2693
2691
  import {
2694
2692
  loadConfig as loadConfig7,
@@ -2711,7 +2709,7 @@ var mcpCommand = new Command9("mcp").description(
2711
2709
  );
2712
2710
  async function saveConfig(rootDir, config) {
2713
2711
  const configPath = join5(rootDir, "rapid.json");
2714
- await writeFile4(configPath, JSON.stringify(config, null, 2) + "\n", "utf-8");
2712
+ await writeFile5(configPath, JSON.stringify(config, null, 2) + "\n", "utf-8");
2715
2713
  }
2716
2714
  mcpCommand.command("list").description("List configured MCP servers").option("--json", "Output as JSON").option("--templates", "Show available templates instead of configured servers").action(async (options) => {
2717
2715
  try {
@@ -3621,4 +3619,4 @@ program.action(() => {
3621
3619
  export {
3622
3620
  program
3623
3621
  };
3624
- //# sourceMappingURL=chunk-C6XSZWFT.js.map
3622
+ //# sourceMappingURL=chunk-J7OOLQCF.js.map