@synap-core/workspace-templates 0.41.0 → 0.43.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/src/types.ts CHANGED
@@ -530,7 +530,12 @@ export interface TemplatePlaybook {
530
530
  description?: string;
531
531
  goalTemplate: string;
532
532
  params?: TemplatePlaybookParam[];
533
- executor?: "is-agent" | "external-agent" | "hybrid";
533
+ /**
534
+ * `generate` = one-shot (backend#988): one model call with no tools, the
535
+ * answer filed as a proposal where its one output `lands`. Needs a
536
+ * `subjectProfile`, no stages, no tools (schema/playbook.ts `checkOneShot`).
537
+ */
538
+ executor?: "is-agent" | "external-agent" | "hybrid" | "generate";
534
539
  /**
535
540
  * Legacy fan-out modes stay strings. `pinned` is an object: first eligible
536
541
  * pin, then `fallback`. Entity ids are not part of this shape.
@@ -561,6 +566,11 @@ export interface TemplatePlaybook {
561
566
  * playbook silently never fires. Always set it explicitly.
562
567
  */
563
568
  schedule?: { cron: string; enabled: boolean } | null;
569
+ /**
570
+ * What a run of this playbook may use beyond its class floor, "only these"
571
+ * (`schema/run-tools.ts`): run tools, intent slugs, capability or verb names.
572
+ */
573
+ tools?: string[];
564
574
  /** tool/skill keys this playbook grants. */
565
575
  grants?: string[];
566
576
  /**
@@ -694,9 +704,29 @@ export interface TemplateExpectedOutput {
694
704
  * reaches new runs and new stage entries only.
695
705
  */
696
706
  optional?: boolean;
707
+ /**
708
+ * WHERE a one-shot (`executor: generate`) playbook's result lands, on its
709
+ * ONE output (backend#988 `ExpectedOutput.lands`): today a section of the
710
+ * subject's own document, by title, filed as a proposal. Only a one-shot
711
+ * playbook may declare it.
712
+ */
713
+ lands?: TemplateOutputLanding;
697
714
  [key: string]: unknown;
698
715
  }
699
716
 
717
+ /** See {@link TemplateExpectedOutput.lands}. */
718
+ export interface TemplateOutputLanding {
719
+ target: "subject_document_section";
720
+ /** The section's title, one line (e.g. "Caption draft"). */
721
+ section: string;
722
+ /**
723
+ * Past outcomes as context (backend#1005): how many of the person's last
724
+ * approved and rejected drafts of this playbook in this space the run shows
725
+ * the model as examples, each 0..5. Off when absent.
726
+ */
727
+ examples?: { approved?: number; rejected?: number };
728
+ }
729
+
700
730
  /** A binary acceptance criterion — mirrors the pod's strict `sessionCriterionSchema`. */
701
731
  export interface TemplateCriterion {
702
732
  /** Lowercase slug, unique within the list. */