@sequenceholdings/agent-spec 0.1.1 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +93 -0
- package/dist/agent-definition.d.ts +616 -0
- package/dist/agent-definition.js +240 -0
- package/dist/canonical-json.d.ts +2 -0
- package/dist/canonical-json.js +13 -0
- package/dist/index.d.ts +2 -117
- package/dist/index.js +2 -248
- package/dist/input-schema.d.ts +19 -0
- package/dist/input-schema.js +57 -0
- package/dist/voice-access.d.ts +40 -0
- package/dist/voice-access.js +34 -0
- package/dist/voice-actions-contracts.d.ts +423 -0
- package/dist/voice-actions-contracts.js +95 -0
- package/dist/voice-actions-transitions.d.ts +52 -0
- package/dist/voice-actions-transitions.js +170 -0
- package/dist/voice-actions.d.ts +2 -0
- package/dist/voice-actions.js +2 -0
- package/dist/voice-api.d.ts +1102 -0
- package/dist/voice-api.js +164 -0
- package/dist/voice-authoring.d.ts +463 -0
- package/dist/voice-authoring.js +132 -0
- package/dist/voice-authority-contracts.d.ts +247 -0
- package/dist/voice-authority-contracts.js +177 -0
- package/dist/voice-authority-evaluation.d.ts +29 -0
- package/dist/voice-authority-evaluation.js +80 -0
- package/dist/voice-authority-verification.d.ts +47 -0
- package/dist/voice-authority-verification.js +184 -0
- package/dist/voice-authority.d.ts +3 -0
- package/dist/voice-authority.js +3 -0
- package/dist/voice-common.d.ts +21 -0
- package/dist/voice-common.js +23 -0
- package/dist/voice-drafts.d.ts +441 -0
- package/dist/voice-drafts.js +75 -0
- package/dist/voice-grant.d.ts +19 -0
- package/dist/voice-grant.js +21 -0
- package/dist/voice-lifecycle-control.d.ts +130 -0
- package/dist/voice-lifecycle-control.js +138 -0
- package/dist/voice-lifecycle-session.d.ts +168 -0
- package/dist/voice-lifecycle-session.js +114 -0
- package/dist/voice-lifecycle-states.d.ts +96 -0
- package/dist/voice-lifecycle-states.js +139 -0
- package/dist/voice-lifecycle.d.ts +3 -0
- package/dist/voice-lifecycle.js +3 -0
- package/dist/voice-policy-duration.d.ts +46 -0
- package/dist/voice-policy-duration.js +166 -0
- package/dist/voice-policy-limits.d.ts +174 -0
- package/dist/voice-policy-limits.js +188 -0
- package/dist/voice-policy.d.ts +2 -0
- package/dist/voice-policy.js +2 -0
- package/dist/voice-provider-evidence.d.ts +80 -0
- package/dist/voice-provider-evidence.js +115 -0
- package/dist/voice-provider-publication.d.ts +319 -0
- package/dist/voice-provider-publication.js +117 -0
- package/dist/voice-provider-release.d.ts +386 -0
- package/dist/voice-provider-release.js +154 -0
- package/dist/voice-provider.d.ts +3 -0
- package/dist/voice-provider.js +3 -0
- package/dist/voice-release.d.ts +808 -0
- package/dist/voice-release.js +110 -0
- package/dist/voice-runs-audio.d.ts +157 -0
- package/dist/voice-runs-audio.js +85 -0
- package/dist/voice-runs-evidence.d.ts +183 -0
- package/dist/voice-runs-evidence.js +154 -0
- package/dist/voice-runs-model.d.ts +967 -0
- package/dist/voice-runs-model.js +199 -0
- package/dist/voice-runs-tooling.d.ts +88 -0
- package/dist/voice-runs-tooling.js +100 -0
- package/dist/voice-runs.d.ts +4 -0
- package/dist/voice-runs.js +4 -0
- package/dist/voice.d.ts +13 -0
- package/dist/voice.js +13 -0
- package/package.json +8 -3
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { createHash } from 'node:crypto';
|
|
3
|
+
import { canonicalJson } from './canonical-json.js';
|
|
4
|
+
import { voiceAgentDefinitionSchema } from './agent-definition.js';
|
|
5
|
+
import { isReservedVoiceVariable, voiceAgentScopeSchema, voiceHashSchema, voiceIdSchema, voiceRevisionSchema, voiceScopeSchema, voiceTimestampSchema } from './voice-common.js';
|
|
6
|
+
import { voiceDraftSchema, voiceSkillSourceStatusSchema } from './voice-drafts.js';
|
|
7
|
+
import { voicePublicationOperationSchema, voiceSessionStateSchema } from './voice-lifecycle.js';
|
|
8
|
+
import { voiceCompletionEventSchema, voiceCompletedRunDetailSchema, voiceRunWritebackStatusSchema } from './voice-runs.js';
|
|
9
|
+
import { voiceCallLimitsSchema } from './voice-policy.js';
|
|
10
|
+
import { voiceToolBindingSchema, voiceToolOperationRequirementSchema } from './voice-authority.js';
|
|
11
|
+
const toolReviewConfirmationSchema = z.strictObject({ toolAlias: voiceIdSchema, bindingHash: voiceHashSchema });
|
|
12
|
+
export const voiceErrorCodeSchema = z.enum([
|
|
13
|
+
'DENIED', 'DISABLED', 'STALE_REVISION', 'IDEMPOTENCY_CONFLICT', 'INVALID_DEFINITION',
|
|
14
|
+
'MODE_MISMATCH', 'INVALID_BINDING', 'SOURCE_MISSING', 'SOURCE_FORBIDDEN',
|
|
15
|
+
'LIMIT_REACHED', 'WAITING_FOR_IDLE', 'DEPENDENCY_MAINTENANCE', 'PROVIDER_FAILURE',
|
|
16
|
+
'UNCERTAIN_OPERATION', 'NOT_FOUND', 'INCOMPLETE_EVIDENCE',
|
|
17
|
+
]);
|
|
18
|
+
export const voiceErrorSchema = z.strictObject({
|
|
19
|
+
code: voiceErrorCodeSchema,
|
|
20
|
+
message: z.string().min(1).max(500),
|
|
21
|
+
correlationId: voiceIdSchema,
|
|
22
|
+
});
|
|
23
|
+
export const voicePublishRequestSchema = z.strictObject({
|
|
24
|
+
agentId: voiceIdSchema,
|
|
25
|
+
expectedDraftRevision: voiceRevisionSchema,
|
|
26
|
+
expectedDeploymentRevision: voiceRevisionSchema.nullable(),
|
|
27
|
+
idempotencyKey: voiceIdSchema,
|
|
28
|
+
toolReviewConfirmations: z.array(toolReviewConfirmationSchema).max(64).default([])
|
|
29
|
+
.refine((confirmations) => new Set(confirmations.map((item) => item.toolAlias)).size === confirmations.length, 'Duplicate tool review confirmation'),
|
|
30
|
+
});
|
|
31
|
+
export const voicePublicationReadRequestSchema = z.strictObject({ agentId: voiceIdSchema, operationId: voiceIdSchema });
|
|
32
|
+
export const voicePublicationResponseSchema = z.strictObject({
|
|
33
|
+
operation: voicePublicationOperationSchema,
|
|
34
|
+
activeReleaseId: voiceIdSchema.nullable(),
|
|
35
|
+
deploymentRevision: voiceRevisionSchema,
|
|
36
|
+
desiredEnabled: z.boolean(),
|
|
37
|
+
publicationPaused: z.boolean(),
|
|
38
|
+
maintenancePaused: z.boolean(),
|
|
39
|
+
sources: z.array(voiceSkillSourceStatusSchema).max(32),
|
|
40
|
+
});
|
|
41
|
+
export const voicePublishValidationRequestSchema = z.strictObject({ agentId: voiceIdSchema, expectedDraftRevision: voiceRevisionSchema });
|
|
42
|
+
export const voicePublishValidationResponseSchema = z.strictObject({
|
|
43
|
+
agentId: voiceIdSchema,
|
|
44
|
+
draftRevision: voiceRevisionSchema,
|
|
45
|
+
deploymentRevision: voiceRevisionSchema,
|
|
46
|
+
activeReleaseId: voiceIdSchema.nullable(),
|
|
47
|
+
authoredDefinitionHash: voiceHashSchema,
|
|
48
|
+
localProjectionHash: voiceHashSchema,
|
|
49
|
+
sources: z.array(voiceSkillSourceStatusSchema).max(32),
|
|
50
|
+
tools: z.array(z.strictObject({ binding: voiceToolBindingSchema, requirement: voiceToolOperationRequirementSchema,
|
|
51
|
+
bindingHash: voiceHashSchema, requiresConfirmation: z.boolean() })
|
|
52
|
+
.refine((tool) => tool.bindingHash === hashVoiceToolReviewBinding(tool), 'Tool review hash must include binding and operation policy')).max(64),
|
|
53
|
+
});
|
|
54
|
+
export function hashVoiceToolReviewBinding({ binding, requirement }) {
|
|
55
|
+
return createHash('sha256').update('sequence-voice-tool-review-v1\0')
|
|
56
|
+
.update(canonicalJson({ binding: voiceToolBindingSchema.parse(binding),
|
|
57
|
+
requirement: voiceToolOperationRequirementSchema.parse(requirement) })).digest('hex');
|
|
58
|
+
}
|
|
59
|
+
export const voiceOutboundCallRequestSchema = z.strictObject({
|
|
60
|
+
agentId: voiceIdSchema,
|
|
61
|
+
expectedActiveReleaseId: voiceIdSchema,
|
|
62
|
+
destinationId: voiceIdSchema,
|
|
63
|
+
fixtureId: voiceIdSchema,
|
|
64
|
+
idempotencyKey: voiceIdSchema,
|
|
65
|
+
});
|
|
66
|
+
export function hashVoiceOutboundRequest({ context, request }) {
|
|
67
|
+
const scope = voiceScopeSchema.parse(context.scope);
|
|
68
|
+
const actorPrincipalId = voiceIdSchema.parse(context.actorPrincipalId);
|
|
69
|
+
return createHash('sha256').update('sequence-voice-outbound-request-v1\0')
|
|
70
|
+
.update(canonicalJson({ scope, actorPrincipalId, request: voiceOutboundCallRequestSchema.parse(request) })).digest('hex');
|
|
71
|
+
}
|
|
72
|
+
export const voiceSettingsUpdateRequestSchema = z.strictObject({
|
|
73
|
+
expectedRevision: voiceRevisionSchema,
|
|
74
|
+
limits: voiceCallLimitsSchema.extend({
|
|
75
|
+
maxDailyInboundAttemptsPerNumber: voiceCallLimitsSchema.shape.maxDailyInboundAttemptsPerNumber.unwrap(),
|
|
76
|
+
maxConcurrentInboundCallsPerNumber: voiceCallLimitsSchema.shape.maxConcurrentInboundCallsPerNumber.unwrap(),
|
|
77
|
+
}),
|
|
78
|
+
});
|
|
79
|
+
export const voiceViewerUsageSchema = z.strictObject({
|
|
80
|
+
policyRevision: voiceRevisionSchema,
|
|
81
|
+
limits: voiceCallLimitsSchema,
|
|
82
|
+
utcDay: z.iso.date(),
|
|
83
|
+
resetsAt: voiceTimestampSchema,
|
|
84
|
+
activeReservations: z.number().int().nonnegative().safe(),
|
|
85
|
+
admittedAttempts: z.number().int().nonnegative().safe(),
|
|
86
|
+
personalOutboundAttempts: z.number().int().nonnegative().safe(),
|
|
87
|
+
});
|
|
88
|
+
export const voiceInboundAdmissionEvidenceSchema = voiceAgentScopeSchema.extend({
|
|
89
|
+
twilioAccountSid: voiceIdSchema,
|
|
90
|
+
twilioCallSid: voiceIdSchema,
|
|
91
|
+
ownedNumberId: voiceIdSchema,
|
|
92
|
+
routeId: voiceIdSchema,
|
|
93
|
+
routeRevision: voiceRevisionSchema,
|
|
94
|
+
checkedAt: voiceTimestampSchema,
|
|
95
|
+
currentPreAnswerIdentityVerified: z.literal(true),
|
|
96
|
+
});
|
|
97
|
+
export const voiceCallResponseSchema = z.strictObject({
|
|
98
|
+
sessionId: voiceIdSchema,
|
|
99
|
+
agentId: voiceIdSchema,
|
|
100
|
+
releaseId: voiceIdSchema,
|
|
101
|
+
revision: voiceRevisionSchema,
|
|
102
|
+
state: voiceSessionStateSchema,
|
|
103
|
+
});
|
|
104
|
+
export const voiceDispatchCallCommandSchema = voiceScopeSchema.extend({
|
|
105
|
+
sessionId: voiceIdSchema,
|
|
106
|
+
expectedRevision: voiceRevisionSchema,
|
|
107
|
+
operationId: voiceIdSchema,
|
|
108
|
+
});
|
|
109
|
+
export const voiceToolDispatchRequestSchema = z.strictObject({
|
|
110
|
+
toolAlias: z.string().regex(/^[a-z][a-z0-9_]{0,63}$/),
|
|
111
|
+
providerDeliveryId: voiceIdSchema,
|
|
112
|
+
arguments: z.record(z.string().min(1).max(64), z.json()),
|
|
113
|
+
}).superRefine((request, context) => {
|
|
114
|
+
for (const key of Object.keys(request.arguments))
|
|
115
|
+
if (isReservedVoiceVariable({ name: key })) {
|
|
116
|
+
context.addIssue({ code: 'custom', path: ['arguments', key], message: 'Reserved runtime authority field' });
|
|
117
|
+
}
|
|
118
|
+
if (JSON.stringify(request.arguments).length > 64_000) {
|
|
119
|
+
context.addIssue({ code: 'custom', path: ['arguments'], message: 'Tool arguments exceed the contract size bound' });
|
|
120
|
+
}
|
|
121
|
+
});
|
|
122
|
+
export const voiceCompletionCommandSchema = voiceScopeSchema.extend({
|
|
123
|
+
sessionId: voiceIdSchema,
|
|
124
|
+
deliveryReceiptId: voiceIdSchema,
|
|
125
|
+
deliveryBodyHash: voiceHashSchema,
|
|
126
|
+
event: voiceCompletionEventSchema,
|
|
127
|
+
}).refine((command) => command.event.logicalIdentity.sessionId === command.sessionId, { path: ['event', 'logicalIdentity', 'sessionId'], message: 'Completion must refer to the known session' });
|
|
128
|
+
export const voiceCompletionResponseSchema = z.strictObject({
|
|
129
|
+
sessionId: voiceIdSchema,
|
|
130
|
+
runId: voiceIdSchema,
|
|
131
|
+
completionEventId: voiceIdSchema,
|
|
132
|
+
duplicate: z.boolean(),
|
|
133
|
+
writebackStatus: voiceRunWritebackStatusSchema,
|
|
134
|
+
});
|
|
135
|
+
export const voiceAgentControlRequestSchema = z.strictObject({
|
|
136
|
+
agentId: voiceIdSchema,
|
|
137
|
+
expectedRevision: voiceRevisionSchema,
|
|
138
|
+
action: z.enum(['ENABLE', 'CLOSE_ADMISSION', 'KILL']),
|
|
139
|
+
idempotencyKey: voiceIdSchema,
|
|
140
|
+
});
|
|
141
|
+
export const voiceAgentDisableRequestSchema = voiceAgentControlRequestSchema.pick({ agentId: true, expectedRevision: true });
|
|
142
|
+
export const voiceAgentDisableResponseSchema = z.strictObject({
|
|
143
|
+
agentId: voiceIdSchema, revision: voiceRevisionSchema, desiredEnabled: z.literal(false),
|
|
144
|
+
activeReleaseId: voiceIdSchema.nullable(), publicationPaused: z.boolean(), maintenancePaused: z.boolean(),
|
|
145
|
+
});
|
|
146
|
+
export const voiceEnvironmentControlRequestSchema = z.strictObject({
|
|
147
|
+
expectedRevision: voiceRevisionSchema,
|
|
148
|
+
action: z.enum(['ENABLE', 'CLOSE_ADMISSION', 'KILL']),
|
|
149
|
+
idempotencyKey: voiceIdSchema,
|
|
150
|
+
});
|
|
151
|
+
export const voiceCallCancelRequestSchema = z.strictObject({
|
|
152
|
+
sessionId: voiceIdSchema, expectedRevision: voiceRevisionSchema, idempotencyKey: voiceIdSchema,
|
|
153
|
+
});
|
|
154
|
+
export const voiceInboundRouteUpdateRequestSchema = z.strictObject({
|
|
155
|
+
ownedNumberId: voiceIdSchema, agentId: voiceIdSchema,
|
|
156
|
+
expectedRevision: voiceRevisionSchema.nullable(), enabled: z.boolean(),
|
|
157
|
+
});
|
|
158
|
+
export const voiceDependencyMaintenanceRequestSchema = z.strictObject({
|
|
159
|
+
managedFunctionId: voiceIdSchema, expectedRevision: voiceRevisionSchema.nullable(),
|
|
160
|
+
action: z.enum(['BEGIN', 'END']), idempotencyKey: voiceIdSchema,
|
|
161
|
+
});
|
|
162
|
+
export const voiceDraftReadResponseSchema = voiceDraftSchema;
|
|
163
|
+
export const voiceDefinitionExportResponseSchema = voiceAgentDefinitionSchema;
|
|
164
|
+
export const voiceRunReadResponseSchema = voiceCompletedRunDetailSchema;
|
|
@@ -0,0 +1,463 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare function hashVoiceSkillContent({ name, instructions }: {
|
|
3
|
+
name: string;
|
|
4
|
+
instructions: string;
|
|
5
|
+
}): string;
|
|
6
|
+
export declare const capturedVoiceProcedureSchema: z.ZodPipe<z.ZodObject<{
|
|
7
|
+
key: z.ZodString;
|
|
8
|
+
name: z.ZodString;
|
|
9
|
+
instructions: z.ZodString;
|
|
10
|
+
activationDescription: z.ZodString;
|
|
11
|
+
source: z.ZodObject<{
|
|
12
|
+
skillId: z.ZodString;
|
|
13
|
+
contentHash: z.ZodOptional<z.ZodString>;
|
|
14
|
+
}, z.core.$strict>;
|
|
15
|
+
toolAliases: z.ZodDefault<z.ZodPipe<z.ZodArray<z.ZodString>, z.ZodTransform<string[], string[]>>>;
|
|
16
|
+
subprocedures: z.ZodDefault<z.ZodPipe<z.ZodArray<z.ZodString>, z.ZodTransform<string[], string[]>>>;
|
|
17
|
+
}, z.core.$strict>, z.ZodTransform<{
|
|
18
|
+
source: {
|
|
19
|
+
skillId: string;
|
|
20
|
+
contentHash: string;
|
|
21
|
+
};
|
|
22
|
+
key: string;
|
|
23
|
+
name: string;
|
|
24
|
+
instructions: string;
|
|
25
|
+
activationDescription: string;
|
|
26
|
+
toolAliases: string[];
|
|
27
|
+
subprocedures: string[];
|
|
28
|
+
}, {
|
|
29
|
+
key: string;
|
|
30
|
+
name: string;
|
|
31
|
+
instructions: string;
|
|
32
|
+
activationDescription: string;
|
|
33
|
+
source: {
|
|
34
|
+
skillId: string;
|
|
35
|
+
contentHash?: string | undefined;
|
|
36
|
+
};
|
|
37
|
+
toolAliases: string[];
|
|
38
|
+
subprocedures: string[];
|
|
39
|
+
}>>;
|
|
40
|
+
export type CapturedVoiceProcedure = z.infer<typeof capturedVoiceProcedureSchema>;
|
|
41
|
+
export declare const voiceAuthoredToolSchema: z.ZodPipe<z.ZodObject<{
|
|
42
|
+
alias: z.ZodString;
|
|
43
|
+
description: z.ZodString;
|
|
44
|
+
managedFunction: z.ZodObject<{
|
|
45
|
+
ref: z.ZodString;
|
|
46
|
+
operation: z.ZodString;
|
|
47
|
+
}, z.core.$strict>;
|
|
48
|
+
inputMappings: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
49
|
+
argument: z.ZodString;
|
|
50
|
+
parameter: z.ZodString;
|
|
51
|
+
}, z.core.$strict>>>;
|
|
52
|
+
outputMappings: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
53
|
+
field: z.ZodString;
|
|
54
|
+
result: z.ZodString;
|
|
55
|
+
}, z.core.$strict>>>;
|
|
56
|
+
}, z.core.$strict>, z.ZodTransform<{
|
|
57
|
+
inputMappings: {
|
|
58
|
+
argument: string;
|
|
59
|
+
parameter: string;
|
|
60
|
+
}[];
|
|
61
|
+
outputMappings: {
|
|
62
|
+
field: string;
|
|
63
|
+
result: string;
|
|
64
|
+
}[];
|
|
65
|
+
alias: string;
|
|
66
|
+
description: string;
|
|
67
|
+
managedFunction: {
|
|
68
|
+
ref: string;
|
|
69
|
+
operation: string;
|
|
70
|
+
};
|
|
71
|
+
}, {
|
|
72
|
+
alias: string;
|
|
73
|
+
description: string;
|
|
74
|
+
managedFunction: {
|
|
75
|
+
ref: string;
|
|
76
|
+
operation: string;
|
|
77
|
+
};
|
|
78
|
+
inputMappings: {
|
|
79
|
+
argument: string;
|
|
80
|
+
parameter: string;
|
|
81
|
+
}[];
|
|
82
|
+
outputMappings: {
|
|
83
|
+
field: string;
|
|
84
|
+
result: string;
|
|
85
|
+
}[];
|
|
86
|
+
}>>;
|
|
87
|
+
export type VoiceAuthoredTool = z.infer<typeof voiceAuthoredToolSchema>;
|
|
88
|
+
export declare const voiceDeclarationSchema: z.ZodPipe<z.ZodObject<{
|
|
89
|
+
schemaVersion: z.ZodLiteral<"1">;
|
|
90
|
+
voice: z.ZodString;
|
|
91
|
+
language: z.ZodString;
|
|
92
|
+
firstMessage: z.ZodString;
|
|
93
|
+
procedures: z.ZodDefault<z.ZodArray<z.ZodPipe<z.ZodObject<{
|
|
94
|
+
key: z.ZodString;
|
|
95
|
+
name: z.ZodString;
|
|
96
|
+
instructions: z.ZodString;
|
|
97
|
+
activationDescription: z.ZodString;
|
|
98
|
+
source: z.ZodObject<{
|
|
99
|
+
skillId: z.ZodString;
|
|
100
|
+
contentHash: z.ZodOptional<z.ZodString>;
|
|
101
|
+
}, z.core.$strict>;
|
|
102
|
+
toolAliases: z.ZodDefault<z.ZodPipe<z.ZodArray<z.ZodString>, z.ZodTransform<string[], string[]>>>;
|
|
103
|
+
subprocedures: z.ZodDefault<z.ZodPipe<z.ZodArray<z.ZodString>, z.ZodTransform<string[], string[]>>>;
|
|
104
|
+
}, z.core.$strict>, z.ZodTransform<{
|
|
105
|
+
source: {
|
|
106
|
+
skillId: string;
|
|
107
|
+
contentHash: string;
|
|
108
|
+
};
|
|
109
|
+
key: string;
|
|
110
|
+
name: string;
|
|
111
|
+
instructions: string;
|
|
112
|
+
activationDescription: string;
|
|
113
|
+
toolAliases: string[];
|
|
114
|
+
subprocedures: string[];
|
|
115
|
+
}, {
|
|
116
|
+
key: string;
|
|
117
|
+
name: string;
|
|
118
|
+
instructions: string;
|
|
119
|
+
activationDescription: string;
|
|
120
|
+
source: {
|
|
121
|
+
skillId: string;
|
|
122
|
+
contentHash?: string | undefined;
|
|
123
|
+
};
|
|
124
|
+
toolAliases: string[];
|
|
125
|
+
subprocedures: string[];
|
|
126
|
+
}>>>>;
|
|
127
|
+
tools: z.ZodDefault<z.ZodArray<z.ZodPipe<z.ZodObject<{
|
|
128
|
+
alias: z.ZodString;
|
|
129
|
+
description: z.ZodString;
|
|
130
|
+
managedFunction: z.ZodObject<{
|
|
131
|
+
ref: z.ZodString;
|
|
132
|
+
operation: z.ZodString;
|
|
133
|
+
}, z.core.$strict>;
|
|
134
|
+
inputMappings: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
135
|
+
argument: z.ZodString;
|
|
136
|
+
parameter: z.ZodString;
|
|
137
|
+
}, z.core.$strict>>>;
|
|
138
|
+
outputMappings: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
139
|
+
field: z.ZodString;
|
|
140
|
+
result: z.ZodString;
|
|
141
|
+
}, z.core.$strict>>>;
|
|
142
|
+
}, z.core.$strict>, z.ZodTransform<{
|
|
143
|
+
inputMappings: {
|
|
144
|
+
argument: string;
|
|
145
|
+
parameter: string;
|
|
146
|
+
}[];
|
|
147
|
+
outputMappings: {
|
|
148
|
+
field: string;
|
|
149
|
+
result: string;
|
|
150
|
+
}[];
|
|
151
|
+
alias: string;
|
|
152
|
+
description: string;
|
|
153
|
+
managedFunction: {
|
|
154
|
+
ref: string;
|
|
155
|
+
operation: string;
|
|
156
|
+
};
|
|
157
|
+
}, {
|
|
158
|
+
alias: string;
|
|
159
|
+
description: string;
|
|
160
|
+
managedFunction: {
|
|
161
|
+
ref: string;
|
|
162
|
+
operation: string;
|
|
163
|
+
};
|
|
164
|
+
inputMappings: {
|
|
165
|
+
argument: string;
|
|
166
|
+
parameter: string;
|
|
167
|
+
}[];
|
|
168
|
+
outputMappings: {
|
|
169
|
+
field: string;
|
|
170
|
+
result: string;
|
|
171
|
+
}[];
|
|
172
|
+
}>>>>;
|
|
173
|
+
}, z.core.$strict>, z.ZodTransform<{
|
|
174
|
+
procedures: {
|
|
175
|
+
source: {
|
|
176
|
+
skillId: string;
|
|
177
|
+
contentHash: string;
|
|
178
|
+
};
|
|
179
|
+
key: string;
|
|
180
|
+
name: string;
|
|
181
|
+
instructions: string;
|
|
182
|
+
activationDescription: string;
|
|
183
|
+
toolAliases: string[];
|
|
184
|
+
subprocedures: string[];
|
|
185
|
+
}[];
|
|
186
|
+
tools: {
|
|
187
|
+
inputMappings: {
|
|
188
|
+
argument: string;
|
|
189
|
+
parameter: string;
|
|
190
|
+
}[];
|
|
191
|
+
outputMappings: {
|
|
192
|
+
field: string;
|
|
193
|
+
result: string;
|
|
194
|
+
}[];
|
|
195
|
+
alias: string;
|
|
196
|
+
description: string;
|
|
197
|
+
managedFunction: {
|
|
198
|
+
ref: string;
|
|
199
|
+
operation: string;
|
|
200
|
+
};
|
|
201
|
+
}[];
|
|
202
|
+
schemaVersion: "1";
|
|
203
|
+
voice: string;
|
|
204
|
+
language: string;
|
|
205
|
+
firstMessage: string;
|
|
206
|
+
}, {
|
|
207
|
+
schemaVersion: "1";
|
|
208
|
+
voice: string;
|
|
209
|
+
language: string;
|
|
210
|
+
firstMessage: string;
|
|
211
|
+
procedures: {
|
|
212
|
+
source: {
|
|
213
|
+
skillId: string;
|
|
214
|
+
contentHash: string;
|
|
215
|
+
};
|
|
216
|
+
key: string;
|
|
217
|
+
name: string;
|
|
218
|
+
instructions: string;
|
|
219
|
+
activationDescription: string;
|
|
220
|
+
toolAliases: string[];
|
|
221
|
+
subprocedures: string[];
|
|
222
|
+
}[];
|
|
223
|
+
tools: {
|
|
224
|
+
inputMappings: {
|
|
225
|
+
argument: string;
|
|
226
|
+
parameter: string;
|
|
227
|
+
}[];
|
|
228
|
+
outputMappings: {
|
|
229
|
+
field: string;
|
|
230
|
+
result: string;
|
|
231
|
+
}[];
|
|
232
|
+
alias: string;
|
|
233
|
+
description: string;
|
|
234
|
+
managedFunction: {
|
|
235
|
+
ref: string;
|
|
236
|
+
operation: string;
|
|
237
|
+
};
|
|
238
|
+
}[];
|
|
239
|
+
}>>;
|
|
240
|
+
export type VoiceDeclaration = z.infer<typeof voiceDeclarationSchema>;
|
|
241
|
+
export type VoiceDeclarationInput = z.input<typeof voiceDeclarationSchema>;
|
|
242
|
+
export declare const voiceSupportedAuthoringOptionsSchema: z.ZodObject<{
|
|
243
|
+
voices: z.ZodArray<z.ZodString>;
|
|
244
|
+
languages: z.ZodArray<z.ZodString>;
|
|
245
|
+
models: z.ZodArray<z.ZodObject<{
|
|
246
|
+
provider: z.ZodString;
|
|
247
|
+
name: z.ZodString;
|
|
248
|
+
}, z.core.$strict>>;
|
|
249
|
+
}, z.core.$strict>;
|
|
250
|
+
export type VoiceSupportedAuthoringOptions = z.infer<typeof voiceSupportedAuthoringOptionsSchema>;
|
|
251
|
+
export declare function validateVoiceAuthoringOptions({ voice, model, supported }: {
|
|
252
|
+
voice: VoiceDeclaration;
|
|
253
|
+
model: {
|
|
254
|
+
provider: string;
|
|
255
|
+
name: string;
|
|
256
|
+
};
|
|
257
|
+
supported: VoiceSupportedAuthoringOptions;
|
|
258
|
+
}): void;
|
|
259
|
+
export declare const VOICE_LOCAL_PROJECTION_VERSION = "voice-free-form-v1";
|
|
260
|
+
export declare const voiceProjectionInputSchema: z.ZodObject<{
|
|
261
|
+
systemPrompt: z.ZodString;
|
|
262
|
+
model: z.ZodObject<{
|
|
263
|
+
provider: z.ZodString;
|
|
264
|
+
name: z.ZodString;
|
|
265
|
+
}, z.core.$strict>;
|
|
266
|
+
voice: z.ZodPipe<z.ZodObject<{
|
|
267
|
+
schemaVersion: z.ZodLiteral<"1">;
|
|
268
|
+
voice: z.ZodString;
|
|
269
|
+
language: z.ZodString;
|
|
270
|
+
firstMessage: z.ZodString;
|
|
271
|
+
procedures: z.ZodDefault<z.ZodArray<z.ZodPipe<z.ZodObject<{
|
|
272
|
+
key: z.ZodString;
|
|
273
|
+
name: z.ZodString;
|
|
274
|
+
instructions: z.ZodString;
|
|
275
|
+
activationDescription: z.ZodString;
|
|
276
|
+
source: z.ZodObject<{
|
|
277
|
+
skillId: z.ZodString;
|
|
278
|
+
contentHash: z.ZodOptional<z.ZodString>;
|
|
279
|
+
}, z.core.$strict>;
|
|
280
|
+
toolAliases: z.ZodDefault<z.ZodPipe<z.ZodArray<z.ZodString>, z.ZodTransform<string[], string[]>>>;
|
|
281
|
+
subprocedures: z.ZodDefault<z.ZodPipe<z.ZodArray<z.ZodString>, z.ZodTransform<string[], string[]>>>;
|
|
282
|
+
}, z.core.$strict>, z.ZodTransform<{
|
|
283
|
+
source: {
|
|
284
|
+
skillId: string;
|
|
285
|
+
contentHash: string;
|
|
286
|
+
};
|
|
287
|
+
key: string;
|
|
288
|
+
name: string;
|
|
289
|
+
instructions: string;
|
|
290
|
+
activationDescription: string;
|
|
291
|
+
toolAliases: string[];
|
|
292
|
+
subprocedures: string[];
|
|
293
|
+
}, {
|
|
294
|
+
key: string;
|
|
295
|
+
name: string;
|
|
296
|
+
instructions: string;
|
|
297
|
+
activationDescription: string;
|
|
298
|
+
source: {
|
|
299
|
+
skillId: string;
|
|
300
|
+
contentHash?: string | undefined;
|
|
301
|
+
};
|
|
302
|
+
toolAliases: string[];
|
|
303
|
+
subprocedures: string[];
|
|
304
|
+
}>>>>;
|
|
305
|
+
tools: z.ZodDefault<z.ZodArray<z.ZodPipe<z.ZodObject<{
|
|
306
|
+
alias: z.ZodString;
|
|
307
|
+
description: z.ZodString;
|
|
308
|
+
managedFunction: z.ZodObject<{
|
|
309
|
+
ref: z.ZodString;
|
|
310
|
+
operation: z.ZodString;
|
|
311
|
+
}, z.core.$strict>;
|
|
312
|
+
inputMappings: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
313
|
+
argument: z.ZodString;
|
|
314
|
+
parameter: z.ZodString;
|
|
315
|
+
}, z.core.$strict>>>;
|
|
316
|
+
outputMappings: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
317
|
+
field: z.ZodString;
|
|
318
|
+
result: z.ZodString;
|
|
319
|
+
}, z.core.$strict>>>;
|
|
320
|
+
}, z.core.$strict>, z.ZodTransform<{
|
|
321
|
+
inputMappings: {
|
|
322
|
+
argument: string;
|
|
323
|
+
parameter: string;
|
|
324
|
+
}[];
|
|
325
|
+
outputMappings: {
|
|
326
|
+
field: string;
|
|
327
|
+
result: string;
|
|
328
|
+
}[];
|
|
329
|
+
alias: string;
|
|
330
|
+
description: string;
|
|
331
|
+
managedFunction: {
|
|
332
|
+
ref: string;
|
|
333
|
+
operation: string;
|
|
334
|
+
};
|
|
335
|
+
}, {
|
|
336
|
+
alias: string;
|
|
337
|
+
description: string;
|
|
338
|
+
managedFunction: {
|
|
339
|
+
ref: string;
|
|
340
|
+
operation: string;
|
|
341
|
+
};
|
|
342
|
+
inputMappings: {
|
|
343
|
+
argument: string;
|
|
344
|
+
parameter: string;
|
|
345
|
+
}[];
|
|
346
|
+
outputMappings: {
|
|
347
|
+
field: string;
|
|
348
|
+
result: string;
|
|
349
|
+
}[];
|
|
350
|
+
}>>>>;
|
|
351
|
+
}, z.core.$strict>, z.ZodTransform<{
|
|
352
|
+
procedures: {
|
|
353
|
+
source: {
|
|
354
|
+
skillId: string;
|
|
355
|
+
contentHash: string;
|
|
356
|
+
};
|
|
357
|
+
key: string;
|
|
358
|
+
name: string;
|
|
359
|
+
instructions: string;
|
|
360
|
+
activationDescription: string;
|
|
361
|
+
toolAliases: string[];
|
|
362
|
+
subprocedures: string[];
|
|
363
|
+
}[];
|
|
364
|
+
tools: {
|
|
365
|
+
inputMappings: {
|
|
366
|
+
argument: string;
|
|
367
|
+
parameter: string;
|
|
368
|
+
}[];
|
|
369
|
+
outputMappings: {
|
|
370
|
+
field: string;
|
|
371
|
+
result: string;
|
|
372
|
+
}[];
|
|
373
|
+
alias: string;
|
|
374
|
+
description: string;
|
|
375
|
+
managedFunction: {
|
|
376
|
+
ref: string;
|
|
377
|
+
operation: string;
|
|
378
|
+
};
|
|
379
|
+
}[];
|
|
380
|
+
schemaVersion: "1";
|
|
381
|
+
voice: string;
|
|
382
|
+
language: string;
|
|
383
|
+
firstMessage: string;
|
|
384
|
+
}, {
|
|
385
|
+
schemaVersion: "1";
|
|
386
|
+
voice: string;
|
|
387
|
+
language: string;
|
|
388
|
+
firstMessage: string;
|
|
389
|
+
procedures: {
|
|
390
|
+
source: {
|
|
391
|
+
skillId: string;
|
|
392
|
+
contentHash: string;
|
|
393
|
+
};
|
|
394
|
+
key: string;
|
|
395
|
+
name: string;
|
|
396
|
+
instructions: string;
|
|
397
|
+
activationDescription: string;
|
|
398
|
+
toolAliases: string[];
|
|
399
|
+
subprocedures: string[];
|
|
400
|
+
}[];
|
|
401
|
+
tools: {
|
|
402
|
+
inputMappings: {
|
|
403
|
+
argument: string;
|
|
404
|
+
parameter: string;
|
|
405
|
+
}[];
|
|
406
|
+
outputMappings: {
|
|
407
|
+
field: string;
|
|
408
|
+
result: string;
|
|
409
|
+
}[];
|
|
410
|
+
alias: string;
|
|
411
|
+
description: string;
|
|
412
|
+
managedFunction: {
|
|
413
|
+
ref: string;
|
|
414
|
+
operation: string;
|
|
415
|
+
};
|
|
416
|
+
}[];
|
|
417
|
+
}>>;
|
|
418
|
+
}, z.core.$strict>;
|
|
419
|
+
export type VoiceProjectionInput = z.infer<typeof voiceProjectionInputSchema>;
|
|
420
|
+
export declare function projectVoiceAuthoring(input: VoiceProjectionInput): {
|
|
421
|
+
digest: string;
|
|
422
|
+
systemPrompt: string;
|
|
423
|
+
model: {
|
|
424
|
+
provider: string;
|
|
425
|
+
name: string;
|
|
426
|
+
};
|
|
427
|
+
voice: {
|
|
428
|
+
procedures: {
|
|
429
|
+
source: {
|
|
430
|
+
skillId: string;
|
|
431
|
+
contentHash: string;
|
|
432
|
+
};
|
|
433
|
+
key: string;
|
|
434
|
+
name: string;
|
|
435
|
+
instructions: string;
|
|
436
|
+
activationDescription: string;
|
|
437
|
+
toolAliases: string[];
|
|
438
|
+
subprocedures: string[];
|
|
439
|
+
}[];
|
|
440
|
+
tools: {
|
|
441
|
+
inputMappings: {
|
|
442
|
+
argument: string;
|
|
443
|
+
parameter: string;
|
|
444
|
+
}[];
|
|
445
|
+
outputMappings: {
|
|
446
|
+
field: string;
|
|
447
|
+
result: string;
|
|
448
|
+
}[];
|
|
449
|
+
alias: string;
|
|
450
|
+
description: string;
|
|
451
|
+
managedFunction: {
|
|
452
|
+
ref: string;
|
|
453
|
+
operation: string;
|
|
454
|
+
};
|
|
455
|
+
}[];
|
|
456
|
+
schemaVersion: "1";
|
|
457
|
+
voice: string;
|
|
458
|
+
language: string;
|
|
459
|
+
firstMessage: string;
|
|
460
|
+
};
|
|
461
|
+
compilerVersion: string;
|
|
462
|
+
};
|
|
463
|
+
export type VoiceLocalProjection = ReturnType<typeof projectVoiceAuthoring>;
|