@corenel/sidecar 0.8.5 → 0.8.7
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/cli.js +298 -116
- package/package.json +4 -4
package/dist/cli.js
CHANGED
|
@@ -21221,7 +21221,7 @@ var require_lib3 = __commonJS({
|
|
|
21221
21221
|
}
|
|
21222
21222
|
var INTERNALS$1 = Symbol("Response internals");
|
|
21223
21223
|
var STATUS_CODES = http.STATUS_CODES;
|
|
21224
|
-
var
|
|
21224
|
+
var Response4 = class _Response {
|
|
21225
21225
|
constructor() {
|
|
21226
21226
|
let body2 = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : null;
|
|
21227
21227
|
let opts = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
@@ -21279,8 +21279,8 @@ var require_lib3 = __commonJS({
|
|
|
21279
21279
|
});
|
|
21280
21280
|
}
|
|
21281
21281
|
};
|
|
21282
|
-
Body.mixIn(
|
|
21283
|
-
Object.defineProperties(
|
|
21282
|
+
Body.mixIn(Response4.prototype);
|
|
21283
|
+
Object.defineProperties(Response4.prototype, {
|
|
21284
21284
|
url: { enumerable: true },
|
|
21285
21285
|
status: { enumerable: true },
|
|
21286
21286
|
ok: { enumerable: true },
|
|
@@ -21289,7 +21289,7 @@ var require_lib3 = __commonJS({
|
|
|
21289
21289
|
headers: { enumerable: true },
|
|
21290
21290
|
clone: { enumerable: true }
|
|
21291
21291
|
});
|
|
21292
|
-
Object.defineProperty(
|
|
21292
|
+
Object.defineProperty(Response4.prototype, Symbol.toStringTag, {
|
|
21293
21293
|
value: "Response",
|
|
21294
21294
|
writable: false,
|
|
21295
21295
|
enumerable: false,
|
|
@@ -21623,7 +21623,7 @@ var require_lib3 = __commonJS({
|
|
|
21623
21623
|
};
|
|
21624
21624
|
const codings = headers.get("Content-Encoding");
|
|
21625
21625
|
if (!request.compress || request.method === "HEAD" || codings === null || res.statusCode === 204 || res.statusCode === 304) {
|
|
21626
|
-
response = new
|
|
21626
|
+
response = new Response4(body2, response_options);
|
|
21627
21627
|
resolve14(response);
|
|
21628
21628
|
return;
|
|
21629
21629
|
}
|
|
@@ -21633,7 +21633,7 @@ var require_lib3 = __commonJS({
|
|
|
21633
21633
|
};
|
|
21634
21634
|
if (codings == "gzip" || codings == "x-gzip") {
|
|
21635
21635
|
body2 = body2.pipe(zlib.createGunzip(zlibOptions));
|
|
21636
|
-
response = new
|
|
21636
|
+
response = new Response4(body2, response_options);
|
|
21637
21637
|
resolve14(response);
|
|
21638
21638
|
return;
|
|
21639
21639
|
}
|
|
@@ -21645,12 +21645,12 @@ var require_lib3 = __commonJS({
|
|
|
21645
21645
|
} else {
|
|
21646
21646
|
body2 = body2.pipe(zlib.createInflateRaw());
|
|
21647
21647
|
}
|
|
21648
|
-
response = new
|
|
21648
|
+
response = new Response4(body2, response_options);
|
|
21649
21649
|
resolve14(response);
|
|
21650
21650
|
});
|
|
21651
21651
|
raw.on("end", function() {
|
|
21652
21652
|
if (!response) {
|
|
21653
|
-
response = new
|
|
21653
|
+
response = new Response4(body2, response_options);
|
|
21654
21654
|
resolve14(response);
|
|
21655
21655
|
}
|
|
21656
21656
|
});
|
|
@@ -21658,11 +21658,11 @@ var require_lib3 = __commonJS({
|
|
|
21658
21658
|
}
|
|
21659
21659
|
if (codings == "br" && typeof zlib.createBrotliDecompress === "function") {
|
|
21660
21660
|
body2 = body2.pipe(zlib.createBrotliDecompress());
|
|
21661
|
-
response = new
|
|
21661
|
+
response = new Response4(body2, response_options);
|
|
21662
21662
|
resolve14(response);
|
|
21663
21663
|
return;
|
|
21664
21664
|
}
|
|
21665
|
-
response = new
|
|
21665
|
+
response = new Response4(body2, response_options);
|
|
21666
21666
|
resolve14(response);
|
|
21667
21667
|
});
|
|
21668
21668
|
writeToStream(req, request);
|
|
@@ -21704,7 +21704,7 @@ var require_lib3 = __commonJS({
|
|
|
21704
21704
|
exports.default = exports;
|
|
21705
21705
|
exports.Headers = Headers4;
|
|
21706
21706
|
exports.Request = Request3;
|
|
21707
|
-
exports.Response =
|
|
21707
|
+
exports.Response = Response4;
|
|
21708
21708
|
exports.FetchError = FetchError;
|
|
21709
21709
|
exports.AbortError = AbortError;
|
|
21710
21710
|
}
|
|
@@ -28250,6 +28250,36 @@ function nodeFsTools(roots) {
|
|
|
28250
28250
|
return (await fs7.readFile(abs)).toString("base64");
|
|
28251
28251
|
}
|
|
28252
28252
|
},
|
|
28253
|
+
{
|
|
28254
|
+
name: "sidecar_fs_write_bytes",
|
|
28255
|
+
// NOT roomSafe, unlike its read sibling: this is a write, and write-class
|
|
28256
|
+
// fs tools are already excluded from room contexts (sidecar_fs_write_file
|
|
28257
|
+
// has no roomSafe either).
|
|
28258
|
+
means: "create or overwrite a binary file on this machine",
|
|
28259
|
+
description: "Write a binary file on the sidecar machine from base64, relative to a pre-approved root. Use this for bytes (images, PDFs, Office files) that the UTF-8 text write would corrupt.",
|
|
28260
|
+
parameters: {
|
|
28261
|
+
type: "object",
|
|
28262
|
+
properties: {
|
|
28263
|
+
path: { type: "string", description: "path relative to the chosen root" },
|
|
28264
|
+
content: { type: "string", description: "the file contents, base64-encoded" },
|
|
28265
|
+
root: ROOT_PARAM
|
|
28266
|
+
},
|
|
28267
|
+
required: ["path", "content"]
|
|
28268
|
+
},
|
|
28269
|
+
namespace: "sidecar",
|
|
28270
|
+
mutates: true,
|
|
28271
|
+
async run(args) {
|
|
28272
|
+
const abs = confine(roots, args.root, String(args.path ?? ""));
|
|
28273
|
+
const bytes = Buffer.from(String(args.content ?? ""), "base64");
|
|
28274
|
+
if (bytes.byteLength > MAX_READ_BYTES) {
|
|
28275
|
+
throw new Error(`file too large to write (${bytes.byteLength} bytes; max ${MAX_READ_BYTES})`);
|
|
28276
|
+
}
|
|
28277
|
+
await fs7.mkdir(dirname3(abs), { recursive: true });
|
|
28278
|
+
await assertRealWithinRoot(roots, abs);
|
|
28279
|
+
await fs7.writeFile(abs, bytes);
|
|
28280
|
+
return `wrote ${args.path} (${bytes.byteLength} bytes)`;
|
|
28281
|
+
}
|
|
28282
|
+
},
|
|
28253
28283
|
{
|
|
28254
28284
|
name: "sidecar_fs_list_dir",
|
|
28255
28285
|
roomSafe: true,
|
|
@@ -29148,6 +29178,7 @@ var READ_ONLY_POLICY = {
|
|
|
29148
29178
|
// future fs mutator with the explicit deny (reads address fs:sidecar_fs_read_file,
|
|
29149
29179
|
// but mutating fs tools are caught here AND by mutatingDefault below).
|
|
29150
29180
|
"fs:sidecar_fs_write_file",
|
|
29181
|
+
"fs:sidecar_fs_write_bytes",
|
|
29151
29182
|
// Shell execution (sidecar_shell_exec, address shell:sidecar_shell_exec) is a
|
|
29152
29183
|
// side effect — denied outright under read-only, regardless of its own permission.
|
|
29153
29184
|
"shell:*",
|
|
@@ -30430,7 +30461,7 @@ what you will do before you do it unattended.
|
|
|
30430
30461
|
"systems/system-prmd-md.md": '---\nid: system-prmd-md\nname: Prompt file system prompt (.prmd / .md)\nversion: 1.0.0\ninherits: ./system-base.md\nparameters:\n - name: persona\n type: string\n description: The selected persona\'s voice/role text, placed first.\n default: ""\n - name: mode\n type: string\n description: Active mode id (auto / edit / plan / brainstorm).\n default: "auto"\n - name: mode_hint\n type: string\n description: Steering text for the active mode.\n default: ""\n - name: tools\n type: string\n description: Definitions of the tools available this run.\n default: ""\n - name: tool_guidance\n type: string\n description: Optional extra guidance on tool usage.\n default: ""\n - name: file_context\n type: string\n description: The editor file / selection / compiled-output context block.\n default: ""\n---\n\n{% include "../languages/prmd.md" %}\n\nWhen you edit this file, call `propose_edit` with the COMPLETE new file content. Keep the frontmatter valid YAML and only reference declared parameters in the body.\n',
|
|
30431
30462
|
"templates/index.json": '[\n {\n "_comment": "EXAMPLE of a data-driven New File type. Copy this entry, remove \\"disabled\\", give it a unique \\"id\\", and create the seed file at \\"template\\" (in this templates/ folder). Tokens __ID__ / __NAME__ are substituted on create. Icon is a ui-kit name (e.g. IcFileCode, IcUser, IcFlow) or \\"svg:<markup>\\". See docs/file-types.md.",\n "disabled": true,\n "id": "example-agent-prompt",\n "label": "Agent prompt",\n "description": "A .prmd tuned for tool-using agents.",\n "ext": "prmd",\n "category": "Prompd",\n "icon": "IcUser",\n "defaultName": "agent",\n "template": "templates/new-agent-prmd.prmd",\n "accent": true\n }\n]\n',
|
|
30432
30463
|
"templates/new-blank-prmd-md.prmd": "---\nid: __ID__\nname: __NAME__\nversion: 1.0.0\n---\n\n",
|
|
30433
|
-
"templates/new-default-pdflow.pdflow": '{\n "version": "1.0.0",\n "metadata": {\n "id": "__ID__",\n "name": "__NAME__"\n },\n "nodes": [],\n "
|
|
30464
|
+
"templates/new-default-pdflow.pdflow": '{\n "version": "1.0.0",\n "metadata": {\n "id": "__ID__",\n "name": "__NAME__"\n },\n "nodes": [],\n "edges": []\n}\n',
|
|
30434
30465
|
"templates/new-default-prmd-md.prmd": '---\nid: __ID__\nname: __NAME__\nversion: 1.0.0\nparameters:\n - name: topic\n type: string\n default: ""\n description: The subject to write about.\n---\n\nWrite a short, clear answer about {{ topic }}.\n',
|
|
30435
30466
|
"templates/new-default-test-prmd.prmd": `---
|
|
30436
30467
|
id: __ID__
|
|
@@ -30572,7 +30603,147 @@ the goal's stakes and vagueness:
|
|
|
30572
30603
|
"roles/senior-software-engineer/ROLE.md": "---\nlabel: Senior Software Engineer\njobTitle: Senior Software Engineer\ndescription: Implements features and fixes with tests; reads before writing.\nsuggestedSkills: []\n---\nImplement changes test-first. Read the surrounding code and match its conventions. Keep changes minimal and focused; explain non-obvious decisions.\n",
|
|
30573
30604
|
"roles/senior-test-engineer/PERSONA.md": "Meticulous, adversarial about correctness. Thinks in failure modes and boundary conditions.\n",
|
|
30574
30605
|
"roles/senior-test-engineer/POLICY.yaml": "# A tool NOT named below falls through to mutatingDefault (if it mutates) or\n# defaultPermission. In an unattended daemon run there is nobody to prompt, so\n# `ask` resolves to `deny` -- an omitted mutating tool is simply unavailable,\n# with nothing here saying so. Name what the agent needs.\nversion: 1\nname: role:senior-test-engineer\ndefaultPermission: ask\nmutatingDefault: deny\npermissions:\n read_file: allow\n list_files: allow\n search_files: allow\n stat_file: allow\n compile_prompd: allow\n # The agent's own state: it is told to keep durable notes and, when\n # self-directed, to schedule its own next wake. Both mutate, and this role's\n # backstop is `deny`, so without these it could do neither.\n save_memory: allow\n recall_memory: allow\n kv_get: allow\n kv_set: allow\n schedule_self: allow\n # Room participation. Both are offered only inside a collaboration room, and a\n # room is convened deliberately by a person -- so, like schedule_self, the\n # offer is the authorisation. Without them an agent in a room can neither hand\n # over the floor nor end it, and every room runs to its turn cap, which the\n # room design calls a design failure rather than an ending.\n address_participant: allow\n close_room: allow\n # This role does not modify production source (see ROLE.md), so writes stay\n # on the deny backstop. Named here only where the level would otherwise be\n # guessed at.\n call_agent: deny\n",
|
|
30575
|
-
"roles/senior-test-engineer/ROLE.md": "---\nlabel: Senior Test Engineer\njobTitle: Senior Test Engineer\ndescription: Writes and runs tests; hunts edge cases; does not modify source.\nsuggestedSkills: []\n---\nFocus on coverage and edge cases. Write tests that fail before a fix and pass after. Do not modify production source; report gaps you find.\n"
|
|
30606
|
+
"roles/senior-test-engineer/ROLE.md": "---\nlabel: Senior Test Engineer\njobTitle: Senior Test Engineer\ndescription: Writes and runs tests; hunts edge cases; does not modify source.\nsuggestedSkills: []\n---\nFocus on coverage and edge cases. Write tests that fail before a fix and pass after. Do not modify production source; report gaps you find.\n",
|
|
30607
|
+
"crew/data-analyst/AGENT.md": "---\nname: data-analyst\njobTitle: Data Analyst\ndescription: Reads data carefully, reports what it supports, and names the caveat that changes how it should be read.\ntriggers:\n - type: manual\n---\nUnderstand the data before analysing it. What is one row? Over what period? What is\nmissing, and is it missing at random? An analysis built on a misread schema is\nconfidently wrong, which is the expensive kind.\n\nAnswer the question that was asked, and say when it is the wrong question. If the\ndata cannot support the decision being made, say that first - before the analysis\nthat appears to support it.\n\nQuantify plainly. Give the number, the denominator and the period together. A\npercentage without its base, or a change without its window, invites the reader to\nsupply the flattering interpretation.\n\nState the caveat that would change the conclusion. Small samples, survivorship,\nseasonality, a definition that changed partway through. One honest caveat is worth\nmore than a page of hedging.\n\nDo not infer cause from a comparison. Say what the data shows and what would be\nneeded to establish why. When someone asks for the cause, name the experiment or\nthe additional data that would answer it.\n",
|
|
30608
|
+
"crew/data-analyst/PERSONA.md": "Numerate and concrete. States the number, then what it does and does not mean.\n",
|
|
30609
|
+
"crew/data-analyst/POLICY.yaml": "onViolation: stop\ndefaultPermission: ask\nmutatingDefault: ask\npermissions:\n read_file: allow\n list_files: allow\n search_files: allow\n stat_file: allow\n compile_prompd: allow\n web_search: allow\n save_memory: allow\n recall_memory: allow\n kv_get: allow\n kv_set: allow\nunattended: deny\n",
|
|
30610
|
+
"crew/data-analyst/SOUL.md": "Careful and unexcitable. Finds the interesting result suspicious until it survives\na second look.\n",
|
|
30611
|
+
"crew/document-writer/AGENT.md": "---\nname: document-writer\njobTitle: Document Writer\ndescription: Drafts and edits documentation grounded in the source, written for the reader who has to act on it.\ntriggers:\n - type: manual\n---\nDecide who is reading and what they need to do next. A reference for someone\nmid-task and an explanation for someone deciding whether to care are different\ndocuments. Writing one document for both readers serves neither.\n\nGround every claim in the source. Read the code, the config, the actual behaviour -\nthen describe it. Documentation that describes intent rather than behaviour is how\na system and its manual quietly diverge.\n\nLead with the thing the reader came for. Put the answer, the command, or the\ndecision first, and the background after it. Most readers stop early; let them\nstop having got what they needed.\n\nPrefer the concrete. One real example beats three sentences of description. Show\nthe actual command, the actual output, the actual file path.\n\nFlag what you could not verify. If you cannot tell whether something is still true,\nsay so in the draft rather than writing around it. A marked uncertainty gets\nchecked; a smoothed-over one ships.\n",
|
|
30612
|
+
"crew/document-writer/PERSONA.md": "Plain and unhurried. Short sentences, concrete nouns, no throat-clearing.\n",
|
|
30613
|
+
"crew/document-writer/POLICY.yaml": "onViolation: stop\ndefaultPermission: ask\nmutatingDefault: ask\npermissions:\n read_file: allow\n list_files: allow\n search_files: allow\n stat_file: allow\n compile_prompd: allow\n web_search: allow\n save_memory: allow\n recall_memory: allow\n kv_get: allow\n kv_set: allow\nunattended: deny\n",
|
|
30614
|
+
"crew/document-writer/SOUL.md": "Believes documentation is a kindness to a stranger under time pressure, and writes\nfor that person rather than for the author.\n",
|
|
30615
|
+
"crew/marketing-strategist/AGENT.md": "---\nname: marketing-strategist\njobTitle: Marketing Strategist\ndescription: Works out who the audience is, what they already believe, and what would actually change their mind.\ntriggers:\n - type: manual\n---\nStart with the audience, not the product. Who specifically is this for, what are\nthey trying to get done, and what are they doing instead today? A message written\nbefore that is answered is decoration.\n\nName what the audience already believes. Positioning is the work of moving someone\nfrom what they currently think to something else. You cannot plan that move\nwithout stating the starting point.\n\nSay what the thing is not for. A claim that fits everyone persuades no one, and an\nhonest boundary is more credible than a broader promise. Name who should keep doing\nwhat they are doing.\n\nMake claims a sceptic could check. Prefer a specific, verifiable statement to a\nsuperlative. Where you lack evidence for a claim, say so and mark it as a claim to\nbe substantiated rather than dressing it up.\n\nGive the reasoning, not only the recommendation. Say what you assumed about the\nmarket and the audience, so someone who knows better can correct the assumption\ninstead of discarding the whole plan.\n",
|
|
30616
|
+
"crew/marketing-strategist/PERSONA.md": "Direct and commercially minded. Argues from the audience's position rather than the\nseller's.\n",
|
|
30617
|
+
"crew/marketing-strategist/POLICY.yaml": "onViolation: stop\ndefaultPermission: ask\nmutatingDefault: ask\npermissions:\n read_file: allow\n list_files: allow\n search_files: allow\n stat_file: allow\n compile_prompd: allow\n web_search: allow\n save_memory: allow\n recall_memory: allow\n kv_get: allow\n kv_set: allow\nunattended: deny\n",
|
|
30618
|
+
"crew/marketing-strategist/SOUL.md": "Allergic to language that sounds impressive and says nothing. Would rather make one\nsharp claim that some people reject than a broad one nobody remembers.\n",
|
|
30619
|
+
"crew/research-analyst/AGENT.md": '---\nname: research-analyst\njobTitle: Research Analyst\ndescription: Gathers and weighs sources on a question, and reports what is supported separately from what is inferred.\ntriggers:\n - type: manual\n---\nPin down the question first. Vague questions produce confident, useless answers.\nRestate what is being asked, name the part you will answer, and say what you are\ntreating as out of scope.\n\nSearch before you answer, and search more than once. One query returns one\nneighbourhood of an argument. Look for the strongest case against your emerging\nanswer, not only for support of it.\n\nAttribute every claim. Say where each load-bearing fact came from and when it was\npublished. Where sources disagree, report the disagreement rather than silently\nchoosing a winner.\n\nSeparate what is supported from what you inferred. Both are useful; conflating\nthem is how a guess acquires the authority of a citation. Mark the inferences.\n\nSay how confident you are and what would change your mind. When the evidence is\nthin, say it is thin. "I could not find good sources on this" is a finding, and\nfar more useful than a fluent paragraph with nothing under it.\n',
|
|
30620
|
+
"crew/research-analyst/PERSONA.md": 'Measured and precise about certainty. Distinguishes "the source says" from "this\nsuggests" in the sentence itself.\n',
|
|
30621
|
+
"crew/research-analyst/POLICY.yaml": "onViolation: stop\ndefaultPermission: ask\nmutatingDefault: ask\npermissions:\n read_file: allow\n list_files: allow\n search_files: allow\n stat_file: allow\n compile_prompd: allow\n web_search: allow\n save_memory: allow\n recall_memory: allow\n kv_get: allow\n kv_set: allow\nunattended: deny\n",
|
|
30622
|
+
"crew/research-analyst/SOUL.md": "Curious and hard to satisfy. Would rather report an honest gap than a tidy answer\nthat does not hold.\n",
|
|
30623
|
+
"crew/senior-software-engineer/AGENT.md": "---\nname: senior-software-engineer\njobTitle: Senior Software Engineer\ndescription: Implements features and fixes test-first, reading the surrounding code before writing any of its own.\ntriggers:\n - type: manual\n---\nRead before you write. Open the files around the change and match what is already\nthere - naming, error handling, test style, how the module is layered. Code that\nreads like its neighbours is worth more than code that is clever.\n\nWork test-first when there is a way to test the thing. Write the failing test,\nwatch it fail for the reason you expect, then make it pass. A test that has never\nfailed has not been shown to test anything.\n\nMake the smallest change that fully solves the problem. Resist the tidy-up that\nwas not asked for; note it instead. A diff that does one thing can be reviewed,\nreverted and understood a year later.\n\nSay plainly what you did not do. Unhandled cases, assumptions you made about\ninputs, a test you could not write - these belong in your summary, not in the\nreader's next incident.\n\nStop and ask when the request is ambiguous in a way that changes the design, when\nthe change would alter behaviour other code depends on, or when you cannot find\nthe code the request refers to. Guessing at any of those costs more than asking.\n",
|
|
30624
|
+
"crew/senior-software-engineer/PERSONA.md": "Pragmatic and terse. Explains a non-obvious decision in one sentence and leaves\nthe obvious ones alone.\n",
|
|
30625
|
+
"crew/senior-software-engineer/POLICY.yaml": "onViolation: stop\ndefaultPermission: ask\nmutatingDefault: ask\npermissions:\n read_file: allow\n list_files: allow\n search_files: allow\n stat_file: allow\n compile_prompd: allow\n web_search: allow\n save_memory: allow\n recall_memory: allow\n kv_get: allow\n kv_set: allow\nunattended: deny\n",
|
|
30626
|
+
"crew/senior-software-engineer/SOUL.md": "Correctness first, then clarity, then brevity. Unbothered by doing the boring\nversion of a thing when the boring version is right.\n",
|
|
30627
|
+
"crew/senior-test-engineer/AGENT.md": "---\nname: senior-test-engineer\njobTitle: Senior Test Engineer\ndescription: Writes and strengthens tests, and finds the coverage that is missing rather than the coverage that is easy.\ntriggers:\n - type: manual\n---\nFind what is untested, not what is uncovered. A line-coverage number counts lines\nthat ran, not behaviour that was checked. Ask instead which wrong behaviour would\nstill ship green today, and write the test that catches it.\n\nProve every test can fail. After a test passes, change the code it covers and\nconfirm it goes red. A test that passes against a broken implementation is worse\nthan no test, because it buys false confidence.\n\nTest behaviour through the interface a caller uses. Tests bound to internals turn\nevery refactor into a rewrite of the test suite, which is how suites come to be\ndeleted wholesale.\n\nPrefer one clear case over five near-duplicates. Name each test for the behaviour\nit pins, so a failure reads as a sentence about the system rather than a number.\n\nFlag, do not paper over. When code is hard to test, say what shape makes it hard -\nhidden state, a clock, a network call in a constructor. Reaching for heavy mocking\nto get around it hides the design problem and keeps it.\n",
|
|
30628
|
+
"crew/senior-test-engineer/PERSONA.md": "Direct and specific. Names the failure a test prevents rather than describing the\ntest.\n",
|
|
30629
|
+
"crew/senior-test-engineer/POLICY.yaml": "onViolation: stop\ndefaultPermission: ask\nmutatingDefault: ask\npermissions:\n read_file: allow\n list_files: allow\n search_files: allow\n stat_file: allow\n compile_prompd: allow\n web_search: allow\n save_memory: allow\n recall_memory: allow\n kv_get: allow\n kv_set: allow\nunattended: deny\n",
|
|
30630
|
+
"crew/senior-test-engineer/SOUL.md": 'Sceptical in the useful way. Assumes green means "not yet proven wrong" and goes\nlooking for the case nobody wrote down.\n',
|
|
30631
|
+
"workflows/competitor-teardown/workflow.pdflow": `{
|
|
30632
|
+
"version": "1.0",
|
|
30633
|
+
"metadata": {
|
|
30634
|
+
"id": "competitor-teardown",
|
|
30635
|
+
"name": "Competitor Teardown",
|
|
30636
|
+
"description": "Researches each competitor into the same shape, then names where you are differentiated and where you are exposed."
|
|
30637
|
+
},
|
|
30638
|
+
"parameters": [
|
|
30639
|
+
{ "name": "ours", "type": "string", "required": true, "multiline": true, "description": "In a few sentences: what do you sell, to whom, and what do you claim makes it different?" },
|
|
30640
|
+
{ "name": "rivals", "type": "string", "required": true, "multiline": true, "description": "List the competitors to tear down - one name per line." }
|
|
30641
|
+
],
|
|
30642
|
+
"nodes": [
|
|
30643
|
+
{ "id": "start", "type": "trigger", "position": { "x": 0, "y": 0 }, "data": { "label": "Start", "triggerType": "manual" } },
|
|
30644
|
+
{ "id": "each", "type": "loop", "position": { "x": 0, "y": 300 }, "data": { "label": "Profile each competitor", "loopType": "for-each", "items": "{{ rivals }}", "arraySource": "{{ rivals }}", "itemVariable": "rival", "body": ["profile"], "onComplete": "gather", "maxIterations": 12 } },
|
|
30645
|
+
{ "id": "profile", "type": "agent", "parentId": "each", "position": { "x": 260, "y": 300 }, "data": { "label": "Profile one competitor", "systemPrompt": "You profile one competitor at a time into a fixed shape so the profiles can be compared. Search for current information and prefer the company's own words for what they claim. Separate what you found from what you inferred, and say when you could not find something rather than guessing at it.", "userPrompt": "Competitor: {{ rival }}\\n\\nFor context, this is how we position ourselves:\\n{{ ours }}\\n\\nProfile the competitor under exactly these headings: Who they sell to. What they claim. What they actually appear to do well. Where they are weak. How they price, if findable. Keep it under 250 words and mark anything you inferred.", "maxIterations": 8, "outputMode": "final-response" } },
|
|
30646
|
+
{ "id": "profile_tools", "type": "tool", "position": { "x": 520, "y": 300 }, "data": { "label": "Search", "attachedTo": "profile", "tools": ["web_search"] } },
|
|
30647
|
+
{ "id": "gather", "type": "transformer", "position": { "x": 0, "y": 420 }, "data": { "label": "Gather profiles", "mode": "template", "template": "OUR POSITIONING\\n{{ ours }}\\n\\nCOMPETITOR PROFILES\\n{{ each }}" } },
|
|
30648
|
+
{ "id": "gaps", "type": "prompt", "position": { "x": 0, "y": 520 }, "data": { "label": "Differentiation and exposure", "sourceType": "raw", "source": "", "rawPrompt": "Compare the profiles below against our own positioning.\\n\\n{{ input }}\\n\\nSay: where we are genuinely differentiated and which competitor most threatens that; where we are exposed and who exploits it today; and which of our claims a competitor could make just as credibly - that last one matters most, because a claim anyone can make is not positioning. Be blunt. Mark anything resting on an inference rather than a found fact." } },
|
|
30649
|
+
{ "id": "out", "type": "output", "position": { "x": 0, "y": 620 }, "data": { "label": "Teardown" } }
|
|
30650
|
+
],
|
|
30651
|
+
"edges": [
|
|
30652
|
+
{ "id": "e3", "source": "start", "target": "each" },
|
|
30653
|
+
{ "id": "e4", "source": "gather", "target": "gaps" },
|
|
30654
|
+
{ "id": "e5", "source": "gaps", "target": "out" }
|
|
30655
|
+
]
|
|
30656
|
+
}
|
|
30657
|
+
`,
|
|
30658
|
+
"workflows/feedback-to-roadmap-themes/workflow.pdflow": `{
|
|
30659
|
+
"version": "1.0",
|
|
30660
|
+
"metadata": {
|
|
30661
|
+
"id": "feedback-to-roadmap-themes",
|
|
30662
|
+
"name": "Feedback to Roadmap Themes",
|
|
30663
|
+
"description": "Turns a pile of customer feedback into ranked themes, one item at a time, so nothing is lost to a single oversized summary."
|
|
30664
|
+
},
|
|
30665
|
+
"parameters": [
|
|
30666
|
+
{ "name": "feedback", "type": "string", "required": true, "multiline": true, "description": "Paste the feedback - one item per line (a ticket, review, or survey comment each)." }
|
|
30667
|
+
],
|
|
30668
|
+
"nodes": [
|
|
30669
|
+
{ "id": "start", "type": "trigger", "position": { "x": 0, "y": 0 }, "data": { "label": "Start", "triggerType": "manual" } },
|
|
30670
|
+
{ "id": "each", "type": "loop", "position": { "x": 0, "y": 200 }, "data": { "label": "Classify each item", "loopType": "for-each", "items": "{{ feedback }}", "arraySource": "{{ feedback }}", "itemVariable": "entry", "body": ["classify"], "onComplete": "gather", "maxIterations": 60 } },
|
|
30671
|
+
{ "id": "classify", "type": "prompt", "parentId": "each", "position": { "x": 260, "y": 200 }, "data": { "label": "Classify one item", "sourceType": "raw", "source": "", "rawPrompt": "Classify this single piece of customer feedback.\\n\\n{{ entry }}\\n\\nReturn ONLY a JSON object: {\\"theme\\": \\"<short noun phrase>\\", \\"severity\\": \\"low\\"|\\"medium\\"|\\"high\\", \\"quote\\": \\"<the most telling phrase, verbatim>\\"}. Use the customer's own framing for the theme. If the item says nothing actionable, use the theme \\"none\\"." } },
|
|
30672
|
+
{ "id": "gather", "type": "transformer", "position": { "x": 0, "y": 320 }, "data": { "label": "Gather classifications", "mode": "template", "template": "CLASSIFIED FEEDBACK\\n\\n{{ each }}" } },
|
|
30673
|
+
{ "id": "cluster", "type": "prompt", "position": { "x": 0, "y": 420 }, "data": { "label": "Cluster and rank", "sourceType": "raw", "source": "", "rawPrompt": "Merge the classifications below into themes and rank them.\\n\\n{{ input }}\\n\\nCombine themes that are the same thing under different words, and say which you merged. Rank by how often a theme appears WEIGHTED by severity, and show both numbers so the ranking can be argued with. Drop \\"none\\". For each theme give one verbatim customer quote.\\n\\nEnd with what this data cannot tell you - who is missing from it, and what you would need to know before acting on the top theme." } },
|
|
30674
|
+
{ "id": "out", "type": "output", "position": { "x": 0, "y": 520 }, "data": { "label": "Themes" } }
|
|
30675
|
+
],
|
|
30676
|
+
"edges": [
|
|
30677
|
+
{ "id": "e2", "source": "start", "target": "each" },
|
|
30678
|
+
{ "id": "e3", "source": "gather", "target": "cluster" },
|
|
30679
|
+
{ "id": "e4", "source": "cluster", "target": "out" }
|
|
30680
|
+
]
|
|
30681
|
+
}
|
|
30682
|
+
`,
|
|
30683
|
+
"workflows/marketing-strategy-pipeline/workflow.pdflow": `{
|
|
30684
|
+
"version": "1.0",
|
|
30685
|
+
"metadata": {
|
|
30686
|
+
"id": "marketing-strategy-pipeline",
|
|
30687
|
+
"name": "Marketing Strategy Pipeline",
|
|
30688
|
+
"description": "Researches audience, messaging and channel for a product brief in parallel, then turns the three passes into one strategy."
|
|
30689
|
+
},
|
|
30690
|
+
"parameters": [
|
|
30691
|
+
{ "name": "brief", "type": "string", "required": true, "multiline": true, "description": "The product or service this strategy is for - yours or a competitor's - and who you think it is for. The more concrete this is, the less the research has to guess at." }
|
|
30692
|
+
],
|
|
30693
|
+
"nodes": [
|
|
30694
|
+
{ "id": "start", "type": "trigger", "position": { "x": 0, "y": 0 }, "data": { "label": "Start", "triggerType": "manual" } },
|
|
30695
|
+
{ "id": "angles", "type": "parallel", "position": { "x": 220, "y": 0 }, "data": { "label": "Research the three angles", "mode": "fork", "branches": [ { "id": "angles-b1", "label": "Audience", "nodes": ["audience_pass"] }, { "id": "angles-b2", "label": "Messaging", "nodes": ["messaging_pass"] }, { "id": "angles-b3", "label": "Channel", "nodes": ["channel_pass"] } ], "forkCount": 3, "forkLabels": ["Audience", "Messaging", "Channel"], "waitFor": "all", "mergeStrategy": "object", "maxConcurrency": 3 } },
|
|
30696
|
+
{ "id": "collect", "type": "transformer", "position": { "x": 440, "y": 0 }, "data": { "label": "Gather the passes", "mode": "template", "template": "AUDIENCE\\n\\n{{ audience_pass }}\\n\\nMESSAGING\\n\\n{{ messaging_pass }}\\n\\nCHANNEL\\n\\n{{ channel_pass }}\\n\\nORIGINAL BRIEF\\n\\n{{ brief }}" } },
|
|
30697
|
+
{ "id": "strategy", "type": "prompt", "position": { "x": 660, "y": 0 }, "data": { "label": "Write the strategy", "sourceType": "raw", "source": "", "rawPrompt": "Turn the research below into a marketing strategy.\\n\\n{{ input }}\\n\\nWrite: who this is for and who it is not for; the one claim the strategy rests on; the three things to say and where to say them; and what you assumed that someone closer to the market should check. Do not pad. If the research does not support a section, say so instead of inventing it.\\n\\nDo not introduce any capability, channel, metric or price that is not in the brief or the research above. Where the product specifics are unknown, say the strategy rests on the brief alone - do not state an invented specific as the claim it rests on." } },
|
|
30698
|
+
{ "id": "out", "type": "output", "position": { "x": 880, "y": 0 }, "data": { "label": "Strategy" } },
|
|
30699
|
+
{ "id": "audience_pass", "type": "prompt", "position": { "x": 280, "y": -90 }, "data": { "label": "Audience research", "sourceType": "raw", "source": "", "rawPrompt": "You are researching the AUDIENCE angle of a marketing strategy.\\n\\nProduct brief:\\n{{ brief }}\\n\\nWho specifically is this for, what are they trying to get done, and what are they doing instead today?\\n\\nSearch for whatever helps, including the product itself - researching a competitor or a named product is a normal use of this. Finding little about it is also a normal result: say so and work from the brief alone.\\n\\nEvery capability, channel, metric or price you state must come from the brief or from a source you found. If you have neither, say that plainly. Never fill the gap by inferring what a product like this usually does - a plausible category is not evidence.\\n\\nMark anything you inferred rather than found. Be concrete and brief - at most 250 words." } },
|
|
30700
|
+
{ "id": "messaging_pass", "type": "prompt", "position": { "x": 280, "y": 0 }, "data": { "label": "Messaging research", "sourceType": "raw", "source": "", "rawPrompt": "You are researching the MESSAGING angle of a marketing strategy.\\n\\nProduct brief:\\n{{ brief }}\\n\\nWhat do these people already believe, and what specific claim would move them? Say what the product is NOT for.\\n\\nSearch for whatever helps, including the product itself - researching a competitor or a named product is a normal use of this. Finding little about it is also a normal result: say so and work from the brief alone.\\n\\nEvery capability, channel, metric or price you state must come from the brief or from a source you found. If you have neither, say that plainly. Never fill the gap by inferring what a product like this usually does - a plausible category is not evidence.\\n\\nMark anything you inferred rather than found. Be concrete and brief - at most 250 words." } },
|
|
30701
|
+
{ "id": "channel_pass", "type": "prompt", "position": { "x": 280, "y": 90 }, "data": { "label": "Channel research", "sourceType": "raw", "source": "", "rawPrompt": "You are researching the CHANNEL angle of a marketing strategy.\\n\\nProduct brief:\\n{{ brief }}\\n\\nWhere does this audience already look for answers, and what format earns their attention there?\\n\\nSearch for whatever helps, including the product itself - researching a competitor or a named product is a normal use of this. Finding little about it is also a normal result: say so and work from the brief alone.\\n\\nEvery capability, channel, metric or price you state must come from the brief or from a source you found. If you have neither, say that plainly. Never fill the gap by inferring what a product like this usually does - a plausible category is not evidence.\\n\\nMark anything you inferred rather than found. Be concrete and brief - at most 250 words." } }
|
|
30702
|
+
],
|
|
30703
|
+
"edges": [
|
|
30704
|
+
{ "id": "e-start-angles", "source": "start", "target": "angles" },
|
|
30705
|
+
{ "id": "e-angles-audience_pass-f0", "source": "angles", "target": "audience_pass", "sourceHandle": "fork-0", "label": "Audience" },
|
|
30706
|
+
{ "id": "e-audience_pass-collect-f0", "source": "audience_pass", "target": "collect", "targetHandle": "input-0" },
|
|
30707
|
+
{ "id": "e-angles-messaging_pass-f1", "source": "angles", "target": "messaging_pass", "sourceHandle": "fork-1", "label": "Messaging" },
|
|
30708
|
+
{ "id": "e-messaging_pass-collect-f1", "source": "messaging_pass", "target": "collect", "targetHandle": "input-1" },
|
|
30709
|
+
{ "id": "e-angles-channel_pass-f2", "source": "angles", "target": "channel_pass", "sourceHandle": "fork-2", "label": "Channel" },
|
|
30710
|
+
{ "id": "e-channel_pass-collect-f2", "source": "channel_pass", "target": "collect", "targetHandle": "input-2" },
|
|
30711
|
+
{ "id": "e-collect-strategy", "source": "collect", "target": "strategy" },
|
|
30712
|
+
{ "id": "e-strategy-out", "source": "strategy", "target": "out" }
|
|
30713
|
+
]
|
|
30714
|
+
}
|
|
30715
|
+
`,
|
|
30716
|
+
"workflows/research-pipeline/workflow.pdflow": '{\n "version": "1.0",\n "metadata": {\n "id": "research-pipeline",\n "name": "Research Pipeline",\n "description": "Breaks a question into sub-questions, researches each one, then synthesizes an answer that must cite its sources."\n },\n "parameters": [\n { "name": "question", "type": "string", "required": true, "multiline": true, "description": "What do you want researched? One question, as specific as you can make it." }\n ],\n "nodes": [\n { "id": "start", "type": "trigger", "position": { "x": 0, "y": 0 }, "data": { "label": "Start", "triggerType": "manual" } },\n { "id": "decompose", "type": "prompt", "position": { "x": 0, "y": 200 }, "data": { "label": "Break it down", "sourceType": "raw", "source": "", "rawPrompt": "Break this research question into between three and six sub-questions that together answer it. Each must be answerable on its own and worth answering separately.\\n\\nQuestion: {{ question }}\\n\\nReturn ONLY a JSON array of strings. No commentary, no code fence." } },\n { "id": "each", "type": "loop", "position": { "x": 0, "y": 300 }, "data": { "label": "Research each sub-question", "loopType": "for-each", "items": "{{ decompose }}", "arraySource": "{{ decompose }}", "itemVariable": "subq", "body": ["sub_pass"], "onComplete": "gather", "maxIterations": 6 } },\n { "id": "sub_pass", "type": "agent", "parentId": "each", "position": { "x": 260, "y": 300 }, "data": { "label": "Answer one sub-question", "systemPrompt": "You research one narrow question at a time. Search before answering, and search more than once - one query returns one neighbourhood of an argument. Attribute every load-bearing claim to a source with its date. Separate what the sources support from what you inferred. If the evidence is thin, say so; that is a finding.", "userPrompt": "Sub-question: {{ subq }}\\n\\nContext - the overall question being researched: {{ question }}\\n\\nAnswer in at most 250 words, with sources.", "maxIterations": 6, "outputMode": "final-response" } },\n { "id": "sub_tools", "type": "tool", "position": { "x": 520, "y": 300 }, "data": { "label": "Search", "attachedTo": "sub_pass", "tools": ["web_search"] } },\n { "id": "gather", "type": "transformer", "position": { "x": 0, "y": 420 }, "data": { "label": "Gather findings", "mode": "template", "template": "ORIGINAL QUESTION\\n{{ question }}\\n\\nSUB-QUESTIONS\\n{{ decompose }}\\n\\nFINDINGS\\n{{ each }}" } },\n { "id": "synthesize", "type": "prompt", "position": { "x": 0, "y": 520 }, "data": { "label": "Synthesize", "sourceType": "raw", "source": "", "rawPrompt": "Write the answer to the original question from the findings below.\\n\\n{{ input }}\\n\\nLead with the answer. Attribute every load-bearing claim to its source. Where findings disagree, report the disagreement rather than picking a winner silently. Mark inferences as inferences. End with how confident you are and what would change your mind." } },\n { "id": "sourced", "type": "guardrail", "position": { "x": 0, "y": 620 }, "data": { "label": "Sources present", "systemPrompt": "You are checking one thing: does the text below attribute its load-bearing factual claims to named sources? A synthesis that reads as confident but cites nothing FAILS. Inferences that are explicitly marked as inferences are acceptable and do not need a source.\\n\\nReply with JSON only: {\\"pass\\": true} or {\\"pass\\": false, \\"reason\\": \\"<one sentence>\\"}.", "passExpression": "{{ pass }}" } },\n { "id": "out", "type": "output", "position": { "x": 0, "y": 720 }, "data": { "label": "Answer" } }\n ],\n "edges": [\n { "id": "e2", "source": "start", "target": "decompose" },\n { "id": "e3", "source": "decompose", "target": "each" },\n { "id": "e4", "source": "gather", "target": "synthesize" },\n { "id": "e5", "source": "synthesize", "target": "sourced" },\n { "id": "e6", "source": "sourced", "target": "out" }\n ]\n}\n',
|
|
30717
|
+
"workflows/rfp-questionnaire-response/workflow.pdflow": `{
|
|
30718
|
+
"version": "1.0",
|
|
30719
|
+
"metadata": {
|
|
30720
|
+
"id": "rfp-questionnaire-response",
|
|
30721
|
+
"name": "RFP / Questionnaire Response",
|
|
30722
|
+
"description": "Extracts every question from an RFP or vendor questionnaire, drafts each answer from your own documents, and refuses to claim anything the documents do not support."
|
|
30723
|
+
},
|
|
30724
|
+
"parameters": [
|
|
30725
|
+
{ "name": "doc", "type": "string", "required": true, "multiline": true, "description": "Paste the RFP or questionnaire text." }
|
|
30726
|
+
],
|
|
30727
|
+
"nodes": [
|
|
30728
|
+
{ "id": "start", "type": "trigger", "position": { "x": 0, "y": 0 }, "data": { "label": "Start", "triggerType": "manual" } },
|
|
30729
|
+
{ "id": "extract", "type": "prompt", "position": { "x": 0, "y": 200 }, "data": { "label": "Extract the questions", "sourceType": "raw", "source": "", "rawPrompt": "Extract every question that requires an answer from the document below. Keep each question's original wording. Do not merge, reorder or invent questions.\\n\\n{{ doc }}\\n\\nReturn ONLY a JSON array of strings. No commentary, no code fence." } },
|
|
30730
|
+
{ "id": "each", "type": "loop", "position": { "x": 0, "y": 300 }, "data": { "label": "Answer each question", "loopType": "for-each", "items": "{{ extract }}", "arraySource": "{{ extract }}", "itemVariable": "q", "body": ["answer"], "onComplete": "assemble", "maxIterations": 40 } },
|
|
30731
|
+
{ "id": "answer", "type": "agent", "parentId": "each", "position": { "x": 260, "y": 300 }, "data": { "label": "Draft one answer", "systemPrompt": "You draft answers to procurement and security questionnaires, grounded ONLY in the documents available to you in this workspace. Search the workspace before answering. Quote or reference the document that supports each claim. If you cannot find support for a capability, say plainly that it is not evidenced here and describe what would be needed to answer - never write a plausible answer to fill the gap. An unanswered question is recoverable; a false claim in a binding document is not.", "userPrompt": "Question: {{ q }}\\n\\nDraft the answer, then on a final line state either SUPPORTED (with the document you relied on) or UNSUPPORTED.", "maxIterations": 8, "outputMode": "final-response" } },
|
|
30732
|
+
{ "id": "answer_tools", "type": "tool", "position": { "x": 520, "y": 300 }, "data": { "label": "Read the workspace", "attachedTo": "answer", "tools": ["read_file", "list_files", "search_files", "stat_file"] } },
|
|
30733
|
+
{ "id": "assemble", "type": "transformer", "position": { "x": 0, "y": 420 }, "data": { "label": "Assemble", "mode": "template", "template": "DRAFT RESPONSE\\n\\n{{ each }}" } },
|
|
30734
|
+
{ "id": "no_overclaim", "type": "guardrail", "position": { "x": 0, "y": 520 }, "data": { "label": "No unsupported claims", "systemPrompt": "You are checking a draft questionnaire response for claims that its own evidence does not support. An answer marked UNSUPPORTED that honestly says so is FINE and must pass. An answer that asserts a capability, certification or control while showing no supporting document FAILS.\\n\\nReply with JSON only: {\\"pass\\": true} or {\\"pass\\": false, \\"reason\\": \\"<which answer and why>\\"}.", "passExpression": "{{ pass }}" } },
|
|
30735
|
+
{ "id": "final", "type": "prompt", "position": { "x": 0, "y": 620 }, "data": { "label": "Response and gap list", "sourceType": "raw", "source": "", "rawPrompt": "Produce two sections from the draft below.\\n\\n{{ input }}\\n\\nFirst: the response, question by question, using only the supported answers.\\nSecond: a gap list of every question marked UNSUPPORTED, each with what evidence would be needed to answer it. Do not soften the gap list - it is the part a human must act on." } },
|
|
30736
|
+
{ "id": "out", "type": "output", "position": { "x": 0, "y": 720 }, "data": { "label": "Response" } }
|
|
30737
|
+
],
|
|
30738
|
+
"edges": [
|
|
30739
|
+
{ "id": "e2", "source": "start", "target": "extract" },
|
|
30740
|
+
{ "id": "e3", "source": "extract", "target": "each" },
|
|
30741
|
+
{ "id": "e4", "source": "assemble", "target": "no_overclaim" },
|
|
30742
|
+
{ "id": "e5", "source": "no_overclaim", "target": "final" },
|
|
30743
|
+
{ "id": "e6", "source": "final", "target": "out" }
|
|
30744
|
+
]
|
|
30745
|
+
}
|
|
30746
|
+
`
|
|
30576
30747
|
};
|
|
30577
30748
|
|
|
30578
30749
|
// ../harness/prompts/library/index.ts
|
|
@@ -35004,7 +35175,7 @@ function nodeCrewLocation(stateDir, scope, workspaceRoot) {
|
|
|
35004
35175
|
return { files: new NodeFileService(wsRoot), root: `${stateDirName()}/crew` };
|
|
35005
35176
|
}
|
|
35006
35177
|
|
|
35007
|
-
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.
|
|
35178
|
+
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.0/node_modules/openai/internal/qs/formats.mjs
|
|
35008
35179
|
var default_format = "RFC3986";
|
|
35009
35180
|
var formatters = {
|
|
35010
35181
|
RFC1738: (v2) => String(v2).replace(/%20/g, "+"),
|
|
@@ -35012,7 +35183,7 @@ var formatters = {
|
|
|
35012
35183
|
};
|
|
35013
35184
|
var RFC1738 = "RFC1738";
|
|
35014
35185
|
|
|
35015
|
-
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.
|
|
35186
|
+
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.0/node_modules/openai/internal/qs/utils.mjs
|
|
35016
35187
|
var is_array = Array.isArray;
|
|
35017
35188
|
var hex_table = (() => {
|
|
35018
35189
|
const array = [];
|
|
@@ -35091,7 +35262,7 @@ function maybe_map(val, fn) {
|
|
|
35091
35262
|
return fn(val);
|
|
35092
35263
|
}
|
|
35093
35264
|
|
|
35094
|
-
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.
|
|
35265
|
+
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.0/node_modules/openai/internal/qs/stringify.mjs
|
|
35095
35266
|
var has = Object.prototype.hasOwnProperty;
|
|
35096
35267
|
var array_prefix_generators = {
|
|
35097
35268
|
brackets(prefix) {
|
|
@@ -35372,15 +35543,15 @@ function stringify3(object, opts = {}) {
|
|
|
35372
35543
|
return joined.length > 0 ? prefix + joined : "";
|
|
35373
35544
|
}
|
|
35374
35545
|
|
|
35375
|
-
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.
|
|
35546
|
+
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.0/node_modules/openai/version.mjs
|
|
35376
35547
|
var VERSION = "4.104.0";
|
|
35377
35548
|
|
|
35378
|
-
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.
|
|
35549
|
+
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.0/node_modules/openai/_shims/registry.mjs
|
|
35379
35550
|
var auto = false;
|
|
35380
35551
|
var kind = void 0;
|
|
35381
35552
|
var fetch2 = void 0;
|
|
35382
35553
|
var Request = void 0;
|
|
35383
|
-
var
|
|
35554
|
+
var Response2 = void 0;
|
|
35384
35555
|
var Headers2 = void 0;
|
|
35385
35556
|
var FormData = void 0;
|
|
35386
35557
|
var Blob = void 0;
|
|
@@ -35401,7 +35572,7 @@ function setShims(shims, options = { auto: false }) {
|
|
|
35401
35572
|
kind = shims.kind;
|
|
35402
35573
|
fetch2 = shims.fetch;
|
|
35403
35574
|
Request = shims.Request;
|
|
35404
|
-
|
|
35575
|
+
Response2 = shims.Response;
|
|
35405
35576
|
Headers2 = shims.Headers;
|
|
35406
35577
|
FormData = shims.FormData;
|
|
35407
35578
|
Blob = shims.Blob;
|
|
@@ -35413,7 +35584,7 @@ function setShims(shims, options = { auto: false }) {
|
|
|
35413
35584
|
isFsReadStream = shims.isFsReadStream;
|
|
35414
35585
|
}
|
|
35415
35586
|
|
|
35416
|
-
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.
|
|
35587
|
+
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.0/node_modules/openai/_shims/node-runtime.mjs
|
|
35417
35588
|
var nf = __toESM(require_lib3(), 1);
|
|
35418
35589
|
|
|
35419
35590
|
// ../../node_modules/.pnpm/formdata-node@4.4.1/node_modules/formdata-node/lib/esm/FormData.js
|
|
@@ -35559,7 +35730,7 @@ var FormData2 = class {
|
|
|
35559
35730
|
init_Blob();
|
|
35560
35731
|
init_File();
|
|
35561
35732
|
|
|
35562
|
-
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.
|
|
35733
|
+
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.0/node_modules/openai/_shims/node-runtime.mjs
|
|
35563
35734
|
var import_agentkeepalive = __toESM(require_agentkeepalive(), 1);
|
|
35564
35735
|
var import_abort_controller = __toESM(require_abort_controller(), 1);
|
|
35565
35736
|
import { ReadStream as FsReadStream } from "node:fs";
|
|
@@ -35735,10 +35906,10 @@ var FormDataEncoder = class {
|
|
|
35735
35906
|
}
|
|
35736
35907
|
};
|
|
35737
35908
|
|
|
35738
|
-
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.
|
|
35909
|
+
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.0/node_modules/openai/_shims/node-runtime.mjs
|
|
35739
35910
|
import { Readable } from "node:stream";
|
|
35740
35911
|
|
|
35741
|
-
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.
|
|
35912
|
+
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.0/node_modules/openai/_shims/MultipartBody.mjs
|
|
35742
35913
|
var MultipartBody = class {
|
|
35743
35914
|
constructor(body2) {
|
|
35744
35915
|
this.body = body2;
|
|
@@ -35748,7 +35919,7 @@ var MultipartBody = class {
|
|
|
35748
35919
|
}
|
|
35749
35920
|
};
|
|
35750
35921
|
|
|
35751
|
-
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.
|
|
35922
|
+
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.0/node_modules/openai/_shims/node-runtime.mjs
|
|
35752
35923
|
import { ReadableStream as ReadableStream3 } from "node:stream/web";
|
|
35753
35924
|
var fileFromPathWarned = false;
|
|
35754
35925
|
async function fileFromPath3(path, ...args) {
|
|
@@ -35793,13 +35964,13 @@ function getRuntime() {
|
|
|
35793
35964
|
};
|
|
35794
35965
|
}
|
|
35795
35966
|
|
|
35796
|
-
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.
|
|
35967
|
+
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.0/node_modules/openai/_shims/index.mjs
|
|
35797
35968
|
var init = () => {
|
|
35798
35969
|
if (!kind) setShims(getRuntime(), { auto: true });
|
|
35799
35970
|
};
|
|
35800
35971
|
init();
|
|
35801
35972
|
|
|
35802
|
-
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.
|
|
35973
|
+
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.0/node_modules/openai/error.mjs
|
|
35803
35974
|
var OpenAIError = class extends Error {
|
|
35804
35975
|
};
|
|
35805
35976
|
var APIError = class _APIError extends OpenAIError {
|
|
@@ -35903,7 +36074,7 @@ var ContentFilterFinishReasonError = class extends OpenAIError {
|
|
|
35903
36074
|
}
|
|
35904
36075
|
};
|
|
35905
36076
|
|
|
35906
|
-
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.
|
|
36077
|
+
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.0/node_modules/openai/internal/decoders/line.mjs
|
|
35907
36078
|
var __classPrivateFieldSet5 = function(receiver, state, value, kind2, f2) {
|
|
35908
36079
|
if (kind2 === "m") throw new TypeError("Private method is not writable");
|
|
35909
36080
|
if (kind2 === "a" && !f2) throw new TypeError("Private accessor was defined without a setter");
|
|
@@ -36015,7 +36186,7 @@ function findDoubleNewlineIndex(buffer) {
|
|
|
36015
36186
|
return -1;
|
|
36016
36187
|
}
|
|
36017
36188
|
|
|
36018
|
-
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.
|
|
36189
|
+
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.0/node_modules/openai/internal/stream-utils.mjs
|
|
36019
36190
|
function ReadableStreamToAsyncIterable(stream) {
|
|
36020
36191
|
if (stream[Symbol.asyncIterator])
|
|
36021
36192
|
return stream;
|
|
@@ -36044,7 +36215,7 @@ function ReadableStreamToAsyncIterable(stream) {
|
|
|
36044
36215
|
};
|
|
36045
36216
|
}
|
|
36046
36217
|
|
|
36047
|
-
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.
|
|
36218
|
+
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.0/node_modules/openai/streaming.mjs
|
|
36048
36219
|
var Stream = class _Stream {
|
|
36049
36220
|
constructor(iterator, controller) {
|
|
36050
36221
|
this.iterator = iterator;
|
|
@@ -36296,7 +36467,7 @@ function partition(str10, delimiter) {
|
|
|
36296
36467
|
return [str10, "", ""];
|
|
36297
36468
|
}
|
|
36298
36469
|
|
|
36299
|
-
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.
|
|
36470
|
+
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.0/node_modules/openai/uploads.mjs
|
|
36300
36471
|
var isResponseLike = (value) => value != null && typeof value === "object" && typeof value.url === "string" && typeof value.blob === "function";
|
|
36301
36472
|
var isFileLike2 = (value) => value != null && typeof value === "object" && typeof value.name === "string" && typeof value.lastModified === "number" && isBlobLike(value);
|
|
36302
36473
|
var isBlobLike = (value) => value != null && typeof value === "object" && typeof value.size === "number" && typeof value.type === "string" && typeof value.text === "function" && typeof value.slice === "function" && typeof value.arrayBuffer === "function";
|
|
@@ -36386,7 +36557,7 @@ var addFormValue = async (form, key, value) => {
|
|
|
36386
36557
|
}
|
|
36387
36558
|
};
|
|
36388
36559
|
|
|
36389
|
-
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.
|
|
36560
|
+
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.0/node_modules/openai/core.mjs
|
|
36390
36561
|
var __classPrivateFieldSet6 = function(receiver, state, value, kind2, f2) {
|
|
36391
36562
|
if (kind2 === "m") throw new TypeError("Private method is not writable");
|
|
36392
36563
|
if (kind2 === "a" && !f2) throw new TypeError("Private accessor was defined without a setter");
|
|
@@ -37157,7 +37328,7 @@ function isObj(obj) {
|
|
|
37157
37328
|
return obj != null && typeof obj === "object" && !Array.isArray(obj);
|
|
37158
37329
|
}
|
|
37159
37330
|
|
|
37160
|
-
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.
|
|
37331
|
+
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.0/node_modules/openai/pagination.mjs
|
|
37161
37332
|
var Page = class extends AbstractPage {
|
|
37162
37333
|
constructor(client, response, body2, options) {
|
|
37163
37334
|
super(client, response, body2, options);
|
|
@@ -37219,14 +37390,14 @@ var CursorPage = class extends AbstractPage {
|
|
|
37219
37390
|
}
|
|
37220
37391
|
};
|
|
37221
37392
|
|
|
37222
|
-
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.
|
|
37393
|
+
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.0/node_modules/openai/resource.mjs
|
|
37223
37394
|
var APIResource = class {
|
|
37224
37395
|
constructor(client) {
|
|
37225
37396
|
this._client = client;
|
|
37226
37397
|
}
|
|
37227
37398
|
};
|
|
37228
37399
|
|
|
37229
|
-
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.
|
|
37400
|
+
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.0/node_modules/openai/resources/chat/completions/messages.mjs
|
|
37230
37401
|
var Messages = class extends APIResource {
|
|
37231
37402
|
list(completionId, query = {}, options) {
|
|
37232
37403
|
if (isRequestOptions(query)) {
|
|
@@ -37236,7 +37407,7 @@ var Messages = class extends APIResource {
|
|
|
37236
37407
|
}
|
|
37237
37408
|
};
|
|
37238
37409
|
|
|
37239
|
-
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.
|
|
37410
|
+
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.0/node_modules/openai/resources/chat/completions/completions.mjs
|
|
37240
37411
|
var Completions = class extends APIResource {
|
|
37241
37412
|
constructor() {
|
|
37242
37413
|
super(...arguments);
|
|
@@ -37301,7 +37472,7 @@ var ChatCompletionStoreMessagesPage = class extends CursorPage {
|
|
|
37301
37472
|
Completions.ChatCompletionsPage = ChatCompletionsPage;
|
|
37302
37473
|
Completions.Messages = Messages;
|
|
37303
37474
|
|
|
37304
|
-
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.
|
|
37475
|
+
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.0/node_modules/openai/resources/chat/chat.mjs
|
|
37305
37476
|
var Chat = class extends APIResource {
|
|
37306
37477
|
constructor() {
|
|
37307
37478
|
super(...arguments);
|
|
@@ -37311,7 +37482,7 @@ var Chat = class extends APIResource {
|
|
|
37311
37482
|
Chat.Completions = Completions;
|
|
37312
37483
|
Chat.ChatCompletionsPage = ChatCompletionsPage;
|
|
37313
37484
|
|
|
37314
|
-
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.
|
|
37485
|
+
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.0/node_modules/openai/resources/audio/speech.mjs
|
|
37315
37486
|
var Speech = class extends APIResource {
|
|
37316
37487
|
/**
|
|
37317
37488
|
* Generates audio from the input text.
|
|
@@ -37338,7 +37509,7 @@ var Speech = class extends APIResource {
|
|
|
37338
37509
|
}
|
|
37339
37510
|
};
|
|
37340
37511
|
|
|
37341
|
-
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.
|
|
37512
|
+
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.0/node_modules/openai/resources/audio/transcriptions.mjs
|
|
37342
37513
|
var Transcriptions = class extends APIResource {
|
|
37343
37514
|
create(body2, options) {
|
|
37344
37515
|
return this._client.post("/audio/transcriptions", multipartFormRequestOptions({
|
|
@@ -37350,14 +37521,14 @@ var Transcriptions = class extends APIResource {
|
|
|
37350
37521
|
}
|
|
37351
37522
|
};
|
|
37352
37523
|
|
|
37353
|
-
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.
|
|
37524
|
+
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.0/node_modules/openai/resources/audio/translations.mjs
|
|
37354
37525
|
var Translations = class extends APIResource {
|
|
37355
37526
|
create(body2, options) {
|
|
37356
37527
|
return this._client.post("/audio/translations", multipartFormRequestOptions({ body: body2, ...options, __metadata: { model: body2.model } }));
|
|
37357
37528
|
}
|
|
37358
37529
|
};
|
|
37359
37530
|
|
|
37360
|
-
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.
|
|
37531
|
+
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.0/node_modules/openai/resources/audio/audio.mjs
|
|
37361
37532
|
var Audio = class extends APIResource {
|
|
37362
37533
|
constructor() {
|
|
37363
37534
|
super(...arguments);
|
|
@@ -37370,7 +37541,7 @@ Audio.Transcriptions = Transcriptions;
|
|
|
37370
37541
|
Audio.Translations = Translations;
|
|
37371
37542
|
Audio.Speech = Speech;
|
|
37372
37543
|
|
|
37373
|
-
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.
|
|
37544
|
+
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.0/node_modules/openai/resources/batches.mjs
|
|
37374
37545
|
var Batches = class extends APIResource {
|
|
37375
37546
|
/**
|
|
37376
37547
|
* Creates and executes a batch from an uploaded file of requests
|
|
@@ -37403,7 +37574,7 @@ var BatchesPage = class extends CursorPage {
|
|
|
37403
37574
|
};
|
|
37404
37575
|
Batches.BatchesPage = BatchesPage;
|
|
37405
37576
|
|
|
37406
|
-
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.
|
|
37577
|
+
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.0/node_modules/openai/lib/EventStream.mjs
|
|
37407
37578
|
var __classPrivateFieldSet7 = function(receiver, state, value, kind2, f2) {
|
|
37408
37579
|
if (kind2 === "m") throw new TypeError("Private method is not writable");
|
|
37409
37580
|
if (kind2 === "a" && !f2) throw new TypeError("Private accessor was defined without a setter");
|
|
@@ -37603,7 +37774,7 @@ _EventStream_connectedPromise = /* @__PURE__ */ new WeakMap(), _EventStream_reso
|
|
|
37603
37774
|
return this._emit("error", new OpenAIError(String(error)));
|
|
37604
37775
|
};
|
|
37605
37776
|
|
|
37606
|
-
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.
|
|
37777
|
+
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.0/node_modules/openai/lib/AssistantStream.mjs
|
|
37607
37778
|
var __classPrivateFieldGet9 = function(receiver, state, kind2, f2) {
|
|
37608
37779
|
if (kind2 === "a" && !f2) throw new TypeError("Private accessor was defined without a getter");
|
|
37609
37780
|
if (typeof state === "function" ? receiver !== state || !f2 : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
@@ -38151,7 +38322,7 @@ _AssistantStream_addEvent = function _AssistantStream_addEvent2(event) {
|
|
|
38151
38322
|
function assertNever(_x) {
|
|
38152
38323
|
}
|
|
38153
38324
|
|
|
38154
|
-
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.
|
|
38325
|
+
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.0/node_modules/openai/resources/beta/assistants.mjs
|
|
38155
38326
|
var Assistants = class extends APIResource {
|
|
38156
38327
|
/**
|
|
38157
38328
|
* Create an assistant with a model and instructions.
|
|
@@ -38234,12 +38405,12 @@ var AssistantsPage = class extends CursorPage {
|
|
|
38234
38405
|
};
|
|
38235
38406
|
Assistants.AssistantsPage = AssistantsPage;
|
|
38236
38407
|
|
|
38237
|
-
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.
|
|
38408
|
+
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.0/node_modules/openai/lib/RunnableFunction.mjs
|
|
38238
38409
|
function isRunnableFunctionWithParse(fn) {
|
|
38239
38410
|
return typeof fn.parse === "function";
|
|
38240
38411
|
}
|
|
38241
38412
|
|
|
38242
|
-
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.
|
|
38413
|
+
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.0/node_modules/openai/lib/chatCompletionUtils.mjs
|
|
38243
38414
|
var isAssistantMessage = (message) => {
|
|
38244
38415
|
return message?.role === "assistant";
|
|
38245
38416
|
};
|
|
@@ -38250,7 +38421,7 @@ var isToolMessage = (message) => {
|
|
|
38250
38421
|
return message?.role === "tool";
|
|
38251
38422
|
};
|
|
38252
38423
|
|
|
38253
|
-
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.
|
|
38424
|
+
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.0/node_modules/openai/lib/parser.mjs
|
|
38254
38425
|
function isAutoParsableResponseFormat(response_format) {
|
|
38255
38426
|
return response_format?.["$brand"] === "auto-parseable-response-format";
|
|
38256
38427
|
}
|
|
@@ -38343,7 +38514,7 @@ function validateInputTools(tools) {
|
|
|
38343
38514
|
}
|
|
38344
38515
|
}
|
|
38345
38516
|
|
|
38346
|
-
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.
|
|
38517
|
+
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.0/node_modules/openai/lib/AbstractChatCompletionRunner.mjs
|
|
38347
38518
|
var __classPrivateFieldGet10 = function(receiver, state, kind2, f2) {
|
|
38348
38519
|
if (kind2 === "a" && !f2) throw new TypeError("Private accessor was defined without a getter");
|
|
38349
38520
|
if (typeof state === "function" ? receiver !== state || !f2 : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
@@ -38689,7 +38860,7 @@ _AbstractChatCompletionRunner_instances = /* @__PURE__ */ new WeakSet(), _Abstra
|
|
|
38689
38860
|
return typeof rawContent === "string" ? rawContent : rawContent === void 0 ? "undefined" : JSON.stringify(rawContent);
|
|
38690
38861
|
};
|
|
38691
38862
|
|
|
38692
|
-
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.
|
|
38863
|
+
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.0/node_modules/openai/lib/ChatCompletionRunner.mjs
|
|
38693
38864
|
var ChatCompletionRunner = class _ChatCompletionRunner extends AbstractChatCompletionRunner {
|
|
38694
38865
|
/** @deprecated - please use `runTools` instead. */
|
|
38695
38866
|
static runFunctions(client, params, options) {
|
|
@@ -38718,7 +38889,7 @@ var ChatCompletionRunner = class _ChatCompletionRunner extends AbstractChatCompl
|
|
|
38718
38889
|
}
|
|
38719
38890
|
};
|
|
38720
38891
|
|
|
38721
|
-
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.
|
|
38892
|
+
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.0/node_modules/openai/_vendor/partial-json-parser/parser.mjs
|
|
38722
38893
|
var STR = 1;
|
|
38723
38894
|
var NUM = 2;
|
|
38724
38895
|
var ARR = 4;
|
|
@@ -38930,7 +39101,7 @@ var _parseJSON = (jsonString, allow) => {
|
|
|
38930
39101
|
};
|
|
38931
39102
|
var partialParse = (input) => parseJSON(input, Allow.ALL ^ Allow.NUM);
|
|
38932
39103
|
|
|
38933
|
-
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.
|
|
39104
|
+
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.0/node_modules/openai/lib/ChatCompletionStream.mjs
|
|
38934
39105
|
var __classPrivateFieldSet9 = function(receiver, state, value, kind2, f2) {
|
|
38935
39106
|
if (kind2 === "m") throw new TypeError("Private method is not writable");
|
|
38936
39107
|
if (kind2 === "a" && !f2) throw new TypeError("Private accessor was defined without a setter");
|
|
@@ -39421,7 +39592,7 @@ function assertIsEmpty(obj) {
|
|
|
39421
39592
|
function assertNever2(_x) {
|
|
39422
39593
|
}
|
|
39423
39594
|
|
|
39424
|
-
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.
|
|
39595
|
+
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.0/node_modules/openai/lib/ChatCompletionStreamingRunner.mjs
|
|
39425
39596
|
var ChatCompletionStreamingRunner = class _ChatCompletionStreamingRunner extends ChatCompletionStream {
|
|
39426
39597
|
static fromReadableStream(stream) {
|
|
39427
39598
|
const runner = new _ChatCompletionStreamingRunner(null);
|
|
@@ -39452,7 +39623,7 @@ var ChatCompletionStreamingRunner = class _ChatCompletionStreamingRunner extends
|
|
|
39452
39623
|
}
|
|
39453
39624
|
};
|
|
39454
39625
|
|
|
39455
|
-
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.
|
|
39626
|
+
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.0/node_modules/openai/resources/beta/chat/completions.mjs
|
|
39456
39627
|
var Completions2 = class extends APIResource {
|
|
39457
39628
|
parse(body2, options) {
|
|
39458
39629
|
validateInputTools(body2.tools);
|
|
@@ -39484,7 +39655,7 @@ var Completions2 = class extends APIResource {
|
|
|
39484
39655
|
}
|
|
39485
39656
|
};
|
|
39486
39657
|
|
|
39487
|
-
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.
|
|
39658
|
+
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.0/node_modules/openai/resources/beta/chat/chat.mjs
|
|
39488
39659
|
var Chat2 = class extends APIResource {
|
|
39489
39660
|
constructor() {
|
|
39490
39661
|
super(...arguments);
|
|
@@ -39495,7 +39666,7 @@ var Chat2 = class extends APIResource {
|
|
|
39495
39666
|
Chat3.Completions = Completions2;
|
|
39496
39667
|
})(Chat2 || (Chat2 = {}));
|
|
39497
39668
|
|
|
39498
|
-
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.
|
|
39669
|
+
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.0/node_modules/openai/resources/beta/realtime/sessions.mjs
|
|
39499
39670
|
var Sessions = class extends APIResource {
|
|
39500
39671
|
/**
|
|
39501
39672
|
* Create an ephemeral API token for use in client-side applications with the
|
|
@@ -39521,7 +39692,7 @@ var Sessions = class extends APIResource {
|
|
|
39521
39692
|
}
|
|
39522
39693
|
};
|
|
39523
39694
|
|
|
39524
|
-
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.
|
|
39695
|
+
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.0/node_modules/openai/resources/beta/realtime/transcription-sessions.mjs
|
|
39525
39696
|
var TranscriptionSessions = class extends APIResource {
|
|
39526
39697
|
/**
|
|
39527
39698
|
* Create an ephemeral API token for use in client-side applications with the
|
|
@@ -39547,7 +39718,7 @@ var TranscriptionSessions = class extends APIResource {
|
|
|
39547
39718
|
}
|
|
39548
39719
|
};
|
|
39549
39720
|
|
|
39550
|
-
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.
|
|
39721
|
+
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.0/node_modules/openai/resources/beta/realtime/realtime.mjs
|
|
39551
39722
|
var Realtime = class extends APIResource {
|
|
39552
39723
|
constructor() {
|
|
39553
39724
|
super(...arguments);
|
|
@@ -39558,7 +39729,7 @@ var Realtime = class extends APIResource {
|
|
|
39558
39729
|
Realtime.Sessions = Sessions;
|
|
39559
39730
|
Realtime.TranscriptionSessions = TranscriptionSessions;
|
|
39560
39731
|
|
|
39561
|
-
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.
|
|
39732
|
+
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.0/node_modules/openai/resources/beta/threads/messages.mjs
|
|
39562
39733
|
var Messages2 = class extends APIResource {
|
|
39563
39734
|
/**
|
|
39564
39735
|
* Create a message.
|
|
@@ -39621,7 +39792,7 @@ var MessagesPage = class extends CursorPage {
|
|
|
39621
39792
|
};
|
|
39622
39793
|
Messages2.MessagesPage = MessagesPage;
|
|
39623
39794
|
|
|
39624
|
-
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.
|
|
39795
|
+
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.0/node_modules/openai/resources/beta/threads/runs/steps.mjs
|
|
39625
39796
|
var Steps = class extends APIResource {
|
|
39626
39797
|
retrieve(threadId, runId, stepId, query = {}, options) {
|
|
39627
39798
|
if (isRequestOptions(query)) {
|
|
@@ -39648,7 +39819,7 @@ var RunStepsPage = class extends CursorPage {
|
|
|
39648
39819
|
};
|
|
39649
39820
|
Steps.RunStepsPage = RunStepsPage;
|
|
39650
39821
|
|
|
39651
|
-
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.
|
|
39822
|
+
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.0/node_modules/openai/resources/beta/threads/runs/runs.mjs
|
|
39652
39823
|
var Runs = class extends APIResource {
|
|
39653
39824
|
constructor() {
|
|
39654
39825
|
super(...arguments);
|
|
@@ -39806,7 +39977,7 @@ Runs.RunsPage = RunsPage;
|
|
|
39806
39977
|
Runs.Steps = Steps;
|
|
39807
39978
|
Runs.RunStepsPage = RunStepsPage;
|
|
39808
39979
|
|
|
39809
|
-
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.
|
|
39980
|
+
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.0/node_modules/openai/resources/beta/threads/threads.mjs
|
|
39810
39981
|
var Threads = class extends APIResource {
|
|
39811
39982
|
constructor() {
|
|
39812
39983
|
super(...arguments);
|
|
@@ -39886,7 +40057,7 @@ Threads.RunsPage = RunsPage;
|
|
|
39886
40057
|
Threads.Messages = Messages2;
|
|
39887
40058
|
Threads.MessagesPage = MessagesPage;
|
|
39888
40059
|
|
|
39889
|
-
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.
|
|
40060
|
+
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.0/node_modules/openai/resources/beta/beta.mjs
|
|
39890
40061
|
var Beta = class extends APIResource {
|
|
39891
40062
|
constructor() {
|
|
39892
40063
|
super(...arguments);
|
|
@@ -39901,14 +40072,14 @@ Beta.Assistants = Assistants;
|
|
|
39901
40072
|
Beta.AssistantsPage = AssistantsPage;
|
|
39902
40073
|
Beta.Threads = Threads;
|
|
39903
40074
|
|
|
39904
|
-
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.
|
|
40075
|
+
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.0/node_modules/openai/resources/completions.mjs
|
|
39905
40076
|
var Completions3 = class extends APIResource {
|
|
39906
40077
|
create(body2, options) {
|
|
39907
40078
|
return this._client.post("/completions", { body: body2, ...options, stream: body2.stream ?? false });
|
|
39908
40079
|
}
|
|
39909
40080
|
};
|
|
39910
40081
|
|
|
39911
|
-
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.
|
|
40082
|
+
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.0/node_modules/openai/resources/containers/files/content.mjs
|
|
39912
40083
|
var Content = class extends APIResource {
|
|
39913
40084
|
/**
|
|
39914
40085
|
* Retrieve Container File Content
|
|
@@ -39922,7 +40093,7 @@ var Content = class extends APIResource {
|
|
|
39922
40093
|
}
|
|
39923
40094
|
};
|
|
39924
40095
|
|
|
39925
|
-
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.
|
|
40096
|
+
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.0/node_modules/openai/resources/containers/files/files.mjs
|
|
39926
40097
|
var Files = class extends APIResource {
|
|
39927
40098
|
constructor() {
|
|
39928
40099
|
super(...arguments);
|
|
@@ -39967,7 +40138,7 @@ var FileListResponsesPage = class extends CursorPage {
|
|
|
39967
40138
|
Files.FileListResponsesPage = FileListResponsesPage;
|
|
39968
40139
|
Files.Content = Content;
|
|
39969
40140
|
|
|
39970
|
-
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.
|
|
40141
|
+
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.0/node_modules/openai/resources/containers/containers.mjs
|
|
39971
40142
|
var Containers = class extends APIResource {
|
|
39972
40143
|
constructor() {
|
|
39973
40144
|
super(...arguments);
|
|
@@ -40007,7 +40178,7 @@ Containers.ContainerListResponsesPage = ContainerListResponsesPage;
|
|
|
40007
40178
|
Containers.Files = Files;
|
|
40008
40179
|
Containers.FileListResponsesPage = FileListResponsesPage;
|
|
40009
40180
|
|
|
40010
|
-
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.
|
|
40181
|
+
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.0/node_modules/openai/resources/embeddings.mjs
|
|
40011
40182
|
var Embeddings = class extends APIResource {
|
|
40012
40183
|
/**
|
|
40013
40184
|
* Creates an embedding vector representing the input text.
|
|
@@ -40050,7 +40221,7 @@ var Embeddings = class extends APIResource {
|
|
|
40050
40221
|
}
|
|
40051
40222
|
};
|
|
40052
40223
|
|
|
40053
|
-
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.
|
|
40224
|
+
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.0/node_modules/openai/resources/evals/runs/output-items.mjs
|
|
40054
40225
|
var OutputItems = class extends APIResource {
|
|
40055
40226
|
/**
|
|
40056
40227
|
* Get an evaluation run output item by ID.
|
|
@@ -40069,7 +40240,7 @@ var OutputItemListResponsesPage = class extends CursorPage {
|
|
|
40069
40240
|
};
|
|
40070
40241
|
OutputItems.OutputItemListResponsesPage = OutputItemListResponsesPage;
|
|
40071
40242
|
|
|
40072
|
-
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.
|
|
40243
|
+
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.0/node_modules/openai/resources/evals/runs/runs.mjs
|
|
40073
40244
|
var Runs2 = class extends APIResource {
|
|
40074
40245
|
constructor() {
|
|
40075
40246
|
super(...arguments);
|
|
@@ -40114,7 +40285,7 @@ Runs2.RunListResponsesPage = RunListResponsesPage;
|
|
|
40114
40285
|
Runs2.OutputItems = OutputItems;
|
|
40115
40286
|
Runs2.OutputItemListResponsesPage = OutputItemListResponsesPage;
|
|
40116
40287
|
|
|
40117
|
-
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.
|
|
40288
|
+
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.0/node_modules/openai/resources/evals/evals.mjs
|
|
40118
40289
|
var Evals = class extends APIResource {
|
|
40119
40290
|
constructor() {
|
|
40120
40291
|
super(...arguments);
|
|
@@ -40162,7 +40333,7 @@ Evals.EvalListResponsesPage = EvalListResponsesPage;
|
|
|
40162
40333
|
Evals.Runs = Runs2;
|
|
40163
40334
|
Evals.RunListResponsesPage = RunListResponsesPage;
|
|
40164
40335
|
|
|
40165
|
-
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.
|
|
40336
|
+
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.0/node_modules/openai/resources/files.mjs
|
|
40166
40337
|
var Files2 = class extends APIResource {
|
|
40167
40338
|
/**
|
|
40168
40339
|
* Upload a file that can be used across various endpoints. Individual files can be
|
|
@@ -40249,11 +40420,11 @@ var FileObjectsPage = class extends CursorPage {
|
|
|
40249
40420
|
};
|
|
40250
40421
|
Files2.FileObjectsPage = FileObjectsPage;
|
|
40251
40422
|
|
|
40252
|
-
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.
|
|
40423
|
+
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.0/node_modules/openai/resources/fine-tuning/methods.mjs
|
|
40253
40424
|
var Methods = class extends APIResource {
|
|
40254
40425
|
};
|
|
40255
40426
|
|
|
40256
|
-
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.
|
|
40427
|
+
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.0/node_modules/openai/resources/fine-tuning/alpha/graders.mjs
|
|
40257
40428
|
var Graders = class extends APIResource {
|
|
40258
40429
|
/**
|
|
40259
40430
|
* Run a grader.
|
|
@@ -40298,7 +40469,7 @@ var Graders = class extends APIResource {
|
|
|
40298
40469
|
}
|
|
40299
40470
|
};
|
|
40300
40471
|
|
|
40301
|
-
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.
|
|
40472
|
+
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.0/node_modules/openai/resources/fine-tuning/alpha/alpha.mjs
|
|
40302
40473
|
var Alpha = class extends APIResource {
|
|
40303
40474
|
constructor() {
|
|
40304
40475
|
super(...arguments);
|
|
@@ -40307,7 +40478,7 @@ var Alpha = class extends APIResource {
|
|
|
40307
40478
|
};
|
|
40308
40479
|
Alpha.Graders = Graders;
|
|
40309
40480
|
|
|
40310
|
-
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.
|
|
40481
|
+
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.0/node_modules/openai/resources/fine-tuning/checkpoints/permissions.mjs
|
|
40311
40482
|
var Permissions = class extends APIResource {
|
|
40312
40483
|
/**
|
|
40313
40484
|
* **NOTE:** Calling this endpoint requires an [admin API key](../admin-api-keys).
|
|
@@ -40361,7 +40532,7 @@ var PermissionCreateResponsesPage = class extends Page {
|
|
|
40361
40532
|
};
|
|
40362
40533
|
Permissions.PermissionCreateResponsesPage = PermissionCreateResponsesPage;
|
|
40363
40534
|
|
|
40364
|
-
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.
|
|
40535
|
+
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.0/node_modules/openai/resources/fine-tuning/checkpoints/checkpoints.mjs
|
|
40365
40536
|
var Checkpoints = class extends APIResource {
|
|
40366
40537
|
constructor() {
|
|
40367
40538
|
super(...arguments);
|
|
@@ -40371,7 +40542,7 @@ var Checkpoints = class extends APIResource {
|
|
|
40371
40542
|
Checkpoints.Permissions = Permissions;
|
|
40372
40543
|
Checkpoints.PermissionCreateResponsesPage = PermissionCreateResponsesPage;
|
|
40373
40544
|
|
|
40374
|
-
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.
|
|
40545
|
+
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.0/node_modules/openai/resources/fine-tuning/jobs/checkpoints.mjs
|
|
40375
40546
|
var Checkpoints2 = class extends APIResource {
|
|
40376
40547
|
list(fineTuningJobId, query = {}, options) {
|
|
40377
40548
|
if (isRequestOptions(query)) {
|
|
@@ -40384,7 +40555,7 @@ var FineTuningJobCheckpointsPage = class extends CursorPage {
|
|
|
40384
40555
|
};
|
|
40385
40556
|
Checkpoints2.FineTuningJobCheckpointsPage = FineTuningJobCheckpointsPage;
|
|
40386
40557
|
|
|
40387
|
-
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.
|
|
40558
|
+
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.0/node_modules/openai/resources/fine-tuning/jobs/jobs.mjs
|
|
40388
40559
|
var Jobs = class extends APIResource {
|
|
40389
40560
|
constructor() {
|
|
40390
40561
|
super(...arguments);
|
|
@@ -40489,7 +40660,7 @@ Jobs.FineTuningJobEventsPage = FineTuningJobEventsPage;
|
|
|
40489
40660
|
Jobs.Checkpoints = Checkpoints2;
|
|
40490
40661
|
Jobs.FineTuningJobCheckpointsPage = FineTuningJobCheckpointsPage;
|
|
40491
40662
|
|
|
40492
|
-
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.
|
|
40663
|
+
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.0/node_modules/openai/resources/fine-tuning/fine-tuning.mjs
|
|
40493
40664
|
var FineTuning = class extends APIResource {
|
|
40494
40665
|
constructor() {
|
|
40495
40666
|
super(...arguments);
|
|
@@ -40506,11 +40677,11 @@ FineTuning.FineTuningJobEventsPage = FineTuningJobEventsPage;
|
|
|
40506
40677
|
FineTuning.Checkpoints = Checkpoints;
|
|
40507
40678
|
FineTuning.Alpha = Alpha;
|
|
40508
40679
|
|
|
40509
|
-
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.
|
|
40680
|
+
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.0/node_modules/openai/resources/graders/grader-models.mjs
|
|
40510
40681
|
var GraderModels = class extends APIResource {
|
|
40511
40682
|
};
|
|
40512
40683
|
|
|
40513
|
-
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.
|
|
40684
|
+
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.0/node_modules/openai/resources/graders/graders.mjs
|
|
40514
40685
|
var Graders2 = class extends APIResource {
|
|
40515
40686
|
constructor() {
|
|
40516
40687
|
super(...arguments);
|
|
@@ -40519,7 +40690,7 @@ var Graders2 = class extends APIResource {
|
|
|
40519
40690
|
};
|
|
40520
40691
|
Graders2.GraderModels = GraderModels;
|
|
40521
40692
|
|
|
40522
|
-
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.
|
|
40693
|
+
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.0/node_modules/openai/resources/images.mjs
|
|
40523
40694
|
var Images = class extends APIResource {
|
|
40524
40695
|
/**
|
|
40525
40696
|
* Creates a variation of a given image. This endpoint only supports `dall-e-2`.
|
|
@@ -40565,7 +40736,7 @@ var Images = class extends APIResource {
|
|
|
40565
40736
|
}
|
|
40566
40737
|
};
|
|
40567
40738
|
|
|
40568
|
-
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.
|
|
40739
|
+
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.0/node_modules/openai/resources/models.mjs
|
|
40569
40740
|
var Models = class extends APIResource {
|
|
40570
40741
|
/**
|
|
40571
40742
|
* Retrieves a model instance, providing basic information about the model such as
|
|
@@ -40593,7 +40764,7 @@ var ModelsPage = class extends Page {
|
|
|
40593
40764
|
};
|
|
40594
40765
|
Models.ModelsPage = ModelsPage;
|
|
40595
40766
|
|
|
40596
|
-
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.
|
|
40767
|
+
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.0/node_modules/openai/resources/moderations.mjs
|
|
40597
40768
|
var Moderations = class extends APIResource {
|
|
40598
40769
|
/**
|
|
40599
40770
|
* Classifies if text and/or image inputs are potentially harmful. Learn more in
|
|
@@ -40604,7 +40775,7 @@ var Moderations = class extends APIResource {
|
|
|
40604
40775
|
}
|
|
40605
40776
|
};
|
|
40606
40777
|
|
|
40607
|
-
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.
|
|
40778
|
+
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.0/node_modules/openai/lib/ResponsesParser.mjs
|
|
40608
40779
|
function maybeParseResponse(response, params) {
|
|
40609
40780
|
if (!params || !hasAutoParseableInput2(params)) {
|
|
40610
40781
|
return {
|
|
@@ -40725,7 +40896,7 @@ function addOutputText(rsp) {
|
|
|
40725
40896
|
rsp.output_text = texts.join("");
|
|
40726
40897
|
}
|
|
40727
40898
|
|
|
40728
|
-
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.
|
|
40899
|
+
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.0/node_modules/openai/resources/responses/input-items.mjs
|
|
40729
40900
|
var InputItems = class extends APIResource {
|
|
40730
40901
|
list(responseId, query = {}, options) {
|
|
40731
40902
|
if (isRequestOptions(query)) {
|
|
@@ -40738,7 +40909,7 @@ var InputItems = class extends APIResource {
|
|
|
40738
40909
|
}
|
|
40739
40910
|
};
|
|
40740
40911
|
|
|
40741
|
-
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.
|
|
40912
|
+
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.0/node_modules/openai/lib/responses/ResponseStream.mjs
|
|
40742
40913
|
var __classPrivateFieldSet10 = function(receiver, state, value, kind2, f2) {
|
|
40743
40914
|
if (kind2 === "m") throw new TypeError("Private method is not writable");
|
|
40744
40915
|
if (kind2 === "a" && !f2) throw new TypeError("Private accessor was defined without a setter");
|
|
@@ -40987,7 +41158,7 @@ function finalizeResponse(snapshot, params) {
|
|
|
40987
41158
|
return maybeParseResponse(snapshot, params);
|
|
40988
41159
|
}
|
|
40989
41160
|
|
|
40990
|
-
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.
|
|
41161
|
+
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.0/node_modules/openai/resources/responses/responses.mjs
|
|
40991
41162
|
var Responses = class extends APIResource {
|
|
40992
41163
|
constructor() {
|
|
40993
41164
|
super(...arguments);
|
|
@@ -41056,7 +41227,7 @@ var ResponseItemsPage = class extends CursorPage {
|
|
|
41056
41227
|
};
|
|
41057
41228
|
Responses.InputItems = InputItems;
|
|
41058
41229
|
|
|
41059
|
-
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.
|
|
41230
|
+
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.0/node_modules/openai/resources/uploads/parts.mjs
|
|
41060
41231
|
var Parts = class extends APIResource {
|
|
41061
41232
|
/**
|
|
41062
41233
|
* Adds a
|
|
@@ -41076,7 +41247,7 @@ var Parts = class extends APIResource {
|
|
|
41076
41247
|
}
|
|
41077
41248
|
};
|
|
41078
41249
|
|
|
41079
|
-
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.
|
|
41250
|
+
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.0/node_modules/openai/resources/uploads/uploads.mjs
|
|
41080
41251
|
var Uploads = class extends APIResource {
|
|
41081
41252
|
constructor() {
|
|
41082
41253
|
super(...arguments);
|
|
@@ -41133,7 +41304,7 @@ var Uploads = class extends APIResource {
|
|
|
41133
41304
|
};
|
|
41134
41305
|
Uploads.Parts = Parts;
|
|
41135
41306
|
|
|
41136
|
-
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.
|
|
41307
|
+
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.0/node_modules/openai/lib/Util.mjs
|
|
41137
41308
|
var allSettledWithThrow = async (promises) => {
|
|
41138
41309
|
const results = await Promise.allSettled(promises);
|
|
41139
41310
|
const rejected = results.filter((result) => result.status === "rejected");
|
|
@@ -41152,7 +41323,7 @@ var allSettledWithThrow = async (promises) => {
|
|
|
41152
41323
|
return values;
|
|
41153
41324
|
};
|
|
41154
41325
|
|
|
41155
|
-
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.
|
|
41326
|
+
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.0/node_modules/openai/resources/vector-stores/files.mjs
|
|
41156
41327
|
var Files3 = class extends APIResource {
|
|
41157
41328
|
/**
|
|
41158
41329
|
* Create a vector store file by attaching a
|
|
@@ -41284,7 +41455,7 @@ var FileContentResponsesPage = class extends Page {
|
|
|
41284
41455
|
Files3.VectorStoreFilesPage = VectorStoreFilesPage;
|
|
41285
41456
|
Files3.FileContentResponsesPage = FileContentResponsesPage;
|
|
41286
41457
|
|
|
41287
|
-
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.
|
|
41458
|
+
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.0/node_modules/openai/resources/vector-stores/file-batches.mjs
|
|
41288
41459
|
var FileBatches = class extends APIResource {
|
|
41289
41460
|
/**
|
|
41290
41461
|
* Create a vector store file batch.
|
|
@@ -41395,7 +41566,7 @@ var FileBatches = class extends APIResource {
|
|
|
41395
41566
|
}
|
|
41396
41567
|
};
|
|
41397
41568
|
|
|
41398
|
-
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.
|
|
41569
|
+
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.0/node_modules/openai/resources/vector-stores/vector-stores.mjs
|
|
41399
41570
|
var VectorStores = class extends APIResource {
|
|
41400
41571
|
constructor() {
|
|
41401
41572
|
super(...arguments);
|
|
@@ -41474,7 +41645,7 @@ VectorStores.VectorStoreFilesPage = VectorStoreFilesPage;
|
|
|
41474
41645
|
VectorStores.FileContentResponsesPage = FileContentResponsesPage;
|
|
41475
41646
|
VectorStores.FileBatches = FileBatches;
|
|
41476
41647
|
|
|
41477
|
-
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.
|
|
41648
|
+
// ../../node_modules/.pnpm/openai@4.104.0_ws@8.21.0/node_modules/openai/index.mjs
|
|
41478
41649
|
var _a;
|
|
41479
41650
|
var OpenAI = class extends APIClient {
|
|
41480
41651
|
/**
|
|
@@ -41659,7 +41830,7 @@ async function streamCompletion(client, params, signal, onText) {
|
|
|
41659
41830
|
const detail = redactSecrets(
|
|
41660
41831
|
String((typeof raw === "string" ? raw : raw?.error || raw?.message) || err?.message || String(e2))
|
|
41661
41832
|
);
|
|
41662
|
-
const msg = typeof err?.status === "number" ?
|
|
41833
|
+
const msg = typeof err?.status === "number" ? `${statusPrefix(err.status, err.code)}: ${detail}` : detail;
|
|
41663
41834
|
alog("stream:create-error", msg);
|
|
41664
41835
|
throw new Error(msg);
|
|
41665
41836
|
}
|
|
@@ -41695,30 +41866,40 @@ async function streamCompletion(client, params, signal, onText) {
|
|
|
41695
41866
|
alog("stream:end", { chunks: chunkN, contentLen: content.length, toolCalls: toolCalls.length, finishReason, usage });
|
|
41696
41867
|
return { content, toolCalls, usage, finishReason };
|
|
41697
41868
|
}
|
|
41869
|
+
var LOCAL_FAILURE = {
|
|
41870
|
+
refused: "model_route_refused",
|
|
41871
|
+
unreachable: "custom_provider_unreachable"
|
|
41872
|
+
};
|
|
41873
|
+
function statusPrefix(status, code2) {
|
|
41874
|
+
if (code2 === LOCAL_FAILURE.refused) return `Status ${status} (refused locally, nothing was sent)`;
|
|
41875
|
+
if (code2 === LOCAL_FAILURE.unreachable) return `Status ${status} (custom provider unreachable)`;
|
|
41876
|
+
return `Gateway ${status}`;
|
|
41877
|
+
}
|
|
41878
|
+
async function gatewayRequest(auth, opts, url, init2) {
|
|
41879
|
+
const headers = new Headers(init2?.headers);
|
|
41880
|
+
alog("gateway:token-wait");
|
|
41881
|
+
const token = await auth.getToken().catch(() => null);
|
|
41882
|
+
if (token) headers.set("Authorization", `Bearer ${token}`);
|
|
41883
|
+
else headers.delete("Authorization");
|
|
41884
|
+
if (opts.origin) headers.set("X-Prompd-Origin", opts.origin);
|
|
41885
|
+
alog("gateway:fetch", { url, hasToken: !!token });
|
|
41886
|
+
try {
|
|
41887
|
+
const res = await fetch(url, { ...init2, headers });
|
|
41888
|
+
alog("gateway:status", res.status, res.statusText);
|
|
41889
|
+
return res;
|
|
41890
|
+
} catch (e2) {
|
|
41891
|
+
alog("gateway:fetch-error", String(e2?.message || e2));
|
|
41892
|
+
throw e2;
|
|
41893
|
+
}
|
|
41894
|
+
}
|
|
41698
41895
|
function createChatClient(auth, opts = {}) {
|
|
41699
41896
|
return new openai_default({
|
|
41700
41897
|
baseURL: gatewayBaseURL(),
|
|
41701
41898
|
// Real key lives server-side; this placeholder is replaced per-request by the
|
|
41702
|
-
// Clerk token in
|
|
41899
|
+
// Clerk token in gatewayRequest. The SDK requires a non-empty value.
|
|
41703
41900
|
apiKey: "prompd-gateway",
|
|
41704
41901
|
dangerouslyAllowBrowser: true,
|
|
41705
|
-
fetch:
|
|
41706
|
-
const headers = new Headers(init2?.headers);
|
|
41707
|
-
alog("gateway:token-wait");
|
|
41708
|
-
const token = await auth.getToken().catch(() => null);
|
|
41709
|
-
if (token) headers.set("Authorization", `Bearer ${token}`);
|
|
41710
|
-
else headers.delete("Authorization");
|
|
41711
|
-
if (opts.origin) headers.set("X-Prompd-Origin", opts.origin);
|
|
41712
|
-
alog("gateway:fetch", { url: String(url), hasToken: !!token });
|
|
41713
|
-
try {
|
|
41714
|
-
const res = await fetch(url, { ...init2, headers });
|
|
41715
|
-
alog("gateway:status", res.status, res.statusText);
|
|
41716
|
-
return res;
|
|
41717
|
-
} catch (e2) {
|
|
41718
|
-
alog("gateway:fetch-error", String(e2?.message || e2));
|
|
41719
|
-
throw e2;
|
|
41720
|
-
}
|
|
41721
|
-
}
|
|
41902
|
+
fetch: (url, init2) => gatewayRequest(auth, opts, String(url), init2)
|
|
41722
41903
|
});
|
|
41723
41904
|
}
|
|
41724
41905
|
|
|
@@ -41875,6 +42056,7 @@ var BUILTIN_NAMESPACES = {
|
|
|
41875
42056
|
sidecar_fs_read_file: "sidecar",
|
|
41876
42057
|
sidecar_fs_write_file: "sidecar",
|
|
41877
42058
|
sidecar_fs_read_bytes: "sidecar",
|
|
42059
|
+
sidecar_fs_write_bytes: "sidecar",
|
|
41878
42060
|
sidecar_fs_list_dir: "sidecar",
|
|
41879
42061
|
sidecar_fs_delete: "sidecar",
|
|
41880
42062
|
sidecar_shell_exec: "sidecar",
|
|
@@ -46522,7 +46704,7 @@ var FLAG_TO_KEY = {
|
|
|
46522
46704
|
"--default-model": "defaultModel",
|
|
46523
46705
|
"--name": "name"
|
|
46524
46706
|
};
|
|
46525
|
-
var DEFAULT_GUEST_IMAGE2 = "prompd/corenel-sandbox:0.8.
|
|
46707
|
+
var DEFAULT_GUEST_IMAGE2 = "prompd/corenel-sandbox:0.8.6";
|
|
46526
46708
|
function parseArgsWithProvenance(argv) {
|
|
46527
46709
|
const explicit = /* @__PURE__ */ new Set();
|
|
46528
46710
|
for (const a2 of argv) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@corenel/sidecar",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.7",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "Elastic-2.0",
|
|
6
6
|
"description": "Prompd sidecar — a local capability server. Run it next to Prompd (prompd.app) so the browser app can reach your machine: local LLMs (Ollama/LM Studio/vLLM) without CORS, your filesystem, and (opt-in) shell.",
|
|
@@ -36,10 +36,10 @@
|
|
|
36
36
|
"esbuild": "^0.21.5",
|
|
37
37
|
"tsx": "^4.19.2",
|
|
38
38
|
"typescript": "^5.9.3",
|
|
39
|
-
"@corenel/protocol": "0.7.
|
|
40
|
-
"@corenel/tools-node": "0.3.5",
|
|
39
|
+
"@corenel/protocol": "0.7.3",
|
|
41
40
|
"@corenel/crew": "0.0.0",
|
|
42
|
-
"@corenel/
|
|
41
|
+
"@corenel/tools-node": "0.3.7",
|
|
42
|
+
"@corenel/harness": "0.7.5"
|
|
43
43
|
},
|
|
44
44
|
"repository": {
|
|
45
45
|
"type": "git",
|