@locusai/sdk 0.11.7 → 0.11.8
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/dist/agent/worker.js
CHANGED
|
@@ -829,9 +829,7 @@ class ClaudeRunner {
|
|
|
829
829
|
"stream-json",
|
|
830
830
|
"--include-partial-messages",
|
|
831
831
|
"--model",
|
|
832
|
-
this.model
|
|
833
|
-
"--settings",
|
|
834
|
-
SANDBOX_SETTINGS
|
|
832
|
+
this.model
|
|
835
833
|
];
|
|
836
834
|
const env = getAugmentedEnv({
|
|
837
835
|
FORCE_COLOR: "1",
|
|
@@ -1080,9 +1078,7 @@ class ClaudeRunner {
|
|
|
1080
1078
|
"stream-json",
|
|
1081
1079
|
"--include-partial-messages",
|
|
1082
1080
|
"--model",
|
|
1083
|
-
this.model
|
|
1084
|
-
"--settings",
|
|
1085
|
-
SANDBOX_SETTINGS
|
|
1081
|
+
this.model
|
|
1086
1082
|
];
|
|
1087
1083
|
const env = getAugmentedEnv({
|
|
1088
1084
|
FORCE_COLOR: "1",
|
|
@@ -1184,23 +1180,13 @@ ${c.primary("[Claude]")} ${c.bold(`Running ${content_block.name}...`)}
|
|
|
1184
1180
|
return new Error(message);
|
|
1185
1181
|
}
|
|
1186
1182
|
}
|
|
1187
|
-
var import_node_child_process, import_node_path3,
|
|
1183
|
+
var import_node_child_process, import_node_path3, DEFAULT_TIMEOUT_MS;
|
|
1188
1184
|
var init_claude_runner = __esm(() => {
|
|
1189
1185
|
init_config();
|
|
1190
1186
|
init_colors();
|
|
1191
1187
|
init_resolve_bin();
|
|
1192
1188
|
import_node_child_process = require("node:child_process");
|
|
1193
1189
|
import_node_path3 = require("node:path");
|
|
1194
|
-
SANDBOX_SETTINGS = JSON.stringify({
|
|
1195
|
-
permissions: {
|
|
1196
|
-
deny: ["Read(../**)", "Edit(../**)"]
|
|
1197
|
-
},
|
|
1198
|
-
sandbox: {
|
|
1199
|
-
enabled: true,
|
|
1200
|
-
autoAllow: true,
|
|
1201
|
-
allowUnsandboxedCommands: false
|
|
1202
|
-
}
|
|
1203
|
-
});
|
|
1204
1190
|
DEFAULT_TIMEOUT_MS = 60 * 60 * 1000;
|
|
1205
1191
|
});
|
|
1206
1192
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"claude-runner.d.ts","sourceRoot":"","sources":["../../src/ai/claude-runner.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AACjE,OAAO,KAAK,EAAE,WAAW,EAAc,MAAM,kBAAkB,CAAC;AAGhE,OAAO,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AACrC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"claude-runner.d.ts","sourceRoot":"","sources":["../../src/ai/claude-runner.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AACjE,OAAO,KAAK,EAAE,WAAW,EAAc,MAAM,kBAAkB,CAAC;AAGhE,OAAO,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AACrC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAmC5C,qBAAa,YAAa,YAAW,QAAQ;IAUzC,OAAO,CAAC,KAAK;IACb,OAAO,CAAC,GAAG,CAAC;IAVd,OAAO,CAAC,WAAW,CAAS;IAC5B,OAAO,CAAC,YAAY,CAAC,CAAmB;IACxC,OAAO,CAAC,eAAe,CAAC,CAAS;IACjC,OAAO,CAAC,WAAW,CAA+C;IAClE,OAAO,CAAC,aAAa,CAA6B;IAClD,SAAS,EAAE,MAAM,CAAC;gBAGhB,WAAW,EAAE,MAAM,EACX,KAAK,GAAE,MAAuC,EAC9C,GAAG,CAAC,EAAE,KAAK,YAAA,EACnB,SAAS,CAAC,EAAE,MAAM;IAMpB;;OAEG;IACH,eAAe,CAAC,OAAO,EAAE,gBAAgB,GAAG,IAAI;IAIhD;;OAEG;IACH,KAAK,IAAI,IAAI;IAOP,GAAG,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IA8B1C,OAAO,CAAC,WAAW;IA0BZ,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,cAAc,CAAC,WAAW,EAAE,IAAI,EAAE,OAAO,CAAC;IAmL5E;;OAEG;IACH,OAAO,CAAC,iBAAiB;IAiCzB,OAAO,CAAC,sBAAsB;IAW9B,OAAO,CAAC,wBAAwB;IAYhC,OAAO,CAAC,kBAAkB;IAwE1B,OAAO,CAAC,UAAU;IAwFlB,OAAO,CAAC,gBAAgB;IAYxB,OAAO,CAAC,iBAAiB;IAYzB,OAAO,CAAC,WAAW;IAanB,OAAO,CAAC,kBAAkB;IAO1B,OAAO,CAAC,oBAAoB;CAO7B"}
|
package/dist/index-node.js
CHANGED
|
@@ -829,9 +829,7 @@ class ClaudeRunner {
|
|
|
829
829
|
"stream-json",
|
|
830
830
|
"--include-partial-messages",
|
|
831
831
|
"--model",
|
|
832
|
-
this.model
|
|
833
|
-
"--settings",
|
|
834
|
-
SANDBOX_SETTINGS
|
|
832
|
+
this.model
|
|
835
833
|
];
|
|
836
834
|
const env = getAugmentedEnv({
|
|
837
835
|
FORCE_COLOR: "1",
|
|
@@ -1080,9 +1078,7 @@ class ClaudeRunner {
|
|
|
1080
1078
|
"stream-json",
|
|
1081
1079
|
"--include-partial-messages",
|
|
1082
1080
|
"--model",
|
|
1083
|
-
this.model
|
|
1084
|
-
"--settings",
|
|
1085
|
-
SANDBOX_SETTINGS
|
|
1081
|
+
this.model
|
|
1086
1082
|
];
|
|
1087
1083
|
const env = getAugmentedEnv({
|
|
1088
1084
|
FORCE_COLOR: "1",
|
|
@@ -1184,23 +1180,13 @@ ${c.primary("[Claude]")} ${c.bold(`Running ${content_block.name}...`)}
|
|
|
1184
1180
|
return new Error(message);
|
|
1185
1181
|
}
|
|
1186
1182
|
}
|
|
1187
|
-
var import_node_child_process, import_node_path3,
|
|
1183
|
+
var import_node_child_process, import_node_path3, DEFAULT_TIMEOUT_MS;
|
|
1188
1184
|
var init_claude_runner = __esm(() => {
|
|
1189
1185
|
init_config();
|
|
1190
1186
|
init_colors();
|
|
1191
1187
|
init_resolve_bin();
|
|
1192
1188
|
import_node_child_process = require("node:child_process");
|
|
1193
1189
|
import_node_path3 = require("node:path");
|
|
1194
|
-
SANDBOX_SETTINGS = JSON.stringify({
|
|
1195
|
-
permissions: {
|
|
1196
|
-
deny: ["Read(../**)", "Edit(../**)"]
|
|
1197
|
-
},
|
|
1198
|
-
sandbox: {
|
|
1199
|
-
enabled: true,
|
|
1200
|
-
autoAllow: true,
|
|
1201
|
-
allowUnsandboxedCommands: false
|
|
1202
|
-
}
|
|
1203
|
-
});
|
|
1204
1190
|
DEFAULT_TIMEOUT_MS = 60 * 60 * 1000;
|
|
1205
1191
|
});
|
|
1206
1192
|
|
|
@@ -2963,9 +2949,6 @@ function extractJsonFromLLMOutput(raw) {
|
|
|
2963
2949
|
if (codeBlockMatch) {
|
|
2964
2950
|
return codeBlockMatch[1]?.trim() || "";
|
|
2965
2951
|
}
|
|
2966
|
-
if (trimmed.startsWith("{")) {
|
|
2967
|
-
return trimmed;
|
|
2968
|
-
}
|
|
2969
2952
|
const startIdx = trimmed.indexOf("{");
|
|
2970
2953
|
if (startIdx === -1) {
|
|
2971
2954
|
return trimmed;
|
|
@@ -2979,19 +2962,19 @@ function extractJsonFromLLMOutput(raw) {
|
|
|
2979
2962
|
escaped = false;
|
|
2980
2963
|
continue;
|
|
2981
2964
|
}
|
|
2982
|
-
if (
|
|
2983
|
-
|
|
2965
|
+
if (inString) {
|
|
2966
|
+
if (ch === "\\") {
|
|
2967
|
+
escaped = true;
|
|
2968
|
+
} else if (ch === '"') {
|
|
2969
|
+
inString = false;
|
|
2970
|
+
}
|
|
2984
2971
|
continue;
|
|
2985
2972
|
}
|
|
2986
2973
|
if (ch === '"') {
|
|
2987
|
-
inString =
|
|
2988
|
-
|
|
2989
|
-
}
|
|
2990
|
-
if (inString)
|
|
2991
|
-
continue;
|
|
2992
|
-
if (ch === "{")
|
|
2974
|
+
inString = true;
|
|
2975
|
+
} else if (ch === "{") {
|
|
2993
2976
|
depth++;
|
|
2994
|
-
else if (ch === "}") {
|
|
2977
|
+
} else if (ch === "}") {
|
|
2995
2978
|
depth--;
|
|
2996
2979
|
if (depth === 0) {
|
|
2997
2980
|
return trimmed.slice(startIdx, i + 1);
|
|
@@ -4842,7 +4825,14 @@ function plannedTasksToCreatePayloads(plan, sprintId) {
|
|
|
4842
4825
|
}
|
|
4843
4826
|
function parseSprintPlanFromAI(raw, directive) {
|
|
4844
4827
|
const jsonStr = extractJsonFromLLMOutput(raw);
|
|
4845
|
-
let parsed
|
|
4828
|
+
let parsed;
|
|
4829
|
+
try {
|
|
4830
|
+
parsed = JSON.parse(jsonStr);
|
|
4831
|
+
} catch (err) {
|
|
4832
|
+
const preview = jsonStr.slice(0, 200);
|
|
4833
|
+
throw new Error(`Failed to parse sprint plan JSON: ${err instanceof Error ? err.message : String(err)}
|
|
4834
|
+
Extracted JSON preview: ${preview}`);
|
|
4835
|
+
}
|
|
4846
4836
|
if (parsed.revisedPlan) {
|
|
4847
4837
|
parsed = parsed.revisedPlan;
|
|
4848
4838
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sprint-plan.d.ts","sourceRoot":"","sources":["../../src/planning/sprint-plan.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,YAAY,EACjB,KAAK,UAAU,EACf,KAAK,YAAY,EAElB,MAAM,iBAAiB,CAAC;AAGzB,MAAM,WAAW,WAAW;IAC1B,iDAAiD;IACjD,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,YAAY,CAAC;IAC3B,QAAQ,EAAE,YAAY,CAAC;IACvB,2D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GAAG,EAAE,MAAM,GAAG,MAAM,
|
|
1
|
+
{"version":3,"file":"json-extractor.d.ts","sourceRoot":"","sources":["../../src/utils/json-extractor.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,wBAAgB,wBAAwB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAmD5D"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@locusai/sdk",
|
|
3
|
-
"version": "0.11.
|
|
3
|
+
"version": "0.11.8",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./src/index.ts",
|
|
6
6
|
"types": "./src/index.ts",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"clean": "rm -rf node_modules"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@locusai/shared": "^0.11.
|
|
33
|
+
"@locusai/shared": "^0.11.8",
|
|
34
34
|
"axios": "^1.13.2",
|
|
35
35
|
"events": "^3.3.0",
|
|
36
36
|
"globby": "^14.0.2"
|