@ycodium-ai/agent-fake 0.2.2898 → 0.2.2900
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/index.js +7 -0
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -337,6 +337,11 @@ var parseReplyText = (input) => {
|
|
|
337
337
|
const replyText = envelope?.config?.replyText;
|
|
338
338
|
return typeof replyText === "string" && replyText.trim() !== "" ? replyText : FAKE_ASSISTANT_TEXT;
|
|
339
339
|
};
|
|
340
|
+
var parseFailStartSession = (input) => {
|
|
341
|
+
const envelope = input;
|
|
342
|
+
const reason = envelope?.config?.failStartSession;
|
|
343
|
+
return typeof reason === "string" && reason.trim() !== "" ? reason : void 0;
|
|
344
|
+
};
|
|
340
345
|
var FAKE_MODELS = [
|
|
341
346
|
{ slug: "fake", name: "Fake", isDefault: true },
|
|
342
347
|
{ slug: "fake-large", name: "Fake Large" }
|
|
@@ -346,6 +351,7 @@ var createFakeInstance = (config, host) => {
|
|
|
346
351
|
const threads = /* @__PURE__ */ new Map();
|
|
347
352
|
const script = parseScript(config);
|
|
348
353
|
const replyText = parseReplyText(config);
|
|
354
|
+
const failStartSession = parseFailStartSession(config);
|
|
349
355
|
const streamOptions = parseStreamOptions(config);
|
|
350
356
|
const pendingDecisions = /* @__PURE__ */ new Map();
|
|
351
357
|
let seq = 0;
|
|
@@ -609,6 +615,7 @@ var createFakeInstance = (config, host) => {
|
|
|
609
615
|
startSession: async (input, signal) => {
|
|
610
616
|
if (disposed) throw new Error("instance disposed");
|
|
611
617
|
if (signal?.aborted) throw new Error("aborted");
|
|
618
|
+
if (failStartSession !== void 0) throw new Error(failStartSession);
|
|
612
619
|
const cwd = input.cwd ?? host.workspacePath(input.threadId);
|
|
613
620
|
if (cwd.trim() === "") throw new Error("workspace path missing");
|
|
614
621
|
const createdAt = now();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ycodium-ai/agent-fake",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.2900",
|
|
4
4
|
"description": "Minimal fake executor for plugin authors and host orchestration tests.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ycodium",
|
|
@@ -21,8 +21,8 @@
|
|
|
21
21
|
"@types/node": "24.12.4",
|
|
22
22
|
"esbuild": "0.28.1",
|
|
23
23
|
"vite-plus": "0.2.2",
|
|
24
|
-
"ycodium-
|
|
25
|
-
"
|
|
24
|
+
"@ycodium-ai/plugin-api": "0.2.2900",
|
|
25
|
+
"ycodium-executor-testing": "0.0.0"
|
|
26
26
|
},
|
|
27
27
|
"ycodium": {
|
|
28
28
|
"plugin": "./dist/index.js",
|