@codyswann/lisa 2.225.5 → 2.226.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 (90) hide show
  1. package/README.md +7 -0
  2. package/all/create-only/scripts/remote-agent-aws-setup.sh +11 -0
  3. package/package.json +1 -1
  4. package/plugins/lisa/.claude-plugin/plugin.json +1 -1
  5. package/plugins/lisa/.codex-plugin/plugin.json +1 -1
  6. package/plugins/lisa/.codex-plugin/skills/lisa-analyze-claude-remote/SKILL.md +21 -18
  7. package/plugins/lisa/.codex-plugin/skills/lisa-generate-claude-remote-build-script/SKILL.md +15 -27
  8. package/plugins/lisa/.codex-plugin/skills/lisa-setup-remote-aws/SKILL.md +53 -0
  9. package/plugins/lisa/.codex-plugin/skills/lisa-setup-remote-aws/agents/openai.yaml +4 -0
  10. package/plugins/lisa/commands/setup-remote-aws.md +6 -0
  11. package/plugins/lisa/scripts/install-remote-agent-aws.mjs +248 -0
  12. package/plugins/lisa/scripts/remote-agent-aws-setup.sh +163 -0
  13. package/plugins/lisa/skills/lisa-analyze-claude-remote/SKILL.md +21 -18
  14. package/plugins/lisa/skills/lisa-generate-claude-remote-build-script/SKILL.md +15 -27
  15. package/plugins/lisa/skills/lisa-setup-remote-aws/SKILL.md +53 -0
  16. package/plugins/lisa/skills/lisa-setup-remote-aws/agents/openai.yaml +4 -0
  17. package/plugins/lisa-agy/commands/lisa/setup-remote-aws.md +6 -0
  18. package/plugins/lisa-agy/plugin.json +1 -1
  19. package/plugins/lisa-agy/scripts/install-remote-agent-aws.mjs +248 -0
  20. package/plugins/lisa-agy/scripts/remote-agent-aws-setup.sh +163 -0
  21. package/plugins/lisa-agy/skills/lisa-analyze-claude-remote/SKILL.md +21 -18
  22. package/plugins/lisa-agy/skills/lisa-generate-claude-remote-build-script/SKILL.md +15 -27
  23. package/plugins/lisa-agy/skills/lisa-setup-remote-aws/SKILL.md +53 -0
  24. package/plugins/lisa-cdk/.claude-plugin/plugin.json +1 -1
  25. package/plugins/lisa-cdk/.codex-plugin/plugin.json +1 -1
  26. package/plugins/lisa-cdk-agy/plugin.json +1 -1
  27. package/plugins/lisa-cdk-copilot/.claude-plugin/plugin.json +1 -1
  28. package/plugins/lisa-cdk-cursor/.claude-plugin/plugin.json +1 -1
  29. package/plugins/lisa-copilot/.claude-plugin/plugin.json +1 -1
  30. package/plugins/lisa-copilot/commands/lisa/setup-remote-aws.md +6 -0
  31. package/plugins/lisa-copilot/scripts/install-remote-agent-aws.mjs +248 -0
  32. package/plugins/lisa-copilot/scripts/remote-agent-aws-setup.sh +163 -0
  33. package/plugins/lisa-copilot/skills/lisa-analyze-claude-remote/SKILL.md +21 -18
  34. package/plugins/lisa-copilot/skills/lisa-generate-claude-remote-build-script/SKILL.md +15 -27
  35. package/plugins/lisa-copilot/skills/lisa-setup-remote-aws/SKILL.md +53 -0
  36. package/plugins/lisa-cursor/.claude-plugin/plugin.json +1 -1
  37. package/plugins/lisa-cursor/commands/lisa/setup-remote-aws.md +6 -0
  38. package/plugins/lisa-cursor/scripts/install-remote-agent-aws.mjs +248 -0
  39. package/plugins/lisa-cursor/scripts/remote-agent-aws-setup.sh +163 -0
  40. package/plugins/lisa-cursor/skills/lisa-analyze-claude-remote/SKILL.md +21 -18
  41. package/plugins/lisa-cursor/skills/lisa-generate-claude-remote-build-script/SKILL.md +15 -27
  42. package/plugins/lisa-cursor/skills/lisa-setup-remote-aws/SKILL.md +53 -0
  43. package/plugins/lisa-expo/.claude-plugin/plugin.json +1 -1
  44. package/plugins/lisa-expo/.codex-plugin/plugin.json +1 -1
  45. package/plugins/lisa-expo-agy/plugin.json +1 -1
  46. package/plugins/lisa-expo-copilot/.claude-plugin/plugin.json +1 -1
  47. package/plugins/lisa-expo-cursor/.claude-plugin/plugin.json +1 -1
  48. package/plugins/lisa-harper-fabric/.claude-plugin/plugin.json +1 -1
  49. package/plugins/lisa-harper-fabric/.codex-plugin/plugin.json +1 -1
  50. package/plugins/lisa-harper-fabric-agy/plugin.json +1 -1
  51. package/plugins/lisa-harper-fabric-copilot/.claude-plugin/plugin.json +1 -1
  52. package/plugins/lisa-harper-fabric-cursor/.claude-plugin/plugin.json +1 -1
  53. package/plugins/lisa-nestjs/.claude-plugin/plugin.json +1 -1
  54. package/plugins/lisa-nestjs/.codex-plugin/plugin.json +1 -1
  55. package/plugins/lisa-nestjs-agy/plugin.json +1 -1
  56. package/plugins/lisa-nestjs-copilot/.claude-plugin/plugin.json +1 -1
  57. package/plugins/lisa-nestjs-cursor/.claude-plugin/plugin.json +1 -1
  58. package/plugins/lisa-openclaw/.claude-plugin/plugin.json +1 -1
  59. package/plugins/lisa-openclaw/.codex-plugin/plugin.json +1 -1
  60. package/plugins/lisa-openclaw-agy/plugin.json +1 -1
  61. package/plugins/lisa-openclaw-copilot/.claude-plugin/plugin.json +1 -1
  62. package/plugins/lisa-openclaw-cursor/.claude-plugin/plugin.json +1 -1
  63. package/plugins/lisa-phaser/.claude-plugin/plugin.json +1 -1
  64. package/plugins/lisa-phaser/.codex-plugin/plugin.json +1 -1
  65. package/plugins/lisa-phaser-agy/plugin.json +1 -1
  66. package/plugins/lisa-phaser-copilot/.claude-plugin/plugin.json +1 -1
  67. package/plugins/lisa-phaser-cursor/.claude-plugin/plugin.json +1 -1
  68. package/plugins/lisa-rails/.claude-plugin/plugin.json +1 -1
  69. package/plugins/lisa-rails/.codex-plugin/plugin.json +1 -1
  70. package/plugins/lisa-rails-agy/plugin.json +1 -1
  71. package/plugins/lisa-rails-copilot/.claude-plugin/plugin.json +1 -1
  72. package/plugins/lisa-rails-cursor/.claude-plugin/plugin.json +1 -1
  73. package/plugins/lisa-typescript/.claude-plugin/plugin.json +1 -1
  74. package/plugins/lisa-typescript/.codex-plugin/plugin.json +1 -1
  75. package/plugins/lisa-typescript-agy/plugin.json +1 -1
  76. package/plugins/lisa-typescript-copilot/.claude-plugin/plugin.json +1 -1
  77. package/plugins/lisa-typescript-cursor/.claude-plugin/plugin.json +1 -1
  78. package/plugins/lisa-wiki/.claude-plugin/plugin.json +1 -1
  79. package/plugins/lisa-wiki/.codex-plugin/plugin.json +1 -1
  80. package/plugins/lisa-wiki-agy/plugin.json +1 -1
  81. package/plugins/lisa-wiki-copilot/.claude-plugin/plugin.json +1 -1
  82. package/plugins/lisa-wiki-cursor/.claude-plugin/plugin.json +1 -1
  83. package/plugins/src/base/commands/setup-remote-aws.md +6 -0
  84. package/plugins/src/base/scripts/install-remote-agent-aws.mjs +248 -0
  85. package/plugins/src/base/scripts/remote-agent-aws-setup.sh +163 -0
  86. package/plugins/src/base/skills/lisa-analyze-claude-remote/SKILL.md +21 -18
  87. package/plugins/src/base/skills/lisa-generate-claude-remote-build-script/SKILL.md +15 -27
  88. package/plugins/src/base/skills/lisa-setup-remote-aws/SKILL.md +53 -0
  89. package/scripts/claude-remote-setup.sh +9 -2
  90. package/scripts/remote-agent-aws-setup.sh +17 -0
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-harper-fabric",
3
- "version": "2.225.5",
3
+ "version": "2.226.0",
4
4
  "description": "Harper/Fabric-specific rules for TypeScript component apps",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-harper-fabric",
3
- "version": "2.225.5",
3
+ "version": "2.226.0",
4
4
  "description": "Harper/Fabric-specific Lisa rules for TypeScript component apps.",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-harper-fabric",
3
- "version": "2.225.5",
3
+ "version": "2.226.0",
4
4
  "description": "Harper/Fabric-specific rules for TypeScript component apps",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-harper-fabric",
3
- "version": "2.225.5",
3
+ "version": "2.226.0",
4
4
  "description": "Harper/Fabric-specific rules for TypeScript component apps",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-harper-fabric",
3
- "version": "2.225.5",
3
+ "version": "2.226.0",
4
4
  "description": "Harper/Fabric-specific rules for TypeScript component apps",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-nestjs",
3
- "version": "2.225.5",
3
+ "version": "2.226.0",
4
4
  "description": "NestJS-specific skills (GraphQL, TypeORM) and hooks (migration write-protection)",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-nestjs",
3
- "version": "2.225.5",
3
+ "version": "2.226.0",
4
4
  "description": "NestJS-specific skills and migration write-protection hooks.",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-nestjs",
3
- "version": "2.225.5",
3
+ "version": "2.226.0",
4
4
  "description": "NestJS-specific skills (GraphQL, TypeORM) and hooks (migration write-protection)",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-nestjs",
3
- "version": "2.225.5",
3
+ "version": "2.226.0",
4
4
  "description": "NestJS-specific skills (GraphQL, TypeORM) and hooks (migration write-protection)",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-nestjs",
3
- "version": "2.225.5",
3
+ "version": "2.226.0",
4
4
  "description": "NestJS-specific skills (GraphQL, TypeORM) and hooks (migration write-protection)",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-openclaw",
3
- "version": "2.225.5",
3
+ "version": "2.226.0",
4
4
  "description": "Connect staff roles to Telegram or Slack via OpenClaw — facilitator/specialist hub-and-spoke routing and repo-coding topics, for Claude Code and Codex",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-openclaw",
3
- "version": "2.225.5",
3
+ "version": "2.226.0",
4
4
  "description": "Connect staff roles to Telegram or Slack via OpenClaw — facilitator/specialist hub-and-spoke routing and repo-coding topics, across Claude and Codex.",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-openclaw",
3
- "version": "2.225.5",
3
+ "version": "2.226.0",
4
4
  "description": "Connect staff roles to Telegram or Slack via OpenClaw — facilitator/specialist hub-and-spoke routing and repo-coding topics, for Claude Code and Codex",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-openclaw",
3
- "version": "2.225.5",
3
+ "version": "2.226.0",
4
4
  "description": "Connect staff roles to Telegram or Slack via OpenClaw — facilitator/specialist hub-and-spoke routing and repo-coding topics, for Claude Code and Codex",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-openclaw",
3
- "version": "2.225.5",
3
+ "version": "2.226.0",
4
4
  "description": "Connect staff roles to Telegram or Slack via OpenClaw — facilitator/specialist hub-and-spoke routing and repo-coding topics, for Claude Code and Codex",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-phaser",
3
- "version": "2.225.5",
3
+ "version": "2.226.0",
4
4
  "description": "Phaser 4 game-development rules for TypeScript projects",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-phaser",
3
- "version": "2.225.5",
3
+ "version": "2.226.0",
4
4
  "description": "Phaser 4 game-development rules for TypeScript projects",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-phaser",
3
- "version": "2.225.5",
3
+ "version": "2.226.0",
4
4
  "description": "Phaser 4 game-development rules for TypeScript projects",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-phaser",
3
- "version": "2.225.5",
3
+ "version": "2.226.0",
4
4
  "description": "Phaser 4 game-development rules for TypeScript projects",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-phaser",
3
- "version": "2.225.5",
3
+ "version": "2.226.0",
4
4
  "description": "Phaser 4 game-development rules for TypeScript projects",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-rails",
3
- "version": "2.225.5",
3
+ "version": "2.226.0",
4
4
  "description": "Ruby on Rails-specific hooks — RuboCop linting/formatting and ast-grep scanning on edit",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-rails",
3
- "version": "2.225.5",
3
+ "version": "2.226.0",
4
4
  "description": "Ruby on Rails-specific skills and hooks for RuboCop and ast-grep scanning on edit.",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-rails",
3
- "version": "2.225.5",
3
+ "version": "2.226.0",
4
4
  "description": "Ruby on Rails-specific hooks — RuboCop linting/formatting and ast-grep scanning on edit",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-rails",
3
- "version": "2.225.5",
3
+ "version": "2.226.0",
4
4
  "description": "Ruby on Rails-specific hooks — RuboCop linting/formatting and ast-grep scanning on edit",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-rails",
3
- "version": "2.225.5",
3
+ "version": "2.226.0",
4
4
  "description": "Ruby on Rails-specific hooks — RuboCop linting/formatting and ast-grep scanning on edit",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-typescript",
3
- "version": "2.225.5",
3
+ "version": "2.226.0",
4
4
  "description": "TypeScript-specific hooks — Prettier formatting, ESLint linting, ast-grep scanning, and error-suppression blocking on edit",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-typescript",
3
- "version": "2.225.5",
3
+ "version": "2.226.0",
4
4
  "description": "TypeScript-specific hooks for formatting, linting, and ast-grep scanning on edit.",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-typescript",
3
- "version": "2.225.5",
3
+ "version": "2.226.0",
4
4
  "description": "TypeScript-specific hooks — Prettier formatting, ESLint linting, ast-grep scanning, and error-suppression blocking on edit",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-typescript",
3
- "version": "2.225.5",
3
+ "version": "2.226.0",
4
4
  "description": "TypeScript-specific hooks — Prettier formatting, ESLint linting, ast-grep scanning, and error-suppression blocking on edit",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-typescript",
3
- "version": "2.225.5",
3
+ "version": "2.226.0",
4
4
  "description": "TypeScript-specific hooks — Prettier formatting, ESLint linting, ast-grep scanning, and error-suppression blocking on edit",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-wiki",
3
- "version": "2.225.5",
3
+ "version": "2.226.0",
4
4
  "description": "LLM Wiki — a distributable, git-native markdown knowledge base for Claude Code and Codex",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-wiki",
3
- "version": "2.225.5",
3
+ "version": "2.226.0",
4
4
  "description": "Distributable LLM Wiki kernel — ingest, query, lint, and maintain a git-native markdown knowledge base across Claude and Codex.",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-wiki",
3
- "version": "2.225.5",
3
+ "version": "2.226.0",
4
4
  "description": "LLM Wiki — a distributable, git-native markdown knowledge base for Claude Code and Codex",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-wiki",
3
- "version": "2.225.5",
3
+ "version": "2.226.0",
4
4
  "description": "LLM Wiki — a distributable, git-native markdown knowledge base for Claude Code and Codex",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-wiki",
3
- "version": "2.225.5",
3
+ "version": "2.226.0",
4
4
  "description": "LLM Wiki — a distributable, git-native markdown knowledge base for Claude Code and Codex",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -0,0 +1,6 @@
1
+ ---
2
+ description: "Install Lisa's vendor-neutral AWS CLI bootstrap and platform adapters for remote coding environments."
3
+ argument-hint: "[--platform=all|claude|codex|cursor|copilot|agy|opencode] [--project=<path>] [--secret-name=<name>]"
4
+ ---
5
+
6
+ Use the /lisa-setup-remote-aws skill to install and validate remote coding-agent AWS access. $ARGUMENTS
@@ -0,0 +1,248 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * Install Lisa's vendor-neutral remote AWS bootstrap into a host project.
4
+ *
5
+ * This installer writes only non-secret repository artifacts. The bootstrap
6
+ * SecretString is configured directly in each remote-agent platform.
7
+ * @module install-remote-agent-aws
8
+ */
9
+ import {
10
+ chmodSync,
11
+ existsSync,
12
+ mkdirSync,
13
+ readFileSync,
14
+ writeFileSync,
15
+ } from "node:fs";
16
+ import path from "node:path";
17
+ import { fileURLToPath } from "node:url";
18
+
19
+ const SCRIPT_NAME = "remote-agent-aws-setup.sh";
20
+ const INSTALL_COMMAND = `bash scripts/${SCRIPT_NAME}`;
21
+ const VALID_PLATFORMS = new Set([
22
+ "all",
23
+ "claude",
24
+ "codex",
25
+ "cursor",
26
+ "copilot",
27
+ "agy",
28
+ "opencode",
29
+ ]);
30
+
31
+ function parseArguments(arguments_) {
32
+ let project = process.cwd();
33
+ let platform = "all";
34
+ let secretName = "remote-agent-credentials";
35
+ for (const argument of arguments_) {
36
+ if (argument.startsWith("--project=")) {
37
+ project = path.resolve(argument.slice("--project=".length));
38
+ } else if (argument.startsWith("--platform=")) {
39
+ platform = argument.slice("--platform=".length).toLowerCase();
40
+ } else if (argument.startsWith("--secret-name=")) {
41
+ secretName = argument.slice("--secret-name=".length);
42
+ } else {
43
+ throw new Error(`Unknown argument: ${argument}`);
44
+ }
45
+ }
46
+ if (!VALID_PLATFORMS.has(platform)) {
47
+ throw new Error(
48
+ `Unsupported platform '${platform}'. Expected one of: ${[...VALID_PLATFORMS].join(", ")}`
49
+ );
50
+ }
51
+ if (!/^[A-Za-z0-9/_+=.@-]+$/.test(secretName)) {
52
+ throw new Error("--secret-name must be a valid Secrets Manager name");
53
+ }
54
+ return { project, platform, secretName };
55
+ }
56
+
57
+ function writeSetupScript(project) {
58
+ const source = path.join(
59
+ path.dirname(fileURLToPath(import.meta.url)),
60
+ SCRIPT_NAME
61
+ );
62
+ const destination = path.join(project, "scripts", SCRIPT_NAME);
63
+ mkdirSync(path.dirname(destination), { recursive: true });
64
+ writeFileSync(destination, readFileSync(source));
65
+ chmodSync(destination, 0o700);
66
+ return path.relative(project, destination);
67
+ }
68
+
69
+ function installCursorAdapter(project) {
70
+ const environmentPath = path.join(project, ".cursor", "environment.json");
71
+ mkdirSync(path.dirname(environmentPath), { recursive: true });
72
+
73
+ const environment = existsSync(environmentPath)
74
+ ? JSON.parse(readFileSync(environmentPath, "utf8"))
75
+ : {};
76
+ const existingInstall = environment.install;
77
+ if (existingInstall !== undefined && typeof existingInstall !== "string") {
78
+ throw new Error(
79
+ `.cursor/environment.json install must be a string before Lisa can merge ${INSTALL_COMMAND}`
80
+ );
81
+ }
82
+ const lisaInstall = `LISA_REMOTE_AGENT=cursor ${INSTALL_COMMAND}`;
83
+ if (!existingInstall?.includes(SCRIPT_NAME)) {
84
+ environment.install = existingInstall
85
+ ? `${lisaInstall} && ${existingInstall}`
86
+ : lisaInstall;
87
+ }
88
+ writeFileSync(environmentPath, `${JSON.stringify(environment, null, 2)}\n`);
89
+ return path.relative(project, environmentPath);
90
+ }
91
+
92
+ function installCopilotAdapter(project) {
93
+ const workflowPath = path.join(
94
+ project,
95
+ ".github",
96
+ "workflows",
97
+ "copilot-setup-steps.yml"
98
+ );
99
+ mkdirSync(path.dirname(workflowPath), { recursive: true });
100
+ const marker = "Lisa remote AWS bootstrap";
101
+ const step = [
102
+ ` - name: ${marker}`,
103
+ " env:",
104
+ " LISA_REMOTE_AGENT: copilot",
105
+ ` run: ${INSTALL_COMMAND}`,
106
+ ].join("\n");
107
+
108
+ if (!existsSync(workflowPath)) {
109
+ writeFileSync(
110
+ workflowPath,
111
+ [
112
+ 'name: "Copilot Setup Steps"',
113
+ "on:",
114
+ " workflow_dispatch:",
115
+ "jobs:",
116
+ " copilot-setup-steps:",
117
+ " runs-on: ubuntu-latest",
118
+ " permissions:",
119
+ " contents: read",
120
+ " steps:",
121
+ " - uses: actions/checkout@v4",
122
+ step,
123
+ "",
124
+ ].join("\n")
125
+ );
126
+ return path.relative(project, workflowPath);
127
+ }
128
+
129
+ const current = readFileSync(workflowPath, "utf8");
130
+ if (current.includes(marker)) return path.relative(project, workflowPath);
131
+ const lines = current.split("\n");
132
+ const jobIndex = lines.findIndex(line =>
133
+ /^\s{2}copilot-setup-steps:\s*$/.test(line)
134
+ );
135
+ const jobEndIndex = lines.findIndex(
136
+ (line, index) => index > jobIndex && /^\s{2}\S[^:]*:\s*$/.test(line)
137
+ );
138
+ const stepsIndex = lines.findIndex(
139
+ (line, index) =>
140
+ index > jobIndex &&
141
+ (jobEndIndex < 0 || index < jobEndIndex) &&
142
+ /^\s{4}steps:\s*$/.test(line)
143
+ );
144
+ if (jobIndex < 0 || stepsIndex < 0) {
145
+ throw new Error(
146
+ "Existing copilot-setup-steps.yml must contain jobs.copilot-setup-steps.steps before Lisa can merge the AWS bootstrap step"
147
+ );
148
+ }
149
+ const additions = current.includes("actions/checkout@")
150
+ ? [step]
151
+ : [" - uses: actions/checkout@v4", step];
152
+ lines.splice(stepsIndex + 1, 0, ...additions);
153
+ writeFileSync(workflowPath, lines.join("\n"));
154
+ return path.relative(project, workflowPath);
155
+ }
156
+
157
+ function writeGuide(project, platform, secretName) {
158
+ const guidePath = path.join(project, "docs", "remote-agent-aws.md");
159
+ mkdirSync(path.dirname(guidePath), { recursive: true });
160
+ writeFileSync(
161
+ guidePath,
162
+ `# Remote coding-agent AWS access
163
+
164
+ This repository uses Lisa's vendor-neutral AWS bootstrap. Configure the complete
165
+ Secrets Manager SecretString as the secret \`LISA_AWS_BOOTSTRAP_JSON\`; do not
166
+ split it into \`AWS_ACCESS_KEY_ID\` and \`AWS_SECRET_ACCESS_KEY\` environment
167
+ variables. The setup script writes a named source profile whose only permission
168
+ is \`sts:AssumeRole\`, then creates automatically refreshed role profiles.
169
+
170
+ ## Runtime configuration
171
+
172
+ | Runtime | Setup |
173
+ |---|---|
174
+ | Claude | Add \`LISA_AWS_BOOTSTRAP_JSON\` to the cloud environment, set \`LISA_REMOTE_AGENT=claude\`, and run \`${INSTALL_COMMAND}\` in the setup script. |
175
+ | Codex | Add \`LISA_AWS_BOOTSTRAP_JSON\` as a setup secret, set \`LISA_REMOTE_AGENT=codex\`, and run \`${INSTALL_COMMAND}\` in the setup script. Permit required AWS endpoints during the agent phase. |
176
+ | Cursor | Add the secret to the selected cloud environment. \`.cursor/environment.json\` runs the setup script with \`LISA_REMOTE_AGENT=cursor\`. |
177
+ | Copilot | Add the value as an organization-level **Agents** secret. \`copilot-setup-steps.yml\` runs the setup script with \`LISA_REMOTE_AGENT=copilot\`. |
178
+ | Antigravity | Direct AWS CLI is supported only on a user-managed remote host. Google's managed preview currently documents proxy-injected HTTP credentials, not arbitrary AWS credential files. |
179
+ | OpenCode | Run the setup script on the VPS/container that hosts \`opencode serve\`, with \`LISA_REMOTE_AGENT=opencode\`. OpenCode does not supply the host. |
180
+
181
+ Generated for: \`${platform}\`.
182
+
183
+ ## Profiles
184
+
185
+ The bootstrap bundle defines the available profile names. \`dev\` is the
186
+ default when present. Select another account explicitly, for example:
187
+
188
+ \`\`\`bash
189
+ aws --profile staging sts get-caller-identity
190
+ aws --profile production cloudformation describe-stacks
191
+ \`\`\`
192
+
193
+ Production and shared profiles are observer-only. Production repair remains a
194
+ human-driven local-workstation operation.
195
+
196
+ ## Administrator rollout
197
+
198
+ After the infrastructure pipeline deploys the remote-agent IAM stacks, retrieve
199
+ the complete bundle from the shared account. Do not extract or distribute its
200
+ individual access-key fields:
201
+
202
+ \`\`\`bash
203
+ aws --profile shared secretsmanager get-secret-value \\
204
+ --secret-id ${secretName} \\
205
+ --query SecretString \\
206
+ --output text
207
+ \`\`\`
208
+
209
+ Store that exact output as the masked secret \`LISA_AWS_BOOTSTRAP_JSON\` on each
210
+ remote-agent platform. Run the setup command and require its live
211
+ \`sts:GetCallerIdentity\` check to pass before considering the platform ready.
212
+
213
+ Rotate by replacing the bootstrap IAM access key through infrastructure and
214
+ then updating this one secret on every configured platform. Disabling or
215
+ deleting the bootstrap user immediately prevents new role sessions.
216
+ `
217
+ );
218
+ return path.relative(project, guidePath);
219
+ }
220
+
221
+ export function installRemoteAgentAws(arguments_ = process.argv.slice(2)) {
222
+ const { project, platform, secretName } = parseArguments(arguments_);
223
+ if (!existsSync(project))
224
+ throw new Error(`Project does not exist: ${project}`);
225
+
226
+ const written = [writeSetupScript(project)];
227
+ if (platform === "all" || platform === "cursor") {
228
+ written.push(installCursorAdapter(project));
229
+ }
230
+ if (platform === "all" || platform === "copilot") {
231
+ written.push(installCopilotAdapter(project));
232
+ }
233
+ written.push(writeGuide(project, platform, secretName));
234
+ return { project, platform, secretName, written };
235
+ }
236
+
237
+ if (process.argv[1] === fileURLToPath(import.meta.url)) {
238
+ try {
239
+ process.stdout.write(
240
+ `${JSON.stringify(installRemoteAgentAws(), null, 2)}\n`
241
+ );
242
+ } catch (error) {
243
+ process.stderr.write(
244
+ `install-remote-agent-aws: ${error instanceof Error ? error.message : String(error)}\n`
245
+ );
246
+ process.exitCode = 1;
247
+ }
248
+ }