@paperclipai/shared 2026.824.0 → 2026.825.0-beta.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/dist/adapter-auth-check-code.d.ts +13 -0
- package/dist/adapter-auth-check-code.d.ts.map +1 -0
- package/dist/adapter-auth-check-code.js +13 -0
- package/dist/adapter-auth-check-code.js.map +1 -0
- package/dist/adapter-auth-check-code.test.d.ts +2 -0
- package/dist/adapter-auth-check-code.test.d.ts.map +1 -0
- package/dist/adapter-auth-check-code.test.js +8 -0
- package/dist/adapter-auth-check-code.test.js.map +1 -0
- package/dist/company-import-transfer.d.ts +3 -37
- package/dist/company-import-transfer.d.ts.map +1 -1
- package/dist/config-schema.d.ts +130 -1570
- package/dist/config-schema.d.ts.map +1 -1
- package/dist/config-schema.js +3 -7
- package/dist/config-schema.js.map +1 -1
- package/dist/constants.d.ts +3 -2
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +3 -0
- package/dist/constants.js.map +1 -1
- package/dist/environment-support.d.ts +1 -1
- package/dist/environment-support.d.ts.map +1 -1
- package/dist/environment-support.js +3 -2
- package/dist/environment-support.js.map +1 -1
- package/dist/environment-support.test.js +19 -0
- package/dist/environment-support.test.js.map +1 -1
- package/dist/feature-catalog.d.ts +7 -17
- package/dist/feature-catalog.d.ts.map +1 -1
- package/dist/feature-catalog.js +9 -2
- package/dist/feature-catalog.js.map +1 -1
- package/dist/frontmatter.d.ts +3 -13
- package/dist/frontmatter.d.ts.map +1 -1
- package/dist/frontmatter.js +2 -2
- package/dist/frontmatter.js.map +1 -1
- package/dist/index.d.ts +7 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -2
- package/dist/index.js.map +1 -1
- package/dist/markdown-work-products.d.ts +26 -0
- package/dist/markdown-work-products.d.ts.map +1 -0
- package/dist/markdown-work-products.js +70 -0
- package/dist/markdown-work-products.js.map +1 -0
- package/dist/markdown-work-products.test.d.ts +2 -0
- package/dist/markdown-work-products.test.d.ts.map +1 -0
- package/dist/markdown-work-products.test.js +122 -0
- package/dist/markdown-work-products.test.js.map +1 -0
- package/dist/node-version.d.ts +6 -0
- package/dist/node-version.d.ts.map +1 -0
- package/dist/node-version.js +46 -0
- package/dist/node-version.js.map +1 -0
- package/dist/runtime-exposure/loopback-bind.d.ts +2 -2
- package/dist/runtime-exposure/loopback-bind.d.ts.map +1 -1
- package/dist/runtime-exposure/loopback-bind.js +3 -3
- package/dist/runtime-exposure/loopback-bind.js.map +1 -1
- package/dist/runtime-exposure/loopback-bind.test.js +11 -10
- package/dist/runtime-exposure/loopback-bind.test.js.map +1 -1
- package/dist/settings-visibility.d.ts +62 -0
- package/dist/settings-visibility.d.ts.map +1 -0
- package/dist/settings-visibility.js +102 -0
- package/dist/settings-visibility.js.map +1 -0
- package/dist/settings-visibility.test.d.ts +2 -0
- package/dist/settings-visibility.test.d.ts.map +1 -0
- package/dist/settings-visibility.test.js +51 -0
- package/dist/settings-visibility.test.js.map +1 -0
- package/dist/telemetry/generated/paperclip-telemetry.d.ts +4 -2
- package/dist/telemetry/generated/paperclip-telemetry.d.ts.map +1 -1
- package/dist/telemetry/generated/paperclip-telemetry.js +2 -0
- package/dist/telemetry/generated/paperclip-telemetry.js.map +1 -1
- package/dist/types/environment.d.ts +20 -0
- package/dist/types/environment.d.ts.map +1 -1
- package/dist/types/index.d.ts +5 -3
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +1 -0
- package/dist/types/index.js.map +1 -1
- package/dist/types/instance.d.ts +7 -0
- package/dist/types/instance.d.ts.map +1 -1
- package/dist/types/instance.js.map +1 -1
- package/dist/types/issue.d.ts +19 -0
- package/dist/types/issue.d.ts.map +1 -1
- package/dist/types/plugin.d.ts +34 -4
- package/dist/types/plugin.d.ts.map +1 -1
- package/dist/types/workspace-operation.d.ts +1 -1
- package/dist/types/workspace-operation.d.ts.map +1 -1
- package/dist/types/workspace-readiness.d.ts +62 -0
- package/dist/types/workspace-readiness.d.ts.map +1 -0
- package/dist/types/workspace-readiness.js +28 -0
- package/dist/types/workspace-readiness.js.map +1 -0
- package/dist/types/workspace-runtime.d.ts +6 -8
- package/dist/types/workspace-runtime.d.ts.map +1 -1
- package/dist/validators/access.d.ts +143 -277
- package/dist/validators/access.d.ts.map +1 -1
- package/dist/validators/access.js +5 -5
- package/dist/validators/adapter-auth-session.d.ts +50 -97
- package/dist/validators/adapter-auth-session.d.ts.map +1 -1
- package/dist/validators/adapter-auth-session.js +3 -3
- package/dist/validators/adapter-registry.d.ts +8 -40
- package/dist/validators/adapter-registry.d.ts.map +1 -1
- package/dist/validators/adapter-registry.js +1 -1
- package/dist/validators/adapter-registry.js.map +1 -1
- package/dist/validators/adapter-skills.d.ts +71 -170
- package/dist/validators/adapter-skills.d.ts.map +1 -1
- package/dist/validators/adapter-skills.js +3 -3
- package/dist/validators/agent.d.ts +412 -4798
- package/dist/validators/agent.d.ts.map +1 -1
- package/dist/validators/agent.js +13 -13
- package/dist/validators/agent.js.map +1 -1
- package/dist/validators/app-definition.d.ts +270 -2315
- package/dist/validators/app-definition.d.ts.map +1 -1
- package/dist/validators/approval.d.ts +15 -36
- package/dist/validators/approval.d.ts.map +1 -1
- package/dist/validators/approval.js +2 -2
- package/dist/validators/artifact.d.ts +162 -893
- package/dist/validators/artifact.d.ts.map +1 -1
- package/dist/validators/artifact.js +6 -6
- package/dist/validators/asset.d.ts +1 -5
- package/dist/validators/asset.d.ts.map +1 -1
- package/dist/validators/budget.d.ts +19 -43
- package/dist/validators/budget.d.ts.map +1 -1
- package/dist/validators/budget.js +1 -1
- package/dist/validators/claude-setup-token-session.d.ts +61 -181
- package/dist/validators/claude-setup-token-session.d.ts.map +1 -1
- package/dist/validators/claude-setup-token-session.js +4 -4
- package/dist/validators/company-portability.d.ts +318 -3616
- package/dist/validators/company-portability.d.ts.map +1 -1
- package/dist/validators/company-portability.js +2 -2
- package/dist/validators/company-skill.d.ts +722 -2934
- package/dist/validators/company-skill.d.ts.map +1 -1
- package/dist/validators/company-skill.js +63 -63
- package/dist/validators/company.d.ts +162 -289
- package/dist/validators/company.d.ts.map +1 -1
- package/dist/validators/company.js +4 -3
- package/dist/validators/company.js.map +1 -1
- package/dist/validators/cost.d.ts +29 -57
- package/dist/validators/cost.d.ts.map +1 -1
- package/dist/validators/cost.js +5 -5
- package/dist/validators/decision-queue.d.ts +60 -108
- package/dist/validators/decision-queue.d.ts.map +1 -1
- package/dist/validators/decision.d.ts +230 -1884
- package/dist/validators/decision.d.ts.map +1 -1
- package/dist/validators/decision.js +9 -9
- package/dist/validators/document-annotation.d.ts +37 -203
- package/dist/validators/document-annotation.d.ts.map +1 -1
- package/dist/validators/document-annotation.js +3 -3
- package/dist/validators/environment-custom-images.d.ts +79 -173
- package/dist/validators/environment-custom-images.d.ts.map +1 -1
- package/dist/validators/environment-custom-images.js +14 -11
- package/dist/validators/environment-custom-images.js.map +1 -1
- package/dist/validators/environment.d.ts +82 -259
- package/dist/validators/environment.d.ts.map +1 -1
- package/dist/validators/execution-workspace.d.ts +173 -513
- package/dist/validators/execution-workspace.d.ts.map +1 -1
- package/dist/validators/execution-workspace.js +13 -13
- package/dist/validators/execution-workspace.js.map +1 -1
- package/dist/validators/external-object.d.ts +55 -27
- package/dist/validators/external-object.d.ts.map +1 -1
- package/dist/validators/external-object.js +1 -1
- package/dist/validators/external-object.js.map +1 -1
- package/dist/validators/feedback.d.ts +28 -19
- package/dist/validators/feedback.d.ts.map +1 -1
- package/dist/validators/feedback.js +1 -1
- package/dist/validators/finance.d.ts +69 -74
- package/dist/validators/finance.d.ts.map +1 -1
- package/dist/validators/finance.js +6 -6
- package/dist/validators/folder.d.ts +44 -205
- package/dist/validators/folder.d.ts.map +1 -1
- package/dist/validators/folder.js +7 -7
- package/dist/validators/goal.d.ts +26 -34
- package/dist/validators/goal.d.ts.map +1 -1
- package/dist/validators/goal.js +4 -3
- package/dist/validators/goal.js.map +1 -1
- package/dist/validators/inbox-agent-policy.d.ts +12 -16
- package/dist/validators/inbox-agent-policy.d.ts.map +1 -1
- package/dist/validators/inbox-agent-policy.js +1 -1
- package/dist/validators/index.d.ts +2 -2
- package/dist/validators/index.d.ts.map +1 -1
- package/dist/validators/index.js +2 -2
- package/dist/validators/index.js.map +1 -1
- package/dist/validators/instance.d.ts +50 -563
- package/dist/validators/instance.d.ts.map +1 -1
- package/dist/validators/instance.js +16 -6
- package/dist/validators/instance.js.map +1 -1
- package/dist/validators/instance.test.js +13 -0
- package/dist/validators/instance.test.js.map +1 -1
- package/dist/validators/issue-tree-control.d.ts +41 -80
- package/dist/validators/issue-tree-control.d.ts.map +1 -1
- package/dist/validators/issue.d.ts +1772 -12251
- package/dist/validators/issue.d.ts.map +1 -1
- package/dist/validators/issue.js +150 -84
- package/dist/validators/issue.js.map +1 -1
- package/dist/validators/onboarding-seed.d.ts +3 -37
- package/dist/validators/onboarding-seed.d.ts.map +1 -1
- package/dist/validators/partial.d.ts +4 -0
- package/dist/validators/partial.d.ts.map +1 -0
- package/dist/validators/partial.js +35 -0
- package/dist/validators/partial.js.map +1 -0
- package/dist/validators/pipeline.d.ts +218 -3882
- package/dist/validators/pipeline.d.ts.map +1 -1
- package/dist/validators/pipeline.js +11 -11
- package/dist/validators/plugin.d.ts +725 -2597
- package/dist/validators/plugin.d.ts.map +1 -1
- package/dist/validators/plugin.js +38 -6
- package/dist/validators/plugin.js.map +1 -1
- package/dist/validators/plugin.test.js +54 -10
- package/dist/validators/plugin.test.js.map +1 -1
- package/dist/validators/project.d.ts +345 -2406
- package/dist/validators/project.d.ts.map +1 -1
- package/dist/validators/project.js +8 -7
- package/dist/validators/project.js.map +1 -1
- package/dist/validators/resource-memberships.d.ts +11 -27
- package/dist/validators/resource-memberships.d.ts.map +1 -1
- package/dist/validators/routine.d.ts +362 -1297
- package/dist/validators/routine.d.ts.map +1 -1
- package/dist/validators/routine.js +21 -20
- package/dist/validators/routine.js.map +1 -1
- package/dist/validators/runtime-exposure.d.ts +31 -80
- package/dist/validators/runtime-exposure.d.ts.map +1 -1
- package/dist/validators/search.d.ts +25 -93
- package/dist/validators/search.d.ts.map +1 -1
- package/dist/validators/secret.d.ts +174 -655
- package/dist/validators/secret.d.ts.map +1 -1
- package/dist/validators/secret.js +14 -14
- package/dist/validators/secret.js.map +1 -1
- package/dist/validators/sidebar-preferences.d.ts +5 -15
- package/dist/validators/sidebar-preferences.d.ts.map +1 -1
- package/dist/validators/sidebar-preferences.js +1 -1
- package/dist/validators/skill-policy.d.ts +184 -561
- package/dist/validators/skill-policy.d.ts.map +1 -1
- package/dist/validators/skill-policy.js +4 -4
- package/dist/validators/smoke-lab.d.ts +53 -37
- package/dist/validators/smoke-lab.d.ts.map +1 -1
- package/dist/validators/status-card.d.ts +139 -994
- package/dist/validators/status-card.d.ts.map +1 -1
- package/dist/validators/status-card.js +21 -21
- package/dist/validators/status-card.js.map +1 -1
- package/dist/validators/summary-slot.d.ts +28 -50
- package/dist/validators/summary-slot.d.ts.map +1 -1
- package/dist/validators/summary-slot.js +3 -3
- package/dist/validators/teams-catalog.d.ts +209 -472
- package/dist/validators/teams-catalog.d.ts.map +1 -1
- package/dist/validators/text.d.ts +1 -1
- package/dist/validators/text.d.ts.map +1 -1
- package/dist/validators/tool-access.d.ts +1088 -4670
- package/dist/validators/tool-access.d.ts.map +1 -1
- package/dist/validators/tool-access.js +96 -95
- package/dist/validators/tool-access.js.map +1 -1
- package/dist/validators/trust-policy.d.ts +62 -358
- package/dist/validators/trust-policy.d.ts.map +1 -1
- package/dist/validators/trust-policy.js +12 -12
- package/dist/validators/work-product.d.ts +110 -536
- package/dist/validators/work-product.d.ts.map +1 -1
- package/dist/validators/work-product.js +7 -6
- package/dist/validators/work-product.js.map +1 -1
- package/dist/validators/workspace-file-resource.d.ts +163 -618
- package/dist/validators/workspace-file-resource.d.ts.map +1 -1
- package/dist/validators/workspace-file-resource.js +11 -11
- package/dist/workspace-commands.d.ts +4 -2
- package/dist/workspace-commands.d.ts.map +1 -1
- package/dist/workspace-commands.js +9 -1
- package/dist/workspace-commands.js.map +1 -1
- package/dist/workspace-commands.test.js +45 -0
- package/dist/workspace-commands.test.js.map +1 -1
- package/dist/worktree-port-registry.d.ts +5 -0
- package/dist/worktree-port-registry.d.ts.map +1 -0
- package/dist/worktree-port-registry.js +382 -0
- package/dist/worktree-port-registry.js.map +1 -0
- package/dist/worktree-port-registry.test.d.ts +2 -0
- package/dist/worktree-port-registry.test.d.ts.map +1 -0
- package/dist/worktree-port-registry.test.js +118 -0
- package/dist/worktree-port-registry.test.js.map +1 -0
- package/dist/worktree-seed-source.d.ts +43 -0
- package/dist/worktree-seed-source.d.ts.map +1 -0
- package/dist/worktree-seed-source.js +180 -0
- package/dist/worktree-seed-source.js.map +1 -0
- package/dist/worktree-seed-source.test.d.ts +2 -0
- package/dist/worktree-seed-source.test.d.ts.map +1 -0
- package/dist/worktree-seed-source.test.js +166 -0
- package/dist/worktree-seed-source.test.js.map +1 -0
- package/package.json +6 -3
package/dist/validators/issue.js
CHANGED
|
@@ -2,6 +2,7 @@ import { z } from "zod";
|
|
|
2
2
|
import { ISSUE_EXECUTION_DECISION_OUTCOMES, ISSUE_EXECUTION_MONITOR_CLEAR_REASONS, ISSUE_EXECUTION_MONITOR_KINDS, ISSUE_EXECUTION_MONITOR_RECOVERY_POLICIES, ISSUE_EXECUTION_MONITOR_STATE_STATUSES, ISSUE_EXECUTION_POLICY_MODES, ISSUE_EXECUTION_STAGE_TYPES, ISSUE_EXECUTION_STATE_STATUSES, ISSUE_COMMENT_AUTHOR_TYPES, ISSUE_COMMENT_METADATA_ROW_TYPES, ISSUE_COMMENT_PRESENTATION_KINDS, ISSUE_COMMENT_PRESENTATION_TONES, ISSUE_COMMENT_PRESENTATION_DENSITIES, ISSUE_HARNESS_KINDS, ISSUE_MONITOR_SCHEDULED_BY, ISSUE_PRIORITIES, ISSUE_RECOVERY_ACTION_KINDS, ISSUE_RECOVERY_ACTION_OUTCOMES, ISSUE_RECOVERY_ACTION_OWNER_TYPES, ISSUE_RECOVERY_ACTION_STATUSES, ISSUE_REVIEW_POLICIES, ISSUE_WORK_MODES, clampIssueRequestDepth, ISSUE_STATUSES, ISSUE_THREAD_INTERACTION_CONTINUATION_POLICIES, ISSUE_THREAD_INTERACTION_CANONICAL_RESOLVER_POLICIES, ISSUE_THREAD_INTERACTION_EFFECTIVE_RESOLVER_POLICY_SOURCES, ISSUE_THREAD_INTERACTION_KINDS, ISSUE_THREAD_INTERACTION_RESOLVER_POLICIES, ISSUE_THREAD_INTERACTION_RESOLVER_POLICY_PROVENANCES, ISSUE_THREAD_INTERACTION_STATUSES, ISSUE_WATCHDOG_DISCOVERY_KINDS, MODEL_PROFILE_KEYS, REQUEST_CHECKBOX_CONFIRMATION_OPTION_LIMIT, REQUEST_ITEM_VERDICTS_ITEM_LIMIT, } from "../constants.js";
|
|
3
3
|
import { multilineTextSchema } from "./text.js";
|
|
4
4
|
import { lowTrustReviewPresetPolicySchema, trustAuthorizationPolicySchema } from "./trust-policy.js";
|
|
5
|
+
import { objectWithoutDefaults } from "./partial.js";
|
|
5
6
|
export const issueBlockedInboxStateSchema = z.enum([
|
|
6
7
|
"needs_attention",
|
|
7
8
|
"awaiting_decision",
|
|
@@ -25,12 +26,12 @@ export const issueBlockedInboxReasonSchema = z.enum([
|
|
|
25
26
|
"open_recovery_issue",
|
|
26
27
|
]);
|
|
27
28
|
export const issueBlockedInboxIssueRefSchema = z.object({
|
|
28
|
-
id: z.string().
|
|
29
|
+
id: z.string().guid(),
|
|
29
30
|
identifier: z.string().nullable(),
|
|
30
31
|
title: z.string(),
|
|
31
32
|
status: z.enum(ISSUE_STATUSES),
|
|
32
33
|
priority: z.enum(ISSUE_PRIORITIES),
|
|
33
|
-
assigneeAgentId: z.string().
|
|
34
|
+
assigneeAgentId: z.string().guid().nullable(),
|
|
34
35
|
assigneeUserId: z.string().nullable(),
|
|
35
36
|
}).strict();
|
|
36
37
|
export const issueBlockedInboxAttentionSchema = z.object({
|
|
@@ -41,7 +42,7 @@ export const issueBlockedInboxAttentionSchema = z.object({
|
|
|
41
42
|
stoppedSinceAt: z.string().datetime().nullable(),
|
|
42
43
|
owner: z.object({
|
|
43
44
|
type: z.enum(["agent", "user", "board", "external", "unknown"]),
|
|
44
|
-
agentId: z.string().
|
|
45
|
+
agentId: z.string().guid().nullable(),
|
|
45
46
|
userId: z.string().nullable(),
|
|
46
47
|
label: z.string().nullable(),
|
|
47
48
|
}).strict(),
|
|
@@ -52,8 +53,8 @@ export const issueBlockedInboxAttentionSchema = z.object({
|
|
|
52
53
|
sourceIssue: issueBlockedInboxIssueRefSchema.nullable(),
|
|
53
54
|
leafIssue: issueBlockedInboxIssueRefSchema.nullable(),
|
|
54
55
|
recoveryIssue: issueBlockedInboxIssueRefSchema.nullable(),
|
|
55
|
-
approvalId: z.string().
|
|
56
|
-
interactionId: z.string().
|
|
56
|
+
approvalId: z.string().guid().nullable(),
|
|
57
|
+
interactionId: z.string().guid().nullable(),
|
|
57
58
|
sampleIssueIdentifier: z.string().nullable(),
|
|
58
59
|
redaction: z.object({
|
|
59
60
|
externalDetailsRedacted: z.boolean(),
|
|
@@ -68,17 +69,55 @@ export const ISSUE_EXECUTION_WORKSPACE_PREFERENCES = [
|
|
|
68
69
|
"reuse_existing",
|
|
69
70
|
"agent_default",
|
|
70
71
|
];
|
|
72
|
+
// Mirrors git check-ref-format for a single branch name. The runtime verifies
|
|
73
|
+
// the branch actually exists before attaching, so this only rejects values
|
|
74
|
+
// that could never be a branch (path escapes, option injection, ref syntax).
|
|
75
|
+
export function isValidExistingBranchName(value) {
|
|
76
|
+
if (value.length === 0 || value.length > 255)
|
|
77
|
+
return false;
|
|
78
|
+
if (value.startsWith("-") || value.startsWith("/") || value.startsWith("."))
|
|
79
|
+
return false;
|
|
80
|
+
if (value.endsWith("/") || value.endsWith(".") || value.endsWith(".lock"))
|
|
81
|
+
return false;
|
|
82
|
+
if (value.includes("..") || value.includes("//") || value.includes("@{") || value.includes("/."))
|
|
83
|
+
return false;
|
|
84
|
+
// eslint-disable-next-line no-control-regex
|
|
85
|
+
if (/[\x00-\x20\x7f~^:?*[\\]/.test(value))
|
|
86
|
+
return false;
|
|
87
|
+
return true;
|
|
88
|
+
}
|
|
71
89
|
const executionWorkspaceStrategySchema = z
|
|
72
90
|
.object({
|
|
73
91
|
type: z.enum(["project_primary", "git_worktree", "adapter_managed", "cloud_sandbox"]).optional(),
|
|
74
92
|
baseRef: z.string().optional().nullable(),
|
|
75
93
|
branchTemplate: z.string().optional().nullable(),
|
|
94
|
+
existingBranch: z.string().trim().refine(isValidExistingBranchName, {
|
|
95
|
+
message: "existingBranch must be a valid git branch name",
|
|
96
|
+
}).optional().nullable(),
|
|
76
97
|
worktreeParentDir: z.string().optional().nullable(),
|
|
77
98
|
provisionCommand: z.string().optional().nullable(),
|
|
78
99
|
runtimeProvisionCommand: z.string().optional().nullable(),
|
|
79
100
|
teardownCommand: z.string().optional().nullable(),
|
|
80
101
|
})
|
|
81
|
-
.strict()
|
|
102
|
+
.strict()
|
|
103
|
+
.superRefine((strategy, ctx) => {
|
|
104
|
+
if (!strategy.existingBranch)
|
|
105
|
+
return;
|
|
106
|
+
if (strategy.type !== "git_worktree") {
|
|
107
|
+
ctx.addIssue({
|
|
108
|
+
code: z.ZodIssueCode.custom,
|
|
109
|
+
path: ["existingBranch"],
|
|
110
|
+
message: "existingBranch requires workspaceStrategy.type \"git_worktree\"",
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
if (strategy.branchTemplate) {
|
|
114
|
+
ctx.addIssue({
|
|
115
|
+
code: z.ZodIssueCode.custom,
|
|
116
|
+
path: ["existingBranch"],
|
|
117
|
+
message: "existingBranch and branchTemplate are mutually exclusive",
|
|
118
|
+
});
|
|
119
|
+
}
|
|
120
|
+
});
|
|
82
121
|
const ipv4CidrPattern = /^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\/(?:3[0-2]|[12]?\d)$/;
|
|
83
122
|
const protectedTaskEgressCidrs = [
|
|
84
123
|
"0.0.0.0/8",
|
|
@@ -113,7 +152,7 @@ export const issueExecutionWorkspaceSettingsSchema = z
|
|
|
113
152
|
.object({
|
|
114
153
|
mode: z.enum(ISSUE_EXECUTION_WORKSPACE_PREFERENCES).optional(),
|
|
115
154
|
sharedWorkspaceConcurrency: z.enum(["auto", "serialize", "allow"]).optional(),
|
|
116
|
-
environmentId: z.string().
|
|
155
|
+
environmentId: z.string().guid().optional().nullable(),
|
|
117
156
|
workspaceStrategy: executionWorkspaceStrategySchema.optional().nullable(),
|
|
118
157
|
workspaceRuntime: z.record(z.string(), z.unknown()).optional().nullable(),
|
|
119
158
|
networkEgress: z.object({
|
|
@@ -121,7 +160,16 @@ export const issueExecutionWorkspaceSettingsSchema = z
|
|
|
121
160
|
allowCidrs: z.array(z.string().trim().regex(ipv4CidrPattern, "Invalid IPv4 CIDR (must use octets 0-255 and prefix 0-32)").max(64).refine(isAllowedTaskEgressCidr, "Task-scoped network egress CIDRs cannot overlap private, loopback, link-local, CGNAT, or multicast ranges")).max(100).optional(),
|
|
122
161
|
}).strict().optional().nullable(),
|
|
123
162
|
})
|
|
124
|
-
.strict()
|
|
163
|
+
.strict()
|
|
164
|
+
.superRefine((settings, ctx) => {
|
|
165
|
+
if (settings.workspaceStrategy?.existingBranch && settings.mode !== "isolated_workspace") {
|
|
166
|
+
ctx.addIssue({
|
|
167
|
+
code: z.ZodIssueCode.custom,
|
|
168
|
+
path: ["workspaceStrategy", "existingBranch"],
|
|
169
|
+
message: "existingBranch requires mode \"isolated_workspace\"",
|
|
170
|
+
});
|
|
171
|
+
}
|
|
172
|
+
});
|
|
125
173
|
export const issueAssigneeAdapterOverridesSchema = z
|
|
126
174
|
.object({
|
|
127
175
|
modelProfile: z.enum(MODEL_PROFILE_KEYS).optional(),
|
|
@@ -131,7 +179,7 @@ export const issueAssigneeAdapterOverridesSchema = z
|
|
|
131
179
|
.strict();
|
|
132
180
|
const issueExecutionStagePrincipalBaseSchema = z.object({
|
|
133
181
|
type: z.enum(["agent", "user"]),
|
|
134
|
-
agentId: z.string().
|
|
182
|
+
agentId: z.string().guid().optional().nullable(),
|
|
135
183
|
userId: z.string().optional().nullable(),
|
|
136
184
|
});
|
|
137
185
|
export const issueExecutionStagePrincipalSchema = issueExecutionStagePrincipalBaseSchema
|
|
@@ -153,7 +201,7 @@ export const issueExecutionStagePrincipalSchema = issueExecutionStagePrincipalBa
|
|
|
153
201
|
}
|
|
154
202
|
});
|
|
155
203
|
export const issueExecutionStageParticipantSchema = issueExecutionStagePrincipalBaseSchema.extend({
|
|
156
|
-
id: z.string().
|
|
204
|
+
id: z.string().guid().optional(),
|
|
157
205
|
}).superRefine((value, ctx) => {
|
|
158
206
|
if (value.type === "agent") {
|
|
159
207
|
if (!value.agentId) {
|
|
@@ -172,7 +220,7 @@ export const issueExecutionStageParticipantSchema = issueExecutionStagePrincipal
|
|
|
172
220
|
}
|
|
173
221
|
});
|
|
174
222
|
export const issueExecutionStageSchema = z.object({
|
|
175
|
-
id: z.string().
|
|
223
|
+
id: z.string().guid().optional(),
|
|
176
224
|
type: z.enum(ISSUE_EXECUTION_STAGE_TYPES),
|
|
177
225
|
approvalsNeeded: z.literal(1).optional().default(1),
|
|
178
226
|
participants: z.array(issueExecutionStageParticipantSchema).default([]),
|
|
@@ -218,30 +266,30 @@ export const issueReviewRequestSchema = z.object({
|
|
|
218
266
|
}).strict();
|
|
219
267
|
export const issueExecutionStateSchema = z.object({
|
|
220
268
|
status: z.enum(ISSUE_EXECUTION_STATE_STATUSES),
|
|
221
|
-
currentStageId: z.string().
|
|
269
|
+
currentStageId: z.string().guid().nullable(),
|
|
222
270
|
currentStageIndex: z.number().int().nonnegative().nullable(),
|
|
223
271
|
currentStageType: z.enum(ISSUE_EXECUTION_STAGE_TYPES).nullable(),
|
|
224
272
|
currentParticipant: issueExecutionStagePrincipalSchema.nullable(),
|
|
225
273
|
returnAssignee: issueExecutionStagePrincipalSchema.nullable(),
|
|
226
274
|
reviewRequest: issueReviewRequestSchema.nullable().optional().default(null),
|
|
227
|
-
completedStageIds: z.array(z.string().
|
|
228
|
-
lastDecisionId: z.string().
|
|
275
|
+
completedStageIds: z.array(z.string().guid()).default([]),
|
|
276
|
+
lastDecisionId: z.string().guid().nullable(),
|
|
229
277
|
lastDecisionOutcome: z.enum(ISSUE_EXECUTION_DECISION_OUTCOMES).nullable(),
|
|
230
278
|
monitor: issueExecutionMonitorStateSchema.optional().nullable(),
|
|
231
279
|
changesRequestedCount: z.number().int().nonnegative().optional().default(0),
|
|
232
280
|
});
|
|
233
281
|
export const issueRecoveryActionReadModelSchema = z.object({
|
|
234
|
-
id: z.string().
|
|
235
|
-
companyId: z.string().
|
|
236
|
-
sourceIssueId: z.string().
|
|
237
|
-
recoveryIssueId: z.string().
|
|
282
|
+
id: z.string().guid(),
|
|
283
|
+
companyId: z.string().guid(),
|
|
284
|
+
sourceIssueId: z.string().guid(),
|
|
285
|
+
recoveryIssueId: z.string().guid().nullable(),
|
|
238
286
|
kind: z.enum(ISSUE_RECOVERY_ACTION_KINDS),
|
|
239
287
|
status: z.enum(ISSUE_RECOVERY_ACTION_STATUSES),
|
|
240
288
|
ownerType: z.enum(ISSUE_RECOVERY_ACTION_OWNER_TYPES),
|
|
241
|
-
ownerAgentId: z.string().
|
|
289
|
+
ownerAgentId: z.string().guid().nullable(),
|
|
242
290
|
ownerUserId: z.string().nullable(),
|
|
243
|
-
previousOwnerAgentId: z.string().
|
|
244
|
-
returnOwnerAgentId: z.string().
|
|
291
|
+
previousOwnerAgentId: z.string().guid().nullable(),
|
|
292
|
+
returnOwnerAgentId: z.string().guid().nullable(),
|
|
245
293
|
cause: z.string().min(1),
|
|
246
294
|
fingerprint: z.string().min(1),
|
|
247
295
|
evidence: z.record(z.string(), z.unknown()),
|
|
@@ -265,7 +313,7 @@ const RESOLVE_ISSUE_RECOVERY_ACTION_OUTCOMES = [
|
|
|
265
313
|
"cancelled",
|
|
266
314
|
];
|
|
267
315
|
export const resolveIssueRecoveryActionSchema = z.object({
|
|
268
|
-
actionId: z.string().
|
|
316
|
+
actionId: z.string().guid().optional(),
|
|
269
317
|
outcome: z.enum(RESOLVE_ISSUE_RECOVERY_ACTION_OUTCOMES),
|
|
270
318
|
sourceIssueStatus: z.enum(["todo", "done", "in_review", "blocked"]),
|
|
271
319
|
resolutionNote: multilineTextSchema.optional().nullable(),
|
|
@@ -339,20 +387,20 @@ function withCreateIssueStatusDefault(schema) {
|
|
|
339
387
|
}, schema);
|
|
340
388
|
}
|
|
341
389
|
const createIssueBaseSchema = z.object({
|
|
342
|
-
projectId: z.string().
|
|
343
|
-
projectWorkspaceId: z.string().
|
|
344
|
-
goalId: z.string().
|
|
345
|
-
parentId: z.string().
|
|
346
|
-
blockedByIssueIds: z.array(z.string().
|
|
390
|
+
projectId: z.string().guid().optional().nullable(),
|
|
391
|
+
projectWorkspaceId: z.string().guid().optional().nullable(),
|
|
392
|
+
goalId: z.string().guid().optional().nullable(),
|
|
393
|
+
parentId: z.string().guid().optional().nullable(),
|
|
394
|
+
blockedByIssueIds: z.array(z.string().guid()).optional(),
|
|
347
395
|
unblockDescriptor: z.object({
|
|
348
396
|
owner: z.union([
|
|
349
|
-
z.object({ agentId: z.string().
|
|
397
|
+
z.object({ agentId: z.string().guid() }).strict(),
|
|
350
398
|
z.object({ userId: z.string().trim().min(1) }).strict(),
|
|
351
399
|
z.literal("board"),
|
|
352
400
|
]),
|
|
353
401
|
action: multilineTextSchema.pipe(z.string().trim().min(1).max(2_000)),
|
|
354
402
|
}).strict().optional().nullable(),
|
|
355
|
-
inheritExecutionWorkspaceFromIssueId: z.string().
|
|
403
|
+
inheritExecutionWorkspaceFromIssueId: z.string().guid().optional().nullable(),
|
|
356
404
|
title: z.string().min(1),
|
|
357
405
|
description: multilineTextSchema.optional().nullable(),
|
|
358
406
|
status: z.enum(ISSUE_STATUSES),
|
|
@@ -360,7 +408,7 @@ const createIssueBaseSchema = z.object({
|
|
|
360
408
|
harnessKind: z.enum(ISSUE_HARNESS_KINDS).optional().nullable(),
|
|
361
409
|
priority: z.enum(ISSUE_PRIORITIES).optional().default("medium"),
|
|
362
410
|
reviewPolicy: z.enum(ISSUE_REVIEW_POLICIES).optional().nullable(),
|
|
363
|
-
assigneeAgentId: z.string().
|
|
411
|
+
assigneeAgentId: z.string().guid().optional().nullable(),
|
|
364
412
|
assigneeUserId: z.string().optional().nullable(),
|
|
365
413
|
requestDepth: issueRequestDepthInputSchema.optional().default(0),
|
|
366
414
|
createdByUserId: z.string().optional().nullable(),
|
|
@@ -368,16 +416,16 @@ const createIssueBaseSchema = z.object({
|
|
|
368
416
|
billingCode: z.string().optional().nullable(),
|
|
369
417
|
assigneeAdapterOverrides: issueAssigneeAdapterOverridesSchema.optional().nullable(),
|
|
370
418
|
executionPolicy: issueExecutionPolicySchema.optional().nullable(),
|
|
371
|
-
executionWorkspaceId: z.string().
|
|
419
|
+
executionWorkspaceId: z.string().guid().optional().nullable(),
|
|
372
420
|
executionWorkspacePreference: z.enum(ISSUE_EXECUTION_WORKSPACE_PREFERENCES).optional().nullable(),
|
|
373
421
|
executionWorkspaceSettings: issueExecutionWorkspaceSettingsSchema.optional().nullable(),
|
|
374
|
-
labelIds: z.array(z.string().
|
|
422
|
+
labelIds: z.array(z.string().guid()).optional(),
|
|
375
423
|
watchdogDiscovery: z.object({
|
|
376
424
|
kind: z.enum(ISSUE_WATCHDOG_DISCOVERY_KINDS),
|
|
377
425
|
evidenceMarkdown: multilineTextSchema.optional().nullable(),
|
|
378
426
|
}).strict().optional().nullable(),
|
|
379
427
|
watchdog: z.object({
|
|
380
|
-
agentId: z.string().
|
|
428
|
+
agentId: z.string().guid(),
|
|
381
429
|
instructions: multilineTextSchema.optional().nullable(),
|
|
382
430
|
}).strict().optional().nullable(),
|
|
383
431
|
});
|
|
@@ -413,7 +461,7 @@ export const createIssueSchema = withCreateIssueStatusDefault(createIssueBaseSch
|
|
|
413
461
|
...onboardingFirstTaskMarkerSchema,
|
|
414
462
|
})).superRefine(requireBlockedStatusForUnblockDescriptor);
|
|
415
463
|
export const upsertIssueWatchdogSchema = z.object({
|
|
416
|
-
agentId: z.string().
|
|
464
|
+
agentId: z.string().guid(),
|
|
417
465
|
instructions: multilineTextSchema.optional().nullable(),
|
|
418
466
|
}).strict();
|
|
419
467
|
export const createChildIssueSchema = withCreateIssueStatusDefault(createIssueBaseSchema
|
|
@@ -427,23 +475,23 @@ export const createChildIssueSchema = withCreateIssueStatusDefault(createIssueBa
|
|
|
427
475
|
blockParentUntilDone: z.boolean().optional().default(false),
|
|
428
476
|
})).superRefine(requireBlockedStatusForUnblockDescriptor);
|
|
429
477
|
export const createAcceptedPlanDecompositionSchema = z.object({
|
|
430
|
-
acceptedPlanRevisionId: z.string().
|
|
478
|
+
acceptedPlanRevisionId: z.string().guid(),
|
|
431
479
|
children: z.array(createChildIssueSchema).min(1).max(25),
|
|
432
480
|
});
|
|
433
481
|
export const createIssueLabelSchema = z.object({
|
|
434
482
|
name: z.string().trim().min(1).max(48),
|
|
435
483
|
color: z.string().regex(/^#(?:[0-9a-fA-F]{6})$/, "Color must be a 6-digit hex value"),
|
|
436
484
|
});
|
|
437
|
-
export const updateIssueSchema = createIssueBaseSchema.omit({
|
|
485
|
+
export const updateIssueSchema = objectWithoutDefaults(createIssueBaseSchema.omit({
|
|
438
486
|
createdByUserId: true,
|
|
439
487
|
responsibleUserId: true,
|
|
440
488
|
watchdog: true,
|
|
441
|
-
}).partial().extend({
|
|
489
|
+
})).partial().extend({
|
|
442
490
|
requestDepth: issueRequestDepthInputSchema.optional(),
|
|
443
491
|
assigneeAgentId: z.string().trim().min(1).optional().nullable(),
|
|
444
492
|
comment: multilineTextSchema.pipe(z.string().min(1)).optional(),
|
|
445
493
|
onBehalfOfUserId: z.string().trim().min(1).optional().nullable(),
|
|
446
|
-
reviewInteractionId: z.string().
|
|
494
|
+
reviewInteractionId: z.string().guid().optional(),
|
|
447
495
|
reviewRequest: issueReviewRequestSchema.optional().nullable(),
|
|
448
496
|
reopen: z.boolean().optional(),
|
|
449
497
|
resume: z.boolean().optional(),
|
|
@@ -463,7 +511,7 @@ export const stalledReviewDecisionSchema = z.object({
|
|
|
463
511
|
}
|
|
464
512
|
});
|
|
465
513
|
export const checkoutIssueSchema = z.object({
|
|
466
|
-
agentId: z.string().
|
|
514
|
+
agentId: z.string().guid(),
|
|
467
515
|
expectedStatuses: z.array(z.enum(ISSUE_STATUSES)).nonempty(),
|
|
468
516
|
});
|
|
469
517
|
const commentMetadataLabelSchema = z.string().trim().min(1).max(120);
|
|
@@ -496,19 +544,19 @@ const issueCommentMetadataKeyValueRowSchema = issueCommentMetadataBaseRowSchema.
|
|
|
496
544
|
}).strict();
|
|
497
545
|
const issueCommentMetadataIssueLinkRowSchema = issueCommentMetadataBaseRowSchema.extend({
|
|
498
546
|
type: z.literal("issue_link"),
|
|
499
|
-
issueId: z.string().
|
|
547
|
+
issueId: z.string().guid().nullable().optional(),
|
|
500
548
|
identifier: z.string().trim().min(1).max(80).nullable().optional(),
|
|
501
549
|
title: z.string().trim().min(1).max(240).nullable().optional(),
|
|
502
550
|
}).strict();
|
|
503
551
|
const issueCommentMetadataAgentLinkRowSchema = issueCommentMetadataBaseRowSchema.extend({
|
|
504
552
|
type: z.literal("agent_link"),
|
|
505
|
-
agentId: z.string().
|
|
553
|
+
agentId: z.string().guid(),
|
|
506
554
|
name: z.string().trim().min(1).max(160).nullable().optional(),
|
|
507
555
|
}).strict();
|
|
508
556
|
const issueCommentMetadataRunLinkRowSchema = issueCommentMetadataBaseRowSchema.extend({
|
|
509
557
|
type: z.literal("run_link"),
|
|
510
|
-
runId: z.string().
|
|
511
|
-
agentId: z.string().
|
|
558
|
+
runId: z.string().guid(),
|
|
559
|
+
agentId: z.string().guid().nullable().optional(),
|
|
512
560
|
title: z.string().trim().min(1).max(160).nullable().optional(),
|
|
513
561
|
}).strict();
|
|
514
562
|
export const issueCommentMetadataRowSchema = z.discriminatedUnion("type", [
|
|
@@ -533,7 +581,7 @@ export const issueCommentMetadataSectionSchema = z.object({
|
|
|
533
581
|
}).strict();
|
|
534
582
|
export const issueCommentMetadataSchema = z.object({
|
|
535
583
|
version: z.literal(1),
|
|
536
|
-
sourceRunId: z.string().
|
|
584
|
+
sourceRunId: z.string().guid().nullable().optional(),
|
|
537
585
|
authorizationReason: z.string().trim().min(1).max(160).nullable().optional(),
|
|
538
586
|
sections: z.array(issueCommentMetadataSectionSchema).min(1).max(20),
|
|
539
587
|
}).strict();
|
|
@@ -569,15 +617,15 @@ export const issueDocumentKeySchema = z
|
|
|
569
617
|
export const suggestedTaskDraftSchema = z.object({
|
|
570
618
|
clientKey: z.string().trim().min(1).max(120),
|
|
571
619
|
parentClientKey: z.string().trim().min(1).max(120).nullable().optional(),
|
|
572
|
-
parentId: z.string().
|
|
620
|
+
parentId: z.string().guid().nullable().optional(),
|
|
573
621
|
title: z.string().trim().min(1).max(240),
|
|
574
622
|
description: multilineTextSchema.pipe(z.string().trim().max(20000)).nullable().optional(),
|
|
575
623
|
priority: z.enum(ISSUE_PRIORITIES).nullable().optional(),
|
|
576
624
|
workMode: z.enum(ISSUE_WORK_MODES).nullable().optional(),
|
|
577
|
-
assigneeAgentId: z.string().
|
|
625
|
+
assigneeAgentId: z.string().guid().nullable().optional(),
|
|
578
626
|
assigneeUserId: z.string().trim().min(1).nullable().optional(),
|
|
579
|
-
projectId: z.string().
|
|
580
|
-
goalId: z.string().
|
|
627
|
+
projectId: z.string().guid().nullable().optional(),
|
|
628
|
+
goalId: z.string().guid().nullable().optional(),
|
|
581
629
|
billingCode: z.string().trim().max(120).nullable().optional(),
|
|
582
630
|
labels: z.array(z.string().trim().min(1).max(48)).max(20).optional(),
|
|
583
631
|
hiddenInPreview: z.boolean().optional(),
|
|
@@ -592,7 +640,7 @@ export const suggestedTaskDraftSchema = z.object({
|
|
|
592
640
|
});
|
|
593
641
|
export const suggestTasksPayloadSchema = z.object({
|
|
594
642
|
version: z.literal(1),
|
|
595
|
-
defaultParentId: z.string().
|
|
643
|
+
defaultParentId: z.string().guid().nullable().optional(),
|
|
596
644
|
tasks: z.array(suggestedTaskDraftSchema).min(1).max(50),
|
|
597
645
|
}).superRefine((value, ctx) => {
|
|
598
646
|
const seenClientKeys = new Set();
|
|
@@ -610,10 +658,10 @@ export const suggestTasksPayloadSchema = z.object({
|
|
|
610
658
|
});
|
|
611
659
|
export const suggestTasksResultCreatedTaskSchema = z.object({
|
|
612
660
|
clientKey: z.string().trim().min(1).max(120),
|
|
613
|
-
issueId: z.string().
|
|
661
|
+
issueId: z.string().guid(),
|
|
614
662
|
identifier: z.string().trim().min(1).nullable().optional(),
|
|
615
663
|
title: z.string().trim().min(1).nullable().optional(),
|
|
616
|
-
parentIssueId: z.string().
|
|
664
|
+
parentIssueId: z.string().guid().nullable().optional(),
|
|
617
665
|
parentIdentifier: z.string().trim().min(1).nullable().optional(),
|
|
618
666
|
});
|
|
619
667
|
export const suggestTasksResultSchema = z.object({
|
|
@@ -695,10 +743,10 @@ export const askUserQuestionsResultSchema = z.object({
|
|
|
695
743
|
cancelled: z.literal(true).optional(),
|
|
696
744
|
cancellationReason: z.string().trim().max(4000).nullable().optional(),
|
|
697
745
|
expirationReason: z.enum(["superseded_by_comment", "superseded_by_newer_interaction"]).optional(),
|
|
698
|
-
commentId: z.string().
|
|
746
|
+
commentId: z.string().guid().nullable().optional(),
|
|
699
747
|
// Set alongside expirationReason "superseded_by_newer_interaction": the id of
|
|
700
748
|
// the newer sibling ask_user_questions that replaced this one (PAP-437).
|
|
701
|
-
supersededByInteractionId: z.string().
|
|
749
|
+
supersededByInteractionId: z.string().guid().nullable().optional(),
|
|
702
750
|
summaryMarkdown: z.string().max(20000).nullable().optional(),
|
|
703
751
|
});
|
|
704
752
|
const requestConfirmationHrefSchema = z.string().trim().min(1).max(2000).refine((value) => {
|
|
@@ -714,10 +762,10 @@ const requestConfirmationTargetBaseSchema = z.object({
|
|
|
714
762
|
});
|
|
715
763
|
export const requestConfirmationIssueDocumentTargetSchema = requestConfirmationTargetBaseSchema.extend({
|
|
716
764
|
type: z.literal("issue_document"),
|
|
717
|
-
issueId: z.string().
|
|
718
|
-
documentId: z.string().
|
|
765
|
+
issueId: z.string().guid().nullable().optional(),
|
|
766
|
+
documentId: z.string().guid().nullable().optional(),
|
|
719
767
|
key: issueDocumentKeySchema,
|
|
720
|
-
revisionId: z.string().
|
|
768
|
+
revisionId: z.string().guid(),
|
|
721
769
|
revisionNumber: z.number().int().positive().nullable().optional(),
|
|
722
770
|
});
|
|
723
771
|
export const requestConfirmationCustomTargetSchema = requestConfirmationTargetBaseSchema.extend({
|
|
@@ -732,12 +780,12 @@ export const requestConfirmationTargetSchema = z.discriminatedUnion("type", [
|
|
|
732
780
|
]);
|
|
733
781
|
export const requestConfirmationToolActionPayloadSchema = z.object({
|
|
734
782
|
version: z.literal(1),
|
|
735
|
-
actionRequestId: z.string().
|
|
736
|
-
invocationId: z.string().
|
|
783
|
+
actionRequestId: z.string().guid(),
|
|
784
|
+
invocationId: z.string().guid(),
|
|
737
785
|
toolName: z.string().trim().min(1).max(500),
|
|
738
786
|
toolDisplayName: z.string().trim().min(1).max(500),
|
|
739
|
-
connectionId: z.string().
|
|
740
|
-
applicationId: z.string().
|
|
787
|
+
connectionId: z.string().guid().nullable(),
|
|
788
|
+
applicationId: z.string().guid().nullable(),
|
|
741
789
|
appDisplayName: z.string().trim().min(1).max(500).nullable(),
|
|
742
790
|
risk: z.enum(["write", "destructive"]),
|
|
743
791
|
previewMarkdown: z.string().trim().min(1).max(20000),
|
|
@@ -745,6 +793,16 @@ export const requestConfirmationToolActionPayloadSchema = z.object({
|
|
|
745
793
|
argumentsHash: z.string().trim().min(1).max(255),
|
|
746
794
|
expiresAt: z.string().datetime({ offset: true }),
|
|
747
795
|
});
|
|
796
|
+
export const requestConfirmationSecretProposalPayloadSchema = z.object({
|
|
797
|
+
version: z.literal(1),
|
|
798
|
+
proposalId: z.string().guid(),
|
|
799
|
+
sourceSecretLabel: z.string().trim().min(1).max(500),
|
|
800
|
+
configPath: z.string().trim().min(1).max(500),
|
|
801
|
+
targetAgentId: z.string().guid(),
|
|
802
|
+
targetAgentName: z.string().trim().min(1).max(500),
|
|
803
|
+
justification: z.string().trim().min(1).max(20000),
|
|
804
|
+
expiresAt: z.string().datetime({ offset: true }),
|
|
805
|
+
});
|
|
748
806
|
export const requestConfirmationPayloadSchema = z.object({
|
|
749
807
|
version: z.literal(1),
|
|
750
808
|
prompt: z.string().trim().min(1).max(1000),
|
|
@@ -758,6 +816,7 @@ export const requestConfirmationPayloadSchema = z.object({
|
|
|
758
816
|
supersedeOnUserComment: z.boolean().optional(),
|
|
759
817
|
target: requestConfirmationTargetSchema.nullable().optional(),
|
|
760
818
|
toolAction: requestConfirmationToolActionPayloadSchema.optional(),
|
|
819
|
+
secretProposal: requestConfirmationSecretProposalPayloadSchema.optional(),
|
|
761
820
|
});
|
|
762
821
|
export const requestCheckboxConfirmationOptionSchema = z.object({
|
|
763
822
|
id: z.string().trim().min(1).max(120),
|
|
@@ -860,9 +919,9 @@ export const requestConfirmationResumeFailureSchema = z.object({
|
|
|
860
919
|
errorCode: z.string().trim().min(1).max(120).nullable(),
|
|
861
920
|
attempt: z.number().int().min(0).max(100),
|
|
862
921
|
maxAttempts: z.number().int().min(0).max(100),
|
|
863
|
-
runId: z.string().
|
|
864
|
-
retryRunId: z.string().
|
|
865
|
-
recoveryActionId: z.string().
|
|
922
|
+
runId: z.string().guid().nullable().optional(),
|
|
923
|
+
retryRunId: z.string().guid().nullable().optional(),
|
|
924
|
+
recoveryActionId: z.string().guid().nullable().optional(),
|
|
866
925
|
updatedAt: z.string().trim().min(1).nullable().optional(),
|
|
867
926
|
});
|
|
868
927
|
export const requestConfirmationToolActionResultSchema = z.object({
|
|
@@ -877,6 +936,12 @@ export const requestConfirmationToolActionResultSchema = z.object({
|
|
|
877
936
|
resultHref: z.string().trim().url().max(2000).nullable().optional(),
|
|
878
937
|
updatedAt: z.string().datetime({ offset: true }),
|
|
879
938
|
});
|
|
939
|
+
export const requestConfirmationSecretProposalResultSchema = z.object({
|
|
940
|
+
version: z.literal(1),
|
|
941
|
+
status: z.enum(["executed", "failed", "rejected", "withdrawn", "expired"]),
|
|
942
|
+
errorCode: z.string().trim().min(1).max(120).nullable().optional(),
|
|
943
|
+
updatedAt: z.string().datetime({ offset: true }),
|
|
944
|
+
});
|
|
880
945
|
export const requestConfirmationResultSchema = z.object({
|
|
881
946
|
version: z.literal(1),
|
|
882
947
|
outcome: z.enum([
|
|
@@ -890,11 +955,12 @@ export const requestConfirmationResultSchema = z.object({
|
|
|
890
955
|
"addressee_deleted",
|
|
891
956
|
]),
|
|
892
957
|
reason: z.string().trim().max(4000).nullable().optional(),
|
|
893
|
-
commentId: z.string().
|
|
894
|
-
supersededByInteractionId: z.string().
|
|
958
|
+
commentId: z.string().guid().nullable().optional(),
|
|
959
|
+
supersededByInteractionId: z.string().guid().nullable().optional(),
|
|
895
960
|
staleTarget: requestConfirmationTargetSchema.nullable().optional(),
|
|
896
961
|
resumeFailure: requestConfirmationResumeFailureSchema.nullable().optional(),
|
|
897
962
|
toolAction: requestConfirmationToolActionResultSchema.optional(),
|
|
963
|
+
secretProposal: requestConfirmationSecretProposalResultSchema.optional(),
|
|
898
964
|
});
|
|
899
965
|
export const requestCheckboxConfirmationResultSchema = requestConfirmationResultSchema.extend({
|
|
900
966
|
selectedOptionIds: z.array(z.string().trim().min(1).max(120))
|
|
@@ -921,7 +987,7 @@ export const requestItemVerdictsItemSchema = z.object({
|
|
|
921
987
|
description: z.string().trim().max(500).nullable().optional(),
|
|
922
988
|
previewMarkdown: z.string().max(20000).nullable().optional(),
|
|
923
989
|
href: requestConfirmationHrefSchema.nullable().optional(),
|
|
924
|
-
attachmentId: z.string().
|
|
990
|
+
attachmentId: z.string().guid().nullable().optional(),
|
|
925
991
|
});
|
|
926
992
|
export const requestItemVerdictsPayloadSchema = z.object({
|
|
927
993
|
version: z.literal(1),
|
|
@@ -998,10 +1064,10 @@ export const requestItemVerdictsResultItemSchema = z.object({
|
|
|
998
1064
|
verdict: requestItemVerdictValueSchema,
|
|
999
1065
|
reason: z.string().trim().max(4000).nullable().optional(),
|
|
1000
1066
|
resolvedByUserId: z.string().trim().min(1).max(255).nullable().optional(),
|
|
1001
|
-
resolvedByAgentId: z.string().
|
|
1002
|
-
resolvedByRunId: z.string().
|
|
1067
|
+
resolvedByAgentId: z.string().guid().nullable().optional(),
|
|
1068
|
+
resolvedByRunId: z.string().guid().nullable().optional(),
|
|
1003
1069
|
resolvedAt: z.union([z.string().datetime(), z.date()]),
|
|
1004
|
-
commentId: z.string().
|
|
1070
|
+
commentId: z.string().guid().nullable().optional(),
|
|
1005
1071
|
}).superRefine((value, ctx) => {
|
|
1006
1072
|
if (!value.resolvedByUserId && !value.resolvedByAgentId) {
|
|
1007
1073
|
ctx.addIssue({
|
|
@@ -1025,7 +1091,7 @@ export const requestItemVerdictsResultSchema = z.object({
|
|
|
1025
1091
|
complete: z.boolean(),
|
|
1026
1092
|
items: z.array(requestItemVerdictsResultItemSchema)
|
|
1027
1093
|
.max(REQUEST_ITEM_VERDICTS_ITEM_LIMIT),
|
|
1028
|
-
commentId: z.string().
|
|
1094
|
+
commentId: z.string().guid().nullable().optional(),
|
|
1029
1095
|
staleTarget: requestConfirmationTargetSchema.nullable().optional(),
|
|
1030
1096
|
}).superRefine((value, ctx) => {
|
|
1031
1097
|
const itemIds = new Set();
|
|
@@ -1042,15 +1108,15 @@ export const requestItemVerdictsResultSchema = z.object({
|
|
|
1042
1108
|
});
|
|
1043
1109
|
const createIssueThreadInteractionCommon = {
|
|
1044
1110
|
resolverPolicy: issueThreadInteractionResolverPolicySchema.optional(),
|
|
1045
|
-
addresseeAgentId: z.string().
|
|
1111
|
+
addresseeAgentId: z.string().guid().nullable().optional(),
|
|
1046
1112
|
};
|
|
1047
1113
|
export const createIssueThreadInteractionSchema = z.discriminatedUnion("kind", [
|
|
1048
1114
|
z.object({
|
|
1049
1115
|
...createIssueThreadInteractionCommon,
|
|
1050
1116
|
kind: z.literal("suggest_tasks"),
|
|
1051
1117
|
idempotencyKey: z.string().trim().max(255).nullable().optional(),
|
|
1052
|
-
sourceCommentId: z.string().
|
|
1053
|
-
sourceRunId: z.string().
|
|
1118
|
+
sourceCommentId: z.string().guid().nullable().optional(),
|
|
1119
|
+
sourceRunId: z.string().guid().nullable().optional(),
|
|
1054
1120
|
title: z.string().trim().max(240).nullable().optional(),
|
|
1055
1121
|
summary: z.string().trim().max(1000).nullable().optional(),
|
|
1056
1122
|
continuationPolicy: issueThreadInteractionContinuationPolicySchema.optional().default("wake_assignee"),
|
|
@@ -1060,8 +1126,8 @@ export const createIssueThreadInteractionSchema = z.discriminatedUnion("kind", [
|
|
|
1060
1126
|
...createIssueThreadInteractionCommon,
|
|
1061
1127
|
kind: z.literal("ask_user_questions"),
|
|
1062
1128
|
idempotencyKey: z.string().trim().max(255).nullable().optional(),
|
|
1063
|
-
sourceCommentId: z.string().
|
|
1064
|
-
sourceRunId: z.string().
|
|
1129
|
+
sourceCommentId: z.string().guid().nullable().optional(),
|
|
1130
|
+
sourceRunId: z.string().guid().nullable().optional(),
|
|
1065
1131
|
title: z.string().trim().max(240).nullable().optional(),
|
|
1066
1132
|
summary: z.string().trim().max(1000).nullable().optional(),
|
|
1067
1133
|
continuationPolicy: issueThreadInteractionContinuationPolicySchema.optional().default("wake_assignee"),
|
|
@@ -1071,8 +1137,8 @@ export const createIssueThreadInteractionSchema = z.discriminatedUnion("kind", [
|
|
|
1071
1137
|
...createIssueThreadInteractionCommon,
|
|
1072
1138
|
kind: z.literal("request_confirmation"),
|
|
1073
1139
|
idempotencyKey: z.string().trim().max(255).nullable().optional(),
|
|
1074
|
-
sourceCommentId: z.string().
|
|
1075
|
-
sourceRunId: z.string().
|
|
1140
|
+
sourceCommentId: z.string().guid().nullable().optional(),
|
|
1141
|
+
sourceRunId: z.string().guid().nullable().optional(),
|
|
1076
1142
|
title: z.string().trim().max(240).nullable().optional(),
|
|
1077
1143
|
summary: z.string().trim().max(1000).nullable().optional(),
|
|
1078
1144
|
continuationPolicy: issueThreadInteractionContinuationPolicySchema.optional().default("none"),
|
|
@@ -1082,8 +1148,8 @@ export const createIssueThreadInteractionSchema = z.discriminatedUnion("kind", [
|
|
|
1082
1148
|
...createIssueThreadInteractionCommon,
|
|
1083
1149
|
kind: z.literal("request_checkbox_confirmation"),
|
|
1084
1150
|
idempotencyKey: z.string().trim().max(255).nullable().optional(),
|
|
1085
|
-
sourceCommentId: z.string().
|
|
1086
|
-
sourceRunId: z.string().
|
|
1151
|
+
sourceCommentId: z.string().guid().nullable().optional(),
|
|
1152
|
+
sourceRunId: z.string().guid().nullable().optional(),
|
|
1087
1153
|
title: z.string().trim().max(240).nullable().optional(),
|
|
1088
1154
|
summary: z.string().trim().max(1000).nullable().optional(),
|
|
1089
1155
|
continuationPolicy: issueThreadInteractionContinuationPolicySchema.optional().default("wake_assignee"),
|
|
@@ -1093,8 +1159,8 @@ export const createIssueThreadInteractionSchema = z.discriminatedUnion("kind", [
|
|
|
1093
1159
|
...createIssueThreadInteractionCommon,
|
|
1094
1160
|
kind: z.literal("request_item_verdicts"),
|
|
1095
1161
|
idempotencyKey: z.string().trim().max(255).nullable().optional(),
|
|
1096
|
-
sourceCommentId: z.string().
|
|
1097
|
-
sourceRunId: z.string().
|
|
1162
|
+
sourceCommentId: z.string().guid().nullable().optional(),
|
|
1163
|
+
sourceRunId: z.string().guid().nullable().optional(),
|
|
1098
1164
|
title: z.string().trim().max(240).nullable().optional(),
|
|
1099
1165
|
summary: z.string().trim().max(1000).nullable().optional(),
|
|
1100
1166
|
continuationPolicy: issueThreadInteractionContinuationPolicySchema.optional().default("wake_assignee"),
|
|
@@ -1167,10 +1233,10 @@ export const submitIssueThreadInteractionVerdictsSchema = z.object({
|
|
|
1167
1233
|
}
|
|
1168
1234
|
});
|
|
1169
1235
|
export const linkIssueApprovalSchema = z.object({
|
|
1170
|
-
approvalId: z.string().
|
|
1236
|
+
approvalId: z.string().guid(),
|
|
1171
1237
|
});
|
|
1172
1238
|
export const createIssueAttachmentMetadataSchema = z.object({
|
|
1173
|
-
issueCommentId: z.string().
|
|
1239
|
+
issueCommentId: z.string().guid().optional().nullable(),
|
|
1174
1240
|
});
|
|
1175
1241
|
export const ISSUE_DOCUMENT_FORMATS = ["markdown"];
|
|
1176
1242
|
export const issueDocumentFormatSchema = z.enum(ISSUE_DOCUMENT_FORMATS);
|
|
@@ -1179,7 +1245,7 @@ export const upsertIssueDocumentSchema = z.object({
|
|
|
1179
1245
|
format: issueDocumentFormatSchema,
|
|
1180
1246
|
body: multilineTextSchema.pipe(z.string().max(524288)),
|
|
1181
1247
|
changeSummary: z.string().trim().max(500).nullable().optional(),
|
|
1182
|
-
baseRevisionId: z.string().
|
|
1248
|
+
baseRevisionId: z.string().guid().nullable().optional(),
|
|
1183
1249
|
});
|
|
1184
1250
|
export const restoreIssueDocumentRevisionSchema = z.object({});
|
|
1185
1251
|
//# sourceMappingURL=issue.js.map
|