@outfitter/contracts 0.4.1 → 0.5.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.
- package/README.md +18 -15
- package/dist/actions.d.ts +8 -3
- package/dist/actions.js +25 -6
- package/dist/assert/index.d.ts +7 -3
- package/dist/assert/index.js +59 -6
- package/dist/capabilities.js +57 -8
- package/dist/context.d.ts +8 -3
- package/dist/context.js +1 -1
- package/dist/envelope.d.ts +6 -2
- package/dist/envelope.js +49 -7
- package/dist/errors.d.ts +6 -2
- package/dist/errors.js +7 -1
- package/dist/from-fetch.d.ts +7 -0
- package/dist/from-fetch.js +110 -0
- package/dist/handler.d.ts +7 -2
- package/dist/hints.d.ts +2 -0
- package/dist/index.d.ts +25 -14
- package/dist/index.js +17 -153
- package/dist/internal/error-base.d.ts +2 -0
- package/dist/internal/error-base.js +31 -0
- package/dist/internal/error-operational.d.ts +3 -0
- package/dist/internal/error-operational.js +125 -0
- package/dist/internal/error-serialization.d.ts +7 -0
- package/dist/{shared/@outfitter/contracts-3wj7xghe.js → internal/error-serialization.js} +28 -67
- package/dist/internal/error-taxonomy.d.ts +2 -0
- package/dist/internal/error-taxonomy.js +21 -0
- package/dist/internal/error-validation.d.ts +3 -0
- package/dist/internal/error-validation.js +121 -0
- package/dist/internal/safe-json.d.ts +7 -0
- package/dist/internal/safe-json.js +66 -0
- package/dist/internal/schema-converters.d.ts +26 -0
- package/dist/internal/schema-converters.js +12 -0
- package/dist/internal/schema-primitives.d.ts +10 -0
- package/dist/internal/schema-primitives.js +9 -0
- package/dist/internal/schema-types.d.ts +2 -0
- package/dist/internal/schema-types.js +9 -0
- package/dist/logging.js +11 -3
- package/dist/recovery.d.ts +6 -2
- package/dist/recovery.js +49 -6
- package/dist/resilience.d.ts +6 -2
- package/dist/resilience.js +80 -4
- package/dist/result/index.js +1 -16
- package/dist/result/utilities.js +29 -7
- package/dist/schema.d.ts +2 -1
- package/dist/schema.js +165 -2
- package/dist/serialization.d.ts +8 -2
- package/dist/serialization.js +1 -3
- package/dist/shared/@outfitter/{contracts-k71jqd1m.d.ts → contracts-10p5q75w.d.ts} +1 -1
- package/dist/shared/@outfitter/contracts-1zzcpfyg.d.ts +40 -0
- package/dist/shared/@outfitter/contracts-3f5k5tg5.d.ts +28 -0
- package/dist/shared/@outfitter/contracts-3qmyq81n.d.ts +78 -0
- package/dist/shared/@outfitter/contracts-3re9d4bp.js +114 -0
- package/dist/shared/@outfitter/contracts-735ecmbq.d.ts +107 -0
- package/dist/shared/@outfitter/contracts-7a0xmwbg.d.ts +11 -0
- package/dist/shared/@outfitter/contracts-8cmkh2db.d.ts +31 -0
- package/dist/shared/@outfitter/{contracts-agmt8915.js → contracts-c3qfce25.js} +3 -0
- package/dist/shared/@outfitter/{contracts-1waabxbk.d.ts → contracts-drwd9ywk.d.ts} +4 -1
- package/dist/shared/@outfitter/{contracts-0snpmkdt.js → contracts-hgh47193.js} +10 -4
- package/dist/shared/@outfitter/contracts-hrepwwne.js +62 -0
- package/dist/shared/@outfitter/contracts-jtn6b927.js +18 -0
- package/dist/shared/@outfitter/contracts-jtt6dnmg.js +2 -0
- package/dist/shared/@outfitter/contracts-jyhqr766.js +25 -0
- package/dist/shared/@outfitter/contracts-mehpmvwp.d.ts +164 -0
- package/dist/shared/@outfitter/contracts-msxdg52h.d.ts +125 -0
- package/dist/shared/@outfitter/{contracts-95cc3y06.d.ts → contracts-mt027fqj.d.ts} +2 -1
- package/dist/shared/@outfitter/contracts-njb2art4.d.ts +174 -0
- package/dist/shared/@outfitter/contracts-p77yjs4g.d.ts +46 -0
- package/dist/shared/@outfitter/contracts-qpbv29bg.d.ts +59 -0
- package/dist/shared/@outfitter/contracts-sawwfgb5.js +111 -0
- package/dist/shared/@outfitter/{contracts-e4m948m7.d.ts → contracts-t4txv24h.d.ts} +2 -1
- package/dist/shared/@outfitter/contracts-vbgt9rfn.d.ts +74 -0
- package/dist/shared/@outfitter/{contracts-56pcsavx.d.ts → contracts-vhajx4gg.d.ts} +8 -2
- package/dist/shared/@outfitter/contracts-vhr2ep6b.js +3 -0
- package/dist/shared/@outfitter/contracts-w7nvcwrp.d.ts +44 -0
- package/dist/shared/@outfitter/contracts-x0ppyt7e.d.ts +76 -0
- package/dist/shared/@outfitter/{contracts-0akf2sm6.d.ts → contracts-zma4mscd.d.ts} +16 -1
- package/dist/shared/@outfitter/contracts-zsgxsa91.d.ts +84 -0
- package/dist/stream.d.ts +2 -0
- package/dist/stream.js +1 -0
- package/dist/validation.d.ts +7 -3
- package/dist/validation.js +6 -2
- package/dist/wrap-error.d.ts +7 -0
- package/dist/wrap-error.js +71 -0
- package/package.json +44 -20
- package/dist/shared/@outfitter/contracts-31penhwa.d.ts +0 -81
- package/dist/shared/@outfitter/contracts-3gswmhb1.d.ts +0 -446
- package/dist/shared/@outfitter/contracts-4zaj7ejb.js +0 -52
- package/dist/shared/@outfitter/contracts-85nd53s9.js +0 -53
- package/dist/shared/@outfitter/contracts-9wtm5nsw.d.ts +0 -42
- package/dist/shared/@outfitter/contracts-cp5c6dws.js +0 -32
- package/dist/shared/@outfitter/contracts-d0tq2adf.js +0 -60
- package/dist/shared/@outfitter/contracts-mmg0npfk.d.ts +0 -30
- package/dist/shared/@outfitter/contracts-phjhz5q3.js +0 -293
- package/dist/shared/@outfitter/contracts-q0v44kef.js +0 -28
- package/dist/shared/@outfitter/contracts-r21yet6j.js +0 -80
- package/dist/shared/@outfitter/contracts-sm6vak1a.js +0 -14
- package/dist/shared/@outfitter/contracts-t79engf9.d.ts +0 -60
- package/dist/shared/@outfitter/contracts-wfht4q2b.js +0 -341
- package/dist/shared/@outfitter/contracts-zx72gyh1.js +0 -32
- /package/dist/{shared/@outfitter/contracts-37gpc56f.js → hints.js} +0 -0
package/README.md
CHANGED
|
@@ -34,7 +34,10 @@ import {
|
|
|
34
34
|
} from "@outfitter/contracts";
|
|
35
35
|
|
|
36
36
|
// Define a handler
|
|
37
|
-
const getNote: Handler<{ id: string }, Note, NotFoundError> = async (
|
|
37
|
+
const getNote: Handler<{ id: string }, Note, NotFoundError> = async (
|
|
38
|
+
input,
|
|
39
|
+
ctx
|
|
40
|
+
) => {
|
|
38
41
|
const note = await db.notes.find(input.id);
|
|
39
42
|
if (!note) return Result.err(NotFoundError.create("note", input.id));
|
|
40
43
|
return Result.ok(note);
|
|
@@ -49,21 +52,21 @@ const result = await getNote({ id: "abc123" }, ctx);
|
|
|
49
52
|
|
|
50
53
|
All error classes provide a static `create()` factory method that generates a consistent message from structured parameters. Use `create()` for structured errors and the constructor for custom messages.
|
|
51
54
|
|
|
52
|
-
| Error Class
|
|
53
|
-
|
|
54
|
-
| `ValidationError`
|
|
55
|
-
| `ValidationError`
|
|
56
|
-
| `AmbiguousError`
|
|
57
|
-
| `NotFoundError`
|
|
55
|
+
| Error Class | `create()` Signature | Generated Message |
|
|
56
|
+
| -------------------- | -------------------------------------------- | ----------------------------------------- |
|
|
57
|
+
| `ValidationError` | `create(field, reason, context?)` | `"email: format invalid"` |
|
|
58
|
+
| `ValidationError` | `fromMessage(message, context?)` | _(your message as-is)_ |
|
|
59
|
+
| `AmbiguousError` | `create(what, candidates, context?)` | `"Ambiguous heading: 2 matches found"` |
|
|
60
|
+
| `NotFoundError` | `create(resourceType, resourceId, context?)` | `"note not found: abc123"` |
|
|
58
61
|
| `AlreadyExistsError` | `create(resourceType, resourceId, context?)` | `"file already exists: notes/meeting.md"` |
|
|
59
|
-
| `ConflictError`
|
|
60
|
-
| `PermissionError`
|
|
61
|
-
| `TimeoutError`
|
|
62
|
-
| `RateLimitError`
|
|
63
|
-
| `NetworkError`
|
|
64
|
-
| `InternalError`
|
|
65
|
-
| `AuthError`
|
|
66
|
-
| `CancelledError`
|
|
62
|
+
| `ConflictError` | `create(message, context?)` | _(your message as-is)_ |
|
|
63
|
+
| `PermissionError` | `create(message, context?)` | _(your message as-is)_ |
|
|
64
|
+
| `TimeoutError` | `create(operation, timeoutMs)` | `"database query timed out after 5000ms"` |
|
|
65
|
+
| `RateLimitError` | `create(message, retryAfterSeconds?)` | _(your message as-is)_ |
|
|
66
|
+
| `NetworkError` | `create(message, context?)` | _(your message as-is)_ |
|
|
67
|
+
| `InternalError` | `create(message, context?)` | _(your message as-is)_ |
|
|
68
|
+
| `AuthError` | `create(message, reason?)` | _(your message as-is)_ |
|
|
69
|
+
| `CancelledError` | `create(message)` | _(your message as-is)_ |
|
|
67
70
|
|
|
68
71
|
### Message Casing
|
|
69
72
|
|
package/dist/actions.d.ts
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
|
-
import { ACTION_SURFACES, ActionApiSpec, ActionCliInputContext, ActionCliOption, ActionCliSpec, ActionMcpSpec, ActionRegistry, ActionSpec, ActionSurface, ActionTrpcSpec, AnyActionSpec, DEFAULT_REGISTRY_SURFACES, HttpMethod, createActionRegistry, defineAction } from "./shared/@outfitter/contracts-
|
|
2
|
-
import "./shared/@outfitter/contracts-
|
|
3
|
-
import "./shared/@outfitter/contracts-
|
|
1
|
+
import { ACTION_SURFACES, ActionApiSpec, ActionCliInputContext, ActionCliOption, ActionCliSpec, ActionMcpSpec, ActionRegistry, ActionSpec, ActionSurface, ActionTrpcSpec, AnyActionSpec, DEFAULT_REGISTRY_SURFACES, HttpMethod, createActionRegistry, defineAction } from "./shared/@outfitter/contracts-vhajx4gg.js";
|
|
2
|
+
import "./shared/@outfitter/contracts-zma4mscd.js";
|
|
3
|
+
import "./shared/@outfitter/contracts-msxdg52h.js";
|
|
4
|
+
import "./shared/@outfitter/contracts-7a0xmwbg.js";
|
|
5
|
+
import "./shared/@outfitter/contracts-735ecmbq.js";
|
|
6
|
+
import "./shared/@outfitter/contracts-mehpmvwp.js";
|
|
7
|
+
import "./shared/@outfitter/contracts-qpbv29bg.js";
|
|
8
|
+
import "./shared/@outfitter/contracts-njb2art4.js";
|
|
4
9
|
import "./shared/@outfitter/contracts-rwzqy9rn.js";
|
|
5
10
|
export { defineAction, createActionRegistry, HttpMethod, DEFAULT_REGISTRY_SURFACES, AnyActionSpec, ActionTrpcSpec, ActionSurface, ActionSpec, ActionRegistry, ActionMcpSpec, ActionCliSpec, ActionCliOption, ActionCliInputContext, ActionApiSpec, ACTION_SURFACES };
|
package/dist/actions.js
CHANGED
|
@@ -1,10 +1,29 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
}
|
|
2
|
+
// packages/contracts/src/actions.ts
|
|
3
|
+
var ACTION_SURFACES = ["cli", "mcp", "api", "server"];
|
|
4
|
+
var DEFAULT_REGISTRY_SURFACES = ACTION_SURFACES;
|
|
5
|
+
function defineAction(action) {
|
|
6
|
+
return action;
|
|
7
|
+
}
|
|
8
|
+
function createActionRegistry() {
|
|
9
|
+
const actions = new Map;
|
|
10
|
+
return {
|
|
11
|
+
add(action) {
|
|
12
|
+
actions.set(action.id, action);
|
|
13
|
+
return this;
|
|
14
|
+
},
|
|
15
|
+
list() {
|
|
16
|
+
return Array.from(actions.values());
|
|
17
|
+
},
|
|
18
|
+
get(id) {
|
|
19
|
+
return actions.get(id);
|
|
20
|
+
},
|
|
21
|
+
forSurface(surface) {
|
|
22
|
+
const defaults = DEFAULT_REGISTRY_SURFACES;
|
|
23
|
+
return Array.from(actions.values()).filter((action) => (action.surfaces ?? defaults).includes(surface));
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
}
|
|
8
27
|
export {
|
|
9
28
|
defineAction,
|
|
10
29
|
createActionRegistry,
|
package/dist/assert/index.d.ts
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
-
import { NonEmptyArray, assertDefined, assertMatches, assertNonEmpty, isNonEmptyArray } from "../shared/@outfitter/contracts-
|
|
2
|
-
import "../shared/@outfitter/contracts-
|
|
3
|
-
|
|
1
|
+
import { NonEmptyArray, assertDefined, assertMatches, assertNonEmpty, expectErr, expectOk, isNonEmptyArray } from "../shared/@outfitter/contracts-3qmyq81n.js";
|
|
2
|
+
import "../shared/@outfitter/contracts-7a0xmwbg.js";
|
|
3
|
+
import "../shared/@outfitter/contracts-735ecmbq.js";
|
|
4
|
+
import "../shared/@outfitter/contracts-mehpmvwp.js";
|
|
5
|
+
import "../shared/@outfitter/contracts-qpbv29bg.js";
|
|
6
|
+
import "../shared/@outfitter/contracts-njb2art4.js";
|
|
7
|
+
export { isNonEmptyArray, expectOk, expectErr, assertNonEmpty, assertMatches, assertDefined, NonEmptyArray };
|
package/dist/assert/index.js
CHANGED
|
@@ -1,13 +1,66 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
} from "
|
|
8
|
-
|
|
3
|
+
AssertionError
|
|
4
|
+
} from "../shared/@outfitter/contracts-vhr2ep6b.js";
|
|
5
|
+
|
|
6
|
+
// packages/contracts/src/assert/index.ts
|
|
7
|
+
import { Result } from "better-result";
|
|
8
|
+
var isNonEmptyArray = (arr) => {
|
|
9
|
+
return arr.length > 0;
|
|
10
|
+
};
|
|
11
|
+
var assertDefined = (value, message) => {
|
|
12
|
+
if (value === null || value === undefined) {
|
|
13
|
+
return Result.err(new AssertionError({ message: message ?? "Value is null or undefined" }));
|
|
14
|
+
}
|
|
15
|
+
return Result.ok(value);
|
|
16
|
+
};
|
|
17
|
+
var assertNonEmpty = (arr, message) => {
|
|
18
|
+
if (arr.length === 0) {
|
|
19
|
+
return Result.err(new AssertionError({ message: message ?? "Array is empty" }));
|
|
20
|
+
}
|
|
21
|
+
return Result.ok(arr);
|
|
22
|
+
};
|
|
23
|
+
function assertMatches(value, predicate, message) {
|
|
24
|
+
if (!predicate(value)) {
|
|
25
|
+
return Result.err(new AssertionError({
|
|
26
|
+
message: message ?? "Value does not match predicate"
|
|
27
|
+
}));
|
|
28
|
+
}
|
|
29
|
+
return Result.ok(value);
|
|
30
|
+
}
|
|
31
|
+
var formatValue = (value) => {
|
|
32
|
+
if (value instanceof Error) {
|
|
33
|
+
return value.message;
|
|
34
|
+
}
|
|
35
|
+
if (typeof value === "string") {
|
|
36
|
+
return value;
|
|
37
|
+
}
|
|
38
|
+
try {
|
|
39
|
+
return JSON.stringify(value);
|
|
40
|
+
} catch {
|
|
41
|
+
return String(value);
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
var expectOk = (result, message) => {
|
|
45
|
+
if (result.isOk()) {
|
|
46
|
+
return result.value;
|
|
47
|
+
}
|
|
48
|
+
const errorDetail = formatValue(result.error);
|
|
49
|
+
const prefix = message ? `${message}: ` : "";
|
|
50
|
+
throw new Error(`${prefix}Expected Ok, got Err: ${errorDetail}`);
|
|
51
|
+
};
|
|
52
|
+
var expectErr = (result, message) => {
|
|
53
|
+
if (result.isErr()) {
|
|
54
|
+
return result.error;
|
|
55
|
+
}
|
|
56
|
+
const valueDetail = formatValue(result.value);
|
|
57
|
+
const prefix = message ? `${message}: ` : "";
|
|
58
|
+
throw new Error(`${prefix}Expected Err, got Ok: ${valueDetail}`);
|
|
59
|
+
};
|
|
9
60
|
export {
|
|
10
61
|
isNonEmptyArray,
|
|
62
|
+
expectOk,
|
|
63
|
+
expectErr,
|
|
11
64
|
assertNonEmpty,
|
|
12
65
|
assertMatches,
|
|
13
66
|
assertDefined
|
package/dist/capabilities.js
CHANGED
|
@@ -1,12 +1,61 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
2
|
+
// packages/contracts/src/capabilities.ts
|
|
3
|
+
var CAPABILITY_SURFACES = ["cli", "mcp", "api", "server"];
|
|
4
|
+
var DEFAULT_ACTION_SURFACES = ["cli", "mcp"];
|
|
5
|
+
function capability(surfaces = DEFAULT_ACTION_SURFACES, notes) {
|
|
6
|
+
return notes ? { surfaces, notes } : { surfaces };
|
|
7
|
+
}
|
|
8
|
+
function capabilityAll(notes) {
|
|
9
|
+
return capability(CAPABILITY_SURFACES, notes);
|
|
10
|
+
}
|
|
11
|
+
var ACTION_CAPABILITIES = {
|
|
12
|
+
navigate: capability(),
|
|
13
|
+
back: capability(),
|
|
14
|
+
forward: capability(),
|
|
15
|
+
reload: capability(),
|
|
16
|
+
tab: capability(),
|
|
17
|
+
tabs: capability(),
|
|
18
|
+
newTab: capability(),
|
|
19
|
+
closeTab: capability(),
|
|
20
|
+
click: capability(),
|
|
21
|
+
type: capability(),
|
|
22
|
+
select: capability(),
|
|
23
|
+
hover: capability(),
|
|
24
|
+
focus: capability(["mcp"]),
|
|
25
|
+
scroll: capability(),
|
|
26
|
+
press: capability(),
|
|
27
|
+
fill: capability(),
|
|
28
|
+
find: capability(),
|
|
29
|
+
check: capability(),
|
|
30
|
+
uncheck: capability(),
|
|
31
|
+
upload: capability(),
|
|
32
|
+
download: capability(["server"], "Server-only for now"),
|
|
33
|
+
dialog: capability(),
|
|
34
|
+
waitFor: capability(["mcp"]),
|
|
35
|
+
waitForNavigation: capability(["mcp"]),
|
|
36
|
+
wait: capability(["mcp"]),
|
|
37
|
+
snap: capability(),
|
|
38
|
+
screenshot: capability(),
|
|
39
|
+
html: capability(["mcp"]),
|
|
40
|
+
text: capability(["mcp"]),
|
|
41
|
+
marker: capability(),
|
|
42
|
+
markers: capability(),
|
|
43
|
+
markerGet: capability(),
|
|
44
|
+
markerRead: capability(["mcp"]),
|
|
45
|
+
markerCompare: capability(),
|
|
46
|
+
markerDelete: capability(),
|
|
47
|
+
markerResolve: capability(["cli"], "CLI-only for now"),
|
|
48
|
+
viewport: capability(),
|
|
49
|
+
colorScheme: capability(),
|
|
50
|
+
mode: capability(["mcp"]),
|
|
51
|
+
evaluate: capability(["mcp"]),
|
|
52
|
+
session: capability(),
|
|
53
|
+
sessions: capability(["mcp"]),
|
|
54
|
+
steps: capability()
|
|
55
|
+
};
|
|
56
|
+
function getActionsForSurface(surface) {
|
|
57
|
+
return Object.entries(ACTION_CAPABILITIES).filter(([, capability2]) => capability2.surfaces.includes(surface)).map(([action]) => action);
|
|
58
|
+
}
|
|
10
59
|
export {
|
|
11
60
|
getActionsForSurface,
|
|
12
61
|
capabilityAll,
|
package/dist/context.d.ts
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
|
-
import { CreateContextOptions, createContext, generateRequestId } from "./shared/@outfitter/contracts-
|
|
2
|
-
import "./shared/@outfitter/contracts-
|
|
3
|
-
import "./shared/@outfitter/contracts-
|
|
1
|
+
import { CreateContextOptions, createContext, generateRequestId } from "./shared/@outfitter/contracts-drwd9ywk.js";
|
|
2
|
+
import "./shared/@outfitter/contracts-zma4mscd.js";
|
|
3
|
+
import "./shared/@outfitter/contracts-msxdg52h.js";
|
|
4
|
+
import "./shared/@outfitter/contracts-7a0xmwbg.js";
|
|
5
|
+
import "./shared/@outfitter/contracts-735ecmbq.js";
|
|
6
|
+
import "./shared/@outfitter/contracts-mehpmvwp.js";
|
|
7
|
+
import "./shared/@outfitter/contracts-qpbv29bg.js";
|
|
8
|
+
import "./shared/@outfitter/contracts-njb2art4.js";
|
|
4
9
|
import "./shared/@outfitter/contracts-rwzqy9rn.js";
|
|
5
10
|
export { generateRequestId, createContext, CreateContextOptions };
|
package/dist/context.js
CHANGED
package/dist/envelope.d.ts
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
-
import { Envelope, EnvelopeMeta, ErrorEnvelope, HttpResponse, PaginationMeta, SuccessEnvelope, toEnvelope, toHttpResponse } from "./shared/@outfitter/contracts-
|
|
2
|
-
import "./shared/@outfitter/contracts-
|
|
1
|
+
import { Envelope, EnvelopeMeta, ErrorEnvelope, HttpResponse, PaginationMeta, SuccessEnvelope, toEnvelope, toHttpResponse } from "./shared/@outfitter/contracts-t4txv24h.js";
|
|
2
|
+
import "./shared/@outfitter/contracts-7a0xmwbg.js";
|
|
3
|
+
import "./shared/@outfitter/contracts-735ecmbq.js";
|
|
4
|
+
import "./shared/@outfitter/contracts-mehpmvwp.js";
|
|
5
|
+
import "./shared/@outfitter/contracts-qpbv29bg.js";
|
|
6
|
+
import "./shared/@outfitter/contracts-njb2art4.js";
|
|
3
7
|
export { toHttpResponse, toEnvelope, SuccessEnvelope, PaginationMeta, HttpResponse, ErrorEnvelope, EnvelopeMeta, Envelope };
|
package/dist/envelope.js
CHANGED
|
@@ -1,12 +1,54 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
import
|
|
9
|
-
|
|
3
|
+
generateRequestId
|
|
4
|
+
} from "./shared/@outfitter/contracts-c3qfce25.js";
|
|
5
|
+
import {
|
|
6
|
+
serializeError
|
|
7
|
+
} from "./shared/@outfitter/contracts-jtt6dnmg.js";
|
|
8
|
+
import {
|
|
9
|
+
statusCodeMap
|
|
10
|
+
} from "./shared/@outfitter/contracts-vhr2ep6b.js";
|
|
11
|
+
|
|
12
|
+
// packages/contracts/src/envelope.ts
|
|
13
|
+
function buildMeta(overrides) {
|
|
14
|
+
const meta = {
|
|
15
|
+
requestId: overrides?.requestId ?? generateRequestId(),
|
|
16
|
+
timestamp: new Date().toISOString()
|
|
17
|
+
};
|
|
18
|
+
if (overrides?.durationMs !== undefined) {
|
|
19
|
+
meta.durationMs = overrides.durationMs;
|
|
20
|
+
}
|
|
21
|
+
return meta;
|
|
22
|
+
}
|
|
23
|
+
function toEnvelope(result, meta) {
|
|
24
|
+
const envelopeMeta = buildMeta(meta);
|
|
25
|
+
if (result.isOk()) {
|
|
26
|
+
return {
|
|
27
|
+
ok: true,
|
|
28
|
+
data: result.value,
|
|
29
|
+
meta: envelopeMeta
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
return {
|
|
33
|
+
ok: false,
|
|
34
|
+
error: serializeError(result.error),
|
|
35
|
+
meta: envelopeMeta
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
function toHttpResponse(result) {
|
|
39
|
+
const envelope = toEnvelope(result);
|
|
40
|
+
if (envelope.ok) {
|
|
41
|
+
return {
|
|
42
|
+
status: 200,
|
|
43
|
+
body: envelope
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
const status = statusCodeMap[envelope.error.category];
|
|
47
|
+
return {
|
|
48
|
+
status,
|
|
49
|
+
body: envelope
|
|
50
|
+
};
|
|
51
|
+
}
|
|
10
52
|
export {
|
|
11
53
|
toHttpResponse,
|
|
12
54
|
toEnvelope
|
package/dist/errors.d.ts
CHANGED
|
@@ -1,2 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { AnyKitError, OutfitterError } from "./shared/@outfitter/contracts-7a0xmwbg.js";
|
|
2
|
+
import { AuthError, CancelledError, InternalError, NetworkError, PermissionError, RateLimitError, TimeoutError } from "./shared/@outfitter/contracts-735ecmbq.js";
|
|
3
|
+
import { AlreadyExistsError, AmbiguousError, AssertionError, ConflictError, NotFoundError, ValidationError } from "./shared/@outfitter/contracts-mehpmvwp.js";
|
|
4
|
+
import "./shared/@outfitter/contracts-qpbv29bg.js";
|
|
5
|
+
import { ERROR_CODES, ErrorCategory, ErrorCategoryMeta, ErrorCode, KitErrorProps, SerializedError, errorCategoryMeta, exitCodeMap, getExitCode, getStatusCode, jsonRpcCodeMap, retryableMap, statusCodeMap } from "./shared/@outfitter/contracts-njb2art4.js";
|
|
6
|
+
export { statusCodeMap, retryableMap, jsonRpcCodeMap, getStatusCode, getExitCode, exitCodeMap, errorCategoryMeta, ValidationError, TimeoutError, SerializedError, RateLimitError, PermissionError, OutfitterError, NotFoundError, NetworkError, KitErrorProps, InternalError, ErrorCode, ErrorCategoryMeta, ErrorCategory, ERROR_CODES, ConflictError, CancelledError, AuthError, AssertionError, AnyKitError, AmbiguousError, AlreadyExistsError };
|
package/dist/errors.js
CHANGED
|
@@ -14,16 +14,22 @@ import {
|
|
|
14
14
|
RateLimitError,
|
|
15
15
|
TimeoutError,
|
|
16
16
|
ValidationError,
|
|
17
|
+
errorCategoryMeta,
|
|
17
18
|
exitCodeMap,
|
|
18
19
|
getExitCode,
|
|
19
20
|
getStatusCode,
|
|
21
|
+
jsonRpcCodeMap,
|
|
22
|
+
retryableMap,
|
|
20
23
|
statusCodeMap
|
|
21
|
-
} from "./shared/@outfitter/contracts-
|
|
24
|
+
} from "./shared/@outfitter/contracts-vhr2ep6b.js";
|
|
22
25
|
export {
|
|
23
26
|
statusCodeMap,
|
|
27
|
+
retryableMap,
|
|
28
|
+
jsonRpcCodeMap,
|
|
24
29
|
getStatusCode,
|
|
25
30
|
getExitCode,
|
|
26
31
|
exitCodeMap,
|
|
32
|
+
errorCategoryMeta,
|
|
27
33
|
ValidationError,
|
|
28
34
|
TimeoutError,
|
|
29
35
|
RateLimitError,
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { fromFetch } from "./shared/@outfitter/contracts-3f5k5tg5.js";
|
|
2
|
+
import "./shared/@outfitter/contracts-7a0xmwbg.js";
|
|
3
|
+
import "./shared/@outfitter/contracts-735ecmbq.js";
|
|
4
|
+
import "./shared/@outfitter/contracts-mehpmvwp.js";
|
|
5
|
+
import "./shared/@outfitter/contracts-qpbv29bg.js";
|
|
6
|
+
import "./shared/@outfitter/contracts-njb2art4.js";
|
|
7
|
+
export { fromFetch };
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import {
|
|
3
|
+
AuthError,
|
|
4
|
+
ConflictError,
|
|
5
|
+
InternalError,
|
|
6
|
+
NetworkError,
|
|
7
|
+
NotFoundError,
|
|
8
|
+
PermissionError,
|
|
9
|
+
RateLimitError,
|
|
10
|
+
TimeoutError,
|
|
11
|
+
ValidationError,
|
|
12
|
+
statusCodeMap
|
|
13
|
+
} from "./shared/@outfitter/contracts-vhr2ep6b.js";
|
|
14
|
+
|
|
15
|
+
// packages/contracts/src/from-fetch.ts
|
|
16
|
+
import { Result } from "better-result";
|
|
17
|
+
var CANONICAL_FETCH_ERROR_CATEGORIES = [
|
|
18
|
+
"auth",
|
|
19
|
+
"permission",
|
|
20
|
+
"not_found",
|
|
21
|
+
"conflict",
|
|
22
|
+
"rate_limit",
|
|
23
|
+
"network",
|
|
24
|
+
"timeout"
|
|
25
|
+
];
|
|
26
|
+
var HTTP_STATUS_ALIASES = {
|
|
27
|
+
408: "timeout",
|
|
28
|
+
503: "network"
|
|
29
|
+
};
|
|
30
|
+
var httpStatusToCategory = {
|
|
31
|
+
...Object.fromEntries(CANONICAL_FETCH_ERROR_CATEGORIES.map((category) => [
|
|
32
|
+
statusCodeMap[category],
|
|
33
|
+
category
|
|
34
|
+
])),
|
|
35
|
+
...HTTP_STATUS_ALIASES
|
|
36
|
+
};
|
|
37
|
+
var UNKNOWN_HTTP_TIMEOUT_MS = -1;
|
|
38
|
+
function createErrorForCategory(category, status, statusText, retryAfterSeconds) {
|
|
39
|
+
const message = `HTTP ${status}${statusText ? `: ${statusText}` : ""}`;
|
|
40
|
+
switch (category) {
|
|
41
|
+
case "auth":
|
|
42
|
+
return AuthError.create(message);
|
|
43
|
+
case "permission":
|
|
44
|
+
return PermissionError.create(message);
|
|
45
|
+
case "not_found":
|
|
46
|
+
return new NotFoundError({
|
|
47
|
+
message,
|
|
48
|
+
resourceType: "resource",
|
|
49
|
+
resourceId: `HTTP ${status}`,
|
|
50
|
+
...statusText ? { context: { statusText } } : {}
|
|
51
|
+
});
|
|
52
|
+
case "timeout":
|
|
53
|
+
return new TimeoutError({
|
|
54
|
+
message,
|
|
55
|
+
operation: "HTTP request",
|
|
56
|
+
timeoutMs: UNKNOWN_HTTP_TIMEOUT_MS
|
|
57
|
+
});
|
|
58
|
+
case "rate_limit":
|
|
59
|
+
return RateLimitError.create(message, retryAfterSeconds);
|
|
60
|
+
case "network":
|
|
61
|
+
return NetworkError.create(message);
|
|
62
|
+
case "conflict":
|
|
63
|
+
return ConflictError.create(message);
|
|
64
|
+
case "validation":
|
|
65
|
+
return ValidationError.fromMessage(message);
|
|
66
|
+
case "internal":
|
|
67
|
+
return InternalError.create(message);
|
|
68
|
+
case "cancelled":
|
|
69
|
+
return InternalError.create(message);
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
function parseRetryAfterSeconds(retryAfter) {
|
|
73
|
+
if (retryAfter == null)
|
|
74
|
+
return;
|
|
75
|
+
const trimmed = retryAfter.trim();
|
|
76
|
+
if (!trimmed)
|
|
77
|
+
return;
|
|
78
|
+
const delta = Number(trimmed);
|
|
79
|
+
if (Number.isFinite(delta) && delta >= 0) {
|
|
80
|
+
return Math.floor(delta);
|
|
81
|
+
}
|
|
82
|
+
const dateMs = Date.parse(trimmed);
|
|
83
|
+
if (Number.isNaN(dateMs)) {
|
|
84
|
+
return;
|
|
85
|
+
}
|
|
86
|
+
const secondsUntilDate = Math.ceil((dateMs - Date.now()) / 1000);
|
|
87
|
+
return Math.max(0, secondsUntilDate);
|
|
88
|
+
}
|
|
89
|
+
function fromFetch(response) {
|
|
90
|
+
const { status, statusText } = response;
|
|
91
|
+
const rateLimitStatus = statusCodeMap.rate_limit;
|
|
92
|
+
const retryAfterSeconds = status === rateLimitStatus ? parseRetryAfterSeconds(response.headers.get("Retry-After")) : undefined;
|
|
93
|
+
if (status >= 200 && status < 300) {
|
|
94
|
+
return Result.ok(response);
|
|
95
|
+
}
|
|
96
|
+
const category = httpStatusToCategory[status];
|
|
97
|
+
if (category != null) {
|
|
98
|
+
return Result.err(createErrorForCategory(category, status, statusText, retryAfterSeconds));
|
|
99
|
+
}
|
|
100
|
+
if (status >= 400 && status < 500) {
|
|
101
|
+
return Result.err(createErrorForCategory("validation", status, statusText, retryAfterSeconds));
|
|
102
|
+
}
|
|
103
|
+
if (status >= 500 && status < 600) {
|
|
104
|
+
return Result.err(createErrorForCategory("internal", status, statusText, retryAfterSeconds));
|
|
105
|
+
}
|
|
106
|
+
return Result.err(createErrorForCategory("internal", status, statusText, retryAfterSeconds));
|
|
107
|
+
}
|
|
108
|
+
export {
|
|
109
|
+
fromFetch
|
|
110
|
+
};
|
package/dist/handler.d.ts
CHANGED
|
@@ -1,4 +1,9 @@
|
|
|
1
|
-
import { Handler, HandlerContext, ResolvedConfig, SyncHandler } from "./shared/@outfitter/contracts-
|
|
2
|
-
import "./shared/@outfitter/contracts-
|
|
1
|
+
import { Handler, HandlerContext, ResolvedConfig, SyncHandler } from "./shared/@outfitter/contracts-zma4mscd.js";
|
|
2
|
+
import "./shared/@outfitter/contracts-msxdg52h.js";
|
|
3
|
+
import "./shared/@outfitter/contracts-7a0xmwbg.js";
|
|
4
|
+
import "./shared/@outfitter/contracts-735ecmbq.js";
|
|
5
|
+
import "./shared/@outfitter/contracts-mehpmvwp.js";
|
|
6
|
+
import "./shared/@outfitter/contracts-qpbv29bg.js";
|
|
7
|
+
import "./shared/@outfitter/contracts-njb2art4.js";
|
|
3
8
|
import { Logger } from "./shared/@outfitter/contracts-rwzqy9rn.js";
|
|
4
9
|
export { SyncHandler, ResolvedConfig, Logger, HandlerContext, Handler };
|
package/dist/hints.d.ts
ADDED
package/dist/index.d.ts
CHANGED
|
@@ -1,20 +1,31 @@
|
|
|
1
|
+
import { NonEmptyArray, assertDefined, assertMatches, assertNonEmpty, expectErr, expectOk, isNonEmptyArray } from "./shared/@outfitter/contracts-3qmyq81n.js";
|
|
1
2
|
import "./shared/@outfitter/contracts-qaccq0gf.js";
|
|
2
|
-
import { NonEmptyArray, assertDefined, assertMatches, assertNonEmpty, isNonEmptyArray } from "./shared/@outfitter/contracts-mmg0npfk.js";
|
|
3
|
-
import { createValidator, validateInput } from "./shared/@outfitter/contracts-9wtm5nsw.js";
|
|
4
|
-
import { ACTION_CAPABILITIES, ActionCapability, CAPABILITY_SURFACES, CapabilitySurface, DEFAULT_ACTION_SURFACES, capability, capabilityAll, getActionsForSurface } from "./shared/@outfitter/contracts-y8f0m1ze.js";
|
|
5
|
-
import { DEFAULT_PATTERNS, DEFAULT_SENSITIVE_KEYS, RedactionCallback, RedactionEvent, Redactor, RedactorConfig, createRedactor } from "./shared/@outfitter/contracts-9yd4vrjg.js";
|
|
6
|
-
import { BackoffOptions, getBackoffDelay, isRecoverable, isRetryable, shouldRetry } from "./shared/@outfitter/contracts-k71jqd1m.js";
|
|
7
|
-
import { JsonSchema, zodToJsonSchema } from "./shared/@outfitter/contracts-t79engf9.js";
|
|
8
|
-
import { ACTION_SURFACES, ActionApiSpec, ActionCliInputContext, ActionCliOption, ActionCliSpec, ActionMcpSpec, ActionRegistry, ActionSpec, ActionSurface, ActionTrpcSpec, AnyActionSpec, DEFAULT_REGISTRY_SURFACES, HttpMethod, createActionRegistry, defineAction } from "./shared/@outfitter/contracts-56pcsavx.js";
|
|
9
|
-
import { RetryOptions, TimeoutOptions, retry, withTimeout } from "./shared/@outfitter/contracts-95cc3y06.js";
|
|
10
3
|
import { combine2, combine3, expect, orElse, unwrapOrElse } from "./shared/@outfitter/contracts-ar0etwtx.js";
|
|
4
|
+
import { ActionHint, CLIHint, MCPHint } from "./shared/@outfitter/contracts-vbgt9rfn.js";
|
|
5
|
+
import { CreateContextOptions, createContext, generateRequestId } from "./shared/@outfitter/contracts-drwd9ywk.js";
|
|
6
|
+
import { ErrorMapper, composeMappers, extractMessage, isOutfitterError, wrapError } from "./shared/@outfitter/contracts-zsgxsa91.js";
|
|
7
|
+
import { DEFAULT_PATTERNS, DEFAULT_SENSITIVE_KEYS, RedactionCallback, RedactionEvent, Redactor, RedactorConfig, createRedactor } from "./shared/@outfitter/contracts-9yd4vrjg.js";
|
|
8
|
+
import { ACTION_SURFACES, ActionApiSpec, ActionCliInputContext, ActionCliOption, ActionCliSpec, ActionMcpSpec, ActionRegistry, ActionSpec, ActionSurface, ActionTrpcSpec, AnyActionSpec, DEFAULT_REGISTRY_SURFACES, HttpMethod, createActionRegistry, defineAction } from "./shared/@outfitter/contracts-vhajx4gg.js";
|
|
9
|
+
import { Handler, HandlerContext, ResolvedConfig, SyncHandler } from "./shared/@outfitter/contracts-zma4mscd.js";
|
|
10
|
+
import { ACTION_CAPABILITIES, ActionCapability, CAPABILITY_SURFACES, CapabilitySurface, DEFAULT_ACTION_SURFACES, capability, capabilityAll, getActionsForSurface } from "./shared/@outfitter/contracts-y8f0m1ze.js";
|
|
11
|
+
import "./shared/@outfitter/contracts-f6fnz6h9.js";
|
|
12
|
+
import { SerializeErrorOptions, deserializeError, serializeError } from "./shared/@outfitter/contracts-p77yjs4g.js";
|
|
13
|
+
import { safeParse, safeStringify } from "./shared/@outfitter/contracts-1zzcpfyg.js";
|
|
14
|
+
import { zodToJsonSchema } from "./shared/@outfitter/contracts-8cmkh2db.js";
|
|
15
|
+
import { JsonSchema } from "./shared/@outfitter/contracts-w7nvcwrp.js";
|
|
16
|
+
import { Envelope, EnvelopeMeta, ErrorEnvelope, HttpResponse, PaginationMeta, SuccessEnvelope, toEnvelope, toHttpResponse } from "./shared/@outfitter/contracts-t4txv24h.js";
|
|
11
17
|
import { AdapterAuthError, AuthAdapter, CacheAdapter, CacheError, IndexAdapter, IndexError, IndexStats, SearchOptions, SearchResult, StorageAdapter, StorageError } from "./shared/@outfitter/contracts-c2cfj172.js";
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
18
|
+
import { ProgressCallback, StreamEvent, StreamProgressEvent, StreamStartEvent, StreamStepEvent } from "./shared/@outfitter/contracts-msxdg52h.js";
|
|
19
|
+
import { BackoffOptions, getBackoffDelay, isRecoverable, isRetryable, shouldRetry } from "./shared/@outfitter/contracts-10p5q75w.js";
|
|
20
|
+
import { fromFetch } from "./shared/@outfitter/contracts-3f5k5tg5.js";
|
|
21
|
+
import { RetryOptions, TimeoutOptions, retry, withTimeout } from "./shared/@outfitter/contracts-mt027fqj.js";
|
|
22
|
+
import { createValidator, formatZodIssues, parseInput, validateInput } from "./shared/@outfitter/contracts-x0ppyt7e.js";
|
|
23
|
+
import { AnyKitError, OutfitterError } from "./shared/@outfitter/contracts-7a0xmwbg.js";
|
|
24
|
+
import { AuthError, CancelledError, InternalError, NetworkError, PermissionError, RateLimitError, TimeoutError } from "./shared/@outfitter/contracts-735ecmbq.js";
|
|
25
|
+
import { AlreadyExistsError, AmbiguousError, AssertionError, ConflictError, NotFoundError, ValidationError } from "./shared/@outfitter/contracts-mehpmvwp.js";
|
|
26
|
+
import "./shared/@outfitter/contracts-qpbv29bg.js";
|
|
27
|
+
import { ERROR_CODES, ErrorCategory, ErrorCategoryMeta, ErrorCode, KitErrorProps, SerializedError, errorCategoryMeta, exitCodeMap, getExitCode, getStatusCode, jsonRpcCodeMap, retryableMap, statusCodeMap } from "./shared/@outfitter/contracts-njb2art4.js";
|
|
17
28
|
import { LogLevel, LogMetadata, LogMethod, Logger, LoggerAdapter, LoggerFactory, LoggerFactoryConfig, createLoggerFactory } from "./shared/@outfitter/contracts-rwzqy9rn.js";
|
|
18
29
|
import { TaggedErrorClass } from "better-result";
|
|
19
30
|
import { Result, TaggedError } from "better-result";
|
|
20
|
-
export { zodToJsonSchema, withTimeout, validateInput, unwrapOrElse, toHttpResponse, toEnvelope, statusCodeMap, shouldRetry, serializeError, safeStringify, safeParse, retry, orElse, isRetryable, isRecoverable, isNonEmptyArray, getStatusCode, getExitCode, getBackoffDelay, getActionsForSurface, generateRequestId, expect, exitCodeMap, deserializeError, defineAction, createValidator, createRedactor, createLoggerFactory, createContext, createActionRegistry, combine3, combine2, capabilityAll, capability, assertNonEmpty, assertMatches, assertDefined, ValidationError, TimeoutOptions, TimeoutError, TaggedErrorClass, TaggedError, SyncHandler, SuccessEnvelope, StorageError, StorageAdapter, SerializedError, SerializeErrorOptions, SearchResult, SearchOptions, RetryOptions, Result, ResolvedConfig, RedactorConfig, Redactor, RedactionEvent, RedactionCallback, RateLimitError, PermissionError, PaginationMeta, OutfitterError, NotFoundError, NonEmptyArray, NetworkError, LoggerFactoryConfig, LoggerFactory, LoggerAdapter, Logger, LogMethod, LogMetadata, LogLevel, KitErrorProps, JsonSchema, InternalError, IndexStats, IndexError, IndexAdapter, HttpResponse, HttpMethod, HandlerContext, Handler, ErrorEnvelope, ErrorCode, ErrorCategory, EnvelopeMeta, Envelope, ERROR_CODES, DEFAULT_SENSITIVE_KEYS, DEFAULT_REGISTRY_SURFACES, DEFAULT_PATTERNS, DEFAULT_ACTION_SURFACES, CreateContextOptions, ConflictError, CapabilitySurface, CancelledError, CacheError, CacheAdapter, CAPABILITY_SURFACES, BackoffOptions, AuthError, AuthAdapter, AssertionError, AnyKitError, AnyActionSpec, AmbiguousError, AlreadyExistsError, AdapterAuthError, ActionTrpcSpec, ActionSurface, ActionSpec, ActionRegistry, ActionMcpSpec, ActionCliSpec, ActionCliOption, ActionCliInputContext, ActionCapability, ActionApiSpec, ACTION_SURFACES, ACTION_CAPABILITIES };
|
|
31
|
+
export { zodToJsonSchema, wrapError, withTimeout, validateInput, unwrapOrElse, toHttpResponse, toEnvelope, statusCodeMap, shouldRetry, serializeError, safeStringify, safeParse, retryableMap, retry, parseInput, orElse, jsonRpcCodeMap, isRetryable, isRecoverable, isOutfitterError, isNonEmptyArray, getStatusCode, getExitCode, getBackoffDelay, getActionsForSurface, generateRequestId, fromFetch, formatZodIssues, extractMessage, expectOk, expectErr, expect, exitCodeMap, errorCategoryMeta, deserializeError, defineAction, createValidator, createRedactor, createLoggerFactory, createContext, createActionRegistry, composeMappers, combine3, combine2, capabilityAll, capability, assertNonEmpty, assertMatches, assertDefined, ValidationError, TimeoutOptions, TimeoutError, TaggedErrorClass, TaggedError, SyncHandler, SuccessEnvelope, StreamStepEvent, StreamStartEvent, StreamProgressEvent, StreamEvent, StorageError, StorageAdapter, SerializedError, SerializeErrorOptions, SearchResult, SearchOptions, RetryOptions, Result, ResolvedConfig, RedactorConfig, Redactor, RedactionEvent, RedactionCallback, RateLimitError, ProgressCallback, PermissionError, PaginationMeta, OutfitterError, NotFoundError, NonEmptyArray, NetworkError, MCPHint, LoggerFactoryConfig, LoggerFactory, LoggerAdapter, Logger, LogMethod, LogMetadata, LogLevel, KitErrorProps, JsonSchema, InternalError, IndexStats, IndexError, IndexAdapter, HttpResponse, HttpMethod, HandlerContext, Handler, ErrorMapper, ErrorEnvelope, ErrorCode, ErrorCategoryMeta, ErrorCategory, EnvelopeMeta, Envelope, ERROR_CODES, DEFAULT_SENSITIVE_KEYS, DEFAULT_REGISTRY_SURFACES, DEFAULT_PATTERNS, DEFAULT_ACTION_SURFACES, CreateContextOptions, ConflictError, CapabilitySurface, CancelledError, CacheError, CacheAdapter, CLIHint, CAPABILITY_SURFACES, BackoffOptions, AuthError, AuthAdapter, AssertionError, AnyKitError, AnyActionSpec, AmbiguousError, AlreadyExistsError, AdapterAuthError, ActionTrpcSpec, ActionSurface, ActionSpec, ActionRegistry, ActionMcpSpec, ActionHint, ActionCliSpec, ActionCliOption, ActionCliInputContext, ActionCapability, ActionApiSpec, ACTION_SURFACES, ACTION_CAPABILITIES };
|