@khalilgharbaoui/opencode-claude-code-plugin 0.35.0 → 0.35.1

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/README.md CHANGED
@@ -976,6 +976,8 @@ Everything else, including every key the allowlist does not name, becomes `[reda
976
976
 
977
977
  Never in a bundle: prompt or reply text, system prompts or the appended prompt file, tool inputs or outputs, file contents, environment values, bearer tokens, the proxy `authToken`, API keys, `Authorization` headers, MCP server env or headers, URL credentials or query strings, or the raw spawn argv. The argv is kept as option names with every value replaced, which is what a spawn bug report actually needs.
978
978
 
979
+ Kept on purpose, so read it before pasting: folder paths below your home directory (project and config folder names such as `~/.claude-<account>`) and your `accounts` names. A maintainer needs both to read a cwd or an account problem, and only you can tell whether a folder or account name is something you would rather not publish.
980
+
979
981
  It is capped at 120 lines and 24,000 bytes, newest first, and says how many lines it left out. With file logging off it says so, tells you how to turn it on, and still returns the report:
980
982
 
981
983
  ```sh
package/dist/index.js CHANGED
@@ -1,5 +1,14 @@
1
- // src/claude-code-language-model.ts
2
- import { generateId as generateId3 } from "@ai-sdk/provider-utils";
1
+ // src/ids.ts
2
+ import { randomInt } from "crypto";
3
+ var ID_ALPHABET = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
4
+ var ID_LENGTH = 16;
5
+ function generateId() {
6
+ let id = "";
7
+ for (let index = 0; index < ID_LENGTH; index++) {
8
+ id += ID_ALPHABET[randomInt(ID_ALPHABET.length)];
9
+ }
10
+ return id;
11
+ }
3
12
 
4
13
  // src/host-tools.ts
5
14
  function defined(input) {
@@ -5668,7 +5677,11 @@ var BUNDLE_PREAMBLE = [
5668
5677
  "Never included: prompt or reply text, system prompts, tool inputs or outputs,",
5669
5678
  "file contents, environment values, bearer tokens, API keys, `Authorization`",
5670
5679
  "headers, MCP server env or headers, URL credentials or query strings, or the",
5671
- "raw spawn argv."
5680
+ "raw spawn argv.",
5681
+ "",
5682
+ "Kept on purpose, so read it before pasting: folder paths below your home (your",
5683
+ "project and config folder names) and your `accounts` names, which a maintainer",
5684
+ "needs to read a cwd or an account problem."
5672
5685
  ].join("\n");
5673
5686
  var BUNDLE_LOGGING_OFF = [
5674
5687
  "File logging is **off**, so there is nothing to bundle. The report above still",
@@ -9378,7 +9391,6 @@ function toFinishReason(reason = "stop") {
9378
9391
  }
9379
9392
 
9380
9393
  // src/turn-state.ts
9381
- import { generateId } from "@ai-sdk/provider-utils";
9382
9394
  function resolveResultFallbackMs() {
9383
9395
  const env = process.env.CLAUDE_CODE_RESULT_FALLBACK_MS;
9384
9396
  const parsed = env ? Number.parseInt(env, 10) : NaN;
@@ -9532,9 +9544,6 @@ function watchTurnAbort(signal) {
9532
9544
  };
9533
9545
  }
9534
9546
 
9535
- // src/stream-parser.ts
9536
- import { generateId as generateId2 } from "@ai-sdk/provider-utils";
9537
-
9538
9547
  // src/tool-mapping.ts
9539
9548
  function isWebSearchTool(name) {
9540
9549
  return name === "WebSearch" || name === "web_search";
@@ -10188,7 +10197,7 @@ function createLineHandler(state, ctx) {
10188
10197
  const idx = msg.index;
10189
10198
  if (block2.type === "thinking") {
10190
10199
  noteReasoning(state);
10191
- const reasoningId = generateId2();
10200
+ const reasoningId = generateId();
10192
10201
  state.reasoningIds.set(idx, reasoningId);
10193
10202
  }
10194
10203
  if (block2.type === "text") {
@@ -10434,7 +10443,7 @@ ${plan}
10434
10443
  if (block2.thinking && block2.thinking.length > 0) {
10435
10444
  noteReasoning(state);
10436
10445
  state.hadThinkingTextFromStream = true;
10437
- const thinkingId = generateId2();
10446
+ const thinkingId = generateId();
10438
10447
  state.controller.enqueue({
10439
10448
  type: "reasoning-start",
10440
10449
  id: thinkingId
@@ -10484,7 +10493,7 @@ ${plan}
10484
10493
  }
10485
10494
  if (block2.type === "thinking" && block2.thinking) {
10486
10495
  noteReasoning(state);
10487
- const thinkingId = generateId2();
10496
+ const thinkingId = generateId();
10488
10497
  state.controller.enqueue({
10489
10498
  type: "reasoning-start",
10490
10499
  id: thinkingId
@@ -11066,7 +11075,7 @@ var ClaudeCodeLanguageModel = class {
11066
11075
  usage,
11067
11076
  request: result.request,
11068
11077
  response: {
11069
- id: typeof sessionId === "string" && sessionId ? sessionId : generateId3(),
11078
+ id: typeof sessionId === "string" && sessionId ? sessionId : generateId(),
11070
11079
  timestamp: /* @__PURE__ */ new Date(),
11071
11080
  modelId: this.modelId
11072
11081
  },
@@ -11138,7 +11147,7 @@ var ClaudeCodeLanguageModel = class {
11138
11147
  const buffered = [];
11139
11148
  let flushed = false;
11140
11149
  const emitNote = (note) => {
11141
- const id = generateId3();
11150
+ const id = generateId();
11142
11151
  controller.enqueue({ type: "text-start", id });
11143
11152
  controller.enqueue({ type: "text-delta", id, delta: note });
11144
11153
  controller.enqueue({ type: "text-end", id });
@@ -11290,7 +11299,7 @@ var ClaudeCodeLanguageModel = class {
11290
11299
  controller.enqueue({ type: "stream-start", warnings });
11291
11300
  try {
11292
11301
  const text = await buildDoctorReport(doctorOptions);
11293
- const id = generateId3();
11302
+ const id = generateId();
11294
11303
  controller.enqueue({ type: "text-start", id });
11295
11304
  controller.enqueue({ type: "text-delta", id, delta: text });
11296
11305
  controller.enqueue({ type: "text-end", id });
@@ -11338,7 +11347,7 @@ var ClaudeCodeLanguageModel = class {
11338
11347
  controller.enqueue({ type: "stream-start", warnings });
11339
11348
  try {
11340
11349
  const answer = await answerAside();
11341
- const id = generateId3();
11350
+ const id = generateId();
11342
11351
  controller.enqueue({ type: "text-start", id });
11343
11352
  controller.enqueue({ type: "text-delta", id, delta: answer.response });
11344
11353
  controller.enqueue({ type: "text-end", id });
@@ -11364,7 +11373,7 @@ var ClaudeCodeLanguageModel = class {
11364
11373
  providerOptionsKeys: options.providerOptions ? Object.keys(options.providerOptions) : []
11365
11374
  });
11366
11375
  const text = this.synthesizeTitle(options.prompt);
11367
- const textId = generateId3();
11376
+ const textId = generateId();
11368
11377
  const stream2 = new ReadableStream({
11369
11378
  start(controller) {
11370
11379
  controller.enqueue({ type: "stream-start", warnings });
@@ -11433,7 +11442,7 @@ var ClaudeCodeLanguageModel = class {
11433
11442
  const stream2 = new ReadableStream({
11434
11443
  start(controller) {
11435
11444
  controller.enqueue({ type: "stream-start", warnings });
11436
- const id = generateId3();
11445
+ const id = generateId();
11437
11446
  controller.enqueue({ type: "text-start", id });
11438
11447
  controller.enqueue({ type: "text-delta", id, delta: note });
11439
11448
  controller.enqueue({ type: "text-end", id });