@agentdock/wire 0.0.95 → 0.0.96
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/dist/enterpriseCurrency.d.ts +120 -0
- package/dist/enterpriseCurrency.js +1 -0
- package/dist/enterpriseDirectory.d.ts +636 -0
- package/dist/enterpriseDirectory.js +1 -0
- package/dist/enterpriseGatewayExports.d.ts +4 -0
- package/dist/enterpriseGatewayExports.js +1 -0
- package/dist/enterpriseOverview.d.ts +423 -0
- package/dist/enterpriseOverview.js +1 -0
- package/dist/enterprisePolicy.d.ts +283 -489
- package/dist/enterprisePolicy.js +1 -1
- package/dist/enterprisePolicyExports.d.ts +2 -2
- package/dist/enterprisePolicyExports.js +1 -1
- package/dist/enterpriseRange.d.ts +19 -0
- package/dist/enterpriseRange.js +1 -0
- package/dist/enterpriseRuntime.d.ts +135 -32
- package/dist/enterpriseRuntime.js +1 -1
- package/dist/gateway.d.ts +1390 -873
- package/dist/gateway.js +1 -1
- package/dist/gatewayBodyRetention.d.ts +149 -0
- package/dist/gatewayBodyRetention.js +2 -0
- package/dist/gatewayUsage.d.ts +3232 -0
- package/dist/gatewayUsage.js +1 -0
- package/dist/index.d.ts +5 -2
- package/dist/index.js +1 -1
- package/dist/sessionBtw.d.ts +2 -2
- package/package.json +1 -1
package/dist/gateway.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";import{z as e}from"zod";const
|
|
1
|
+
"use strict";import{z as e}from"zod";const o=e.string().url();export const GatewayProtocolSchema=e.enum(["anthropic_messages","openai_responses","openai_chat"]),GatewayErrorCodeSchema=e.enum(["unauthorized","connection-unavailable","protocol-not-supported","request-too-large","upstream-timeout","upstream-unavailable","client-aborted","model-not-allowed","model-disabled","invalid-request","logical-model-not-found","deployment-not-ready","connection-keys-not-equivalent","logical-model-not-in-agent-config","logical-model-not-authorized","upstream-model-mapping-missing","price-rule-conflict","unsupported-pricing-currency"]),GatewayTokenClaimsSchema=e.object({enterpriseId:e.string().min(1),userId:e.string().min(1)}).strict(),GatewayConnectionCreateSchema=e.object({name:e.string().min(1).max(100),baseUrl:o}).strict(),GatewayConnectionUpdateSchema=e.object({name:e.string().min(1).max(100).optional(),baseUrl:o.optional(),status:e.enum(["active","disabled"]).optional()}).strict(),GatewayConnectionDiscoveryViewSchema=e.object({status:e.enum(["unknown","succeeded","empty","unsupported","authentication_failed","unavailable","timeout"]),checkedAt:e.string().datetime().nullable(),failureCode:e.string().nullable(),models:e.array(e.object({modelId:e.string().min(1),firstDiscoveredAt:e.string().datetime(),lastDiscoveredAt:e.string().datetime()}).strict())}).strict(),GatewayConnectionDiscoveryResponseSchema=e.object({ok:e.literal(!0),data:GatewayConnectionDiscoveryViewSchema}).strict(),GatewayConnectionProtocolCapabilityViewSchema=e.object({protocol:GatewayProtocolSchema,status:e.enum(["supported","unsupported","unknown"]),authScheme:e.enum(["bearer","x-api-key"]).nullable(),evidenceSource:e.string().min(1),checkedAt:e.string().datetime(),failureCode:e.string().nullable()}).strict(),GatewayConnectionProtocolCapabilityResponseSchema=e.object({ok:e.literal(!0),data:e.array(GatewayConnectionProtocolCapabilityViewSchema)}).strict(),GatewayProtocolProbeRequestSchema=e.object({protocol:GatewayProtocolSchema,modelId:e.string().trim().min(1).max(500)}).strict(),GatewayConnectionModelsUpdateSchema=e.object({models:e.array(e.string().min(1)).max(1e3)}).strict();const n=e.number().min(.01).max(100).refine(t=>(String(t).split(".")[1]?.length??0)<=6,{message:"multiplier supports at most 6 decimal places"});export const GatewayConnectionModelsEditorSchema=e.object({connectionId:e.string().min(1),modelsConfirmed:e.boolean(),availableModels:e.array(e.string().min(1)),overallMultiplier:n.optional(),perModelMultipliers:e.record(n.nullable()).optional(),catalogDisabledModels:e.array(e.string().min(1)).optional(),discovered:e.array(e.object({model:e.string().min(1),inCatalog:e.boolean(),catalogStatus:e.enum(["active","disabled"]).optional()}).strict())}).strict(),GatewayConnectionModelsEditorResponseSchema=e.object({ok:e.literal(!0),data:GatewayConnectionModelsEditorSchema}).strict(),GatewayConnectionPriceMultipliersUpdateSchema=e.object({overallMultiplier:n.optional(),perModelMultipliers:e.record(n.nullable()).optional()}).strict().refine(t=>Object.keys(t).length>0,{message:"at least one multiplier field is required"}),GatewayConnectionViewSchema=e.object({id:e.string().min(1),enterpriseId:e.string().min(1),name:e.string().min(1),baseUrl:e.string().url(),status:e.enum(["active","disabled"]),metadata:e.unknown(),apiKeyCount:e.number().int().nonnegative().default(0),verifiedActiveKeyCount:e.number().int().nonnegative().default(0),costMultiplier:e.number().positive().optional(),modelsConfirmed:e.boolean().optional(),availableModels:e.array(e.string()).default([]),protocolCapabilities:e.array(GatewayConnectionProtocolCapabilityViewSchema).optional(),apiKeys:e.array(e.object({fingerprint:e.string().regex(/^[a-f0-9]{16}$/),masked:e.string(),status:e.string(),verified:e.boolean(),isDefault:e.boolean(),createdAt:e.string().datetime(),updatedAt:e.string().datetime()}).strict()).optional(),createdAt:e.string().datetime(),updatedAt:e.string().datetime()}).strict(),GatewayConnectionViewResponseSchema=e.object({ok:e.literal(!0),data:e.array(GatewayConnectionViewSchema)}).strict(),GatewayConnectionMutationResponseSchema=e.object({ok:e.literal(!0),data:GatewayConnectionViewSchema}).strict(),GatewayConnectionChangeUpstreamRequestSchema=e.object({baseUrl:o,apiKey:e.string().min(1).max(500).optional()}).strict(),GatewayConnectionChangeUpstreamAffectedSchema=e.object({groupCount:e.number().int().nonnegative(),agentCount:e.number().int().nonnegative(),modelCount:e.number().int().nonnegative()}).strict(),GatewayConnectionChangeUpstreamPreviewSchema=e.object({baseUrl:e.string().url(),affected:GatewayConnectionChangeUpstreamAffectedSchema}).strict(),GatewayConnectionChangeUpstreamPreviewResponseSchema=e.object({ok:e.literal(!0),data:GatewayConnectionChangeUpstreamPreviewSchema}).strict(),GatewayCapabilityViewSchema=e.object({connectionId:e.string().min(1),connectionName:e.string().min(1),agent:e.enum(["claude","codex"]),requestProtocol:e.enum(["anthropic_messages","openai_responses"]),models:e.array(e.string().min(1)),status:e.enum(["ready","unknown","unavailable","unsupported"])}).strict(),GatewayCapabilityViewResponseSchema=e.object({ok:e.literal(!0),data:e.array(GatewayCapabilityViewSchema)}).strict(),GatewayConnectionKeyFingerprintSchema=e.string().regex(/^[a-f0-9]{16}$/,"invalid gateway key fingerprint");const a=e.object({scope:e.enum(["default","connection_override"]),connectionId:e.string().min(1).optional(),currency:e.string().regex(/^[A-Z]{3}$/),inputMicrosPerMillion:e.string().regex(/^\d+$/).max(30).nullable().optional(),outputMicrosPerMillion:e.string().regex(/^\d+$/).max(30).nullable().optional(),cacheReadMicrosPerMillion:e.string().regex(/^\d+$/).max(30).nullable().optional(),cacheWriteMicrosPerMillion:e.string().regex(/^\d+$/).max(30).nullable().optional(),effectiveFrom:e.string().datetime().nullable().optional(),effectiveUntil:e.string().datetime().nullable().optional(),status:e.enum(["active","disabled"]).optional()}).strict(),r=a.superRefine((t,i)=>{t.scope==="default"&&t.connectionId&&i.addIssue({code:"custom",path:["connectionId"],message:"default rule cannot specify connectionId"}),t.scope==="connection_override"&&!t.connectionId&&i.addIssue({code:"custom",path:["connectionId"],message:"override rule requires connectionId"})});export const MANAGED_MODEL_VENDORS=["openai","anthropic","deepseek","google","meta","mistral","qwen","zhipu","moonshot","minimax","other"],ManagedModelVendorSchema=e.enum(MANAGED_MODEL_VENDORS),ManagedModelCurrencySchema=e.string().regex(/^[A-Z]{3}$/),ManagedModelCreateSchema=e.object({modelId:e.string().trim().min(1).max(500),vendor:ManagedModelVendorSchema.optional(),contextWindow:e.number().int().positive().max(1e8).optional(),currency:ManagedModelCurrencySchema.optional()}).strict(),ManagedModelUpdateSchema=e.object({status:e.enum(["active","disabled"]).optional(),vendor:ManagedModelVendorSchema.optional(),contextWindow:e.number().int().positive().max(1e8).nullable().optional(),currency:ManagedModelCurrencySchema.optional()}).strict().refine(t=>Object.keys(t).length>0),ManagedModelViewSchema=e.object({id:e.string().min(1),modelId:e.string().min(1),status:e.enum(["active","disabled"]),vendor:e.string().min(1),contextWindow:e.number().int().positive().max(1e8).nullable(),currency:e.string().regex(/^[A-Z]{3}$/),discoveredConnectionIds:e.array(e.string()),createdAt:e.string().datetime(),updatedAt:e.string().datetime()}).strict(),ManagedModelListResponseSchema=e.object({ok:e.literal(!0),data:e.array(ManagedModelViewSchema)}).strict(),ManagedModelResponseSchema=e.object({ok:e.literal(!0),data:ManagedModelViewSchema}).strict(),ManagedModelPriceInputSchema=r,ManagedModelPriceUpdateSchema=a.partial().strict(),ManagedModelPriceViewSchema=a.extend({id:e.string().min(1),managedModelId:e.string().min(1),connectionId:e.string().nullable(),inputMicrosPerMillion:e.string().regex(/^\d+$/).nullable(),outputMicrosPerMillion:e.string().regex(/^\d+$/).nullable(),cacheReadMicrosPerMillion:e.string().regex(/^\d+$/).nullable(),cacheWriteMicrosPerMillion:e.string().regex(/^\d+$/).nullable(),status:e.enum(["active","disabled"]),createdAt:e.string().datetime(),updatedAt:e.string().datetime()}).strict(),ManagedModelPriceListResponseSchema=e.object({ok:e.literal(!0),data:e.array(ManagedModelPriceViewSchema)}).strict(),ManagedModelPriceResponseSchema=e.object({ok:e.literal(!0),data:ManagedModelPriceViewSchema}).strict(),GatewayLogicalConnectionKeyCreateSchema=e.object({apiKey:e.string().trim().min(1).max(2e3)}).strict(),GatewayLogicalConnectionKeyUpdateSchema=e.object({status:e.enum(["active","disabled"]).optional(),isDefault:e.boolean().optional()}).strict().refine(t=>Object.keys(t).length>0),GatewayLogicalConnectionKeyViewSchema=e.object({id:e.string().min(1),fingerprint:GatewayConnectionKeyFingerprintSchema,status:e.enum(["active","disabled"]),verified:e.boolean(),isDefault:e.boolean(),createdAt:e.string().datetime(),updatedAt:e.string().datetime()}).strict(),GatewayLogicalConnectionKeyListResponseSchema=e.object({ok:e.literal(!0),data:e.array(GatewayLogicalConnectionKeyViewSchema)}).strict();
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
|
|
3
|
+
export declare function gatewayBodyTruncationMarker(droppedChars: number): string;
|
|
4
|
+
|
|
5
|
+
export declare const GATEWAY_BODY_TRUNCATION_PATTERN: RegExp;
|
|
6
|
+
|
|
7
|
+
export interface GatewayBodyTruncationSegment {
|
|
8
|
+
readonly kind: 'text' | 'marker';
|
|
9
|
+
readonly text: string;
|
|
10
|
+
readonly droppedChars: number | null;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export declare function splitGatewayBodyTruncation(text: string): readonly GatewayBodyTruncationSegment[];
|
|
14
|
+
|
|
15
|
+
export declare const GatewayBodyRetentionMaxDays = 3650;
|
|
16
|
+
|
|
17
|
+
export declare const GatewayBodyRetentionConfigSchema: z.ZodObject<{
|
|
18
|
+
enabled: z.ZodBoolean;
|
|
19
|
+
|
|
20
|
+
retentionDays: z.ZodNullable<z.ZodNumber>;
|
|
21
|
+
}, "strict", z.ZodTypeAny, {
|
|
22
|
+
enabled: boolean;
|
|
23
|
+
retentionDays: number | null;
|
|
24
|
+
}, {
|
|
25
|
+
enabled: boolean;
|
|
26
|
+
retentionDays: number | null;
|
|
27
|
+
}>;
|
|
28
|
+
export type GatewayBodyRetentionConfig = z.infer<typeof GatewayBodyRetentionConfigSchema>;
|
|
29
|
+
export declare const GatewayBodyRetentionConfigResponseSchema: z.ZodObject<{
|
|
30
|
+
ok: z.ZodLiteral<true>;
|
|
31
|
+
data: z.ZodObject<{
|
|
32
|
+
enabled: z.ZodBoolean;
|
|
33
|
+
|
|
34
|
+
retentionDays: z.ZodNullable<z.ZodNumber>;
|
|
35
|
+
}, "strict", z.ZodTypeAny, {
|
|
36
|
+
enabled: boolean;
|
|
37
|
+
retentionDays: number | null;
|
|
38
|
+
}, {
|
|
39
|
+
enabled: boolean;
|
|
40
|
+
retentionDays: number | null;
|
|
41
|
+
}>;
|
|
42
|
+
}, "strict", z.ZodTypeAny, {
|
|
43
|
+
data: {
|
|
44
|
+
enabled: boolean;
|
|
45
|
+
retentionDays: number | null;
|
|
46
|
+
};
|
|
47
|
+
ok: true;
|
|
48
|
+
}, {
|
|
49
|
+
data: {
|
|
50
|
+
enabled: boolean;
|
|
51
|
+
retentionDays: number | null;
|
|
52
|
+
};
|
|
53
|
+
ok: true;
|
|
54
|
+
}>;
|
|
55
|
+
export type GatewayBodyRetentionConfigResponse = z.infer<typeof GatewayBodyRetentionConfigResponseSchema>;
|
|
56
|
+
|
|
57
|
+
export declare const GatewayBodyRetentionUpdateSchema: z.ZodObject<{
|
|
58
|
+
enabled: z.ZodBoolean;
|
|
59
|
+
retentionDays: z.ZodOptional<z.ZodNumber>;
|
|
60
|
+
}, "strict", z.ZodTypeAny, {
|
|
61
|
+
enabled: boolean;
|
|
62
|
+
retentionDays?: number | undefined;
|
|
63
|
+
}, {
|
|
64
|
+
enabled: boolean;
|
|
65
|
+
retentionDays?: number | undefined;
|
|
66
|
+
}>;
|
|
67
|
+
export type GatewayBodyRetentionUpdate = z.infer<typeof GatewayBodyRetentionUpdateSchema>;
|
|
68
|
+
|
|
69
|
+
export declare const GatewayRequestRetainedBodySchema: z.ZodObject<{
|
|
70
|
+
gatewayRequestId: z.ZodString;
|
|
71
|
+
|
|
72
|
+
requestJson: z.ZodNullable<z.ZodUnknown>;
|
|
73
|
+
responseJson: z.ZodNullable<z.ZodUnknown>;
|
|
74
|
+
requestTruncated: z.ZodBoolean;
|
|
75
|
+
responseTruncated: z.ZodBoolean;
|
|
76
|
+
|
|
77
|
+
expiresAt: z.ZodNullable<z.ZodString>;
|
|
78
|
+
createdAt: z.ZodString;
|
|
79
|
+
}, "strict", z.ZodTypeAny, {
|
|
80
|
+
createdAt: string;
|
|
81
|
+
expiresAt: string | null;
|
|
82
|
+
gatewayRequestId: string;
|
|
83
|
+
requestTruncated: boolean;
|
|
84
|
+
responseTruncated: boolean;
|
|
85
|
+
requestJson?: unknown;
|
|
86
|
+
responseJson?: unknown;
|
|
87
|
+
}, {
|
|
88
|
+
createdAt: string;
|
|
89
|
+
expiresAt: string | null;
|
|
90
|
+
gatewayRequestId: string;
|
|
91
|
+
requestTruncated: boolean;
|
|
92
|
+
responseTruncated: boolean;
|
|
93
|
+
requestJson?: unknown;
|
|
94
|
+
responseJson?: unknown;
|
|
95
|
+
}>;
|
|
96
|
+
export type GatewayRequestRetainedBody = z.infer<typeof GatewayRequestRetainedBodySchema>;
|
|
97
|
+
export declare const GatewayRequestRetainedBodyResponseSchema: z.ZodObject<{
|
|
98
|
+
ok: z.ZodLiteral<true>;
|
|
99
|
+
data: z.ZodObject<{
|
|
100
|
+
gatewayRequestId: z.ZodString;
|
|
101
|
+
|
|
102
|
+
requestJson: z.ZodNullable<z.ZodUnknown>;
|
|
103
|
+
responseJson: z.ZodNullable<z.ZodUnknown>;
|
|
104
|
+
requestTruncated: z.ZodBoolean;
|
|
105
|
+
responseTruncated: z.ZodBoolean;
|
|
106
|
+
|
|
107
|
+
expiresAt: z.ZodNullable<z.ZodString>;
|
|
108
|
+
createdAt: z.ZodString;
|
|
109
|
+
}, "strict", z.ZodTypeAny, {
|
|
110
|
+
createdAt: string;
|
|
111
|
+
expiresAt: string | null;
|
|
112
|
+
gatewayRequestId: string;
|
|
113
|
+
requestTruncated: boolean;
|
|
114
|
+
responseTruncated: boolean;
|
|
115
|
+
requestJson?: unknown;
|
|
116
|
+
responseJson?: unknown;
|
|
117
|
+
}, {
|
|
118
|
+
createdAt: string;
|
|
119
|
+
expiresAt: string | null;
|
|
120
|
+
gatewayRequestId: string;
|
|
121
|
+
requestTruncated: boolean;
|
|
122
|
+
responseTruncated: boolean;
|
|
123
|
+
requestJson?: unknown;
|
|
124
|
+
responseJson?: unknown;
|
|
125
|
+
}>;
|
|
126
|
+
}, "strict", z.ZodTypeAny, {
|
|
127
|
+
data: {
|
|
128
|
+
createdAt: string;
|
|
129
|
+
expiresAt: string | null;
|
|
130
|
+
gatewayRequestId: string;
|
|
131
|
+
requestTruncated: boolean;
|
|
132
|
+
responseTruncated: boolean;
|
|
133
|
+
requestJson?: unknown;
|
|
134
|
+
responseJson?: unknown;
|
|
135
|
+
};
|
|
136
|
+
ok: true;
|
|
137
|
+
}, {
|
|
138
|
+
data: {
|
|
139
|
+
createdAt: string;
|
|
140
|
+
expiresAt: string | null;
|
|
141
|
+
gatewayRequestId: string;
|
|
142
|
+
requestTruncated: boolean;
|
|
143
|
+
responseTruncated: boolean;
|
|
144
|
+
requestJson?: unknown;
|
|
145
|
+
responseJson?: unknown;
|
|
146
|
+
};
|
|
147
|
+
ok: true;
|
|
148
|
+
}>;
|
|
149
|
+
export type GatewayRequestRetainedBodyResponse = z.infer<typeof GatewayRequestRetainedBodyResponseSchema>;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";import{z as e}from"zod";export function gatewayBodyTruncationMarker(n){return`
|
|
2
|
+
\u2026[+${n} chars truncated]`}export const GATEWAY_BODY_TRUNCATION_PATTERN=/…\[(?:content truncated|\+(\d+) chars truncated)\]/;export function splitGatewayBodyTruncation(n){const r=new RegExp(GATEWAY_BODY_TRUNCATION_PATTERN.source,"g"),a=[];let o=0,t=r.exec(n);for(;t!==null;)t.index>o&&a.push({kind:"text",text:n.slice(o,t.index),droppedChars:null}),a.push({kind:"marker",text:t[0],droppedChars:t[1]===void 0?null:Number(t[1])}),o=t.index+t[0].length,t=r.exec(n);return o<n.length&&a.push({kind:"text",text:n.slice(o),droppedChars:null}),a}export const GatewayBodyRetentionMaxDays=3650,GatewayBodyRetentionConfigSchema=e.object({enabled:e.boolean(),retentionDays:e.number().int().min(1).max(GatewayBodyRetentionMaxDays).nullable()}).strict(),GatewayBodyRetentionConfigResponseSchema=e.object({ok:e.literal(!0),data:GatewayBodyRetentionConfigSchema}).strict(),GatewayBodyRetentionUpdateSchema=e.object({enabled:e.boolean(),retentionDays:e.number().int().min(1).max(GatewayBodyRetentionMaxDays).optional()}).strict(),GatewayRequestRetainedBodySchema=e.object({gatewayRequestId:e.string(),requestJson:e.unknown().nullable(),responseJson:e.unknown().nullable(),requestTruncated:e.boolean(),responseTruncated:e.boolean(),expiresAt:e.string().datetime().nullable(),createdAt:e.string().datetime()}).strict(),GatewayRequestRetainedBodyResponseSchema=e.object({ok:e.literal(!0),data:GatewayRequestRetainedBodySchema}).strict();
|