@flue/sdk 0.4.0 → 0.4.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/dist/client.mjs CHANGED
@@ -1,8 +1,8 @@
1
1
  import { u as discoverSessionContext } from "./result-K1IRhWKM.mjs";
2
2
  import "./providers-DeFRIwp0.mjs";
3
- import { a as assertRoleExists } from "./session-CO_uGVOk.mjs";
3
+ import { a as assertRoleExists } from "./session-CFOByKnM.mjs";
4
4
  import { bashFactoryToSessionEnv, createCwdSessionEnv } from "./sandbox.mjs";
5
- import { n as AgentClient, t as connectMcpServer } from "./mcp-2SW_tpox.mjs";
5
+ import { n as AgentClient, t as connectMcpServer } from "./mcp-DM6yv_Qc.mjs";
6
6
  import { Type } from "@mariozechner/pi-ai";
7
7
 
8
8
  //#region src/client.ts
@@ -1,7 +1,7 @@
1
1
  import "../result-K1IRhWKM.mjs";
2
2
  import { c as CLOUDFLARE_AI_BINDING_API, n as getModelBinding } from "../providers-DeFRIwp0.mjs";
3
3
  import { t as abortErrorFor } from "../abort-Bg3qsAkU.mjs";
4
- import "../session-CO_uGVOk.mjs";
4
+ import "../session-CFOByKnM.mjs";
5
5
  import { createSandboxSessionEnv } from "../sandbox.mjs";
6
6
  import { createAssistantMessageEventStream, parseStreamingJson } from "@mariozechner/pi-ai";
7
7
  import { Workspace, WorkspaceFileSystem } from "@cloudflare/shell";
package/dist/internal.mjs CHANGED
@@ -1,9 +1,9 @@
1
1
  import "./result-K1IRhWKM.mjs";
2
2
  import { i as handleAgentRequest, n as createDefaultFlueApp, t as configureFlueRuntime } from "./flue-app-DeTOZjPs.mjs";
3
3
  import { r as getProviderConfiguration, s as resolveRegisteredModel } from "./providers-DeFRIwp0.mjs";
4
- import { t as InMemorySessionStore } from "./session-CO_uGVOk.mjs";
4
+ import { t as InMemorySessionStore } from "./session-CFOByKnM.mjs";
5
5
  import { bashFactoryToSessionEnv } from "./sandbox.mjs";
6
- import "./mcp-2SW_tpox.mjs";
6
+ import "./mcp-DM6yv_Qc.mjs";
7
7
  import { createFlueContext } from "./client.mjs";
8
8
  import { getModel } from "@mariozechner/pi-ai";
9
9
 
@@ -1,6 +1,6 @@
1
1
  import { u as discoverSessionContext } from "./result-K1IRhWKM.mjs";
2
2
  import { n as createCallHandle } from "./abort-Bg3qsAkU.mjs";
3
- import { a as assertRoleExists, n as Session, r as deleteSessionTree } from "./session-CO_uGVOk.mjs";
3
+ import { a as assertRoleExists, n as Session, r as deleteSessionTree } from "./session-CFOByKnM.mjs";
4
4
  import { createCwdSessionEnv, createFlueFs } from "./sandbox.mjs";
5
5
  import { Client } from "@modelcontextprotocol/sdk/client/index.js";
6
6
  import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js";
package/dist/sandbox.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  import "./result-K1IRhWKM.mjs";
2
2
  import "./providers-DeFRIwp0.mjs";
3
3
  import { t as abortErrorFor } from "./abort-Bg3qsAkU.mjs";
4
- import { i as normalizePath } from "./session-CO_uGVOk.mjs";
4
+ import { i as normalizePath } from "./session-CFOByKnM.mjs";
5
5
 
6
6
  //#region src/sandbox.ts
7
7
  /** Adapt a SessionEnv to the public FlueFs surface. */
@@ -872,7 +872,7 @@ var Session = class {
872
872
  const toolCallId = crypto.randomUUID();
873
873
  const args = { command };
874
874
  if (options?.cwd !== void 0) args.cwd = options.cwd;
875
- if (options?.env !== void 0) args.env = options.env;
875
+ if (options?.env !== void 0) args.env = redactEnvValues(options.env);
876
876
  this.emit({
877
877
  type: "tool_start",
878
878
  toolName: "bash",
@@ -1530,6 +1530,9 @@ async function deleteSessionTree(store, storageKey, seen = /* @__PURE__ */ new S
1530
1530
  function getErrorMessage(error) {
1531
1531
  return error instanceof Error ? error.message : String(error);
1532
1532
  }
1533
+ function redactEnvValues(env) {
1534
+ return Object.fromEntries(Object.keys(env).map((key) => [key, "<redacted>"]));
1535
+ }
1533
1536
 
1534
1537
  //#endregion
1535
1538
  export { assertRoleExists as a, normalizePath as i, Session as n, deleteSessionTree as r, InMemorySessionStore as t };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flue/sdk",
3
- "version": "0.4.0",
3
+ "version": "0.4.1",
4
4
  "type": "module",
5
5
  "license": "Apache-2.0",
6
6
  "exports": {