experimental-ash 0.8.2 → 0.9.0

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 (57) hide show
  1. package/CHANGELOG.md +106 -0
  2. package/dist/docs/public/channels/slack.md +53 -25
  3. package/dist/src/compiled/.vendor-stamp.json +14 -14
  4. package/dist/src/compiled/@ai-sdk/anthropic/index.js +2 -2
  5. package/dist/src/compiled/@ai-sdk/google/index.js +4 -4
  6. package/dist/src/compiled/@ai-sdk/mcp/index.js +1 -1
  7. package/dist/src/compiled/@ai-sdk/openai/index.js +6 -6
  8. package/dist/src/compiled/@ai-sdk/otel/index.js +1 -1
  9. package/dist/src/compiled/@ai-sdk/provider/_json-schema.d.ts +5 -0
  10. package/dist/src/compiled/@ai-sdk/provider/index.d.ts +6632 -1
  11. package/dist/src/compiled/@chat-adapter/slack/_chat-adapter-shared.d.ts +9 -0
  12. package/dist/src/compiled/@chat-adapter/slack/index.d.ts +632 -54
  13. package/dist/src/compiled/@chat-adapter/slack/index.js +25 -29
  14. package/dist/src/compiled/@chat-adapter/slack/package.json +1 -1
  15. package/dist/src/compiled/@chat-adapter/state-memory/index.d.ts +41 -25
  16. package/dist/src/compiled/@chat-adapter/state-memory/package.json +1 -1
  17. package/dist/src/compiled/@standard-schema/spec/index.d.ts +115 -62
  18. package/dist/src/compiled/@vercel/sandbox/index.d.ts +4 -1
  19. package/dist/src/compiled/@vercel/sandbox/index.js +5 -5
  20. package/dist/src/compiled/@workflow/core/index.js +1 -1
  21. package/dist/src/compiled/@workflow/core/runtime.d.ts +6 -2
  22. package/dist/src/compiled/@workflow/core/runtime.js +4 -4
  23. package/dist/src/compiled/@workflow/core/workflow.js +1 -1
  24. package/dist/src/compiled/@workflow/errors/_ms.d.ts +4 -0
  25. package/dist/src/compiled/@workflow/errors/error-codes.d.ts +17 -0
  26. package/dist/src/compiled/@workflow/errors/index.d.ts +438 -56
  27. package/dist/src/compiled/@workflow/errors/index.js +1 -1
  28. package/dist/src/compiled/_chunks/node/{auth-CdwuOxMs.js → auth-vbe4XEEK.js} +2 -2
  29. package/dist/src/compiled/_chunks/node/{dist-B6IOtzm1.js → dist-BdWHjlRQ.js} +12 -12
  30. package/dist/src/compiled/_chunks/node/retry-BOcy5BbJ.js +1 -0
  31. package/dist/src/compiled/_chunks/workflow/{context-errors-CXifqq6a.js → context-errors-zbKocOyk.js} +1 -1
  32. package/dist/src/compiled/_chunks/workflow/{dist-BuELZxm6.js → dist-Ci2brnHh.js} +3 -3
  33. package/dist/src/compiled/_chunks/workflow/{resume-hook-CgfgCU87.js → resume-hook-CL8Ed91K.js} +2 -2
  34. package/dist/src/compiled/_chunks/workflow/sleep-Dn3i9nxI.js +1 -0
  35. package/dist/src/compiled/chat/_mdast.d.ts +24 -0
  36. package/dist/src/compiled/chat/_workflow-serde.d.ts +5 -0
  37. package/dist/src/compiled/chat/index.d.ts +3851 -72
  38. package/dist/src/compiled/chat/index.js +1 -1
  39. package/dist/src/compiled/chat/jsx-runtime-DxGwoLu2.d.ts +782 -0
  40. package/dist/src/compiled/chat/package.json +1 -1
  41. package/dist/src/compiled/just-bash/index.js +1 -1
  42. package/dist/src/execution/authorization-challenge-defaults.d.ts +1 -1
  43. package/dist/src/execution/authorization-challenge-defaults.js +1 -1
  44. package/dist/src/internal/application/package.js +1 -1
  45. package/dist/src/public/channels/slack/index.d.ts +1 -1
  46. package/dist/src/public/channels/slack/slack.js +4 -1
  47. package/dist/src/public/channels/slack/slackChannel.d.ts +64 -1
  48. package/dist/src/public/channels/slack/slackChannel.js +50 -7
  49. package/dist/src/runtime/connections/authorization-tokens.d.ts +1 -1
  50. package/dist/src/runtime/connections/authorization-tokens.js +1 -1
  51. package/package.json +16 -16
  52. package/dist/src/compiled/_chunks/node/ms-B2k_qBoq.js +0 -1
  53. package/dist/src/compiled/_chunks/workflow/sleep-BzS_cSYx.js +0 -1
  54. /package/dist/src/compiled/_chunks/workflow/{dist-C9DdsXoK.js → dist-0iNBqPYp.js} +0 -0
  55. /package/dist/src/compiled/_chunks/workflow/{dist-BHbmiLmM.js → dist-D774SUM4.js} +0 -0
  56. /package/dist/src/compiled/_chunks/workflow/{src-CidBwKAD.js → src-ClRYdO4-.js} +0 -0
  57. /package/dist/src/compiled/_chunks/workflow/{symbols-BC0BVTM7.js → symbols-D-4tVV8x.js} +0 -0
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "experimental-ash-compiled-chat-adapter-slack",
3
- "version": "4.27.0",
3
+ "version": "4.28.1",
4
4
  "private": true,
5
5
  "type": "module",
6
6
  "license": "MIT"
@@ -1,28 +1,44 @@
1
- import type { Lock, QueueEntry, StateAdapter } from "#compiled/chat/index.js";
1
+ import { StateAdapter, Lock, QueueEntry } from '#compiled/chat/index.js';
2
2
 
3
- export declare class MemoryStateAdapter implements StateAdapter {
4
- connect(): Promise<void>;
5
- disconnect(): Promise<void>;
6
- subscribe(threadId: string): Promise<void>;
7
- unsubscribe(threadId: string): Promise<void>;
8
- isSubscribed(threadId: string): Promise<boolean>;
9
- acquireLock(threadId: string, ttlMs: number): Promise<Lock | null>;
10
- forceReleaseLock(threadId: string): Promise<void>;
11
- releaseLock(lock: Lock): Promise<void>;
12
- extendLock(lock: Lock, ttlMs: number): Promise<boolean>;
13
- get<T = unknown>(key: string): Promise<T | null>;
14
- set<T = unknown>(key: string, value: T, ttlMs?: number): Promise<void>;
15
- setIfNotExists(key: string, value: unknown, ttlMs?: number): Promise<boolean>;
16
- delete(key: string): Promise<void>;
17
- appendToList(
18
- key: string,
19
- value: unknown,
20
- options?: { maxLength?: number | undefined; ttlMs?: number | undefined },
21
- ): Promise<void>;
22
- enqueue(threadId: string, entry: QueueEntry, maxSize: number): Promise<number>;
23
- dequeue(threadId: string): Promise<QueueEntry | null>;
24
- queueDepth(threadId: string): Promise<number>;
25
- getList<T = unknown>(key: string): Promise<T[]>;
3
+ /**
4
+ * In-memory state adapter for development and testing.
5
+ *
6
+ * WARNING: State is not persisted across restarts.
7
+ * Use RedisStateAdapter for production.
8
+ */
9
+ declare class MemoryStateAdapter implements StateAdapter {
10
+ private readonly subscriptions;
11
+ private readonly locks;
12
+ private readonly cache;
13
+ private readonly queues;
14
+ private connected;
15
+ private connectPromise;
16
+ connect(): Promise<void>;
17
+ disconnect(): Promise<void>;
18
+ subscribe(threadId: string): Promise<void>;
19
+ unsubscribe(threadId: string): Promise<void>;
20
+ isSubscribed(threadId: string): Promise<boolean>;
21
+ acquireLock(threadId: string, ttlMs: number): Promise<Lock | null>;
22
+ forceReleaseLock(threadId: string): Promise<void>;
23
+ releaseLock(lock: Lock): Promise<void>;
24
+ extendLock(lock: Lock, ttlMs: number): Promise<boolean>;
25
+ get<T = unknown>(key: string): Promise<T | null>;
26
+ set<T = unknown>(key: string, value: T, ttlMs?: number): Promise<void>;
27
+ setIfNotExists(key: string, value: unknown, ttlMs?: number): Promise<boolean>;
28
+ delete(key: string): Promise<void>;
29
+ appendToList(key: string, value: unknown, options?: {
30
+ maxLength?: number;
31
+ ttlMs?: number;
32
+ }): Promise<void>;
33
+ enqueue(threadId: string, entry: QueueEntry, maxSize: number): Promise<number>;
34
+ dequeue(threadId: string): Promise<QueueEntry | null>;
35
+ queueDepth(threadId: string): Promise<number>;
36
+ getList<T = unknown>(key: string): Promise<T[]>;
37
+ private ensureConnected;
38
+ private cleanExpiredLocks;
39
+ _getSubscriptionCount(): number;
40
+ _getLockCount(): number;
26
41
  }
42
+ declare function createMemoryState(): MemoryStateAdapter;
27
43
 
28
- export declare function createMemoryState(): StateAdapter;
44
+ export { MemoryStateAdapter, createMemoryState };
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "experimental-ash-compiled-chat-adapter-state-memory",
3
- "version": "4.27.0",
3
+ "version": "4.28.1",
4
4
  "private": true,
5
5
  "type": "module",
6
6
  "license": "MIT"
@@ -1,66 +1,119 @@
1
- export interface StandardSchemaV1<Input = unknown, Output = Input> {
2
- readonly "~standard": StandardSchemaV1.Props<Input, Output>;
1
+ /** The Standard Typed interface. This is a base type extended by other specs. */
2
+ interface StandardTypedV1<Input = unknown, Output = Input> {
3
+ /** The Standard properties. */
4
+ readonly "~standard": StandardTypedV1.Props<Input, Output>;
3
5
  }
4
-
5
- export namespace StandardSchemaV1 {
6
- export interface Props<Input = unknown, Output = Input> {
7
- readonly version: 1;
8
- readonly vendor: string;
9
- readonly validate: (value: unknown) => Result<Output> | Promise<Result<Output>>;
10
- readonly types?: Types<Input, Output> | undefined;
11
- }
12
-
13
- export interface Types<Input = unknown, Output = Input> {
14
- readonly input: Input;
15
- readonly output: Output;
16
- }
17
-
18
- export type Result<Output> = SuccessResult<Output> | FailureResult;
19
-
20
- export interface SuccessResult<Output> {
21
- readonly value: Output;
22
- }
23
-
24
- export interface FailureResult {
25
- readonly issues: readonly Issue[];
26
- }
27
-
28
- export interface Issue {
29
- readonly message: string;
30
- readonly path?: readonly (PropertyKey | PathSegment)[] | undefined;
31
- }
32
-
33
- export interface PathSegment {
34
- readonly key: PropertyKey;
35
- }
6
+ declare namespace StandardTypedV1 {
7
+ /** The Standard Typed properties interface. */
8
+ interface Props<Input = unknown, Output = Input> {
9
+ /** The version number of the standard. */
10
+ readonly version: 1;
11
+ /** The vendor name of the schema library. */
12
+ readonly vendor: string;
13
+ /** Inferred types associated with the schema. */
14
+ readonly types?: Types<Input, Output> | undefined;
15
+ }
16
+ /** The Standard Typed types interface. */
17
+ interface Types<Input = unknown, Output = Input> {
18
+ /** The input type of the schema. */
19
+ readonly input: Input;
20
+ /** The output type of the schema. */
21
+ readonly output: Output;
22
+ }
23
+ /** Infers the input type of a Standard Typed. */
24
+ type InferInput<Schema extends StandardTypedV1> = NonNullable<Schema["~standard"]["types"]>["input"];
25
+ /** Infers the output type of a Standard Typed. */
26
+ type InferOutput<Schema extends StandardTypedV1> = NonNullable<Schema["~standard"]["types"]>["output"];
36
27
  }
37
-
38
- export interface StandardJSONSchemaV1<Input = unknown, Output = Input>
39
- extends StandardSchemaV1<Input, Output> {
40
- readonly "~standard": StandardSchemaV1.Props<Input, Output> & {
41
- readonly jsonSchema: StandardJSONSchemaV1.JsonSchemaProvider;
42
- };
28
+ /** The Standard Schema interface. */
29
+ interface StandardSchemaV1<Input = unknown, Output = Input> {
30
+ /** The Standard Schema properties. */
31
+ readonly "~standard": StandardSchemaV1.Props<Input, Output>;
43
32
  }
44
-
45
- export namespace StandardJSONSchemaV1 {
46
- export type Target = "draft-07" | "draft-2020-12";
47
-
48
- export interface JsonSchemaProvider {
49
- input(options: JsonSchemaOptions): unknown;
50
- output?(options: JsonSchemaOptions): unknown;
51
- }
52
-
53
- export interface JsonSchemaOptions {
54
- readonly target: Target;
55
- }
56
-
57
- export type InferOutput<TSchema> = TSchema extends {
58
- readonly "~standard": {
59
- readonly types?: {
60
- readonly output: infer Output;
61
- };
62
- };
63
- }
64
- ? Output
65
- : unknown;
33
+ declare namespace StandardSchemaV1 {
34
+ /** The Standard Schema properties interface. */
35
+ interface Props<Input = unknown, Output = Input> extends StandardTypedV1.Props<Input, Output> {
36
+ /** Validates unknown input values. */
37
+ readonly validate: (value: unknown, options?: StandardSchemaV1.Options | undefined) => Result<Output> | Promise<Result<Output>>;
38
+ }
39
+ /** The result interface of the validate function. */
40
+ type Result<Output> = SuccessResult<Output> | FailureResult;
41
+ /** The result interface if validation succeeds. */
42
+ interface SuccessResult<Output> {
43
+ /** The typed output value. */
44
+ readonly value: Output;
45
+ /** A falsy value for `issues` indicates success. */
46
+ readonly issues?: undefined;
47
+ }
48
+ interface Options {
49
+ /** Explicit support for additional vendor-specific parameters, if needed. */
50
+ readonly libraryOptions?: Record<string, unknown> | undefined;
51
+ }
52
+ /** The result interface if validation fails. */
53
+ interface FailureResult {
54
+ /** The issues of failed validation. */
55
+ readonly issues: ReadonlyArray<Issue>;
56
+ }
57
+ /** The issue interface of the failure output. */
58
+ interface Issue {
59
+ /** The error message of the issue. */
60
+ readonly message: string;
61
+ /** The path of the issue, if any. */
62
+ readonly path?: ReadonlyArray<PropertyKey | PathSegment> | undefined;
63
+ }
64
+ /** The path segment interface of the issue. */
65
+ interface PathSegment {
66
+ /** The key representing a path segment. */
67
+ readonly key: PropertyKey;
68
+ }
69
+ /** The Standard types interface. */
70
+ interface Types<Input = unknown, Output = Input> extends StandardTypedV1.Types<Input, Output> {
71
+ }
72
+ /** Infers the input type of a Standard. */
73
+ type InferInput<Schema extends StandardTypedV1> = StandardTypedV1.InferInput<Schema>;
74
+ /** Infers the output type of a Standard. */
75
+ type InferOutput<Schema extends StandardTypedV1> = StandardTypedV1.InferOutput<Schema>;
66
76
  }
77
+ /** The Standard JSON Schema interface. */
78
+ interface StandardJSONSchemaV1<Input = unknown, Output = Input> {
79
+ /** The Standard JSON Schema properties. */
80
+ readonly "~standard": StandardJSONSchemaV1.Props<Input, Output>;
81
+ }
82
+ declare namespace StandardJSONSchemaV1 {
83
+ /** The Standard JSON Schema properties interface. */
84
+ interface Props<Input = unknown, Output = Input> extends StandardTypedV1.Props<Input, Output> {
85
+ /** Methods for generating the input/output JSON Schema. */
86
+ readonly jsonSchema: StandardJSONSchemaV1.Converter;
87
+ }
88
+ /** The Standard JSON Schema converter interface. */
89
+ interface Converter {
90
+ /** Converts the input type to JSON Schema. May throw if conversion is not supported. */
91
+ readonly input: (options: StandardJSONSchemaV1.Options) => Record<string, unknown>;
92
+ /** Converts the output type to JSON Schema. May throw if conversion is not supported. */
93
+ readonly output: (options: StandardJSONSchemaV1.Options) => Record<string, unknown>;
94
+ }
95
+ /**
96
+ * The target version of the generated JSON Schema.
97
+ *
98
+ * It is *strongly recommended* that implementers support `"draft-2020-12"` and `"draft-07"`, as they are both in wide use. All other targets can be implemented on a best-effort basis. Libraries should throw if they don't support a specified target.
99
+ *
100
+ * The `"openapi-3.0"` target is intended as a standardized specifier for OpenAPI 3.0 which is a superset of JSON Schema `"draft-04"`.
101
+ */
102
+ type Target = "draft-2020-12" | "draft-07" | "openapi-3.0" | ({} & string);
103
+ /** The options for the input/output methods. */
104
+ interface Options {
105
+ /** Specifies the target version of the generated JSON Schema. Support for all versions is on a best-effort basis. If a given version is not supported, the library should throw. */
106
+ readonly target: Target;
107
+ /** Explicit support for additional vendor-specific parameters, if needed. */
108
+ readonly libraryOptions?: Record<string, unknown> | undefined;
109
+ }
110
+ /** The Standard types interface. */
111
+ interface Types<Input = unknown, Output = Input> extends StandardTypedV1.Types<Input, Output> {
112
+ }
113
+ /** Infers the input type of a Standard. */
114
+ type InferInput<Schema extends StandardTypedV1> = StandardTypedV1.InferInput<Schema>;
115
+ /** Infers the output type of a Standard. */
116
+ type InferOutput<Schema extends StandardTypedV1> = StandardTypedV1.InferOutput<Schema>;
117
+ }
118
+
119
+ export { StandardJSONSchemaV1, StandardSchemaV1, StandardTypedV1 };
@@ -71,6 +71,9 @@ export declare class Sandbox {
71
71
  params: SandboxUpdateParams,
72
72
  opts?: { signal?: AbortSignal | undefined } | undefined,
73
73
  ): Promise<void>;
74
- writeFiles(files: readonly { content: string | Uint8Array; path: string }[], options?: unknown): Promise<void>;
74
+ writeFiles(
75
+ files: readonly { content: string | Uint8Array; path: string }[],
76
+ options?: unknown,
77
+ ): Promise<void>;
75
78
  [key: string]: any;
76
79
  }