@agent-vm/agent-portal-sdk 0.0.109
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/LICENSE +21 -0
- package/dist/adapter-boundary/index.d.ts +41 -0
- package/dist/adapter-boundary/index.d.ts.map +1 -0
- package/dist/adapter-boundary/index.js +29 -0
- package/dist/adapter-boundary/index.js.map +1 -0
- package/dist/approval-surface/index.d.ts +48 -0
- package/dist/approval-surface/index.d.ts.map +1 -0
- package/dist/approval-surface/index.js +22 -0
- package/dist/approval-surface/index.js.map +1 -0
- package/dist/artifact-reference-schema-XiJ280uV.js +12 -0
- package/dist/artifact-reference-schema-XiJ280uV.js.map +1 -0
- package/dist/artifact-surface/index.d.ts +49 -0
- package/dist/artifact-surface/index.d.ts.map +1 -0
- package/dist/artifact-surface/index.js +27 -0
- package/dist/artifact-surface/index.js.map +1 -0
- package/dist/capability-description-surface/index.d.ts +142 -0
- package/dist/capability-description-surface/index.d.ts.map +1 -0
- package/dist/capability-description-surface/index.js +2 -0
- package/dist/capability-descriptor-schema-wgtHF0Ic.js +86 -0
- package/dist/capability-descriptor-schema-wgtHF0Ic.js.map +1 -0
- package/dist/index-DJiaGYF_.d.ts +17 -0
- package/dist/index-DJiaGYF_.d.ts.map +1 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.js +12 -0
- package/dist/json-value-schema-Bj42URkc.d.ts +18 -0
- package/dist/json-value-schema-Bj42URkc.d.ts.map +1 -0
- package/dist/json-value-schema-D-3hfAyL.js +19 -0
- package/dist/json-value-schema-D-3hfAyL.js.map +1 -0
- package/dist/portal-call-result-schema-BIqFTFK8.js +102 -0
- package/dist/portal-call-result-schema-BIqFTFK8.js.map +1 -0
- package/dist/portal-call-result-schema-DjpKPcE_.d.ts +1271 -0
- package/dist/portal-call-result-schema-DjpKPcE_.d.ts.map +1 -0
- package/dist/portal-call-surface/index.d.ts +153 -0
- package/dist/portal-call-surface/index.d.ts.map +1 -0
- package/dist/portal-call-surface/index.js +69 -0
- package/dist/portal-call-surface/index.js.map +1 -0
- package/dist/portal-error-schema-D58onG2t.js +61 -0
- package/dist/portal-error-schema-D58onG2t.js.map +1 -0
- package/dist/portal-event-surface/index.d.ts +229 -0
- package/dist/portal-event-surface/index.d.ts.map +1 -0
- package/dist/portal-event-surface/index.js +51 -0
- package/dist/portal-event-surface/index.js.map +1 -0
- package/dist/testing/index.d.ts +20 -0
- package/dist/testing/index.d.ts.map +1 -0
- package/dist/testing/index.js +27 -0
- package/dist/testing/index.js.map +1 -0
- package/package.json +71 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025-2026 Shravan Sunder
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
|
|
3
|
+
//#region src/adapter-boundary/models/portal-adapter-envelope-schema.d.ts
|
|
4
|
+
declare const TrustedAgentScopeSchema: z.ZodObject<{
|
|
5
|
+
agentId: z.ZodString;
|
|
6
|
+
profileId: z.ZodString;
|
|
7
|
+
source: z.ZodEnum<{
|
|
8
|
+
"mcp-portal": "mcp-portal";
|
|
9
|
+
"tool-portal": "tool-portal";
|
|
10
|
+
"openclaw-plugin": "openclaw-plugin";
|
|
11
|
+
controller: "controller";
|
|
12
|
+
}>;
|
|
13
|
+
userId: z.ZodOptional<z.ZodString>;
|
|
14
|
+
}, z.core.$strict>;
|
|
15
|
+
type TrustedAgentScope = z.infer<typeof TrustedAgentScopeSchema>;
|
|
16
|
+
declare const PortalAdapterEnvelopeSchema: z.ZodObject<{
|
|
17
|
+
adapter: z.ZodEnum<{
|
|
18
|
+
"tool-portal": "tool-portal";
|
|
19
|
+
"openclaw-plugin": "openclaw-plugin";
|
|
20
|
+
"mcp-provider": "mcp-provider";
|
|
21
|
+
cli: "cli";
|
|
22
|
+
sdk: "sdk";
|
|
23
|
+
"http-api": "http-api";
|
|
24
|
+
}>;
|
|
25
|
+
auditCorrelationId: z.ZodOptional<z.ZodString>;
|
|
26
|
+
trustedScope: z.ZodObject<{
|
|
27
|
+
agentId: z.ZodString;
|
|
28
|
+
profileId: z.ZodString;
|
|
29
|
+
source: z.ZodEnum<{
|
|
30
|
+
"mcp-portal": "mcp-portal";
|
|
31
|
+
"tool-portal": "tool-portal";
|
|
32
|
+
"openclaw-plugin": "openclaw-plugin";
|
|
33
|
+
controller: "controller";
|
|
34
|
+
}>;
|
|
35
|
+
userId: z.ZodOptional<z.ZodString>;
|
|
36
|
+
}, z.core.$strict>;
|
|
37
|
+
}, z.core.$strict>;
|
|
38
|
+
type PortalAdapterEnvelope = z.infer<typeof PortalAdapterEnvelopeSchema>;
|
|
39
|
+
//#endregion
|
|
40
|
+
export { PortalAdapterEnvelope, PortalAdapterEnvelopeSchema, TrustedAgentScope, TrustedAgentScopeSchema };
|
|
41
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../../src/adapter-boundary/models/portal-adapter-envelope-schema.ts"],"mappings":";;;cAEa,uBAAA,EAAuB,CAAA,CAAA,SAAA;;;;;;;;;;;KASxB,iBAAA,GAAoB,CAAA,CAAE,KAAA,QAAa,uBAAA;AAAA,cAElC,2BAAA,EAA2B,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;;;KAQ5B,qBAAA,GAAwB,CAAA,CAAE,KAAA,QAAa,2BAAA"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
//#region src/adapter-boundary/models/portal-adapter-envelope-schema.ts
|
|
3
|
+
const TrustedAgentScopeSchema = z.object({
|
|
4
|
+
agentId: z.string().min(1),
|
|
5
|
+
profileId: z.string().min(1),
|
|
6
|
+
source: z.enum([
|
|
7
|
+
"mcp-portal",
|
|
8
|
+
"tool-portal",
|
|
9
|
+
"openclaw-plugin",
|
|
10
|
+
"controller"
|
|
11
|
+
]),
|
|
12
|
+
userId: z.string().min(1).optional()
|
|
13
|
+
}).strict();
|
|
14
|
+
const PortalAdapterEnvelopeSchema = z.object({
|
|
15
|
+
adapter: z.enum([
|
|
16
|
+
"mcp-provider",
|
|
17
|
+
"tool-portal",
|
|
18
|
+
"openclaw-plugin",
|
|
19
|
+
"cli",
|
|
20
|
+
"sdk",
|
|
21
|
+
"http-api"
|
|
22
|
+
]),
|
|
23
|
+
auditCorrelationId: z.string().min(1).optional(),
|
|
24
|
+
trustedScope: TrustedAgentScopeSchema
|
|
25
|
+
}).strict();
|
|
26
|
+
//#endregion
|
|
27
|
+
export { PortalAdapterEnvelopeSchema, TrustedAgentScopeSchema };
|
|
28
|
+
|
|
29
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../src/adapter-boundary/models/portal-adapter-envelope-schema.ts"],"sourcesContent":["import { z } from 'zod';\n\nexport const TrustedAgentScopeSchema = z\n\t.object({\n\t\tagentId: z.string().min(1),\n\t\tprofileId: z.string().min(1),\n\t\tsource: z.enum(['mcp-portal', 'tool-portal', 'openclaw-plugin', 'controller']),\n\t\tuserId: z.string().min(1).optional(),\n\t})\n\t.strict();\n\nexport type TrustedAgentScope = z.infer<typeof TrustedAgentScopeSchema>;\n\nexport const PortalAdapterEnvelopeSchema = z\n\t.object({\n\t\tadapter: z.enum(['mcp-provider', 'tool-portal', 'openclaw-plugin', 'cli', 'sdk', 'http-api']),\n\t\tauditCorrelationId: z.string().min(1).optional(),\n\t\ttrustedScope: TrustedAgentScopeSchema,\n\t})\n\t.strict();\n\nexport type PortalAdapterEnvelope = z.infer<typeof PortalAdapterEnvelopeSchema>;\n"],"mappings":";;AAEA,MAAa,0BAA0B,EACrC,OAAO;CACP,SAAS,EAAE,QAAQ,CAAC,IAAI,EAAE;CAC1B,WAAW,EAAE,QAAQ,CAAC,IAAI,EAAE;CAC5B,QAAQ,EAAE,KAAK;EAAC;EAAc;EAAe;EAAmB;EAAa,CAAC;CAC9E,QAAQ,EAAE,QAAQ,CAAC,IAAI,EAAE,CAAC,UAAU;CACpC,CAAC,CACD,QAAQ;AAIV,MAAa,8BAA8B,EACzC,OAAO;CACP,SAAS,EAAE,KAAK;EAAC;EAAgB;EAAe;EAAmB;EAAO;EAAO;EAAW,CAAC;CAC7F,oBAAoB,EAAE,QAAQ,CAAC,IAAI,EAAE,CAAC,UAAU;CAChD,cAAc;CACd,CAAC,CACD,QAAQ"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
|
|
3
|
+
//#region src/approval-surface/models/approval-decision-reference-schema.d.ts
|
|
4
|
+
declare const ApprovalDecisionReferenceSchema: z.ZodObject<{
|
|
5
|
+
approvalId: z.ZodString;
|
|
6
|
+
callId: z.ZodString;
|
|
7
|
+
expiresAt: z.ZodString;
|
|
8
|
+
status: z.ZodEnum<{
|
|
9
|
+
approved: "approved";
|
|
10
|
+
denied: "denied";
|
|
11
|
+
expired: "expired";
|
|
12
|
+
}>;
|
|
13
|
+
}, z.core.$strict>;
|
|
14
|
+
type ApprovalDecisionReference = z.infer<typeof ApprovalDecisionReferenceSchema>;
|
|
15
|
+
declare const ApprovalRequiredResultSchema: z.ZodObject<{
|
|
16
|
+
error: z.ZodObject<{
|
|
17
|
+
message: z.ZodString;
|
|
18
|
+
retryable: z.ZodOptional<z.ZodBoolean>;
|
|
19
|
+
safeDiagnostic: z.ZodOptional<z.ZodObject<{
|
|
20
|
+
code: z.ZodEnum<{
|
|
21
|
+
approval_required: "approval_required";
|
|
22
|
+
capability_denied: "capability_denied";
|
|
23
|
+
validation_failed: "validation_failed";
|
|
24
|
+
provider_unavailable: "provider_unavailable";
|
|
25
|
+
execution_failed: "execution_failed";
|
|
26
|
+
cancelled: "cancelled";
|
|
27
|
+
timeout: "timeout";
|
|
28
|
+
output_truncated: "output_truncated";
|
|
29
|
+
artifact_unavailable: "artifact_unavailable";
|
|
30
|
+
}>;
|
|
31
|
+
level: z.ZodEnum<{
|
|
32
|
+
error: "error";
|
|
33
|
+
debug: "debug";
|
|
34
|
+
info: "info";
|
|
35
|
+
warn: "warn";
|
|
36
|
+
}>;
|
|
37
|
+
safeMessage: z.ZodString;
|
|
38
|
+
safeParams: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
39
|
+
}, z.core.$strict>>;
|
|
40
|
+
code: z.ZodLiteral<"approval_required">;
|
|
41
|
+
}, z.core.$strict>;
|
|
42
|
+
id: z.ZodString;
|
|
43
|
+
status: z.ZodLiteral<"error">;
|
|
44
|
+
}, z.core.$strict>;
|
|
45
|
+
type ApprovalRequiredResult = z.infer<typeof ApprovalRequiredResultSchema>;
|
|
46
|
+
//#endregion
|
|
47
|
+
export { ApprovalDecisionReference, ApprovalDecisionReferenceSchema, ApprovalRequiredResult, ApprovalRequiredResultSchema };
|
|
48
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../../src/approval-surface/models/approval-decision-reference-schema.ts"],"mappings":";;;cAKa,+BAAA,EAA+B,CAAA,CAAA,SAAA;;;;;;;;;;KAShC,yBAAA,GAA4B,CAAA,CAAE,KAAA,QAAa,+BAAA;AAAA,cAE1C,4BAAA,EAA4B,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAU7B,sBAAA,GAAyB,CAAA,CAAE,KAAA,QAAa,4BAAA"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { a as ItemIdSchema, n as PortalErrorSchema } from "../portal-error-schema-D58onG2t.js";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
//#region src/approval-surface/models/approval-decision-reference-schema.ts
|
|
4
|
+
const ApprovalDecisionReferenceSchema = z.object({
|
|
5
|
+
approvalId: z.string().min(1),
|
|
6
|
+
callId: ItemIdSchema,
|
|
7
|
+
expiresAt: z.string().datetime(),
|
|
8
|
+
status: z.enum([
|
|
9
|
+
"approved",
|
|
10
|
+
"denied",
|
|
11
|
+
"expired"
|
|
12
|
+
])
|
|
13
|
+
}).strict();
|
|
14
|
+
const ApprovalRequiredResultSchema = z.object({
|
|
15
|
+
error: PortalErrorSchema.extend({ code: z.literal("approval_required") }),
|
|
16
|
+
id: ItemIdSchema,
|
|
17
|
+
status: z.literal("error")
|
|
18
|
+
}).strict();
|
|
19
|
+
//#endregion
|
|
20
|
+
export { ApprovalDecisionReferenceSchema, ApprovalRequiredResultSchema };
|
|
21
|
+
|
|
22
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../src/approval-surface/models/approval-decision-reference-schema.ts"],"sourcesContent":["import { z } from 'zod';\n\nimport { ItemIdSchema } from '../../contract-primitives/models/request-id-schema.js';\nimport { PortalErrorSchema } from '../../portal-call-surface/models/portal-error-schema.js';\n\nexport const ApprovalDecisionReferenceSchema = z\n\t.object({\n\t\tapprovalId: z.string().min(1),\n\t\tcallId: ItemIdSchema,\n\t\texpiresAt: z.string().datetime(),\n\t\tstatus: z.enum(['approved', 'denied', 'expired']),\n\t})\n\t.strict();\n\nexport type ApprovalDecisionReference = z.infer<typeof ApprovalDecisionReferenceSchema>;\n\nexport const ApprovalRequiredResultSchema = z\n\t.object({\n\t\terror: PortalErrorSchema.extend({\n\t\t\tcode: z.literal('approval_required'),\n\t\t}),\n\t\tid: ItemIdSchema,\n\t\tstatus: z.literal('error'),\n\t})\n\t.strict();\n\nexport type ApprovalRequiredResult = z.infer<typeof ApprovalRequiredResultSchema>;\n"],"mappings":";;;AAKA,MAAa,kCAAkC,EAC7C,OAAO;CACP,YAAY,EAAE,QAAQ,CAAC,IAAI,EAAE;CAC7B,QAAQ;CACR,WAAW,EAAE,QAAQ,CAAC,UAAU;CAChC,QAAQ,EAAE,KAAK;EAAC;EAAY;EAAU;EAAU,CAAC;CACjD,CAAC,CACD,QAAQ;AAIV,MAAa,+BAA+B,EAC1C,OAAO;CACP,OAAO,kBAAkB,OAAO,EAC/B,MAAM,EAAE,QAAQ,oBAAoB,EACpC,CAAC;CACF,IAAI;CACJ,QAAQ,EAAE,QAAQ,QAAQ;CAC1B,CAAC,CACD,QAAQ"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
//#region src/artifact-surface/models/artifact-reference-schema.ts
|
|
3
|
+
const ArtifactReferenceSchema = z.object({
|
|
4
|
+
byteLength: z.number().int().nonnegative().optional(),
|
|
5
|
+
expiresAt: z.string().datetime().optional(),
|
|
6
|
+
id: z.string().min(1),
|
|
7
|
+
mediaType: z.string().optional()
|
|
8
|
+
}).strict();
|
|
9
|
+
//#endregion
|
|
10
|
+
export { ArtifactReferenceSchema as t };
|
|
11
|
+
|
|
12
|
+
//# sourceMappingURL=artifact-reference-schema-XiJ280uV.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"artifact-reference-schema-XiJ280uV.js","names":[],"sources":["../src/artifact-surface/models/artifact-reference-schema.ts"],"sourcesContent":["import { z } from 'zod';\n\nexport const ArtifactReferenceSchema = z\n\t.object({\n\t\tbyteLength: z.number().int().nonnegative().optional(),\n\t\texpiresAt: z.string().datetime().optional(),\n\t\tid: z.string().min(1),\n\t\tmediaType: z.string().optional(),\n\t})\n\t.strict();\n\nexport type ArtifactReference = z.infer<typeof ArtifactReferenceSchema>;\n"],"mappings":";;AAEA,MAAa,0BAA0B,EACrC,OAAO;CACP,YAAY,EAAE,QAAQ,CAAC,KAAK,CAAC,aAAa,CAAC,UAAU;CACrD,WAAW,EAAE,QAAQ,CAAC,UAAU,CAAC,UAAU;CAC3C,IAAI,EAAE,QAAQ,CAAC,IAAI,EAAE;CACrB,WAAW,EAAE,QAAQ,CAAC,UAAU;CAChC,CAAC,CACD,QAAQ"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { l as JsonValue } from "../json-value-schema-Bj42URkc.js";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
|
|
4
|
+
//#region src/artifact-surface/models/artifact-reference-schema.d.ts
|
|
5
|
+
declare const ArtifactReferenceSchema: z.ZodObject<{
|
|
6
|
+
byteLength: z.ZodOptional<z.ZodNumber>;
|
|
7
|
+
expiresAt: z.ZodOptional<z.ZodString>;
|
|
8
|
+
id: z.ZodString;
|
|
9
|
+
mediaType: z.ZodOptional<z.ZodString>;
|
|
10
|
+
}, z.core.$strict>;
|
|
11
|
+
type ArtifactReference = z.infer<typeof ArtifactReferenceSchema>;
|
|
12
|
+
//#endregion
|
|
13
|
+
//#region src/artifact-surface/models/portal-artifact-contract-schema.d.ts
|
|
14
|
+
declare const PortalArtifactRecordSchema: z.ZodObject<{
|
|
15
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>>>;
|
|
16
|
+
reference: z.ZodObject<{
|
|
17
|
+
byteLength: z.ZodOptional<z.ZodNumber>;
|
|
18
|
+
expiresAt: z.ZodOptional<z.ZodString>;
|
|
19
|
+
id: z.ZodString;
|
|
20
|
+
mediaType: z.ZodOptional<z.ZodString>;
|
|
21
|
+
}, z.core.$strict>;
|
|
22
|
+
redactionProfile: z.ZodString;
|
|
23
|
+
}, z.core.$strict>;
|
|
24
|
+
type PortalArtifactRecord = z.infer<typeof PortalArtifactRecordSchema>;
|
|
25
|
+
declare const PortalArtifactReadRequestSchema: z.ZodObject<{
|
|
26
|
+
artifactId: z.ZodString;
|
|
27
|
+
maxBytes: z.ZodNumber;
|
|
28
|
+
}, z.core.$strict>;
|
|
29
|
+
type PortalArtifactReadRequest = z.infer<typeof PortalArtifactReadRequestSchema>;
|
|
30
|
+
declare const PortalArtifactReadResultSchema: z.ZodObject<{
|
|
31
|
+
contentBase64: z.ZodString;
|
|
32
|
+
mediaType: z.ZodOptional<z.ZodString>;
|
|
33
|
+
reference: z.ZodObject<{
|
|
34
|
+
byteLength: z.ZodOptional<z.ZodNumber>;
|
|
35
|
+
expiresAt: z.ZodOptional<z.ZodString>;
|
|
36
|
+
id: z.ZodString;
|
|
37
|
+
mediaType: z.ZodOptional<z.ZodString>;
|
|
38
|
+
}, z.core.$strict>;
|
|
39
|
+
truncated: z.ZodDefault<z.ZodBoolean>;
|
|
40
|
+
}, z.core.$strict>;
|
|
41
|
+
type PortalArtifactReadResult = z.infer<typeof PortalArtifactReadResultSchema>;
|
|
42
|
+
declare const PortalArtifactRedactorSchema: z.ZodObject<{
|
|
43
|
+
maxModelVisibleBytes: z.ZodNumber;
|
|
44
|
+
profile: z.ZodString;
|
|
45
|
+
}, z.core.$strict>;
|
|
46
|
+
type PortalArtifactRedactor = z.infer<typeof PortalArtifactRedactorSchema>;
|
|
47
|
+
//#endregion
|
|
48
|
+
export { ArtifactReference, ArtifactReferenceSchema, PortalArtifactReadRequest, PortalArtifactReadRequestSchema, PortalArtifactReadResult, PortalArtifactReadResultSchema, PortalArtifactRecord, PortalArtifactRecordSchema, PortalArtifactRedactor, PortalArtifactRedactorSchema };
|
|
49
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../../src/artifact-surface/models/artifact-reference-schema.ts","../../src/artifact-surface/models/portal-artifact-contract-schema.ts"],"mappings":";;;;cAEa,uBAAA,EAAuB,CAAA,CAAA,SAAA;;;;;;KASxB,iBAAA,GAAoB,CAAA,CAAE,KAAA,QAAa,uBAAA;;;cCNlC,0BAAA,EAA0B,CAAA,CAAA,SAAA;;;;;;;;;;KAQ3B,oBAAA,GAAuB,CAAA,CAAE,KAAA,QAAa,0BAAA;AAAA,cAErC,+BAAA,EAA+B,CAAA,CAAA,SAAA;;;;KAWhC,yBAAA,GAA4B,CAAA,CAAE,KAAA,QAAa,+BAAA;AAAA,cAE1C,8BAAA,EAA8B,CAAA,CAAA,SAAA;;;;;;;;;;;KAS/B,wBAAA,GAA2B,CAAA,CAAE,KAAA,QAAa,8BAAA;AAAA,cAEzC,4BAAA,EAA4B,CAAA,CAAA,SAAA;;;;KAO7B,sBAAA,GAAyB,CAAA,CAAE,KAAA,QAAa,4BAAA"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { t as ArtifactReferenceSchema } from "../artifact-reference-schema-XiJ280uV.js";
|
|
2
|
+
import { o as JsonValueSchema } from "../json-value-schema-D-3hfAyL.js";
|
|
3
|
+
import { z } from "zod";
|
|
4
|
+
//#region src/artifact-surface/models/portal-artifact-contract-schema.ts
|
|
5
|
+
const PortalArtifactRecordSchema = z.object({
|
|
6
|
+
metadata: z.record(z.string(), JsonValueSchema).optional(),
|
|
7
|
+
reference: ArtifactReferenceSchema,
|
|
8
|
+
redactionProfile: z.string().min(1)
|
|
9
|
+
}).strict();
|
|
10
|
+
const PortalArtifactReadRequestSchema = z.object({
|
|
11
|
+
artifactId: z.string().min(1),
|
|
12
|
+
maxBytes: z.number().int().positive().max(16 * 1024 * 1024)
|
|
13
|
+
}).strict();
|
|
14
|
+
const PortalArtifactReadResultSchema = z.object({
|
|
15
|
+
contentBase64: z.string(),
|
|
16
|
+
mediaType: z.string().optional(),
|
|
17
|
+
reference: ArtifactReferenceSchema,
|
|
18
|
+
truncated: z.boolean().default(false)
|
|
19
|
+
}).strict();
|
|
20
|
+
const PortalArtifactRedactorSchema = z.object({
|
|
21
|
+
maxModelVisibleBytes: z.number().int().nonnegative(),
|
|
22
|
+
profile: z.string().min(1)
|
|
23
|
+
}).strict();
|
|
24
|
+
//#endregion
|
|
25
|
+
export { ArtifactReferenceSchema, PortalArtifactReadRequestSchema, PortalArtifactReadResultSchema, PortalArtifactRecordSchema, PortalArtifactRedactorSchema };
|
|
26
|
+
|
|
27
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../src/artifact-surface/models/portal-artifact-contract-schema.ts"],"sourcesContent":["import { z } from 'zod';\n\nimport { JsonValueSchema } from '../../contract-primitives/models/json-value-schema.js';\nimport { ArtifactReferenceSchema } from './artifact-reference-schema.js';\n\nexport const PortalArtifactRecordSchema = z\n\t.object({\n\t\tmetadata: z.record(z.string(), JsonValueSchema).optional(),\n\t\treference: ArtifactReferenceSchema,\n\t\tredactionProfile: z.string().min(1),\n\t})\n\t.strict();\n\nexport type PortalArtifactRecord = z.infer<typeof PortalArtifactRecordSchema>;\n\nexport const PortalArtifactReadRequestSchema = z\n\t.object({\n\t\tartifactId: z.string().min(1),\n\t\tmaxBytes: z\n\t\t\t.number()\n\t\t\t.int()\n\t\t\t.positive()\n\t\t\t.max(16 * 1024 * 1024),\n\t})\n\t.strict();\n\nexport type PortalArtifactReadRequest = z.infer<typeof PortalArtifactReadRequestSchema>;\n\nexport const PortalArtifactReadResultSchema = z\n\t.object({\n\t\tcontentBase64: z.string(),\n\t\tmediaType: z.string().optional(),\n\t\treference: ArtifactReferenceSchema,\n\t\ttruncated: z.boolean().default(false),\n\t})\n\t.strict();\n\nexport type PortalArtifactReadResult = z.infer<typeof PortalArtifactReadResultSchema>;\n\nexport const PortalArtifactRedactorSchema = z\n\t.object({\n\t\tmaxModelVisibleBytes: z.number().int().nonnegative(),\n\t\tprofile: z.string().min(1),\n\t})\n\t.strict();\n\nexport type PortalArtifactRedactor = z.infer<typeof PortalArtifactRedactorSchema>;\n"],"mappings":";;;;AAKA,MAAa,6BAA6B,EACxC,OAAO;CACP,UAAU,EAAE,OAAO,EAAE,QAAQ,EAAE,gBAAgB,CAAC,UAAU;CAC1D,WAAW;CACX,kBAAkB,EAAE,QAAQ,CAAC,IAAI,EAAE;CACnC,CAAC,CACD,QAAQ;AAIV,MAAa,kCAAkC,EAC7C,OAAO;CACP,YAAY,EAAE,QAAQ,CAAC,IAAI,EAAE;CAC7B,UAAU,EACR,QAAQ,CACR,KAAK,CACL,UAAU,CACV,IAAI,KAAK,OAAO,KAAK;CACvB,CAAC,CACD,QAAQ;AAIV,MAAa,iCAAiC,EAC5C,OAAO;CACP,eAAe,EAAE,QAAQ;CACzB,WAAW,EAAE,QAAQ,CAAC,UAAU;CAChC,WAAW;CACX,WAAW,EAAE,SAAS,CAAC,QAAQ,MAAM;CACrC,CAAC,CACD,QAAQ;AAIV,MAAa,+BAA+B,EAC1C,OAAO;CACP,sBAAsB,EAAE,QAAQ,CAAC,KAAK,CAAC,aAAa;CACpD,SAAS,EAAE,QAAQ,CAAC,IAAI,EAAE;CAC1B,CAAC,CACD,QAAQ"}
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
import { l as JsonValue } from "../json-value-schema-Bj42URkc.js";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
|
|
4
|
+
//#region src/capability-description-surface/models/capability-descriptor-schema.d.ts
|
|
5
|
+
declare const JsonSchemaDocumentSchema: z.ZodRecord<z.ZodString, z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>>;
|
|
6
|
+
declare const ToolSchemaSummarySchema: z.ZodObject<{
|
|
7
|
+
optional: z.ZodArray<z.ZodString>;
|
|
8
|
+
propertyCount: z.ZodNumber;
|
|
9
|
+
required: z.ZodArray<z.ZodString>;
|
|
10
|
+
type: z.ZodString;
|
|
11
|
+
}, z.core.$strict>;
|
|
12
|
+
type ToolSchemaSummary = z.infer<typeof ToolSchemaSummarySchema>;
|
|
13
|
+
declare const ToolSafetySummarySchema: z.ZodObject<{
|
|
14
|
+
destructiveHint: z.ZodOptional<z.ZodBoolean>;
|
|
15
|
+
readOnlyHint: z.ZodOptional<z.ZodBoolean>;
|
|
16
|
+
}, z.core.$strict>;
|
|
17
|
+
type ToolSafetySummary = z.infer<typeof ToolSafetySummarySchema>;
|
|
18
|
+
declare const ToolSchemaHintSchema: z.ZodObject<{
|
|
19
|
+
message: z.ZodString;
|
|
20
|
+
next: z.ZodEnum<{
|
|
21
|
+
call_ready: "call_ready";
|
|
22
|
+
describe_before_call: "describe_before_call";
|
|
23
|
+
}>;
|
|
24
|
+
}, z.core.$strict>;
|
|
25
|
+
type ToolSchemaHint = z.infer<typeof ToolSchemaHintSchema>;
|
|
26
|
+
declare const CapabilitySummarySchema: z.ZodObject<{
|
|
27
|
+
description: z.ZodOptional<z.ZodString>;
|
|
28
|
+
input: z.ZodObject<{
|
|
29
|
+
optional: z.ZodArray<z.ZodString>;
|
|
30
|
+
propertyCount: z.ZodNumber;
|
|
31
|
+
required: z.ZodArray<z.ZodString>;
|
|
32
|
+
type: z.ZodString;
|
|
33
|
+
}, z.core.$strict>;
|
|
34
|
+
namespace: z.ZodString;
|
|
35
|
+
output: z.ZodOptional<z.ZodObject<{
|
|
36
|
+
optional: z.ZodArray<z.ZodString>;
|
|
37
|
+
propertyCount: z.ZodNumber;
|
|
38
|
+
required: z.ZodArray<z.ZodString>;
|
|
39
|
+
type: z.ZodString;
|
|
40
|
+
}, z.core.$strict>>;
|
|
41
|
+
safety: z.ZodObject<{
|
|
42
|
+
destructiveHint: z.ZodOptional<z.ZodBoolean>;
|
|
43
|
+
readOnlyHint: z.ZodOptional<z.ZodBoolean>;
|
|
44
|
+
}, z.core.$strict>;
|
|
45
|
+
schemaHint: z.ZodOptional<z.ZodObject<{
|
|
46
|
+
message: z.ZodString;
|
|
47
|
+
next: z.ZodEnum<{
|
|
48
|
+
call_ready: "call_ready";
|
|
49
|
+
describe_before_call: "describe_before_call";
|
|
50
|
+
}>;
|
|
51
|
+
}, z.core.$strict>>;
|
|
52
|
+
title: z.ZodOptional<z.ZodString>;
|
|
53
|
+
name: z.ZodString;
|
|
54
|
+
toolRef: z.ZodString;
|
|
55
|
+
}, z.core.$strict>;
|
|
56
|
+
type CapabilitySummary = z.infer<typeof CapabilitySummarySchema>;
|
|
57
|
+
declare const ResultExpectationSchema: z.ZodObject<{
|
|
58
|
+
canReturnArtifacts: z.ZodDefault<z.ZodBoolean>;
|
|
59
|
+
canStream: z.ZodDefault<z.ZodBoolean>;
|
|
60
|
+
kind: z.ZodEnum<{
|
|
61
|
+
json: "json";
|
|
62
|
+
text: "text";
|
|
63
|
+
binary_artifact: "binary_artifact";
|
|
64
|
+
mixed: "mixed";
|
|
65
|
+
}>;
|
|
66
|
+
outputJsonSchema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>>>;
|
|
67
|
+
truncation: z.ZodDefault<z.ZodEnum<{
|
|
68
|
+
none: "none";
|
|
69
|
+
possible: "possible";
|
|
70
|
+
expected: "expected";
|
|
71
|
+
}>>;
|
|
72
|
+
}, z.core.$strict>;
|
|
73
|
+
type ResultExpectation = z.infer<typeof ResultExpectationSchema>;
|
|
74
|
+
declare const SafeCallingHintSchema: z.ZodObject<{
|
|
75
|
+
code: z.ZodEnum<{
|
|
76
|
+
describe_before_call: "describe_before_call";
|
|
77
|
+
approval_may_be_required: "approval_may_be_required";
|
|
78
|
+
read_only: "read_only";
|
|
79
|
+
write_or_external_effect: "write_or_external_effect";
|
|
80
|
+
large_output_possible: "large_output_possible";
|
|
81
|
+
artifact_output_possible: "artifact_output_possible";
|
|
82
|
+
}>;
|
|
83
|
+
message: z.ZodString;
|
|
84
|
+
}, z.core.$strict>;
|
|
85
|
+
type SafeCallingHint = z.infer<typeof SafeCallingHintSchema>;
|
|
86
|
+
declare const CapabilitySearchMatchSchema: z.ZodObject<{
|
|
87
|
+
description: z.ZodOptional<z.ZodString>;
|
|
88
|
+
input: z.ZodObject<{
|
|
89
|
+
optional: z.ZodArray<z.ZodString>;
|
|
90
|
+
propertyCount: z.ZodNumber;
|
|
91
|
+
required: z.ZodArray<z.ZodString>;
|
|
92
|
+
type: z.ZodString;
|
|
93
|
+
}, z.core.$strict>;
|
|
94
|
+
namespace: z.ZodString;
|
|
95
|
+
output: z.ZodOptional<z.ZodObject<{
|
|
96
|
+
optional: z.ZodArray<z.ZodString>;
|
|
97
|
+
propertyCount: z.ZodNumber;
|
|
98
|
+
required: z.ZodArray<z.ZodString>;
|
|
99
|
+
type: z.ZodString;
|
|
100
|
+
}, z.core.$strict>>;
|
|
101
|
+
safety: z.ZodObject<{
|
|
102
|
+
destructiveHint: z.ZodOptional<z.ZodBoolean>;
|
|
103
|
+
readOnlyHint: z.ZodOptional<z.ZodBoolean>;
|
|
104
|
+
}, z.core.$strict>;
|
|
105
|
+
schemaHint: z.ZodOptional<z.ZodObject<{
|
|
106
|
+
message: z.ZodString;
|
|
107
|
+
next: z.ZodEnum<{
|
|
108
|
+
call_ready: "call_ready";
|
|
109
|
+
describe_before_call: "describe_before_call";
|
|
110
|
+
}>;
|
|
111
|
+
}, z.core.$strict>>;
|
|
112
|
+
title: z.ZodOptional<z.ZodString>;
|
|
113
|
+
name: z.ZodString;
|
|
114
|
+
toolRef: z.ZodString;
|
|
115
|
+
inputSchema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>>>;
|
|
116
|
+
outputSchema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>>>;
|
|
117
|
+
relationshipHints: z.ZodOptional<z.ZodArray<z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>>>;
|
|
118
|
+
schemaFieldMatches: z.ZodOptional<z.ZodArray<z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>>>;
|
|
119
|
+
}, z.core.$strict>;
|
|
120
|
+
type CapabilitySearchMatch = z.infer<typeof CapabilitySearchMatchSchema>;
|
|
121
|
+
declare const CapabilityDescriptorSchema: z.ZodObject<{
|
|
122
|
+
annotations: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>>>;
|
|
123
|
+
inputSchema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>>>;
|
|
124
|
+
namespace: z.ZodString;
|
|
125
|
+
outputSchema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>>>;
|
|
126
|
+
related: z.ZodDefault<z.ZodArray<z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>>>;
|
|
127
|
+
schemaHint: z.ZodOptional<z.ZodObject<{
|
|
128
|
+
message: z.ZodString;
|
|
129
|
+
next: z.ZodEnum<{
|
|
130
|
+
call_ready: "call_ready";
|
|
131
|
+
describe_before_call: "describe_before_call";
|
|
132
|
+
}>;
|
|
133
|
+
}, z.core.$strict>>;
|
|
134
|
+
name: z.ZodString;
|
|
135
|
+
toolRef: z.ZodString;
|
|
136
|
+
typescriptHelper: z.ZodOptional<z.ZodString>;
|
|
137
|
+
zod: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>>>;
|
|
138
|
+
}, z.core.$strict>;
|
|
139
|
+
type CapabilityDescriptor = z.infer<typeof CapabilityDescriptorSchema>;
|
|
140
|
+
//#endregion
|
|
141
|
+
export { CapabilityDescriptor, CapabilityDescriptorSchema, CapabilitySearchMatch, CapabilitySearchMatchSchema, CapabilitySummary, CapabilitySummarySchema, JsonSchemaDocumentSchema, ResultExpectation, ResultExpectationSchema, SafeCallingHint, SafeCallingHintSchema, ToolSafetySummary, ToolSafetySummarySchema, ToolSchemaHint, ToolSchemaHintSchema, ToolSchemaSummary, ToolSchemaSummarySchema };
|
|
142
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../../src/capability-description-surface/models/capability-descriptor-schema.ts"],"mappings":";;;;cAQa,wBAAA,EAAwB,CAAA,CAAA,SAAA,CAAA,CAAA,CAAA,SAAA,EAAA,CAAA,CAAA,OAAA,CAAA,SAAA,WAAA,CAAA,CAAA,IAAA,CAAA,iBAAA,CAAA,SAAA;AAAA,cAExB,uBAAA,EAAuB,CAAA,CAAA,SAAA;;;;;;KASxB,iBAAA,GAAoB,CAAA,CAAE,KAAA,QAAa,uBAAA;AAAA,cAElC,uBAAA,EAAuB,CAAA,CAAA,SAAA;;;;KAOxB,iBAAA,GAAoB,CAAA,CAAE,KAAA,QAAa,uBAAA;AAAA,cAElC,oBAAA,EAAoB,CAAA,CAAA,SAAA;;;;;;;KAOrB,cAAA,GAAiB,CAAA,CAAE,KAAA,QAAa,oBAAA;AAAA,cAE/B,uBAAA,EAAuB,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAcxB,iBAAA,GAAoB,CAAA,CAAE,KAAA,QAAa,uBAAA;AAAA,cAElC,uBAAA,EAAuB,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;KAUxB,iBAAA,GAAoB,CAAA,CAAE,KAAA,QAAa,uBAAA;AAAA,cAElC,qBAAA,EAAqB,CAAA,CAAA,SAAA;;;;;;;;;;;KActB,eAAA,GAAkB,CAAA,CAAE,KAAA,QAAa,qBAAA;AAAA,cAEhC,2BAAA,EAA2B,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAO5B,qBAAA,GAAwB,CAAA,CAAE,KAAA,QAAa,2BAAA;AAAA,cAEtC,0BAAA,EAA0B,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;KAe3B,oBAAA,GAAuB,CAAA,CAAE,KAAA,QAAa,0BAAA"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { a as ResultExpectationSchema, c as ToolSchemaHintSchema, i as JsonSchemaDocumentSchema, l as ToolSchemaSummarySchema, n as CapabilitySearchMatchSchema, o as SafeCallingHintSchema, r as CapabilitySummarySchema, s as ToolSafetySummarySchema, t as CapabilityDescriptorSchema } from "../capability-descriptor-schema-wgtHF0Ic.js";
|
|
2
|
+
export { CapabilityDescriptorSchema, CapabilitySearchMatchSchema, CapabilitySummarySchema, JsonSchemaDocumentSchema, ResultExpectationSchema, SafeCallingHintSchema, ToolSafetySummarySchema, ToolSchemaHintSchema, ToolSchemaSummarySchema };
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { o as JsonValueSchema } from "./json-value-schema-D-3hfAyL.js";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
//#region src/contract-primitives/models/capability-reference-schema.ts
|
|
4
|
+
const NamespaceNameSchema = z.string().min(1);
|
|
5
|
+
const CapabilityNameSchema = z.string().min(1);
|
|
6
|
+
const CapabilityReferenceSchema = z.object({
|
|
7
|
+
namespace: NamespaceNameSchema,
|
|
8
|
+
name: CapabilityNameSchema
|
|
9
|
+
}).strict();
|
|
10
|
+
//#endregion
|
|
11
|
+
//#region src/capability-description-surface/models/capability-descriptor-schema.ts
|
|
12
|
+
const JsonSchemaDocumentSchema = z.record(z.string(), JsonValueSchema);
|
|
13
|
+
const ToolSchemaSummarySchema = z.object({
|
|
14
|
+
optional: z.array(z.string()),
|
|
15
|
+
propertyCount: z.number().int().nonnegative(),
|
|
16
|
+
required: z.array(z.string()),
|
|
17
|
+
type: z.string().min(1)
|
|
18
|
+
}).strict();
|
|
19
|
+
const ToolSafetySummarySchema = z.object({
|
|
20
|
+
destructiveHint: z.boolean().optional(),
|
|
21
|
+
readOnlyHint: z.boolean().optional()
|
|
22
|
+
}).strict();
|
|
23
|
+
const ToolSchemaHintSchema = z.object({
|
|
24
|
+
message: z.string().max(500),
|
|
25
|
+
next: z.enum(["call_ready", "describe_before_call"])
|
|
26
|
+
}).strict();
|
|
27
|
+
const CapabilitySummarySchema = z.object({
|
|
28
|
+
description: z.string().optional(),
|
|
29
|
+
input: ToolSchemaSummarySchema,
|
|
30
|
+
namespace: NamespaceNameSchema,
|
|
31
|
+
output: ToolSchemaSummarySchema.optional(),
|
|
32
|
+
safety: ToolSafetySummarySchema,
|
|
33
|
+
schemaHint: ToolSchemaHintSchema.optional(),
|
|
34
|
+
title: z.string().min(1).optional(),
|
|
35
|
+
name: CapabilityNameSchema,
|
|
36
|
+
toolRef: z.string().min(1)
|
|
37
|
+
}).strict();
|
|
38
|
+
const ResultExpectationSchema = z.object({
|
|
39
|
+
canReturnArtifacts: z.boolean().default(false),
|
|
40
|
+
canStream: z.boolean().default(false),
|
|
41
|
+
kind: z.enum([
|
|
42
|
+
"json",
|
|
43
|
+
"text",
|
|
44
|
+
"binary_artifact",
|
|
45
|
+
"mixed"
|
|
46
|
+
]),
|
|
47
|
+
outputJsonSchema: JsonSchemaDocumentSchema.optional(),
|
|
48
|
+
truncation: z.enum([
|
|
49
|
+
"none",
|
|
50
|
+
"possible",
|
|
51
|
+
"expected"
|
|
52
|
+
]).default("possible")
|
|
53
|
+
}).strict();
|
|
54
|
+
const SafeCallingHintSchema = z.object({
|
|
55
|
+
code: z.enum([
|
|
56
|
+
"describe_before_call",
|
|
57
|
+
"approval_may_be_required",
|
|
58
|
+
"read_only",
|
|
59
|
+
"write_or_external_effect",
|
|
60
|
+
"large_output_possible",
|
|
61
|
+
"artifact_output_possible"
|
|
62
|
+
]),
|
|
63
|
+
message: z.string().max(500)
|
|
64
|
+
}).strict();
|
|
65
|
+
const CapabilitySearchMatchSchema = CapabilitySummarySchema.extend({
|
|
66
|
+
inputSchema: JsonSchemaDocumentSchema.optional(),
|
|
67
|
+
outputSchema: JsonSchemaDocumentSchema.optional(),
|
|
68
|
+
relationshipHints: z.array(JsonValueSchema).optional(),
|
|
69
|
+
schemaFieldMatches: z.array(JsonValueSchema).optional()
|
|
70
|
+
}).strict();
|
|
71
|
+
const CapabilityDescriptorSchema = z.object({
|
|
72
|
+
annotations: JsonSchemaDocumentSchema.default({}),
|
|
73
|
+
inputSchema: JsonSchemaDocumentSchema.optional(),
|
|
74
|
+
namespace: NamespaceNameSchema,
|
|
75
|
+
outputSchema: JsonSchemaDocumentSchema.optional(),
|
|
76
|
+
related: z.array(JsonValueSchema).default([]),
|
|
77
|
+
schemaHint: ToolSchemaHintSchema.optional(),
|
|
78
|
+
name: CapabilityNameSchema,
|
|
79
|
+
toolRef: z.string().min(1),
|
|
80
|
+
typescriptHelper: z.string().optional(),
|
|
81
|
+
zod: JsonSchemaDocumentSchema.optional()
|
|
82
|
+
}).strict();
|
|
83
|
+
//#endregion
|
|
84
|
+
export { ResultExpectationSchema as a, ToolSchemaHintSchema as c, CapabilityReferenceSchema as d, NamespaceNameSchema as f, JsonSchemaDocumentSchema as i, ToolSchemaSummarySchema as l, CapabilitySearchMatchSchema as n, SafeCallingHintSchema as o, CapabilitySummarySchema as r, ToolSafetySummarySchema as s, CapabilityDescriptorSchema as t, CapabilityNameSchema as u };
|
|
85
|
+
|
|
86
|
+
//# sourceMappingURL=capability-descriptor-schema-wgtHF0Ic.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"capability-descriptor-schema-wgtHF0Ic.js","names":[],"sources":["../src/contract-primitives/models/capability-reference-schema.ts","../src/capability-description-surface/models/capability-descriptor-schema.ts"],"sourcesContent":["import { z } from 'zod';\n\nexport const NamespaceNameSchema = z.string().min(1);\nexport const CapabilityNameSchema = z.string().min(1);\n\nexport const CapabilityReferenceSchema = z\n\t.object({\n\t\tnamespace: NamespaceNameSchema,\n\t\tname: CapabilityNameSchema,\n\t})\n\t.strict();\n\nexport type CapabilityReference = z.infer<typeof CapabilityReferenceSchema>;\n","import { z } from 'zod';\n\nimport {\n\tCapabilityNameSchema,\n\tNamespaceNameSchema,\n} from '../../contract-primitives/models/capability-reference-schema.js';\nimport { JsonValueSchema } from '../../contract-primitives/models/json-value-schema.js';\n\nexport const JsonSchemaDocumentSchema = z.record(z.string(), JsonValueSchema);\n\nexport const ToolSchemaSummarySchema = z\n\t.object({\n\t\toptional: z.array(z.string()),\n\t\tpropertyCount: z.number().int().nonnegative(),\n\t\trequired: z.array(z.string()),\n\t\ttype: z.string().min(1),\n\t})\n\t.strict();\n\nexport type ToolSchemaSummary = z.infer<typeof ToolSchemaSummarySchema>;\n\nexport const ToolSafetySummarySchema = z\n\t.object({\n\t\tdestructiveHint: z.boolean().optional(),\n\t\treadOnlyHint: z.boolean().optional(),\n\t})\n\t.strict();\n\nexport type ToolSafetySummary = z.infer<typeof ToolSafetySummarySchema>;\n\nexport const ToolSchemaHintSchema = z\n\t.object({\n\t\tmessage: z.string().max(500),\n\t\tnext: z.enum(['call_ready', 'describe_before_call']),\n\t})\n\t.strict();\n\nexport type ToolSchemaHint = z.infer<typeof ToolSchemaHintSchema>;\n\nexport const CapabilitySummarySchema = z\n\t.object({\n\t\tdescription: z.string().optional(),\n\t\tinput: ToolSchemaSummarySchema,\n\t\tnamespace: NamespaceNameSchema,\n\t\toutput: ToolSchemaSummarySchema.optional(),\n\t\tsafety: ToolSafetySummarySchema,\n\t\tschemaHint: ToolSchemaHintSchema.optional(),\n\t\ttitle: z.string().min(1).optional(),\n\t\tname: CapabilityNameSchema,\n\t\ttoolRef: z.string().min(1),\n\t})\n\t.strict();\n\nexport type CapabilitySummary = z.infer<typeof CapabilitySummarySchema>;\n\nexport const ResultExpectationSchema = z\n\t.object({\n\t\tcanReturnArtifacts: z.boolean().default(false),\n\t\tcanStream: z.boolean().default(false),\n\t\tkind: z.enum(['json', 'text', 'binary_artifact', 'mixed']),\n\t\toutputJsonSchema: JsonSchemaDocumentSchema.optional(),\n\t\ttruncation: z.enum(['none', 'possible', 'expected']).default('possible'),\n\t})\n\t.strict();\n\nexport type ResultExpectation = z.infer<typeof ResultExpectationSchema>;\n\nexport const SafeCallingHintSchema = z\n\t.object({\n\t\tcode: z.enum([\n\t\t\t'describe_before_call',\n\t\t\t'approval_may_be_required',\n\t\t\t'read_only',\n\t\t\t'write_or_external_effect',\n\t\t\t'large_output_possible',\n\t\t\t'artifact_output_possible',\n\t\t]),\n\t\tmessage: z.string().max(500),\n\t})\n\t.strict();\n\nexport type SafeCallingHint = z.infer<typeof SafeCallingHintSchema>;\n\nexport const CapabilitySearchMatchSchema = CapabilitySummarySchema.extend({\n\tinputSchema: JsonSchemaDocumentSchema.optional(),\n\toutputSchema: JsonSchemaDocumentSchema.optional(),\n\trelationshipHints: z.array(JsonValueSchema).optional(),\n\tschemaFieldMatches: z.array(JsonValueSchema).optional(),\n}).strict();\n\nexport type CapabilitySearchMatch = z.infer<typeof CapabilitySearchMatchSchema>;\n\nexport const CapabilityDescriptorSchema = z\n\t.object({\n\t\tannotations: JsonSchemaDocumentSchema.default({}),\n\t\tinputSchema: JsonSchemaDocumentSchema.optional(),\n\t\tnamespace: NamespaceNameSchema,\n\t\toutputSchema: JsonSchemaDocumentSchema.optional(),\n\t\trelated: z.array(JsonValueSchema).default([]),\n\t\tschemaHint: ToolSchemaHintSchema.optional(),\n\t\tname: CapabilityNameSchema,\n\t\ttoolRef: z.string().min(1),\n\t\ttypescriptHelper: z.string().optional(),\n\t\tzod: JsonSchemaDocumentSchema.optional(),\n\t})\n\t.strict();\n\nexport type CapabilityDescriptor = z.infer<typeof CapabilityDescriptorSchema>;\n"],"mappings":";;;AAEA,MAAa,sBAAsB,EAAE,QAAQ,CAAC,IAAI,EAAE;AACpD,MAAa,uBAAuB,EAAE,QAAQ,CAAC,IAAI,EAAE;AAErD,MAAa,4BAA4B,EACvC,OAAO;CACP,WAAW;CACX,MAAM;CACN,CAAC,CACD,QAAQ;;;ACFV,MAAa,2BAA2B,EAAE,OAAO,EAAE,QAAQ,EAAE,gBAAgB;AAE7E,MAAa,0BAA0B,EACrC,OAAO;CACP,UAAU,EAAE,MAAM,EAAE,QAAQ,CAAC;CAC7B,eAAe,EAAE,QAAQ,CAAC,KAAK,CAAC,aAAa;CAC7C,UAAU,EAAE,MAAM,EAAE,QAAQ,CAAC;CAC7B,MAAM,EAAE,QAAQ,CAAC,IAAI,EAAE;CACvB,CAAC,CACD,QAAQ;AAIV,MAAa,0BAA0B,EACrC,OAAO;CACP,iBAAiB,EAAE,SAAS,CAAC,UAAU;CACvC,cAAc,EAAE,SAAS,CAAC,UAAU;CACpC,CAAC,CACD,QAAQ;AAIV,MAAa,uBAAuB,EAClC,OAAO;CACP,SAAS,EAAE,QAAQ,CAAC,IAAI,IAAI;CAC5B,MAAM,EAAE,KAAK,CAAC,cAAc,uBAAuB,CAAC;CACpD,CAAC,CACD,QAAQ;AAIV,MAAa,0BAA0B,EACrC,OAAO;CACP,aAAa,EAAE,QAAQ,CAAC,UAAU;CAClC,OAAO;CACP,WAAW;CACX,QAAQ,wBAAwB,UAAU;CAC1C,QAAQ;CACR,YAAY,qBAAqB,UAAU;CAC3C,OAAO,EAAE,QAAQ,CAAC,IAAI,EAAE,CAAC,UAAU;CACnC,MAAM;CACN,SAAS,EAAE,QAAQ,CAAC,IAAI,EAAE;CAC1B,CAAC,CACD,QAAQ;AAIV,MAAa,0BAA0B,EACrC,OAAO;CACP,oBAAoB,EAAE,SAAS,CAAC,QAAQ,MAAM;CAC9C,WAAW,EAAE,SAAS,CAAC,QAAQ,MAAM;CACrC,MAAM,EAAE,KAAK;EAAC;EAAQ;EAAQ;EAAmB;EAAQ,CAAC;CAC1D,kBAAkB,yBAAyB,UAAU;CACrD,YAAY,EAAE,KAAK;EAAC;EAAQ;EAAY;EAAW,CAAC,CAAC,QAAQ,WAAW;CACxE,CAAC,CACD,QAAQ;AAIV,MAAa,wBAAwB,EACnC,OAAO;CACP,MAAM,EAAE,KAAK;EACZ;EACA;EACA;EACA;EACA;EACA;EACA,CAAC;CACF,SAAS,EAAE,QAAQ,CAAC,IAAI,IAAI;CAC5B,CAAC,CACD,QAAQ;AAIV,MAAa,8BAA8B,wBAAwB,OAAO;CACzE,aAAa,yBAAyB,UAAU;CAChD,cAAc,yBAAyB,UAAU;CACjD,mBAAmB,EAAE,MAAM,gBAAgB,CAAC,UAAU;CACtD,oBAAoB,EAAE,MAAM,gBAAgB,CAAC,UAAU;CACvD,CAAC,CAAC,QAAQ;AAIX,MAAa,6BAA6B,EACxC,OAAO;CACP,aAAa,yBAAyB,QAAQ,EAAE,CAAC;CACjD,aAAa,yBAAyB,UAAU;CAChD,WAAW;CACX,cAAc,yBAAyB,UAAU;CACjD,SAAS,EAAE,MAAM,gBAAgB,CAAC,QAAQ,EAAE,CAAC;CAC7C,YAAY,qBAAqB,UAAU;CAC3C,MAAM;CACN,SAAS,EAAE,QAAQ,CAAC,IAAI,EAAE;CAC1B,kBAAkB,EAAE,QAAQ,CAAC,UAAU;CACvC,KAAK,yBAAyB,UAAU;CACxC,CAAC,CACD,QAAQ"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
|
|
3
|
+
//#region src/contract-primitives/models/capability-reference-schema.d.ts
|
|
4
|
+
declare const NamespaceNameSchema: z.ZodString;
|
|
5
|
+
declare const CapabilityNameSchema: z.ZodString;
|
|
6
|
+
declare const CapabilityReferenceSchema: z.ZodObject<{
|
|
7
|
+
namespace: z.ZodString;
|
|
8
|
+
name: z.ZodString;
|
|
9
|
+
}, z.core.$strict>;
|
|
10
|
+
type CapabilityReference = z.infer<typeof CapabilityReferenceSchema>;
|
|
11
|
+
//#endregion
|
|
12
|
+
//#region src/contract-primitives/models/request-id-schema.d.ts
|
|
13
|
+
declare const RequestIdSchema: z.ZodString;
|
|
14
|
+
declare const ItemIdSchema: z.ZodString;
|
|
15
|
+
//#endregion
|
|
16
|
+
export { CapabilityReferenceSchema as a, CapabilityReference as i, RequestIdSchema as n, NamespaceNameSchema as o, CapabilityNameSchema as r, ItemIdSchema as t };
|
|
17
|
+
//# sourceMappingURL=index-DJiaGYF_.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-DJiaGYF_.d.ts","names":[],"sources":["../src/contract-primitives/models/capability-reference-schema.ts","../src/contract-primitives/models/request-id-schema.ts"],"mappings":";;;cAEa,mBAAA,EAAmB,CAAA,CAAA,SAAA;AAAA,cACnB,oBAAA,EAAoB,CAAA,CAAA,SAAA;AAAA,cAEpB,yBAAA,EAAyB,CAAA,CAAA,SAAA;;;;KAO1B,mBAAA,GAAsB,CAAA,CAAE,KAAA,QAAa,yBAAA;;;cCRpC,eAAA,EAAe,CAAA,CAAA,SAAA;AAAA,cAOf,YAAA,EAAY,CAAA,CAAA,SAAA"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { PortalAdapterEnvelope, PortalAdapterEnvelopeSchema, TrustedAgentScope, TrustedAgentScopeSchema } from "./adapter-boundary/index.js";
|
|
2
|
+
import { ApprovalDecisionReference, ApprovalDecisionReferenceSchema, ApprovalRequiredResult, ApprovalRequiredResultSchema } from "./approval-surface/index.js";
|
|
3
|
+
import { a as JsonObjectMaxEntries, c as JsonStringMaxLength, i as JsonObjectKeyMaxLength, l as JsonValue, n as JsonArrayMaxItems, o as JsonObjectSchema, r as JsonObject, s as JsonPrimitive, t as JsonArray, u as JsonValueSchema } from "./json-value-schema-Bj42URkc.js";
|
|
4
|
+
import { ArtifactReference, ArtifactReferenceSchema, PortalArtifactReadRequest, PortalArtifactReadRequestSchema, PortalArtifactReadResult, PortalArtifactReadResultSchema, PortalArtifactRecord, PortalArtifactRecordSchema, PortalArtifactRedactor, PortalArtifactRedactorSchema } from "./artifact-surface/index.js";
|
|
5
|
+
import { CapabilityDescriptor, CapabilityDescriptorSchema, CapabilitySearchMatch, CapabilitySearchMatchSchema, CapabilitySummary, CapabilitySummarySchema, JsonSchemaDocumentSchema, ResultExpectation, ResultExpectationSchema, SafeCallingHint, SafeCallingHintSchema, ToolSafetySummary, ToolSafetySummarySchema, ToolSchemaHint, ToolSchemaHintSchema, ToolSchemaSummary, ToolSchemaSummarySchema } from "./capability-description-surface/index.js";
|
|
6
|
+
import { a as CapabilityReferenceSchema, i as CapabilityReference, n as RequestIdSchema, o as NamespaceNameSchema, r as CapabilityNameSchema, t as ItemIdSchema } from "./index-DJiaGYF_.js";
|
|
7
|
+
import { _ as TruncationMetadataSchema, a as PortalDescribeItemValueSchema, b as PortalCallRequest, c as PortalGenericItemResultSchema, d as PortalListResult, f as PortalListResultSchema, g as PortalSearchResultSchema, h as PortalSearchResult, i as PortalDescribeItemResultSchema, l as PortalListItemResultSchema, m as PortalSearchItemValueSchema, n as PortalCallResult, o as PortalDescribeResult, p as PortalSearchItemResultSchema, r as PortalCallResultSchema, s as PortalDescribeResultSchema, t as PortalCallItemResultSchema, u as PortalListItemValueSchema, v as PortalBatchMaxItems, x as PortalCallRequestSchema, y as PortalCallItemRequestSchema } from "./portal-call-result-schema-DjpKPcE_.js";
|
|
8
|
+
import { PortalCallSurfaceJsonSchemas, PortalDescribeItemRequestSchema, PortalDescribeRequest, PortalDescribeRequestSchema, PortalError, PortalErrorCode, PortalErrorCodeSchema, PortalErrorSchema, PortalListItemRequestSchema, PortalListRequest, PortalListRequestSchema, PortalSearchItemRequestSchema, PortalSearchRequest, PortalSearchRequestSchema, createPortalCallSurfaceJsonSchemas } from "./portal-call-surface/index.js";
|
|
9
|
+
import { PortalCancellationRequestEvent, PortalCancellationRequestEventSchema, PortalCancellationResultEvent, PortalCancellationResultEventSchema, PortalDiagnosticEvent, PortalDiagnosticEventSchema, PortalEvent, PortalEventSchema, PortalPartialOutputEvent, PortalPartialOutputEventSchema, PortalProgressEvent, PortalProgressEventSchema, SafeDiagnostic, SafeDiagnosticCodeSchema, SafeDiagnosticSchema } from "./portal-event-surface/index.js";
|
|
10
|
+
export { ApprovalDecisionReference, ApprovalDecisionReferenceSchema, ApprovalRequiredResult, ApprovalRequiredResultSchema, ArtifactReference, ArtifactReferenceSchema, CapabilityDescriptor, CapabilityDescriptorSchema, CapabilityNameSchema, CapabilityReference, CapabilityReferenceSchema, CapabilitySearchMatch, CapabilitySearchMatchSchema, CapabilitySummary, CapabilitySummarySchema, ItemIdSchema, JsonArray, JsonArrayMaxItems, JsonObject, JsonObjectKeyMaxLength, JsonObjectMaxEntries, JsonObjectSchema, JsonPrimitive, JsonSchemaDocumentSchema, JsonStringMaxLength, JsonValue, JsonValueSchema, NamespaceNameSchema, PortalAdapterEnvelope, PortalAdapterEnvelopeSchema, PortalArtifactReadRequest, PortalArtifactReadRequestSchema, PortalArtifactReadResult, PortalArtifactReadResultSchema, PortalArtifactRecord, PortalArtifactRecordSchema, PortalArtifactRedactor, PortalArtifactRedactorSchema, PortalBatchMaxItems, PortalCallItemRequestSchema, PortalCallItemResultSchema, PortalCallRequest, PortalCallRequestSchema, PortalCallResult, PortalCallResultSchema, PortalCallSurfaceJsonSchemas, PortalCancellationRequestEvent, PortalCancellationRequestEventSchema, PortalCancellationResultEvent, PortalCancellationResultEventSchema, PortalDescribeItemRequestSchema, PortalDescribeItemResultSchema, PortalDescribeItemValueSchema, PortalDescribeRequest, PortalDescribeRequestSchema, PortalDescribeResult, PortalDescribeResultSchema, PortalDiagnosticEvent, PortalDiagnosticEventSchema, PortalError, PortalErrorCode, PortalErrorCodeSchema, PortalErrorSchema, PortalEvent, PortalEventSchema, PortalGenericItemResultSchema, PortalListItemRequestSchema, PortalListItemResultSchema, PortalListItemValueSchema, PortalListRequest, PortalListRequestSchema, PortalListResult, PortalListResultSchema, PortalPartialOutputEvent, PortalPartialOutputEventSchema, PortalProgressEvent, PortalProgressEventSchema, PortalSearchItemRequestSchema, PortalSearchItemResultSchema, PortalSearchItemValueSchema, PortalSearchRequest, PortalSearchRequestSchema, PortalSearchResult, PortalSearchResultSchema, RequestIdSchema, ResultExpectation, ResultExpectationSchema, SafeCallingHint, SafeCallingHintSchema, SafeDiagnostic, SafeDiagnosticCodeSchema, SafeDiagnosticSchema, ToolSafetySummary, ToolSafetySummarySchema, ToolSchemaHint, ToolSchemaHintSchema, ToolSchemaSummary, ToolSchemaSummarySchema, TruncationMetadataSchema, TrustedAgentScope, TrustedAgentScopeSchema, createPortalCallSurfaceJsonSchemas };
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { PortalAdapterEnvelopeSchema, TrustedAgentScopeSchema } from "./adapter-boundary/index.js";
|
|
2
|
+
import { a as ItemIdSchema, i as SafeDiagnosticSchema, n as PortalErrorSchema, o as RequestIdSchema, r as SafeDiagnosticCodeSchema, t as PortalErrorCodeSchema } from "./portal-error-schema-D58onG2t.js";
|
|
3
|
+
import { ApprovalDecisionReferenceSchema, ApprovalRequiredResultSchema } from "./approval-surface/index.js";
|
|
4
|
+
import { t as ArtifactReferenceSchema } from "./artifact-reference-schema-XiJ280uV.js";
|
|
5
|
+
import { a as JsonStringMaxLength, i as JsonObjectSchema, n as JsonObjectKeyMaxLength, o as JsonValueSchema, r as JsonObjectMaxEntries, t as JsonArrayMaxItems } from "./json-value-schema-D-3hfAyL.js";
|
|
6
|
+
import { PortalArtifactReadRequestSchema, PortalArtifactReadResultSchema, PortalArtifactRecordSchema, PortalArtifactRedactorSchema } from "./artifact-surface/index.js";
|
|
7
|
+
import { a as ResultExpectationSchema, c as ToolSchemaHintSchema, d as CapabilityReferenceSchema, f as NamespaceNameSchema, i as JsonSchemaDocumentSchema, l as ToolSchemaSummarySchema, n as CapabilitySearchMatchSchema, o as SafeCallingHintSchema, r as CapabilitySummarySchema, s as ToolSafetySummarySchema, t as CapabilityDescriptorSchema, u as CapabilityNameSchema } from "./capability-descriptor-schema-wgtHF0Ic.js";
|
|
8
|
+
import "./capability-description-surface/index.js";
|
|
9
|
+
import { a as PortalDescribeResultSchema, c as PortalListItemValueSchema, d as PortalSearchItemValueSchema, f as PortalSearchResultSchema, g as PortalCallRequestSchema, h as PortalCallItemRequestSchema, i as PortalDescribeItemValueSchema, l as PortalListResultSchema, m as PortalBatchMaxItems, n as PortalCallResultSchema, o as PortalGenericItemResultSchema, p as TruncationMetadataSchema, r as PortalDescribeItemResultSchema, s as PortalListItemResultSchema, t as PortalCallItemResultSchema, u as PortalSearchItemResultSchema } from "./portal-call-result-schema-BIqFTFK8.js";
|
|
10
|
+
import { PortalDescribeItemRequestSchema, PortalDescribeRequestSchema, PortalListItemRequestSchema, PortalListRequestSchema, PortalSearchItemRequestSchema, PortalSearchRequestSchema, createPortalCallSurfaceJsonSchemas } from "./portal-call-surface/index.js";
|
|
11
|
+
import { PortalCancellationRequestEventSchema, PortalCancellationResultEventSchema, PortalDiagnosticEventSchema, PortalEventSchema, PortalPartialOutputEventSchema, PortalProgressEventSchema } from "./portal-event-surface/index.js";
|
|
12
|
+
export { ApprovalDecisionReferenceSchema, ApprovalRequiredResultSchema, ArtifactReferenceSchema, CapabilityDescriptorSchema, CapabilityNameSchema, CapabilityReferenceSchema, CapabilitySearchMatchSchema, CapabilitySummarySchema, ItemIdSchema, JsonArrayMaxItems, JsonObjectKeyMaxLength, JsonObjectMaxEntries, JsonObjectSchema, JsonSchemaDocumentSchema, JsonStringMaxLength, JsonValueSchema, NamespaceNameSchema, PortalAdapterEnvelopeSchema, PortalArtifactReadRequestSchema, PortalArtifactReadResultSchema, PortalArtifactRecordSchema, PortalArtifactRedactorSchema, PortalBatchMaxItems, PortalCallItemRequestSchema, PortalCallItemResultSchema, PortalCallRequestSchema, PortalCallResultSchema, PortalCancellationRequestEventSchema, PortalCancellationResultEventSchema, PortalDescribeItemRequestSchema, PortalDescribeItemResultSchema, PortalDescribeItemValueSchema, PortalDescribeRequestSchema, PortalDescribeResultSchema, PortalDiagnosticEventSchema, PortalErrorCodeSchema, PortalErrorSchema, PortalEventSchema, PortalGenericItemResultSchema, PortalListItemRequestSchema, PortalListItemResultSchema, PortalListItemValueSchema, PortalListRequestSchema, PortalListResultSchema, PortalPartialOutputEventSchema, PortalProgressEventSchema, PortalSearchItemRequestSchema, PortalSearchItemResultSchema, PortalSearchItemValueSchema, PortalSearchRequestSchema, PortalSearchResultSchema, RequestIdSchema, ResultExpectationSchema, SafeCallingHintSchema, SafeDiagnosticCodeSchema, SafeDiagnosticSchema, ToolSafetySummarySchema, ToolSchemaHintSchema, ToolSchemaSummarySchema, TruncationMetadataSchema, TrustedAgentScopeSchema, createPortalCallSurfaceJsonSchemas };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
|
|
3
|
+
//#region src/contract-primitives/models/json-value-schema.d.ts
|
|
4
|
+
type JsonPrimitive = boolean | null | number | string;
|
|
5
|
+
type JsonArray = JsonValue[];
|
|
6
|
+
type JsonObject = {
|
|
7
|
+
[key: string]: JsonValue;
|
|
8
|
+
};
|
|
9
|
+
type JsonValue = JsonArray | JsonObject | JsonPrimitive;
|
|
10
|
+
declare const JsonStringMaxLength: number;
|
|
11
|
+
declare const JsonArrayMaxItems = 1000;
|
|
12
|
+
declare const JsonObjectMaxEntries = 1000;
|
|
13
|
+
declare const JsonObjectKeyMaxLength = 256;
|
|
14
|
+
declare const JsonValueSchema: z.ZodType<JsonValue>;
|
|
15
|
+
declare const JsonObjectSchema: z.ZodType<JsonObject>;
|
|
16
|
+
//#endregion
|
|
17
|
+
export { JsonObjectMaxEntries as a, JsonStringMaxLength as c, JsonObjectKeyMaxLength as i, JsonValue as l, JsonArrayMaxItems as n, JsonObjectSchema as o, JsonObject as r, JsonPrimitive as s, JsonArray as t, JsonValueSchema as u };
|
|
18
|
+
//# sourceMappingURL=json-value-schema-Bj42URkc.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"json-value-schema-Bj42URkc.d.ts","names":[],"sources":["../src/contract-primitives/models/json-value-schema.ts"],"mappings":";;;KAEY,aAAA;AAAA,KACA,SAAA,GAAY,SAAA;AAAA,KACZ,UAAA;EAAA,CAAgB,GAAA,WAAc,SAAA;AAAA;AAAA,KAC9B,SAAA,GAAY,SAAA,GAAY,UAAA,GAAa,aAAA;AAAA,cAEpC,mBAAA;AAAA,cACA,iBAAA;AAAA,cACA,oBAAA;AAAA,cACA,sBAAA;AAAA,cAEA,eAAA,EAAiB,CAAA,CAAE,OAAA,CAAQ,SAAA;AAAA,cAW3B,gBAAA,EAAkB,CAAA,CAAE,OAAA,CAAQ,UAAA"}
|