codeharness 0.17.3 → 0.17.5
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.
|
@@ -140,7 +140,7 @@ exporters:
|
|
|
140
140
|
tls:
|
|
141
141
|
insecure: true
|
|
142
142
|
|
|
143
|
-
|
|
143
|
+
otlphttp/traces:
|
|
144
144
|
endpoint: ${tracesUrl}
|
|
145
145
|
tls:
|
|
146
146
|
insecure: true
|
|
@@ -167,7 +167,7 @@ service:
|
|
|
167
167
|
processors:
|
|
168
168
|
- resource/default
|
|
169
169
|
exporters:
|
|
170
|
-
-
|
|
170
|
+
- otlphttp/traces
|
|
171
171
|
`;
|
|
172
172
|
}
|
|
173
173
|
function otelCollectorConfigTemplate() {
|
|
@@ -198,8 +198,8 @@ exporters:
|
|
|
198
198
|
tls:
|
|
199
199
|
insecure: true
|
|
200
200
|
|
|
201
|
-
|
|
202
|
-
endpoint: http://victoria-traces:
|
|
201
|
+
otlphttp/traces:
|
|
202
|
+
endpoint: http://victoria-traces:4318
|
|
203
203
|
tls:
|
|
204
204
|
insecure: true
|
|
205
205
|
|
|
@@ -225,7 +225,7 @@ service:
|
|
|
225
225
|
processors:
|
|
226
226
|
- resource/default
|
|
227
227
|
exporters:
|
|
228
|
-
-
|
|
228
|
+
- otlphttp/traces
|
|
229
229
|
`;
|
|
230
230
|
}
|
|
231
231
|
|
package/dist/index.js
CHANGED
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
startSharedStack,
|
|
14
14
|
stopCollectorOnly,
|
|
15
15
|
stopSharedStack
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-MQTUWYSN.js";
|
|
17
17
|
|
|
18
18
|
// src/index.ts
|
|
19
19
|
import { Command } from "commander";
|
|
@@ -1443,7 +1443,7 @@ function getInstallCommand(stack) {
|
|
|
1443
1443
|
}
|
|
1444
1444
|
|
|
1445
1445
|
// src/commands/init.ts
|
|
1446
|
-
var HARNESS_VERSION = true ? "0.17.
|
|
1446
|
+
var HARNESS_VERSION = true ? "0.17.5" : "0.0.0-dev";
|
|
1447
1447
|
function getProjectName(projectDir) {
|
|
1448
1448
|
try {
|
|
1449
1449
|
const pkgPath = join6(projectDir, "package.json");
|
|
@@ -1588,6 +1588,16 @@ function registerInitCommand(program) {
|
|
|
1588
1588
|
}
|
|
1589
1589
|
}
|
|
1590
1590
|
result.dependencies = depResults;
|
|
1591
|
+
if (existingState.docker) {
|
|
1592
|
+
result.docker = {
|
|
1593
|
+
compose_file: existingState.docker.compose_file,
|
|
1594
|
+
stack_running: existingState.docker.stack_running,
|
|
1595
|
+
services: [],
|
|
1596
|
+
ports: existingState.docker.ports
|
|
1597
|
+
};
|
|
1598
|
+
} else {
|
|
1599
|
+
result.docker = null;
|
|
1600
|
+
}
|
|
1591
1601
|
if (isBmadInstalled(projectDir)) {
|
|
1592
1602
|
try {
|
|
1593
1603
|
const patchResults = applyAllPatches(projectDir);
|
|
@@ -1665,13 +1675,27 @@ function registerInitCommand(program) {
|
|
|
1665
1675
|
info(`App type: ${appType}`);
|
|
1666
1676
|
}
|
|
1667
1677
|
let dockerAvailable = true;
|
|
1668
|
-
if (!options.otelEndpoint) {
|
|
1678
|
+
if (!options.otelEndpoint && !options.logsUrl) {
|
|
1669
1679
|
if (!isDockerAvailable()) {
|
|
1670
1680
|
dockerAvailable = false;
|
|
1671
|
-
if (
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1681
|
+
if (options.observability) {
|
|
1682
|
+
result.status = "fail";
|
|
1683
|
+
result.error = "Docker not installed";
|
|
1684
|
+
result.docker = {
|
|
1685
|
+
compose_file: "",
|
|
1686
|
+
stack_running: false,
|
|
1687
|
+
services: [],
|
|
1688
|
+
ports: { logs: 9428, metrics: 8428, traces: 16686, otel_grpc: 4317, otel_http: 4318 }
|
|
1689
|
+
};
|
|
1690
|
+
if (isJson) {
|
|
1691
|
+
jsonOutput(result);
|
|
1692
|
+
} else {
|
|
1693
|
+
fail("Docker not installed");
|
|
1694
|
+
info("\u2192 Install Docker: https://docs.docker.com/engine/install/");
|
|
1695
|
+
info("\u2192 Or skip observability: codeharness init --no-observability");
|
|
1696
|
+
}
|
|
1697
|
+
process.exitCode = 1;
|
|
1698
|
+
return;
|
|
1675
1699
|
}
|
|
1676
1700
|
} else {
|
|
1677
1701
|
if (!isJson) {
|
|
@@ -1876,7 +1900,13 @@ function registerInitCommand(program) {
|
|
|
1876
1900
|
};
|
|
1877
1901
|
}
|
|
1878
1902
|
{
|
|
1879
|
-
if (options.
|
|
1903
|
+
if (!options.observability) {
|
|
1904
|
+
result.docker = null;
|
|
1905
|
+
writeState(state, projectDir);
|
|
1906
|
+
if (!isJson) {
|
|
1907
|
+
info("Observability: disabled, skipping Docker stack");
|
|
1908
|
+
}
|
|
1909
|
+
} else if (options.otelEndpoint) {
|
|
1880
1910
|
state.otlp = {
|
|
1881
1911
|
...state.otlp,
|
|
1882
1912
|
endpoint: options.otelEndpoint,
|
|
@@ -1992,6 +2022,12 @@ function registerInitCommand(program) {
|
|
|
1992
2022
|
}
|
|
1993
2023
|
}
|
|
1994
2024
|
} else {
|
|
2025
|
+
result.docker = {
|
|
2026
|
+
compose_file: "",
|
|
2027
|
+
stack_running: false,
|
|
2028
|
+
services: [],
|
|
2029
|
+
ports: { logs: 9428, metrics: 8428, traces: 16686, otel_grpc: 4317, otel_http: 4318 }
|
|
2030
|
+
};
|
|
1995
2031
|
writeState(state, projectDir);
|
|
1996
2032
|
if (!isJson) {
|
|
1997
2033
|
info("Observability: deferred (configure Docker or remote endpoint to activate)");
|
|
@@ -5888,7 +5924,7 @@ function registerTeardownCommand(program) {
|
|
|
5888
5924
|
} else if (otlpMode === "remote-routed") {
|
|
5889
5925
|
if (!options.keepDocker) {
|
|
5890
5926
|
try {
|
|
5891
|
-
const { stopCollectorOnly: stopCollectorOnly2 } = await import("./docker-
|
|
5927
|
+
const { stopCollectorOnly: stopCollectorOnly2 } = await import("./docker-3SYWA63Y.js");
|
|
5892
5928
|
stopCollectorOnly2();
|
|
5893
5929
|
result.docker.stopped = true;
|
|
5894
5930
|
if (!isJson) {
|
|
@@ -5920,7 +5956,7 @@ function registerTeardownCommand(program) {
|
|
|
5920
5956
|
info("Shared stack: kept running (other projects may use it)");
|
|
5921
5957
|
}
|
|
5922
5958
|
} else if (isLegacyStack) {
|
|
5923
|
-
const { isStackRunning: isStackRunning2, stopStack } = await import("./docker-
|
|
5959
|
+
const { isStackRunning: isStackRunning2, stopStack } = await import("./docker-3SYWA63Y.js");
|
|
5924
5960
|
let stackRunning = false;
|
|
5925
5961
|
try {
|
|
5926
5962
|
stackRunning = isStackRunning2(composeFile);
|
|
@@ -7784,7 +7820,7 @@ function handleStatus(dir, isJson, filterStory) {
|
|
|
7784
7820
|
}
|
|
7785
7821
|
|
|
7786
7822
|
// src/index.ts
|
|
7787
|
-
var VERSION = true ? "0.17.
|
|
7823
|
+
var VERSION = true ? "0.17.5" : "0.0.0-dev";
|
|
7788
7824
|
function createProgram() {
|
|
7789
7825
|
const program = new Command();
|
|
7790
7826
|
program.name("codeharness").description("Makes autonomous coding agents produce software that actually works").version(VERSION).option("--json", "Output in machine-readable JSON format");
|
package/package.json
CHANGED
package/ralph/ralph.sh
CHANGED
|
@@ -5,10 +5,8 @@
|
|
|
5
5
|
#
|
|
6
6
|
# Usage: ralph/ralph.sh --plugin-dir ./codeharness [OPTIONS]
|
|
7
7
|
|
|
8
|
-
set -e
|
|
9
|
-
|
|
10
|
-
# DEBUG: catch unexpected exits from set -e
|
|
11
|
-
trap 'echo "[$(date "+%Y-%m-%d %H:%M:%S")] [FATAL] ralph.sh died at line $LINENO (exit code: $?)" >> "${LOG_DIR:-ralph/logs}/ralph_crash.log" 2>/dev/null' ERR
|
|
8
|
+
# NOTE: set -e intentionally NOT used — it causes silent crashes in the main
|
|
9
|
+
# loop when grep/jq/sed return non-zero. The loop handles errors via exit codes.
|
|
12
10
|
|
|
13
11
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
14
12
|
source "$SCRIPT_DIR/lib/date_utils.sh"
|
|
@@ -624,11 +622,8 @@ execute_iteration() {
|
|
|
624
622
|
sleep 10
|
|
625
623
|
done
|
|
626
624
|
|
|
627
|
-
# Protect wait from set -e — capture exit code without crashing
|
|
628
|
-
set +e
|
|
629
625
|
wait $claude_pid
|
|
630
626
|
exit_code=$?
|
|
631
|
-
set -e
|
|
632
627
|
log_status "DEBUG" "Claude exited with code: $exit_code, output size: $(wc -c < "$output_file" 2>/dev/null || echo 0) bytes"
|
|
633
628
|
|
|
634
629
|
# If output is empty and exit code is non-zero, log diagnostic info
|