deepdebug-local-agent 1.0.23 → 1.1.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.
- package/.claude/context.md +76 -0
- package/.claude/skills/README.md +25 -0
- package/.claude/skills/tdd-debugging/SKILL.md +53 -0
- package/.claude/skills/tdd-debugging/references/anti-patterns.md +43 -0
- package/.claude/skills/tdd-debugging/references/command-reference.md +46 -0
- package/.claude/standards/README.md +51 -0
- package/.claude/standards/clean-code.md +75 -0
- package/.claude/standards/code-review-checklist.md +61 -0
- package/.claude/standards/layered-architecture.md +163 -0
- package/.claude/standards/node.md +45 -0
- package/.claude/standards/security-owasp.md +114 -0
- package/.claude/standards/simplicity.md +42 -0
- package/.claude/standards/solid.md +64 -0
- package/.claude/standards/testing.md +59 -0
- package/.cursor/rules/standards.mdc +17 -0
- package/.github/workflows/build-byoc-image.yml +315 -0
- package/.github/workflows/deploy-gcp.yml +102 -0
- package/.github/workflows/npm-publish.yml +69 -8
- package/AGENTS.md +21 -0
- package/CHANGELOG.md +69 -0
- package/CLAUDE.md +13 -0
- package/CLAUDE_CODE_AGENT_INFINITE.md +5 -3
- package/Dockerfile +4 -0
- package/Dockerfile.full +55 -3
- package/bin/install.js +16 -5
- package/cloudbuild-full.yaml +57 -0
- package/docker-compose.yml +5 -3
- package/docs/OBSERVABILITY.md +164 -0
- package/docs/byoc-agent-image.md +70 -0
- package/docs/graphify-packaging-plan.md +133 -0
- package/docs/graphify-validation-run-2026-10-28.md +243 -0
- package/docs/releasing.md +43 -0
- package/docs/signed-commands.md +163 -0
- package/env.example +30 -0
- package/helm/Chart.yaml +2 -2
- package/helm/templates/deployment.yaml +13 -3
- package/helm/templates/networkpolicy.yaml +22 -0
- package/helm/templates/secret.yaml +1 -0
- package/helm/values.yaml +13 -14
- package/mcp-server.js +4 -1
- package/package.json +9 -4
- package/scripts/upgrade-observability-push.sh +227 -0
- package/src/ai-engine.js +22 -22
- package/src/config/trusted-signing-keys.json +3 -0
- package/src/detectors/build-tool-detector.js +50 -0
- package/src/detectors/multi-project-detector.js +22 -22
- package/src/detectors/service-detector.js +24 -24
- package/src/exec-utils.js +26 -4
- package/src/git/base-git-provider.js +117 -117
- package/src/git/bitbucket-provider.js +2 -2
- package/src/git/git-provider-registry.js +18 -18
- package/src/git/github-provider.js +13 -13
- package/src/git/multi-repo-pr.js +161 -0
- package/src/mcp-http-server.js +32 -16
- package/src/observability/bundle-files.js +418 -0
- package/src/observability/detect.js +151 -0
- package/src/observability/provision.js +212 -0
- package/src/observability/render-cli.js +59 -0
- package/src/observability/routes.js +88 -0
- package/src/patch/patch-engine.js +28 -28
- package/src/patch-manager.js +85 -85
- package/src/patch_bkp.js +14 -14
- package/src/ports.js +4 -4
- package/src/routes/workspace.route.js +47 -16
- package/src/runtimes/base-runtime.js +75 -75
- package/src/runtimes/java/gradle-runtime.js +17 -17
- package/src/runtimes/java/java-integrations.js +25 -25
- package/src/runtimes/java/maven-runtime.js +34 -34
- package/src/runtimes/node/node-integrations.js +1 -1
- package/src/runtimes/node/npm-runtime.js +14 -14
- package/src/runtimes/node/yarn-runtime.js +4 -4
- package/src/runtimes/runtime-registry.js +25 -25
- package/src/server-local.js +4 -4
- package/src/server.js +1366 -333
- package/src/siblings/burst-suppressor.js +89 -0
- package/src/siblings/capabilities.js +273 -0
- package/src/siblings/env-compat.cjs +58 -0
- package/src/siblings/incident-forwarder.js +320 -0
- package/src/siblings/logger.js +15 -0
- package/src/siblings/metrics.js +94 -0
- package/src/utils/agent-auth.js +184 -0
- package/src/utils/approval-token.js +56 -0
- package/src/utils/bind-host.js +29 -0
- package/src/utils/branch-refspec.js +98 -0
- package/src/utils/child-env.js +34 -0
- package/src/utils/environment-diagnostics.js +55 -55
- package/src/utils/exec-policy.js +962 -0
- package/src/utils/exec-utils.js +15 -15
- package/src/utils/file-count.js +46 -0
- package/src/utils/fs-utils.js +10 -10
- package/src/utils/multi-repo-open.js +132 -0
- package/src/utils/open-gate.js +183 -0
- package/src/utils/ranged-read.js +65 -0
- package/src/utils/request-guards.js +77 -0
- package/src/utils/request-signing.js +342 -0
- package/src/utils/root-recovery.js +244 -0
- package/src/utils/safe-exec-args.js +58 -0
- package/src/utils/sandbox.js +182 -0
- package/src/utils/search-outcome.js +56 -0
- package/src/utils/workspace-root.js +80 -0
- package/src/validators/syntax-validator.js +149 -0
- package/src/workspace/detect-port.js +16 -16
- package/src/workspace/file-reader.js +1 -1
- package/src/workspace/process-manager.js +46 -46
- package/src/workspace-manager.js +86 -24
- package/test/adapters/registry.test.js +9 -2
- package/test/agent-auth.test.js +194 -0
- package/test/bind-host.test.js +26 -0
- package/test/branch-refspec.test.js +224 -0
- package/test/burst-suppressor.test.js +60 -0
- package/test/capabilities-access.test.js +47 -0
- package/test/capabilities.test.js +87 -0
- package/test/child-env.test.js +23 -0
- package/test/env-compat.test.js +71 -0
- package/test/exec-policy.test.js +463 -0
- package/test/file-count.test.js +64 -0
- package/test/incident-forwarder.test.js +231 -0
- package/test/multi-repo-open.test.js +180 -0
- package/test/multi-repo-pr.test.js +129 -0
- package/test/observability-detect.test.js +199 -0
- package/test/open-gate.test.js +341 -0
- package/test/ranged-read.test.js +60 -0
- package/test/request-guards.test.js +91 -0
- package/test/request-signing.test.js +284 -0
- package/test/root-recovery-sidecar.test.js +171 -0
- package/test/root-recovery.test.js +274 -0
- package/test/safe-exec-args.test.js +58 -0
- package/test/sandbox.test.js +98 -0
- package/test/search-outcome.test.js +50 -0
- package/test/workspace-root.test.js +64 -0
- package/tools/graphify-validation/README.md +92 -0
- package/tools/graphify-validation/config/questions.json +31 -0
- package/tools/graphify-validation/config/repos.json +9 -0
- package/tools/graphify-validation/config/symbols.json +6 -0
- package/tools/graphify-validation/fixtures/spring/expected.json +34 -0
- package/tools/graphify-validation/fixtures/spring/src/main/java/com/example/fx/AppConfig.java +29 -0
- package/tools/graphify-validation/fixtures/spring/src/main/java/com/example/fx/AuditLogger.java +15 -0
- package/tools/graphify-validation/fixtures/spring/src/main/java/com/example/fx/Cache.java +7 -0
- package/tools/graphify-validation/fixtures/spring/src/main/java/com/example/fx/CheckoutService.java +25 -0
- package/tools/graphify-validation/fixtures/spring/src/main/java/com/example/fx/InMemoryCache.java +18 -0
- package/tools/graphify-validation/fixtures/spring/src/main/java/com/example/fx/OrderController.java +22 -0
- package/tools/graphify-validation/fixtures/spring/src/main/java/com/example/fx/PaymentGateway.java +5 -0
- package/tools/graphify-validation/fixtures/spring/src/main/java/com/example/fx/PaypalGateway.java +11 -0
- package/tools/graphify-validation/fixtures/spring/src/main/java/com/example/fx/RefundService.java +14 -0
- package/tools/graphify-validation/fixtures/spring/src/main/java/com/example/fx/StripeGateway.java +11 -0
- package/tools/graphify-validation/lib/affected_vs_rg.py +81 -0
- package/tools/graphify-validation/lib/audit_hook/sitecustomize.py +22 -0
- package/tools/graphify-validation/lib/graph_metrics.py +96 -0
- package/tools/graphify-validation/lib/gv_common.py +130 -0
- package/tools/graphify-validation/lib/licenses.py +47 -0
- package/tools/graphify-validation/lib/pip_audit_summary.py +18 -0
- package/tools/graphify-validation/lib/recall.py +115 -0
- package/tools/graphify-validation/lib/report.py +226 -0
- package/tools/graphify-validation/lib/run_all.py +237 -0
- package/tools/graphify-validation/lib/run_graphify.py +144 -0
- package/tools/graphify-validation/lib/rusage_helper.py +17 -0
- package/tools/graphify-validation/lib/sample_edges.py +246 -0
- package/tools/graphify-validation/lib/spring_fixture.py +81 -0
- package/tools/graphify-validation/requirements-py311.lock +508 -0
- package/tools/graphify-validation/requirements-tools.in +1 -0
- package/tools/graphify-validation/requirements-tools.lock +371 -0
- package/tools/graphify-validation/requirements.in +1 -0
- package/tools/graphify-validation/requirements.lock +502 -0
- package/tools/graphify-validation/run.sh +43 -0
- package/tools/graphify-validation/tests/test_harness.py +151 -0
- package/cloudbuild-agent-qa.yaml +0 -43
- package/cloudbuild-agent-staging.yaml +0 -40
- package/cloudbuild.yaml.deprecated +0 -42
|
@@ -4,8 +4,8 @@ import { exists } from '../utils/fs-utils.js';
|
|
|
4
4
|
/**
|
|
5
5
|
* RuntimeRegistry
|
|
6
6
|
*
|
|
7
|
-
* Factory/Registry
|
|
8
|
-
* Singleton
|
|
7
|
+
* Factory/Registry for managing and detecting language runtimes.
|
|
8
|
+
* Singleton that keeps all registered runtimes.
|
|
9
9
|
*/
|
|
10
10
|
export class RuntimeRegistry {
|
|
11
11
|
|
|
@@ -15,14 +15,14 @@ export class RuntimeRegistry {
|
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
/**
|
|
18
|
-
*
|
|
19
|
-
* @param {BaseRuntime} runtime -
|
|
18
|
+
* Registers a runtime
|
|
19
|
+
* @param {BaseRuntime} runtime - Runtime instance
|
|
20
20
|
*/
|
|
21
21
|
register(runtime) {
|
|
22
22
|
const id = runtime.getId();
|
|
23
23
|
this.runtimes.set(id, runtime);
|
|
24
24
|
|
|
25
|
-
//
|
|
25
|
+
// Index by marker files for fast detection
|
|
26
26
|
for (const marker of runtime.getMarkerFiles()) {
|
|
27
27
|
if (!this.markerIndex.has(marker)) {
|
|
28
28
|
this.markerIndex.set(marker, []);
|
|
@@ -34,8 +34,8 @@ export class RuntimeRegistry {
|
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
/**
|
|
37
|
-
*
|
|
38
|
-
* @param {string} id - ID
|
|
37
|
+
* Gets a runtime by ID
|
|
38
|
+
* @param {string} id - Runtime ID
|
|
39
39
|
* @returns {BaseRuntime|null}
|
|
40
40
|
*/
|
|
41
41
|
get(id) {
|
|
@@ -43,7 +43,7 @@ export class RuntimeRegistry {
|
|
|
43
43
|
}
|
|
44
44
|
|
|
45
45
|
/**
|
|
46
|
-
*
|
|
46
|
+
* Lists all registered runtimes
|
|
47
47
|
* @returns {BaseRuntime[]}
|
|
48
48
|
*/
|
|
49
49
|
list() {
|
|
@@ -51,7 +51,7 @@ export class RuntimeRegistry {
|
|
|
51
51
|
}
|
|
52
52
|
|
|
53
53
|
/**
|
|
54
|
-
*
|
|
54
|
+
* Lists the IDs of the registered runtimes
|
|
55
55
|
* @returns {string[]}
|
|
56
56
|
*/
|
|
57
57
|
listIds() {
|
|
@@ -59,14 +59,14 @@ export class RuntimeRegistry {
|
|
|
59
59
|
}
|
|
60
60
|
|
|
61
61
|
/**
|
|
62
|
-
* Auto-
|
|
63
|
-
* @param {string} workspacePath -
|
|
62
|
+
* Auto-detects the runtime of a workspace
|
|
63
|
+
* @param {string} workspacePath - Workspace path
|
|
64
64
|
* @returns {Promise<BaseRuntime|null>}
|
|
65
65
|
*/
|
|
66
66
|
async detectRuntime(workspacePath) {
|
|
67
67
|
console.log(`🔍 Detecting runtime for: ${workspacePath}`);
|
|
68
68
|
|
|
69
|
-
//
|
|
69
|
+
// Detection priority (most specific first)
|
|
70
70
|
const detectionOrder = [
|
|
71
71
|
// Java
|
|
72
72
|
'pom.xml',
|
|
@@ -101,7 +101,7 @@ export class RuntimeRegistry {
|
|
|
101
101
|
}
|
|
102
102
|
}
|
|
103
103
|
|
|
104
|
-
// Fallback:
|
|
104
|
+
// Fallback: try each runtime
|
|
105
105
|
for (const runtime of this.runtimes.values()) {
|
|
106
106
|
if (await runtime.isCompatible(workspacePath)) {
|
|
107
107
|
console.log(`✅ Detected runtime (fallback): ${runtime.getId()}`);
|
|
@@ -114,8 +114,8 @@ export class RuntimeRegistry {
|
|
|
114
114
|
}
|
|
115
115
|
|
|
116
116
|
/**
|
|
117
|
-
*
|
|
118
|
-
* @param {string} workspacePath -
|
|
117
|
+
* Detects the runtime and returns project information
|
|
118
|
+
* @param {string} workspacePath - Workspace path
|
|
119
119
|
* @returns {Promise<{runtime: BaseRuntime, project: ProjectInfo}|null>}
|
|
120
120
|
*/
|
|
121
121
|
async analyzeWorkspace(workspacePath) {
|
|
@@ -134,20 +134,20 @@ export class RuntimeRegistry {
|
|
|
134
134
|
}
|
|
135
135
|
|
|
136
136
|
/**
|
|
137
|
-
*
|
|
138
|
-
* @param {string} language -
|
|
137
|
+
* Gets a runtime by language and build tool
|
|
138
|
+
* @param {string} language - Language
|
|
139
139
|
* @param {string} buildTool - Build tool
|
|
140
140
|
* @returns {BaseRuntime|null}
|
|
141
141
|
*/
|
|
142
142
|
getByLanguageAndTool(language, buildTool) {
|
|
143
143
|
const id = `${language}-${buildTool}`;
|
|
144
144
|
|
|
145
|
-
//
|
|
145
|
+
// Try an exact match
|
|
146
146
|
if (this.runtimes.has(id)) {
|
|
147
147
|
return this.runtimes.get(id);
|
|
148
148
|
}
|
|
149
149
|
|
|
150
|
-
//
|
|
150
|
+
// Try a match by language
|
|
151
151
|
for (const runtime of this.runtimes.values()) {
|
|
152
152
|
if (runtime.getLanguage() === language &&
|
|
153
153
|
runtime.getBuildTool() === buildTool) {
|
|
@@ -155,7 +155,7 @@ export class RuntimeRegistry {
|
|
|
155
155
|
}
|
|
156
156
|
}
|
|
157
157
|
|
|
158
|
-
// Fallback:
|
|
158
|
+
// Fallback: any runtime for the language
|
|
159
159
|
for (const runtime of this.runtimes.values()) {
|
|
160
160
|
if (runtime.getLanguage() === language) {
|
|
161
161
|
return runtime;
|
|
@@ -166,8 +166,8 @@ export class RuntimeRegistry {
|
|
|
166
166
|
}
|
|
167
167
|
|
|
168
168
|
/**
|
|
169
|
-
*
|
|
170
|
-
* @param {string} language -
|
|
169
|
+
* Lists runtimes by language
|
|
170
|
+
* @param {string} language - Language
|
|
171
171
|
* @returns {BaseRuntime[]}
|
|
172
172
|
*/
|
|
173
173
|
listByLanguage(language) {
|
|
@@ -183,7 +183,7 @@ export class RuntimeRegistry {
|
|
|
183
183
|
let instance = null;
|
|
184
184
|
|
|
185
185
|
/**
|
|
186
|
-
*
|
|
186
|
+
* Gets the singleton instance of RuntimeRegistry
|
|
187
187
|
* @returns {RuntimeRegistry}
|
|
188
188
|
*/
|
|
189
189
|
export function getRuntimeRegistry() {
|
|
@@ -194,13 +194,13 @@ export function getRuntimeRegistry() {
|
|
|
194
194
|
}
|
|
195
195
|
|
|
196
196
|
/**
|
|
197
|
-
*
|
|
197
|
+
* Initializes the registry with all available runtimes
|
|
198
198
|
* @returns {Promise<RuntimeRegistry>}
|
|
199
199
|
*/
|
|
200
200
|
export async function initializeRuntimes() {
|
|
201
201
|
const registry = getRuntimeRegistry();
|
|
202
202
|
|
|
203
|
-
//
|
|
203
|
+
// Dynamic import of the runtimes
|
|
204
204
|
try {
|
|
205
205
|
// Java
|
|
206
206
|
const { MavenRuntime } = await import('./java/maven-runtime.js');
|
package/src/server-local.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
// ============================================
|
|
2
|
-
// 🆕
|
|
3
|
-
//
|
|
4
|
-
//
|
|
2
|
+
// 🆕 ADD THESE ENDPOINTS TO server-local.js
|
|
3
|
+
// Place them BEFORE the "START SERVER" section
|
|
4
|
+
// DO NOT modify existing endpoints
|
|
5
5
|
// ============================================
|
|
6
6
|
|
|
7
7
|
// ============================================
|
|
8
8
|
// 🆕 DRY-RUN ENDPOINT (Sprint 1.3)
|
|
9
|
-
//
|
|
9
|
+
// Validates and simulates a patch WITHOUT modifying files
|
|
10
10
|
// ============================================
|
|
11
11
|
|
|
12
12
|
/**
|