deepdebug-local-agent 1.0.22 → 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/README.md +81 -0
- 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/legacy-connectors.md +268 -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 +12 -4
- package/scripts/sync-fixtures.mjs +246 -0
- package/scripts/upgrade-observability-push.sh +227 -0
- package/src/adapters/as400/as400-parser.js +12 -0
- package/src/adapters/as400/index.js +134 -0
- package/src/adapters/cobol/cobol-parser.js +37 -0
- package/src/adapters/cobol/index.js +151 -0
- package/src/adapters/ibmmq/ibmmq-parser.js +23 -0
- package/src/adapters/ibmmq/index.js +137 -0
- package/src/adapters/index.js +79 -0
- package/src/adapters/oracle-forms/index.js +145 -0
- package/src/adapters/oracle-forms/oracle-forms-parser.js +11 -0
- package/src/adapters/sap/index.js +146 -0
- package/src/adapters/sap/sap-parser.js +41 -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 +1412 -335
- 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/as400/as400.test.js +121 -0
- package/test/adapters/cobol/cobol.test.js +217 -0
- package/test/adapters/ibmmq/ibmmq.test.js +122 -0
- package/test/adapters/oracle-forms/oracle-forms.test.js +180 -0
- package/test/adapters/registry.test.js +108 -0
- package/test/adapters/sap/sap.test.js +142 -0
- 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
- package/src/local-agent-source.tar.gz +0 -0
|
@@ -4,8 +4,8 @@ import { exists, readFile } from "../fs-utils.js";
|
|
|
4
4
|
/**
|
|
5
5
|
* ServiceDetector
|
|
6
6
|
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
7
|
+
* Detects services/microservices in a workspace
|
|
8
|
+
* Identifies: name, port, type, start command
|
|
9
9
|
*/
|
|
10
10
|
export class ServiceDetector {
|
|
11
11
|
constructor(root, languageInfo, frameworkInfo) {
|
|
@@ -16,12 +16,12 @@ export class ServiceDetector {
|
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
/**
|
|
19
|
-
*
|
|
19
|
+
* Detects all services in the workspace
|
|
20
20
|
*/
|
|
21
21
|
async detect() {
|
|
22
22
|
const services = [];
|
|
23
23
|
|
|
24
|
-
//
|
|
24
|
+
// Detect by project type
|
|
25
25
|
if (this.language === "java" && this.framework === "spring-boot") {
|
|
26
26
|
const service = await this.detectSpringBootService();
|
|
27
27
|
if (service) services.push(service);
|
|
@@ -41,20 +41,20 @@ export class ServiceDetector {
|
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
/**
|
|
44
|
-
*
|
|
44
|
+
* Detects a Spring Boot service
|
|
45
45
|
*/
|
|
46
46
|
async detectSpringBootService() {
|
|
47
47
|
const pomPath = path.join(this.root, "pom.xml");
|
|
48
48
|
const gradlePath = path.join(this.root, "build.gradle");
|
|
49
49
|
|
|
50
|
-
let serviceName = path.basename(this.root); // Fallback:
|
|
50
|
+
let serviceName = path.basename(this.root); // Fallback: folder name
|
|
51
51
|
let port = 8080;
|
|
52
52
|
|
|
53
|
-
//
|
|
53
|
+
// Try to extract the name from pom.xml (ignoring the parent)
|
|
54
54
|
if (await exists(pomPath)) {
|
|
55
55
|
const content = await readFile(pomPath, "utf8");
|
|
56
56
|
|
|
57
|
-
// Remove
|
|
57
|
+
// Remove the <parent>...</parent> block so we do not pick the wrong artifactId
|
|
58
58
|
const contentWithoutParent = content.replace(/<parent>[\s\S]*?<\/parent>/gi, '');
|
|
59
59
|
const artifactIdMatch = contentWithoutParent.match(/<artifactId>([^<]+)<\/artifactId>/);
|
|
60
60
|
|
|
@@ -63,7 +63,7 @@ export class ServiceDetector {
|
|
|
63
63
|
}
|
|
64
64
|
}
|
|
65
65
|
|
|
66
|
-
//
|
|
66
|
+
// Try to extract it from build.gradle
|
|
67
67
|
if (await exists(gradlePath)) {
|
|
68
68
|
const content = await readFile(gradlePath, "utf8");
|
|
69
69
|
const nameMatch = content.match(/rootProject\.name\s*=\s*['"]([^'"]+)['"]/);
|
|
@@ -72,7 +72,7 @@ export class ServiceDetector {
|
|
|
72
72
|
}
|
|
73
73
|
}
|
|
74
74
|
|
|
75
|
-
//
|
|
75
|
+
// Try to detect the port from application.yml/properties
|
|
76
76
|
port = await this.detectSpringBootPort();
|
|
77
77
|
|
|
78
78
|
return {
|
|
@@ -89,7 +89,7 @@ export class ServiceDetector {
|
|
|
89
89
|
}
|
|
90
90
|
|
|
91
91
|
/**
|
|
92
|
-
*
|
|
92
|
+
* Detects the Spring Boot port
|
|
93
93
|
*/
|
|
94
94
|
async detectSpringBootPort() {
|
|
95
95
|
const candidates = [
|
|
@@ -103,21 +103,21 @@ export class ServiceDetector {
|
|
|
103
103
|
if (await exists(fullPath)) {
|
|
104
104
|
const content = await readFile(fullPath, "utf8");
|
|
105
105
|
|
|
106
|
-
// YAML -
|
|
106
|
+
// YAML - multiple patterns
|
|
107
107
|
if (rel.endsWith(".yml") || rel.endsWith(".yaml")) {
|
|
108
|
-
//
|
|
108
|
+
// Pattern 1: server:\n port: 8080
|
|
109
109
|
let match = content.match(/server:\s*\n\s*port:\s*(\d+)/);
|
|
110
110
|
if (match) return parseInt(match[1]);
|
|
111
111
|
|
|
112
|
-
//
|
|
112
|
+
// Pattern 2: server.port: 8080
|
|
113
113
|
match = content.match(/server\.port:\s*(\d+)/);
|
|
114
114
|
if (match) return parseInt(match[1]);
|
|
115
115
|
|
|
116
|
-
//
|
|
116
|
+
// Pattern 3: port: ${PORT:8080}
|
|
117
117
|
match = content.match(/port:\s*\$\{[^}]*:(\d+)\}/);
|
|
118
118
|
if (match) return parseInt(match[1]);
|
|
119
119
|
|
|
120
|
-
//
|
|
120
|
+
// Pattern 4: server:\n port: 8080 (with more spaces)
|
|
121
121
|
match = content.match(/server:\s*[\r\n]+\s*port:\s*(\d+)/);
|
|
122
122
|
if (match) return parseInt(match[1]);
|
|
123
123
|
}
|
|
@@ -134,7 +134,7 @@ export class ServiceDetector {
|
|
|
134
134
|
}
|
|
135
135
|
|
|
136
136
|
/**
|
|
137
|
-
*
|
|
137
|
+
* Detects a Node.js service
|
|
138
138
|
*/
|
|
139
139
|
async detectNodeService() {
|
|
140
140
|
const pkgPath = path.join(this.root, "package.json");
|
|
@@ -157,10 +157,10 @@ export class ServiceDetector {
|
|
|
157
157
|
}
|
|
158
158
|
|
|
159
159
|
/**
|
|
160
|
-
*
|
|
160
|
+
* Detects the Node.js port
|
|
161
161
|
*/
|
|
162
162
|
async detectNodePort() {
|
|
163
|
-
//
|
|
163
|
+
// Try .env
|
|
164
164
|
const envPath = path.join(this.root, ".env");
|
|
165
165
|
if (await exists(envPath)) {
|
|
166
166
|
const content = await readFile(envPath, "utf8");
|
|
@@ -168,7 +168,7 @@ export class ServiceDetector {
|
|
|
168
168
|
if (match) return parseInt(match[1]);
|
|
169
169
|
}
|
|
170
170
|
|
|
171
|
-
// Defaults
|
|
171
|
+
// Defaults per framework
|
|
172
172
|
const defaults = {
|
|
173
173
|
"next": 3000,
|
|
174
174
|
"express": 3000,
|
|
@@ -179,7 +179,7 @@ export class ServiceDetector {
|
|
|
179
179
|
}
|
|
180
180
|
|
|
181
181
|
/**
|
|
182
|
-
*
|
|
182
|
+
* Detects a Python service
|
|
183
183
|
*/
|
|
184
184
|
async detectPythonService() {
|
|
185
185
|
return {
|
|
@@ -196,7 +196,7 @@ export class ServiceDetector {
|
|
|
196
196
|
}
|
|
197
197
|
|
|
198
198
|
/**
|
|
199
|
-
*
|
|
199
|
+
* Detects the Python port
|
|
200
200
|
*/
|
|
201
201
|
async detectPythonPort() {
|
|
202
202
|
const defaults = {
|
|
@@ -209,7 +209,7 @@ export class ServiceDetector {
|
|
|
209
209
|
}
|
|
210
210
|
|
|
211
211
|
/**
|
|
212
|
-
*
|
|
212
|
+
* Detects a .NET service
|
|
213
213
|
*/
|
|
214
214
|
detectDotNetService() {
|
|
215
215
|
return {
|
|
@@ -226,7 +226,7 @@ export class ServiceDetector {
|
|
|
226
226
|
}
|
|
227
227
|
|
|
228
228
|
/**
|
|
229
|
-
*
|
|
229
|
+
* Detects a Go service
|
|
230
230
|
*/
|
|
231
231
|
detectGoService() {
|
|
232
232
|
return {
|
package/src/exec-utils.js
CHANGED
|
@@ -156,10 +156,27 @@ export async function compileAndTest({ language, buildTool, cwd, skipTests = fal
|
|
|
156
156
|
}
|
|
157
157
|
}
|
|
158
158
|
|
|
159
|
-
//
|
|
159
|
+
// Speed flags — these stack:
|
|
160
|
+
// -q quiet output (only ERROR-level)
|
|
161
|
+
// --no-snapshot-updates skip "checking for updates" of
|
|
162
|
+
// SNAPSHOT deps that we already have
|
|
163
|
+
// in ~/.m2 (saves seconds per run)
|
|
164
|
+
// -T 1C one thread per CPU core (no-op on
|
|
165
|
+
// single-module poms but harmless)
|
|
166
|
+
// -Dmaven.compiler.useIncremental
|
|
167
|
+
// Compilation=true
|
|
168
|
+
// default since Maven 3.9 — set
|
|
169
|
+
// explicitly for older runners
|
|
170
|
+
// -e show full stack on compile errors
|
|
171
|
+
const speedFlags = [
|
|
172
|
+
"-q",
|
|
173
|
+
"--no-snapshot-updates",
|
|
174
|
+
"-T", "1C",
|
|
175
|
+
"-Dmaven.compiler.useIncrementalCompilation=true"
|
|
176
|
+
];
|
|
160
177
|
const args = skipTests
|
|
161
|
-
? ["compile", "-DskipTests", "-e", ...javaCompatFlags]
|
|
162
|
-
: ["test", "-e", ...javaCompatFlags];
|
|
178
|
+
? ["compile", "-DskipTests", "-e", ...speedFlags, ...javaCompatFlags]
|
|
179
|
+
: ["test", "-e", ...speedFlags, ...javaCompatFlags];
|
|
163
180
|
|
|
164
181
|
console.log(`[BUILD] [COMPILE] Running: ${mvnCmd} ${args.join(" ")}`);
|
|
165
182
|
result = await run(mvnCmd, args, cwd, 10 * 60 * 1000, mavenEnv);
|
|
@@ -257,7 +274,12 @@ export async function compileAndTest({ language, buildTool, cwd, skipTests = fal
|
|
|
257
274
|
else if (language === "swift" || language === "ios") {
|
|
258
275
|
// SPM projects: try `swift build` if the Swift toolchain is available.
|
|
259
276
|
// Xcode projects (xcodebuild) need macOS — not available on Linux Cloud Run.
|
|
260
|
-
|
|
277
|
+
// Accept all three SPM marker values: "spm" (legacy), "swift" (generic),
|
|
278
|
+
// "swiftpm" (current detector output from detectors.js for Package.swift).
|
|
279
|
+
// Pre-Phase-11 bug: detectProject emits "swiftpm" but this branch only
|
|
280
|
+
// matched "spm"/"swift", so SwiftPM projects fell through to the Xcode
|
|
281
|
+
// branch (swiftc -typecheck) instead of using swift build.
|
|
282
|
+
if (buildTool === "spm" || buildTool === "swift" || buildTool === "swiftpm") {
|
|
261
283
|
console.log(`[BUILD] [COMPILE] Attempting: swift build`);
|
|
262
284
|
const swiftCheck = await run("which", ["swift"], cwd, 3000);
|
|
263
285
|
if (swiftCheck.code === 0) {
|