@theoremjs/studio 0.3.4-next.757.gde44a4d → 0.3.4-next.759.g46e0e27

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 (91) hide show
  1. package/compile.d.ts +3 -3
  2. package/compile.js +70 -101
  3. package/cookbooks/catalog.js +14 -28
  4. package/draft.d.ts +24 -28
  5. package/draft.js +11 -12
  6. package/guardrail-probe.js +1 -30
  7. package/mod.d.ts +2 -2
  8. package/mod.js +2 -2
  9. package/package.json +4 -4
  10. package/page/assets/{ConsoleFrame-D309UtSL.js → ConsoleFrame-IP80BbVy.js} +1 -1
  11. package/page/assets/{MenuBottomSheet-CVBLnUiO.js → MenuBottomSheet-B90IZU5_.js} +1 -1
  12. package/page/assets/{SchemaFields-muOTQM8x.js → SchemaFields-BBCNN0DQ.js} +1 -1
  13. package/page/assets/{ToolResultCharts-Bhesjbc4.js → ToolResultCharts-BA5C4s_d.js} +1 -1
  14. package/page/assets/{Toolbar-t4I6MDV_.js → Toolbar-cLeL30W1.js} +1 -1
  15. package/page/assets/{TraceInspector-BqEGN_46.js → TraceInspector-6xElMxMt.js} +1 -1
  16. package/page/assets/{TraceOverview-DLEqvRF2.js → TraceOverview-BgjbNvh5.js} +1 -1
  17. package/page/assets/{_virtual_studio-type-sources-Cc4WAdgD.js → _virtual_studio-type-sources-_88V0ngH.js} +37 -44
  18. package/page/assets/browser-connection-C1_PJcSQ.js +1 -0
  19. package/page/assets/browser-engine-VzmlJFEv.js +16 -0
  20. package/page/assets/browser-transport-JN5LOARG.js +45 -0
  21. package/page/assets/compile-BJuLB_as.js +2 -0
  22. package/page/assets/{encode-files-CeZxxjYd.js → encode-files-CCet4LKE.js} +1 -1
  23. package/page/assets/{export-agent-CYZqQ4ll.js → export-agent-BzdhT7lw.js} +8 -8
  24. package/page/assets/{guardrail-tester-D-_i4Zuj.js → guardrail-tester-M-A7EKhq.js} +1 -1
  25. package/page/assets/index-BHZr7HfC.js +149 -0
  26. package/page/assets/index-BYDlXF8Q.css +1 -0
  27. package/page/assets/live-messages-tG47aB12.js +1 -0
  28. package/page/assets/{prompt-row-CIxkqX9Q.js → prompt-row-BUe2Ni0Y.js} +2 -2
  29. package/page/assets/reader-SzTjS7rw.js +5 -0
  30. package/page/assets/{registry-DP0ArymS.js → registry-BrmnEhgs.js} +1 -1
  31. package/page/assets/schema-BztznKB7.js +3 -0
  32. package/page/assets/{shaped-data-DCfLI4gb.js → shaped-data-D15FDUcH.js} +3 -3
  33. package/page/assets/{stub-REBz-ZC7.js → stub-CJG-5zBe.js} +1 -1
  34. package/page/assets/studio-code-pane-k8fWxZOU.js +10 -0
  35. package/page/assets/{studio-console-DHgwXKne.js → studio-console-BANFk07G.js} +1 -1
  36. package/page/assets/{studio-decision-B_EdxnvG.js → studio-decision-DFj8AA2c.js} +1 -1
  37. package/page/assets/{studio-embedding-mZIx4qHD.js → studio-embedding-CZy7UHg8.js} +1 -1
  38. package/page/assets/{studio-host-console-BmB0sSsX.js → studio-host-console-CRxuC6E-.js} +2 -2
  39. package/page/assets/{studio-labels-BRouZt4M.js → studio-labels-3Sq86Mzp.js} +1 -1
  40. package/page/assets/studio-live-BcOCiV63.js +5 -0
  41. package/page/assets/{studio-map-8aIk_pdY.js → studio-map-CCtcfniD.js} +1 -1
  42. package/page/assets/{studio-trace-replay-BaF2UAqT.js → studio-trace-replay-C5t6OfXY.js} +1 -1
  43. package/page/assets/{studio-type-checker-JZuu4iVI.js → studio-type-checker-o2Q6t4mP.js} +1 -1
  44. package/page/assets/{tool-schema-BwaPiLtT.js → tool-schema-D26IAEC3.js} +1 -1
  45. package/page/assets/trace-record-jocyYEPa.js +1 -0
  46. package/page/assets/tree-B0fXPCwG.js +3 -0
  47. package/page/assets/{turn-client-B3jV7UKH.js → turn-client-eM8VIbMd.js} +1 -1
  48. package/page/assets/{types-BDx4pnrt.js → types-CfC3vRXO.js} +1 -1
  49. package/page/assets/{use-one-call-BKLi6fk_.js → use-one-call-Drfw4kwV.js} +1 -1
  50. package/page/assets/{workspace-B6d08n7C.js → workspace-BlOYHATA.js} +1 -1
  51. package/page/index.html +17 -17
  52. package/prompt-doc.d.ts +1 -1
  53. package/prompt-doc.js +2 -2
  54. package/read-source.js +26 -39
  55. package/section-notes.d.ts +1 -2
  56. package/section-notes.js +1 -2
  57. package/system-markup.d.ts +1 -1
  58. package/system-markup.js +1 -1
  59. package/ui/lib/export-agent.js +9 -26
  60. package/ui/lib/studio-page.d.ts +9 -16
  61. package/ui/lib/studio-page.js +28 -38
  62. package/ui/profile-editor.js +46 -93
  63. package/ui/prompt-editor.d.ts +1 -1
  64. package/ui/prompt-editor.js +11 -11
  65. package/ui/prompt-line-node.d.ts +5 -5
  66. package/ui/prompt-line-node.js +9 -9
  67. package/ui/prompt-row.d.ts +3 -3
  68. package/ui/prompt-row.js +3 -3
  69. package/ui/studio-compare.d.ts +4 -2
  70. package/ui/studio-compare.js +6 -5
  71. package/ui/studio-live.d.ts +1 -1
  72. package/ui/studio-live.js +2 -2
  73. package/ui/studio-runner.d.ts +4 -3
  74. package/ui/studio-runner.js +9 -9
  75. package/ui/studio-screen.js +5 -2
  76. package/ui/studio.css +3 -3
  77. package/page/assets/browser-connection-159CdeHX.js +0 -1
  78. package/page/assets/browser-engine-Fi7MROTb.js +0 -16
  79. package/page/assets/browser-transport-C_sHZVPa.js +0 -45
  80. package/page/assets/compile-iB2CAmRL.js +0 -2
  81. package/page/assets/index-DakRjE8R.css +0 -1
  82. package/page/assets/index-DuTrjzLN.js +0 -149
  83. package/page/assets/live-messages-D-SPyR3e.js +0 -1
  84. package/page/assets/reader-DtOL_I1x.js +0 -5
  85. package/page/assets/schema-Cv4HAfBT.js +0 -3
  86. package/page/assets/studio-code-pane-DEBuOivy.js +0 -10
  87. package/page/assets/studio-live-Cy09vyLv.js +0 -5
  88. package/page/assets/trace-record--uEnDt_D.js +0 -1
  89. package/page/assets/tree-CL4ETBd5.js +0 -3
  90. package/slot-values.d.ts +0 -2
  91. package/slot-values.js +0 -22
package/compile.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { type DecisionAsset, type DecisionQuestion, type ImageProfileDefinition, type LiveProfileDefinition, type ProfileGuardrailsSpec, type SpeechProfileDefinition, type TextProfileDefinition, type TranscriptionProfileDefinition } from '@theoremjs/agents';
2
2
  import { type DecisionProfileDefinition, type EmbeddingProfileDefinition, type HostProfileDefinition, type ProfileDefinition } from '@theoremjs/agents/kernel';
3
- import type { ConditionDraft, GuardrailsDraft, StudioDraft } from './draft.ts';
3
+ import type { GuardrailsDraft, OptionDraft, StudioDraft } from './draft.ts';
4
4
  import type { StudioRunsOn } from './lent-keys.ts';
5
5
  import { type StudioProvider } from './providers.ts';
6
6
  import type { StructuredRegistration, ToolRegistration } from './registrations.ts';
@@ -45,8 +45,8 @@ export type AgentIdOf = (key: string) => string | undefined;
45
45
  * `undefined` when none has that key or an agent tool can't run it.
46
46
  */
47
47
  export type AgentToolInputOf = (key: string) => Record<string, unknown> | undefined;
48
- /** The conditions a draft declares so far: each one named with a value, the first of a name. */
49
- export declare function draftConditions(conditions: readonly ConditionDraft[]): Record<string, string[]>;
48
+ /** The options a draft declares so far: each one named with a value, the first of a name. */
49
+ export declare function draftOptions(options: readonly OptionDraft[]): OptionDraft[];
50
50
  /** What a tool that runs this draft's agent takes, as the kernel derives it from the agent's inputs. */
51
51
  export declare function agentToolInputSchema(draft: StudioDraft): Record<string, unknown> | undefined;
52
52
  /** Why these headers can't be saved, when one of them looks like a credential. */
package/compile.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { defineProfile, describeError, liveIngressChannelDefault, TheoremError, } from '@theoremjs/agents';
2
2
  import { BOUNDARIES, DETECT_DEFAULTS, DETECTOR_META, DETECTORS, detectProblem, hintProblem, patternListProblem, TOOL_BOUNDARIES, validateLabelOverrides, } from '@theoremjs/agents/guardrails';
3
- import { activityLabelProblem, agentToolInputFor, agentToolOutput, jsonSchemaFromZod, mimeAllowed, outOfScopeFields, systemLinesProblem, } from '@theoremjs/agents/kernel';
3
+ import { activityLabelProblem, agentToolInputFor, agentToolOutput, jsonSchemaFromZod, mimeAllowed, optionsProblem, outOfScopeFields, systemLinesProblem, } from '@theoremjs/agents/kernel';
4
4
  import { resolveObservabilityPolicy } from '@theoremjs/agents/observability';
5
5
  import { HTTP_METHODS, IMAGE_ATTACHMENT_ACCEPT_MIMES, PROFILE_HANDLE_MAX_CHARS, PROFILE_ID_MAX_CHARS, } from '@theoremjs/agents/schema';
6
6
  import { isCredentialName, MASK } from '@theoremjs/agents/surface';
@@ -289,38 +289,59 @@ const isAny = (_value) => true;
289
289
  function parseHeaders(raw) {
290
290
  return parseRecord(raw, isString);
291
291
  }
292
- /** The conditions a draft declares so far: each one named with a value, the first of a name. */
293
- export function draftConditions(conditions) {
294
- const declared = {};
295
- for (const { name, values } of conditions) {
296
- const named = name.trim();
297
- if (named && values.length > 0 && !Object.hasOwn(declared, named))
298
- declared[named] = values;
299
- }
300
- return declared;
292
+ /** The options a draft declares so far: each one named with a value, the first of a name. */
293
+ export function draftOptions(options) {
294
+ const seen = new Set();
295
+ return options.flatMap((option) => {
296
+ const name = option.name.trim();
297
+ if (!name || option.choices.length === 0 || seen.has(name))
298
+ return [];
299
+ seen.add(name);
300
+ return [{ ...option, name }];
301
+ });
302
+ }
303
+ /** A draft's options as a profile declares them. A blank label or description is left out. */
304
+ function compileOptions(options) {
305
+ if (options.length === 0)
306
+ return undefined;
307
+ return Object.fromEntries(options.map(({ name, label, choices }) => [
308
+ name,
309
+ {
310
+ ...(label.trim() ? { label: label.trim() } : {}),
311
+ choices: choices.map(({ value, description }) => description.trim() ? { value, description: description.trim() } : { value }),
312
+ },
313
+ ]));
301
314
  }
302
- /** What is wrong with each condition, reported on its row. Gives whether any was. */
303
- function reportConditions(conditions, slots, report) {
315
+ /** Says which value an option lists twice. */
316
+ function twiceListed({ choices }) {
317
+ const value = choices.find((choice, at) => choices.findIndex((each) => each.value === choice.value) !== at)?.value;
318
+ return value === undefined ? undefined : `${value} is listed twice.`;
319
+ }
320
+ /** What is wrong with each option, reported on its row. Gives whether any was. */
321
+ function reportOptions(options, report) {
304
322
  const seen = new Set();
305
- let wrong = false;
306
- conditions.forEach(({ name, values }, at) => {
307
- const named = name.trim();
308
- if (!named && values.length === 0)
323
+ let isWrong = false;
324
+ options.forEach((option, at) => {
325
+ const named = option.name.trim();
326
+ if (!named && option.choices.length === 0)
309
327
  return;
328
+ const declared = { [named]: { choices: option.choices.map(({ value }) => ({ value })) } };
310
329
  const problem = !named
311
- ? 'This condition needs a name.'
330
+ ? 'This option needs a name.'
312
331
  : seen.has(named)
313
- ? `Two conditions are called "${named}".`
314
- : systemLinesProblem('', { [named]: values }, slots);
332
+ ? `Two options are called "${named}".`
333
+ : option.choices.length === 0
334
+ ? 'This option needs a value.'
335
+ : (twiceListed(option) ?? optionsProblem(declared, undefined));
315
336
  seen.add(named);
316
337
  if (!problem)
317
338
  return;
318
- wrong = true;
319
- report('identity', problem, 'conditions', at);
339
+ isWrong = true;
340
+ report('identity', problem, 'options', at);
320
341
  });
321
- return wrong;
342
+ return isWrong;
322
343
  }
323
- /** The prompt's lines and the facts they read, each problem reported on the identity section. */
344
+ /** The prompt's lines and the options they read, each problem reported on the identity section. */
324
345
  function compilePrompt(draft, report) {
325
346
  const parsed = parseSystemMarkup(draft.identity.system);
326
347
  if (!parsed.ok)
@@ -332,19 +353,16 @@ function compilePrompt(draft, report) {
332
353
  : lines.length === 1 && typeof first === 'string'
333
354
  ? first
334
355
  : lines;
335
- const slots = Object.fromEntries(draft.inputs.slots.map((slot) => [
336
- slot.name.trim(),
337
- slot.choices.map((choice) => choice.value.trim()).filter(Boolean),
338
- ]));
339
- const wrong = reportConditions(draft.identity.conditions, slots, report);
340
- const conditions = draftConditions(draft.identity.conditions);
341
- const declared = Object.keys(conditions).length > 0 ? conditions : undefined;
342
- if (system !== undefined && !wrong) {
343
- const problem = systemLinesProblem(system, declared, slots);
356
+ const isWrong = reportOptions(draft.identity.options, report);
357
+ const declared = draftOptions(draft.identity.options);
358
+ const code = compileOptions(declared.filter((option) => !option.isShownInChat));
359
+ const person = compileOptions(declared.filter((option) => option.isShownInChat));
360
+ if (system !== undefined && !isWrong) {
361
+ const problem = systemLinesProblem(system, code, person);
344
362
  if (problem)
345
363
  report('identity', problem, 'system');
346
364
  }
347
- return { system, conditions: declared };
365
+ return { system, code, person };
348
366
  }
349
367
  /** A record field's value, reporting `message` on `field` when it doesn't parse. */
350
368
  function recordField(raw, isValue, report) {
@@ -445,7 +463,7 @@ export function agentToolInputSchema(draft) {
445
463
  if (type !== 'text' && type !== 'image' && type !== 'speech')
446
464
  return undefined;
447
465
  const inputs = type !== 'speech' && draftFacets(draft).includes('inputs')
448
- ? compileInputs(draft.inputs, type, () => { })
466
+ ? compileInputs(draft.inputs, compilePrompt(draft, () => { }).person, type, () => { })
449
467
  : undefined;
450
468
  return jsonSchemaFromZod(agentToolInputFor({ type, ...(inputs ? { inputs } : {}) }), 'input');
451
469
  }
@@ -672,7 +690,7 @@ function compileTools(draft, withLoader, withParallel, report, agentIdOf, agentI
672
690
  tools: { allow, ...(t2Loader ? { t2Loader } : {}), ...(parallel ? { parallel } : {}) },
673
691
  };
674
692
  }
675
- function compileInputs(inputs, type, report) {
693
+ function compileInputs(inputs, options, type, report) {
676
694
  const outside = type === 'image'
677
695
  ? inputs.attachmentsAccept.filter((rule) => !mimeAllowed(IMAGE_ATTACHMENT_ACCEPT_MIMES, rule))
678
696
  : [];
@@ -698,7 +716,6 @@ function compileInputs(inputs, type, report) {
698
716
  checkWhole(report, 'inputs', 'maxBytes', 'Max bytes', inputs.maxBytes, 1);
699
717
  checkWhole(report, 'inputs', 'maxTurnBytes', 'Max turn bytes', inputs.maxTurnBytes, 1);
700
718
  const limitsByMime = compileLimitsByMime(inputs, report);
701
- const slots = compileSlots(inputs, report);
702
719
  const context = compileContext(inputs, report);
703
720
  return {
704
721
  ...(inputs.text ? {} : { text: false }),
@@ -710,7 +727,7 @@ function compileInputs(inputs, type, report) {
710
727
  ...(inputs.maxBytes !== null ? { maxBytes: inputs.maxBytes } : {}),
711
728
  ...(inputs.maxTurnBytes !== null ? { maxTurnBytes: inputs.maxTurnBytes } : {}),
712
729
  ...(limitsByMime ? { limitsByMime } : {}),
713
- ...(slots ? { slots } : {}),
730
+ ...(options ? { options } : {}),
714
731
  ...(context ? { context } : {}),
715
732
  };
716
733
  }
@@ -734,64 +751,16 @@ function compileLimitsByMime(inputs, report) {
734
751
  }
735
752
  return entries.length ? { ...inputs.limitsByMime } : undefined;
736
753
  }
737
- /** One slot's problems, each on its row: a missing or repeated name or value. */
738
- function slotProblems(slot, at, slots) {
739
- const name = slot.name.trim();
740
- const problems = [];
741
- if (!name)
742
- problems.push('Name this slot.');
743
- else if (slots.findIndex((other) => other.name.trim() === name) < at) {
744
- problems.push(`Another slot is called ${name}.`);
745
- }
746
- const values = slot.choices.map((choice) => choice.value.trim());
747
- if (!values.some(Boolean))
748
- problems.push('Give this slot a choice.');
749
- if (slot.choices.some((choice, index) => !values[index] && choice.description.trim())) {
750
- problems.push('Every choice with a description needs a value.');
751
- }
752
- const repeated = values.filter((value, index) => value && values.indexOf(value) < index);
753
- for (const value of new Set(repeated))
754
- problems.push(`${value} is a choice twice.`);
755
- return problems;
756
- }
757
- /**
758
- * Each slot by name. A slot with no label and no descriptions is its list of values; any other
759
- * is `{ label?, choices }`. A choice left blank is left out.
760
- */
761
- function compileSlots(inputs, report) {
762
- if (!inputs.slots.length)
763
- return undefined;
764
- inputs.slots.forEach((slot, at) => {
765
- for (const problem of slotProblems(slot, at, inputs.slots)) {
766
- report('inputs', problem, 'slots', at);
767
- }
768
- });
769
- return Object.fromEntries(inputs.slots.map((slot) => {
770
- const label = slot.label.trim();
771
- const choices = slot.choices
772
- .filter((choice) => choice.value.trim())
773
- .map((choice) => ({ value: choice.value.trim(), description: choice.description.trim() }));
774
- const plain = !label && choices.every((choice) => !choice.description);
775
- const decl = plain
776
- ? choices.map((choice) => choice.value)
777
- : {
778
- ...(label ? { label } : {}),
779
- choices: choices.map(({ value, description }) => description ? { value, description } : { value }),
780
- };
781
- return [slot.name.trim(), decl];
782
- }));
783
- }
784
- /** A call profile's inputs are its slots and context, and are left out when it has neither. */
785
- function compileLiveInputs(inputs, report) {
786
- const slots = compileSlots(inputs, report);
754
+ /** A call profile's inputs are its options and context, and are left out when it has neither. */
755
+ function compileLiveInputs(inputs, options, report) {
787
756
  const context = compileContext(inputs, report);
788
- if (!slots && !context)
757
+ if (!options && !context)
789
758
  return {};
790
- return { inputs: { ...(slots ? { slots } : {}), ...(context ? { context } : {}) } };
759
+ return { inputs: { ...(options ? { options } : {}), ...(context ? { context } : {}) } };
791
760
  }
792
- /** The shapes a slot's value picks: its schemas, and what `outputs.structured` writes. */
793
- function compileSlotShapes(outputs, fallback, report) {
794
- const { slot, shapes } = outputs.bySlot ?? { slot: '', shapes: [] };
761
+ /** The shapes an option's value picks: its schemas, and what `outputs.structured` writes. */
762
+ function compileOptionShapes(outputs, fallback, report) {
763
+ const { option, shapes } = outputs.byOption ?? { option: '', shapes: [] };
795
764
  const also = [];
796
765
  const map = {};
797
766
  for (const shape of shapes) {
@@ -803,7 +772,7 @@ function compileSlotShapes(outputs, fallback, report) {
803
772
  map[shape.choice] = shape.schemaId;
804
773
  }
805
774
  }
806
- return also.length ? { also, written: { by: slot, map, fallback } } : undefined;
775
+ return also.length ? { also, written: { by: option, map, fallback } } : undefined;
807
776
  }
808
777
  /** `shaped`: the type takes a structured reply and its validation (text only). */
809
778
  function compileOutputs(outputs, shaped, report) {
@@ -821,9 +790,9 @@ function compileOutputs(outputs, shaped, report) {
821
790
  structured = { id, spec: { jsonSchema: schema.schema } };
822
791
  }
823
792
  }
824
- const bySlot = structured && compileSlotShapes(outputs, structured.id, report);
825
- if (structured && bySlot)
826
- structured = { ...structured, also: bySlot.also };
793
+ const byOption = structured && compileOptionShapes(outputs, structured.id, report);
794
+ if (structured && byOption)
795
+ structured = { ...structured, also: byOption.also };
827
796
  if (validationEnabled) {
828
797
  checkWhole(report, 'outputs', 'maxRetries', 'Validation max retries', outputs.maxRetries, 0);
829
798
  }
@@ -843,7 +812,7 @@ function compileOutputs(outputs, shaped, report) {
843
812
  ...(outputs.streamThoughts ? {} : { streamThoughts: false }),
844
813
  };
845
814
  const spec = {
846
- ...(structured ? { structured: bySlot?.written ?? structured.id } : {}),
815
+ ...(structured ? { structured: byOption?.written ?? structured.id } : {}),
847
816
  ...(Object.keys(validation).length ? { validation } : {}),
848
817
  ...(Object.keys(streaming).length ? { streaming } : {}),
849
818
  };
@@ -1672,7 +1641,7 @@ function compileHost(draft, report, agentIdOf, agentInputOf) {
1672
1641
  function assemble(draft, type, report, on, agentIdOf, agentInputOf) {
1673
1642
  const facets = new Set(draftFacets(draft));
1674
1643
  const allows = (path) => draftAllows(draft, path);
1675
- const { system, conditions } = compilePrompt(draft, report);
1644
+ const { system, code, person } = compilePrompt(draft, report);
1676
1645
  const modelFields = compileModels(draft, type, report, agentIdOf);
1677
1646
  const { outputs, structured } = facets.has('outputs')
1678
1647
  ? compileOutputs(draft.outputs, allows('outputs.structured'), report)
@@ -1691,7 +1660,7 @@ function assemble(draft, type, report, on, agentIdOf, agentInputOf) {
1691
1660
  id: draft.identity.agentId.trim(),
1692
1661
  identity: {
1693
1662
  handle: draft.identity.handle.trim(),
1694
- ...(conditions ? { conditions } : {}),
1663
+ ...(code ? { options: code } : {}),
1695
1664
  ...(system ? { system } : {}),
1696
1665
  },
1697
1666
  ...modelFields,
@@ -1702,8 +1671,8 @@ function assemble(draft, type, report, on, agentIdOf, agentInputOf) {
1702
1671
  ...(!facets.has('inputs')
1703
1672
  ? {}
1704
1673
  : type === 'live'
1705
- ? compileLiveInputs(draft.inputs, report)
1706
- : { inputs: compileInputs(draft.inputs, type, report) }),
1674
+ ? compileLiveInputs(draft.inputs, person, report)
1675
+ : { inputs: compileInputs(draft.inputs, person, type, report) }),
1707
1676
  ...(outputs ? { outputs } : {}),
1708
1677
  ...(turnBehaviour ? { turnBehaviour } : {}),
1709
1678
  ...(guardrails ? { guardrails } : {}),
@@ -385,7 +385,7 @@ function exampleTextDraft(identity, tools) {
385
385
  const inputs = demoInputsSpec();
386
386
  return {
387
387
  ...blank,
388
- identity: { ...identity, profileType: 'text', conditions: [] },
388
+ identity: { options: [], ...identity, profileType: 'text' },
389
389
  included: ['outputs', 'turnBehaviour', 'guardrails', 'observability', 'labels'],
390
390
  models: { defaultModel: 'open', allowModelSelect: true, maxSteps: 12, key: 'gemini' },
391
391
  modelBindings: defaultTextModelBindings(),
@@ -398,7 +398,6 @@ function exampleTextDraft(identity, tools) {
398
398
  maxBytes: inputs.maxBytes,
399
399
  maxTurnBytes: inputs.maxTurnBytes,
400
400
  limitsByMime: {},
401
- slots: [],
402
401
  contextFrom: [],
403
402
  contextMaxChars: null,
404
403
  },
@@ -520,6 +519,10 @@ export function createResearchScoutDraft() {
520
519
  agentId: 'research.scout',
521
520
  handle: 'scout',
522
521
  system: [DEMO_RESEARCH_SYSTEM, ...RESEARCH_READER_LINES].join('\n\n'),
522
+ options: [
523
+ researchOption('focus', 'Focus', [RESEARCH_MODELS_FOCUS, 'arXiv', 'GitHub', 'Anywhere']),
524
+ researchOption('reader', 'Reader', ['anyone', 'reviewer', 'student']),
525
+ ],
523
526
  }, { tools: { t2Loader: '', parallel: true }, toolSpecs: exampleTools(DEMO_RESEARCH_TOOLS) });
524
527
  return {
525
528
  ...base,
@@ -531,7 +534,6 @@ export function createResearchScoutDraft() {
531
534
  maxFiles: null,
532
535
  maxBytes: null,
533
536
  maxTurnBytes: null,
534
- slots: [researchFocusSlot(), researchReaderSlot()],
535
537
  },
536
538
  models: {
537
539
  defaultModel: 'open',
@@ -583,8 +585,8 @@ export function createResearchScoutDraft() {
583
585
  mode: 'structured',
584
586
  schemaId: RESEARCH_REPLY_SCHEMA_ID,
585
587
  schemaJson: RESEARCH_REPLY_SCHEMA_JSON,
586
- bySlot: {
587
- slot: 'focus',
588
+ byOption: {
589
+ option: 'focus',
588
590
  shapes: [
589
591
  {
590
592
  choice: RESEARCH_MODELS_FOCUS,
@@ -616,30 +618,14 @@ const RESEARCH_READER_LINES = [
616
618
  ];
617
619
  /** The focus that answers in `research.models`. */
618
620
  const RESEARCH_MODELS_FOCUS = 'Hugging Face Open Research';
619
- /** Where a turn looks first. */
620
- function researchFocusSlot() {
621
- return {
622
- key: draftKey('slot'),
623
- name: 'focus',
624
- label: 'Focus',
625
- choices: [RESEARCH_MODELS_FOCUS, 'arXiv', 'GitHub', 'Anywhere'].map((value) => ({
626
- key: draftKey('choice'),
627
- value,
628
- description: '',
629
- })),
630
- };
631
- }
632
- /** Who the scout writes for, which picks its lines in `RESEARCH_READER_LINES`. */
633
- function researchReaderSlot() {
621
+ /** A shown option with these values. */
622
+ function researchOption(name, label, values) {
634
623
  return {
635
- key: draftKey('slot'),
636
- name: 'reader',
637
- label: 'Reader',
638
- choices: ['anyone', 'reviewer', 'student'].map((value) => ({
639
- key: draftKey('choice'),
640
- value,
641
- description: '',
642
- })),
624
+ key: draftKey('option'),
625
+ name,
626
+ label,
627
+ isShownInChat: true,
628
+ choices: values.map((value) => ({ key: draftKey('choice'), value, description: '' })),
643
629
  };
644
630
  }
645
631
  /** Flags a page that says its paper was taken back. */
package/draft.d.ts CHANGED
@@ -15,11 +15,23 @@ export type StudioProfileType = ProfileType;
15
15
  /** The types that run a model turn; a decision asks questions, and a host runs its tools. */
16
16
  export type StudioTurnProfileType = Exclude<StudioProfileType, 'decision' | 'host'>;
17
17
  export declare const STUDIO_PROFILE_TYPES: readonly StudioProfileType[];
18
- /** A fact each turn states: its name and the values it can take. */
19
- export interface ConditionDraft {
18
+ /** One value an option can take, and what the page says about it. */
19
+ export interface OptionChoiceDraft {
20
+ key: string;
21
+ value: string;
22
+ description: string;
23
+ }
24
+ /**
25
+ * One named option: what lines of the prompt read and print, the page's label for it, and its
26
+ * values. Shown in chat, a person picks it and it compiles to `inputs.options`; otherwise the
27
+ * host's code states it and it compiles to `identity.options`.
28
+ */
29
+ export interface OptionDraft {
20
30
  key: string;
21
31
  name: string;
22
- values: string[];
32
+ label: string;
33
+ isShownInChat: boolean;
34
+ choices: OptionChoiceDraft[];
23
35
  }
24
36
  export interface IdentityDraft {
25
37
  agentId: string;
@@ -30,7 +42,7 @@ export interface IdentityDraft {
30
42
  * `{private: …}`. Unused on speech, which has no system channel.
31
43
  */
32
44
  system: string;
33
- conditions: ConditionDraft[];
45
+ options: OptionDraft[];
34
46
  }
35
47
  export interface ModelsDraft {
36
48
  /** Who holds the conversation a saved state continues; unset is the kernel's default, the host. */
@@ -155,19 +167,6 @@ export interface ToolsDraft {
155
167
  export interface ToolSpecDraft extends StudioToolSpecSeed {
156
168
  key: string;
157
169
  }
158
- /** One value a slot can take, and what the page says about it. */
159
- export interface SlotChoiceDraft {
160
- key: string;
161
- value: string;
162
- description: string;
163
- }
164
- /** One named choice a turn can make: its `{name}`, the page's label for it, and its values. */
165
- export interface SlotDraft {
166
- key: string;
167
- name: string;
168
- label: string;
169
- choices: SlotChoiceDraft[];
170
- }
171
170
  export interface InputsDraft {
172
171
  text: boolean;
173
172
  attachmentsAccept: string[];
@@ -177,16 +176,14 @@ export interface InputsDraft {
177
176
  maxTurnBytes: number | null;
178
177
  /** The largest file of each type (or `type/*` family), in bytes, in place of `maxBytes`. */
179
178
  limitsByMime: Record<string, number>;
180
- /** Named choices a turn can make; none omits `inputs.slots`. */
181
- slots: SlotDraft[];
182
179
  /** Who may send the agent context; none omits `inputs.context`. */
183
180
  contextFrom: ContextSender[];
184
181
  /** The longest context package from each sender, in characters of JSON. */
185
182
  contextMaxChars: number | null;
186
183
  }
187
- /** The reply shapes a slot's value picks; any other value takes the outputs' own schema. */
188
- export interface SlotShapesDraft {
189
- slot: string;
184
+ /** The reply shapes an option's value picks; any other value takes the outputs' own schema. */
185
+ export interface OptionShapesDraft {
186
+ option: string;
190
187
  shapes: {
191
188
  choice: string;
192
189
  schemaId: string;
@@ -197,7 +194,7 @@ export interface OutputsDraft {
197
194
  mode: 'text' | 'structured';
198
195
  schemaId: string;
199
196
  schemaJson: string;
200
- bySlot?: SlotShapesDraft;
197
+ byOption?: OptionShapesDraft;
201
198
  /** `''` omits it (kernel default: SSE). */
202
199
  streamMode: '' | StreamMode;
203
200
  streamThoughts: boolean;
@@ -422,7 +419,7 @@ export interface StudioDraft {
422
419
  decision: DecisionDraft;
423
420
  labels: LabelsDraft;
424
421
  }
425
- export declare function draftKey(prefix: 'agent' | 'condition' | 'entry' | 'model' | 'tool' | 'question' | 'criterion' | 'reference' | 'image' | 'slot' | 'choice'): string;
422
+ export declare function draftKey(prefix: 'agent' | 'entry' | 'model' | 'tool' | 'question' | 'criterion' | 'reference' | 'image' | 'option' | 'choice'): string;
426
423
  export declare function defaultModelBinding(partial?: Partial<ModelBindingDraft>): ModelBindingDraft;
427
424
  export declare function defaultToolSpec(partial?: Partial<ToolSpecDraft>): ToolSpecDraft;
428
425
  /**
@@ -454,10 +451,9 @@ export declare function newDecisionImage(draft: StudioDraft, file: string, image
454
451
  mimeType: string;
455
452
  data: string;
456
453
  }): DecisionImageDraft;
457
- /** A new slot, with a name the draft doesn't use yet and two blank choices. */
458
- export declare function newSlot(slots: readonly SlotDraft[]): SlotDraft;
459
- export declare function newCondition(): ConditionDraft;
460
- export declare function newSlotChoice(): SlotChoiceDraft;
454
+ export declare function newOption(): OptionDraft;
455
+ /** One row per value, each keeping the row its value already had. */
456
+ export declare function optionChoices(values: readonly string[], current: readonly OptionChoiceDraft[]): OptionChoiceDraft[];
461
457
  /** One blank row: an option, a level, or a criterion. */
462
458
  export declare function newCriterion(): DecisionCriterionDraft;
463
459
  /** The rows a question of `type` starts with: two options, two levels, or none. */
package/draft.js CHANGED
@@ -242,16 +242,16 @@ export function newDecisionImage(draft, file, image) {
242
242
  const name = freeName(base, taken, (n) => `${base}_${n}`);
243
243
  return { key: draftKey('image'), name, ...image };
244
244
  }
245
- /** A new slot, with a name the draft doesn't use yet and two blank choices. */
246
- export function newSlot(slots) {
247
- const name = freeName('slot', slots.map((slot) => slot.name), (n) => `slot_${String(n)}`);
248
- return { key: draftKey('slot'), name, label: '', choices: [newSlotChoice(), newSlotChoice()] };
249
- }
250
- export function newCondition() {
251
- return { key: draftKey('condition'), name: '', values: [] };
252
- }
253
- export function newSlotChoice() {
254
- return { key: draftKey('choice'), value: '', description: '' };
245
+ export function newOption() {
246
+ return { key: draftKey('option'), name: '', label: '', isShownInChat: false, choices: [] };
247
+ }
248
+ /** One row per value, each keeping the row its value already had. */
249
+ export function optionChoices(values, current) {
250
+ return values.map((value) => current.find((choice) => choice.value === value) ?? {
251
+ key: draftKey('choice'),
252
+ value,
253
+ description: '',
254
+ });
255
255
  }
256
256
  /** One blank row: an option, a level, or a criterion. */
257
257
  export function newCriterion() {
@@ -283,7 +283,7 @@ export function createBlankDraft() {
283
283
  profileType: '',
284
284
  handle: '',
285
285
  system: '',
286
- conditions: [],
286
+ options: [],
287
287
  },
288
288
  included: ['observability', 'labels'],
289
289
  models: { defaultModel: '', allowModelSelect: false, maxSteps: null, key: '' },
@@ -299,7 +299,6 @@ export function createBlankDraft() {
299
299
  maxBytes: null,
300
300
  maxTurnBytes: null,
301
301
  limitsByMime: {},
302
- slots: [],
303
302
  contextFrom: [],
304
303
  contextMaxChars: null,
305
304
  },
@@ -12,7 +12,6 @@ import { actionAt, DETECTORS, resolveDetect, sanitizeTurnRequestWithEvents, TOOL
12
12
  import { ANSWER_TOOL, keySlotsOf, } from '@theoremjs/agents/kernel';
13
13
  import { firstServed } from "./policy.js";
14
14
  import { agentCallHook, runtimeProvider, writtenScope, } from "./runtime-scope.js";
15
- import { choiceValues } from "./slot-values.js";
16
15
  import { sampleFromJsonSchema } from "./tool-schema.js";
17
16
  /** Where a probe's text enters the turn. */
18
17
  export const PROBE_BOUNDARIES = [
@@ -615,43 +614,15 @@ function assertProbeable(profile, probe) {
615
614
  throw new TheoremError('request', `A probe is at most ${PROBE_TEXT_LIMIT} characters.`); // labels-exempt: builder diagnostic
616
615
  }
617
616
  }
618
- /**
619
- * What a turn of `definition` states, each on its first value, as the studio's page opens them.
620
- * why: The kernel refuses a turn that leaves a prompt line's condition or slot unset, and a probe
621
- * has no page to pick them.
622
- */
623
- function statedByFirstValues(definition) {
624
- const inputs = 'inputs' in definition ? definition.inputs : undefined;
625
- const declaredSlots = inputs && 'slots' in inputs ? inputs.slots : undefined;
626
- const slots = Object.entries(declaredSlots ?? {}).flatMap(([name, decl]) => {
627
- const value = choiceValues(decl)?.[0];
628
- return value === undefined ? [] : [[name, value]];
629
- });
630
- const identity = 'identity' in definition ? definition.identity : undefined;
631
- const declared = identity && 'conditions' in identity ? identity.conditions : undefined;
632
- const { path, ...conditions } = Object.fromEntries(Object.entries(declared ?? {}).map(([name, values]) => [name, values[0] ?? '']));
633
- return {
634
- slots: Object.fromEntries(slots),
635
- turn: {
636
- ...(path === undefined ? {} : { path }),
637
- ...(declared ? { conditions } : {}),
638
- },
639
- };
640
- }
641
617
  /** Where a probe runs: a host or a live agent calls the tool, any other takes a turn. */
642
618
  function probeStream(run) {
643
619
  const { scope, profile, probe, signal, onAgentCall, sink } = run;
644
620
  if (run.definition.type === 'host' || run.definition.type === 'live') {
645
621
  return scope.invokeTool({ profile: profile.id, ...hostCall(probe), signal, onAgentCall }, sink);
646
622
  }
647
- const stated = statedByFirstValues(run.definition);
648
623
  return scope.runTurn({
649
624
  profile: profile.id,
650
- input: {
651
- ...turnInput(probe),
652
- ...(Object.keys(stated.slots).length ? { slots: stated.slots } : {}),
653
- },
654
- ...stated.turn,
625
+ input: turnInput(probe),
655
626
  ...(probe.boundary === 'system' ? { system: probe.text } : {}),
656
627
  signal,
657
628
  onAgentCall,
package/mod.d.ts CHANGED
@@ -1,9 +1,9 @@
1
1
  export { KNOWN_GEMINI_EMBEDDING_MODELS, KNOWN_OPENROUTER_EMBEDDING_MODELS, } from './browser-connection.ts';
2
- export { type CompiledStudio, compileStudio, credentialHeaderProblem, credentialUrlProblem, draftConditions, type StudioCompileResult, type StudioIssue, type StudioProfileDefinition, type StudioTurnProfileDefinition, } from './compile.ts';
2
+ export { type CompiledStudio, compileStudio, credentialHeaderProblem, credentialUrlProblem, draftOptions, type StudioCompileResult, type StudioIssue, type StudioProfileDefinition, type StudioTurnProfileDefinition, } from './compile.ts';
3
3
  export { type CompiledWorkspace, compileWorkspace, type WorkspaceCompileResult, workspaceRunAgent, } from './compile-workspace.ts';
4
4
  export type { CookbookEntry, CookbookId, CookbookIncludeTag, CookbookTags, GoogleBindingViolation, GoogleFreeTierGrounding, GoogleImageAspectRatio, GoogleImageInputMime, GoogleImageOutputMime, GoogleImagePins, GoogleImageResolution, GoogleLivePins, GoogleSpeechPins, GoogleSpeechVoice, GoogleThinkingLevel, GoogleVoiceInputMime, LocalBindingViolation, ProfileSliceOptions, StitchRecipe, ToolSliceField, ToolSliceOptions, } from './cookbooks/mod.ts';
5
5
  export { addArchitectExample, addResearchExample, COOKBOOK_IDS, COOKBOOK_TOOL_HANDLERS, COOKBOOKS, cookbookOpening, cookbookTraceRecords, createArchitectWorkspace, createConsoleExampleDraft, createDecisionExampleDraft, createExampleDraft, createGeminiEmbeddingExampleDraft, createLiveExampleDraft, createNarratorExampleDraft, createPageReaderExampleDraft, createResearchScoutDraft, createResearchWorkspace, DECISION_EXAMPLE_AGENT_ID, DECISION_EXAMPLE_STATE, DEMO_ALLOWED_HOSTS, DEMO_ARCHITECT_SYSTEM, DEMO_ARCHITECT_TOOLS, DEMO_CONCIERGE_SYSTEM, DEMO_CONCIERGE_TOOLS, DEMO_CONSOLE_TOOLS, DEMO_HTTP_SAMPLE_INPUT, DEMO_LIVE_CONCIERGE_SYSTEM, DEMO_RESEARCH_STAGE_READ_TOOLS, DEMO_RESEARCH_SYSTEM, DEMO_RESEARCH_TOOLS, DISCOVER_LOADED, decisionExampleAssets, decisionExampleDraft, demoHttpSampleInput, demoInputsSpec, demoToolSpecs, exampleTools, GEMINI_MODELS_URL, GOOGLE_BUILTIN_TOOLS, GOOGLE_FREE_TIER_GROUNDING, GOOGLE_IMAGE_ASPECT_RATIOS, GOOGLE_IMAGE_INPUT_MIMES, GOOGLE_IMAGE_OUTPUT_MIMES, GOOGLE_IMAGE_RESOLUTIONS, GOOGLE_NO_EFFORT_API_IDS, GOOGLE_NO_THINKING_API_IDS, GOOGLE_SINGLE_TURN_API_IDS, GOOGLE_SPEECH_FORMATS, GOOGLE_SPEECH_VOICES, GOOGLE_THINKING_LEVELS, GOOGLE_THINKING_REQUIRED_API_IDS, GOOGLE_VOICE_INPUT_MIMES, googleBindingViolation, googleEfforts, googleFreeTierBuiltins, localBindingViolation, OPENROUTER_BUILTIN_TOOLS, OPENROUTER_IMAGES_IGNORED_INPUTS, OPENROUTER_IMAGES_INPUT_MIMES, ollamaModelThinks, projectProfileSlice, projectToolSlice, RESEARCH_ALLOWED_HOSTS, RESEARCH_FIRST_TURN_PROMPT, RESEARCH_PAGE_READER_AGENT_ID, RESEARCH_PAGE_READER_STATE, RESEARCH_REPLY_SCHEMA_ID, RESEARCH_REPLY_SCHEMA_JSON, resolveCookbookSlice, stitchCookbook, } from './cookbooks/mod.ts';
6
- export { agentToolTarget, COMPACTION_DRAFT_DEFAULTS, type ConditionDraft, createBlankDraft, type DecisionCriterionDraft, type DecisionDraft, type DecisionImageDraft, type DecisionQuestionDraft, type DecisionQuestionType, defaultModelBinding, defaultToolSpec, draftAllows, draftFacets, draftKey, type EffortDraft, EXAMPLE_DECISION_STATE, EXAMPLE_EMBEDDING_QUERY, EXAMPLE_EMBEDDING_TEXT, EXAMPLE_SPAN_DECISION_STATE, exampleDecisionDraft, excludeFacet, type GuardrailsDraft, type IdentityDraft, type ImageDraft, type ImageReferenceDraft, INLINE_LABELS, type InputsDraft, type ItemRuleOnFail, includableFacets, includeFacet, type LabelsDraft, type LiveDraft, MODEL_LIMITS, type ModelBindingDraft, type ModelsDraft, newCondition, newCriteria, newCriterion, newDecisionImage, newDecisionQuestion, newModelBinding, newOwnDetector, newPattern, newSlot, newSlotChoice, newToolSpec, type ObservabilityDraft, type OutputsDraft, type OwnDetectorDraft, type PatternDraft, type PatternSourceDraft, plantsCanary, removeModelBinding, type SlotChoiceDraft, type SlotDraft, type SpeechDraft, STUDIO_PROFILE_TYPES, type StudioDraft, type StudioProfileType, type StudioTurnProfileType, setProfileType, TIMER_MAX_MS, type ToolSpecDraft, type ToolsDraft, type TurnBehaviourDraft, takesContinueInstruction, updateModelBinding, } from './draft.ts';
6
+ export { agentToolTarget, COMPACTION_DRAFT_DEFAULTS, createBlankDraft, type DecisionCriterionDraft, type DecisionDraft, type DecisionImageDraft, type DecisionQuestionDraft, type DecisionQuestionType, defaultModelBinding, defaultToolSpec, draftAllows, draftFacets, draftKey, type EffortDraft, EXAMPLE_DECISION_STATE, EXAMPLE_EMBEDDING_QUERY, EXAMPLE_EMBEDDING_TEXT, EXAMPLE_SPAN_DECISION_STATE, exampleDecisionDraft, excludeFacet, type GuardrailsDraft, type IdentityDraft, type ImageDraft, type ImageReferenceDraft, INLINE_LABELS, type InputsDraft, type ItemRuleOnFail, includableFacets, includeFacet, type LabelsDraft, type LiveDraft, MODEL_LIMITS, type ModelBindingDraft, type ModelsDraft, newCriteria, newCriterion, newDecisionImage, newDecisionQuestion, newModelBinding, newOption, newOwnDetector, newPattern, newToolSpec, type ObservabilityDraft, type OptionChoiceDraft, type OptionDraft, type OutputsDraft, type OwnDetectorDraft, optionChoices, type PatternDraft, type PatternSourceDraft, plantsCanary, removeModelBinding, type SpeechDraft, STUDIO_PROFILE_TYPES, type StudioDraft, type StudioProfileType, type StudioTurnProfileType, setProfileType, TIMER_MAX_MS, type ToolSpecDraft, type ToolsDraft, type TurnBehaviourDraft, takesContinueInstruction, updateModelBinding, } from './draft.ts';
7
7
  export { EXAMPLE_EMBEDDING_FILES } from './example-embedding-files.ts';
8
8
  export type { GuardrailProbe, GuardrailProbeAnswer, GuardrailProbeDraft, GuardrailProbeResult, ProbeBoundary, ProbeBoundaryNote, ProbeStatus, } from './guardrail-probe.ts';
9
9
  export { PROBE_BOUNDARIES, PROBE_BOUNDARY_NOTES, PROBE_STATUSES, PROBE_TEXT_LIMIT, probeDraft, probeRefusal, runGuardrailProbe, runGuardrailProbes, } from './guardrail-probe.ts';
package/mod.js CHANGED
@@ -1,8 +1,8 @@
1
1
  export { KNOWN_GEMINI_EMBEDDING_MODELS, KNOWN_OPENROUTER_EMBEDDING_MODELS, } from "./browser-connection.js";
2
- export { compileStudio, credentialHeaderProblem, credentialUrlProblem, draftConditions, } from "./compile.js";
2
+ export { compileStudio, credentialHeaderProblem, credentialUrlProblem, draftOptions, } from "./compile.js";
3
3
  export { compileWorkspace, workspaceRunAgent, } from "./compile-workspace.js";
4
4
  export { addArchitectExample, addResearchExample, COOKBOOK_IDS, COOKBOOK_TOOL_HANDLERS, COOKBOOKS, cookbookOpening, cookbookTraceRecords, createArchitectWorkspace, createConsoleExampleDraft, createDecisionExampleDraft, createExampleDraft, createGeminiEmbeddingExampleDraft, createLiveExampleDraft, createNarratorExampleDraft, createPageReaderExampleDraft, createResearchScoutDraft, createResearchWorkspace, DECISION_EXAMPLE_AGENT_ID, DECISION_EXAMPLE_STATE, DEMO_ALLOWED_HOSTS, DEMO_ARCHITECT_SYSTEM, DEMO_ARCHITECT_TOOLS, DEMO_CONCIERGE_SYSTEM, DEMO_CONCIERGE_TOOLS, DEMO_CONSOLE_TOOLS, DEMO_HTTP_SAMPLE_INPUT, DEMO_LIVE_CONCIERGE_SYSTEM, DEMO_RESEARCH_STAGE_READ_TOOLS, DEMO_RESEARCH_SYSTEM, DEMO_RESEARCH_TOOLS, DISCOVER_LOADED, decisionExampleAssets, decisionExampleDraft, demoHttpSampleInput, demoInputsSpec, demoToolSpecs, exampleTools, GEMINI_MODELS_URL, GOOGLE_BUILTIN_TOOLS, GOOGLE_FREE_TIER_GROUNDING, GOOGLE_IMAGE_ASPECT_RATIOS, GOOGLE_IMAGE_INPUT_MIMES, GOOGLE_IMAGE_OUTPUT_MIMES, GOOGLE_IMAGE_RESOLUTIONS, GOOGLE_NO_EFFORT_API_IDS, GOOGLE_NO_THINKING_API_IDS, GOOGLE_SINGLE_TURN_API_IDS, GOOGLE_SPEECH_FORMATS, GOOGLE_SPEECH_VOICES, GOOGLE_THINKING_LEVELS, GOOGLE_THINKING_REQUIRED_API_IDS, GOOGLE_VOICE_INPUT_MIMES, googleBindingViolation, googleEfforts, googleFreeTierBuiltins, localBindingViolation, OPENROUTER_BUILTIN_TOOLS, OPENROUTER_IMAGES_IGNORED_INPUTS, OPENROUTER_IMAGES_INPUT_MIMES, ollamaModelThinks, projectProfileSlice, projectToolSlice, RESEARCH_ALLOWED_HOSTS, RESEARCH_FIRST_TURN_PROMPT, RESEARCH_PAGE_READER_AGENT_ID, RESEARCH_PAGE_READER_STATE, RESEARCH_REPLY_SCHEMA_ID, RESEARCH_REPLY_SCHEMA_JSON, resolveCookbookSlice, stitchCookbook, } from "./cookbooks/mod.js";
5
- export { agentToolTarget, COMPACTION_DRAFT_DEFAULTS, createBlankDraft, defaultModelBinding, defaultToolSpec, draftAllows, draftFacets, draftKey, EXAMPLE_DECISION_STATE, EXAMPLE_EMBEDDING_QUERY, EXAMPLE_EMBEDDING_TEXT, EXAMPLE_SPAN_DECISION_STATE, exampleDecisionDraft, excludeFacet, INLINE_LABELS, includableFacets, includeFacet, MODEL_LIMITS, newCondition, newCriteria, newCriterion, newDecisionImage, newDecisionQuestion, newModelBinding, newOwnDetector, newPattern, newSlot, newSlotChoice, newToolSpec, plantsCanary, removeModelBinding, STUDIO_PROFILE_TYPES, setProfileType, TIMER_MAX_MS, takesContinueInstruction, updateModelBinding, } from "./draft.js";
5
+ export { agentToolTarget, COMPACTION_DRAFT_DEFAULTS, createBlankDraft, defaultModelBinding, defaultToolSpec, draftAllows, draftFacets, draftKey, EXAMPLE_DECISION_STATE, EXAMPLE_EMBEDDING_QUERY, EXAMPLE_EMBEDDING_TEXT, EXAMPLE_SPAN_DECISION_STATE, exampleDecisionDraft, excludeFacet, INLINE_LABELS, includableFacets, includeFacet, MODEL_LIMITS, newCriteria, newCriterion, newDecisionImage, newDecisionQuestion, newModelBinding, newOption, newOwnDetector, newPattern, newToolSpec, optionChoices, plantsCanary, removeModelBinding, STUDIO_PROFILE_TYPES, setProfileType, TIMER_MAX_MS, takesContinueInstruction, updateModelBinding, } from "./draft.js";
6
6
  export { EXAMPLE_EMBEDDING_FILES } from "./example-embedding-files.js";
7
7
  export { PROBE_BOUNDARIES, PROBE_BOUNDARY_NOTES, PROBE_STATUSES, PROBE_TEXT_LIMIT, probeDraft, probeRefusal, runGuardrailProbe, runGuardrailProbes, } from "./guardrail-probe.js";
8
8
  export { unheldProblem } from "./held-credentials.js";