experimental-ash 0.63.0 → 0.64.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.
Files changed (52) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/dist/docs/public/advanced/auth-and-route-protection.mdx +26 -20
  3. package/dist/docs/public/channels/ash.mdx +5 -1
  4. package/dist/src/chunks/{use-ash-agent-CRWVA4i-.js → use-ash-agent-D7LvOfgD.js} +13 -7
  5. package/dist/src/chunks/{use-ash-agent-BQJLh7KU.js → use-ash-agent-DPYNpc07.js} +13 -7
  6. package/dist/src/cli/dev/tui/runner.d.ts +6 -0
  7. package/dist/src/cli/dev/tui/runner.js +1 -1
  8. package/dist/src/cli/dev/tui/tui.js +1 -1
  9. package/dist/src/client/client-error.js +1 -1
  10. package/dist/src/execution/durable-session-migrations/chain.d.ts +7 -0
  11. package/dist/src/execution/durable-session-migrations/chain.js +1 -1
  12. package/dist/src/execution/durable-session-migrations/turn-workflow-v0-to-v1.d.ts +12 -0
  13. package/dist/src/execution/durable-session-migrations/turn-workflow-v0-to-v1.js +1 -0
  14. package/dist/src/execution/durable-session-migrations/turn-workflow.d.ts +40 -0
  15. package/dist/src/execution/durable-session-migrations/turn-workflow.js +1 -0
  16. package/dist/src/execution/sandbox/prewarm.d.ts +1 -0
  17. package/dist/src/execution/sandbox/prewarm.js +1 -1
  18. package/dist/src/execution/turn-workflow.d.ts +3 -13
  19. package/dist/src/execution/turn-workflow.js +1 -1
  20. package/dist/src/execution/workflow-steps.d.ts +5 -11
  21. package/dist/src/execution/workflow-steps.js +1 -1
  22. package/dist/src/internal/application/package.js +1 -1
  23. package/dist/src/internal/nitro/dev-runtime-artifacts.d.ts +32 -0
  24. package/dist/src/internal/nitro/dev-runtime-artifacts.js +1 -0
  25. package/dist/src/internal/nitro/host/artifacts-config.js +1 -1
  26. package/dist/src/internal/nitro/host/configure-nitro-routes.js +3 -3
  27. package/dist/src/internal/nitro/host/create-application-nitro.js +1 -1
  28. package/dist/src/internal/nitro/host/dev-authored-source-watcher.js +1 -1
  29. package/dist/src/internal/nitro/host/prepare-application-host.d.ts +3 -1
  30. package/dist/src/internal/nitro/host/prepare-application-host.js +1 -1
  31. package/dist/src/internal/nitro/host/start-development-server.js +1 -1
  32. package/dist/src/internal/nitro/routes/dev-runtime-artifacts.d.ts +10 -0
  33. package/dist/src/internal/nitro/routes/dev-runtime-artifacts.js +1 -0
  34. package/dist/src/internal/nitro/routes/runtime-artifacts.d.ts +1 -0
  35. package/dist/src/internal/nitro/routes/runtime-artifacts.js +1 -1
  36. package/dist/src/internal/nitro/routes/schedule-task.js +1 -1
  37. package/dist/src/packages/ash-scaffold/src/channels.js +1 -1
  38. package/dist/src/packages/ash-scaffold/src/web-template.js +5 -16
  39. package/dist/src/protocol/routes.d.ts +9 -0
  40. package/dist/src/protocol/routes.js +1 -1
  41. package/dist/src/public/channels/ash.js +1 -1
  42. package/dist/src/public/channels/auth.d.ts +45 -3
  43. package/dist/src/public/channels/auth.js +1 -1
  44. package/dist/src/public/channels/slack/inbound.d.ts +3 -1
  45. package/dist/src/public/channels/slack/inbound.js +1 -1
  46. package/dist/src/services/dev-client.d.ts +27 -0
  47. package/dist/src/services/dev-client.js +1 -1
  48. package/dist/src/svelte/index.js +1 -1
  49. package/dist/src/svelte/use-ash-agent.js +1 -1
  50. package/dist/src/vue/index.js +1 -1
  51. package/dist/src/vue/use-ash-agent.js +1 -1
  52. package/package.json +1 -1
@@ -1 +1 @@
1
- import{isLocalDevelopmentServerUrl,resolveDevelopmentClientHeaders,resolveDevelopmentOidcToken}from"#services/dev-client/request-headers.js";import{Client}from"#client/index.js";var BufferedDevelopmentMessageClient=class{#e;#t;constructor(i){let a=isLocalDevelopmentServerUrl(i.serverUrl),o={headers:()=>resolveDevelopmentClientHeaders({serverUrl:i.serverUrl}),host:i.serverUrl};this.#e=new Client(a?o:{...o,auth:{bearer:resolveDevelopmentOidcToken}}),this.#t=this.#e.session()}async clear(){this.#t=this.#e.session()}async close(){}getSession(){return this.#t.state}async send(e){let t=await this.#t.send({clientContext:e.clientContext,inputResponses:e.inputResponses,message:e.message});e.onResponseStart?.({sessionId:t.sessionId});let n=[];for await(let r of t)n.push(r),e.onEvent?.(r);return{events:n,sessionId:t.sessionId,session:this.#t.state}}};function createDevClient(e){return new BufferedDevelopmentMessageClient(e)}export{createDevClient};
1
+ import{ASH_DEV_RUNTIME_ARTIFACTS_ROUTE_PATH}from"#protocol/routes.js";import{isLocalDevelopmentServerUrl,resolveDevelopmentClientHeaders,resolveDevelopmentOidcToken}from"#services/dev-client/request-headers.js";import{Client}from"#client/index.js";var BufferedDevelopmentMessageClient=class{#e;#t;#n;constructor(e){let a=isLocalDevelopmentServerUrl(e.serverUrl);this.#t=createDevelopmentRuntimeArtifactSessionRefresher({serverUrl:e.serverUrl});let o={headers:()=>resolveDevelopmentClientHeaders({serverUrl:e.serverUrl}),host:e.serverUrl};this.#e=new Client(a?o:{...o,auth:{bearer:resolveDevelopmentOidcToken}}),this.#n=this.#e.session()}async clear(){this.#n=this.#e.session(),this.#t.clear()}async close(){}getSession(){return this.#n.state}async send(e){this.#n=await this.#t.refresh({createSession:()=>this.#e.session(),inputResponses:e.inputResponses,message:e.message,session:this.#n});let t=await this.#n.send({clientContext:e.clientContext,inputResponses:e.inputResponses,message:e.message});e.onResponseStart?.({sessionId:t.sessionId});let n=[];for await(let r of t)n.push(r),e.onEvent?.(r);return{events:n,sessionId:t.sessionId,session:this.#n.state}}},LocalDevelopmentRuntimeArtifactSessionRefresher=class{#e;#t;#n;constructor(e){this.#e=isLocalDevelopmentServerUrl(e.serverUrl),this.#t=e.serverUrl}clear(){this.#n=void 0}async refresh(e){if(!this.#e||!shouldRefreshRuntimeArtifactsForTurn(e))return e.session;let t=await this.#r();if(t===void 0)return e.session;let n=e.session;return this.#n!==void 0&&this.#n!==t&&n.state.continuationToken!==void 0&&(n=e.createSession()),this.#n=t,n}async#r(){try{let t=new URL(ASH_DEV_RUNTIME_ARTIFACTS_ROUTE_PATH,this.#t),r=await fetch(t,{headers:await resolveDevelopmentClientHeaders({serverUrl:this.#t})});if(!r.ok)return;let i=await r.json();return typeof i.revision==`string`&&i.revision.length>0?i.revision:void 0}catch{return}}};function shouldRefreshRuntimeArtifactsForTurn(e){return e.message!==void 0&&(e.inputResponses?.length??0)===0}function createDevelopmentRuntimeArtifactSessionRefresher(e){return new LocalDevelopmentRuntimeArtifactSessionRefresher(e)}function createDevClient(e){return new BufferedDevelopmentMessageClient(e)}export{createDevClient,createDevelopmentRuntimeArtifactSessionRefresher};
@@ -1,3 +1,3 @@
1
- import { n as defaultMessageReducer, t as useAshAgent } from "../chunks/use-ash-agent-BQJLh7KU.js";
1
+ import { n as defaultMessageReducer, t as useAshAgent } from "../chunks/use-ash-agent-DPYNpc07.js";
2
2
 
3
3
  export { defaultMessageReducer, useAshAgent };
@@ -1,3 +1,3 @@
1
- import { t as useAshAgent } from "../chunks/use-ash-agent-BQJLh7KU.js";
1
+ import { t as useAshAgent } from "../chunks/use-ash-agent-DPYNpc07.js";
2
2
 
3
3
  export { useAshAgent };
@@ -1,3 +1,3 @@
1
- import { n as defaultMessageReducer, t as useAshAgent } from "../chunks/use-ash-agent-CRWVA4i-.js";
1
+ import { n as defaultMessageReducer, t as useAshAgent } from "../chunks/use-ash-agent-D7LvOfgD.js";
2
2
 
3
3
  export { defaultMessageReducer, useAshAgent };
@@ -1,3 +1,3 @@
1
- import { t as useAshAgent } from "../chunks/use-ash-agent-CRWVA4i-.js";
1
+ import { t as useAshAgent } from "../chunks/use-ash-agent-D7LvOfgD.js";
2
2
 
3
3
  export { useAshAgent };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "experimental-ash",
3
- "version": "0.63.0",
3
+ "version": "0.64.1",
4
4
  "description": "Filesystem-first framework for durable backend AI agents that run anywhere.",
5
5
  "keywords": [
6
6
  "agent-framework",