@nram-ai/setup-agents 0.0.1-pre.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 (84) hide show
  1. package/LICENSE +19 -0
  2. package/README.md +109 -0
  3. package/dist/helpers/configure/amp.d.ts +9 -0
  4. package/dist/helpers/configure/amp.js +49 -0
  5. package/dist/helpers/configure/amp.js.map +1 -0
  6. package/dist/helpers/configure/antigravity.d.ts +12 -0
  7. package/dist/helpers/configure/antigravity.js +74 -0
  8. package/dist/helpers/configure/antigravity.js.map +1 -0
  9. package/dist/helpers/configure/claude_code.d.ts +9 -0
  10. package/dist/helpers/configure/claude_code.js +119 -0
  11. package/dist/helpers/configure/claude_code.js.map +1 -0
  12. package/dist/helpers/configure/codex.d.ts +19 -0
  13. package/dist/helpers/configure/codex.js +76 -0
  14. package/dist/helpers/configure/codex.js.map +1 -0
  15. package/dist/helpers/configure/copilot.d.ts +11 -0
  16. package/dist/helpers/configure/copilot.js +64 -0
  17. package/dist/helpers/configure/copilot.js.map +1 -0
  18. package/dist/helpers/configure/cursor.d.ts +26 -0
  19. package/dist/helpers/configure/cursor.js +90 -0
  20. package/dist/helpers/configure/cursor.js.map +1 -0
  21. package/dist/helpers/configure/droid.d.ts +18 -0
  22. package/dist/helpers/configure/droid.js +70 -0
  23. package/dist/helpers/configure/droid.js.map +1 -0
  24. package/dist/helpers/configure/grok.d.ts +25 -0
  25. package/dist/helpers/configure/grok.js +93 -0
  26. package/dist/helpers/configure/grok.js.map +1 -0
  27. package/dist/helpers/configure/hermes.d.ts +22 -0
  28. package/dist/helpers/configure/hermes.js +107 -0
  29. package/dist/helpers/configure/hermes.js.map +1 -0
  30. package/dist/helpers/configure/junie.d.ts +10 -0
  31. package/dist/helpers/configure/junie.js +52 -0
  32. package/dist/helpers/configure/junie.js.map +1 -0
  33. package/dist/helpers/configure/kilo.d.ts +19 -0
  34. package/dist/helpers/configure/kilo.js +110 -0
  35. package/dist/helpers/configure/kilo.js.map +1 -0
  36. package/dist/helpers/configure/kimi.d.ts +10 -0
  37. package/dist/helpers/configure/kimi.js +75 -0
  38. package/dist/helpers/configure/kimi.js.map +1 -0
  39. package/dist/helpers/configure/kiro.d.ts +25 -0
  40. package/dist/helpers/configure/kiro.js +77 -0
  41. package/dist/helpers/configure/kiro.js.map +1 -0
  42. package/dist/helpers/configure/openclaw.d.ts +10 -0
  43. package/dist/helpers/configure/openclaw.js +72 -0
  44. package/dist/helpers/configure/openclaw.js.map +1 -0
  45. package/dist/helpers/configure/opencode.d.ts +18 -0
  46. package/dist/helpers/configure/opencode.js +72 -0
  47. package/dist/helpers/configure/opencode.js.map +1 -0
  48. package/dist/helpers/configure/pi.d.ts +10 -0
  49. package/dist/helpers/configure/pi.js +60 -0
  50. package/dist/helpers/configure/pi.js.map +1 -0
  51. package/dist/helpers/configure/trae.d.ts +11 -0
  52. package/dist/helpers/configure/trae.js +63 -0
  53. package/dist/helpers/configure/trae.js.map +1 -0
  54. package/dist/helpers/configure/vibe.d.ts +24 -0
  55. package/dist/helpers/configure/vibe.js +106 -0
  56. package/dist/helpers/configure/vibe.js.map +1 -0
  57. package/dist/helpers/configure/vscode.d.ts +18 -0
  58. package/dist/helpers/configure/vscode.js +81 -0
  59. package/dist/helpers/configure/vscode.js.map +1 -0
  60. package/dist/helpers/harnesses.d.ts +8 -0
  61. package/dist/helpers/harnesses.js +161 -0
  62. package/dist/helpers/harnesses.js.map +1 -0
  63. package/dist/helpers/instructions.d.ts +63 -0
  64. package/dist/helpers/instructions.js +175 -0
  65. package/dist/helpers/instructions.js.map +1 -0
  66. package/dist/helpers/paths.d.ts +130 -0
  67. package/dist/helpers/paths.js +211 -0
  68. package/dist/helpers/paths.js.map +1 -0
  69. package/dist/helpers/upsert.d.ts +197 -0
  70. package/dist/helpers/upsert.js +428 -0
  71. package/dist/helpers/upsert.js.map +1 -0
  72. package/dist/helpers/url.d.ts +15 -0
  73. package/dist/helpers/url.js +51 -0
  74. package/dist/helpers/url.js.map +1 -0
  75. package/dist/index.d.ts +2 -0
  76. package/dist/index.js +105 -0
  77. package/dist/index.js.map +1 -0
  78. package/dist/setup.d.ts +17 -0
  79. package/dist/setup.js +296 -0
  80. package/dist/setup.js.map +1 -0
  81. package/dist/types.d.ts +67 -0
  82. package/dist/types.js +50 -0
  83. package/dist/types.js.map +1 -0
  84. package/package.json +76 -0
@@ -0,0 +1,110 @@
1
+ "use strict";
2
+ // Copyright (c) 2026, Brandon Lehmann <brandonlehmann@gmail.com>
3
+ //
4
+ // Permission is hereby granted, free of charge, to any person obtaining a copy
5
+ // of this software and associated documentation files (the "Software"), to deal
6
+ // in the Software without restriction, including without limitation the rights
7
+ // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+ // copies of the Software, and to permit persons to whom the Software is
9
+ // furnished to do so, subject to the following conditions:
10
+ //
11
+ // The above copyright notice and this permission notice shall be included in all
12
+ // copies or substantial portions of the Software.
13
+ //
14
+ // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
+ // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
+ // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
+ // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
+ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
+ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20
+ // SOFTWARE.
21
+ Object.defineProperty(exports, "__esModule", { value: true });
22
+ exports.configure_kilo = exports.kilo_mcp_entry = void 0;
23
+ const path_1 = require("path");
24
+ const types_1 = require("../../types");
25
+ const paths_1 = require("../paths");
26
+ const upsert_1 = require("../upsert");
27
+ /**
28
+ * Builds the `mcp.nram` entry for kilo.jsonc. Kilo substitutes
29
+ * `{env:VAR}` references, so the key never reaches disk
30
+ *
31
+ * @param mcp_url the MCP endpoint URL
32
+ * @param api_key the API key, when API-key authentication was chosen
33
+ */
34
+ const kilo_mcp_entry = (mcp_url, api_key) => {
35
+ const entry = {
36
+ type: 'streamable-http',
37
+ url: mcp_url,
38
+ enabled: true
39
+ };
40
+ if (api_key !== undefined) {
41
+ entry.headers = { Authorization: 'Bearer {env:NRAM_API_KEY}' };
42
+ }
43
+ return entry;
44
+ };
45
+ exports.kilo_mcp_entry = kilo_mcp_entry;
46
+ /**
47
+ * Configures Kilo Code: merges the nram MCP server into kilo.jsonc at the
48
+ * requested scope. Instructions: project scope uses the repository root
49
+ * AGENTS.md (Kilo reads it natively); user scope writes a rule file under
50
+ * the global config dir and references it from the `instructions` array in
51
+ * kilo.jsonc, which is how Kilo documents global rules
52
+ *
53
+ * @param options the collected setup options
54
+ */
55
+ const configure_kilo = async (options) => {
56
+ const results = [];
57
+ const config_path = (0, path_1.resolve)((0, paths_1.kilo_dir)(options.scope), 'kilo.jsonc');
58
+ if (options.mcp_url !== undefined) {
59
+ const entry = (0, exports.kilo_mcp_entry)(options.mcp_url, options.api_key);
60
+ const mcp = (0, upsert_1.mcp_json_result)(config_path, ['mcp', 'nram'], entry, {
61
+ parse_hint: 'Kilo allows JSONC, which this tool does not rewrite'
62
+ });
63
+ results.push(mcp);
64
+ if (mcp.kind !== 'manual' && options.api_key !== undefined) {
65
+ results.push((0, upsert_1.api_key_manual_result)());
66
+ }
67
+ }
68
+ if (options.instructions) {
69
+ if (options.scope === types_1.Scope.PROJECT) {
70
+ results.push((0, upsert_1.agents_md_result)((0, path_1.resolve)(process.cwd(), 'AGENTS.md'), options.instructions.full));
71
+ }
72
+ else {
73
+ const rule_path = (0, path_1.resolve)((0, paths_1.kilo_dir)(options.scope), 'rules', 'nram.md');
74
+ results.push((0, upsert_1.upsert_own_file)(rule_path, options.instructions.condensed, 'Agent instructions'));
75
+ const config_file = (0, upsert_1.read_json)(config_path);
76
+ if (!config_file.ok) {
77
+ results.push({
78
+ action: 'Rule reference',
79
+ kind: 'manual',
80
+ detail: `${config_path} could not be parsed; add "${rule_path.replace(/\\/g, '/')}" to its ` +
81
+ '"instructions" array yourself so Kilo loads the rule globally'
82
+ });
83
+ }
84
+ else {
85
+ const config = config_file.value ?? {};
86
+ config.instructions ??= [];
87
+ const reference = rule_path.replace(/\\/g, '/');
88
+ if (config.instructions.includes(reference)) {
89
+ results.push({
90
+ action: 'Rule reference',
91
+ kind: 'skipped',
92
+ detail: `already present in ${config_path}`
93
+ });
94
+ }
95
+ else {
96
+ config.instructions.push(reference);
97
+ (0, upsert_1.write_json)(config_path, config);
98
+ results.push({
99
+ action: 'Rule reference',
100
+ kind: config_file.existed ? 'updated' : 'written',
101
+ detail: config_path
102
+ });
103
+ }
104
+ }
105
+ }
106
+ }
107
+ return results;
108
+ };
109
+ exports.configure_kilo = configure_kilo;
110
+ //# sourceMappingURL=kilo.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"kilo.js","sourceRoot":"","sources":["../../../src/helpers/configure/kilo.ts"],"names":[],"mappings":";AAAA,iEAAiE;AACjE,EAAE;AACF,+EAA+E;AAC/E,gFAAgF;AAChF,+EAA+E;AAC/E,4EAA4E;AAC5E,wEAAwE;AACxE,2DAA2D;AAC3D,EAAE;AACF,iFAAiF;AACjF,kDAAkD;AAClD,EAAE;AACF,6EAA6E;AAC7E,2EAA2E;AAC3E,8EAA8E;AAC9E,yEAAyE;AACzE,gFAAgF;AAChF,gFAAgF;AAChF,YAAY;;;AAEZ,+BAA+B;AAC/B,uCAAgE;AAChE,oCAAoC;AACpC,sCAOmB;AAEnB;;;;;;GAMG;AACI,MAAM,cAAc,GAAG,CAAC,OAAe,EAAE,OAAgB,EAAO,EAAE;IACrE,MAAM,KAAK,GAAQ;QACf,IAAI,EAAE,iBAAiB;QACvB,GAAG,EAAE,OAAO;QACZ,OAAO,EAAE,IAAI;KAChB,CAAC;IAEF,IAAI,OAAO,KAAK,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CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS;wBACjD,MAAM,EAAE,WAAW;qBACtB,CAAC,CAAC;gBACP,CAAC;YACL,CAAC;QACL,CAAC;IACL,CAAC;IAED,OAAO,OAAO,CAAC;AACnB,CAAC,CAAC;AAjEW,QAAA,cAAc,kBAiEzB"}
@@ -0,0 +1,10 @@
1
+ import { ActionResult, SetupOptions } from '../../types';
2
+ /**
3
+ * Configures Kimi Code CLI: merges the nram MCP server into the user-level
4
+ * mcp.json. Kimi does not auto-load AGENTS.md or any documented instruction
5
+ * file (MoonshotAI/kimi-cli issue 850 closed without documented support as
6
+ * of June 2026), so the instructions half is reported and skipped
7
+ *
8
+ * @param options the collected setup options
9
+ */
10
+ export declare const configure_kimi: (options: SetupOptions) => Promise<ActionResult[]>;
@@ -0,0 +1,75 @@
1
+ "use strict";
2
+ // Copyright (c) 2026, Brandon Lehmann <brandonlehmann@gmail.com>
3
+ //
4
+ // Permission is hereby granted, free of charge, to any person obtaining a copy
5
+ // of this software and associated documentation files (the "Software"), to deal
6
+ // in the Software without restriction, including without limitation the rights
7
+ // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+ // copies of the Software, and to permit persons to whom the Software is
9
+ // furnished to do so, subject to the following conditions:
10
+ //
11
+ // The above copyright notice and this permission notice shall be included in all
12
+ // copies or substantial portions of the Software.
13
+ //
14
+ // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
+ // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
+ // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
+ // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
+ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
+ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20
+ // SOFTWARE.
21
+ Object.defineProperty(exports, "__esModule", { value: true });
22
+ exports.configure_kimi = void 0;
23
+ const path_1 = require("path");
24
+ const types_1 = require("../../types");
25
+ const paths_1 = require("../paths");
26
+ const upsert_1 = require("../upsert");
27
+ /**
28
+ * Configures Kimi Code CLI: merges the nram MCP server into the user-level
29
+ * mcp.json. Kimi does not auto-load AGENTS.md or any documented instruction
30
+ * file (MoonshotAI/kimi-cli issue 850 closed without documented support as
31
+ * of June 2026), so the instructions half is reported and skipped
32
+ *
33
+ * @param options the collected setup options
34
+ */
35
+ const configure_kimi = async (options) => {
36
+ const results = [];
37
+ if (options.mcp_url !== undefined) {
38
+ if (options.scope !== types_1.Scope.USER) {
39
+ results.push({
40
+ action: 'MCP registration',
41
+ kind: 'skipped',
42
+ detail: 'Kimi Code keeps MCP servers in the user-level ~/.kimi/mcp.json only; rerun at user scope'
43
+ });
44
+ }
45
+ else {
46
+ const config_path = (0, path_1.resolve)((0, paths_1.kimi_dir)(), 'mcp.json');
47
+ const mcp = (0, upsert_1.mcp_json_result)(config_path, ['mcpServers', 'nram'], { url: options.mcp_url });
48
+ results.push(mcp);
49
+ if (mcp.kind !== 'manual') {
50
+ if (options.api_key !== undefined) {
51
+ results.push((0, upsert_1.api_key_header_manual_result)(config_path));
52
+ }
53
+ else {
54
+ results.push({
55
+ action: 'Authentication',
56
+ kind: 'manual',
57
+ detail: 'run `kimi mcp auth nram` once to complete the OAuth flow (Kimi requires an ' +
58
+ 'explicit auth step for OAuth MCP servers)'
59
+ });
60
+ }
61
+ }
62
+ }
63
+ }
64
+ if (options.instructions) {
65
+ results.push({
66
+ action: 'Agent instructions',
67
+ kind: 'skipped',
68
+ detail: 'Kimi Code does not auto-load AGENTS.md or any documented instruction file (as of June 2026); ' +
69
+ 'nothing was written because Kimi would not read it'
70
+ });
71
+ }
72
+ return results;
73
+ };
74
+ exports.configure_kimi = configure_kimi;
75
+ //# sourceMappingURL=kimi.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AI,CAAC,IAAA,qCAA4B,EAAC,WAAW,CAAC,CAAC,CAAC;gBAC5D,CAAC;qBAAM,CAAC;oBACJ,OAAO,CAAC,IAAI,CAAC;wBACT,MAAM,EAAE,gBAAgB;wBACxB,IAAI,EAAE,QAAQ;wBACd,MAAM,EAAE,6EAA6E;4BACjF,2CAA2C;qBAClD,CAAC,CAAC;gBACP,CAAC;YACL,CAAC;QACL,CAAC;IACL,CAAC;IAED,IAAI,OAAO,CAAC,YAAY,EAAE,CAAC;QACvB,OAAO,CAAC,IAAI,CAAC;YACT,MAAM,EAAE,oBAAoB;YAC5B,IAAI,EAAE,SAAS;YACf,MAAM,EAAE,+FAA+F;gBACnG,oDAAoD;SAC3D,CAAC,CAAC;IACP,CAAC;IAED,OAAO,OAAO,CAAC;AACnB,CAAC,CAAC;AA1CW,QAAA,cAAc,kBA0CzB"}
@@ -0,0 +1,25 @@
1
+ import { ActionResult, SetupOptions } from '../../types';
2
+ /**
3
+ * Builds the `mcpServers.nram` entry for Kiro's mcp.json (Kiro's remote
4
+ * entries carry no type field, just url and headers; `${VAR}` references
5
+ * resolve from the environment, so the key never reaches disk)
6
+ *
7
+ * @param mcp_url the MCP endpoint URL
8
+ * @param api_key the API key, when API-key authentication was chosen
9
+ */
10
+ export declare const kiro_mcp_entry: (mcp_url: string, api_key?: string) => any;
11
+ /**
12
+ * Builds the steering doc Kiro loads into every interaction
13
+ * (`inclusion: always` front matter)
14
+ *
15
+ * @param instructions the agent instructions text
16
+ */
17
+ export declare const kiro_steering_file: (instructions: string) => string;
18
+ /**
19
+ * Configures Kiro (AWS): merges the nram MCP server into settings/mcp.json
20
+ * and writes the agent instructions as a steering doc, both at the requested
21
+ * scope (Kiro reads `~/.kiro` and `.kiro` symmetrically)
22
+ *
23
+ * @param options the collected setup options
24
+ */
25
+ export declare const configure_kiro: (options: SetupOptions) => Promise<ActionResult[]>;
@@ -0,0 +1,77 @@
1
+ "use strict";
2
+ // Copyright (c) 2026, Brandon Lehmann <brandonlehmann@gmail.com>
3
+ //
4
+ // Permission is hereby granted, free of charge, to any person obtaining a copy
5
+ // of this software and associated documentation files (the "Software"), to deal
6
+ // in the Software without restriction, including without limitation the rights
7
+ // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+ // copies of the Software, and to permit persons to whom the Software is
9
+ // furnished to do so, subject to the following conditions:
10
+ //
11
+ // The above copyright notice and this permission notice shall be included in all
12
+ // copies or substantial portions of the Software.
13
+ //
14
+ // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
+ // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
+ // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
+ // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
+ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
+ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20
+ // SOFTWARE.
21
+ Object.defineProperty(exports, "__esModule", { value: true });
22
+ exports.configure_kiro = exports.kiro_steering_file = exports.kiro_mcp_entry = void 0;
23
+ const path_1 = require("path");
24
+ const paths_1 = require("../paths");
25
+ const upsert_1 = require("../upsert");
26
+ /**
27
+ * Builds the `mcpServers.nram` entry for Kiro's mcp.json (Kiro's remote
28
+ * entries carry no type field, just url and headers; `${VAR}` references
29
+ * resolve from the environment, so the key never reaches disk)
30
+ *
31
+ * @param mcp_url the MCP endpoint URL
32
+ * @param api_key the API key, when API-key authentication was chosen
33
+ */
34
+ const kiro_mcp_entry = (mcp_url, api_key) => {
35
+ const entry = { url: mcp_url };
36
+ if (api_key !== undefined) {
37
+ entry.headers = { Authorization: 'Bearer ${NRAM_API_KEY}' };
38
+ }
39
+ return entry;
40
+ };
41
+ exports.kiro_mcp_entry = kiro_mcp_entry;
42
+ /**
43
+ * Builds the steering doc Kiro loads into every interaction
44
+ * (`inclusion: always` front matter)
45
+ *
46
+ * @param instructions the agent instructions text
47
+ */
48
+ const kiro_steering_file = (instructions) => '---\n' +
49
+ 'inclusion: always\n' +
50
+ '---\n\n' +
51
+ `${instructions.trimEnd()}\n`;
52
+ exports.kiro_steering_file = kiro_steering_file;
53
+ /**
54
+ * Configures Kiro (AWS): merges the nram MCP server into settings/mcp.json
55
+ * and writes the agent instructions as a steering doc, both at the requested
56
+ * scope (Kiro reads `~/.kiro` and `.kiro` symmetrically)
57
+ *
58
+ * @param options the collected setup options
59
+ */
60
+ const configure_kiro = async (options) => {
61
+ const results = [];
62
+ if (options.mcp_url !== undefined) {
63
+ const config_path = (0, path_1.resolve)((0, paths_1.kiro_dir)(options.scope), 'settings', 'mcp.json');
64
+ const mcp = (0, upsert_1.mcp_json_result)(config_path, ['mcpServers', 'nram'], (0, exports.kiro_mcp_entry)(options.mcp_url, options.api_key));
65
+ results.push(mcp);
66
+ if (mcp.kind !== 'manual' && options.api_key !== undefined) {
67
+ results.push((0, upsert_1.api_key_manual_result)());
68
+ }
69
+ }
70
+ if (options.instructions) {
71
+ const steering_path = (0, path_1.resolve)((0, paths_1.kiro_dir)(options.scope), 'steering', 'nram.md');
72
+ results.push((0, upsert_1.upsert_own_file)(steering_path, (0, exports.kiro_steering_file)(options.instructions.condensed), 'Agent instructions'));
73
+ }
74
+ return results;
75
+ };
76
+ exports.configure_kiro = configure_kiro;
77
+ //# sourceMappingURL=kiro.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"kiro.js","sourceRoot":"","sources":["../../../src/helpers/configure/kiro.ts"],"names":[],"mappings":";AAAA,iEAAiE;AACjE,EAAE;AACF,+EAA+E;AAC/E,gFAAgF;AAChF,+EAA+E;AAC/E,4EAA4E;AAC5E,wEAAwE;AACxE,2DAA2D;AAC3D,EAAE;AACF,iFAAiF;AACjF,kDAAkD;AAClD,EAAE;AACF,6EAA6E;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K,SAAS,EAAE,CAAC;YACzD,OAAO,CAAC,IAAI,CAAC,IAAA,8BAAqB,GAAE,CAAC,CAAC;QAC1C,CAAC;IACL,CAAC;IAED,IAAI,OAAO,CAAC,YAAY,EAAE,CAAC;QACvB,MAAM,aAAa,GAAG,IAAA,cAAO,EAAC,IAAA,gBAAQ,EAAC,OAAO,CAAC,KAAK,CAAC,EAAE,UAAU,EAAE,SAAS,CAAC,CAAC;QAE9E,OAAO,CAAC,IAAI,CAAC,IAAA,wBAAe,EAAC,aAAa,EAAE,IAAA,0BAAkB,EAAC,OAAO,CAAC,YAAY,CAAC,SAAS,CAAC,EAC1F,oBAAoB,CAAC,CAAC,CAAC;IAC/B,CAAC;IAED,OAAO,OAAO,CAAC;AACnB,CAAC,CAAC;AAxBW,QAAA,cAAc,kBAwBzB"}
@@ -0,0 +1,10 @@
1
+ import { ActionResult, SetupOptions } from '../../types';
2
+ /**
3
+ * Configures OpenClaw: merges the nram MCP server into the gateway's
4
+ * openclaw.json and upserts the agent instructions into the workspace
5
+ * AGENTS.md. OpenClaw is a user-level gateway with no project-scoped
6
+ * configuration, so project scope reports and skips
7
+ *
8
+ * @param options the collected setup options
9
+ */
10
+ export declare const configure_openclaw: (options: SetupOptions) => Promise<ActionResult[]>;
@@ -0,0 +1,72 @@
1
+ "use strict";
2
+ // Copyright (c) 2026, Brandon Lehmann <brandonlehmann@gmail.com>
3
+ //
4
+ // Permission is hereby granted, free of charge, to any person obtaining a copy
5
+ // of this software and associated documentation files (the "Software"), to deal
6
+ // in the Software without restriction, including without limitation the rights
7
+ // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+ // copies of the Software, and to permit persons to whom the Software is
9
+ // furnished to do so, subject to the following conditions:
10
+ //
11
+ // The above copyright notice and this permission notice shall be included in all
12
+ // copies or substantial portions of the Software.
13
+ //
14
+ // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
+ // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
+ // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
+ // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
+ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
+ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20
+ // SOFTWARE.
21
+ Object.defineProperty(exports, "__esModule", { value: true });
22
+ exports.configure_openclaw = void 0;
23
+ const path_1 = require("path");
24
+ const types_1 = require("../../types");
25
+ const paths_1 = require("../paths");
26
+ const upsert_1 = require("../upsert");
27
+ /**
28
+ * Configures OpenClaw: merges the nram MCP server into the gateway's
29
+ * openclaw.json and upserts the agent instructions into the workspace
30
+ * AGENTS.md. OpenClaw is a user-level gateway with no project-scoped
31
+ * configuration, so project scope reports and skips
32
+ *
33
+ * @param options the collected setup options
34
+ */
35
+ const configure_openclaw = async (options) => {
36
+ const results = [];
37
+ if (options.scope !== types_1.Scope.USER) {
38
+ if (options.mcp_url !== undefined) {
39
+ results.push({
40
+ action: 'MCP registration',
41
+ kind: 'skipped',
42
+ detail: 'OpenClaw is configured at the user level only (the gateway has no project config); ' +
43
+ 'rerun at user scope'
44
+ });
45
+ }
46
+ if (options.instructions) {
47
+ results.push({
48
+ action: 'Agent instructions',
49
+ kind: 'skipped',
50
+ detail: 'OpenClaw reads its workspace AGENTS.md, not project files; rerun at user scope'
51
+ });
52
+ }
53
+ return results;
54
+ }
55
+ if (options.mcp_url !== undefined) {
56
+ const config_path = (0, path_1.resolve)((0, paths_1.openclaw_dir)(), 'openclaw.json');
57
+ const mcp = (0, upsert_1.mcp_json_result)(config_path, ['mcp', 'servers', 'nram'], {
58
+ type: 'http',
59
+ url: options.mcp_url
60
+ }, { parse_hint: 'OpenClaw allows JSON5, which this tool does not rewrite' });
61
+ results.push(mcp);
62
+ if (mcp.kind !== 'manual' && options.api_key !== undefined) {
63
+ results.push((0, upsert_1.api_key_header_manual_result)(config_path));
64
+ }
65
+ }
66
+ if (options.instructions) {
67
+ results.push((0, upsert_1.agents_md_result)((0, path_1.resolve)((0, paths_1.openclaw_dir)(), 'workspace', 'AGENTS.md'), options.instructions.full));
68
+ }
69
+ return results;
70
+ };
71
+ exports.configure_openclaw = configure_openclaw;
72
+ //# sourceMappingURL=openclaw.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"openclaw.js","sourceRoot":"","sources":["../../../src/helpers/configure/openclaw.ts"],"names":[],"mappings":";AAAA,iEAAiE;AACjE,EAAE;AACF,+EAA+E;AAC/E,gFAAgF;AAChF,+EAA+E;AAC/E,4EAA4E;AAC5E,wEAAwE;AACxE,2DAA2D;AAC3D,EAAE;AACF,iFAAiF;AACjF,kDAAkD;AAClD,EAAE;AACF,6EAA6E;AAC7E,2EAA2E;AAC3E,8EAA8E;AAC9E,yEAAyE;AACzE,gFAAgF;AAChF,gFAAgF;AAChF,YAAY;;;AAEZ,+BAA+B;AAC/B,uCAAgE;AAChE,oCAAwC;AACxC,sCAA4F;AAE5F;;;;;;;GAOG;AACI,MAAM,kBAAkB,GAAG,KAAK,EAAE,OAAqB,EAA2B,EAAE;IACvF,MAAM,OAAO,GAAmB,EAAE,CAAC;IAEnC,IAAI,OAAO,CAAC,KAAK,KAAK,aAAK,CAAC,IAAI,EAAE,CAAC;QAC/B,IAAI,OAAO,CAAC,OAAO,KAAK,SAAS,EAAE,CAAC;YAChC,OAAO,CAAC,IAAI,CAAC;gBACT,MAAM,EAAE,kBAAkB;gBAC1B,IAAI,EAAE,SAAS;gBACf,MAAM,EAAE,qFAAqF;oBACzF,qBAAqB;aAC5B,CAAC,CAAC;QACP,CAAC;QAED,IAAI,OAAO,CAAC,YAAY,EAAE,CAAC;YACvB,OAAO,CAAC,IAAI,CAAC;gBACT,MAAM,EAAE,oBAAoB;gBAC5B,IAAI,EAAE,SAAS;gBACf,MAAM,EAAE,gFAAgF;aAC3F,CAAC,CAAC;QACP,CAAC;QAED,OAAO,OAAO,CAAC;IACnB,CAAC;IAED,IAAI,OAAO,CAAC,OAAO,KAAK,SAAS,EAAE,CAAC;QAChC,MAAM,WAAW,GAAG,IAAA,cAAO,EAAC,IAAA,oBAAY,GAAE,EAAE,eAAe,CAAC,CAAC;QAE7D,MAAM,GAAG,GAAG,IAAA,wBAAe,EAAC,WAAW,EAAE,CAAC,KAAK,EAAE,SAAS,EAAE,MAAM,CAAC,EAAE;YACjE,IAAI,EAAE,MAAM;YACZ,GAAG,EAAE,OAAO,CAAC,OAAO;SACvB,EAAE,EAAE,UAAU,EAAE,yDAAyD,EAAE,CAAC,CAAC;QAE9E,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAElB,IAAI,GAAG,CAAC,IAAI,KAAK,QAAQ,IAAI,OAAO,CAAC,OAAO,KAAK,SAAS,EAAE,CAAC;YACzD,OAAO,CAAC,IAAI,CAAC,IAAA,qCAA4B,EAAC,WAAW,CAAC,CAAC,CAAC;QAC5D,CAAC;IACL,CAAC;IAED,IAAI,OAAO,CAAC,YAAY,EAAE,CAAC;QACvB,OAAO,CAAC,IAAI,CAAC,IAAA,yBAAgB,EAAC,IAAA,cAAO,EAAC,IAAA,oBAAY,GAAE,EAAE,WAAW,EAAE,WAAW,CAAC,EAC3E,OAAO,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC,CAAC;IACpC,CAAC;IAED,OAAO,OAAO,CAAC;AACnB,CAAC,CAAC;AA7CW,QAAA,kBAAkB,sBA6C7B"}
@@ -0,0 +1,18 @@
1
+ import { ActionResult, SetupOptions } from '../../types';
2
+ /**
3
+ * Builds the `mcp.nram` entry for opencode.json. In API-key mode the key is
4
+ * referenced through OpenCode's `${env:...}` substitution, never written
5
+ * to disk
6
+ *
7
+ * @param mcp_url the MCP endpoint URL
8
+ * @param api_key the API key, when API-key authentication was chosen
9
+ */
10
+ export declare const opencode_mcp_entry: (mcp_url: string, api_key?: string) => any;
11
+ /**
12
+ * Configures OpenCode: merges the nram MCP server into opencode.json and
13
+ * upserts a marker-fenced agent-instructions block at the top of AGENTS.md
14
+ * (OpenCode has no session hooks, so AGENTS.md is the documented mechanism)
15
+ *
16
+ * @param options the collected setup options
17
+ */
18
+ export declare const configure_opencode: (options: SetupOptions) => Promise<ActionResult[]>;
@@ -0,0 +1,72 @@
1
+ "use strict";
2
+ // Copyright (c) 2026, Brandon Lehmann <brandonlehmann@gmail.com>
3
+ //
4
+ // Permission is hereby granted, free of charge, to any person obtaining a copy
5
+ // of this software and associated documentation files (the "Software"), to deal
6
+ // in the Software without restriction, including without limitation the rights
7
+ // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+ // copies of the Software, and to permit persons to whom the Software is
9
+ // furnished to do so, subject to the following conditions:
10
+ //
11
+ // The above copyright notice and this permission notice shall be included in all
12
+ // copies or substantial portions of the Software.
13
+ //
14
+ // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
+ // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
+ // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
+ // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
+ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
+ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20
+ // SOFTWARE.
21
+ Object.defineProperty(exports, "__esModule", { value: true });
22
+ exports.configure_opencode = exports.opencode_mcp_entry = void 0;
23
+ const path_1 = require("path");
24
+ const paths_1 = require("../paths");
25
+ const upsert_1 = require("../upsert");
26
+ /**
27
+ * Builds the `mcp.nram` entry for opencode.json. In API-key mode the key is
28
+ * referenced through OpenCode's `${env:...}` substitution, never written
29
+ * to disk
30
+ *
31
+ * @param mcp_url the MCP endpoint URL
32
+ * @param api_key the API key, when API-key authentication was chosen
33
+ */
34
+ const opencode_mcp_entry = (mcp_url, api_key) => {
35
+ const entry = {
36
+ type: 'remote',
37
+ url: mcp_url,
38
+ enabled: true
39
+ };
40
+ if (api_key !== undefined) {
41
+ entry.headers = { Authorization: 'Bearer ${env:NRAM_API_KEY}' };
42
+ }
43
+ return entry;
44
+ };
45
+ exports.opencode_mcp_entry = opencode_mcp_entry;
46
+ /**
47
+ * Configures OpenCode: merges the nram MCP server into opencode.json and
48
+ * upserts a marker-fenced agent-instructions block at the top of AGENTS.md
49
+ * (OpenCode has no session hooks, so AGENTS.md is the documented mechanism)
50
+ *
51
+ * @param options the collected setup options
52
+ */
53
+ const configure_opencode = async (options) => {
54
+ const results = [];
55
+ if (options.mcp_url !== undefined) {
56
+ const config_path = (0, path_1.resolve)((0, paths_1.opencode_dir)(options.scope), 'opencode.json');
57
+ const mcp = (0, upsert_1.mcp_json_result)(config_path, ['mcp', 'nram'], (0, exports.opencode_mcp_entry)(options.mcp_url, options.api_key), {
58
+ fallback: { $schema: 'https://opencode.ai/config.json' },
59
+ parse_hint: 'OpenCode allows JSONC, which this tool does not rewrite'
60
+ });
61
+ results.push(mcp);
62
+ if (mcp.kind !== 'manual' && options.api_key !== undefined) {
63
+ results.push((0, upsert_1.api_key_manual_result)());
64
+ }
65
+ }
66
+ if (options.instructions) {
67
+ results.push((0, upsert_1.agents_md_result)((0, path_1.resolve)((0, paths_1.opencode_dir)(options.scope), 'AGENTS.md'), options.instructions.full));
68
+ }
69
+ return results;
70
+ };
71
+ exports.configure_opencode = configure_opencode;
72
+ //# sourceMappingURL=opencode.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"opencode.js","sourceRoot":"","sources":["../../../src/helpers/configure/opencode.ts"],"names":[],"mappings":";AAAA,iEAAiE;AACjE,EAAE;AACF,+EAA+E;AAC/E,gFAAgF;AAChF,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B,IAAI,GAAG,CAAC,IAAI,KAAK,QAAQ,IAAI,OAAO,CAAC,OAAO,KAAK,SAAS,EAAE,CAAC;YACzD,OAAO,CAAC,IAAI,CAAC,IAAA,8BAAqB,GAAE,CAAC,CAAC;QAC1C,CAAC;IACL,CAAC;IAED,IAAI,OAAO,CAAC,YAAY,EAAE,CAAC;QACvB,OAAO,CAAC,IAAI,CAAC,IAAA,yBAAgB,EAAC,IAAA,cAAO,EAAC,IAAA,oBAAY,EAAC,OAAO,CAAC,KAAK,CAAC,EAAE,WAAW,CAAC,EAC3E,OAAO,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC,CAAC;IACpC,CAAC;IAED,OAAO,OAAO,CAAC;AACnB,CAAC,CAAC;AAzBW,QAAA,kBAAkB,sBAyB7B"}
@@ -0,0 +1,10 @@
1
+ import { ActionResult, SetupOptions } from '../../types';
2
+ /**
3
+ * Configures Pi (pi-mono): merges the nram MCP server into the user-level
4
+ * `~/.pi/agent/mcp.json` (Pi has no project-scoped MCP config) and upserts
5
+ * the agent instructions into the AGENTS.md Pi reads: `~/.pi/agent/AGENTS.md`
6
+ * at user scope, the repository root AGENTS.md at project scope
7
+ *
8
+ * @param options the collected setup options
9
+ */
10
+ export declare const configure_pi: (options: SetupOptions) => Promise<ActionResult[]>;
@@ -0,0 +1,60 @@
1
+ "use strict";
2
+ // Copyright (c) 2026, Brandon Lehmann <brandonlehmann@gmail.com>
3
+ //
4
+ // Permission is hereby granted, free of charge, to any person obtaining a copy
5
+ // of this software and associated documentation files (the "Software"), to deal
6
+ // in the Software without restriction, including without limitation the rights
7
+ // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+ // copies of the Software, and to permit persons to whom the Software is
9
+ // furnished to do so, subject to the following conditions:
10
+ //
11
+ // The above copyright notice and this permission notice shall be included in all
12
+ // copies or substantial portions of the Software.
13
+ //
14
+ // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
+ // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
+ // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
+ // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
+ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
+ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20
+ // SOFTWARE.
21
+ Object.defineProperty(exports, "__esModule", { value: true });
22
+ exports.configure_pi = void 0;
23
+ const path_1 = require("path");
24
+ const types_1 = require("../../types");
25
+ const paths_1 = require("../paths");
26
+ const upsert_1 = require("../upsert");
27
+ /**
28
+ * Configures Pi (pi-mono): merges the nram MCP server into the user-level
29
+ * `~/.pi/agent/mcp.json` (Pi has no project-scoped MCP config) and upserts
30
+ * the agent instructions into the AGENTS.md Pi reads: `~/.pi/agent/AGENTS.md`
31
+ * at user scope, the repository root AGENTS.md at project scope
32
+ *
33
+ * @param options the collected setup options
34
+ */
35
+ const configure_pi = async (options) => {
36
+ const results = [];
37
+ if (options.mcp_url !== undefined) {
38
+ if (options.scope !== types_1.Scope.USER) {
39
+ results.push({
40
+ action: 'MCP registration',
41
+ kind: 'skipped',
42
+ detail: 'Pi keeps MCP servers in the user-level ~/.pi/agent/mcp.json only; rerun at user scope'
43
+ });
44
+ }
45
+ else {
46
+ const config_path = (0, path_1.resolve)((0, paths_1.pi_dir)(), 'mcp.json');
47
+ const mcp = (0, upsert_1.mcp_json_result)(config_path, ['mcpServers', 'nram'], { url: options.mcp_url });
48
+ results.push(mcp);
49
+ if (mcp.kind !== 'manual' && options.api_key !== undefined) {
50
+ results.push((0, upsert_1.api_key_header_manual_result)(config_path));
51
+ }
52
+ }
53
+ }
54
+ if (options.instructions) {
55
+ results.push((0, upsert_1.agents_md_result)((0, paths_1.agents_md_path)(options.scope, (0, path_1.resolve)((0, paths_1.pi_dir)(), 'AGENTS.md')), options.instructions.full));
56
+ }
57
+ return results;
58
+ };
59
+ exports.configure_pi = configure_pi;
60
+ //# sourceMappingURL=pi.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pi.js","sourceRoot":"","sources":["../../../src/helpers/configure/pi.ts"],"names":[],"mappings":";AAAA,iEAAiE;AACjE,EAAE;AACF,+EAA+E;AAC/E,gFAAgF;AAChF,+EAA+E;AAC/E,4EAA4E;AAC5E,wEAAwE;AACxE,2DAA2D;AAC3D,EAAE;AACF,iFAAiF;AACjF,kDAAkD;AAClD,EAAE;AACF,6EAA6E;AAC7E,2EAA2E;AAC3E,8EAA8E;AAC9E,yEAAyE;AACzE,gFAAgF;AAChF,gFAAgF;AAChF,YAAY;;;AAEZ,+BAA+B;AAC/B,uCAAgE;AAChE,oCAAkD;AAClD,sCAA4F;AAE5F;;;;;;;GAOG;AACI,MAAM,YAAY,GAAG,KAAK,EAAE,OAAqB,EAA2B,EAAE;IACjF,MAAM,OAAO,GAAmB,EAAE,CAAC;IAEnC,IAAI,OAAO,CAAC,OAAO,KAAK,SAAS,EAAE,CAAC;QAChC,IAAI,OAAO,CAAC,KAAK,KAAK,aAAK,CAAC,IAAI,EAAE,CAAC;YAC/B,OAAO,CAAC,IAAI,CAAC;gBACT,MAAM,EAAE,kBAAkB;gBAC1B,IAAI,EAAE,SAAS;gBACf,MAAM,EAAE,uFAAuF;aAClG,CAAC,CAAC;QACP,CAAC;aAAM,CAAC;YACJ,MAAM,WAAW,GAAG,IAAA,cAAO,EAAC,IAAA,cAAM,GAAE,EAAE,UAAU,CAAC,CAAC;YAElD,MAAM,GAAG,GAAG,IAAA,wBAAe,EAAC,WAAW,EAAE,CAAC,YAAY,EAAE,MAAM,CAAC,EAAE,EAAE,GAAG,EAAE,OAAO,CAAC,OAAO,EAAE,CAAC,CAAC;YAE3F,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;YAElB,IAAI,GAAG,CAAC,IAAI,KAAK,QAAQ,IAAI,OAAO,CAAC,OAAO,KAAK,SAAS,EAAE,CAAC;gBACzD,OAAO,CAAC,IAAI,CAAC,IAAA,qCAA4B,EAAC,WAAW,CAAC,CAAC,CAAC;YAC5D,CAAC;QACL,CAAC;IACL,CAAC;IAED,IAAI,OAAO,CAAC,YAAY,EAAE,CAAC;QACvB,OAAO,CAAC,IAAI,CAAC,IAAA,yBAAgB,EACzB,IAAA,sBAAc,EAAC,OAAO,CAAC,KAAK,EAAE,IAAA,cAAO,EAAC,IAAA,cAAM,GAAE,EAAE,WAAW,CAAC,CAAC,EAAE,OAAO,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC,CAAC;IACnG,CAAC;IAED,OAAO,OAAO,CAAC;AACnB,CAAC,CAAC;AA7BW,QAAA,YAAY,gBA6BvB"}
@@ -0,0 +1,11 @@
1
+ import { ActionResult, SetupOptions } from '../../types';
2
+ /**
3
+ * Configures Trae (ByteDance): writes the agent instructions as a project
4
+ * rules file. Trae's MCP config schema could not be verified against
5
+ * accessible documentation, so MCP registration is reported as a manual
6
+ * step through Trae's own UI rather than risking a guessed write; the
7
+ * user-level rules location is likewise undocumented
8
+ *
9
+ * @param options the collected setup options
10
+ */
11
+ export declare const configure_trae: (options: SetupOptions) => Promise<ActionResult[]>;