@google-labs/breadboard
Advanced tools
Comparing version 0.18.0 to 0.19.0
@@ -232,3 +232,3 @@ /** | ||
*/ | ||
const ge=t=>{const e=t.proxy?.[0];if(!e)return t.kits;if("http"!==e.location)throw new Error("Only HTTP node proxy server is supported at this time.");if(!e.url)throw new Error("No node proxy server URL provided.");return[new Ut(new de(e.url)).createProxyKit(e.nodes),...t.kits]};async function*be(t){if(t.remote){if("worker"!==t.remote.type)throw new Error(`Unsupported harness configuration: ${JSON.stringify(t,null,2)}`);{const e=t.remote&&t.remote.url;if(!e)throw new Error("Worker harness requires a worker URL");yield*async function*(t,e,r){const s=ye(t),n=new vt(s),o=new nt(new kt(n.send("load"))),i=new Mt(new $t(n.receive("proxy"))),a=new gt(new kt(n.send("run")));await o.load(e.url),yield*A((async t=>{const s=[me(t),...e.kits],n=e.proxy?.[0]?.nodes;i.serve({kits:s,proxy:n});for await(const e of a.run(r))await t(e)}))}(e,t)}}else yield*A((async e=>{const r=[me(e),...ge(t)];for await(const s of async function*(t,e){yield*A((async r=>{const s=t.runner||await we(t),n=t.loader||G();try{const o=t.diagnostics?new ot((async t=>{await r(pe(t))})):void 0;for await(const i of s.run({probe:o,kits:e,loader:n,base:t.base,signal:t.signal,inputs:t.inputs}))await r(he(i));await r(le())}catch(t){const e=it(t);console.error("Local Run error:",e),await r(fe(e))}}))}(t,r))await e(s)}))}export{me as createSecretAskingKit,ye as createWorker,Ft as defineServeConfig,be as run,Wt as serve}; | ||
const ge=t=>{const e=t.proxy?.[0];if(!e)return t.kits;if("http"!==e.location)throw new Error("Only HTTP node proxy server is supported at this time.");if(!e.url)throw new Error("No node proxy server URL provided.");return[new Ut(new de(e.url)).createProxyKit(e.nodes),...t.kits]};async function*be(t){if(t.remote){if("worker"!==t.remote.type)throw new Error(`Unsupported harness configuration: ${JSON.stringify(t,null,2)}`);{const e=t.remote&&t.remote.url;if(!e)throw new Error("Worker harness requires a worker URL");yield*async function*(t,e,r){const s=ye(t),n=new vt(s),o=new nt(new kt(n.send("load"))),i=new Mt(new $t(n.receive("proxy"))),a=new gt(new kt(n.send("run")));await o.load(e.url),yield*A((async t=>{const s=[me(t),...e.kits],n=e.proxy?.[0]?.nodes;i.serve({kits:s,proxy:n});for await(const e of a.run(r))await t(e)}))}(e,t)}}else yield*A((async e=>{const r=[...t.interactiveSecrets?[me(e)]:[],...ge(t)];for await(const s of async function*(t,e){yield*A((async r=>{const s=t.runner||await we(t),n=t.loader||G();try{const o=t.diagnostics?new ot((async t=>{await r(pe(t))})):void 0;for await(const i of s.run({probe:o,kits:e,loader:n,base:t.base,signal:t.signal,inputs:t.inputs}))await r(he(i));await r(le())}catch(t){const e=it(t);console.error("Local Run error:",e),await r(fe(e))}}))}(t,r))await e(s)}))}export{me as createSecretAskingKit,ye as createWorker,Ft as defineServeConfig,be as run,Wt as serve}; | ||
//# sourceMappingURL=harness.min.js.map |
@@ -81,4 +81,11 @@ /** | ||
inputs?: InputValues; | ||
/** | ||
* Specifies whether or not secrets are asked for interactively. When `true`, | ||
* the `secret` result will start showing up in the run results whenever | ||
* the secret is asked for. Otherwise, the `secrets` node will try to find | ||
* the secrets on its own. | ||
*/ | ||
interactiveSecrets?: boolean; | ||
}; | ||
export declare function run(config: RunConfig): AsyncGenerator<HarnessRunResult, void, unknown>; | ||
//# sourceMappingURL=run.d.ts.map |
@@ -29,3 +29,6 @@ /** | ||
yield* asyncGen(async (next) => { | ||
const kits = [createSecretAskingKit(next), ...configureKits(config)]; | ||
const secretAskingKit = config.interactiveSecrets | ||
? [createSecretAskingKit(next)] | ||
: []; | ||
const kits = [...secretAskingKit, ...configureKits(config)]; | ||
for await (const data of runLocally(config, kits)) { | ||
@@ -32,0 +35,0 @@ await next(data); |
@@ -6,3 +6,3 @@ { | ||
}, | ||
"version": "0.18.0", | ||
"version": "0.19.0", | ||
"description": "A library for rapid generative AI application prototyping", | ||
@@ -9,0 +9,0 @@ "main": "./dist/src/index.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
2089224
14602