@agent-vm/agent-portal-sdk 0.0.145 → 0.0.148
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/approval-surface/index.js +1 -1
- package/dist/{approval-surface-Cqk_hAtN.js → approval-surface-phfnKUSF.js} +2 -2
- package/dist/{approval-surface-Cqk_hAtN.js.map → approval-surface-phfnKUSF.js.map} +1 -1
- package/dist/capability-description-surface/index.d.ts +2 -2
- package/dist/capability-description-surface/index.js +3 -3
- package/dist/capability-description-surface-YqGm-nS_.js +2 -0
- package/dist/{capability-descriptor-schema-v9tj7yKr.js → capability-descriptor-schema-B_0vLQ3E.js} +38 -2
- package/dist/capability-descriptor-schema-B_0vLQ3E.js.map +1 -0
- package/dist/cli/tool-portal.js +3 -3
- package/dist/gateway-runtime-client/index.d.ts +1 -1
- package/dist/gateway-runtime-client/index.js +3 -3
- package/dist/{index-S5RZg56U.d.ts → index-C2axvEYg.d.ts} +2 -2
- package/dist/{index-S5RZg56U.d.ts.map → index-C2axvEYg.d.ts.map} +1 -1
- package/dist/index-uDfElZ9U.d.ts +304 -0
- package/dist/index-uDfElZ9U.d.ts.map +1 -0
- package/dist/index.d.ts +3 -3
- package/dist/index.js +7 -7
- package/dist/portable-contracts/index.js +1 -1
- package/dist/{portable-contracts-BJEMMNwI.js → portable-contracts-CWLiYrVU.js} +4 -4
- package/dist/{portable-contracts-BJEMMNwI.js.map → portable-contracts-CWLiYrVU.js.map} +1 -1
- package/dist/{portal-call-result-schema-B25_rzZZ.js → portal-call-result-schema-DM77S9CA.js} +2 -2
- package/dist/{portal-call-result-schema-B25_rzZZ.js.map → portal-call-result-schema-DM77S9CA.js.map} +1 -1
- package/dist/{portal-call-result-schema-DIg2ERl4.d.ts → portal-call-result-schema-Mv2Dv1HJ.d.ts} +673 -1
- package/dist/portal-call-result-schema-Mv2Dv1HJ.d.ts.map +1 -0
- package/dist/portal-call-surface/index.d.ts +1 -1
- package/dist/portal-call-surface/index.js +2 -2
- package/dist/{portal-call-surface-qykVz_8k.js → portal-call-surface-B952nh-H.js} +2 -2
- package/dist/{portal-call-surface-qykVz_8k.js.map → portal-call-surface-B952nh-H.js.map} +1 -1
- package/dist/testing/index.d.ts +1 -1
- package/dist/testing/index.js +1 -1
- package/dist/tool-portal-mcp-client/index.d.ts +1 -1
- package/dist/tool-portal-mcp-client/index.js +1 -1
- package/dist/tool-portal-mcp-client/node-tool-portal-mcp-transport.d.ts +1 -1
- package/dist/{tool-portal-mcp-client-DZoloMod.js → tool-portal-mcp-client-DsDi2iJc.js} +3 -3
- package/dist/{tool-portal-mcp-client-DZoloMod.js.map → tool-portal-mcp-client-DsDi2iJc.js.map} +1 -1
- package/package.json +3 -2
- package/portable-contract-schema-manifest.json +541 -0
- package/dist/capability-description-surface-CplIb93y.js +0 -2
- package/dist/capability-descriptor-schema-v9tj7yKr.js.map +0 -1
- package/dist/index-m4Mlc5zK.d.ts +0 -142
- package/dist/index-m4Mlc5zK.d.ts.map +0 -1
- package/dist/portal-call-result-schema-DIg2ERl4.d.ts.map +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as sanitizeGatewayApprovalArguments, c as ApprovalRequiredResultSchema, i as GatewayApprovalPresentationRequestSchema, n as GatewayApprovalDecisionRequestSchema, o as ApprovalChallengeReferenceSchema, r as GatewayApprovalDecisionResultSchema, s as ApprovalDecisionReferenceSchema, t as ApprovalPresentationOutcomeSchema } from "../approval-surface-
|
|
1
|
+
import { a as sanitizeGatewayApprovalArguments, c as ApprovalRequiredResultSchema, i as GatewayApprovalPresentationRequestSchema, n as GatewayApprovalDecisionRequestSchema, o as ApprovalChallengeReferenceSchema, r as GatewayApprovalDecisionResultSchema, s as ApprovalDecisionReferenceSchema, t as ApprovalPresentationOutcomeSchema } from "../approval-surface-phfnKUSF.js";
|
|
2
2
|
export { ApprovalChallengeReferenceSchema, ApprovalDecisionReferenceSchema, ApprovalPresentationOutcomeSchema, ApprovalRequiredResultSchema, GatewayApprovalDecisionRequestSchema, GatewayApprovalDecisionResultSchema, GatewayApprovalPresentationRequestSchema, sanitizeGatewayApprovalArguments };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { n as withPortableSuperRefinement } from "./portable-refinement-authoring-C1Q92x2G.js";
|
|
2
2
|
import { t as ItemIdSchema } from "./request-id-schema-Hq_6lSFV.js";
|
|
3
|
-
import { n as PortalApprovalRequiredCallItemResultSchema, t as PortalApprovalChallengeSchema } from "./portal-call-result-schema-
|
|
3
|
+
import { n as PortalApprovalRequiredCallItemResultSchema, t as PortalApprovalChallengeSchema } from "./portal-call-result-schema-DM77S9CA.js";
|
|
4
4
|
import { z } from "zod";
|
|
5
5
|
//#region src/approval-surface/models/approval-decision-reference-schema.ts
|
|
6
6
|
const ApprovalDecisionReferenceSchema = z.object({
|
|
@@ -129,4 +129,4 @@ function sanitizeGatewayApprovalArguments(argumentsValue) {
|
|
|
129
129
|
//#endregion
|
|
130
130
|
export { sanitizeGatewayApprovalArguments as a, ApprovalRequiredResultSchema as c, GatewayApprovalPresentationRequestSchema as i, GatewayApprovalDecisionRequestSchema as n, ApprovalChallengeReferenceSchema as o, GatewayApprovalDecisionResultSchema as r, ApprovalDecisionReferenceSchema as s, ApprovalPresentationOutcomeSchema as t };
|
|
131
131
|
|
|
132
|
-
//# sourceMappingURL=approval-surface-
|
|
132
|
+
//# sourceMappingURL=approval-surface-phfnKUSF.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"approval-surface-Cqk_hAtN.js","names":[],"sources":["../src/approval-surface/models/approval-decision-reference-schema.ts","../src/approval-surface/models/gateway-approval-presentation-schema.ts"],"sourcesContent":["import { z } from 'zod';\n\nimport { ItemIdSchema } from '../../contract-primitives/models/request-id-schema.js';\nimport {\n\tPortalApprovalChallengeSchema,\n\tPortalApprovalRequiredCallItemResultSchema,\n} from '../../portal-call-surface/models/portal-call-result-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 = PortalApprovalRequiredCallItemResultSchema;\n\nexport const ApprovalChallengeReferenceSchema = PortalApprovalChallengeSchema;\n\nexport type ApprovalRequiredResult = z.infer<typeof ApprovalRequiredResultSchema>;\nexport type ApprovalChallengeReference = z.infer<typeof ApprovalChallengeReferenceSchema>;\n","import { z } from 'zod';\n\nimport { ItemIdSchema } from '../../contract-primitives/models/request-id-schema.js';\nimport { withPortableSuperRefinement } from '../../portable-contracts/portable-refinement-authoring.js';\n\nconst MAXIMUM_APPROVAL_DISPLAY_DEPTH = 6;\nconst MAXIMUM_APPROVAL_DISPLAY_ENTRIES = 32;\nconst MAXIMUM_APPROVAL_DISPLAY_STRING_SCALARS = 256;\nconst MAXIMUM_APPROVAL_DISPLAY_BYTES = 4_096;\nconst APPROVAL_REDACTED_VALUE = '[REDACTED]';\nconst APPROVAL_TRUNCATED_VALUE = '[TRUNCATED]';\nconst APPROVAL_TRUNCATION_FIELD = '$truncated';\n\nconst credentialKeyPattern =\n\t/(?:token|password|secret|authorization|cookie|api[ _-]?key|private[ _-]?key)/iu;\nconst credentialValuePattern =\n\t/(?:-----BEGIN [A-Z ]*PRIVATE KEY-----|\\b(?:bearer|basic)\\s+\\S+|\\b(?:api[ _-]?key|token|password|secret|authorization|cookie)\\s*[:=]\\s*\\S+)/iu;\n\nexport const GatewayApprovalPresentationRequestSchema = withPortableSuperRefinement({\n\trefinement: (request, context) => {\n\t\tif (\n\t\t\tnew TextEncoder().encode(request.display.argumentsPreview).byteLength >\n\t\t\tMAXIMUM_APPROVAL_DISPLAY_BYTES\n\t\t) {\n\t\t\tcontext.addIssue({\n\t\t\t\tcode: 'custom',\n\t\t\t\tmessage: 'Approval argument preview exceeds the portable UTF-8 byte bound.',\n\t\t\t\tpath: ['display', 'argumentsPreview'],\n\t\t\t});\n\t\t}\n\t},\n\trefinementIdentity: 'gateway.approval.arguments-preview.utf8-bytes',\n\tschema: z\n\t\t.object({\n\t\t\tallowedDecisions: z.tuple([z.literal('approve'), z.literal('deny')]),\n\t\t\tchallengeId: z.string().uuid(),\n\t\t\tdisplay: z\n\t\t\t\t.object({\n\t\t\t\t\targumentsPreview: z.string().max(MAXIMUM_APPROVAL_DISPLAY_BYTES),\n\t\t\t\t})\n\t\t\t\t.strict(),\n\t\t\texpiresAt: z.string().datetime(),\n\t\t\titemId: ItemIdSchema,\n\t\t\tname: z.string().min(1).max(256),\n\t\t\tnamespace: z.string().min(1).max(256),\n\t\t})\n\t\t.strict(),\n});\n\nexport const ApprovalPresentationOutcomeSchema = z.discriminatedUnion('kind', [\n\tz.object({ kind: z.literal('approved') }).strict(),\n\tz.object({ kind: z.literal('denied') }).strict(),\n\tz\n\t\t.object({\n\t\t\tkind: z.literal('cancelled'),\n\t\t\treason: z.enum(['challenge-expired', 'session-ended', 'user-cancelled']),\n\t\t})\n\t\t.strict(),\n\tz\n\t\t.object({\n\t\t\tkind: z.literal('unavailable'),\n\t\t\treason: z.enum(['presenter-missing', 'presentation-failed']),\n\t\t})\n\t\t.strict(),\n]);\n\nexport const GatewayApprovalDecisionRequestSchema = z\n\t.object({\n\t\tchallengeId: z.string().uuid(),\n\t\tdecision: z.enum(['approve', 'deny']),\n\t})\n\t.strict();\n\nexport const GatewayApprovalDecisionResultSchema = z.discriminatedUnion('kind', [\n\tz\n\t\t.object({\n\t\t\tkind: z.literal('recorded'),\n\t\t\tstate: z.enum(['approved', 'denied']),\n\t\t})\n\t\t.strict(),\n\tz\n\t\t.object({\n\t\t\tkind: z.literal('rejected'),\n\t\t\treason: z.enum([\n\t\t\t\t'not-found',\n\t\t\t\t'expired',\n\t\t\t\t'stale-authority',\n\t\t\t\t'principal-mismatch',\n\t\t\t\t'already-decided',\n\t\t\t\t'presenter-not-authorized',\n\t\t\t]),\n\t\t})\n\t\t.strict(),\n]);\n\nexport type GatewayApprovalPresentationRequest = z.infer<\n\ttypeof GatewayApprovalPresentationRequestSchema\n>;\nexport type ApprovalPresentationOutcome = z.infer<typeof ApprovalPresentationOutcomeSchema>;\nexport type GatewayApprovalDecisionRequest = z.infer<typeof GatewayApprovalDecisionRequestSchema>;\nexport type GatewayApprovalDecisionResult = z.infer<typeof GatewayApprovalDecisionResultSchema>;\n\ninterface ApprovalTruncationMarker {\n\treadonly omittedCount: number;\n\treadonly value: typeof APPROVAL_TRUNCATED_VALUE;\n}\n\ntype SanitizedApprovalValue =\n\t| ApprovalTruncationMarker\n\t| boolean\n\t| null\n\t| number\n\t| string\n\t| readonly SanitizedApprovalValue[]\n\t| { readonly [key: string]: SanitizedApprovalValue };\n\nfunction truncateUnicodeScalars(value: string): string | ApprovalTruncationMarker {\n\tconst scalars = Array.from(value);\n\tif (scalars.length <= MAXIMUM_APPROVAL_DISPLAY_STRING_SCALARS) return value;\n\treturn {\n\t\tomittedCount: scalars.length - MAXIMUM_APPROVAL_DISPLAY_STRING_SCALARS,\n\t\tvalue: APPROVAL_TRUNCATED_VALUE,\n\t};\n}\n\nfunction sanitizeApprovalValue(value: unknown, depth: number): SanitizedApprovalValue {\n\tif (depth >= MAXIMUM_APPROVAL_DISPLAY_DEPTH) {\n\t\treturn { omittedCount: 1, value: APPROVAL_TRUNCATED_VALUE };\n\t}\n\tif (value === null || typeof value === 'boolean') return value;\n\tif (typeof value === 'number') return Number.isFinite(value) ? value : String(value);\n\tif (typeof value === 'string') {\n\t\tif (credentialValuePattern.test(value)) return APPROVAL_REDACTED_VALUE;\n\t\treturn truncateUnicodeScalars(value);\n\t}\n\tif (Array.isArray(value)) {\n\t\tconst included = value\n\t\t\t.slice(0, MAXIMUM_APPROVAL_DISPLAY_ENTRIES)\n\t\t\t.map((item) => sanitizeApprovalValue(item, depth + 1));\n\t\tif (value.length > MAXIMUM_APPROVAL_DISPLAY_ENTRIES) {\n\t\t\tincluded[MAXIMUM_APPROVAL_DISPLAY_ENTRIES - 1] = {\n\t\t\t\tomittedCount: value.length - (MAXIMUM_APPROVAL_DISPLAY_ENTRIES - 1),\n\t\t\t\tvalue: APPROVAL_TRUNCATED_VALUE,\n\t\t\t};\n\t\t}\n\t\treturn included;\n\t}\n\tif (typeof value !== 'object') return '[UNSUPPORTED]';\n\n\tconst sortedEntries = Object.entries(value).toSorted(([leftKey], [rightKey]) =>\n\t\tleftKey.localeCompare(rightKey),\n\t);\n\tconst requiresTruncation = sortedEntries.length > MAXIMUM_APPROVAL_DISPLAY_ENTRIES;\n\tconst includedEntryCount = requiresTruncation\n\t\t? MAXIMUM_APPROVAL_DISPLAY_ENTRIES - 1\n\t\t: MAXIMUM_APPROVAL_DISPLAY_ENTRIES;\n\tconst sanitizedEntries = sortedEntries\n\t\t.slice(0, includedEntryCount)\n\t\t.map(\n\t\t\t([key, childValue]) =>\n\t\t\t\t[\n\t\t\t\t\tkey,\n\t\t\t\t\tcredentialKeyPattern.test(key)\n\t\t\t\t\t\t? APPROVAL_REDACTED_VALUE\n\t\t\t\t\t\t: sanitizeApprovalValue(childValue, depth + 1),\n\t\t\t\t] as const,\n\t\t);\n\tif (requiresTruncation) {\n\t\tsanitizedEntries.push([\n\t\t\tAPPROVAL_TRUNCATION_FIELD,\n\t\t\t{\n\t\t\t\tomittedCount: sortedEntries.length - includedEntryCount,\n\t\t\t\tvalue: APPROVAL_TRUNCATED_VALUE,\n\t\t\t},\n\t\t]);\n\t}\n\treturn Object.fromEntries(sanitizedEntries);\n}\n\nexport function sanitizeGatewayApprovalArguments(argumentsValue: unknown): string {\n\tconst preview = JSON.stringify(sanitizeApprovalValue(argumentsValue, 0));\n\tconst byteLength = new TextEncoder().encode(preview).byteLength;\n\tif (byteLength <= MAXIMUM_APPROVAL_DISPLAY_BYTES) return preview;\n\treturn JSON.stringify({\n\t\tomittedCount: byteLength - MAXIMUM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M,GAAG,QAAQ,OAAO,MAAM;CACpF,IAAI,OAAO,UAAU,UAAU;EAC9B,IAAI,uBAAuB,KAAK,MAAM,EAAE,OAAO;EAC/C,OAAO,uBAAuB,MAAM;;CAErC,IAAI,MAAM,QAAQ,MAAM,EAAE;EACzB,MAAM,WAAW,MACf,MAAM,GAAG,iCAAiC,CAC1C,KAAK,SAAS,sBAAsB,MAAM,QAAQ,EAAE,CAAC;EACvD,IAAI,MAAM,SAAS,kCAClB,SAAS,mCAAmC,KAAK;GAChD,cAAc,MAAM,UAAU,mCAAmC;GACjE,OAAO;GACP;EAEF,OAAO;;CAER,IAAI,OAAO,UAAU,UAAU,OAAO;CAEtC,MAAM,gBAAgB,OAAO,QAAQ,MAAM,CAAC,UAAU,CAAC,UAAU,CAAC,cACjE,QAAQ,cAAc,SAAS,CAC/B;CACD,MAAM,qBAAqB,cAAc,SAAS;CAClD,MAAM,qBAAqB,qBACxB,mCAAmC,IACnC;CACH,MAAM,mBAAmB,cACvB,MAAM,GAAG,mBAAmB,CAC5B,KACC,CAAC,KAAK,gBACN,CACC,KACA,qBAAqB,KAAK,IAAI,GAC3B,0BACA,sBAAsB,YAAY,QAAQ,EAAE,CAC/C,CACF;CACF,IAAI,oBACH,iBAAiB,KAAK,CACrB,2BACA;EACC,cAAc,cAAc,SAAS;EACrC,OAAO;EACP,CACD,CAAC;CAEH,OAAO,OAAO,YAAY,iBAAiB;;AAG5C,SAAgB,iCAAiC,gBAAiC;CACjF,MAAM,UAAU,KAAK,UAAU,sBAAsB,gBAAgB,EAAE,CAAC;CACxE,MAAM,aAAa,IAAI,aAAa,CAAC,OAAO,QAAQ,CAAC;CACrD,IAAI,cAAc,gCAAgC,OAAO;CACzD,OAAO,KAAK,UAAU;EACrB,cAAc,aAAa;EAC3B,OAAO;EACP,CAAC"}
|
|
1
|
+
{"version":3,"file":"approval-surface-phfnKUSF.js","names":[],"sources":["../src/approval-surface/models/approval-decision-reference-schema.ts","../src/approval-surface/models/gateway-approval-presentation-schema.ts"],"sourcesContent":["import { z } from 'zod';\n\nimport { ItemIdSchema } from '../../contract-primitives/models/request-id-schema.js';\nimport {\n\tPortalApprovalChallengeSchema,\n\tPortalApprovalRequiredCallItemResultSchema,\n} from '../../portal-call-surface/models/portal-call-result-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 = PortalApprovalRequiredCallItemResultSchema;\n\nexport const ApprovalChallengeReferenceSchema = PortalApprovalChallengeSchema;\n\nexport type ApprovalRequiredResult = z.infer<typeof ApprovalRequiredResultSchema>;\nexport type ApprovalChallengeReference = z.infer<typeof ApprovalChallengeReferenceSchema>;\n","import { z } from 'zod';\n\nimport { ItemIdSchema } from '../../contract-primitives/models/request-id-schema.js';\nimport { withPortableSuperRefinement } from '../../portable-contracts/portable-refinement-authoring.js';\n\nconst MAXIMUM_APPROVAL_DISPLAY_DEPTH = 6;\nconst MAXIMUM_APPROVAL_DISPLAY_ENTRIES = 32;\nconst MAXIMUM_APPROVAL_DISPLAY_STRING_SCALARS = 256;\nconst MAXIMUM_APPROVAL_DISPLAY_BYTES = 4_096;\nconst APPROVAL_REDACTED_VALUE = '[REDACTED]';\nconst APPROVAL_TRUNCATED_VALUE = '[TRUNCATED]';\nconst APPROVAL_TRUNCATION_FIELD = '$truncated';\n\nconst credentialKeyPattern =\n\t/(?:token|password|secret|authorization|cookie|api[ _-]?key|private[ _-]?key)/iu;\nconst credentialValuePattern =\n\t/(?:-----BEGIN [A-Z ]*PRIVATE KEY-----|\\b(?:bearer|basic)\\s+\\S+|\\b(?:api[ _-]?key|token|password|secret|authorization|cookie)\\s*[:=]\\s*\\S+)/iu;\n\nexport const GatewayApprovalPresentationRequestSchema = withPortableSuperRefinement({\n\trefinement: (request, context) => {\n\t\tif (\n\t\t\tnew TextEncoder().encode(request.display.argumentsPreview).byteLength >\n\t\t\tMAXIMUM_APPROVAL_DISPLAY_BYTES\n\t\t) {\n\t\t\tcontext.addIssue({\n\t\t\t\tcode: 'custom',\n\t\t\t\tmessage: 'Approval argument preview exceeds the portable UTF-8 byte bound.',\n\t\t\t\tpath: ['display', 'argumentsPreview'],\n\t\t\t});\n\t\t}\n\t},\n\trefinementIdentity: 'gateway.approval.arguments-preview.utf8-bytes',\n\tschema: z\n\t\t.object({\n\t\t\tallowedDecisions: z.tuple([z.literal('approve'), z.literal('deny')]),\n\t\t\tchallengeId: z.string().uuid(),\n\t\t\tdisplay: z\n\t\t\t\t.object({\n\t\t\t\t\targumentsPreview: z.string().max(MAXIMUM_APPROVAL_DISPLAY_BYTES),\n\t\t\t\t})\n\t\t\t\t.strict(),\n\t\t\texpiresAt: z.string().datetime(),\n\t\t\titemId: ItemIdSchema,\n\t\t\tname: z.string().min(1).max(256),\n\t\t\tnamespace: z.string().min(1).max(256),\n\t\t})\n\t\t.strict(),\n});\n\nexport const ApprovalPresentationOutcomeSchema = z.discriminatedUnion('kind', [\n\tz.object({ kind: z.literal('approved') }).strict(),\n\tz.object({ kind: z.literal('denied') }).strict(),\n\tz\n\t\t.object({\n\t\t\tkind: z.literal('cancelled'),\n\t\t\treason: z.enum(['challenge-expired', 'session-ended', 'user-cancelled']),\n\t\t})\n\t\t.strict(),\n\tz\n\t\t.object({\n\t\t\tkind: z.literal('unavailable'),\n\t\t\treason: z.enum(['presenter-missing', 'presentation-failed']),\n\t\t})\n\t\t.strict(),\n]);\n\nexport const GatewayApprovalDecisionRequestSchema = z\n\t.object({\n\t\tchallengeId: z.string().uuid(),\n\t\tdecision: z.enum(['approve', 'deny']),\n\t})\n\t.strict();\n\nexport const GatewayApprovalDecisionResultSchema = z.discriminatedUnion('kind', [\n\tz\n\t\t.object({\n\t\t\tkind: z.literal('recorded'),\n\t\t\tstate: z.enum(['approved', 'denied']),\n\t\t})\n\t\t.strict(),\n\tz\n\t\t.object({\n\t\t\tkind: z.literal('rejected'),\n\t\t\treason: z.enum([\n\t\t\t\t'not-found',\n\t\t\t\t'expired',\n\t\t\t\t'stale-authority',\n\t\t\t\t'principal-mismatch',\n\t\t\t\t'already-decided',\n\t\t\t\t'presenter-not-authorized',\n\t\t\t]),\n\t\t})\n\t\t.strict(),\n]);\n\nexport type GatewayApprovalPresentationRequest = z.infer<\n\ttypeof GatewayApprovalPresentationRequestSchema\n>;\nexport type ApprovalPresentationOutcome = z.infer<typeof ApprovalPresentationOutcomeSchema>;\nexport type GatewayApprovalDecisionRequest = z.infer<typeof GatewayApprovalDecisionRequestSchema>;\nexport type GatewayApprovalDecisionResult = z.infer<typeof GatewayApprovalDecisionResultSchema>;\n\ninterface ApprovalTruncationMarker {\n\treadonly omittedCount: number;\n\treadonly value: typeof APPROVAL_TRUNCATED_VALUE;\n}\n\ntype SanitizedApprovalValue =\n\t| ApprovalTruncationMarker\n\t| boolean\n\t| null\n\t| number\n\t| string\n\t| readonly SanitizedApprovalValue[]\n\t| { readonly [key: string]: SanitizedApprovalValue };\n\nfunction truncateUnicodeScalars(value: string): string | ApprovalTruncationMarker {\n\tconst scalars = Array.from(value);\n\tif (scalars.length <= MAXIMUM_APPROVAL_DISPLAY_STRING_SCALARS) return value;\n\treturn {\n\t\tomittedCount: scalars.length - MAXIMUM_APPROVAL_DISPLAY_STRING_SCALARS,\n\t\tvalue: APPROVAL_TRUNCATED_VALUE,\n\t};\n}\n\nfunction sanitizeApprovalValue(value: unknown, depth: number): SanitizedApprovalValue {\n\tif (depth >= MAXIMUM_APPROVAL_DISPLAY_DEPTH) {\n\t\treturn { omittedCount: 1, value: APPROVAL_TRUNCATED_VALUE };\n\t}\n\tif (value === null || typeof value === 'boolean') return value;\n\tif (typeof value === 'number') return Number.isFinite(value) ? value : String(value);\n\tif (typeof value === 'string') {\n\t\tif (credentialValuePattern.test(value)) return APPROVAL_REDACTED_VALUE;\n\t\treturn truncateUnicodeScalars(value);\n\t}\n\tif (Array.isArray(value)) {\n\t\tconst included = value\n\t\t\t.slice(0, MAXIMUM_APPROVAL_DISPLAY_ENTRIES)\n\t\t\t.map((item) => sanitizeApprovalValue(item, depth + 1));\n\t\tif (value.length > MAXIMUM_APPROVAL_DISPLAY_ENTRIES) {\n\t\t\tincluded[MAXIMUM_APPROVAL_DISPLAY_ENTRIES - 1] = {\n\t\t\t\tomittedCount: value.length - (MAXIMUM_APPROVAL_DISPLAY_ENTRIES - 1),\n\t\t\t\tvalue: APPROVAL_TRUNCATED_VALUE,\n\t\t\t};\n\t\t}\n\t\treturn included;\n\t}\n\tif (typeof value !== 'object') return '[UNSUPPORTED]';\n\n\tconst sortedEntries = Object.entries(value).toSorted(([leftKey], [rightKey]) =>\n\t\tleftKey.localeCompare(rightKey),\n\t);\n\tconst requiresTruncation = sortedEntries.length > MAXIMUM_APPROVAL_DISPLAY_ENTRIES;\n\tconst includedEntryCount = requiresTruncation\n\t\t? MAXIMUM_APPROVAL_DISPLAY_ENTRIES - 1\n\t\t: MAXIMUM_APPROVAL_DISPLAY_ENTRIES;\n\tconst sanitizedEntries = sortedEntries\n\t\t.slice(0, includedEntryCount)\n\t\t.map(\n\t\t\t([key, childValue]) =>\n\t\t\t\t[\n\t\t\t\t\tkey,\n\t\t\t\t\tcredentialKeyPattern.test(key)\n\t\t\t\t\t\t? APPROVAL_REDACTED_VALUE\n\t\t\t\t\t\t: sanitizeApprovalValue(childValue, depth + 1),\n\t\t\t\t] as const,\n\t\t);\n\tif (requiresTruncation) {\n\t\tsanitizedEntries.push([\n\t\t\tAPPROVAL_TRUNCATION_FIELD,\n\t\t\t{\n\t\t\t\tomittedCount: sortedEntries.length - includedEntryCount,\n\t\t\t\tvalue: APPROVAL_TRUNCATED_VALUE,\n\t\t\t},\n\t\t]);\n\t}\n\treturn Object.fromEntries(sanitizedEntries);\n}\n\nexport function sanitizeGatewayApprovalArguments(argumentsValue: unknown): string {\n\tconst preview = JSON.stringify(sanitizeApprovalValue(argumentsValue, 0));\n\tconst byteLength = new TextEncoder().encode(preview).byteLength;\n\tif (byteLength <= MAXIMUM_APPROVAL_DISPLAY_BYTES) return preview;\n\treturn JSON.stringify({\n\t\tomittedCount: byteLength - MAXIMUM_APPROVAL_DISPLAY_BYTES,\n\t\tvalue: APPROVAL_TRUNCATED_VALUE,\n\t});\n}\n"],"mappings":";;;;;AAQA,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;AAE5C,MAAa,mCAAmC;;;AChBhD,MAAM,iCAAiC;AACvC,MAAM,mCAAmC;AACzC,MAAM,0CAA0C;AAChD,MAAM,iCAAiC;AACvC,MAAM,0BAA0B;AAChC,MAAM,2BAA2B;AACjC,MAAM,4BAA4B;AAElC,MAAM,uBACL;AACD,MAAM,yBACL;AAED,MAAa,2CAA2C,4BAA4B;CACnF,aAAa,SAAS,YAAY;EACjC,IACC,IAAI,aAAa,CAAC,OAAO,QAAQ,QAAQ,iBAAiB,CAAC,aAC3D,gCAEA,QAAQ,SAAS;GAChB,MAAM;GACN,SAAS;GACT,MAAM,CAAC,WAAW,mBAAmB;GACrC,CAAC;;CAGJ,oBAAoB;CACpB,QAAQ,EACN,OAAO;EACP,kBAAkB,EAAE,MAAM,CAAC,EAAE,QAAQ,UAAU,EAAE,EAAE,QAAQ,OAAO,CAAC,CAAC;EACpE,aAAa,EAAE,QAAQ,CAAC,MAAM;EAC9B,SAAS,EACP,OAAO,EACP,kBAAkB,EAAE,QAAQ,CAAC,IAAI,+BAA+B,EAChE,CAAC,CACD,QAAQ;EACV,WAAW,EAAE,QAAQ,CAAC,UAAU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C;CACrD,IAAI,cAAc,gCAAgC,OAAO;CACzD,OAAO,KAAK,UAAU;EACrB,cAAc,aAAa;EAC3B,OAAO;EACP,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export { CapabilityDescriptor, CapabilityDescriptorSchema, CapabilitySearchMatch, CapabilitySearchMatchSchema, CapabilitySummary, CapabilitySummarySchema, JsonSchemaDocumentSchema, ResultExpectation, ResultExpectationSchema, SafeCallingHint, SafeCallingHintSchema, ToolSafetySummary, ToolSafetySummarySchema, ToolSchemaHint, ToolSchemaHintSchema, ToolSchemaSummary, ToolSchemaSummarySchema };
|
|
1
|
+
import { C as compactCapabilitySummaryDescription, S as ToolSchemaSummarySchema, _ as ToolSafetySummary, a as CapabilitySearchMatch, b as ToolSchemaHintSchema, c as CapabilitySummarySchema, d as ResultExpectation, f as ResultExpectationSchema, g as ToolCallDispositionSchema, h as ToolCallDisposition, i as CapabilityDiscoveryMetadataSchema, l as CompactCapabilityDescriptionCodePointLimit, m as SafeCallingHintSchema, n as CapabilityDescriptorSchema, o as CapabilitySearchMatchSchema, p as SafeCallingHint, r as CapabilityDiscoveryMetadata, s as CapabilitySummary, t as CapabilityDescriptor, u as JsonSchemaDocumentSchema, v as ToolSafetySummarySchema, x as ToolSchemaSummary, y as ToolSchemaHint } from "../index-uDfElZ9U.js";
|
|
2
|
+
export { CapabilityDescriptor, CapabilityDescriptorSchema, CapabilityDiscoveryMetadata, CapabilityDiscoveryMetadataSchema, CapabilitySearchMatch, CapabilitySearchMatchSchema, CapabilitySummary, CapabilitySummarySchema, CompactCapabilityDescriptionCodePointLimit, JsonSchemaDocumentSchema, ResultExpectation, ResultExpectationSchema, SafeCallingHint, SafeCallingHintSchema, ToolCallDisposition, ToolCallDispositionSchema, ToolSafetySummary, ToolSafetySummarySchema, ToolSchemaHint, ToolSchemaHintSchema, ToolSchemaSummary, ToolSchemaSummarySchema, compactCapabilitySummaryDescription };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { a as
|
|
2
|
-
import "../capability-description-surface-
|
|
3
|
-
export { CapabilityDescriptorSchema, CapabilitySearchMatchSchema, CapabilitySummarySchema, JsonSchemaDocumentSchema, ResultExpectationSchema, SafeCallingHintSchema, ToolSafetySummarySchema, ToolSchemaHintSchema, ToolSchemaSummarySchema };
|
|
1
|
+
import { a as CompactCapabilityDescriptionCodePointLimit, c as SafeCallingHintSchema, d as ToolSchemaHintSchema, f as ToolSchemaSummarySchema, i as CapabilitySummarySchema, l as ToolCallDispositionSchema, n as CapabilityDiscoveryMetadataSchema, o as JsonSchemaDocumentSchema, p as compactCapabilitySummaryDescription, r as CapabilitySearchMatchSchema, s as ResultExpectationSchema, t as CapabilityDescriptorSchema, u as ToolSafetySummarySchema } from "../capability-descriptor-schema-B_0vLQ3E.js";
|
|
2
|
+
import "../capability-description-surface-YqGm-nS_.js";
|
|
3
|
+
export { CapabilityDescriptorSchema, CapabilityDiscoveryMetadataSchema, CapabilitySearchMatchSchema, CapabilitySummarySchema, CompactCapabilityDescriptionCodePointLimit, JsonSchemaDocumentSchema, ResultExpectationSchema, SafeCallingHintSchema, ToolCallDispositionSchema, ToolSafetySummarySchema, ToolSchemaHintSchema, ToolSchemaSummarySchema, compactCapabilitySummaryDescription };
|
package/dist/{capability-descriptor-schema-v9tj7yKr.js → capability-descriptor-schema-B_0vLQ3E.js}
RENAMED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { r as NamespaceNameSchema, t as CapabilityNameSchema } from "./capability-reference-schema-K7qXJgEa.js";
|
|
2
2
|
import { o as JsonValueSchema } from "./json-value-schema-Br5M7d7X.js";
|
|
3
3
|
import { z } from "zod";
|
|
4
|
+
import { oauthToolAvailabilitySchema, oauthToolRequirementSchema } from "@agent-vm/oauth-broker-contracts";
|
|
4
5
|
//#region src/capability-description-surface/models/capability-descriptor-schema.ts
|
|
5
6
|
const JsonSchemaDocumentSchema = z.record(z.string(), JsonValueSchema);
|
|
6
7
|
const ToolSchemaSummarySchema = z.object({
|
|
@@ -17,8 +18,23 @@ const ToolSchemaHintSchema = z.object({
|
|
|
17
18
|
message: z.string().max(500),
|
|
18
19
|
next: z.enum(["call_ready", "describe_before_call"])
|
|
19
20
|
}).strict();
|
|
21
|
+
const ToolCallDispositionSchema = z.discriminatedUnion("kind", [
|
|
22
|
+
z.object({ kind: z.literal("without-approval") }).strict(),
|
|
23
|
+
z.object({ kind: z.literal("requires-approval") }).strict(),
|
|
24
|
+
z.object({
|
|
25
|
+
describeBeforeCall: z.literal(true),
|
|
26
|
+
kind: z.literal("invocation-dependent")
|
|
27
|
+
}).strict()
|
|
28
|
+
]);
|
|
29
|
+
const CapabilityDiscoveryMetadataSchema = z.object({
|
|
30
|
+
callDisposition: ToolCallDispositionSchema,
|
|
31
|
+
oauthAvailability: oauthToolAvailabilitySchema.optional(),
|
|
32
|
+
oauthRequirement: oauthToolRequirementSchema.optional()
|
|
33
|
+
}).strict();
|
|
20
34
|
const CapabilitySummarySchema = z.object({
|
|
35
|
+
callDisposition: ToolCallDispositionSchema.optional(),
|
|
21
36
|
description: z.string().optional(),
|
|
37
|
+
descriptionTruncated: z.boolean().optional(),
|
|
22
38
|
input: ToolSchemaSummarySchema,
|
|
23
39
|
namespace: NamespaceNameSchema,
|
|
24
40
|
output: ToolSchemaSummarySchema.optional(),
|
|
@@ -26,8 +42,23 @@ const CapabilitySummarySchema = z.object({
|
|
|
26
42
|
schemaHint: ToolSchemaHintSchema.optional(),
|
|
27
43
|
title: z.string().min(1).optional(),
|
|
28
44
|
name: CapabilityNameSchema,
|
|
45
|
+
oauthAvailability: oauthToolAvailabilitySchema.optional(),
|
|
46
|
+
oauthRequirement: oauthToolRequirementSchema.optional(),
|
|
29
47
|
toolRef: z.string().min(1)
|
|
30
48
|
}).strict();
|
|
49
|
+
const CompactCapabilityDescriptionCodePointLimit = 240;
|
|
50
|
+
function compactCapabilitySummaryDescription(summary) {
|
|
51
|
+
if (summary.description === void 0 || Array.from(summary.description).length <= 240) return {
|
|
52
|
+
...summary,
|
|
53
|
+
descriptionTruncated: false
|
|
54
|
+
};
|
|
55
|
+
const codePoints = Array.from(summary.description);
|
|
56
|
+
return {
|
|
57
|
+
...summary,
|
|
58
|
+
description: `${codePoints.slice(0, 239).join("")}…`,
|
|
59
|
+
descriptionTruncated: true
|
|
60
|
+
};
|
|
61
|
+
}
|
|
31
62
|
const ResultExpectationSchema = z.object({
|
|
32
63
|
canReturnArtifacts: z.boolean().default(false),
|
|
33
64
|
canStream: z.boolean().default(false),
|
|
@@ -63,17 +94,22 @@ const CapabilitySearchMatchSchema = CapabilitySummarySchema.extend({
|
|
|
63
94
|
}).strict();
|
|
64
95
|
const CapabilityDescriptorSchema = z.object({
|
|
65
96
|
annotations: JsonSchemaDocumentSchema.default({}),
|
|
97
|
+
callDisposition: ToolCallDispositionSchema.optional(),
|
|
98
|
+
description: z.string().optional(),
|
|
66
99
|
inputSchema: JsonSchemaDocumentSchema.optional(),
|
|
67
100
|
namespace: NamespaceNameSchema,
|
|
68
101
|
outputSchema: JsonSchemaDocumentSchema.optional(),
|
|
69
102
|
related: z.array(JsonValueSchema).default([]),
|
|
70
103
|
schemaHint: ToolSchemaHintSchema.optional(),
|
|
104
|
+
title: z.string().min(1).optional(),
|
|
71
105
|
name: CapabilityNameSchema,
|
|
106
|
+
oauthAvailability: oauthToolAvailabilitySchema.optional(),
|
|
107
|
+
oauthRequirement: oauthToolRequirementSchema.optional(),
|
|
72
108
|
toolRef: z.string().min(1),
|
|
73
109
|
typescriptHelper: z.string().optional(),
|
|
74
110
|
zod: JsonSchemaDocumentSchema.optional()
|
|
75
111
|
}).strict();
|
|
76
112
|
//#endregion
|
|
77
|
-
export {
|
|
113
|
+
export { CompactCapabilityDescriptionCodePointLimit as a, SafeCallingHintSchema as c, ToolSchemaHintSchema as d, ToolSchemaSummarySchema as f, CapabilitySummarySchema as i, ToolCallDispositionSchema as l, CapabilityDiscoveryMetadataSchema as n, JsonSchemaDocumentSchema as o, compactCapabilitySummaryDescription as p, CapabilitySearchMatchSchema as r, ResultExpectationSchema as s, CapabilityDescriptorSchema as t, ToolSafetySummarySchema as u };
|
|
78
114
|
|
|
79
|
-
//# sourceMappingURL=capability-descriptor-schema-
|
|
115
|
+
//# sourceMappingURL=capability-descriptor-schema-B_0vLQ3E.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"capability-descriptor-schema-B_0vLQ3E.js","names":[],"sources":["../src/capability-description-surface/models/capability-descriptor-schema.ts"],"sourcesContent":["import {\n\toauthToolAvailabilitySchema,\n\toauthToolRequirementSchema,\n} from '@agent-vm/oauth-broker-contracts';\nimport { 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 ToolCallDispositionSchema = z.discriminatedUnion('kind', [\n\tz.object({ kind: z.literal('without-approval') }).strict(),\n\tz.object({ kind: z.literal('requires-approval') }).strict(),\n\tz\n\t\t.object({\n\t\t\tdescribeBeforeCall: z.literal(true),\n\t\t\tkind: z.literal('invocation-dependent'),\n\t\t})\n\t\t.strict(),\n]);\n\nexport type ToolCallDisposition = z.infer<typeof ToolCallDispositionSchema>;\n\nexport const CapabilityDiscoveryMetadataSchema = z\n\t.object({\n\t\tcallDisposition: ToolCallDispositionSchema,\n\t\toauthAvailability: oauthToolAvailabilitySchema.optional(),\n\t\toauthRequirement: oauthToolRequirementSchema.optional(),\n\t})\n\t.strict();\n\nexport type CapabilityDiscoveryMetadata = z.infer<typeof CapabilityDiscoveryMetadataSchema>;\n\nexport const CapabilitySummarySchema = z\n\t.object({\n\t\tcallDisposition: ToolCallDispositionSchema.optional(),\n\t\tdescription: z.string().optional(),\n\t\tdescriptionTruncated: z.boolean().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\toauthAvailability: oauthToolAvailabilitySchema.optional(),\n\t\toauthRequirement: oauthToolRequirementSchema.optional(),\n\t\ttoolRef: z.string().min(1),\n\t})\n\t.strict();\n\nexport type CapabilitySummary = z.infer<typeof CapabilitySummarySchema>;\n\nexport const CompactCapabilityDescriptionCodePointLimit = 240;\n\nexport function compactCapabilitySummaryDescription(summary: CapabilitySummary): CapabilitySummary {\n\tif (\n\t\tsummary.description === undefined ||\n\t\tArray.from(summary.description).length <= CompactCapabilityDescriptionCodePointLimit\n\t) {\n\t\treturn { ...summary, descriptionTruncated: false };\n\t}\n\tconst codePoints = Array.from(summary.description);\n\treturn {\n\t\t...summary,\n\t\tdescription: `${codePoints.slice(0, CompactCapabilityDescriptionCodePointLimit - 1).join('')}…`,\n\t\tdescriptionTruncated: true,\n\t};\n}\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\tcallDisposition: ToolCallDispositionSchema.optional(),\n\t\tdescription: z.string().optional(),\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\ttitle: z.string().min(1).optional(),\n\t\tname: CapabilityNameSchema,\n\t\toauthAvailability: oauthToolAvailabilitySchema.optional(),\n\t\toauthRequirement: oauthToolRequirementSchema.optional(),\n\t\ttoolRef: z.string().min(1),\n\t\ttypescriptHelper: z.string().optional(),\n\t\tzod: JsonSchemaDocumentSchema.optional(),\n\t})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ACtD,oBAAoB,EAAE,MAAM,gBAAgB,CAAC,UAAU;CACvD,CAAC,CAAC,QAAQ;AAIX,MAAa,6BAA6B,EACxC,OAAO;CACP,aAAa,yBAAyB,QAAQ,EAAE,CAAC;CACjD,iBAAiB,0BAA0B,UAAU;CACrD,aAAa,EAAE,QAAQ,CAAC,UAAU;CAClC,aAAa,yBAAyB,UAAU;CAChD,WAAW;CACX,cAAc,yBAAyB,UAAU;CACjD,SAAS,EAAE,MAAM,gBAAgB,CAAC,QAAQ,EAAE,CAAC;CAC7C,YAAY,qBAAqB,UAAU;CAC3C,OAAO,EAAE,QAAQ,CAAC,IAAI,EAAE,CAAC,UAAU;CACnC,MAAM;CACN,mBAAmB,4BAA4B,UAAU;CACzD,kBAAkB,2BAA2B,UAAU;CACvD,SAAS,EAAE,QAAQ,CAAC,IAAI,EAAE;CAC1B,kBAAkB,EAAE,QAAQ,CAAC,UAAU;CACvC,KAAK,yBAAyB,UAAU;CACxC,CAAC,CACD,QAAQ"}
|
package/dist/cli/tool-portal.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { a as PortalArtifactReadRequestSchema } from "../artifact-surface-CHEu4tDd.js";
|
|
3
3
|
import { r as PortalCallRequestSchema } from "../portal-call-request-schema-Cl0kTLaX.js";
|
|
4
|
-
import { a as PortalListRequestSchema, r as PortalSearchRequestSchema, s as PortalDescribeRequestSchema } from "../portal-call-surface-
|
|
5
|
-
import { a as encodeCanonicalJson } from "../portable-contracts-
|
|
6
|
-
import { t as ToolPortalMcpClient } from "../tool-portal-mcp-client-
|
|
4
|
+
import { a as PortalListRequestSchema, r as PortalSearchRequestSchema, s as PortalDescribeRequestSchema } from "../portal-call-surface-B952nh-H.js";
|
|
5
|
+
import { a as encodeCanonicalJson } from "../portable-contracts-CWLiYrVU.js";
|
|
6
|
+
import { t as ToolPortalMcpClient } from "../tool-portal-mcp-client-DsDi2iJc.js";
|
|
7
7
|
import { t as createNodeToolPortalMcpTransport } from "../node-tool-portal-mcp-transport-xFo0i37Q.js";
|
|
8
8
|
import { z } from "zod";
|
|
9
9
|
import { run } from "@optique/run";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { a as GatewayApprovalDecisionResult, r as GatewayApprovalDecisionRequest } from "../index-ex2lEawY.js";
|
|
2
2
|
import { c as PortalArtifactReadRequest, u as PortalArtifactReadResult } from "../index-DDLN0DE_.js";
|
|
3
3
|
import { A as SandboxTerminalResizeResult, At as SandboxFsRenameResult, B as SandboxStreamWriteRequest, Bt as SandboxExecCancelRequest, E as SandboxTerminalAttachResult, Et as SandboxFsRemoveResult, Gt as SandboxExecStartRequest, H as SandboxStreamWriteResult, Ht as SandboxExecCancelResult, I as SandboxStreamReadRequest, It as SandboxFsWriteRequest, K as SandboxProcessCancelResult, M as SandboxStreamCloseRequest, Mt as SandboxFsStatRequest, O as SandboxTerminalResizeRequest, Ot as SandboxFsRenameRequest, P as SandboxStreamCloseResult, Pt as SandboxFsStatResult, Q as SandboxProcessLogsResult, R as SandboxStreamReadResult, Rt as SandboxFsWriteResult, St as SandboxFsReadResult, W as SandboxProcessCancelRequest, X as SandboxProcessLogsRequest, Yt as SandboxExecWaitRequest, Zt as SandboxExecWaitResult, _ as GatewayRuntimeTrustedInvocationRequester, _n as SandboxRetainedResultLookupRequest, at as SandboxProcessStatusResult, bt as SandboxFsReadRequest, c as GatewayRuntimeManagedPluginClientKind, cn as SandboxEnvironmentStatusRequest, d as GatewayRuntimeTrustedInvocationContext, en as SandboxEnvironmentCloseRequest, et as SandboxProcessStartRequest, f as GatewayRuntimeTrustedInvocationContextSchema, ft as SandboxFsListRequest, g as GatewayRuntimeTrustedInvocationPrincipalSchema, gt as SandboxFsMkdirRequest, h as GatewayRuntimeTrustedInvocationPrincipal, in as SandboxEnvironmentOpenRequest, it as SandboxProcessStatusRequest, ln as SandboxEnvironmentStatusResult, lt as SandboxProcessWaitResult, m as GatewayRuntimeTrustedInvocationCorrelationSchema, mt as SandboxFsListResult, n as GatewayRuntimeAttachmentMetadata$1, nt as SandboxProcessStartResult, on as SandboxEnvironmentOpenResult, p as GatewayRuntimeTrustedInvocationCorrelation, qt as SandboxExecStartResult, st as SandboxProcessWaitRequest, tn as SandboxEnvironmentCloseResult, v as GatewayRuntimeTrustedInvocationRequesterSchema, vt as SandboxFsMkdirResult, w as SandboxTerminalAttachRequest, wt as SandboxFsRemoveRequest, yn as SandboxRetainedResultLookupResult } from "../index-ksJ4wmQG.js";
|
|
4
|
-
import { P as PortalCallRequest, T as PortalListResult, b as PortalDescribeResult, g as PortalCallResult, k as PortalSearchResult } from "../portal-call-result-schema-
|
|
4
|
+
import { P as PortalCallRequest, T as PortalListResult, b as PortalDescribeResult, g as PortalCallResult, k as PortalSearchResult } from "../portal-call-result-schema-Mv2Dv1HJ.js";
|
|
5
5
|
import { i as PortalSearchRequest, m as PortalDescribeRequest, s as PortalListRequest } from "../index-DTTEu7ZT.js";
|
|
6
6
|
import { z } from "zod/v4";
|
|
7
7
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { C as PortalSearchResultSchema, b as PortalListResultSchema, g as PortalDescribeResultSchema, p as PortalCallResultSchema } from "../portal-call-result-schema-
|
|
2
|
-
import { n as GatewayApprovalDecisionRequestSchema, r as GatewayApprovalDecisionResultSchema } from "../approval-surface-
|
|
1
|
+
import { C as PortalSearchResultSchema, b as PortalListResultSchema, g as PortalDescribeResultSchema, p as PortalCallResultSchema } from "../portal-call-result-schema-DM77S9CA.js";
|
|
2
|
+
import { n as GatewayApprovalDecisionRequestSchema, r as GatewayApprovalDecisionResultSchema } from "../approval-surface-phfnKUSF.js";
|
|
3
3
|
import { a as PortalArtifactReadRequestSchema, o as PortalArtifactReadResultSchema } from "../artifact-surface-CHEu4tDd.js";
|
|
4
4
|
import { $ as SandboxExecStartRequestSchema, A as SandboxProcessStartRequestSchema, B as SandboxFsReadRequestSchema, C as SandboxStreamWriteResultSchema, E as SandboxProcessHandleRequestSchema, G as SandboxFsRenameResultSchema, H as SandboxFsRemoveRequestSchema, I as SandboxFsListRequestSchema, J as SandboxFsWriteRequestSchema, K as SandboxFsStatRequestSchema, L as SandboxFsListResultSchema, M as SandboxProcessStatusResultSchema, N as SandboxProcessWaitRequestSchema, O as SandboxProcessLogsRequestSchema, P as SandboxProcessWaitResultSchema, R as SandboxFsMkdirRequestSchema, S as SandboxStreamWriteRequestSchema, T as SandboxProcessCancelResultSchema, U as SandboxFsRemoveResultSchema, V as SandboxFsReadResultSchema, W as SandboxFsRenameRequestSchema, X as SandboxExecCancelRequestSchema, Y as SandboxFsWriteResultSchema, Z as SandboxExecCancelResultSchema, _ as SandboxTerminalResizeResultSchema, at as SandboxEnvironmentHandleRequestSchema, b as SandboxStreamReadRequestSchema, c as GatewayRuntimeTrustedInvocationCorrelationSchema, ct as SandboxEnvironmentStatusResultSchema, et as SandboxExecStartResultSchema, g as SandboxTerminalResizeRequestSchema, h as SandboxTerminalAttachResultSchema, it as SandboxEnvironmentCloseResultSchema, j as SandboxProcessStartResultSchema, k as SandboxProcessLogsResultSchema, l as GatewayRuntimeTrustedInvocationPrincipalSchema, m as SandboxTerminalAttachRequestSchema, mt as SandboxRetainedResultLookupResultSchema, n as GatewayRuntimeAttachmentMetadataSchema, nt as SandboxExecWaitResultSchema, ot as SandboxEnvironmentOpenRequestSchema, pt as SandboxRetainedResultLookupRequestSchema, q as SandboxFsStatResultSchema, s as GatewayRuntimeTrustedInvocationContextSchema, st as SandboxEnvironmentOpenResultSchema, tt as SandboxExecWaitRequestSchema, u as GatewayRuntimeTrustedInvocationRequesterSchema, v as SandboxStreamCloseRequestSchema, w as SandboxProcessCancelRequestSchema, x as SandboxStreamReadResultSchema, y as SandboxStreamCloseResultSchema, z as SandboxFsMkdirResultSchema } from "../contracts-X9wWs2lP.js";
|
|
5
5
|
import { r as PortalCallRequestSchema } from "../portal-call-request-schema-Cl0kTLaX.js";
|
|
6
|
-
import { a as PortalListRequestSchema, r as PortalSearchRequestSchema, s as PortalDescribeRequestSchema } from "../portal-call-surface-
|
|
6
|
+
import { a as PortalListRequestSchema, r as PortalSearchRequestSchema, s as PortalDescribeRequestSchema } from "../portal-call-surface-B952nh-H.js";
|
|
7
7
|
import { z } from "zod/v4";
|
|
8
8
|
import net from "node:net";
|
|
9
9
|
//#region src/gateway-runtime-client/gateway-runtime-sandbox-operations.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { c as PortalArtifactReadRequest, i as PortalArtifactReadResourceRequest, u as PortalArtifactReadResult } from "./index-DDLN0DE_.js";
|
|
2
|
-
import { P as PortalCallRequest, T as PortalListResult, b as PortalDescribeResult, g as PortalCallResult, k as PortalSearchResult } from "./portal-call-result-schema-
|
|
2
|
+
import { P as PortalCallRequest, T as PortalListResult, b as PortalDescribeResult, g as PortalCallResult, k as PortalSearchResult } from "./portal-call-result-schema-Mv2Dv1HJ.js";
|
|
3
3
|
import { i as PortalSearchRequest, m as PortalDescribeRequest, s as PortalListRequest } from "./index-DTTEu7ZT.js";
|
|
4
4
|
|
|
5
5
|
//#region src/tool-portal-mcp-client/index.d.ts
|
|
@@ -66,4 +66,4 @@ declare class ToolPortalMcpClient {
|
|
|
66
66
|
}
|
|
67
67
|
//#endregion
|
|
68
68
|
export { ToolPortalMcpTransport as a, ToolPortalMcpResourceContent as i, ToolPortalMcpClient as n, ToolPortalMcpClientOptions as r, ToolPortalClientRequestOptions as t };
|
|
69
|
-
//# sourceMappingURL=index-
|
|
69
|
+
//# sourceMappingURL=index-C2axvEYg.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index-
|
|
1
|
+
{"version":3,"file":"index-C2axvEYg.d.ts","names":[],"sources":["../src/tool-portal-mcp-client/index.ts"],"mappings":";;;;;KA2BY,4BAAA;EAAA,SAEA,IAAA;EAAA,SACA,IAAA;EAAA,SACA,SAAA;EAAA,SACA,GAAA;AAAA;EAAA,SAGA,IAAA;EAAA,SACA,SAAA;EAAA,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A"}
|
|
@@ -0,0 +1,304 @@
|
|
|
1
|
+
import { l as JsonValue } from "./json-value-schema-CwDmttWU.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 ToolCallDispositionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
27
|
+
kind: z.ZodLiteral<"without-approval">;
|
|
28
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
29
|
+
kind: z.ZodLiteral<"requires-approval">;
|
|
30
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
31
|
+
describeBeforeCall: z.ZodLiteral<true>;
|
|
32
|
+
kind: z.ZodLiteral<"invocation-dependent">;
|
|
33
|
+
}, z.core.$strict>], "kind">;
|
|
34
|
+
type ToolCallDisposition = z.infer<typeof ToolCallDispositionSchema>;
|
|
35
|
+
declare const CapabilityDiscoveryMetadataSchema: z.ZodObject<{
|
|
36
|
+
callDisposition: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
37
|
+
kind: z.ZodLiteral<"without-approval">;
|
|
38
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
39
|
+
kind: z.ZodLiteral<"requires-approval">;
|
|
40
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
41
|
+
describeBeforeCall: z.ZodLiteral<true>;
|
|
42
|
+
kind: z.ZodLiteral<"invocation-dependent">;
|
|
43
|
+
}, z.core.$strict>], "kind">;
|
|
44
|
+
oauthAvailability: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
45
|
+
accountProfiles: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
46
|
+
accountLabel: z.ZodString;
|
|
47
|
+
accountProfileId: z.core.$ZodBranded<z.ZodString, "OAuthAccountProfileId", "out">;
|
|
48
|
+
}, z.core.$strict>>>;
|
|
49
|
+
kind: z.ZodLiteral<"ready">;
|
|
50
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
51
|
+
kind: z.ZodLiteral<"authorization-required">;
|
|
52
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
53
|
+
kind: z.ZodLiteral<"reauthorization-required">;
|
|
54
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
55
|
+
kind: z.ZodLiteral<"scope-insufficient">;
|
|
56
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
57
|
+
kind: z.ZodLiteral<"authorization-status-unavailable">;
|
|
58
|
+
}, z.core.$strict>], "kind">>;
|
|
59
|
+
oauthRequirement: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
60
|
+
applicationId: z.core.$ZodBranded<z.ZodString, "OAuthApplicationId", "out">;
|
|
61
|
+
kind: z.ZodLiteral<"oauth-account-profile">;
|
|
62
|
+
minimumPermission: z.ZodEnum<{
|
|
63
|
+
read: "read";
|
|
64
|
+
write: "write";
|
|
65
|
+
}>;
|
|
66
|
+
serviceId: z.core.$ZodBranded<z.ZodString, "OAuthServiceId", "out">;
|
|
67
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
68
|
+
accountProfileArgument: z.ZodLiteral<"accountProfile">;
|
|
69
|
+
describeBeforeCall: z.ZodLiteral<true>;
|
|
70
|
+
kind: z.ZodLiteral<"invocation-dependent-oauth-account-profile">;
|
|
71
|
+
}, z.core.$strict>], "kind">>;
|
|
72
|
+
}, z.core.$strict>;
|
|
73
|
+
type CapabilityDiscoveryMetadata = z.infer<typeof CapabilityDiscoveryMetadataSchema>;
|
|
74
|
+
declare const CapabilitySummarySchema: z.ZodObject<{
|
|
75
|
+
callDisposition: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
76
|
+
kind: z.ZodLiteral<"without-approval">;
|
|
77
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
78
|
+
kind: z.ZodLiteral<"requires-approval">;
|
|
79
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
80
|
+
describeBeforeCall: z.ZodLiteral<true>;
|
|
81
|
+
kind: z.ZodLiteral<"invocation-dependent">;
|
|
82
|
+
}, z.core.$strict>], "kind">>;
|
|
83
|
+
description: z.ZodOptional<z.ZodString>;
|
|
84
|
+
descriptionTruncated: z.ZodOptional<z.ZodBoolean>;
|
|
85
|
+
input: z.ZodObject<{
|
|
86
|
+
optional: z.ZodArray<z.ZodString>;
|
|
87
|
+
propertyCount: z.ZodNumber;
|
|
88
|
+
required: z.ZodArray<z.ZodString>;
|
|
89
|
+
type: z.ZodString;
|
|
90
|
+
}, z.core.$strict>;
|
|
91
|
+
namespace: z.ZodString;
|
|
92
|
+
output: z.ZodOptional<z.ZodObject<{
|
|
93
|
+
optional: z.ZodArray<z.ZodString>;
|
|
94
|
+
propertyCount: z.ZodNumber;
|
|
95
|
+
required: z.ZodArray<z.ZodString>;
|
|
96
|
+
type: z.ZodString;
|
|
97
|
+
}, z.core.$strict>>;
|
|
98
|
+
safety: z.ZodObject<{
|
|
99
|
+
destructiveHint: z.ZodOptional<z.ZodBoolean>;
|
|
100
|
+
readOnlyHint: z.ZodOptional<z.ZodBoolean>;
|
|
101
|
+
}, z.core.$strict>;
|
|
102
|
+
schemaHint: z.ZodOptional<z.ZodObject<{
|
|
103
|
+
message: z.ZodString;
|
|
104
|
+
next: z.ZodEnum<{
|
|
105
|
+
call_ready: "call_ready";
|
|
106
|
+
describe_before_call: "describe_before_call";
|
|
107
|
+
}>;
|
|
108
|
+
}, z.core.$strict>>;
|
|
109
|
+
title: z.ZodOptional<z.ZodString>;
|
|
110
|
+
name: z.ZodString;
|
|
111
|
+
oauthAvailability: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
112
|
+
accountProfiles: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
113
|
+
accountLabel: z.ZodString;
|
|
114
|
+
accountProfileId: z.core.$ZodBranded<z.ZodString, "OAuthAccountProfileId", "out">;
|
|
115
|
+
}, z.core.$strict>>>;
|
|
116
|
+
kind: z.ZodLiteral<"ready">;
|
|
117
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
118
|
+
kind: z.ZodLiteral<"authorization-required">;
|
|
119
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
120
|
+
kind: z.ZodLiteral<"reauthorization-required">;
|
|
121
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
122
|
+
kind: z.ZodLiteral<"scope-insufficient">;
|
|
123
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
124
|
+
kind: z.ZodLiteral<"authorization-status-unavailable">;
|
|
125
|
+
}, z.core.$strict>], "kind">>;
|
|
126
|
+
oauthRequirement: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
127
|
+
applicationId: z.core.$ZodBranded<z.ZodString, "OAuthApplicationId", "out">;
|
|
128
|
+
kind: z.ZodLiteral<"oauth-account-profile">;
|
|
129
|
+
minimumPermission: z.ZodEnum<{
|
|
130
|
+
read: "read";
|
|
131
|
+
write: "write";
|
|
132
|
+
}>;
|
|
133
|
+
serviceId: z.core.$ZodBranded<z.ZodString, "OAuthServiceId", "out">;
|
|
134
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
135
|
+
accountProfileArgument: z.ZodLiteral<"accountProfile">;
|
|
136
|
+
describeBeforeCall: z.ZodLiteral<true>;
|
|
137
|
+
kind: z.ZodLiteral<"invocation-dependent-oauth-account-profile">;
|
|
138
|
+
}, z.core.$strict>], "kind">>;
|
|
139
|
+
toolRef: z.ZodString;
|
|
140
|
+
}, z.core.$strict>;
|
|
141
|
+
type CapabilitySummary = z.infer<typeof CapabilitySummarySchema>;
|
|
142
|
+
declare const CompactCapabilityDescriptionCodePointLimit = 240;
|
|
143
|
+
declare function compactCapabilitySummaryDescription(summary: CapabilitySummary): CapabilitySummary;
|
|
144
|
+
declare const ResultExpectationSchema: z.ZodObject<{
|
|
145
|
+
canReturnArtifacts: z.ZodDefault<z.ZodBoolean>;
|
|
146
|
+
canStream: z.ZodDefault<z.ZodBoolean>;
|
|
147
|
+
kind: z.ZodEnum<{
|
|
148
|
+
json: "json";
|
|
149
|
+
text: "text";
|
|
150
|
+
binary_artifact: "binary_artifact";
|
|
151
|
+
mixed: "mixed";
|
|
152
|
+
}>;
|
|
153
|
+
outputJsonSchema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>>>;
|
|
154
|
+
truncation: z.ZodDefault<z.ZodEnum<{
|
|
155
|
+
possible: "possible";
|
|
156
|
+
expected: "expected";
|
|
157
|
+
none: "none";
|
|
158
|
+
}>>;
|
|
159
|
+
}, z.core.$strict>;
|
|
160
|
+
type ResultExpectation = z.infer<typeof ResultExpectationSchema>;
|
|
161
|
+
declare const SafeCallingHintSchema: z.ZodObject<{
|
|
162
|
+
code: z.ZodEnum<{
|
|
163
|
+
describe_before_call: "describe_before_call";
|
|
164
|
+
approval_may_be_required: "approval_may_be_required";
|
|
165
|
+
read_only: "read_only";
|
|
166
|
+
write_or_external_effect: "write_or_external_effect";
|
|
167
|
+
large_output_possible: "large_output_possible";
|
|
168
|
+
artifact_output_possible: "artifact_output_possible";
|
|
169
|
+
}>;
|
|
170
|
+
message: z.ZodString;
|
|
171
|
+
}, z.core.$strict>;
|
|
172
|
+
type SafeCallingHint = z.infer<typeof SafeCallingHintSchema>;
|
|
173
|
+
declare const CapabilitySearchMatchSchema: z.ZodObject<{
|
|
174
|
+
callDisposition: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
175
|
+
kind: z.ZodLiteral<"without-approval">;
|
|
176
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
177
|
+
kind: z.ZodLiteral<"requires-approval">;
|
|
178
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
179
|
+
describeBeforeCall: z.ZodLiteral<true>;
|
|
180
|
+
kind: z.ZodLiteral<"invocation-dependent">;
|
|
181
|
+
}, z.core.$strict>], "kind">>;
|
|
182
|
+
description: z.ZodOptional<z.ZodString>;
|
|
183
|
+
descriptionTruncated: z.ZodOptional<z.ZodBoolean>;
|
|
184
|
+
input: z.ZodObject<{
|
|
185
|
+
optional: z.ZodArray<z.ZodString>;
|
|
186
|
+
propertyCount: z.ZodNumber;
|
|
187
|
+
required: z.ZodArray<z.ZodString>;
|
|
188
|
+
type: z.ZodString;
|
|
189
|
+
}, z.core.$strict>;
|
|
190
|
+
namespace: z.ZodString;
|
|
191
|
+
output: z.ZodOptional<z.ZodObject<{
|
|
192
|
+
optional: z.ZodArray<z.ZodString>;
|
|
193
|
+
propertyCount: z.ZodNumber;
|
|
194
|
+
required: z.ZodArray<z.ZodString>;
|
|
195
|
+
type: z.ZodString;
|
|
196
|
+
}, z.core.$strict>>;
|
|
197
|
+
safety: z.ZodObject<{
|
|
198
|
+
destructiveHint: z.ZodOptional<z.ZodBoolean>;
|
|
199
|
+
readOnlyHint: z.ZodOptional<z.ZodBoolean>;
|
|
200
|
+
}, z.core.$strict>;
|
|
201
|
+
schemaHint: z.ZodOptional<z.ZodObject<{
|
|
202
|
+
message: z.ZodString;
|
|
203
|
+
next: z.ZodEnum<{
|
|
204
|
+
call_ready: "call_ready";
|
|
205
|
+
describe_before_call: "describe_before_call";
|
|
206
|
+
}>;
|
|
207
|
+
}, z.core.$strict>>;
|
|
208
|
+
title: z.ZodOptional<z.ZodString>;
|
|
209
|
+
name: z.ZodString;
|
|
210
|
+
oauthAvailability: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
211
|
+
accountProfiles: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
212
|
+
accountLabel: z.ZodString;
|
|
213
|
+
accountProfileId: z.core.$ZodBranded<z.ZodString, "OAuthAccountProfileId", "out">;
|
|
214
|
+
}, z.core.$strict>>>;
|
|
215
|
+
kind: z.ZodLiteral<"ready">;
|
|
216
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
217
|
+
kind: z.ZodLiteral<"authorization-required">;
|
|
218
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
219
|
+
kind: z.ZodLiteral<"reauthorization-required">;
|
|
220
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
221
|
+
kind: z.ZodLiteral<"scope-insufficient">;
|
|
222
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
223
|
+
kind: z.ZodLiteral<"authorization-status-unavailable">;
|
|
224
|
+
}, z.core.$strict>], "kind">>;
|
|
225
|
+
oauthRequirement: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
226
|
+
applicationId: z.core.$ZodBranded<z.ZodString, "OAuthApplicationId", "out">;
|
|
227
|
+
kind: z.ZodLiteral<"oauth-account-profile">;
|
|
228
|
+
minimumPermission: z.ZodEnum<{
|
|
229
|
+
read: "read";
|
|
230
|
+
write: "write";
|
|
231
|
+
}>;
|
|
232
|
+
serviceId: z.core.$ZodBranded<z.ZodString, "OAuthServiceId", "out">;
|
|
233
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
234
|
+
accountProfileArgument: z.ZodLiteral<"accountProfile">;
|
|
235
|
+
describeBeforeCall: z.ZodLiteral<true>;
|
|
236
|
+
kind: z.ZodLiteral<"invocation-dependent-oauth-account-profile">;
|
|
237
|
+
}, z.core.$strict>], "kind">>;
|
|
238
|
+
toolRef: z.ZodString;
|
|
239
|
+
inputSchema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>>>;
|
|
240
|
+
outputSchema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>>>;
|
|
241
|
+
relationshipHints: z.ZodOptional<z.ZodArray<z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>>>;
|
|
242
|
+
schemaFieldMatches: z.ZodOptional<z.ZodArray<z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>>>;
|
|
243
|
+
}, z.core.$strict>;
|
|
244
|
+
type CapabilitySearchMatch = z.infer<typeof CapabilitySearchMatchSchema>;
|
|
245
|
+
declare const CapabilityDescriptorSchema: z.ZodObject<{
|
|
246
|
+
annotations: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>>>;
|
|
247
|
+
callDisposition: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
248
|
+
kind: z.ZodLiteral<"without-approval">;
|
|
249
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
250
|
+
kind: z.ZodLiteral<"requires-approval">;
|
|
251
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
252
|
+
describeBeforeCall: z.ZodLiteral<true>;
|
|
253
|
+
kind: z.ZodLiteral<"invocation-dependent">;
|
|
254
|
+
}, z.core.$strict>], "kind">>;
|
|
255
|
+
description: z.ZodOptional<z.ZodString>;
|
|
256
|
+
inputSchema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>>>;
|
|
257
|
+
namespace: z.ZodString;
|
|
258
|
+
outputSchema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>>>;
|
|
259
|
+
related: z.ZodDefault<z.ZodArray<z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>>>;
|
|
260
|
+
schemaHint: z.ZodOptional<z.ZodObject<{
|
|
261
|
+
message: z.ZodString;
|
|
262
|
+
next: z.ZodEnum<{
|
|
263
|
+
call_ready: "call_ready";
|
|
264
|
+
describe_before_call: "describe_before_call";
|
|
265
|
+
}>;
|
|
266
|
+
}, z.core.$strict>>;
|
|
267
|
+
title: z.ZodOptional<z.ZodString>;
|
|
268
|
+
name: z.ZodString;
|
|
269
|
+
oauthAvailability: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
270
|
+
accountProfiles: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
271
|
+
accountLabel: z.ZodString;
|
|
272
|
+
accountProfileId: z.core.$ZodBranded<z.ZodString, "OAuthAccountProfileId", "out">;
|
|
273
|
+
}, z.core.$strict>>>;
|
|
274
|
+
kind: z.ZodLiteral<"ready">;
|
|
275
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
276
|
+
kind: z.ZodLiteral<"authorization-required">;
|
|
277
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
278
|
+
kind: z.ZodLiteral<"reauthorization-required">;
|
|
279
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
280
|
+
kind: z.ZodLiteral<"scope-insufficient">;
|
|
281
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
282
|
+
kind: z.ZodLiteral<"authorization-status-unavailable">;
|
|
283
|
+
}, z.core.$strict>], "kind">>;
|
|
284
|
+
oauthRequirement: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
285
|
+
applicationId: z.core.$ZodBranded<z.ZodString, "OAuthApplicationId", "out">;
|
|
286
|
+
kind: z.ZodLiteral<"oauth-account-profile">;
|
|
287
|
+
minimumPermission: z.ZodEnum<{
|
|
288
|
+
read: "read";
|
|
289
|
+
write: "write";
|
|
290
|
+
}>;
|
|
291
|
+
serviceId: z.core.$ZodBranded<z.ZodString, "OAuthServiceId", "out">;
|
|
292
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
293
|
+
accountProfileArgument: z.ZodLiteral<"accountProfile">;
|
|
294
|
+
describeBeforeCall: z.ZodLiteral<true>;
|
|
295
|
+
kind: z.ZodLiteral<"invocation-dependent-oauth-account-profile">;
|
|
296
|
+
}, z.core.$strict>], "kind">>;
|
|
297
|
+
toolRef: z.ZodString;
|
|
298
|
+
typescriptHelper: z.ZodOptional<z.ZodString>;
|
|
299
|
+
zod: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>>>;
|
|
300
|
+
}, z.core.$strict>;
|
|
301
|
+
type CapabilityDescriptor = z.infer<typeof CapabilityDescriptorSchema>;
|
|
302
|
+
//#endregion
|
|
303
|
+
export { compactCapabilitySummaryDescription as C, ToolSchemaSummarySchema as S, ToolSafetySummary as _, CapabilitySearchMatch as a, ToolSchemaHintSchema as b, CapabilitySummarySchema as c, ResultExpectation as d, ResultExpectationSchema as f, ToolCallDispositionSchema as g, ToolCallDisposition as h, CapabilityDiscoveryMetadataSchema as i, CompactCapabilityDescriptionCodePointLimit as l, SafeCallingHintSchema as m, CapabilityDescriptorSchema as n, CapabilitySearchMatchSchema as o, SafeCallingHint as p, CapabilityDiscoveryMetadata as r, CapabilitySummary as s, CapabilityDescriptor as t, JsonSchemaDocumentSchema as u, ToolSafetySummarySchema as v, ToolSchemaSummary as x, ToolSchemaHint as y };
|
|
304
|
+
//# sourceMappingURL=index-uDfElZ9U.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-uDfElZ9U.d.ts","names":[],"sources":["../src/capability-description-surface/models/capability-descriptor-schema.ts"],"mappings":";;;;cAYa,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,yBAAA,EAAyB,CAAA,CAAA,qBAAA,EAAA,CAAA,CAAA,SAAA;;;;;;;;KAW1B,mBAAA,GAAsB,CAAA,CAAE,KAAA,QAAa,yBAAA;AAAA,cAEpC,iCAAA,EAAiC,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAQlC,2BAAA,GAA8B,CAAA,CAAE,KAAA,QAAa,iCAAA;AAAA,cAE5C,uBAAA,EAAuB,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAkBxB,iBAAA,GAAoB,CAAA,CAAE,KAAA,QAAa,uBAAA;AAAA,cAElC,0CAAA;AAAA,iBAEG,mCAAA,CAAoC,OAAA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