@intx/inference 0.1.2
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 +46 -0
- package/package.json +20 -0
- package/src/actions.ts +245 -0
- package/src/adapter.ts +57 -0
- package/src/assembly.test.ts +728 -0
- package/src/assembly.ts +250 -0
- package/src/audit-collector.test.ts +332 -0
- package/src/audit-collector.ts +172 -0
- package/src/auth.test.ts +117 -0
- package/src/auth.ts +61 -0
- package/src/authz-extension.test.ts +269 -0
- package/src/authz-extension.ts +145 -0
- package/src/correlation.ts +61 -0
- package/src/default-director.test.ts +314 -0
- package/src/default-director.ts +344 -0
- package/src/director.ts +87 -0
- package/src/errors.test.ts +133 -0
- package/src/errors.ts +115 -0
- package/src/gates.ts +128 -0
- package/src/harness.test.ts +655 -0
- package/src/harness.ts +1571 -0
- package/src/index.ts +76 -0
- package/src/providers/anthropic.test.ts +771 -0
- package/src/providers/anthropic.ts +810 -0
- package/src/providers/google-genai-files.ts +289 -0
- package/src/providers/google-genai.ts +1518 -0
- package/src/providers/openai.ts +719 -0
- package/src/providers/registry.ts +33 -0
- package/src/reactor.test.ts +3660 -0
- package/src/reactor.ts +1058 -0
- package/src/retry-policy.ts +99 -0
- package/src/scheduler.test.ts +41 -0
- package/src/sse.test.ts +133 -0
- package/src/sse.ts +76 -0
- package/src/state.ts +135 -0
- package/src/transform.test.ts +207 -0
- package/src/transform.ts +159 -0
- package/src/transforms/index.ts +2 -0
- package/src/transforms/size-cap.test.ts +172 -0
- package/src/transforms/size-cap.ts +110 -0
- package/src/turns.ts +54 -0
- package/tsconfig.json +4 -0
- package/tsconfig.tsbuildinfo +1 -0
package/src/index.ts
ADDED
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
export { parseSSE } from "./sse";
|
|
2
|
+
export {
|
|
3
|
+
runInference,
|
|
4
|
+
createDefaultDependencies,
|
|
5
|
+
createDefaultScheduler,
|
|
6
|
+
HarnessId,
|
|
7
|
+
} from "./harness";
|
|
8
|
+
export type {
|
|
9
|
+
Dependencies,
|
|
10
|
+
InferenceHarnessOptions,
|
|
11
|
+
Scheduler,
|
|
12
|
+
} from "./harness";
|
|
13
|
+
export {
|
|
14
|
+
hasProvider,
|
|
15
|
+
lookupProvider,
|
|
16
|
+
registerProvider,
|
|
17
|
+
} from "./providers/registry";
|
|
18
|
+
export type {
|
|
19
|
+
ProviderAdapter,
|
|
20
|
+
RequestBuilder,
|
|
21
|
+
ResponseParser,
|
|
22
|
+
BuiltRequest,
|
|
23
|
+
} from "./adapter";
|
|
24
|
+
export { CREDENTIAL_SENTINEL, BEARER_CREDENTIAL_SENTINEL } from "./auth";
|
|
25
|
+
export {
|
|
26
|
+
classifyHTTPError,
|
|
27
|
+
classifyNetworkError,
|
|
28
|
+
classifyAbortError,
|
|
29
|
+
classifyStreamError,
|
|
30
|
+
classifyProtocolMismatch,
|
|
31
|
+
ProtocolMismatchError,
|
|
32
|
+
} from "./errors";
|
|
33
|
+
export { transformMessages, createIDNormalizer } from "./transform";
|
|
34
|
+
export type { TransformOptions, IDNormalizer } from "./transform";
|
|
35
|
+
export { createDefaultRetryPolicy } from "./retry-policy";
|
|
36
|
+
export type {
|
|
37
|
+
RetryPolicy,
|
|
38
|
+
RetrySituation,
|
|
39
|
+
RetryDecision,
|
|
40
|
+
} from "@intx/types/runtime";
|
|
41
|
+
export { createAnthropicAdapter } from "./providers/anthropic";
|
|
42
|
+
export { createOpenAIAdapter } from "./providers/openai";
|
|
43
|
+
export { createGoogleGenAIAdapter } from "./providers/google-genai";
|
|
44
|
+
export { uploadGoogleGenAIFile } from "./providers/google-genai-files";
|
|
45
|
+
export type {
|
|
46
|
+
UploadGoogleGenAIFileOpts,
|
|
47
|
+
UploadGoogleGenAIFileFetch,
|
|
48
|
+
UploadedGoogleGenAIFile,
|
|
49
|
+
} from "./providers/google-genai-files";
|
|
50
|
+
|
|
51
|
+
export { createReactor } from "./reactor";
|
|
52
|
+
export type { Reactor, ReactorConfig, ReactorEmittedEvent } from "./reactor";
|
|
53
|
+
export { validateActions } from "./actions";
|
|
54
|
+
export type { ValidationResult } from "./actions";
|
|
55
|
+
export { createGateManager } from "./gates";
|
|
56
|
+
export type { GateManager, GateRecord, GateSnapshot } from "./gates";
|
|
57
|
+
export { createCorrelationRegistry } from "./correlation";
|
|
58
|
+
export type { CorrelationRegistry, CorrelationValidator } from "./correlation";
|
|
59
|
+
export { createStateManager } from "./state";
|
|
60
|
+
export type { ReactorStateManager } from "./state";
|
|
61
|
+
export { createCapabilities } from "./director";
|
|
62
|
+
export { DefaultDirector, createDefaultDirector } from "./default-director";
|
|
63
|
+
export type { DefaultDirectorPolicy } from "./default-director";
|
|
64
|
+
export { createAuthzExtension } from "./authz-extension";
|
|
65
|
+
export type {
|
|
66
|
+
AuthzCallResult,
|
|
67
|
+
AuthzDecision,
|
|
68
|
+
AuthzExtensionOptions,
|
|
69
|
+
AuthzMatchedGrant,
|
|
70
|
+
} from "./authz-extension";
|
|
71
|
+
export { createAuditCollector } from "./audit-collector";
|
|
72
|
+
export type { AuditCollector } from "./audit-collector";
|
|
73
|
+
export { createSizeCapTransform } from "./transforms";
|
|
74
|
+
export type { SizeCapTransformOptions } from "./transforms";
|
|
75
|
+
export { createReactorAssembly } from "./assembly";
|
|
76
|
+
export type { ReactorAssembly, ReactorAssemblyConfig } from "./assembly";
|