@wildo-ai/saas-specifications 1.1.15 → 1.1.17

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.
Files changed (147) hide show
  1. package/dist/esm/_core/application-maturity/application-maturity-open-items.d.ts +2 -1
  2. package/dist/esm/_core/application-maturity/application-maturity-open-items.d.ts.map +1 -1
  3. package/dist/esm/_core/application-maturity/application-maturity-open-items.js +2 -1
  4. package/dist/esm/_core/application-maturity/application-maturity-open-items.js.map +1 -1
  5. package/dist/esm/_core/application-maturity/application-maturity-validation.js +1 -1
  6. package/dist/esm/_core/application-maturity/application-maturity-validation.js.map +1 -1
  7. package/dist/esm/_core/build-plan/build-plan-relationship-grouping.d.ts.map +1 -1
  8. package/dist/esm/_core/build-plan/build-plan-relationship-grouping.js +5 -2
  9. package/dist/esm/_core/build-plan/build-plan-relationship-grouping.js.map +1 -1
  10. package/dist/esm/_core/build-plan/build-plan-task-graph-generation.schemas.d.ts +251 -0
  11. package/dist/esm/_core/build-plan/build-plan-task-graph-generation.schemas.d.ts.map +1 -1
  12. package/dist/esm/_core/build-plan/build-plan-task-graph-generation.schemas.js +43 -0
  13. package/dist/esm/_core/build-plan/build-plan-task-graph-generation.schemas.js.map +1 -1
  14. package/dist/esm/_core/build-plan/build-plan-task-graph.schemas.d.ts +43 -0
  15. package/dist/esm/_core/build-plan/build-plan-task-graph.schemas.d.ts.map +1 -1
  16. package/dist/esm/_core/build-plan/build-plan-task-graph.schemas.js +58 -0
  17. package/dist/esm/_core/build-plan/build-plan-task-graph.schemas.js.map +1 -1
  18. package/dist/esm/_core/domain-plan/domain-plan-output-set-generation.schemas.d.ts +1 -0
  19. package/dist/esm/_core/domain-plan/domain-plan-output-set-generation.schemas.d.ts.map +1 -1
  20. package/dist/esm/_core/domain-plan/domain-plan-output-set-generation.schemas.js +5 -1
  21. package/dist/esm/_core/domain-plan/domain-plan-output-set-generation.schemas.js.map +1 -1
  22. package/dist/esm/_core/domain-plan/domain-plan-output-set-validation.js +2 -0
  23. package/dist/esm/_core/domain-plan/domain-plan-output-set-validation.js.map +1 -1
  24. package/dist/esm/_core/domain-plan/domain-plan-output-set.schemas.d.ts +3 -0
  25. package/dist/esm/_core/domain-plan/domain-plan-output-set.schemas.d.ts.map +1 -1
  26. package/dist/esm/_core/domain-plan/domain-plan-output-set.schemas.js +12 -1
  27. package/dist/esm/_core/domain-plan/domain-plan-output-set.schemas.js.map +1 -1
  28. package/dist/esm/_core/execution-view-specification.schemas.d.ts +19 -3
  29. package/dist/esm/_core/execution-view-specification.schemas.d.ts.map +1 -1
  30. package/dist/esm/_core/execution-view-specification.schemas.js +11 -1
  31. package/dist/esm/_core/execution-view-specification.schemas.js.map +1 -1
  32. package/dist/esm/_core/market/market-snapshot-generation.schemas.d.ts +15 -0
  33. package/dist/esm/_core/market/market-snapshot-generation.schemas.d.ts.map +1 -1
  34. package/dist/esm/_core/market/market-snapshot-generation.schemas.js +43 -0
  35. package/dist/esm/_core/market/market-snapshot-generation.schemas.js.map +1 -1
  36. package/dist/esm/_core/service-method/service-method-derivation.d.ts +17 -1
  37. package/dist/esm/_core/service-method/service-method-derivation.d.ts.map +1 -1
  38. package/dist/esm/_core/service-method/service-method-derivation.js +46 -0
  39. package/dist/esm/_core/service-method/service-method-derivation.js.map +1 -1
  40. package/dist/esm/_core/service-method/service-method-generation.schemas.d.ts +5 -0
  41. package/dist/esm/_core/service-method/service-method-generation.schemas.d.ts.map +1 -1
  42. package/dist/esm/_core/service-method/service-method.family-aspects.d.ts.map +1 -1
  43. package/dist/esm/_core/service-method/service-method.family-aspects.js +1 -0
  44. package/dist/esm/_core/service-method/service-method.family-aspects.js.map +1 -1
  45. package/dist/esm/_core/service-method/service-method.schemas.d.ts +36 -1
  46. package/dist/esm/_core/service-method/service-method.schemas.d.ts.map +1 -1
  47. package/dist/esm/_core/service-method/service-method.schemas.js +49 -1
  48. package/dist/esm/_core/service-method/service-method.schemas.js.map +1 -1
  49. package/dist/esm/_core/utils/extract-field-specs.d.ts +4 -3
  50. package/dist/esm/_core/utils/extract-field-specs.d.ts.map +1 -1
  51. package/dist/esm/_core/utils/extract-field-specs.js +4 -3
  52. package/dist/esm/_core/utils/extract-field-specs.js.map +1 -1
  53. package/dist/esm/application-creation/playbooks.application-creation.schemas.d.ts +5 -4
  54. package/dist/esm/application-creation/playbooks.application-creation.schemas.d.ts.map +1 -1
  55. package/dist/esm/application-creation/playbooks.application-creation.schemas.js +5 -4
  56. package/dist/esm/application-creation/playbooks.application-creation.schemas.js.map +1 -1
  57. package/dist/esm/assurance/assurance-authority-basis.definitions.d.ts +1 -1
  58. package/dist/esm/assurance/assurance-authority-basis.definitions.js +1 -1
  59. package/dist/esm/assurance/assurance-authority-basis.definitions.js.map +1 -1
  60. package/dist/esm/assurance/assurance-evidence-requirement-bodies.definitions.d.ts.map +1 -1
  61. package/dist/esm/assurance/assurance-evidence-requirement-bodies.definitions.js +13 -5
  62. package/dist/esm/assurance/assurance-evidence-requirement-bodies.definitions.js.map +1 -1
  63. package/dist/esm/assurance/assurance-objective-catalog.definitions.d.ts.map +1 -1
  64. package/dist/esm/assurance/assurance-objective-catalog.definitions.js +9 -2
  65. package/dist/esm/assurance/assurance-objective-catalog.definitions.js.map +1 -1
  66. package/dist/esm/assurance/assurance-verification-requirement-bodies.definitions.d.ts.map +1 -1
  67. package/dist/esm/assurance/assurance-verification-requirement-bodies.definitions.js +8 -4
  68. package/dist/esm/assurance/assurance-verification-requirement-bodies.definitions.js.map +1 -1
  69. package/dist/esm/engine/compliance/resources/signature-requests.resource.specification.d.ts.map +1 -1
  70. package/dist/esm/engine/compliance/resources/signature-requests.resource.specification.js +8 -5
  71. package/dist/esm/engine/compliance/resources/signature-requests.resource.specification.js.map +1 -1
  72. package/dist/esm/engine/engine-resource-specifications.registry.d.ts.map +1 -1
  73. package/dist/esm/engine/engine-resource-specifications.registry.js +4 -0
  74. package/dist/esm/engine/engine-resource-specifications.registry.js.map +1 -1
  75. package/dist/esm/engine/flows-actors/resources/actor-system-executions.resource.specification.d.ts.map +1 -1
  76. package/dist/esm/engine/flows-actors/resources/actor-system-executions.resource.specification.js +4 -1
  77. package/dist/esm/engine/flows-actors/resources/actor-system-executions.resource.specification.js.map +1 -1
  78. package/dist/esm/engine/flows-actors/resources/actor-tasks.resource.specification.d.ts.map +1 -1
  79. package/dist/esm/engine/flows-actors/resources/actor-tasks.resource.specification.js +3 -0
  80. package/dist/esm/engine/flows-actors/resources/actor-tasks.resource.specification.js.map +1 -1
  81. package/dist/esm/engine/flows-actors/resources/remote-agent-task-updates.resource.specification.d.ts +3 -0
  82. package/dist/esm/engine/flows-actors/resources/remote-agent-task-updates.resource.specification.d.ts.map +1 -0
  83. package/dist/esm/engine/flows-actors/resources/remote-agent-task-updates.resource.specification.js +98 -0
  84. package/dist/esm/engine/flows-actors/resources/remote-agent-task-updates.resource.specification.js.map +1 -0
  85. package/dist/esm/engine/flows-actors/resources/remote-agent-tasks.resource.specification.d.ts +3 -0
  86. package/dist/esm/engine/flows-actors/resources/remote-agent-tasks.resource.specification.d.ts.map +1 -0
  87. package/dist/esm/engine/flows-actors/resources/remote-agent-tasks.resource.specification.js +132 -0
  88. package/dist/esm/engine/flows-actors/resources/remote-agent-tasks.resource.specification.js.map +1 -0
  89. package/dist/esm/engine/frontend-components/ai-elements/chat/ai-conversation-thread.frontend-component.specification.js +1 -1
  90. package/dist/esm/engine/frontend-components/ai-elements/chat/ai-conversation-thread.frontend-component.specification.js.map +1 -1
  91. package/dist/esm/engine/frontend-components/app/app-layout-agent-activity-settings.frontend-component.specification.d.ts +5 -0
  92. package/dist/esm/engine/frontend-components/app/app-layout-agent-activity-settings.frontend-component.specification.d.ts.map +1 -0
  93. package/dist/esm/engine/frontend-components/app/app-layout-agent-activity-settings.frontend-component.specification.js +79 -0
  94. package/dist/esm/engine/frontend-components/app/app-layout-agent-activity-settings.frontend-component.specification.js.map +1 -0
  95. package/dist/esm/engine/frontend-components/app/app-layout-connected-accounts-settings.frontend-component.specification.d.ts.map +1 -1
  96. package/dist/esm/engine/frontend-components/app/app-layout-connected-accounts-settings.frontend-component.specification.js +1 -0
  97. package/dist/esm/engine/frontend-components/app/app-layout-connected-accounts-settings.frontend-component.specification.js.map +1 -1
  98. package/dist/esm/engine/frontend-components/data-display/approval-seal.frontend-component.specification.js +3 -3
  99. package/dist/esm/engine/frontend-components/data-display/approval-seal.frontend-component.specification.js.map +1 -1
  100. package/dist/esm/engine/frontend-components/data-display/signature-requests.frontend-component.specification.d.ts +4 -0
  101. package/dist/esm/engine/frontend-components/data-display/signature-requests.frontend-component.specification.d.ts.map +1 -0
  102. package/dist/esm/engine/frontend-components/data-display/signature-requests.frontend-component.specification.js +29 -0
  103. package/dist/esm/engine/frontend-components/data-display/signature-requests.frontend-component.specification.js.map +1 -0
  104. package/dist/esm/engine/frontend-components/flows-actors/low-level-ai-approval.frontend-component.specification.js +1 -1
  105. package/dist/esm/engine/frontend-components/flows-actors/low-level-ai-approval.frontend-component.specification.js.map +1 -1
  106. package/dist/esm/engine/frontend-components/index.d.ts +2 -0
  107. package/dist/esm/engine/frontend-components/index.d.ts.map +1 -1
  108. package/dist/esm/engine/frontend-components/index.js +6 -0
  109. package/dist/esm/engine/frontend-components/index.js.map +1 -1
  110. package/dist/esm/engine/notifications/system-emails/delegated-work.system-emails.specification.d.ts +8 -0
  111. package/dist/esm/engine/notifications/system-emails/delegated-work.system-emails.specification.d.ts.map +1 -0
  112. package/dist/esm/engine/notifications/system-emails/delegated-work.system-emails.specification.js +65 -0
  113. package/dist/esm/engine/notifications/system-emails/delegated-work.system-emails.specification.js.map +1 -0
  114. package/dist/esm/engine/notifications/system-emails/index.d.ts +1 -0
  115. package/dist/esm/engine/notifications/system-emails/index.d.ts.map +1 -1
  116. package/dist/esm/engine/notifications/system-emails/index.js +3 -1
  117. package/dist/esm/engine/notifications/system-emails/index.js.map +1 -1
  118. package/dist/esm/engine/organizations/resources/organization-members.resource.specification.d.ts +9 -0
  119. package/dist/esm/engine/organizations/resources/organization-members.resource.specification.d.ts.map +1 -1
  120. package/dist/esm/engine/organizations/resources/organization-members.resource.specification.js +50 -0
  121. package/dist/esm/engine/organizations/resources/organization-members.resource.specification.js.map +1 -1
  122. package/dist/esm/engine/organizations/resources/organization-relationships.resource.specification.d.ts.map +1 -1
  123. package/dist/esm/engine/organizations/resources/organization-relationships.resource.specification.js +25 -0
  124. package/dist/esm/engine/organizations/resources/organization-relationships.resource.specification.js.map +1 -1
  125. package/dist/esm/engine/providers/antigravity.provider.specification.d.ts +7 -0
  126. package/dist/esm/engine/providers/antigravity.provider.specification.d.ts.map +1 -0
  127. package/dist/esm/engine/providers/antigravity.provider.specification.js +54 -0
  128. package/dist/esm/engine/providers/antigravity.provider.specification.js.map +1 -0
  129. package/dist/esm/engine/providers/google-drive.provider.specification.d.ts.map +1 -1
  130. package/dist/esm/engine/providers/google-drive.provider.specification.js +8 -0
  131. package/dist/esm/engine/providers/google-drive.provider.specification.js.map +1 -1
  132. package/dist/esm/engine/providers/index.d.ts +2 -0
  133. package/dist/esm/engine/providers/index.d.ts.map +1 -1
  134. package/dist/esm/engine/providers/index.js +5 -1
  135. package/dist/esm/engine/providers/index.js.map +1 -1
  136. package/dist/esm/engine/providers/microsoft-onedrive.provider.specification.d.ts.map +1 -1
  137. package/dist/esm/engine/providers/microsoft-onedrive.provider.specification.js +17 -0
  138. package/dist/esm/engine/providers/microsoft-onedrive.provider.specification.js.map +1 -1
  139. package/dist/esm/engine/providers/outbound-bearer-token.provider.specification.d.ts +7 -0
  140. package/dist/esm/engine/providers/outbound-bearer-token.provider.specification.d.ts.map +1 -0
  141. package/dist/esm/engine/providers/outbound-bearer-token.provider.specification.js +41 -0
  142. package/dist/esm/engine/providers/outbound-bearer-token.provider.specification.js.map +1 -0
  143. package/dist/esm/engine/providers/twilio.provider.specification.d.ts.map +1 -1
  144. package/dist/esm/engine/providers/twilio.provider.specification.js +3 -0
  145. package/dist/esm/engine/providers/twilio.provider.specification.js.map +1 -1
  146. package/dist/tsconfig.build.tsbuildinfo +1 -1
  147. package/package.json +8 -8
@@ -81,6 +81,49 @@ export const BuildPlanTaskGraphGenerationSchema = z.strictObject({
81
81
  seen.add(taskRef);
82
82
  });
83
83
  });
84
+ /**
85
+ * One SLICE of a build plan written in slices (#3901): the next tasks in dependency order, and whether they finish the plan.
86
+ *
87
+ * Why slices: a whole plan is one answer whose length grows with the application (measured on reference run 44381592258,
88
+ * 462 tasks and about 238,000 output tokens in one decomposition of about 27 minutes), and nothing could be dispatched
89
+ * until it landed. Written in slices, each closed under its prerequisites, the first slice lands within minutes and the
90
+ * build starts on it while the rest is written.
91
+ *
92
+ * A slice holds only NEW tasks. A prerequisite names a task already in the plan or one in this slice, which keeps every
93
+ * landed prefix dispatchable on its own; the generation run holds the landed tasks fixed, so a later slice can only add.
94
+ *
95
+ * Every field is required, so the strict form a provider decodes is this schema itself: `remaining` is what is still to be
96
+ * written when `complete` is false, and empty when it is true (the generation run refuses a false `complete` with nothing
97
+ * remaining, because a pending plan must say what it is waiting for).
98
+ */
99
+ export const BuildPlanTaskGraphSliceGenerationSchema = z.strictObject({
100
+ tasks: z.array(BuildPlanTaskGenerationSchema).min(1),
101
+ /** True when, with the tasks already in the plan, this slice finishes the decomposition the method asks for. */
102
+ complete: z.boolean(),
103
+ /** What the decomposition still has to write after this slice, in a sentence or two; empty when `complete`. */
104
+ remaining: z.string(),
105
+ });
106
+ /**
107
+ * A persisted task in the provider's form (#3901), so tasks already landed can be re-assembled with a new slice and
108
+ * normalized again as one answer.
109
+ *
110
+ * The slug is the task ref itself: stamping is idempotent on an already-prefixed slug (`applyFamilyRefPrefix`), so the
111
+ * task normalizes back to the same ref, and a task the relationship grouping produced stays one task under its grouped
112
+ * ref (the run seals landed refs against grouping). Exact for every field a task carries except `requestedBy`, which no
113
+ * provider answer holds: a requested task is carried forward by the host, not by a decomposition.
114
+ */
115
+ export function buildPlanTaskAsGeneration(task) {
116
+ return {
117
+ slug: task.taskRef,
118
+ objective: task.objective,
119
+ target: task.target,
120
+ produces: task.produces,
121
+ functionalTopic: task.functionalTopic,
122
+ skillRefs: task.skillRefs,
123
+ prerequisiteSlugs: task.prerequisiteTaskRefs,
124
+ servesRefs: task.servesRefs,
125
+ };
126
+ }
84
127
  /**
85
128
  * Normalize strict provider output into the persisted family: stamp refs and version, then group the
86
129
  * relationship tasks one per module file ({@link groupRelationshipTasksByModule}, #3209). The grouped graph is
@@ -1 +1 @@
1
- {"version":3,"file":"build-plan-task-graph-generation.schemas.js","sourceRoot":"","sources":["../../../../src/_core/build-plan/build-plan-task-graph-generation.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,4BAA4B,EAAE,MAAM,mEAAmE,CAAC;AACjH,OAAO,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AACpE,OAAO,EAAE,8BAA8B,EAAE,MAAM,oCAAoC,CAAC;AACpF,OAAO,EACL,0BAA0B,EAC1B,wBAAwB,EACxB,yBAAyB,EACzB,0BAA0B,EAC1B,yBAAyB,GAE1B,MAAM,iCAAiC,CAAC;AAEzC,MAAM,UAAU,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,4BAA4B,CAAC,CAAC;AAClE;;;;;GAKG;AACH,MAAM,cAAc,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,4BAA4B,CAAC,CAAC;AACtE,MAAM,oBAAoB,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;AAEtD;;;;;GAKG;AACH,MAAM,CAAC,MAAM,6BAA6B,GAAG,CAAC,CAAC,YAAY,CAAC;IAC1D,IAAI,EAAE,UAAU;IAChB,SAAS,EAAE,oBAAoB;IAC/B,MAAM,EAAE,yBAAyB;IACjC;;;;;;;;;;;;;;;OAeG;IACH,QAAQ,EAAE,CAAC,CAAC,KAAK,C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AAQ;YACvB,eAAe,EAAE,IAAI,CAAC,eAAe;YACrC,SAAS,EAAE,IAAI,CAAC,SAAS;YACzB,8FAA8F;YAC9F,oGAAoG;YACpG,mGAAmG;YACnG,oBAAoB,EAAE,IAAI,CAAC,iBAAiB,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,oBAAoB,CAAC,IAAI,EAAE,0BAA0B,CAAC,CAAC;YAClH,UAAU,EAAE,IAAI,CAAC,UAAU;SAC5B,CAAC,CAAC;KACJ,CAAC,CAAC;AACL,CAAC","sourcesContent":["import { z } from 'zod';\n\nimport { MetaWorkflow_FunctionalTopic } from '../../application-creation/playbooks.application-creation.schemas';\nimport { applyFamilyRefPrefix } from '../utils/family-ref-stamping';\nimport { groupRelationshipTasksByModule } from './build-plan-relationship-grouping';\nimport {\n BUILD_PLAN_TASK_REF_PREFIX,\n BuildPlanTaskGraphSchema,\n BuildPlanTaskGraphVersion,\n BuildPlanTaskProductSchema,\n BuildPlanTaskTargetSchema,\n type BuildPlanTaskGraph,\n} from './build-plan-task-graph.schemas';\n\nconst SlugSchema = z.string().regex(/^[a-z0-9]+(?:-[a-z0-9]+)*$/);\n/**\n * A skill ref is the skill's FOLDER id in the app-knowledge catalog, which is\n * also its `SKILL.md` frontmatter `name` — one id, kebab-case. The host refuses\n * any skill name outside `[a-z0-9-]+`, so a ref that does not match this shape\n * can never resolve to an installed skill.\n */\nconst SkillRefSchema = z.string().regex(/^[a-z0-9]+(?:-[a-z0-9]+)*$/);\nconst NonEmptyStringSchema = z.string().trim().min(1);\n\n/**\n * Strict provider-facing build task. The provider supplies stable semantic\n * slugs; the trusted runtime stamps the canonical task-ref prefix and the\n * payload version. No path, command, prompt or runtime control is\n * representable here — by construction, not by instruction.\n */\nexport const BuildPlanTaskGenerationSchema = z.strictObject({\n slug: SlugSchema,\n objective: NonEmptyStringSchema,\n target: BuildPlanTaskTargetSchema,\n /**\n * The artifacts this task is accountable for. The provider authors these\n * because it is the party that decided what the task is FOR; the host cannot\n * infer it, which is what #597 measured — two tasks the decomposer meant\n * differently reached the host with identical targets.\n *\n * Still no path and no command: a product names a resource, a field, a\n * relationship or a view, and the host alone turns that into a question about\n * the working tree.\n *\n * NOT `.min(1)` here, and the reason is the generation step: that kind must\n * declare NONE, so a minimum on the provider shape would make an authored\n * generation step unrepresentable. The two rules that matter — none for a\n * generation step, and a validator finding for a coding task that declares\n * none — live on the assembled graph, where both cases can be told apart.\n */\n produces: z.array(BuildPlanTaskProductSchema).default([]),\n functionalTopic: z.enum(MetaWorkflow_FunctionalTopic),\n skillRefs: z.array(SkillRefSchema).min(1),\n /** Slugs (not refs) of prerequisite tasks in the same generation. */\n prerequisiteSlugs: z.array(SlugSchema),\n servesRefs: z.array(NonEmptyStringSchema),\n});\nexport type BuildPlanTaskGeneration = z.infer<typeof BuildPlanTaskGenerationSchema>;\n\n/**\n * A built task this answer deliberately changes (#3204): its slug, and why the change is required.\n *\n * A re-decompose keeps a built task's target and products exactly (`assertLandedBuildTasksKept`), because a changed\n * product makes built work read unbuilt with no change to the code; measured on reference run 42408076760, where 22\n * built tasks' products changed in one re-decompose for no reason the inputs gave. But an input CAN require it: a service\n * method that lands later decides a retention class, or a step an agent must name. Then the coverage checks require the\n * new product while the kept-tasks check would require the old one, and nothing could land. Declaring the reshape, with\n * the reason, is the door: the built task is rebuilt to its new shape, and the change is a decision the answer states\n * rather than one it slips in. The reason is not the proof (#3491): the generation run admits the reshape only when the\n * task's built shape draws a finding against the landed inputs that the new shape repairs.\n */\nexport const BuildPlanReshapedBuiltTaskGenerationSchema = z.strictObject({\n slug: SlugSchema,\n /** What requires the change: the input that decides it, in one sentence. */\n reason: NonEmptyStringSchema,\n});\n\n/** One complete provider response for the build-plan family: a non-empty ordered task list. */\nexport const BuildPlanTaskGraphGenerationSchema = z.strictObject({\n tasks: z.array(BuildPlanTaskGenerationSchema).min(1),\n /** The built tasks whose target or products this answer changes on purpose, each with its reason (#3204). */\n reshapedBuiltTasks: z.array(BuildPlanReshapedBuiltTaskGenerationSchema).default([]),\n}).superRefine((generated, context) => {\n // Keyed on the STAMPED form, not on the authored slug, because `applyFamilyRefPrefix` is deliberately\n // not injective: `todo-schema` and `build-task-todo-schema` are two distinct slugs that both become\n // `build-task-todo-schema`. Checking the slug would let that pair through and produce two tasks sharing\n // one ref, which makes every `prerequisiteTaskRefs` edge naming it ambiguous -- and the prerequisite\n // graph is what decides execution order, so an ambiguous node is not a cosmetic problem.\n const seen = new Set<string>();\n generated.tasks.forEach((task, index) => {\n const taskRef = applyFamilyRefPrefix(task.slug, BUILD_PLAN_TASK_REF_PREFIX);\n if (seen.has(taskRef)) context.addIssue({ code: 'custom', message: `duplicate build task slug \"${task.slug}\" (normalizes to \"${taskRef}\")`, path: ['tasks', index, 'slug'] });\n seen.add(taskRef);\n });\n});\nexport type BuildPlanTaskGraphGeneration = z.infer<typeof BuildPlanTaskGraphGenerationSchema>;\n\n/**\n * Normalize strict provider output into the persisted family: stamp refs and version, then group the\n * relationship tasks one per module file ({@link groupRelationshipTasksByModule}, #3209). The grouped graph is\n * parsed again, so a grouping that broke an invariant (two tasks claiming one artifact) is refused here rather\n * than landed. `builtTaskRefs`, the tasks already built (#3204), are never grouped with another task.\n */\nexport function parseBuildPlanTaskGraphGeneration(input: unknown, builtTaskRefs: ReadonlySet<string> = new Set()): BuildPlanTaskGraph {\n return BuildPlanTaskGraphSchema.parse(groupRelationshipTasksByModule(stampBuildPlanTaskGraphGeneration(input), builtTaskRefs));\n}\n\n/**\n * The built tasks a generated answer declares it reshapes, by stamped ref, with each one's reason (#3204). Read from the\n * answer itself, beside {@link parseBuildPlanTaskGraphGeneration}: the declaration is about this answer and is not part of\n * the persisted plan.\n */\nexport function readReshapedBuiltTasks(input: unknown): ReadonlyMap<string, string> {\n const generated = BuildPlanTaskGraphGenerationSchema.parse(input);\n return new Map(generated.reshapedBuiltTasks.map((entry) => [applyFamilyRefPrefix(entry.slug, BUILD_PLAN_TASK_REF_PREFIX), entry.reason] as const));\n}\n\nfunction stampBuildPlanTaskGraphGeneration(input: unknown): BuildPlanTaskGraph {\n const generated = BuildPlanTaskGraphGenerationSchema.parse(input);\n return BuildPlanTaskGraphSchema.parse({\n version: BuildPlanTaskGraphVersion.V1,\n tasks: generated.tasks.map((task) => ({\n taskRef: applyFamilyRefPrefix(task.slug, BUILD_PLAN_TASK_REF_PREFIX),\n objective: task.objective,\n target: task.target,\n produces: task.produces,\n functionalTopic: task.functionalTopic,\n skillRefs: task.skillRefs,\n // Stamped through the SAME normalizer as `taskRef` above, and that is the point rather than a\n // tidiness: a node and the edges naming it are stamped by two separate expressions, so a model that\n // prefixes one and not the other produces two different strings for one task and orphans the edge.\n prerequisiteTaskRefs: task.prerequisiteSlugs.map((slug) => applyFamilyRefPrefix(slug, BUILD_PLAN_TASK_REF_PREFIX)),\n servesRefs: task.servesRefs,\n })),\n });\n}\n"]}
1
+ {"version":3,"file":"build-plan-task-graph-generation.schemas.js","sourceRoot":"","sources":["../../../../src/_core/build-plan/build-plan-task-graph-generation.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,4BAA4B,EAAE,MAAM,mEAAmE,CAAC;AACjH,OAAO,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AACpE,OAAO,EAAE,8BAA8B,EAAE,MAAM,oCAAoC,CAAC;AACpF,OAAO,EACL,0BAA0B,EAC1B,wBAAwB,EACxB,yBAAyB,EACzB,0BAA0B,EAC1B,yBAAyB,GAE1B,MAAM,iCAAiC,CAAC;AAEzC,MAAM,UAAU,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,4BAA4B,CAAC,CAAC;AAClE;;;;;GAKG;AACH,MAAM,cAAc,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,4BAA4B,CAAC,CAAC;AACtE,MAAM,oBAAoB,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,I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AClH,UAAU,EAAE,IAAI,CAAC,UAAU;SAC5B,CAAC,CAAC;KACJ,CAAC,CAAC;AACL,CAAC","sourcesContent":["import { z } from 'zod';\n\nimport { MetaWorkflow_FunctionalTopic } from '../../application-creation/playbooks.application-creation.schemas';\nimport { applyFamilyRefPrefix } from '../utils/family-ref-stamping';\nimport { groupRelationshipTasksByModule } from './build-plan-relationship-grouping';\nimport {\n BUILD_PLAN_TASK_REF_PREFIX,\n BuildPlanTaskGraphSchema,\n BuildPlanTaskGraphVersion,\n BuildPlanTaskProductSchema,\n BuildPlanTaskTargetSchema,\n type BuildPlanTaskGraph,\n} from './build-plan-task-graph.schemas';\n\nconst SlugSchema = z.string().regex(/^[a-z0-9]+(?:-[a-z0-9]+)*$/);\n/**\n * A skill ref is the skill's FOLDER id in the app-knowledge catalog, which is\n * also its `SKILL.md` frontmatter `name` — one id, kebab-case. The host refuses\n * any skill name outside `[a-z0-9-]+`, so a ref that does not match this shape\n * can never resolve to an installed skill.\n */\nconst SkillRefSchema = z.string().regex(/^[a-z0-9]+(?:-[a-z0-9]+)*$/);\nconst NonEmptyStringSchema = z.string().trim().min(1);\n\n/**\n * Strict provider-facing build task. The provider supplies stable semantic\n * slugs; the trusted runtime stamps the canonical task-ref prefix and the\n * payload version. No path, command, prompt or runtime control is\n * representable here — by construction, not by instruction.\n */\nexport const BuildPlanTaskGenerationSchema = z.strictObject({\n slug: SlugSchema,\n objective: NonEmptyStringSchema,\n target: BuildPlanTaskTargetSchema,\n /**\n * The artifacts this task is accountable for. The provider authors these\n * because it is the party that decided what the task is FOR; the host cannot\n * infer it, which is what #597 measured — two tasks the decomposer meant\n * differently reached the host with identical targets.\n *\n * Still no path and no command: a product names a resource, a field, a\n * relationship or a view, and the host alone turns that into a question about\n * the working tree.\n *\n * NOT `.min(1)` here, and the reason is the generation step: that kind must\n * declare NONE, so a minimum on the provider shape would make an authored\n * generation step unrepresentable. The two rules that matter — none for a\n * generation step, and a validator finding for a coding task that declares\n * none — live on the assembled graph, where both cases can be told apart.\n */\n produces: z.array(BuildPlanTaskProductSchema).default([]),\n functionalTopic: z.enum(MetaWorkflow_FunctionalTopic),\n skillRefs: z.array(SkillRefSchema).min(1),\n /** Slugs (not refs) of prerequisite tasks in the same generation. */\n prerequisiteSlugs: z.array(SlugSchema),\n servesRefs: z.array(NonEmptyStringSchema),\n});\nexport type BuildPlanTaskGeneration = z.infer<typeof BuildPlanTaskGenerationSchema>;\n\n/**\n * A built task this answer deliberately changes (#3204): its slug, and why the change is required.\n *\n * A re-decompose keeps a built task's target and products exactly (`assertLandedBuildTasksKept`), because a changed\n * product makes built work read unbuilt with no change to the code; measured on reference run 42408076760, where 22\n * built tasks' products changed in one re-decompose for no reason the inputs gave. But an input CAN require it: a service\n * method that lands later decides a retention class, or a step an agent must name. Then the coverage checks require the\n * new product while the kept-tasks check would require the old one, and nothing could land. Declaring the reshape, with\n * the reason, is the door: the built task is rebuilt to its new shape, and the change is a decision the answer states\n * rather than one it slips in. The reason is not the proof (#3491): the generation run admits the reshape only when the\n * task's built shape draws a finding against the landed inputs that the new shape repairs.\n */\nexport const BuildPlanReshapedBuiltTaskGenerationSchema = z.strictObject({\n slug: SlugSchema,\n /** What requires the change: the input that decides it, in one sentence. */\n reason: NonEmptyStringSchema,\n});\n\n/** One complete provider response for the build-plan family: a non-empty ordered task list. */\nexport const BuildPlanTaskGraphGenerationSchema = z.strictObject({\n tasks: z.array(BuildPlanTaskGenerationSchema).min(1),\n /** The built tasks whose target or products this answer changes on purpose, each with its reason (#3204). */\n reshapedBuiltTasks: z.array(BuildPlanReshapedBuiltTaskGenerationSchema).default([]),\n}).superRefine((generated, context) => {\n // Keyed on the STAMPED form, not on the authored slug, because `applyFamilyRefPrefix` is deliberately\n // not injective: `todo-schema` and `build-task-todo-schema` are two distinct slugs that both become\n // `build-task-todo-schema`. Checking the slug would let that pair through and produce two tasks sharing\n // one ref, which makes every `prerequisiteTaskRefs` edge naming it ambiguous -- and the prerequisite\n // graph is what decides execution order, so an ambiguous node is not a cosmetic problem.\n const seen = new Set<string>();\n generated.tasks.forEach((task, index) => {\n const taskRef = applyFamilyRefPrefix(task.slug, BUILD_PLAN_TASK_REF_PREFIX);\n if (seen.has(taskRef)) context.addIssue({ code: 'custom', message: `duplicate build task slug \"${task.slug}\" (normalizes to \"${taskRef}\")`, path: ['tasks', index, 'slug'] });\n seen.add(taskRef);\n });\n});\nexport type BuildPlanTaskGraphGeneration = z.infer<typeof BuildPlanTaskGraphGenerationSchema>;\n\n/**\n * One SLICE of a build plan written in slices (#3901): the next tasks in dependency order, and whether they finish the plan.\n *\n * Why slices: a whole plan is one answer whose length grows with the application (measured on reference run 44381592258,\n * 462 tasks and about 238,000 output tokens in one decomposition of about 27 minutes), and nothing could be dispatched\n * until it landed. Written in slices, each closed under its prerequisites, the first slice lands within minutes and the\n * build starts on it while the rest is written.\n *\n * A slice holds only NEW tasks. A prerequisite names a task already in the plan or one in this slice, which keeps every\n * landed prefix dispatchable on its own; the generation run holds the landed tasks fixed, so a later slice can only add.\n *\n * Every field is required, so the strict form a provider decodes is this schema itself: `remaining` is what is still to be\n * written when `complete` is false, and empty when it is true (the generation run refuses a false `complete` with nothing\n * remaining, because a pending plan must say what it is waiting for).\n */\nexport const BuildPlanTaskGraphSliceGenerationSchema = z.strictObject({\n tasks: z.array(BuildPlanTaskGenerationSchema).min(1),\n /** True when, with the tasks already in the plan, this slice finishes the decomposition the method asks for. */\n complete: z.boolean(),\n /** What the decomposition still has to write after this slice, in a sentence or two; empty when `complete`. */\n remaining: z.string(),\n});\nexport type BuildPlanTaskGraphSliceGeneration = z.infer<typeof BuildPlanTaskGraphSliceGenerationSchema>;\n\n/**\n * A persisted task in the provider's form (#3901), so tasks already landed can be re-assembled with a new slice and\n * normalized again as one answer.\n *\n * The slug is the task ref itself: stamping is idempotent on an already-prefixed slug (`applyFamilyRefPrefix`), so the\n * task normalizes back to the same ref, and a task the relationship grouping produced stays one task under its grouped\n * ref (the run seals landed refs against grouping). Exact for every field a task carries except `requestedBy`, which no\n * provider answer holds: a requested task is carried forward by the host, not by a decomposition.\n */\nexport function buildPlanTaskAsGeneration(task: Pick<BuildPlanTaskGraph['tasks'][number], 'taskRef' | 'objective' | 'target' | 'produces' | 'functionalTopic' | 'skillRefs' | 'prerequisiteTaskRefs' | 'servesRefs'>): BuildPlanTaskGeneration {\n return {\n slug: task.taskRef,\n objective: task.objective,\n target: task.target,\n produces: task.produces,\n functionalTopic: task.functionalTopic,\n skillRefs: task.skillRefs,\n prerequisiteSlugs: task.prerequisiteTaskRefs,\n servesRefs: task.servesRefs,\n };\n}\n\n/**\n * Normalize strict provider output into the persisted family: stamp refs and version, then group the\n * relationship tasks one per module file ({@link groupRelationshipTasksByModule}, #3209). The grouped graph is\n * parsed again, so a grouping that broke an invariant (two tasks claiming one artifact) is refused here rather\n * than landed. `builtTaskRefs`, the tasks already built (#3204), are never grouped with another task.\n */\nexport function parseBuildPlanTaskGraphGeneration(input: unknown, builtTaskRefs: ReadonlySet<string> = new Set()): BuildPlanTaskGraph {\n return BuildPlanTaskGraphSchema.parse(groupRelationshipTasksByModule(stampBuildPlanTaskGraphGeneration(input), builtTaskRefs));\n}\n\n/**\n * The built tasks a generated answer declares it reshapes, by stamped ref, with each one's reason (#3204). Read from the\n * answer itself, beside {@link parseBuildPlanTaskGraphGeneration}: the declaration is about this answer and is not part of\n * the persisted plan.\n */\nexport function readReshapedBuiltTasks(input: unknown): ReadonlyMap<string, string> {\n const generated = BuildPlanTaskGraphGenerationSchema.parse(input);\n return new Map(generated.reshapedBuiltTasks.map((entry) => [applyFamilyRefPrefix(entry.slug, BUILD_PLAN_TASK_REF_PREFIX), entry.reason] as const));\n}\n\nfunction stampBuildPlanTaskGraphGeneration(input: unknown): BuildPlanTaskGraph {\n const generated = BuildPlanTaskGraphGenerationSchema.parse(input);\n return BuildPlanTaskGraphSchema.parse({\n version: BuildPlanTaskGraphVersion.V1,\n tasks: generated.tasks.map((task) => ({\n taskRef: applyFamilyRefPrefix(task.slug, BUILD_PLAN_TASK_REF_PREFIX),\n objective: task.objective,\n target: task.target,\n produces: task.produces,\n functionalTopic: task.functionalTopic,\n skillRefs: task.skillRefs,\n // Stamped through the SAME normalizer as `taskRef` above, and that is the point rather than a\n // tidiness: a node and the edges naming it are stamped by two separate expressions, so a model that\n // prefixes one and not the other produces two different strings for one task and orphans the edge.\n prerequisiteTaskRefs: task.prerequisiteSlugs.map((slug) => applyFamilyRefPrefix(slug, BUILD_PLAN_TASK_REF_PREFIX)),\n servesRefs: task.servesRefs,\n })),\n });\n}\n"]}
@@ -1,5 +1,6 @@
1
1
  import { z } from 'zod';
2
2
  import '@wildo-ai/zod-decorators';
3
+ import { ElectronicSignature_Level } from '@wildo-ai/external-connectors-models';
3
4
  import { DataRetentionClass, HumanDecision_RouteKind, InboundChannelKind, OrganizationRowConfinementMode, SystemOfRecordAccess } from '@wildo-ai/saas-models';
4
5
  import { MetaWorkflow_FunctionalTopic } from '../../application-creation/playbooks.application-creation.schemas';
5
6
  import { PlacementSurface } from '../placement-plan/placement-plan.schemas';
@@ -518,6 +519,12 @@ export declare const AGENT_WORK_REF_PATTERN: RegExp;
518
519
  * service qualifies them; the `service-method` family declares both halves as kebab-case slugs.
519
520
  */
520
521
  export declare const SERVICE_METHOD_ELEMENT_REF_PATTERN: RegExp;
522
+ /**
523
+ * A function tool's top-level argument name (#2915), as a gate's `deliverableFileArgument` names it: an identifier, the
524
+ * shape a tool's argument schema keys its properties by. The engine refuses at registration a name its schema does not
525
+ * declare as a string; this pattern only refuses what could never be one.
526
+ */
527
+ export declare const FUNCTION_TOOL_ARGUMENT_NAME_PATTERN: RegExp;
521
528
  /** The ref a build-plan product carries for one step or decision point of the method (#2305). */
522
529
  export declare function serviceMethodElementRef(serviceRef: string, elementRef: string): string;
523
530
  export declare const DATA_SEED_KEY_PATTERN: RegExp;
@@ -637,6 +644,8 @@ export declare const BuildPlanTaskProductSchema: z.ZodDiscriminatedUnion<[z.ZodO
637
644
  eligibleRole: z.ZodOptional<z.ZodString>;
638
645
  requiredQualificationKinds: z.ZodOptional<z.ZodArray<z.ZodString>>;
639
646
  serviceMethodDecisionRef: z.ZodOptional<z.ZodString>;
647
+ deliverableFileArgument: z.ZodOptional<z.ZodString>;
648
+ electronicSignatureLevel: z.ZodOptional<z.ZodEnum<typeof ElectronicSignature_Level>>;
640
649
  }, z.core.$strict>, z.ZodObject<{
641
650
  kind: z.ZodLiteral<BuildPlanTaskProductKind.WORK_UNIT_RESOURCE>;
642
651
  resourceRef: z.ZodString;
@@ -756,6 +765,12 @@ export declare const AI_USE_DECLARATION_SKILL_REF = "ai-use-declaration";
756
765
  * whichever kind of agent calls the tool.
757
766
  */
758
767
  export declare const AGENT_APPROVAL_GATE_SKILL_REF = "flows-actors-chat-assistant";
768
+ /**
769
+ * The skill a gate binding its approved file is built with, besides the gate's own (#2915): `electronic-signature-deliverables`
770
+ * teaches `deliverableFileArgument` and `electronicSignature` on a tool, and what the approval's seal and the signature
771
+ * request then record.
772
+ */
773
+ export declare const DELIVERABLE_APPROVAL_SKILL_REF = "electronic-signature-deliverables";
759
774
  /**
760
775
  * The skill an organization-type task is built with (#3040): `organizationTypes` in the application's configuration, the
761
776
  * user types and roles a type offers, how it is joined, and the identity overrides it may carry. The dispatch derives it
@@ -999,6 +1014,8 @@ export declare const BuildPlanTaskSchema: z.ZodObject<{
999
1014
  eligibleRole: z.ZodOptional<z.ZodString>;
1000
1015
  requiredQualificationKinds: z.ZodOptional<z.ZodArray<z.ZodString>>;
1001
1016
  serviceMethodDecisionRef: z.ZodOptional<z.ZodString>;
1017
+ deliverableFileArgument: z.ZodOptional<z.ZodString>;
1018
+ electronicSignatureLevel: z.ZodOptional<z.ZodEnum<typeof ElectronicSignature_Level>>;
1002
1019
  }, z.core.$strict>, z.ZodObject<{
1003
1020
  kind: z.ZodLiteral<BuildPlanTaskProductKind.WORK_UNIT_RESOURCE>;
1004
1021
  resourceRef: z.ZodString;
@@ -1054,6 +1071,25 @@ export declare const BuildPlanTaskSchema: z.ZodObject<{
1054
1071
  requestedBy: z.ZodOptional<z.ZodString>;
1055
1072
  }, z.core.$strict>;
1056
1073
  export type BuildPlanTask = z.infer<typeof BuildPlanTaskSchema>;
1074
+ /**
1075
+ * What a build plan landed BEFORE its decomposition finished still has to decompose (#3901).
1076
+ *
1077
+ * Where results are accepted without a person's review, the decomposition writes the plan in slices, each closed under
1078
+ * its prerequisites, and lands each one as it is written, so the build starts on the first slice instead of waiting for
1079
+ * the whole plan, whose writing takes longer the larger the application. A plan carrying this is PENDING:
1080
+ *
1081
+ * - every task it holds is final: the slices still to come only add tasks, and edges from new tasks into these, never
1082
+ * change or remove one (the decomposition refuses any answer that would);
1083
+ * - the checks over the WHOLE plan (it decomposes the whole domain plan, it realizes the firm's method) do not apply yet:
1084
+ * they are the complete plan's, judged when the last slice lands, which removes this field;
1085
+ * - the build is not finished while it is present, whatever share of the tasks it holds has landed.
1086
+ *
1087
+ * Absent means the decomposition is complete, which is every plan landed in one piece.
1088
+ */
1089
+ export declare const BuildPlanPendingDecompositionSchema: z.ZodObject<{
1090
+ remaining: z.ZodString;
1091
+ }, z.core.$strict>;
1092
+ export type BuildPlanPendingDecomposition = z.infer<typeof BuildPlanPendingDecompositionSchema>;
1057
1093
  /**
1058
1094
  * THE build-plan payload — a **single aggregate per product**: the ORDERED
1059
1095
  * task graph that turns the accepted domain plan into buildable units.
@@ -1236,6 +1272,8 @@ export declare const BuildPlanTaskGraphSchema: z.ZodObject<{
1236
1272
  eligibleRole: z.ZodOptional<z.ZodString>;
1237
1273
  requiredQualificationKinds: z.ZodOptional<z.ZodArray<z.ZodString>>;
1238
1274
  serviceMethodDecisionRef: z.ZodOptional<z.ZodString>;
1275
+ deliverableFileArgument: z.ZodOptional<z.ZodString>;
1276
+ electronicSignatureLevel: z.ZodOptional<z.ZodEnum<typeof ElectronicSignature_Level>>;
1239
1277
  }, z.core.$strict>, z.ZodObject<{
1240
1278
  kind: z.ZodLiteral<BuildPlanTaskProductKind.WORK_UNIT_RESOURCE>;
1241
1279
  resourceRef: z.ZodString;
@@ -1290,7 +1328,12 @@ export declare const BuildPlanTaskGraphSchema: z.ZodObject<{
1290
1328
  servesRefs: z.ZodDefault<z.ZodArray<z.ZodString>>;
1291
1329
  requestedBy: z.ZodOptional<z.ZodString>;
1292
1330
  }, z.core.$strict>>;
1331
+ pendingDecomposition: z.ZodOptional<z.ZodObject<{
1332
+ remaining: z.ZodString;
1333
+ }, z.core.$strict>>;
1293
1334
  }, z.core.$strip>;
1294
1335
  export type BuildPlanTaskGraph = z.infer<typeof BuildPlanTaskGraphSchema>;
1336
+ /** Whether this plan was landed before its decomposition finished (#3901): more tasks are still to be added to it. */
1337
+ export declare function isBuildPlanDecompositionPending(graph: Pick<BuildPlanTaskGraph, 'pendingDecomposition'>): boolean;
1295
1338
  /** @wildo_source:part:end build-plan.task-graph.config */
1296
1339
  //# sourceMappingURL=build-plan-task-graph.schemas.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"build-plan-task-graph.schemas.d.ts","sourceRoot":"","sources":["../../../../src/_core/build-plan/build-plan-task-graph.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,0BAA0B,CAAC;AAElC,OAAO,EAGL,kBAAkB,EAClB,uBAAuB,EAEvB,kBAAkB,EAElB,8BAA8B,EAE9B,oBAAoB,EACrB,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EAAE,4BAA4B,EAAE,MAAM,mEAAmE,CAAC;AACjH,OAAO,EAAE,gBAAgB,EAAE,MAAM,0CAA0C,CAAC;AAG5E;;;;;;;GAOG;AACH,oBAAY,yBAAyB;IACnC,EAAE,OAAO;CACV;AAED,yHAAyH;AACzH,eAAO,MAAM,0BAA0B,gBAAgB,CAAC;AAExD;;;;GAIG;AACH,oBAAY,uBAAuB;IACjC,8GAA8G;IAC9G,MAAM,WAAW;IACjB,6EAA6E;IAC7E,cAAc,mBA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,MAAM,6BAA6B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mCAAmC,CAAC,CAAC;AAEhG;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAmEnC,CAAC;AACH,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAE1E,sHAAsH;AACtH,wBAAgB,+BAA+B,CAAC,KAAK,EAAE,IAAI,CAAC,kBAAkB,EAAE,sBAAsB,CAAC,GAAG,OAAO,CAEhH;AACD,0DAA0D"}
@@ -2,6 +2,7 @@ import { z } from 'zod';
2
2
  // Side-effect import: this module calls `.systemEnum()` at load, so the decorators must be installed first —
3
3
  // never by the importer's luck (#966). A named import used only as a type would be elided and install nothing.
4
4
  import '@wildo-ai/zod-decorators';
5
+ import { ElectronicSignature_Level } from '@wildo-ai/external-connectors-models';
5
6
  import { CORE_APP_ROLES, CORE_ORG_ROLES, DataRetentionClass, HumanDecision_RouteKind, INBOUND_HANDLER_REF_PATTERN, InboundChannelKind, LABEL_KEY_SEGMENT_PATTERN, OrganizationRowConfinementMode, SYSTEM_OF_RECORD_NAME_PATTERN, SystemOfRecordAccess, } from '@wildo-ai/saas-models';
6
7
  import { MetaWorkflow_FunctionalTopic } from '../../application-creation/playbooks.application-creation.schemas.js';
7
8
  import { PlacementSurface } from '../placement-plan/placement-plan.schemas.js';
@@ -600,6 +601,12 @@ export const AGENT_WORK_REF_PATTERN = /^[A-Za-z0-9]+(?:[._-][A-Za-z0-9]+)*$/;
600
601
  * service qualifies them; the `service-method` family declares both halves as kebab-case slugs.
601
602
  */
602
603
  export const SERVICE_METHOD_ELEMENT_REF_PATTERN = /^[a-z0-9]+(?:-[a-z0-9]+)*\/[a-z0-9]+(?:-[a-z0-9]+)*$/;
604
+ /**
605
+ * A function tool's top-level argument name (#2915), as a gate's `deliverableFileArgument` names it: an identifier, the
606
+ * shape a tool's argument schema keys its properties by. The engine refuses at registration a name its schema does not
607
+ * declare as a string; this pattern only refuses what could never be one.
608
+ */
609
+ export const FUNCTION_TOOL_ARGUMENT_NAME_PATTERN = /^[A-Za-z_][A-Za-z0-9_]*$/;
603
610
  /** The ref a build-plan product carries for one step or decision point of the method (#2305). */
604
611
  export function serviceMethodElementRef(serviceRef, elementRef) {
605
612
  return `${serviceRef}/${elementRef}`;
@@ -743,12 +750,27 @@ export const BuildPlanTaskProductSchema = z.discriminatedUnion('kind', [
743
750
  * role, and its qualifications that qualification's kind; the derivation check compares them.
744
751
  */
745
752
  serviceMethodDecisionRef: z.string().regex(SERVICE_METHOD_ELEMENT_REF_PATTERN).optional(),
753
+ /**
754
+ * The tool's argument carrying the file the approver approves (#2915): the tool's `deliverableFileArgument`, so the
755
+ * approval's seal binds that file by its hash. Set when the decision this gate realizes approves a deliverable of the
756
+ * firm's method (`approvedByDecisionRef`); landing compares it with the tool's declaration.
757
+ */
758
+ deliverableFileArgument: z.string().regex(FUNCTION_TOOL_ARGUMENT_NAME_PATTERN).optional(),
759
+ /**
760
+ * The level the approved file is signed at, by its approver (#2915): the tool's `electronicSignature.requiredLevel`,
761
+ * with the approver as its one signer, the only signer the engine has. Set when the deliverable it approves is signed
762
+ * (`signature.level`); requires `deliverableFileArgument`, since only a file bound by its hash is sent for signature.
763
+ */
764
+ electronicSignatureLevel: z.enum(ElectronicSignature_Level).systemEnum('ElectronicSignature_Level').optional(),
746
765
  }).refine((gate) => (gate.route === HumanDecision_RouteKind.OWNER) === (gate.eligibleRole === undefined), {
747
766
  message: 'An OWNER gate names no role; a ROLE or ASSIGNEE gate names the role its answerer must hold.',
748
767
  path: ['eligibleRole'],
749
768
  }).refine((gate) => gate.route !== HumanDecision_RouteKind.OWNER || gate.requiredQualificationKinds === undefined, {
750
769
  message: 'An OWNER gate requires no qualification: its answerer is the person whose turn it is, whom nothing vets.',
751
770
  path: ['requiredQualificationKinds'],
771
+ }).refine((gate) => gate.electronicSignatureLevel === undefined || gate.deliverableFileArgument !== undefined, {
772
+ message: 'A gate whose approved file is signed names the argument carrying that file (deliverableFileArgument): only a file bound by its hash is sent for signature.',
773
+ path: ['electronicSignatureLevel'],
752
774
  }),
753
775
  z.strictObject({ kind: z.literal(BuildPlanTaskProductKind.WORK_UNIT_RESOURCE).systemEnum('BuildPlanTaskProductKind'), resourceRef: SlugSchema }),
754
776
  z.strictObject({
@@ -1014,6 +1036,12 @@ export const AI_USE_DECLARATION_SKILL_REF = 'ai-use-declaration';
1014
1036
  * whichever kind of agent calls the tool.
1015
1037
  */
1016
1038
  export const AGENT_APPROVAL_GATE_SKILL_REF = 'flows-actors-chat-assistant';
1039
+ /**
1040
+ * The skill a gate binding its approved file is built with, besides the gate's own (#2915): `electronic-signature-deliverables`
1041
+ * teaches `deliverableFileArgument` and `electronicSignature` on a tool, and what the approval's seal and the signature
1042
+ * request then record.
1043
+ */
1044
+ export const DELIVERABLE_APPROVAL_SKILL_REF = 'electronic-signature-deliverables';
1017
1045
  /**
1018
1046
  * The skill an organization-type task is built with (#3040): `organizationTypes` in the application's configuration, the
1019
1047
  * user types and roles a type offers, how it is joined, and the identity overrides it may carry. The dispatch derives it
@@ -1154,6 +1182,11 @@ export const BuildPlanTaskSchema = z.strictObject({
1154
1182
  * This distinction avoids repeatedly dispatching the same unprovable task without
1155
1183
  * presenting execution history as evidence that the intended product is correct.
1156
1184
  *
1185
+ * A minion's product is the one declared product composition DOES write first: the foundation's
1186
+ * `add-minion` declares the minion before its task runs, and its behaviour refs are spelled by no
1187
+ * code. The host therefore lands a minion task only on a completed run of its own, and names it in
1188
+ * `unverifiableLandedTaskRefs` too (#3900).
1189
+ *
1157
1190
  * The ONE hard exception is a `COMPANION_GENERATION_STEP`, which must declare NONE.
1158
1191
  * That kind already carries its own typed landed condition, owned by the
1159
1192
  * generation-step service — a set computed asynchronously (planner units x
@@ -1209,6 +1242,25 @@ export const BuildPlanTaskSchema = z.strictObject({
1209
1242
  */
1210
1243
  requestedBy: NonEmptyStringSchema.optional(),
1211
1244
  });
1245
+ /**
1246
+ * What a build plan landed BEFORE its decomposition finished still has to decompose (#3901).
1247
+ *
1248
+ * Where results are accepted without a person's review, the decomposition writes the plan in slices, each closed under
1249
+ * its prerequisites, and lands each one as it is written, so the build starts on the first slice instead of waiting for
1250
+ * the whole plan, whose writing takes longer the larger the application. A plan carrying this is PENDING:
1251
+ *
1252
+ * - every task it holds is final: the slices still to come only add tasks, and edges from new tasks into these, never
1253
+ * change or remove one (the decomposition refuses any answer that would);
1254
+ * - the checks over the WHOLE plan (it decomposes the whole domain plan, it realizes the firm's method) do not apply yet:
1255
+ * they are the complete plan's, judged when the last slice lands, which removes this field;
1256
+ * - the build is not finished while it is present, whatever share of the tasks it holds has landed.
1257
+ *
1258
+ * Absent means the decomposition is complete, which is every plan landed in one piece.
1259
+ */
1260
+ export const BuildPlanPendingDecompositionSchema = z.strictObject({
1261
+ /** What the decomposition still has to write, in the decomposer's words, so a reader of the plan knows what is missing. */
1262
+ remaining: NonEmptyStringSchema,
1263
+ });
1212
1264
  /**
1213
1265
  * THE build-plan payload — a **single aggregate per product**: the ORDERED
1214
1266
  * task graph that turns the accepted domain plan into buildable units.
@@ -1238,6 +1290,8 @@ export const BuildPlanTaskGraphSchema = z.object({
1238
1290
  * does. Same vacuity class already closed on the requirements family (`functional: min(1)`).
1239
1291
  */
1240
1292
  tasks: z.array(BuildPlanTaskSchema).min(1),
1293
+ /** Present only while the decomposition that writes this plan has not finished (#3901). See {@link BuildPlanPendingDecompositionSchema}. */
1294
+ pendingDecomposition: BuildPlanPendingDecompositionSchema.optional(),
1241
1295
  }).superRefine((graph, context) => {
1242
1296
  const refs = new Set();
1243
1297
  graph.tasks.forEach((task, index) => {
@@ -1294,5 +1348,9 @@ export const BuildPlanTaskGraphSchema = z.object({
1294
1348
  });
1295
1349
  });
1296
1350
  });
1351
+ /** Whether this plan was landed before its decomposition finished (#3901): more tasks are still to be added to it. */
1352
+ export function isBuildPlanDecompositionPending(graph) {
1353
+ return graph.pendingDecomposition !== undefined;
1354
+ }
1297
1355
  /** @wildo_source:part:end build-plan.task-graph.config */
1298
1356
  //# sourceMappingURL=build-plan-task-graph.schemas.js.map