@getripple/core 1.0.4
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/CHANGELOG.md +18 -0
- package/README.md +53 -0
- package/dist/adapters.d.ts +39 -0
- package/dist/adapters.js +396 -0
- package/dist/adapters.js.map +1 -0
- package/dist/agent-workflow.d.ts +86 -0
- package/dist/agent-workflow.js +404 -0
- package/dist/agent-workflow.js.map +1 -0
- package/dist/approval.d.ts +45 -0
- package/dist/approval.js +272 -0
- package/dist/approval.js.map +1 -0
- package/dist/audit.d.ts +80 -0
- package/dist/audit.js +271 -0
- package/dist/audit.js.map +1 -0
- package/dist/change-intent.d.ts +242 -0
- package/dist/change-intent.js +1758 -0
- package/dist/change-intent.js.map +1 -0
- package/dist/graph.d.ts +346 -0
- package/dist/graph.js +4221 -0
- package/dist/graph.js.map +1 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.js +28 -0
- package/dist/index.js.map +1 -0
- package/dist/normalizer.d.ts +34 -0
- package/dist/normalizer.js +455 -0
- package/dist/normalizer.js.map +1 -0
- package/dist/policy.d.ts +55 -0
- package/dist/policy.js +380 -0
- package/dist/policy.js.map +1 -0
- package/dist/readiness.d.ts +35 -0
- package/dist/readiness.js +200 -0
- package/dist/readiness.js.map +1 -0
- package/dist/staged-check.d.ts +96 -0
- package/dist/staged-check.js +853 -0
- package/dist/staged-check.js.map +1 -0
- package/dist/types.d.ts +122 -0
- package/dist/types.js +71 -0
- package/dist/types.js.map +1 -0
- package/package.json +52 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# @getripple/core Changelog
|
|
2
|
+
|
|
3
|
+
## [1.0.4] - 2026-06-03
|
|
4
|
+
|
|
5
|
+
### Fixed
|
|
6
|
+
- Publishable package identity under `@getripple/core`.
|
|
7
|
+
- Release readiness checks for packed installs, package metadata, and shared engine entry points.
|
|
8
|
+
- Package-specific README and changelog included in the npm tarball.
|
|
9
|
+
|
|
10
|
+
## [1.0.3] - 2026-06-03
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
- Initial standalone package release of Ripple's core graph and workflow engine.
|
|
14
|
+
- `GraphEngine` APIs for scanning a local repo, planning context, focus summaries, blast radius, and recent history.
|
|
15
|
+
- Trust-boundary, policy, readiness, approval, audit, gate, and drift-repair summaries shared by CLI and MCP.
|
|
16
|
+
|
|
17
|
+
### Notes
|
|
18
|
+
- Public alpha. Prefer `@getripple/cli` for terminal use and `@getripple/mcp` for AI-agent integration.
|
package/README.md
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# @getripple/core
|
|
2
|
+
|
|
3
|
+
The core graph engine that powers Ripple's VS Code extension, CLI, and MCP server.
|
|
4
|
+
It scans a local repository, builds architectural context, and exposes the `GraphEngine`
|
|
5
|
+
used by Ripple's plan-before-edit and check-after-edit workflow.
|
|
6
|
+
|
|
7
|
+
Most users should not start here. Install `@getripple/cli` for terminal and CI
|
|
8
|
+
workflows, or `@getripple/mcp` to give AI agents direct structured access to
|
|
9
|
+
Ripple's architectural context.
|
|
10
|
+
|
|
11
|
+
## Install
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
npm install @getripple/core
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Basic Usage
|
|
18
|
+
|
|
19
|
+
```ts
|
|
20
|
+
import { GraphEngine } from "@getripple/core";
|
|
21
|
+
|
|
22
|
+
const engine = new GraphEngine(process.cwd());
|
|
23
|
+
await engine.initialScan();
|
|
24
|
+
|
|
25
|
+
const plan = engine.planContext(
|
|
26
|
+
"refactor token handling",
|
|
27
|
+
"src/auth.ts",
|
|
28
|
+
4000
|
|
29
|
+
);
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## What It Powers
|
|
33
|
+
|
|
34
|
+
- file dependency and reverse-import graph
|
|
35
|
+
- symbol and call-edge signals for JavaScript and TypeScript
|
|
36
|
+
- focused context plans for AI coding agents
|
|
37
|
+
- staged and changed-file checks against saved intent
|
|
38
|
+
- trust-boundary, policy, readiness, and drift summaries
|
|
39
|
+
|
|
40
|
+
## Trust Boundary Contract
|
|
41
|
+
|
|
42
|
+
Ripple's core engine is the source of truth for control modes, editable files,
|
|
43
|
+
context-only files, human gates, and continue/stop decisions. The CLI and MCP
|
|
44
|
+
packages use this contract so humans, CI, and AI agents see the same workflow
|
|
45
|
+
state.
|
|
46
|
+
|
|
47
|
+
## Status
|
|
48
|
+
|
|
49
|
+
Public alpha. APIs may change while Ripple's CLI and MCP workflows harden.
|
|
50
|
+
|
|
51
|
+
## License
|
|
52
|
+
|
|
53
|
+
MIT
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { RippleAdapterCapabilities, RippleAdapterCapability } from "./types";
|
|
2
|
+
export type RippleAdapterSupportLevel = "deep" | "generic";
|
|
3
|
+
export type RippleAdapterCapabilityStatus = "available" | "partial" | "unavailable";
|
|
4
|
+
export type RippleAdapterAgentUse = "trust" | "verify" | "manual";
|
|
5
|
+
export type RippleAdapterCapabilityConfidence = {
|
|
6
|
+
capability: RippleAdapterCapability;
|
|
7
|
+
status: RippleAdapterCapabilityStatus;
|
|
8
|
+
confidence: number;
|
|
9
|
+
reason: string;
|
|
10
|
+
agentUse: RippleAdapterAgentUse;
|
|
11
|
+
};
|
|
12
|
+
export type RippleAdapterAgentPolicy = {
|
|
13
|
+
canTrust: string[];
|
|
14
|
+
beCarefulWith: string[];
|
|
15
|
+
mustFallbackToManual: string[];
|
|
16
|
+
planningGuidance: string[];
|
|
17
|
+
};
|
|
18
|
+
export type RippleDetectedAdapter = {
|
|
19
|
+
id: string;
|
|
20
|
+
supportLevel: RippleAdapterSupportLevel;
|
|
21
|
+
confidence: number;
|
|
22
|
+
capabilities: RippleAdapterCapabilities;
|
|
23
|
+
capabilityProfile: RippleAdapterCapabilityConfidence[];
|
|
24
|
+
agentPolicy: RippleAdapterAgentPolicy;
|
|
25
|
+
matchedFiles: number;
|
|
26
|
+
reason: string;
|
|
27
|
+
};
|
|
28
|
+
export type RippleAdapterDetectionSummary = {
|
|
29
|
+
workspace: string;
|
|
30
|
+
supportLevel: RippleAdapterSupportLevel;
|
|
31
|
+
primaryAdapter: RippleDetectedAdapter;
|
|
32
|
+
adapters: RippleDetectedAdapter[];
|
|
33
|
+
};
|
|
34
|
+
export declare const JS_TS_ADAPTER_CAPABILITIES: RippleAdapterCapabilities;
|
|
35
|
+
export declare const PYTHON_ADAPTER_CAPABILITIES: RippleAdapterCapabilities;
|
|
36
|
+
export declare const GENERIC_ADAPTER_CAPABILITIES: RippleAdapterCapabilities;
|
|
37
|
+
export declare function detectWorkspaceAdapters(workspaceRoot: string): RippleAdapterDetectionSummary;
|
|
38
|
+
export declare function hasAdapterCapability(adapter: RippleDetectedAdapter, capability: RippleAdapterCapability): boolean;
|
|
39
|
+
export declare function adapterCapabilityConfidence(adapter: RippleDetectedAdapter, capability: RippleAdapterCapability): RippleAdapterCapabilityConfidence | undefined;
|
package/dist/adapters.js
ADDED
|
@@ -0,0 +1,396 @@
|
|
|
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 (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.adapterCapabilityConfidence = exports.hasAdapterCapability = exports.detectWorkspaceAdapters = exports.GENERIC_ADAPTER_CAPABILITIES = exports.PYTHON_ADAPTER_CAPABILITIES = exports.JS_TS_ADAPTER_CAPABILITIES = void 0;
|
|
27
|
+
const fs = __importStar(require("fs"));
|
|
28
|
+
const path = __importStar(require("path"));
|
|
29
|
+
const JS_TS_EXTENSIONS = [".ts", ".tsx", ".js", ".jsx"];
|
|
30
|
+
const PYTHON_EXTENSIONS = [".py"];
|
|
31
|
+
const ALL_ADAPTER_CAPABILITIES = [
|
|
32
|
+
"files",
|
|
33
|
+
"dependencies",
|
|
34
|
+
"reverse-dependencies",
|
|
35
|
+
"symbols",
|
|
36
|
+
"call-edges",
|
|
37
|
+
"tests",
|
|
38
|
+
"configs",
|
|
39
|
+
];
|
|
40
|
+
const GENERIC_IGNORE_DIRS = new Set([
|
|
41
|
+
".git",
|
|
42
|
+
".next",
|
|
43
|
+
".ripple",
|
|
44
|
+
".turbo",
|
|
45
|
+
".vercel",
|
|
46
|
+
"coverage",
|
|
47
|
+
"dist",
|
|
48
|
+
"node_modules",
|
|
49
|
+
"out",
|
|
50
|
+
]);
|
|
51
|
+
exports.JS_TS_ADAPTER_CAPABILITIES = {
|
|
52
|
+
language: "typescript",
|
|
53
|
+
displayName: "JavaScript / TypeScript",
|
|
54
|
+
extensions: JS_TS_EXTENSIONS,
|
|
55
|
+
capabilities: [
|
|
56
|
+
"files",
|
|
57
|
+
"dependencies",
|
|
58
|
+
"reverse-dependencies",
|
|
59
|
+
"symbols",
|
|
60
|
+
"call-edges",
|
|
61
|
+
"tests",
|
|
62
|
+
"configs",
|
|
63
|
+
],
|
|
64
|
+
};
|
|
65
|
+
exports.PYTHON_ADAPTER_CAPABILITIES = {
|
|
66
|
+
language: "python",
|
|
67
|
+
displayName: "Python",
|
|
68
|
+
extensions: PYTHON_EXTENSIONS,
|
|
69
|
+
capabilities: [
|
|
70
|
+
"files",
|
|
71
|
+
"dependencies",
|
|
72
|
+
"reverse-dependencies",
|
|
73
|
+
"symbols",
|
|
74
|
+
"call-edges",
|
|
75
|
+
"tests",
|
|
76
|
+
"configs",
|
|
77
|
+
],
|
|
78
|
+
};
|
|
79
|
+
exports.GENERIC_ADAPTER_CAPABILITIES = {
|
|
80
|
+
language: "generic",
|
|
81
|
+
displayName: "Generic repository",
|
|
82
|
+
extensions: ["*"],
|
|
83
|
+
capabilities: ["files", "configs"],
|
|
84
|
+
};
|
|
85
|
+
function detectWorkspaceAdapters(workspaceRoot) {
|
|
86
|
+
const extensionCounts = countExtensions(workspaceRoot);
|
|
87
|
+
const jsTsCount = JS_TS_EXTENSIONS.reduce((total, extension) => total + (extensionCounts.get(extension) ?? 0), 0);
|
|
88
|
+
const pythonCount = PYTHON_EXTENSIONS.reduce((total, extension) => total + (extensionCounts.get(extension) ?? 0), 0);
|
|
89
|
+
const totalFiles = Array.from(extensionCounts.values()).reduce((total, count) => total + count, 0);
|
|
90
|
+
const adapters = [];
|
|
91
|
+
if (jsTsCount > 0) {
|
|
92
|
+
adapters.push({
|
|
93
|
+
id: "builtin-js-ts",
|
|
94
|
+
supportLevel: "deep",
|
|
95
|
+
confidence: 0.94,
|
|
96
|
+
capabilities: {
|
|
97
|
+
...exports.JS_TS_ADAPTER_CAPABILITIES,
|
|
98
|
+
language: preferredJsTsLanguage(extensionCounts),
|
|
99
|
+
},
|
|
100
|
+
capabilityProfile: jsTsCapabilityProfile(),
|
|
101
|
+
agentPolicy: jsTsAgentPolicy(),
|
|
102
|
+
matchedFiles: jsTsCount,
|
|
103
|
+
reason: "Detected JavaScript or TypeScript source files.",
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
if (pythonCount > 0) {
|
|
107
|
+
adapters.push({
|
|
108
|
+
id: "builtin-python",
|
|
109
|
+
supportLevel: "deep",
|
|
110
|
+
confidence: 0.86,
|
|
111
|
+
capabilities: exports.PYTHON_ADAPTER_CAPABILITIES,
|
|
112
|
+
capabilityProfile: pythonCapabilityProfile(),
|
|
113
|
+
agentPolicy: pythonAgentPolicy(),
|
|
114
|
+
matchedFiles: pythonCount,
|
|
115
|
+
reason: "Detected Python source files.",
|
|
116
|
+
});
|
|
117
|
+
}
|
|
118
|
+
const hasDeepAdapter = jsTsCount > 0 || pythonCount > 0;
|
|
119
|
+
adapters.push({
|
|
120
|
+
id: "builtin-generic",
|
|
121
|
+
supportLevel: "generic",
|
|
122
|
+
confidence: hasDeepAdapter ? 0.55 : 0.45,
|
|
123
|
+
capabilities: exports.GENERIC_ADAPTER_CAPABILITIES,
|
|
124
|
+
capabilityProfile: genericCapabilityProfile(),
|
|
125
|
+
agentPolicy: genericAgentPolicy(),
|
|
126
|
+
matchedFiles: totalFiles,
|
|
127
|
+
reason: hasDeepAdapter
|
|
128
|
+
? "Generic fallback remains available for files outside the active language adapters."
|
|
129
|
+
: "No deep language adapter matched; using generic repository support.",
|
|
130
|
+
});
|
|
131
|
+
const primaryAdapter = adapters
|
|
132
|
+
.filter((adapter) => adapter.supportLevel === "deep")
|
|
133
|
+
.sort((a, b) => b.matchedFiles - a.matchedFiles || b.confidence - a.confidence)[0] ??
|
|
134
|
+
adapters[0];
|
|
135
|
+
return {
|
|
136
|
+
workspace: workspaceRoot,
|
|
137
|
+
supportLevel: primaryAdapter.supportLevel,
|
|
138
|
+
primaryAdapter,
|
|
139
|
+
adapters,
|
|
140
|
+
};
|
|
141
|
+
}
|
|
142
|
+
exports.detectWorkspaceAdapters = detectWorkspaceAdapters;
|
|
143
|
+
function hasAdapterCapability(adapter, capability) {
|
|
144
|
+
return adapter.capabilities.capabilities.includes(capability);
|
|
145
|
+
}
|
|
146
|
+
exports.hasAdapterCapability = hasAdapterCapability;
|
|
147
|
+
function adapterCapabilityConfidence(adapter, capability) {
|
|
148
|
+
return adapter.capabilityProfile.find((item) => item.capability === capability);
|
|
149
|
+
}
|
|
150
|
+
exports.adapterCapabilityConfidence = adapterCapabilityConfidence;
|
|
151
|
+
function jsTsCapabilityProfile() {
|
|
152
|
+
return [
|
|
153
|
+
{
|
|
154
|
+
capability: "files",
|
|
155
|
+
status: "available",
|
|
156
|
+
confidence: 0.99,
|
|
157
|
+
reason: "JS/TS file discovery is extension based and excludes generated/cache folders.",
|
|
158
|
+
agentUse: "trust",
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
capability: "dependencies",
|
|
162
|
+
status: "available",
|
|
163
|
+
confidence: 0.94,
|
|
164
|
+
reason: "Static import/export and require edges are parsed from JS/TS source.",
|
|
165
|
+
agentUse: "trust",
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
capability: "reverse-dependencies",
|
|
169
|
+
status: "available",
|
|
170
|
+
confidence: 0.94,
|
|
171
|
+
reason: "Reverse edges are derived from the same static dependency graph.",
|
|
172
|
+
agentUse: "trust",
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
capability: "symbols",
|
|
176
|
+
status: "available",
|
|
177
|
+
confidence: 0.9,
|
|
178
|
+
reason: "Functions, classes, methods, variables, and exported symbols are parsed with TypeScript AST support.",
|
|
179
|
+
agentUse: "trust",
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
capability: "call-edges",
|
|
183
|
+
status: "partial",
|
|
184
|
+
confidence: 0.74,
|
|
185
|
+
reason: "Direct call references are useful, but dynamic dispatch, reflection, and framework wiring can hide edges.",
|
|
186
|
+
agentUse: "verify",
|
|
187
|
+
},
|
|
188
|
+
{
|
|
189
|
+
capability: "tests",
|
|
190
|
+
status: "partial",
|
|
191
|
+
confidence: 0.72,
|
|
192
|
+
reason: "Test links use imports and naming conventions; framework-specific behavior may need manual confirmation.",
|
|
193
|
+
agentUse: "verify",
|
|
194
|
+
},
|
|
195
|
+
{
|
|
196
|
+
capability: "configs",
|
|
197
|
+
status: "partial",
|
|
198
|
+
confidence: 0.68,
|
|
199
|
+
reason: "Common JS/TS config files are detected, but project-specific runtime config can be custom.",
|
|
200
|
+
agentUse: "verify",
|
|
201
|
+
},
|
|
202
|
+
];
|
|
203
|
+
}
|
|
204
|
+
function genericCapabilityProfile() {
|
|
205
|
+
return ALL_ADAPTER_CAPABILITIES.map((capability) => {
|
|
206
|
+
if (capability === "files") {
|
|
207
|
+
return {
|
|
208
|
+
capability,
|
|
209
|
+
status: "available",
|
|
210
|
+
confidence: 0.72,
|
|
211
|
+
reason: "Generic support can discover repository files while ignoring common generated folders.",
|
|
212
|
+
agentUse: "trust",
|
|
213
|
+
};
|
|
214
|
+
}
|
|
215
|
+
if (capability === "configs") {
|
|
216
|
+
return {
|
|
217
|
+
capability,
|
|
218
|
+
status: "partial",
|
|
219
|
+
confidence: 0.42,
|
|
220
|
+
reason: "Generic support can notice config-like files, but cannot interpret every stack-specific setting.",
|
|
221
|
+
agentUse: "verify",
|
|
222
|
+
};
|
|
223
|
+
}
|
|
224
|
+
return {
|
|
225
|
+
capability,
|
|
226
|
+
status: "unavailable",
|
|
227
|
+
confidence: 0,
|
|
228
|
+
reason: "No deep language adapter is active for this capability.",
|
|
229
|
+
agentUse: "manual",
|
|
230
|
+
};
|
|
231
|
+
});
|
|
232
|
+
}
|
|
233
|
+
function pythonCapabilityProfile() {
|
|
234
|
+
return [
|
|
235
|
+
{
|
|
236
|
+
capability: "files",
|
|
237
|
+
status: "available",
|
|
238
|
+
confidence: 0.98,
|
|
239
|
+
reason: "Python file discovery is extension based and excludes generated/cache folders.",
|
|
240
|
+
agentUse: "trust",
|
|
241
|
+
},
|
|
242
|
+
{
|
|
243
|
+
capability: "dependencies",
|
|
244
|
+
status: "partial",
|
|
245
|
+
confidence: 0.78,
|
|
246
|
+
reason: "Static import and from-import statements are parsed, but dynamic imports can hide edges.",
|
|
247
|
+
agentUse: "verify",
|
|
248
|
+
},
|
|
249
|
+
{
|
|
250
|
+
capability: "reverse-dependencies",
|
|
251
|
+
status: "partial",
|
|
252
|
+
confidence: 0.78,
|
|
253
|
+
reason: "Reverse edges are derived from parsed Python imports and package-relative resolution.",
|
|
254
|
+
agentUse: "verify",
|
|
255
|
+
},
|
|
256
|
+
{
|
|
257
|
+
capability: "symbols",
|
|
258
|
+
status: "available",
|
|
259
|
+
confidence: 0.82,
|
|
260
|
+
reason: "Python functions, async functions, classes, and methods are detected from source structure.",
|
|
261
|
+
agentUse: "trust",
|
|
262
|
+
},
|
|
263
|
+
{
|
|
264
|
+
capability: "call-edges",
|
|
265
|
+
status: "partial",
|
|
266
|
+
confidence: 0.58,
|
|
267
|
+
reason: "Name-based Python call edges catch direct calls but cannot prove dynamic dispatch or monkey patching.",
|
|
268
|
+
agentUse: "verify",
|
|
269
|
+
},
|
|
270
|
+
{
|
|
271
|
+
capability: "tests",
|
|
272
|
+
status: "partial",
|
|
273
|
+
confidence: 0.7,
|
|
274
|
+
reason: "Pytest/unittest-style test files are linked through imports and naming conventions.",
|
|
275
|
+
agentUse: "verify",
|
|
276
|
+
},
|
|
277
|
+
{
|
|
278
|
+
capability: "configs",
|
|
279
|
+
status: "partial",
|
|
280
|
+
confidence: 0.62,
|
|
281
|
+
reason: "Common Python config files can be detected, but runtime behavior may live in custom settings.",
|
|
282
|
+
agentUse: "verify",
|
|
283
|
+
},
|
|
284
|
+
];
|
|
285
|
+
}
|
|
286
|
+
function jsTsAgentPolicy() {
|
|
287
|
+
return {
|
|
288
|
+
canTrust: [
|
|
289
|
+
"JS/TS source file discovery",
|
|
290
|
+
"static imports and reverse importers",
|
|
291
|
+
"declared symbols and exported contracts",
|
|
292
|
+
"direct test files found through imports",
|
|
293
|
+
],
|
|
294
|
+
beCarefulWith: [
|
|
295
|
+
"dynamic import paths",
|
|
296
|
+
"runtime framework routing",
|
|
297
|
+
"dependency injection or reflection",
|
|
298
|
+
"generated files and build artifacts",
|
|
299
|
+
"indirect tests discovered only by naming conventions",
|
|
300
|
+
],
|
|
301
|
+
mustFallbackToManual: [
|
|
302
|
+
"non-JS/TS services in the same repo",
|
|
303
|
+
"runtime behavior hidden behind external configuration",
|
|
304
|
+
"call paths created by strings, decorators, or framework metadata",
|
|
305
|
+
],
|
|
306
|
+
planningGuidance: [
|
|
307
|
+
"Use readFirst, symbolFocus, importers, and verificationTargets as primary planning signals.",
|
|
308
|
+
"For call-edge-only risk, verify direct callers before assuming the graph is complete.",
|
|
309
|
+
"If a task touches runtime routing or generated code, inspect framework config manually.",
|
|
310
|
+
],
|
|
311
|
+
};
|
|
312
|
+
}
|
|
313
|
+
function pythonAgentPolicy() {
|
|
314
|
+
return {
|
|
315
|
+
canTrust: [
|
|
316
|
+
"Python source file discovery",
|
|
317
|
+
"declared functions, classes, and methods",
|
|
318
|
+
"top-level static import statements",
|
|
319
|
+
"direct test files found through imports",
|
|
320
|
+
],
|
|
321
|
+
beCarefulWith: [
|
|
322
|
+
"dynamic imports through importlib or __import__",
|
|
323
|
+
"runtime monkey patching and dependency injection",
|
|
324
|
+
"framework routing through decorators or external config",
|
|
325
|
+
"namespace packages without explicit local files",
|
|
326
|
+
"tests discovered only by naming convention",
|
|
327
|
+
],
|
|
328
|
+
mustFallbackToManual: [
|
|
329
|
+
"metaclass behavior and decorators that rewrite call paths",
|
|
330
|
+
"runtime plugin loading",
|
|
331
|
+
"package imports resolved only through virtual environments",
|
|
332
|
+
"behavior controlled by deployment-specific config",
|
|
333
|
+
],
|
|
334
|
+
planningGuidance: [
|
|
335
|
+
"Use readFirst, importers, symbolFocus, and verificationTargets as structural planning signals.",
|
|
336
|
+
"Verify call-edge and test-target findings before relying on them for commit safety.",
|
|
337
|
+
"Inspect decorators, framework routes, and dynamic imports manually when they are part of the task.",
|
|
338
|
+
],
|
|
339
|
+
};
|
|
340
|
+
}
|
|
341
|
+
function genericAgentPolicy() {
|
|
342
|
+
return {
|
|
343
|
+
canTrust: [
|
|
344
|
+
"repository file discovery",
|
|
345
|
+
"git changed-file scope",
|
|
346
|
+
"basic config and documentation presence",
|
|
347
|
+
],
|
|
348
|
+
beCarefulWith: [
|
|
349
|
+
"all dependency relationships",
|
|
350
|
+
"all symbol and function-level conclusions",
|
|
351
|
+
"test target recommendations",
|
|
352
|
+
],
|
|
353
|
+
mustFallbackToManual: [
|
|
354
|
+
"callers and blast radius",
|
|
355
|
+
"public contracts",
|
|
356
|
+
"language-specific tests",
|
|
357
|
+
"framework routes and runtime wiring",
|
|
358
|
+
],
|
|
359
|
+
planningGuidance: [
|
|
360
|
+
"Use Ripple as a file-level and git-scope guide only.",
|
|
361
|
+
"Read language-specific entry points and tests manually before editing.",
|
|
362
|
+
"Treat missing symbols or call edges as unknown, not safe.",
|
|
363
|
+
],
|
|
364
|
+
};
|
|
365
|
+
}
|
|
366
|
+
function preferredJsTsLanguage(extensionCounts) {
|
|
367
|
+
const typeScriptCount = (extensionCounts.get(".ts") ?? 0) + (extensionCounts.get(".tsx") ?? 0);
|
|
368
|
+
return typeScriptCount > 0 ? "typescript" : "javascript";
|
|
369
|
+
}
|
|
370
|
+
function countExtensions(workspaceRoot) {
|
|
371
|
+
const counts = new Map();
|
|
372
|
+
walkWorkspace(workspaceRoot, (filePath) => {
|
|
373
|
+
const extension = path.extname(filePath).toLowerCase();
|
|
374
|
+
counts.set(extension, (counts.get(extension) ?? 0) + 1);
|
|
375
|
+
});
|
|
376
|
+
return counts;
|
|
377
|
+
}
|
|
378
|
+
function walkWorkspace(root, visitFile) {
|
|
379
|
+
if (!fs.existsSync(root)) {
|
|
380
|
+
return;
|
|
381
|
+
}
|
|
382
|
+
const entries = fs.readdirSync(root, { withFileTypes: true });
|
|
383
|
+
entries.forEach((entry) => {
|
|
384
|
+
if (entry.isDirectory()) {
|
|
385
|
+
if (GENERIC_IGNORE_DIRS.has(entry.name)) {
|
|
386
|
+
return;
|
|
387
|
+
}
|
|
388
|
+
walkWorkspace(path.join(root, entry.name), visitFile);
|
|
389
|
+
return;
|
|
390
|
+
}
|
|
391
|
+
if (entry.isFile()) {
|
|
392
|
+
visitFile(path.join(root, entry.name));
|
|
393
|
+
}
|
|
394
|
+
});
|
|
395
|
+
}
|
|
396
|
+
//# sourceMappingURL=adapters.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"adapters.js","sourceRoot":"","sources":["../src/adapters.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uCAAyB;AACzB,2CAA6B;AA8C7B,MAAM,gBAAgB,GAAG,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC;AACxD,MAAM,iBAAiB,GAAG,CAAC,KAAK,CAAC,CAAC;AAClC,MAAM,wBAAwB,GAA8B;IAC1D,OAAO;IACP,cAAc;IACd,sBAAsB;IACtB,SAAS;IACT,YAAY;IACZ,OAAO;IACP,SAAS;CACV,CAAC;AACF,MAAM,mBAAmB,GAAG,IAAI,GAAG,CAAC;IAClC,MAAM;IACN,OAAO;IACP,SAAS;IACT,QAAQ;IACR,SAAS;IACT,UAAU;IACV,MAAM;IACN,cAAc;IACd,KAAK;CACN,CAAC,CAAC;AAEU,QAAA,0BAA0B,GAA8B;IACnE,QAAQ,EAAE,YAAY;IACtB,WAAW,EAAE,yBAAyB;IACtC,UAAU,EAAE,gBAAgB;IAC5B,YAAY,EAAE;QACZ,OAAO;QACP,cAAc;QACd,sBAAsB;QACtB,SAAS;QACT,YAAY;QACZ,OAAO;QACP,SAAS;KACV;CACF,CAAC;AAEW,QAAA,2BAA2B,GAA8B;IACpE,QAAQ,EAAE,QAAQ;IAClB,WAAW,EAAE,QAAQ;IACrB,UAAU,EAAE,iBAAiB;IAC7B,YAAY,EAAE;QACZ,OAAO;QACP,cAAc;QACd,sBAAsB;QACtB,SAAS;QACT,YAAY;QACZ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CAAC;QACzB,OAAO;IACT,CAAC;IAED,MAAM,OAAO,GAAG,EAAE,CAAC,WAAW,CAAC,IAAI,EAAE,EAAE,aAAa,EAAE,IAAI,EAAE,CAAC,CAAC;IAC9D,OAAO,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,EAAE;QACxB,IAAI,KAAK,CAAC,WAAW,EAAE,EAAE,CAAC;YACxB,IAAI,mBAAmB,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC;gBACxC,OAAO;YACT,CAAC;YACD,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,EAAE,SAAS,CAAC,CAAC;YACtD,OAAO;QACT,CAAC;QAED,IAAI,KAAK,CAAC,MAAM,EAAE,EAAE,CAAC;YACnB,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC;QACzC,CAAC;IACH,CAAC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
export type AgentControlMode = "brainstorm" | "function" | "file" | "task" | "pr";
|
|
2
|
+
export type AgentAuditGate = "beforeRiskyEdit" | "afterStaging" | "beforeMerge";
|
|
3
|
+
export type AgentRuntimePhaseId = "discover_contract" | "plan_before_edit" | "approval_gate" | "edit_inside_boundary" | "audit_after_change" | "repair_or_handoff";
|
|
4
|
+
export type AgentRuntimeNextPhaseId = AgentRuntimePhaseId | "done";
|
|
5
|
+
export type AgentRuntimePhase = {
|
|
6
|
+
id: AgentRuntimePhaseId;
|
|
7
|
+
order: number;
|
|
8
|
+
requiredWhen: string;
|
|
9
|
+
agentAction: string;
|
|
10
|
+
mcpTool?: string;
|
|
11
|
+
cliCommand?: string;
|
|
12
|
+
outputContract?: string;
|
|
13
|
+
must: string[];
|
|
14
|
+
stopIf: string[];
|
|
15
|
+
continueIf: string[];
|
|
16
|
+
};
|
|
17
|
+
export type AgentWorkflowSummary = {
|
|
18
|
+
protocol: "ripple-agent-workflow";
|
|
19
|
+
version: 1;
|
|
20
|
+
purpose: string;
|
|
21
|
+
loop: string[];
|
|
22
|
+
controlModes: Record<AgentControlMode, string>;
|
|
23
|
+
auditGates: Record<AgentAuditGate, string>;
|
|
24
|
+
policyWorkflow: {
|
|
25
|
+
defaultAgentPath: string;
|
|
26
|
+
policyOnlyPath: string;
|
|
27
|
+
policyDriftPath: string;
|
|
28
|
+
};
|
|
29
|
+
commands: {
|
|
30
|
+
guide: string;
|
|
31
|
+
initializeRepo: string;
|
|
32
|
+
checkReadiness: string;
|
|
33
|
+
installCi: string;
|
|
34
|
+
explainPolicy: string;
|
|
35
|
+
planBeforeEditing: string;
|
|
36
|
+
checkAfterStaging: string;
|
|
37
|
+
checkChangedAgainstBase: string;
|
|
38
|
+
auditCurrentChange: string;
|
|
39
|
+
gateCurrentChange: string;
|
|
40
|
+
checkApproval: string;
|
|
41
|
+
approveHumanGate: string;
|
|
42
|
+
ciGate: string;
|
|
43
|
+
repairIntentDrift: string;
|
|
44
|
+
};
|
|
45
|
+
mcpTools: {
|
|
46
|
+
workflow: "ripple_get_agent_workflow";
|
|
47
|
+
checkReadiness: "ripple_doctor";
|
|
48
|
+
explainPolicy: "ripple_explain_policy";
|
|
49
|
+
planBeforeEditing: "ripple_plan_context";
|
|
50
|
+
checkAfterStaging: "ripple_check_staged";
|
|
51
|
+
checkChangedAgainstBase: "ripple_check_changed";
|
|
52
|
+
auditCurrentChange: "ripple_audit_change";
|
|
53
|
+
gateCurrentChange: "ripple_gate";
|
|
54
|
+
checkApproval: "ripple_get_approval_status";
|
|
55
|
+
repairIntentDrift: "ripple_repair_intent_drift";
|
|
56
|
+
};
|
|
57
|
+
outputContracts: {
|
|
58
|
+
doctorHeader: "RIPPLE_DOCTOR";
|
|
59
|
+
planHeader: "RIPPLE_AGENT_CONTEXT";
|
|
60
|
+
stagedCheckHeader: "RIPPLE_STAGED_CHECK";
|
|
61
|
+
repairHeader: "RIPPLE_INTENT_DRIFT_REPAIR";
|
|
62
|
+
auditHeader: "RIPPLE_AUDIT";
|
|
63
|
+
gateHeader: "RIPPLE_GATE";
|
|
64
|
+
approvalHeader: "RIPPLE_APPROVAL";
|
|
65
|
+
approvalStatusHeader: "RIPPLE_APPROVAL_STATUS";
|
|
66
|
+
doctorSections: string[];
|
|
67
|
+
planSections: string[];
|
|
68
|
+
stagedCheckSections: string[];
|
|
69
|
+
repairSections: string[];
|
|
70
|
+
auditSections: string[];
|
|
71
|
+
gateSections: string[];
|
|
72
|
+
};
|
|
73
|
+
runtimeContract: {
|
|
74
|
+
protocol: "ripple-agent-runtime-contract";
|
|
75
|
+
version: 1;
|
|
76
|
+
invariant: string;
|
|
77
|
+
compatibleRuntimes: string[];
|
|
78
|
+
sourceOfTruth: string[];
|
|
79
|
+
phases: AgentRuntimePhase[];
|
|
80
|
+
stopConditions: string[];
|
|
81
|
+
proceedConditions: string[];
|
|
82
|
+
};
|
|
83
|
+
rules: string[];
|
|
84
|
+
example: string[];
|
|
85
|
+
};
|
|
86
|
+
export declare function getAgentWorkflowSummary(): AgentWorkflowSummary;
|