@shipfox/api-agent-access-dto 21.0.0 → 21.2.0
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/.turbo/turbo-build.log +1 -1
- package/.turbo/turbo-type.log +0 -1
- package/CHANGELOG.md +19 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -1
- package/dist/schemas/diagnostic-tools.d.ts +3 -1
- package/dist/schemas/diagnostic-tools.d.ts.map +1 -1
- package/dist/schemas/diagnostic-tools.js +7 -8
- package/dist/schemas/diagnostic-tools.js.map +1 -1
- package/dist/schemas/log-tools.d.ts +215 -0
- package/dist/schemas/log-tools.d.ts.map +1 -0
- package/dist/schemas/log-tools.js +224 -0
- package/dist/schemas/log-tools.js.map +1 -0
- package/dist/schemas/paged-tools.d.ts.map +1 -1
- package/dist/schemas/paged-tools.js +1 -6
- package/dist/schemas/paged-tools.js.map +1 -1
- package/dist/schemas/primitives.d.ts +5 -0
- package/dist/schemas/primitives.d.ts.map +1 -0
- package/dist/schemas/primitives.js +9 -0
- package/dist/schemas/primitives.js.map +1 -0
- package/dist/schemas/workflow-diagnostics.d.ts +862 -0
- package/dist/schemas/workflow-diagnostics.d.ts.map +1 -0
- package/dist/schemas/workflow-diagnostics.js +876 -0
- package/dist/schemas/workflow-diagnostics.js.map +1 -0
- package/dist/schemas/workflow-execution-events.d.ts +272 -0
- package/dist/schemas/workflow-execution-events.d.ts.map +1 -0
- package/dist/schemas/workflow-execution-events.js +250 -0
- package/dist/schemas/workflow-execution-events.js.map +1 -0
- package/dist/schemas/workflow-tools.d.ts +1305 -0
- package/dist/schemas/workflow-tools.d.ts.map +1 -0
- package/dist/schemas/workflow-tools.js +938 -0
- package/dist/schemas/workflow-tools.js.map +1 -0
- package/dist/tsconfig.test.tsbuildinfo +1 -1
- package/package.json +3 -2
- package/src/index.ts +113 -0
- package/src/schemas/diagnostic-tools.test.ts +43 -0
- package/src/schemas/diagnostic-tools.ts +12 -14
- package/src/schemas/log-tools.ts +209 -0
- package/src/schemas/paged-tools.ts +1 -10
- package/src/schemas/primitives.ts +14 -0
- package/src/schemas/workflow-diagnostics.test.ts +277 -0
- package/src/schemas/workflow-diagnostics.ts +693 -0
- package/src/schemas/workflow-execution-events.test.ts +126 -0
- package/src/schemas/workflow-execution-events.ts +217 -0
- package/src/schemas/workflow-tools.test.ts +202 -0
- package/src/schemas/workflow-tools.ts +738 -0
- package/tsconfig.build.tsbuildinfo +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/schemas/workflow-diagnostics.ts"],"sourcesContent":["import {z} from 'zod';\nimport type {AgentAccessObjectSchema} from './envelope.js';\nimport {AGENT_ACCESS_PAGE_LIMIT_MAX, AGENT_ACCESS_TEXT_MAX_BYTES} from './paged-tools.js';\nimport {dateTimeSchema, idSchema, utf8CappedString} from './primitives.js';\nimport {AGENT_ACCESS_WORKFLOW_ATTEMPT_MAX} from './workflow-tools.js';\n\n/** Smaller per-value allowance used by Agent Access before the common response ceiling. */\nexport const AGENT_ACCESS_WORKFLOW_DIAGNOSTIC_VALUE_MAX_BYTES = 16 * 1024;\n\n/** Source is text, but it still needs enough room to be useful in a diagnostic response. */\nexport const AGENT_ACCESS_WORKFLOW_SOURCE_MAX_BYTES =\n AGENT_ACCESS_WORKFLOW_DIAGNOSTIC_VALUE_MAX_BYTES;\n\nconst textSchema = utf8CappedString(AGENT_ACCESS_TEXT_MAX_BYTES);\nconst sourceTextSchema = utf8CappedString(AGENT_ACCESS_WORKFLOW_SOURCE_MAX_BYTES);\nconst attemptSchema = z.number().int().min(1).max(AGENT_ACCESS_WORKFLOW_ATTEMPT_MAX);\n\nconst diagnosticFields = [\n 'authored_config',\n 'config',\n 'evaluation_trace',\n 'output',\n 'outputs',\n 'response',\n 'error',\n 'gate_result',\n 'restart_feedback',\n 'job_outputs',\n 'execution_outputs',\n 'job_evaluation_trace',\n 'execution_evaluation_trace',\n 'condition',\n 'trigger_events',\n] as const;\n\nexport const agentAccessWorkflowDiagnosticFieldSchema = z.enum(diagnosticFields);\nexport type AgentAccessWorkflowDiagnosticFieldDto = z.infer<\n typeof agentAccessWorkflowDiagnosticFieldSchema\n>;\n\nconst oversizedReasonSchema = z.enum([\n 'legacy_value_exceeds_inline_limit',\n 'value_exceeds_inline_limit',\n 'value_truncated_at_write_limit',\n]);\n\nexport const agentAccessOversizedFieldSchema = z\n .object({\n field: agentAccessWorkflowDiagnosticFieldSchema,\n stored_bytes: z.number().int().nonnegative(),\n reason: oversizedReasonSchema,\n })\n .strict();\n\nexport type AgentAccessOversizedFieldDto = z.infer<typeof agentAccessOversizedFieldSchema>;\n\nconst stepErrorReasons = [\n 'checkout_failed',\n 'checkout_auth_failed',\n 'checkout_unavailable',\n 'checkout_path_invalid',\n 'checkout_destination_occupied',\n 'git_unavailable',\n 'workspace_prep_failed',\n 'setup_aborted',\n 'config_unresolvable',\n 'output_invalid',\n 'agent_config_invalid',\n 'agent_invocation_failed',\n 'agent_harness_unavailable',\n 'agent_inference_credentials_unavailable',\n 'agent_session_key_invalid',\n 'agent_session_held',\n 'agent_session_harness_mismatch',\n 'agent_session_unavailable',\n 'execution_payload_too_large',\n 'step_result_too_large',\n 'diagnostic_too_large',\n 'tool_error',\n 'tool_config_invalid',\n 'invocation_interrupted',\n] as const;\n\nconst agentConfigIssues = [\n 'step_config_invalid',\n 'provider_not_configured',\n 'provider_unsupported',\n 'model_unavailable',\n 'credentials_invalid',\n] as const;\n\nconst errorCategories = ['setup', 'user'] as const;\nconst gateKinds = [\n 'none',\n 'not_evaluated',\n 'passed',\n 'failed',\n 'uncheckable',\n 'evaluation_error',\n 'unknown',\n] as const;\nconst sourceUnavailableReasons = [\n 'temporary_run',\n 'pre_snapshot_run',\n 'legacy_snapshot_too_large',\n] as const;\nconst explanationStatuses = ['failed', 'skipped'] as const;\n\nconst evaluationTraceValueSchema = z\n .object({\n expression: textSchema,\n roots: z.array(textSchema),\n fill_target: textSchema,\n evaluated_at: textSchema,\n field: textSchema,\n value: textSchema.optional(),\n truncated: z.boolean().optional(),\n expr_truncated: z.boolean().optional(),\n reference: z.boolean().optional(),\n degraded: z.boolean().optional(),\n env_key: textSchema.optional(),\n })\n .strict();\n\nconst evaluationTraceLimitSchema = z\n .object({\n truncated: z.literal(true),\n dropped: z.number().int().nonnegative(),\n })\n .strict();\n\nconst evaluationTraceSchema = z.array(\n z.union([evaluationTraceValueSchema, evaluationTraceLimitSchema]),\n);\n\nconst workflowExecutionEventSchema = z\n .object({\n source: textSchema,\n event: textSchema,\n delivery_id: textSchema,\n received_at: dateTimeSchema,\n project: z.object({id: idSchema}).strict().nullable(),\n repository: textSchema.nullable(),\n ref: textSchema.nullable(),\n commit: textSchema.nullable(),\n data: z.unknown(),\n })\n .strict();\n\nconst stepErrorSchema = z\n .object({\n message: textSchema,\n code: textSchema.optional(),\n managed_provider_id: textSchema.optional(),\n exit_code: z.number().int().nullable().optional(),\n signal: textSchema.optional(),\n reason: z.enum(stepErrorReasons).optional(),\n field: textSchema.optional(),\n source: textSchema.optional(),\n agent_config_issue: z.enum(agentConfigIssues).optional(),\n category: z.enum(errorCategories).optional(),\n retryable: z.boolean().optional(),\n limit_bytes: z.number().int().positive().optional(),\n measured_bytes: z.number().int().positive().optional(),\n overshoot_bytes: z.number().int().positive().optional(),\n })\n .strict()\n .nullable();\n\nconst gateResultSchema = z\n .object({\n kind: z.enum(gateKinds),\n passed: z.boolean().optional(),\n source: textSchema.optional(),\n exit_code: z.number().int().nullable().optional(),\n uncheckable: z.boolean().optional(),\n reason: textSchema.optional(),\n data: z.unknown().optional(),\n })\n .strict()\n .nullable();\n\nconst sessionSchema = z\n .object({\n id: idSchema,\n key: textSchema,\n mode: z.enum(['resume', 'fork']),\n segment: z.number().int().nonnegative(),\n })\n .strict()\n .nullable();\n\nconst invocationSchema = z\n .object({\n call_index: z.number().int().nonnegative(),\n started_at: textSchema,\n finished_at: textSchema.optional(),\n outcome: textSchema.optional(),\n error_code: textSchema.optional(),\n duration_ms: z.number().int().nonnegative().optional(),\n next_due_at: textSchema.optional(),\n })\n .strict();\n\nexport const getWorkflowRunSourceInputSchema = z\n .object({run_id: idSchema, attempt: attemptSchema})\n .strict();\n\nexport const getWorkflowExecutionContextInputSchema = z\n .object({job_id: idSchema, execution_id: idSchema})\n .strict();\n\nexport const getStepAttemptInputSchema = z\n .object({step_id: idSchema, attempt: attemptSchema.optional()})\n .strict();\n\nexport const listWorkflowRunJobExplanationsInputSchema = z\n .object({\n run_id: idSchema,\n attempt: attemptSchema,\n limit: z.number().int().min(1).max(AGENT_ACCESS_PAGE_LIMIT_MAX).default(100),\n cursor: z.string().min(1).optional(),\n })\n .strict();\n\nexport type GetWorkflowRunSourceInputDto = z.output<typeof getWorkflowRunSourceInputSchema>;\nexport type GetWorkflowExecutionContextInputDto = z.output<\n typeof getWorkflowExecutionContextInputSchema\n>;\nexport type GetStepAttemptInputDto = z.output<typeof getStepAttemptInputSchema>;\nexport type ListWorkflowRunJobExplanationsInputDto = z.output<\n typeof listWorkflowRunJobExplanationsInputSchema\n>;\n\nconst sourceSnapshotSchema = z\n .object({content: sourceTextSchema, format: z.literal('yaml')})\n .strict();\n\nexport const getWorkflowRunSourceResultSchema = z.discriminatedUnion('kind', [\n z\n .object({\n kind: z.literal('available'),\n workflow_run_id: idSchema,\n workflow_run_attempt: attemptSchema,\n source_snapshot: sourceSnapshotSchema,\n source_snapshot_truncated: z.literal(true).optional(),\n source_snapshot_total_bytes: z.number().int().nonnegative().optional(),\n })\n .strict(),\n z\n .object({\n kind: z.literal('unavailable'),\n workflow_run_id: idSchema,\n workflow_run_attempt: attemptSchema,\n reason: z.enum(sourceUnavailableReasons),\n })\n .strict(),\n]);\n\nexport type GetWorkflowRunSourceResultDto = z.infer<typeof getWorkflowRunSourceResultSchema>;\n\nexport const getWorkflowExecutionContextResultSchema = z\n .object({\n workflow_run_id: idSchema,\n workflow_run_attempt: attemptSchema,\n job_id: idSchema,\n job_execution_id: idSchema,\n job_runner: z.array(textSchema).nullable(),\n execution_runner: z.array(textSchema).nullable(),\n job_outputs: z.unknown().nullable(),\n execution_outputs: z.unknown().nullable(),\n trigger_events: z.array(workflowExecutionEventSchema).max(AGENT_ACCESS_PAGE_LIMIT_MAX),\n trigger_events_truncated: z.literal(true).optional(),\n trigger_events_total_count: z.number().int().nonnegative().optional(),\n job_evaluation_trace: evaluationTraceSchema.nullable(),\n execution_evaluation_trace: evaluationTraceSchema.nullable(),\n condition: textSchema.nullable(),\n condition_truncated: z.literal(true).optional(),\n condition_total_bytes: z.number().int().nonnegative().optional(),\n oversized_fields: z.array(agentAccessOversizedFieldSchema).max(AGENT_ACCESS_PAGE_LIMIT_MAX),\n })\n .strict();\n\nexport type GetWorkflowExecutionContextResultDto = z.infer<\n typeof getWorkflowExecutionContextResultSchema\n>;\n\nexport const getStepAttemptResultSchema = z\n .object({\n workflow_run_id: idSchema,\n workflow_run_attempt: attemptSchema,\n job_id: idSchema,\n job_execution_id: idSchema,\n step_id: idSchema,\n step_attempt_id: idSchema,\n attempt: attemptSchema,\n authored_config: z.unknown().nullable(),\n config: z.unknown().nullable(),\n session: sessionSchema,\n evaluation_trace: evaluationTraceSchema.nullable(),\n output: z.unknown().nullable(),\n outputs: z.unknown().nullable(),\n response: textSchema.nullable(),\n error: stepErrorSchema,\n gate_result: gateResultSchema,\n invocations: z.array(invocationSchema).max(10),\n restart_feedback: textSchema.nullable(),\n restart_feedback_truncated: z.literal(true).optional(),\n restart_feedback_total_bytes: z.number().int().nonnegative().optional(),\n response_text_truncated: z.literal(true).optional(),\n response_text_total_bytes: z.number().int().nonnegative().optional(),\n oversized_fields: z.array(agentAccessOversizedFieldSchema).max(AGENT_ACCESS_PAGE_LIMIT_MAX),\n })\n .strict();\n\nexport type GetStepAttemptResultDto = z.infer<typeof getStepAttemptResultSchema>;\n\nconst explanationSchema = z\n .object({\n job_id: idSchema,\n job_label: textSchema,\n job_position: z.number().int().nonnegative().max(AGENT_ACCESS_WORKFLOW_ATTEMPT_MAX),\n status: z.enum(explanationStatuses),\n status_reason: textSchema.nullable(),\n evaluation_trace: evaluationTraceSchema.nullable(),\n })\n .strict();\n\nexport const listWorkflowRunJobExplanationsResultSchema = z\n .object({\n workflow_run_id: idSchema,\n workflow_run_attempt: attemptSchema,\n explanations: z.array(explanationSchema).max(AGENT_ACCESS_PAGE_LIMIT_MAX),\n next_cursor: z.string().nullable(),\n })\n .strict();\n\nexport type ListWorkflowRunJobExplanationsResultDto = z.infer<\n typeof listWorkflowRunJobExplanationsResultSchema\n>;\n\nconst uuid = {type: 'string', format: 'uuid'} as const;\nconst dateTime = {type: 'string', format: 'date-time'} as const;\nconst text = {type: 'string', maxLength: AGENT_ACCESS_TEXT_MAX_BYTES} as const;\nconst sourceText = {type: 'string', maxLength: AGENT_ACCESS_WORKFLOW_SOURCE_MAX_BYTES} as const;\nconst dynamicJson = {} as const;\nconst nullable = (schema: Record<string, unknown>) => ({anyOf: [schema, {type: 'null'}]}) as const;\nconst nullableDynamicJson = nullable(dynamicJson);\n\nexport const getWorkflowRunSourceInputJsonSchema = {\n type: 'object',\n properties: {\n run_id: uuid,\n attempt: {type: 'integer', minimum: 1, maximum: AGENT_ACCESS_WORKFLOW_ATTEMPT_MAX},\n },\n required: ['run_id', 'attempt'],\n additionalProperties: false,\n} as const satisfies AgentAccessObjectSchema;\n\nexport const getWorkflowExecutionContextInputJsonSchema = {\n type: 'object',\n properties: {job_id: uuid, execution_id: uuid},\n required: ['job_id', 'execution_id'],\n additionalProperties: false,\n} as const satisfies AgentAccessObjectSchema;\n\nexport const getStepAttemptInputJsonSchema = {\n type: 'object',\n properties: {\n step_id: uuid,\n attempt: {type: 'integer', minimum: 1, maximum: AGENT_ACCESS_WORKFLOW_ATTEMPT_MAX},\n },\n required: ['step_id'],\n additionalProperties: false,\n} as const satisfies AgentAccessObjectSchema;\n\nexport const listWorkflowRunJobExplanationsInputJsonSchema = {\n type: 'object',\n properties: {\n run_id: uuid,\n attempt: {type: 'integer', minimum: 1, maximum: AGENT_ACCESS_WORKFLOW_ATTEMPT_MAX},\n limit: {type: 'integer', minimum: 1, maximum: AGENT_ACCESS_PAGE_LIMIT_MAX, default: 100},\n cursor: {type: 'string', minLength: 1},\n },\n required: ['run_id', 'attempt'],\n additionalProperties: false,\n} as const satisfies AgentAccessObjectSchema;\n\nconst oversizedFieldJson = {\n type: 'object',\n properties: {\n field: {type: 'string', enum: diagnosticFields},\n stored_bytes: {type: 'integer', minimum: 0},\n reason: {\n type: 'string',\n enum: oversizedReasonSchema.options,\n },\n },\n required: ['field', 'stored_bytes', 'reason'],\n additionalProperties: false,\n} as const;\n\nconst evaluationTraceValueJson = {\n type: 'object',\n properties: {\n expression: text,\n roots: {type: 'array', items: text},\n fill_target: text,\n evaluated_at: text,\n field: text,\n value: text,\n truncated: {type: 'boolean'},\n expr_truncated: {type: 'boolean'},\n reference: {type: 'boolean'},\n degraded: {type: 'boolean'},\n env_key: text,\n },\n required: ['expression', 'roots', 'fill_target', 'evaluated_at', 'field'],\n additionalProperties: false,\n} as const;\n\nconst evaluationTraceJson = {\n type: 'array',\n items: {\n anyOf: [\n evaluationTraceValueJson,\n {\n type: 'object',\n properties: {truncated: {const: true}, dropped: {type: 'integer', minimum: 0}},\n required: ['truncated', 'dropped'],\n additionalProperties: false,\n },\n ],\n },\n} as const;\n\nconst workflowExecutionEventJson = {\n type: 'object',\n properties: {\n source: text,\n event: text,\n delivery_id: text,\n received_at: dateTime,\n project: nullable({\n type: 'object',\n properties: {id: uuid},\n required: ['id'],\n additionalProperties: false,\n }),\n repository: nullable(text),\n ref: nullable(text),\n commit: nullable(text),\n data: dynamicJson,\n },\n required: [\n 'source',\n 'event',\n 'delivery_id',\n 'received_at',\n 'project',\n 'repository',\n 'ref',\n 'commit',\n 'data',\n ],\n additionalProperties: false,\n} as const;\n\nconst stepErrorJson = {\n type: 'object',\n properties: {\n message: text,\n code: text,\n managed_provider_id: text,\n exit_code: nullable({type: 'integer'}),\n signal: text,\n reason: {type: 'string', enum: stepErrorReasons},\n field: text,\n source: text,\n agent_config_issue: {type: 'string', enum: agentConfigIssues},\n category: {type: 'string', enum: errorCategories},\n retryable: {type: 'boolean'},\n limit_bytes: {type: 'integer', minimum: 1},\n measured_bytes: {type: 'integer', minimum: 1},\n overshoot_bytes: {type: 'integer', minimum: 1},\n },\n required: ['message'],\n additionalProperties: false,\n} as const;\n\nconst gateResultJson = {\n type: 'object',\n properties: {\n kind: {type: 'string', enum: gateKinds},\n passed: {type: 'boolean'},\n source: text,\n exit_code: nullable({type: 'integer'}),\n uncheckable: {type: 'boolean'},\n reason: text,\n data: dynamicJson,\n },\n required: ['kind'],\n additionalProperties: false,\n} as const;\n\nconst sessionJson = {\n type: 'object',\n properties: {\n id: uuid,\n key: text,\n mode: {type: 'string', enum: ['resume', 'fork']},\n segment: {type: 'integer', minimum: 0},\n },\n required: ['id', 'key', 'mode', 'segment'],\n additionalProperties: false,\n} as const;\n\nconst invocationJson = {\n type: 'object',\n properties: {\n call_index: {type: 'integer', minimum: 0},\n started_at: text,\n finished_at: text,\n outcome: text,\n error_code: text,\n duration_ms: {type: 'integer', minimum: 0},\n next_due_at: text,\n },\n required: ['call_index', 'started_at'],\n additionalProperties: false,\n} as const;\n\nconst sourceSnapshotJson = {\n type: 'object',\n properties: {content: sourceText, format: {const: 'yaml'}},\n required: ['content', 'format'],\n additionalProperties: false,\n} as const;\n\nexport const getWorkflowRunSourceResultJsonSchema = {\n type: 'object',\n properties: {\n kind: {type: 'string', enum: ['available', 'unavailable']},\n workflow_run_id: uuid,\n workflow_run_attempt: {type: 'integer', minimum: 1, maximum: AGENT_ACCESS_WORKFLOW_ATTEMPT_MAX},\n source_snapshot: sourceSnapshotJson,\n source_snapshot_truncated: {const: true},\n source_snapshot_total_bytes: {type: 'integer', minimum: 0},\n reason: {type: 'string', enum: sourceUnavailableReasons},\n },\n required: ['kind', 'workflow_run_id', 'workflow_run_attempt'],\n additionalProperties: false,\n oneOf: [\n {\n properties: {kind: {const: 'available'}},\n required: ['source_snapshot'],\n not: {required: ['reason']},\n },\n {\n properties: {kind: {const: 'unavailable'}},\n required: ['reason'],\n not: {required: ['source_snapshot']},\n },\n ],\n} as const satisfies AgentAccessObjectSchema;\n\nexport const getWorkflowExecutionContextResultJsonSchema = {\n type: 'object',\n properties: {\n workflow_run_id: uuid,\n workflow_run_attempt: {type: 'integer', minimum: 1, maximum: AGENT_ACCESS_WORKFLOW_ATTEMPT_MAX},\n job_id: uuid,\n job_execution_id: uuid,\n job_runner: nullable({type: 'array', items: text}),\n execution_runner: nullable({type: 'array', items: text}),\n job_outputs: nullableDynamicJson,\n execution_outputs: nullableDynamicJson,\n trigger_events: {\n type: 'array',\n maxItems: AGENT_ACCESS_PAGE_LIMIT_MAX,\n items: workflowExecutionEventJson,\n },\n trigger_events_truncated: {const: true},\n trigger_events_total_count: {type: 'integer', minimum: 0},\n job_evaluation_trace: nullable(evaluationTraceJson),\n execution_evaluation_trace: nullable(evaluationTraceJson),\n condition: nullable(text),\n condition_truncated: {const: true},\n condition_total_bytes: {type: 'integer', minimum: 0},\n oversized_fields: {\n type: 'array',\n maxItems: AGENT_ACCESS_PAGE_LIMIT_MAX,\n items: oversizedFieldJson,\n },\n },\n required: [\n 'workflow_run_id',\n 'workflow_run_attempt',\n 'job_id',\n 'job_execution_id',\n 'job_runner',\n 'execution_runner',\n 'job_outputs',\n 'execution_outputs',\n 'trigger_events',\n 'job_evaluation_trace',\n 'execution_evaluation_trace',\n 'condition',\n 'oversized_fields',\n ],\n additionalProperties: false,\n} as const satisfies AgentAccessObjectSchema;\n\nexport const getStepAttemptResultJsonSchema = {\n type: 'object',\n properties: {\n workflow_run_id: uuid,\n workflow_run_attempt: {type: 'integer', minimum: 1, maximum: AGENT_ACCESS_WORKFLOW_ATTEMPT_MAX},\n job_id: uuid,\n job_execution_id: uuid,\n step_id: uuid,\n step_attempt_id: uuid,\n attempt: {type: 'integer', minimum: 1, maximum: AGENT_ACCESS_WORKFLOW_ATTEMPT_MAX},\n authored_config: nullableDynamicJson,\n config: nullableDynamicJson,\n session: nullable(sessionJson),\n evaluation_trace: nullable(evaluationTraceJson),\n output: nullableDynamicJson,\n outputs: nullableDynamicJson,\n response: nullable(text),\n error: nullable(stepErrorJson),\n gate_result: nullable(gateResultJson),\n invocations: {type: 'array', maxItems: 10, items: invocationJson},\n restart_feedback: nullable(text),\n restart_feedback_truncated: {const: true},\n restart_feedback_total_bytes: {type: 'integer', minimum: 0},\n response_text_truncated: {const: true},\n response_text_total_bytes: {type: 'integer', minimum: 0},\n oversized_fields: {\n type: 'array',\n maxItems: AGENT_ACCESS_PAGE_LIMIT_MAX,\n items: oversizedFieldJson,\n },\n },\n required: [\n 'workflow_run_id',\n 'workflow_run_attempt',\n 'job_id',\n 'job_execution_id',\n 'step_id',\n 'step_attempt_id',\n 'attempt',\n 'authored_config',\n 'config',\n 'session',\n 'evaluation_trace',\n 'output',\n 'outputs',\n 'response',\n 'error',\n 'gate_result',\n 'invocations',\n 'restart_feedback',\n 'oversized_fields',\n ],\n additionalProperties: false,\n} as const satisfies AgentAccessObjectSchema;\n\nconst explanationJson = {\n type: 'object',\n properties: {\n job_id: uuid,\n job_label: text,\n job_position: {type: 'integer', minimum: 0, maximum: AGENT_ACCESS_WORKFLOW_ATTEMPT_MAX},\n status: {type: 'string', enum: explanationStatuses},\n status_reason: nullable(text),\n evaluation_trace: nullable(evaluationTraceJson),\n },\n required: ['job_id', 'job_label', 'job_position', 'status', 'status_reason', 'evaluation_trace'],\n additionalProperties: false,\n} as const;\n\nexport const listWorkflowRunJobExplanationsResultJsonSchema = {\n type: 'object',\n properties: {\n workflow_run_id: uuid,\n workflow_run_attempt: {type: 'integer', minimum: 1, maximum: AGENT_ACCESS_WORKFLOW_ATTEMPT_MAX},\n explanations: {type: 'array', maxItems: AGENT_ACCESS_PAGE_LIMIT_MAX, items: explanationJson},\n next_cursor: nullable({type: 'string', minLength: 1}),\n },\n required: ['workflow_run_id', 'workflow_run_attempt', 'explanations', 'next_cursor'],\n additionalProperties: false,\n} as const satisfies AgentAccessObjectSchema;\n"],"names":["z","AGENT_ACCESS_PAGE_LIMIT_MAX","AGENT_ACCESS_TEXT_MAX_BYTES","dateTimeSchema","idSchema","utf8CappedString","AGENT_ACCESS_WORKFLOW_ATTEMPT_MAX","AGENT_ACCESS_WORKFLOW_DIAGNOSTIC_VALUE_MAX_BYTES","AGENT_ACCESS_WORKFLOW_SOURCE_MAX_BYTES","textSchema","sourceTextSchema","attemptSchema","number","int","min","max","diagnosticFields","agentAccessWorkflowDiagnosticFieldSchema","enum","oversizedReasonSchema","agentAccessOversizedFieldSchema","object","field","stored_bytes","nonnegative","reason","strict","stepErrorReasons","agentConfigIssues","errorCategories","gateKinds","sourceUnavailableReasons","explanationStatuses","evaluationTraceValueSchema","expression","roots","array","fill_target","evaluated_at","value","optional","truncated","boolean","expr_truncated","reference","degraded","env_key","evaluationTraceLimitSchema","literal","dropped","evaluationTraceSchema","union","workflowExecutionEventSchema","source","event","delivery_id","received_at","project","id","nullable","repository","ref","commit","data","unknown","stepErrorSchema","message","code","managed_provider_id","exit_code","signal","agent_config_issue","category","retryable","limit_bytes","positive","measured_bytes","overshoot_bytes","gateResultSchema","kind","passed","uncheckable","sessionSchema","key","mode","segment","invocationSchema","call_index","started_at","finished_at","outcome","error_code","duration_ms","next_due_at","getWorkflowRunSourceInputSchema","run_id","attempt","getWorkflowExecutionContextInputSchema","job_id","execution_id","getStepAttemptInputSchema","step_id","listWorkflowRunJobExplanationsInputSchema","limit","default","cursor","string","sourceSnapshotSchema","content","format","getWorkflowRunSourceResultSchema","discriminatedUnion","workflow_run_id","workflow_run_attempt","source_snapshot","source_snapshot_truncated","source_snapshot_total_bytes","getWorkflowExecutionContextResultSchema","job_execution_id","job_runner","execution_runner","job_outputs","execution_outputs","trigger_events","trigger_events_truncated","trigger_events_total_count","job_evaluation_trace","execution_evaluation_trace","condition","condition_truncated","condition_total_bytes","oversized_fields","getStepAttemptResultSchema","step_attempt_id","authored_config","config","session","evaluation_trace","output","outputs","response","error","gate_result","invocations","restart_feedback","restart_feedback_truncated","restart_feedback_total_bytes","response_text_truncated","response_text_total_bytes","explanationSchema","job_label","job_position","status","status_reason","listWorkflowRunJobExplanationsResultSchema","explanations","next_cursor","uuid","type","dateTime","text","maxLength","sourceText","dynamicJson","schema","anyOf","nullableDynamicJson","getWorkflowRunSourceInputJsonSchema","properties","minimum","maximum","required","additionalProperties","getWorkflowExecutionContextInputJsonSchema","getStepAttemptInputJsonSchema","listWorkflowRunJobExplanationsInputJsonSchema","minLength","oversizedFieldJson","options","evaluationTraceValueJson","items","evaluationTraceJson","const","workflowExecutionEventJson","stepErrorJson","gateResultJson","sessionJson","invocationJson","sourceSnapshotJson","getWorkflowRunSourceResultJsonSchema","oneOf","not","getWorkflowExecutionContextResultJsonSchema","maxItems","getStepAttemptResultJsonSchema","explanationJson","listWorkflowRunJobExplanationsResultJsonSchema"],"mappings":"AAAA,SAAQA,CAAC,QAAO,MAAM;AAEtB,SAAQC,2BAA2B,EAAEC,2BAA2B,QAAO,mBAAmB;AAC1F,SAAQC,cAAc,EAAEC,QAAQ,EAAEC,gBAAgB,QAAO,kBAAkB;AAC3E,SAAQC,iCAAiC,QAAO,sBAAsB;AAEtE,yFAAyF,GACzF,OAAO,MAAMC,mDAAmD,KAAK,KAAK;AAE1E,0FAA0F,GAC1F,OAAO,MAAMC,yCACXD,iDAAiD;AAEnD,MAAME,aAAaJ,iBAAiBH;AACpC,MAAMQ,mBAAmBL,iBAAiBG;AAC1C,MAAMG,gBAAgBX,EAAEY,MAAM,GAAGC,GAAG,GAAGC,GAAG,CAAC,GAAGC,GAAG,CAACT;AAElD,MAAMU,mBAAmB;IACvB;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;CACD;AAED,OAAO,MAAMC,2CAA2CjB,EAAEkB,IAAI,CAACF,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D;IACDC,sBAAsB;AACxB,EAA6C;AAE7C,MAAMuB,kBAAkB;IACtBrC,MAAM;IACNU,YAAY;QACVtE,QAAQ2D;QACRP,WAAWU;QACXT,cAAc;YAACO,MAAM;YAAWW,SAAS;YAAGC,SAASpK;QAAiC;QACtFkJ,QAAQ;YAACM,MAAM;YAAU5I,MAAMc;QAAmB;QAClDyH,eAAe9F,SAASqG;QACxBvB,kBAAkB9E,SAAS0H;IAC7B;IACAV,UAAU;QAAC;QAAU;QAAa;QAAgB;QAAU;QAAiB;KAAmB;IAChGC,sBAAsB;AACxB;AAEA,OAAO,MAAMwB,iDAAiD;IAC5DtC,MAAM;IACNU,YAAY;QACVxD,iBAAiB6C;QACjB5C,sBAAsB;YAAC6C,MAAM;YAAWW,SAAS;YAAGC,SAASpK;QAAiC;QAC9FqJ,cAAc;YAACG,MAAM;YAASmC,UAAUhM;YAA6BmL,OAAOe;QAAe;QAC3FvC,aAAajG,SAAS;YAACmG,MAAM;YAAUkB,WAAW;QAAC;IACrD;IACAL,UAAU;QAAC;QAAmB;QAAwB;QAAgB;KAAc;IACpFC,sBAAsB;AACxB,EAA6C"}
|
|
@@ -0,0 +1,272 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/** Default page size for one execution's listener-event history. */
|
|
3
|
+
export declare const AGENT_ACCESS_EXECUTION_TRIGGER_EVENT_PAGE_LIMIT = 25;
|
|
4
|
+
/** Maximum number of execution listener-event summaries in one page. */
|
|
5
|
+
export declare const AGENT_ACCESS_EXECUTION_TRIGGER_EVENT_PAGE_MAX = 100;
|
|
6
|
+
/** Maximum serialized UTF-8 size of one untrusted payload preview. */
|
|
7
|
+
export declare const AGENT_ACCESS_EXECUTION_TRIGGER_EVENT_PREVIEW_MAX_BYTES: number;
|
|
8
|
+
export declare const listExecutionTriggerEventsInputSchema: z.ZodObject<{
|
|
9
|
+
job_id: z.ZodString;
|
|
10
|
+
execution_id: z.ZodString;
|
|
11
|
+
limit: z.ZodDefault<z.ZodNumber>;
|
|
12
|
+
cursor: z.ZodOptional<z.ZodString>;
|
|
13
|
+
}, z.core.$strict>;
|
|
14
|
+
export declare const getExecutionTriggerEventInputSchema: z.ZodObject<{
|
|
15
|
+
job_id: z.ZodString;
|
|
16
|
+
execution_id: z.ZodString;
|
|
17
|
+
event_ref: z.ZodString;
|
|
18
|
+
}, z.core.$strict>;
|
|
19
|
+
export type ListExecutionTriggerEventsInputDto = z.output<typeof listExecutionTriggerEventsInputSchema>;
|
|
20
|
+
export type GetExecutionTriggerEventInputDto = z.output<typeof getExecutionTriggerEventInputSchema>;
|
|
21
|
+
export declare const listExecutionTriggerEventsResultSchema: z.ZodObject<{
|
|
22
|
+
job_id: z.ZodString;
|
|
23
|
+
execution_id: z.ZodString;
|
|
24
|
+
trigger_events: z.ZodArray<z.ZodObject<{
|
|
25
|
+
event_ref: z.ZodString;
|
|
26
|
+
delivery_id: z.ZodString;
|
|
27
|
+
source: z.ZodString;
|
|
28
|
+
event: z.ZodString;
|
|
29
|
+
disposition: z.ZodEnum<{
|
|
30
|
+
fire: "fire";
|
|
31
|
+
resolve: "resolve";
|
|
32
|
+
}>;
|
|
33
|
+
outcome: z.ZodEnum<{
|
|
34
|
+
abandoned: "abandoned";
|
|
35
|
+
consumed: "consumed";
|
|
36
|
+
honored: "honored";
|
|
37
|
+
pending: "pending";
|
|
38
|
+
rejected: "rejected";
|
|
39
|
+
}>;
|
|
40
|
+
outcome_reason: z.ZodNullable<z.ZodEnum<{
|
|
41
|
+
cancelled: "cancelled";
|
|
42
|
+
max_executions: "max_executions";
|
|
43
|
+
payload_too_large: "payload_too_large";
|
|
44
|
+
timeout: "timeout";
|
|
45
|
+
until: "until";
|
|
46
|
+
}>>;
|
|
47
|
+
received_at: z.ZodString;
|
|
48
|
+
stored_payload_bytes: z.ZodNumber;
|
|
49
|
+
normalized_event_bytes: z.ZodNumber;
|
|
50
|
+
}, z.core.$strict>>;
|
|
51
|
+
next_cursor: z.ZodNullable<z.ZodString>;
|
|
52
|
+
total: z.ZodOptional<z.ZodNumber>;
|
|
53
|
+
}, z.core.$strict>;
|
|
54
|
+
export type ListExecutionTriggerEventsResultDto = z.infer<typeof listExecutionTriggerEventsResultSchema>;
|
|
55
|
+
export declare const getExecutionTriggerEventResultSchema: z.ZodObject<{
|
|
56
|
+
event_ref: z.ZodString;
|
|
57
|
+
delivery_id: z.ZodString;
|
|
58
|
+
source: z.ZodString;
|
|
59
|
+
event: z.ZodString;
|
|
60
|
+
disposition: z.ZodEnum<{
|
|
61
|
+
fire: "fire";
|
|
62
|
+
resolve: "resolve";
|
|
63
|
+
}>;
|
|
64
|
+
outcome: z.ZodEnum<{
|
|
65
|
+
abandoned: "abandoned";
|
|
66
|
+
consumed: "consumed";
|
|
67
|
+
honored: "honored";
|
|
68
|
+
pending: "pending";
|
|
69
|
+
rejected: "rejected";
|
|
70
|
+
}>;
|
|
71
|
+
outcome_reason: z.ZodNullable<z.ZodEnum<{
|
|
72
|
+
cancelled: "cancelled";
|
|
73
|
+
max_executions: "max_executions";
|
|
74
|
+
payload_too_large: "payload_too_large";
|
|
75
|
+
timeout: "timeout";
|
|
76
|
+
until: "until";
|
|
77
|
+
}>>;
|
|
78
|
+
received_at: z.ZodString;
|
|
79
|
+
stored_payload_bytes: z.ZodNumber;
|
|
80
|
+
normalized_event_bytes: z.ZodNumber;
|
|
81
|
+
payload_preview: z.ZodNullable<z.ZodString>;
|
|
82
|
+
payload_preview_truncated: z.ZodOptional<z.ZodLiteral<true>>;
|
|
83
|
+
payload_preview_total_bytes: z.ZodOptional<z.ZodNumber>;
|
|
84
|
+
}, z.core.$strict>;
|
|
85
|
+
export type GetExecutionTriggerEventResultDto = z.infer<typeof getExecutionTriggerEventResultSchema>;
|
|
86
|
+
export declare const listExecutionTriggerEventsInputJsonSchema: {
|
|
87
|
+
readonly type: 'object';
|
|
88
|
+
readonly properties: {
|
|
89
|
+
readonly job_id: {
|
|
90
|
+
readonly type: 'string';
|
|
91
|
+
readonly format: 'uuid';
|
|
92
|
+
};
|
|
93
|
+
readonly execution_id: {
|
|
94
|
+
readonly type: 'string';
|
|
95
|
+
readonly format: 'uuid';
|
|
96
|
+
};
|
|
97
|
+
readonly limit: {
|
|
98
|
+
readonly type: 'integer';
|
|
99
|
+
readonly minimum: 1;
|
|
100
|
+
readonly maximum: 100;
|
|
101
|
+
readonly default: 25;
|
|
102
|
+
};
|
|
103
|
+
readonly cursor: {
|
|
104
|
+
readonly type: 'string';
|
|
105
|
+
readonly minLength: 1;
|
|
106
|
+
};
|
|
107
|
+
};
|
|
108
|
+
readonly required: readonly ["job_id", "execution_id"];
|
|
109
|
+
readonly additionalProperties: false;
|
|
110
|
+
};
|
|
111
|
+
export declare const getExecutionTriggerEventInputJsonSchema: {
|
|
112
|
+
readonly type: 'object';
|
|
113
|
+
readonly properties: {
|
|
114
|
+
readonly job_id: {
|
|
115
|
+
readonly type: 'string';
|
|
116
|
+
readonly format: 'uuid';
|
|
117
|
+
};
|
|
118
|
+
readonly execution_id: {
|
|
119
|
+
readonly type: 'string';
|
|
120
|
+
readonly format: 'uuid';
|
|
121
|
+
};
|
|
122
|
+
readonly event_ref: {
|
|
123
|
+
readonly type: 'string';
|
|
124
|
+
readonly minLength: 1;
|
|
125
|
+
};
|
|
126
|
+
};
|
|
127
|
+
readonly required: readonly ["job_id", "execution_id", "event_ref"];
|
|
128
|
+
readonly additionalProperties: false;
|
|
129
|
+
};
|
|
130
|
+
export declare const listExecutionTriggerEventsResultJsonSchema: {
|
|
131
|
+
readonly type: 'object';
|
|
132
|
+
readonly properties: {
|
|
133
|
+
readonly job_id: {
|
|
134
|
+
readonly type: 'string';
|
|
135
|
+
readonly format: 'uuid';
|
|
136
|
+
};
|
|
137
|
+
readonly execution_id: {
|
|
138
|
+
readonly type: 'string';
|
|
139
|
+
readonly format: 'uuid';
|
|
140
|
+
};
|
|
141
|
+
readonly trigger_events: {
|
|
142
|
+
readonly type: 'array';
|
|
143
|
+
readonly maxItems: 100;
|
|
144
|
+
readonly items: {
|
|
145
|
+
readonly type: 'object';
|
|
146
|
+
readonly properties: {
|
|
147
|
+
readonly event_ref: {
|
|
148
|
+
readonly type: 'string';
|
|
149
|
+
readonly minLength: 1;
|
|
150
|
+
};
|
|
151
|
+
readonly delivery_id: {
|
|
152
|
+
readonly type: 'string';
|
|
153
|
+
readonly maxLength: 512;
|
|
154
|
+
};
|
|
155
|
+
readonly source: {
|
|
156
|
+
readonly type: 'string';
|
|
157
|
+
readonly maxLength: 512;
|
|
158
|
+
};
|
|
159
|
+
readonly event: {
|
|
160
|
+
readonly type: 'string';
|
|
161
|
+
readonly maxLength: 512;
|
|
162
|
+
};
|
|
163
|
+
readonly disposition: {
|
|
164
|
+
readonly type: 'string';
|
|
165
|
+
readonly enum: readonly ['fire', 'resolve'];
|
|
166
|
+
};
|
|
167
|
+
readonly outcome: {
|
|
168
|
+
readonly type: 'string';
|
|
169
|
+
readonly enum: readonly ['pending', 'consumed', 'honored', 'rejected', 'abandoned'];
|
|
170
|
+
};
|
|
171
|
+
readonly outcome_reason: {
|
|
172
|
+
readonly anyOf: readonly [{
|
|
173
|
+
readonly type: 'string';
|
|
174
|
+
readonly enum: readonly ['payload_too_large', 'until', 'timeout', 'max_executions', 'cancelled'];
|
|
175
|
+
}, {
|
|
176
|
+
readonly type: 'null';
|
|
177
|
+
}];
|
|
178
|
+
};
|
|
179
|
+
readonly received_at: {
|
|
180
|
+
readonly type: 'string';
|
|
181
|
+
readonly format: 'date-time';
|
|
182
|
+
};
|
|
183
|
+
readonly stored_payload_bytes: {
|
|
184
|
+
readonly type: 'integer';
|
|
185
|
+
readonly minimum: 0;
|
|
186
|
+
};
|
|
187
|
+
readonly normalized_event_bytes: {
|
|
188
|
+
readonly type: 'integer';
|
|
189
|
+
readonly minimum: 0;
|
|
190
|
+
};
|
|
191
|
+
};
|
|
192
|
+
readonly required: readonly ['event_ref', 'delivery_id', 'source', 'event', 'disposition', 'outcome', 'outcome_reason', 'received_at', 'stored_payload_bytes', 'normalized_event_bytes'];
|
|
193
|
+
readonly additionalProperties: false;
|
|
194
|
+
};
|
|
195
|
+
};
|
|
196
|
+
readonly next_cursor: {
|
|
197
|
+
readonly anyOf: readonly [Record<string, unknown>, {
|
|
198
|
+
readonly type: 'null';
|
|
199
|
+
}];
|
|
200
|
+
};
|
|
201
|
+
readonly total: {
|
|
202
|
+
readonly type: 'integer';
|
|
203
|
+
readonly minimum: 0;
|
|
204
|
+
};
|
|
205
|
+
};
|
|
206
|
+
readonly required: readonly ["job_id", "execution_id", "trigger_events", "next_cursor"];
|
|
207
|
+
readonly additionalProperties: false;
|
|
208
|
+
};
|
|
209
|
+
export declare const getExecutionTriggerEventResultJsonSchema: {
|
|
210
|
+
readonly type: 'object';
|
|
211
|
+
readonly additionalProperties: false;
|
|
212
|
+
readonly properties: {
|
|
213
|
+
readonly event_ref: {
|
|
214
|
+
readonly type: 'string';
|
|
215
|
+
readonly minLength: 1;
|
|
216
|
+
};
|
|
217
|
+
readonly delivery_id: {
|
|
218
|
+
readonly type: 'string';
|
|
219
|
+
readonly maxLength: 512;
|
|
220
|
+
};
|
|
221
|
+
readonly source: {
|
|
222
|
+
readonly type: 'string';
|
|
223
|
+
readonly maxLength: 512;
|
|
224
|
+
};
|
|
225
|
+
readonly event: {
|
|
226
|
+
readonly type: 'string';
|
|
227
|
+
readonly maxLength: 512;
|
|
228
|
+
};
|
|
229
|
+
readonly disposition: {
|
|
230
|
+
readonly type: 'string';
|
|
231
|
+
readonly enum: readonly ['fire', 'resolve'];
|
|
232
|
+
};
|
|
233
|
+
readonly outcome: {
|
|
234
|
+
readonly type: 'string';
|
|
235
|
+
readonly enum: readonly ['pending', 'consumed', 'honored', 'rejected', 'abandoned'];
|
|
236
|
+
};
|
|
237
|
+
readonly outcome_reason: {
|
|
238
|
+
readonly anyOf: readonly [{
|
|
239
|
+
readonly type: 'string';
|
|
240
|
+
readonly enum: readonly ['payload_too_large', 'until', 'timeout', 'max_executions', 'cancelled'];
|
|
241
|
+
}, {
|
|
242
|
+
readonly type: 'null';
|
|
243
|
+
}];
|
|
244
|
+
};
|
|
245
|
+
readonly received_at: {
|
|
246
|
+
readonly type: 'string';
|
|
247
|
+
readonly format: 'date-time';
|
|
248
|
+
};
|
|
249
|
+
readonly stored_payload_bytes: {
|
|
250
|
+
readonly type: 'integer';
|
|
251
|
+
readonly minimum: 0;
|
|
252
|
+
};
|
|
253
|
+
readonly normalized_event_bytes: {
|
|
254
|
+
readonly type: 'integer';
|
|
255
|
+
readonly minimum: 0;
|
|
256
|
+
};
|
|
257
|
+
readonly payload_preview: {
|
|
258
|
+
readonly anyOf: readonly [Record<string, unknown>, {
|
|
259
|
+
readonly type: 'null';
|
|
260
|
+
}];
|
|
261
|
+
};
|
|
262
|
+
readonly payload_preview_truncated: {
|
|
263
|
+
readonly const: true;
|
|
264
|
+
};
|
|
265
|
+
readonly payload_preview_total_bytes: {
|
|
266
|
+
readonly type: 'integer';
|
|
267
|
+
readonly minimum: 0;
|
|
268
|
+
};
|
|
269
|
+
};
|
|
270
|
+
readonly required: readonly ["event_ref", "delivery_id", "source", "event", "disposition", "outcome", "outcome_reason", "received_at", "stored_payload_bytes", "normalized_event_bytes", "payload_preview"];
|
|
271
|
+
};
|
|
272
|
+
//# sourceMappingURL=workflow-execution-events.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workflow-execution-events.d.ts","sourceRoot":"","sources":["../../src/schemas/workflow-execution-events.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;AAKtB,oEAAoE;AACpE,eAAO,MAAM,+CAA+C,KAAK,CAAC;AAElE,wEAAwE;AACxE,eAAO,MAAM,6CAA6C,MAA8B,CAAC;AAEzF,sEAAsE;AACtE,eAAO,MAAM,sDAAsD,QAAY,CAAC;AAmChF,eAAO,MAAM,qCAAqC;;;;;kBAYvC,CAAC;AAEZ,eAAO,MAAM,mCAAmC;;;;kBAMrC,CAAC;AAE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,WAAW;;;qBAwD1B,IAAI,EAAE,SAAS;qBAAE,OAAO,EAAE,CAAC;;;qBACzB,IAAI,EAAE,SAAS;qBAAE,OAAO,EAAE,CAAC;;;;yBAjDiB,IAAI,EAAE,MAAM;;;;qBAuErD,KAAK;;;qBACH,IAAI,EAAE,SAAS;qBAAE,OAAO,EAAE,CAAC;;;;CAuBM,CAAC"}
|
|
@@ -0,0 +1,250 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { AGENT_ACCESS_PAGE_LIMIT_MAX, AGENT_ACCESS_TEXT_MAX_BYTES } from './paged-tools.js';
|
|
3
|
+
import { dateTimeSchema, idSchema, utf8CappedString } from './primitives.js';
|
|
4
|
+
/** Default page size for one execution's listener-event history. */ export const AGENT_ACCESS_EXECUTION_TRIGGER_EVENT_PAGE_LIMIT = 25;
|
|
5
|
+
/** Maximum number of execution listener-event summaries in one page. */ export const AGENT_ACCESS_EXECUTION_TRIGGER_EVENT_PAGE_MAX = AGENT_ACCESS_PAGE_LIMIT_MAX;
|
|
6
|
+
/** Maximum serialized UTF-8 size of one untrusted payload preview. */ export const AGENT_ACCESS_EXECUTION_TRIGGER_EVENT_PREVIEW_MAX_BYTES = 16 * 1024;
|
|
7
|
+
const textSchema = utf8CappedString(AGENT_ACCESS_TEXT_MAX_BYTES);
|
|
8
|
+
const payloadPreviewSchema = utf8CappedString(AGENT_ACCESS_EXECUTION_TRIGGER_EVENT_PREVIEW_MAX_BYTES).refine(isSerializedJson, {
|
|
9
|
+
message: 'Payload preview must be serialized JSON'
|
|
10
|
+
});
|
|
11
|
+
const executionTriggerEventDispositionSchema = z.enum([
|
|
12
|
+
'fire',
|
|
13
|
+
'resolve'
|
|
14
|
+
]);
|
|
15
|
+
const executionTriggerEventOutcomeSchema = z.enum([
|
|
16
|
+
'pending',
|
|
17
|
+
'consumed',
|
|
18
|
+
'honored',
|
|
19
|
+
'rejected',
|
|
20
|
+
'abandoned'
|
|
21
|
+
]);
|
|
22
|
+
const executionTriggerEventOutcomeReasonSchema = z.enum([
|
|
23
|
+
'payload_too_large',
|
|
24
|
+
'until',
|
|
25
|
+
'timeout',
|
|
26
|
+
'max_executions',
|
|
27
|
+
'cancelled'
|
|
28
|
+
]).nullable();
|
|
29
|
+
const eventRefSchema = z.string().min(1);
|
|
30
|
+
const executionTriggerEventSummarySchema = z.object({
|
|
31
|
+
event_ref: eventRefSchema,
|
|
32
|
+
delivery_id: textSchema,
|
|
33
|
+
source: textSchema,
|
|
34
|
+
event: textSchema,
|
|
35
|
+
disposition: executionTriggerEventDispositionSchema,
|
|
36
|
+
outcome: executionTriggerEventOutcomeSchema,
|
|
37
|
+
outcome_reason: executionTriggerEventOutcomeReasonSchema,
|
|
38
|
+
received_at: dateTimeSchema,
|
|
39
|
+
stored_payload_bytes: z.number().int().nonnegative(),
|
|
40
|
+
normalized_event_bytes: z.number().int().nonnegative()
|
|
41
|
+
}).strict();
|
|
42
|
+
export const listExecutionTriggerEventsInputSchema = z.object({
|
|
43
|
+
job_id: idSchema,
|
|
44
|
+
execution_id: idSchema,
|
|
45
|
+
limit: z.number().int().min(1).max(AGENT_ACCESS_EXECUTION_TRIGGER_EVENT_PAGE_MAX).default(AGENT_ACCESS_EXECUTION_TRIGGER_EVENT_PAGE_LIMIT),
|
|
46
|
+
cursor: z.string().min(1).optional()
|
|
47
|
+
}).strict();
|
|
48
|
+
export const getExecutionTriggerEventInputSchema = z.object({
|
|
49
|
+
job_id: idSchema,
|
|
50
|
+
execution_id: idSchema,
|
|
51
|
+
event_ref: eventRefSchema
|
|
52
|
+
}).strict();
|
|
53
|
+
export const listExecutionTriggerEventsResultSchema = z.object({
|
|
54
|
+
job_id: idSchema,
|
|
55
|
+
execution_id: idSchema,
|
|
56
|
+
trigger_events: z.array(executionTriggerEventSummarySchema).max(AGENT_ACCESS_EXECUTION_TRIGGER_EVENT_PAGE_MAX),
|
|
57
|
+
next_cursor: z.string().nullable(),
|
|
58
|
+
total: z.number().int().nonnegative().optional()
|
|
59
|
+
}).strict();
|
|
60
|
+
export const getExecutionTriggerEventResultSchema = executionTriggerEventSummarySchema.extend({
|
|
61
|
+
/** Serialized JSON text. It is untrusted data, not a typed workflow value. */ payload_preview: payloadPreviewSchema.nullable(),
|
|
62
|
+
payload_preview_truncated: z.literal(true).optional(),
|
|
63
|
+
payload_preview_total_bytes: z.number().int().nonnegative().optional()
|
|
64
|
+
}).strict();
|
|
65
|
+
const uuid = {
|
|
66
|
+
type: 'string',
|
|
67
|
+
format: 'uuid'
|
|
68
|
+
};
|
|
69
|
+
const dateTime = {
|
|
70
|
+
type: 'string',
|
|
71
|
+
format: 'date-time'
|
|
72
|
+
};
|
|
73
|
+
const text = {
|
|
74
|
+
type: 'string',
|
|
75
|
+
maxLength: AGENT_ACCESS_TEXT_MAX_BYTES
|
|
76
|
+
};
|
|
77
|
+
const eventRef = {
|
|
78
|
+
type: 'string',
|
|
79
|
+
minLength: 1
|
|
80
|
+
};
|
|
81
|
+
const serializedJson = {
|
|
82
|
+
type: 'string',
|
|
83
|
+
maxLength: AGENT_ACCESS_EXECUTION_TRIGGER_EVENT_PREVIEW_MAX_BYTES,
|
|
84
|
+
contentMediaType: 'application/json'
|
|
85
|
+
};
|
|
86
|
+
const nullable = (schema)=>({
|
|
87
|
+
anyOf: [
|
|
88
|
+
schema,
|
|
89
|
+
{
|
|
90
|
+
type: 'null'
|
|
91
|
+
}
|
|
92
|
+
]
|
|
93
|
+
});
|
|
94
|
+
export const listExecutionTriggerEventsInputJsonSchema = {
|
|
95
|
+
type: 'object',
|
|
96
|
+
properties: {
|
|
97
|
+
job_id: uuid,
|
|
98
|
+
execution_id: uuid,
|
|
99
|
+
limit: {
|
|
100
|
+
type: 'integer',
|
|
101
|
+
minimum: 1,
|
|
102
|
+
maximum: AGENT_ACCESS_EXECUTION_TRIGGER_EVENT_PAGE_MAX,
|
|
103
|
+
default: AGENT_ACCESS_EXECUTION_TRIGGER_EVENT_PAGE_LIMIT
|
|
104
|
+
},
|
|
105
|
+
cursor: {
|
|
106
|
+
type: 'string',
|
|
107
|
+
minLength: 1
|
|
108
|
+
}
|
|
109
|
+
},
|
|
110
|
+
required: [
|
|
111
|
+
'job_id',
|
|
112
|
+
'execution_id'
|
|
113
|
+
],
|
|
114
|
+
additionalProperties: false
|
|
115
|
+
};
|
|
116
|
+
export const getExecutionTriggerEventInputJsonSchema = {
|
|
117
|
+
type: 'object',
|
|
118
|
+
properties: {
|
|
119
|
+
job_id: uuid,
|
|
120
|
+
execution_id: uuid,
|
|
121
|
+
event_ref: eventRef
|
|
122
|
+
},
|
|
123
|
+
required: [
|
|
124
|
+
'job_id',
|
|
125
|
+
'execution_id',
|
|
126
|
+
'event_ref'
|
|
127
|
+
],
|
|
128
|
+
additionalProperties: false
|
|
129
|
+
};
|
|
130
|
+
const executionTriggerEventSummaryJson = {
|
|
131
|
+
type: 'object',
|
|
132
|
+
properties: {
|
|
133
|
+
event_ref: eventRef,
|
|
134
|
+
delivery_id: text,
|
|
135
|
+
source: text,
|
|
136
|
+
event: text,
|
|
137
|
+
disposition: {
|
|
138
|
+
type: 'string',
|
|
139
|
+
enum: [
|
|
140
|
+
'fire',
|
|
141
|
+
'resolve'
|
|
142
|
+
]
|
|
143
|
+
},
|
|
144
|
+
outcome: {
|
|
145
|
+
type: 'string',
|
|
146
|
+
enum: [
|
|
147
|
+
'pending',
|
|
148
|
+
'consumed',
|
|
149
|
+
'honored',
|
|
150
|
+
'rejected',
|
|
151
|
+
'abandoned'
|
|
152
|
+
]
|
|
153
|
+
},
|
|
154
|
+
outcome_reason: {
|
|
155
|
+
anyOf: [
|
|
156
|
+
{
|
|
157
|
+
type: 'string',
|
|
158
|
+
enum: [
|
|
159
|
+
'payload_too_large',
|
|
160
|
+
'until',
|
|
161
|
+
'timeout',
|
|
162
|
+
'max_executions',
|
|
163
|
+
'cancelled'
|
|
164
|
+
]
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
type: 'null'
|
|
168
|
+
}
|
|
169
|
+
]
|
|
170
|
+
},
|
|
171
|
+
received_at: dateTime,
|
|
172
|
+
stored_payload_bytes: {
|
|
173
|
+
type: 'integer',
|
|
174
|
+
minimum: 0
|
|
175
|
+
},
|
|
176
|
+
normalized_event_bytes: {
|
|
177
|
+
type: 'integer',
|
|
178
|
+
minimum: 0
|
|
179
|
+
}
|
|
180
|
+
},
|
|
181
|
+
required: [
|
|
182
|
+
'event_ref',
|
|
183
|
+
'delivery_id',
|
|
184
|
+
'source',
|
|
185
|
+
'event',
|
|
186
|
+
'disposition',
|
|
187
|
+
'outcome',
|
|
188
|
+
'outcome_reason',
|
|
189
|
+
'received_at',
|
|
190
|
+
'stored_payload_bytes',
|
|
191
|
+
'normalized_event_bytes'
|
|
192
|
+
],
|
|
193
|
+
additionalProperties: false
|
|
194
|
+
};
|
|
195
|
+
const executionTriggerEventDetailJson = {
|
|
196
|
+
...executionTriggerEventSummaryJson,
|
|
197
|
+
properties: {
|
|
198
|
+
...executionTriggerEventSummaryJson.properties,
|
|
199
|
+
payload_preview: nullable(serializedJson),
|
|
200
|
+
payload_preview_truncated: {
|
|
201
|
+
const: true
|
|
202
|
+
},
|
|
203
|
+
payload_preview_total_bytes: {
|
|
204
|
+
type: 'integer',
|
|
205
|
+
minimum: 0
|
|
206
|
+
}
|
|
207
|
+
},
|
|
208
|
+
required: [
|
|
209
|
+
...executionTriggerEventSummaryJson.required,
|
|
210
|
+
'payload_preview'
|
|
211
|
+
]
|
|
212
|
+
};
|
|
213
|
+
export const listExecutionTriggerEventsResultJsonSchema = {
|
|
214
|
+
type: 'object',
|
|
215
|
+
properties: {
|
|
216
|
+
job_id: uuid,
|
|
217
|
+
execution_id: uuid,
|
|
218
|
+
trigger_events: {
|
|
219
|
+
type: 'array',
|
|
220
|
+
maxItems: AGENT_ACCESS_EXECUTION_TRIGGER_EVENT_PAGE_MAX,
|
|
221
|
+
items: executionTriggerEventSummaryJson
|
|
222
|
+
},
|
|
223
|
+
next_cursor: nullable({
|
|
224
|
+
type: 'string',
|
|
225
|
+
minLength: 1
|
|
226
|
+
}),
|
|
227
|
+
total: {
|
|
228
|
+
type: 'integer',
|
|
229
|
+
minimum: 0
|
|
230
|
+
}
|
|
231
|
+
},
|
|
232
|
+
required: [
|
|
233
|
+
'job_id',
|
|
234
|
+
'execution_id',
|
|
235
|
+
'trigger_events',
|
|
236
|
+
'next_cursor'
|
|
237
|
+
],
|
|
238
|
+
additionalProperties: false
|
|
239
|
+
};
|
|
240
|
+
export const getExecutionTriggerEventResultJsonSchema = executionTriggerEventDetailJson;
|
|
241
|
+
function isSerializedJson(value) {
|
|
242
|
+
try {
|
|
243
|
+
JSON.parse(value);
|
|
244
|
+
return true;
|
|
245
|
+
} catch {
|
|
246
|
+
return false;
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
//# sourceMappingURL=workflow-execution-events.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/schemas/workflow-execution-events.ts"],"sourcesContent":["import {z} from 'zod';\nimport type {AgentAccessObjectSchema} from './envelope.js';\nimport {AGENT_ACCESS_PAGE_LIMIT_MAX, AGENT_ACCESS_TEXT_MAX_BYTES} from './paged-tools.js';\nimport {dateTimeSchema, idSchema, utf8CappedString} from './primitives.js';\n\n/** Default page size for one execution's listener-event history. */\nexport const AGENT_ACCESS_EXECUTION_TRIGGER_EVENT_PAGE_LIMIT = 25;\n\n/** Maximum number of execution listener-event summaries in one page. */\nexport const AGENT_ACCESS_EXECUTION_TRIGGER_EVENT_PAGE_MAX = AGENT_ACCESS_PAGE_LIMIT_MAX;\n\n/** Maximum serialized UTF-8 size of one untrusted payload preview. */\nexport const AGENT_ACCESS_EXECUTION_TRIGGER_EVENT_PREVIEW_MAX_BYTES = 16 * 1024;\n\nconst textSchema = utf8CappedString(AGENT_ACCESS_TEXT_MAX_BYTES);\nconst payloadPreviewSchema = utf8CappedString(\n AGENT_ACCESS_EXECUTION_TRIGGER_EVENT_PREVIEW_MAX_BYTES,\n).refine(isSerializedJson, {message: 'Payload preview must be serialized JSON'});\n\nconst executionTriggerEventDispositionSchema = z.enum(['fire', 'resolve']);\nconst executionTriggerEventOutcomeSchema = z.enum([\n 'pending',\n 'consumed',\n 'honored',\n 'rejected',\n 'abandoned',\n]);\nconst executionTriggerEventOutcomeReasonSchema = z\n .enum(['payload_too_large', 'until', 'timeout', 'max_executions', 'cancelled'])\n .nullable();\nconst eventRefSchema = z.string().min(1);\n\nconst executionTriggerEventSummarySchema = z\n .object({\n event_ref: eventRefSchema,\n delivery_id: textSchema,\n source: textSchema,\n event: textSchema,\n disposition: executionTriggerEventDispositionSchema,\n outcome: executionTriggerEventOutcomeSchema,\n outcome_reason: executionTriggerEventOutcomeReasonSchema,\n received_at: dateTimeSchema,\n stored_payload_bytes: z.number().int().nonnegative(),\n normalized_event_bytes: z.number().int().nonnegative(),\n })\n .strict();\n\nexport const listExecutionTriggerEventsInputSchema = z\n .object({\n job_id: idSchema,\n execution_id: idSchema,\n limit: z\n .number()\n .int()\n .min(1)\n .max(AGENT_ACCESS_EXECUTION_TRIGGER_EVENT_PAGE_MAX)\n .default(AGENT_ACCESS_EXECUTION_TRIGGER_EVENT_PAGE_LIMIT),\n cursor: z.string().min(1).optional(),\n })\n .strict();\n\nexport const getExecutionTriggerEventInputSchema = z\n .object({\n job_id: idSchema,\n execution_id: idSchema,\n event_ref: eventRefSchema,\n })\n .strict();\n\nexport type ListExecutionTriggerEventsInputDto = z.output<\n typeof listExecutionTriggerEventsInputSchema\n>;\nexport type GetExecutionTriggerEventInputDto = z.output<typeof getExecutionTriggerEventInputSchema>;\n\nexport const listExecutionTriggerEventsResultSchema = z\n .object({\n job_id: idSchema,\n execution_id: idSchema,\n trigger_events: z\n .array(executionTriggerEventSummarySchema)\n .max(AGENT_ACCESS_EXECUTION_TRIGGER_EVENT_PAGE_MAX),\n next_cursor: z.string().nullable(),\n total: z.number().int().nonnegative().optional(),\n })\n .strict();\n\nexport type ListExecutionTriggerEventsResultDto = z.infer<\n typeof listExecutionTriggerEventsResultSchema\n>;\n\nexport const getExecutionTriggerEventResultSchema = executionTriggerEventSummarySchema\n .extend({\n /** Serialized JSON text. It is untrusted data, not a typed workflow value. */\n payload_preview: payloadPreviewSchema.nullable(),\n payload_preview_truncated: z.literal(true).optional(),\n payload_preview_total_bytes: z.number().int().nonnegative().optional(),\n })\n .strict();\n\nexport type GetExecutionTriggerEventResultDto = z.infer<\n typeof getExecutionTriggerEventResultSchema\n>;\n\nconst uuid = {type: 'string', format: 'uuid'} as const;\nconst dateTime = {type: 'string', format: 'date-time'} as const;\nconst text = {type: 'string', maxLength: AGENT_ACCESS_TEXT_MAX_BYTES} as const;\nconst eventRef = {type: 'string', minLength: 1} as const;\nconst serializedJson = {\n type: 'string',\n maxLength: AGENT_ACCESS_EXECUTION_TRIGGER_EVENT_PREVIEW_MAX_BYTES,\n contentMediaType: 'application/json',\n} as const;\nconst nullable = (schema: Record<string, unknown>) => ({anyOf: [schema, {type: 'null'}]}) as const;\n\nexport const listExecutionTriggerEventsInputJsonSchema = {\n type: 'object',\n properties: {\n job_id: uuid,\n execution_id: uuid,\n limit: {\n type: 'integer',\n minimum: 1,\n maximum: AGENT_ACCESS_EXECUTION_TRIGGER_EVENT_PAGE_MAX,\n default: AGENT_ACCESS_EXECUTION_TRIGGER_EVENT_PAGE_LIMIT,\n },\n cursor: {type: 'string', minLength: 1},\n },\n required: ['job_id', 'execution_id'],\n additionalProperties: false,\n} as const satisfies AgentAccessObjectSchema;\n\nexport const getExecutionTriggerEventInputJsonSchema = {\n type: 'object',\n properties: {job_id: uuid, execution_id: uuid, event_ref: eventRef},\n required: ['job_id', 'execution_id', 'event_ref'],\n additionalProperties: false,\n} as const satisfies AgentAccessObjectSchema;\n\nconst executionTriggerEventSummaryJson = {\n type: 'object',\n properties: {\n event_ref: eventRef,\n delivery_id: text,\n source: text,\n event: text,\n disposition: {type: 'string', enum: ['fire', 'resolve']},\n outcome: {\n type: 'string',\n enum: ['pending', 'consumed', 'honored', 'rejected', 'abandoned'],\n },\n outcome_reason: {\n anyOf: [\n {\n type: 'string',\n enum: ['payload_too_large', 'until', 'timeout', 'max_executions', 'cancelled'],\n },\n {type: 'null'},\n ],\n },\n received_at: dateTime,\n stored_payload_bytes: {type: 'integer', minimum: 0},\n normalized_event_bytes: {type: 'integer', minimum: 0},\n },\n required: [\n 'event_ref',\n 'delivery_id',\n 'source',\n 'event',\n 'disposition',\n 'outcome',\n 'outcome_reason',\n 'received_at',\n 'stored_payload_bytes',\n 'normalized_event_bytes',\n ],\n additionalProperties: false,\n} as const;\n\nconst executionTriggerEventDetailJson = {\n ...executionTriggerEventSummaryJson,\n properties: {\n ...executionTriggerEventSummaryJson.properties,\n payload_preview: nullable(serializedJson),\n payload_preview_truncated: {const: true},\n payload_preview_total_bytes: {type: 'integer', minimum: 0},\n },\n required: [...executionTriggerEventSummaryJson.required, 'payload_preview'],\n} as const;\n\nexport const listExecutionTriggerEventsResultJsonSchema = {\n type: 'object',\n properties: {\n job_id: uuid,\n execution_id: uuid,\n trigger_events: {\n type: 'array',\n maxItems: AGENT_ACCESS_EXECUTION_TRIGGER_EVENT_PAGE_MAX,\n items: executionTriggerEventSummaryJson,\n },\n next_cursor: nullable({type: 'string', minLength: 1}),\n total: {type: 'integer', minimum: 0},\n },\n required: ['job_id', 'execution_id', 'trigger_events', 'next_cursor'],\n additionalProperties: false,\n} as const satisfies AgentAccessObjectSchema;\n\nexport const getExecutionTriggerEventResultJsonSchema =\n executionTriggerEventDetailJson satisfies AgentAccessObjectSchema;\n\nfunction isSerializedJson(value: string): boolean {\n try {\n JSON.parse(value);\n return true;\n } catch {\n return false;\n }\n}\n"],"names":["z","AGENT_ACCESS_PAGE_LIMIT_MAX","AGENT_ACCESS_TEXT_MAX_BYTES","dateTimeSchema","idSchema","utf8CappedString","AGENT_ACCESS_EXECUTION_TRIGGER_EVENT_PAGE_LIMIT","AGENT_ACCESS_EXECUTION_TRIGGER_EVENT_PAGE_MAX","AGENT_ACCESS_EXECUTION_TRIGGER_EVENT_PREVIEW_MAX_BYTES","textSchema","payloadPreviewSchema","refine","isSerializedJson","message","executionTriggerEventDispositionSchema","enum","executionTriggerEventOutcomeSchema","executionTriggerEventOutcomeReasonSchema","nullable","eventRefSchema","string","min","executionTriggerEventSummarySchema","object","event_ref","delivery_id","source","event","disposition","outcome","outcome_reason","received_at","stored_payload_bytes","number","int","nonnegative","normalized_event_bytes","strict","listExecutionTriggerEventsInputSchema","job_id","execution_id","limit","max","default","cursor","optional","getExecutionTriggerEventInputSchema","listExecutionTriggerEventsResultSchema","trigger_events","array","next_cursor","total","getExecutionTriggerEventResultSchema","extend","payload_preview","payload_preview_truncated","literal","payload_preview_total_bytes","uuid","type","format","dateTime","text","maxLength","eventRef","minLength","serializedJson","contentMediaType","schema","anyOf","listExecutionTriggerEventsInputJsonSchema","properties","minimum","maximum","required","additionalProperties","getExecutionTriggerEventInputJsonSchema","executionTriggerEventSummaryJson","executionTriggerEventDetailJson","const","listExecutionTriggerEventsResultJsonSchema","maxItems","items","getExecutionTriggerEventResultJsonSchema","value","JSON","parse"],"mappings":"AAAA,SAAQA,CAAC,QAAO,MAAM;AAEtB,SAAQC,2BAA2B,EAAEC,2BAA2B,QAAO,mBAAmB;AAC1F,SAAQC,cAAc,EAAEC,QAAQ,EAAEC,gBAAgB,QAAO,kBAAkB;AAE3E,kEAAkE,GAClE,OAAO,MAAMC,kDAAkD,GAAG;AAElE,sEAAsE,GACtE,OAAO,MAAMC,gDAAgDN,4BAA4B;AAEzF,oEAAoE,GACpE,OAAO,MAAMO,yDAAyD,KAAK,KAAK;AAEhF,MAAMC,aAAaJ,iBAAiBH;AACpC,MAAMQ,uBAAuBL,iBAC3BG,wDACAG,MAAM,CAACC,kBAAkB;IAACC,SAAS;AAAyC;AAE9E,MAAMC,yCAAyCd,EAAEe,IAAI,CAAC;IAAC;IAAQ;CAAU;AACzE,MAAMC,qCAAqChB,EAAEe,IAAI,CAAC;IAChD;I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