@synap-core/workspace-templates 0.41.0 → 0.44.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,36 @@ 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
+ * Whose section (backend#1010): `ai` (default) = an AI-owned section offered
724
+ * as a draft; `person` = the document's plain `## <section>` block (the
725
+ * person's own words, e.g. Content Studio's `## Caption`), replaced on
726
+ * approval, so approving is the one write.
727
+ */
728
+ owner?: "ai" | "person";
729
+ /**
730
+ * Past outcomes as context (backend#1005): how many of the person's last
731
+ * approved and rejected drafts of this playbook in this space the run shows
732
+ * the model as examples, each 0..5. Off when absent.
733
+ */
734
+ examples?: { approved?: number; rejected?: number };
735
+ }
736
+
700
737
  /** A binary acceptance criterion — mirrors the pod's strict `sessionCriterionSchema`. */
701
738
  export interface TemplateCriterion {
702
739
  /** Lowercase slug, unique within the list. */