@intellectronica/ruler 0.2.15 → 0.2.16
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 +1 -0
- package/dist/agents/GooseAgent.js +66 -0
- package/dist/lib.js +2 -0
- package/dist/revert.js +2 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -53,6 +53,7 @@ Ruler solves this by providing a **single source of truth** for all your AI agen
|
|
|
53
53
|
| AugmentCode | `.augment/rules/ruler_augment_instructions.md` | `.vscode/settings.json` |
|
|
54
54
|
| Kilo Code | `.kilocode/rules/ruler_kilocode_instructions.md` | `.kilocode/mcp.json` |
|
|
55
55
|
| OpenCode | `AGENTS.md` | `opencode.json`, `~/.config/opencode/opencode.json` |
|
|
56
|
+
| Goose | `.goosehints` | - |
|
|
56
57
|
|
|
57
58
|
## Getting Started
|
|
58
59
|
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.GooseAgent = void 0;
|
|
37
|
+
const path = __importStar(require("path"));
|
|
38
|
+
const FileSystemUtils_1 = require("../core/FileSystemUtils");
|
|
39
|
+
/**
|
|
40
|
+
* Goose agent adapter for Block's Goose AI assistant.
|
|
41
|
+
* Propagates rules to .goosehints file.
|
|
42
|
+
*/
|
|
43
|
+
class GooseAgent {
|
|
44
|
+
getIdentifier() {
|
|
45
|
+
return 'goose';
|
|
46
|
+
}
|
|
47
|
+
getName() {
|
|
48
|
+
return 'Goose';
|
|
49
|
+
}
|
|
50
|
+
async applyRulerConfig(concatenatedRules, projectRoot, rulerMcpJson, agentConfig) {
|
|
51
|
+
// Get the output path for .goosehints
|
|
52
|
+
const hintsPath = agentConfig?.outputPathInstructions ??
|
|
53
|
+
this.getDefaultOutputPath(projectRoot);
|
|
54
|
+
// Write rules to .goosehints
|
|
55
|
+
await (0, FileSystemUtils_1.backupFile)(hintsPath);
|
|
56
|
+
await (0, FileSystemUtils_1.writeGeneratedFile)(hintsPath, concatenatedRules);
|
|
57
|
+
}
|
|
58
|
+
getDefaultOutputPath(projectRoot) {
|
|
59
|
+
return path.join(projectRoot, '.goosehints');
|
|
60
|
+
}
|
|
61
|
+
getMcpServerKey() {
|
|
62
|
+
// Goose doesn't support MCP configuration via local config files
|
|
63
|
+
return '';
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
exports.GooseAgent = GooseAgent;
|
package/dist/lib.js
CHANGED
|
@@ -55,6 +55,7 @@ const JunieAgent_1 = require("./agents/JunieAgent");
|
|
|
55
55
|
const AugmentCodeAgent_1 = require("./agents/AugmentCodeAgent");
|
|
56
56
|
const KiloCodeAgent_1 = require("./agents/KiloCodeAgent");
|
|
57
57
|
const OpenCodeAgent_1 = require("./agents/OpenCodeAgent");
|
|
58
|
+
const GooseAgent_1 = require("./agents/GooseAgent");
|
|
58
59
|
const merge_1 = require("./mcp/merge");
|
|
59
60
|
const validate_1 = require("./mcp/validate");
|
|
60
61
|
const mcp_1 = require("./paths/mcp");
|
|
@@ -111,6 +112,7 @@ const agents = [
|
|
|
111
112
|
new AugmentCodeAgent_1.AugmentCodeAgent(),
|
|
112
113
|
new KiloCodeAgent_1.KiloCodeAgent(),
|
|
113
114
|
new OpenCodeAgent_1.OpenCodeAgent(),
|
|
115
|
+
new GooseAgent_1.GooseAgent(),
|
|
114
116
|
];
|
|
115
117
|
/**
|
|
116
118
|
* Applies ruler configurations for all supported AI agents.
|
package/dist/revert.js
CHANGED
|
@@ -53,6 +53,7 @@ const JunieAgent_1 = require("./agents/JunieAgent");
|
|
|
53
53
|
const AugmentCodeAgent_1 = require("./agents/AugmentCodeAgent");
|
|
54
54
|
const KiloCodeAgent_1 = require("./agents/KiloCodeAgent");
|
|
55
55
|
const OpenCodeAgent_1 = require("./agents/OpenCodeAgent");
|
|
56
|
+
const GooseAgent_1 = require("./agents/GooseAgent");
|
|
56
57
|
const mcp_1 = require("./paths/mcp");
|
|
57
58
|
const constants_1 = require("./constants");
|
|
58
59
|
const settings_1 = require("./vscode/settings");
|
|
@@ -72,6 +73,7 @@ const agents = [
|
|
|
72
73
|
new AugmentCodeAgent_1.AugmentCodeAgent(),
|
|
73
74
|
new KiloCodeAgent_1.KiloCodeAgent(),
|
|
74
75
|
new OpenCodeAgent_1.OpenCodeAgent(),
|
|
76
|
+
new GooseAgent_1.GooseAgent(),
|
|
75
77
|
];
|
|
76
78
|
/**
|
|
77
79
|
* Gets all output paths for an agent, taking into account any config overrides.
|