@morphllm/morphsdk 0.2.99 → 0.2.101
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/{chunk-YZ5NCWO2.js → chunk-3R7IF4U5.js} +2 -2
- package/dist/{chunk-QJP62BXH.js → chunk-5VVF4NH6.js} +13 -4
- package/dist/chunk-5VVF4NH6.js.map +1 -0
- package/dist/{chunk-TSENDJQI.js → chunk-IP7OGZMD.js} +2 -2
- package/dist/{chunk-R7IQWNSA.js → chunk-TIPPVPZV.js} +2 -2
- package/dist/{chunk-KTFRQBHZ.js → chunk-ZMQI7MNC.js} +2 -2
- package/dist/client.cjs +12 -3
- package/dist/client.cjs.map +1 -1
- package/dist/client.js +2 -2
- package/dist/index.cjs +12 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +2 -2
- package/dist/tools/browser/anthropic.cjs +2 -1
- package/dist/tools/browser/anthropic.cjs.map +1 -1
- package/dist/tools/browser/anthropic.js +2 -2
- package/dist/tools/browser/core.cjs +12 -3
- package/dist/tools/browser/core.cjs.map +1 -1
- package/dist/tools/browser/core.js +1 -1
- package/dist/tools/browser/index.cjs +12 -3
- package/dist/tools/browser/index.cjs.map +1 -1
- package/dist/tools/browser/index.js +4 -4
- package/dist/tools/browser/openai.cjs +2 -1
- package/dist/tools/browser/openai.cjs.map +1 -1
- package/dist/tools/browser/openai.js +2 -2
- package/dist/tools/browser/types.cjs.map +1 -1
- package/dist/tools/browser/types.d.ts +12 -1
- package/dist/tools/browser/vercel.cjs +2 -1
- package/dist/tools/browser/vercel.cjs.map +1 -1
- package/dist/tools/browser/vercel.js +2 -2
- package/package.json +1 -1
- package/dist/chunk-QJP62BXH.js.map +0 -1
- /package/dist/{chunk-YZ5NCWO2.js.map → chunk-3R7IF4U5.js.map} +0 -0
- /package/dist/{chunk-TSENDJQI.js.map → chunk-IP7OGZMD.js.map} +0 -0
- /package/dist/{chunk-R7IQWNSA.js.map → chunk-TIPPVPZV.js.map} +0 -0
- /package/dist/{chunk-KTFRQBHZ.js.map → chunk-ZMQI7MNC.js.map} +0 -0
package/dist/client.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
MorphClient
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-ZMQI7MNC.js";
|
|
4
4
|
import "./chunk-OTPYEYMZ.js";
|
|
5
5
|
import "./chunk-AIXF4GQC.js";
|
|
6
6
|
import "./chunk-L5WXPMCH.js";
|
|
@@ -27,7 +27,7 @@ import "./chunk-7UYDS6OX.js";
|
|
|
27
27
|
import "./chunk-BKIM7SNY.js";
|
|
28
28
|
import "./chunk-CKTA4AXM.js";
|
|
29
29
|
import "./chunk-63WE2C5R.js";
|
|
30
|
-
import "./chunk-
|
|
30
|
+
import "./chunk-5VVF4NH6.js";
|
|
31
31
|
import "./chunk-SI2CKRKJ.js";
|
|
32
32
|
import "./chunk-2AMEQAO2.js";
|
|
33
33
|
import "./chunk-2VERUKO2.js";
|
package/dist/index.cjs
CHANGED
|
@@ -1132,8 +1132,14 @@ var BrowserClient = class {
|
|
|
1132
1132
|
async createTask(input) {
|
|
1133
1133
|
const apiUrl = this.config.apiUrl || DEFAULT_CONFIG2.apiUrl;
|
|
1134
1134
|
const debug = this.config.debug || false;
|
|
1135
|
+
const hasTask = typeof input.task === "string" && input.task.trim().length > 0;
|
|
1136
|
+
const hasDiff = typeof input.diff === "string" && input.diff.trim().length > 0;
|
|
1137
|
+
if (!hasTask && !hasDiff) {
|
|
1138
|
+
throw new Error('Browser task requires either "task" (natural language) or "diff" (PR-review planning)');
|
|
1139
|
+
}
|
|
1135
1140
|
if (debug) {
|
|
1136
|
-
|
|
1141
|
+
const preview = (input.task ?? "").slice(0, 60);
|
|
1142
|
+
console.log(`[Browser] createTask: "${preview}..." url=${input.url || "none"}`);
|
|
1137
1143
|
console.log(`[Browser] Calling async endpoint: ${apiUrl}/browser-task/async`);
|
|
1138
1144
|
}
|
|
1139
1145
|
const headers = { "Content-Type": "application/json" };
|
|
@@ -1143,6 +1149,7 @@ var BrowserClient = class {
|
|
|
1143
1149
|
headers,
|
|
1144
1150
|
body: JSON.stringify({
|
|
1145
1151
|
task: input.task,
|
|
1152
|
+
diff: input.diff,
|
|
1146
1153
|
url: input.url,
|
|
1147
1154
|
max_steps: input.maxSteps ?? 10,
|
|
1148
1155
|
model: input.model ?? "morph-computer-use-v0",
|
|
@@ -1158,7 +1165,8 @@ var BrowserClient = class {
|
|
|
1158
1165
|
allow_resizing: input.allowResizing ?? false,
|
|
1159
1166
|
structured_output: "schema" in input ? stringifyStructuredOutput(input.schema) : void 0,
|
|
1160
1167
|
auth: input.auth,
|
|
1161
|
-
profile_id: input.profileId
|
|
1168
|
+
profile_id: input.profileId,
|
|
1169
|
+
force_query_params: input.forceQueryParams
|
|
1162
1170
|
})
|
|
1163
1171
|
});
|
|
1164
1172
|
if (!response.ok) {
|
|
@@ -1259,7 +1267,8 @@ async function executeBrowserTask(input, config = {}) {
|
|
|
1259
1267
|
allow_resizing: input.allowResizing ?? false,
|
|
1260
1268
|
structured_output: input.structuredOutput,
|
|
1261
1269
|
auth: input.auth,
|
|
1262
|
-
profile_id: input.profileId
|
|
1270
|
+
profile_id: input.profileId,
|
|
1271
|
+
force_query_params: input.forceQueryParams
|
|
1263
1272
|
})
|
|
1264
1273
|
},
|
|
1265
1274
|
config.retryConfig
|