@theoremjs/studio 0.3.4-next.526.g51bc66f → 0.3.4-next.538.gb556343

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 (96) hide show
  1. package/README.md +4 -1
  2. package/browser-connection.js +1 -1
  3. package/compile-workspace.js +26 -7
  4. package/compile.js +13 -2
  5. package/{example.d.ts → cookbooks/catalog.d.ts} +35 -5
  6. package/cookbooks/catalog.js +686 -0
  7. package/cookbooks/checks.d.ts +10 -0
  8. package/cookbooks/checks.js +93 -0
  9. package/cookbooks/exchanges.d.ts +11 -0
  10. package/cookbooks/exchanges.js +13 -0
  11. package/cookbooks/fixtures/research.trace.json +4455 -0
  12. package/cookbooks/mod.d.ts +8 -0
  13. package/cookbooks/mod.js +5 -0
  14. package/cookbooks/project.d.ts +66 -0
  15. package/cookbooks/project.js +195 -0
  16. package/cookbooks/providers.d.ts +165 -0
  17. package/cookbooks/providers.js +289 -0
  18. package/cookbooks/sources.d.ts +10 -0
  19. package/cookbooks/sources.js +125 -0
  20. package/cookbooks/tools.d.ts +23 -0
  21. package/{concierge-demo.js → cookbooks/tools.js} +428 -42
  22. package/map.js +3 -1
  23. package/mod.d.ts +3 -3
  24. package/mod.js +2 -3
  25. package/package.json +4 -4
  26. package/page/assets/{Banner-DcgTcVVW.js → Banner--7kKAcbR.js} +2 -2
  27. package/page/assets/{ConsoleFrame-Dep1lvnm.js → ConsoleFrame-Df-1k5rx.js} +1 -1
  28. package/page/assets/{ContextMenu-NgzKbTao.js → ContextMenu-CLru8q9q.js} +2 -2
  29. package/page/assets/{ToolResultCharts-CFvHRt5v.js → ToolResultCharts-Cly-P3dx.js} +1 -1
  30. package/page/assets/{TraceInspector-D92rKzc_.js → TraceInspector-BFWqiEo8.js} +1 -1
  31. package/page/assets/{TraceOverview-m12m2XgM.js → TraceOverview-DQxChC-h.js} +1 -1
  32. package/page/assets/{_virtual_studio-type-sources-DVbxNwnP.js → _virtual_studio-type-sources-C1mRXxbj.js} +29 -250
  33. package/page/assets/browser-engine-CNaADy_l.js +11 -0
  34. package/page/assets/browser-transport-C0uHtl3C.js +47 -0
  35. package/page/assets/{compile-egress-BRGW9qfO.js → compile-egress-C3etX-3o.js} +1 -1
  36. package/page/assets/{crypto-BAY2nUlu.js → crypto-Dd6XxhqK.js} +1 -1
  37. package/page/assets/{encode-files-BSTfq_Gp.js → encode-files-CiyHxnUC.js} +1 -1
  38. package/page/assets/{export-agent-C8_6CZgy.js → export-agent-DqNoCFuj.js} +2 -2
  39. package/page/assets/{guardrail-tester-Dk5L25mc.js → guardrail-tester-5LbFKh-H.js} +1 -1
  40. package/page/assets/host-patterns-F-KZIzkF.js +1 -0
  41. package/page/assets/{index-B95kGH1Q.js → index-S12ARX87.js} +120 -72
  42. package/page/assets/{live-ingress-qi-y5uvH.js → live-ingress-OuSlQ6q7.js} +1 -1
  43. package/page/assets/{live-messages-DIf_R-NT.js → live-messages-BNhCuiuF.js} +1 -1
  44. package/page/assets/reader-BT_YeHdq.js +7 -0
  45. package/page/assets/shaped-data-DYOBdvLJ.js +20 -0
  46. package/page/assets/{stub-4m0tKRlG.js → stub-DPcZtI0s.js} +78 -40
  47. package/page/assets/{studio-code-pane-CPyzXehM.js → studio-code-pane-BXOCuMNp.js} +3 -3
  48. package/page/assets/{studio-console-BV4NlQY-.js → studio-console-AcvRLSDp.js} +1 -1
  49. package/page/assets/{studio-decision-BT6Ee-kK.js → studio-decision-Cl6wplXz.js} +1 -1
  50. package/page/assets/{studio-embedding-DVduw2Un.js → studio-embedding-BfFLDsco.js} +1 -1
  51. package/page/assets/{studio-host-console-CngXS38i.js → studio-host-console-BlkqZDuc.js} +2 -2
  52. package/page/assets/{studio-labels--uHJcIbG.js → studio-labels-Z-P3w3-t.js} +1 -1
  53. package/page/assets/{studio-live-DTHgPVFH.js → studio-live-C5tTdkWn.js} +1 -1
  54. package/page/assets/studio-map-Ng4hX_Zw.js +1 -0
  55. package/page/assets/studio-trace-replay-hz4210Sc.js +2 -0
  56. package/page/assets/{studio-type-checker-CHFs7A7H.js → studio-type-checker-B5DVxAZ0.js} +1 -1
  57. package/page/assets/tool-schema-CxLtS_Zt.js +17 -0
  58. package/page/assets/{trace-record-D9wgX8kq.js → trace-record-B2MF8flo.js} +1 -1
  59. package/page/assets/tree-Bi2FOU_h.js +3 -0
  60. package/page/assets/{turn-client-BWO4ocVM.js → turn-client-BCi5WnI6.js} +2 -2
  61. package/page/assets/types-s-3wFTyD.js +1 -0
  62. package/page/assets/{use-one-call-DOzbF9kQ.js → use-one-call-JRMfBLt2.js} +1 -1
  63. package/page/assets/workspace-BiCkglEt.js +1 -0
  64. package/page/index.html +17 -17
  65. package/policy.js +1 -1
  66. package/registrations.d.ts +7 -1
  67. package/replay.d.ts +11 -0
  68. package/replay.js +67 -11
  69. package/runtime-scope.js +27 -3
  70. package/server/draft-decide.d.ts +1 -1
  71. package/source.js +2 -1
  72. package/stub.js +1 -1
  73. package/surface.js +6 -3
  74. package/tools.js +12 -6
  75. package/types.d.ts +2 -0
  76. package/ui/lib/studio-examples.d.ts +6 -31
  77. package/ui/lib/studio-examples.js +30 -15
  78. package/ui/lib/studio-open.d.ts +4 -1
  79. package/ui/lib/studio-open.js +6 -5
  80. package/ui/lib/tree-map-layout.js +9 -1
  81. package/ui/profile-editor.js +9 -8
  82. package/ui/studio-screen.js +30 -18
  83. package/workspace.js +8 -2
  84. package/concierge-demo.d.ts +0 -17
  85. package/example.js +0 -363
  86. package/page/assets/browser-engine-DL-WovTC.js +0 -11
  87. package/page/assets/browser-transport-CmAIXFia.js +0 -47
  88. package/page/assets/host-patterns-cSf1U25G.js +0 -1
  89. package/page/assets/reader-BkaAkeh0.js +0 -7
  90. package/page/assets/shaped-data-C4jsvipW.js +0 -20
  91. package/page/assets/studio-map-CT0jsRMr.js +0 -1
  92. package/page/assets/studio-trace-replay-DS9o-VrA.js +0 -2
  93. package/page/assets/tool-schema-DpbtSZtQ.js +0 -17
  94. package/page/assets/tree-0OoOeHfS.js +0 -3
  95. package/page/assets/types-BRZU5tBz.js +0 -1
  96. package/page/assets/workspace-DJBP4Adw.js +0 -1
package/README.md CHANGED
@@ -278,7 +278,10 @@ Use these when you build on the studio's draft yourself: compile it, export it a
278
278
 
279
279
  | Export | Purpose |
280
280
  | --- | --- |
281
- | `StudioDraft`, `createBlankDraft()`, `createExampleDraft()` | Editable profile draft; blank, or the travel concierge |
281
+ | `StudioDraft`, `createBlankDraft()`, `createExampleDraft()`, `COOKBOOKS` | Editable profile draft; blank, the travel concierge, or the canonical cookbook catalog (`research`, `concierge`, `architect`, `live-concierge`, `decision`, `span-decision`, `gemini-embedding-2`, `narrator`, `console`) |
282
+ | `createResearchWorkspace()`, `addResearchExample()`, `createResearchScoutDraft()`, `createPageReaderExampleDraft()`, `cookbookOpening()`, `openingFromRecords()` | The lead system cookbook: `research.scout` (OpenRouter `google/gemini-3.8-flash`, streamed thoughts, prose reply, liquid tool labels) linked to `research.pagereader` (Jev decision profile that filters page passages at `post_tool`). `cookbookOpening('research')` projects its recorded `.trace.json` with the same helpers Replay exchange and Continue live use |
283
+ | `projectProfileSlice()`, `projectToolSlice()`, `stitchCookbook()`, `resolveCookbookSlice()` | Project or stitch individual profile facets, tool sub-objects (`auth`, `mapping`, `labels`), or full runnable programs from `COOKBOOKS` |
284
+ | `GOOGLE_BUILTIN_TOOLS`, `OPENROUTER_BUILTIN_TOOLS`, `GOOGLE_SPEECH_VOICES`, `googleBindingViolation()`, `localBindingViolation()`, `ollamaModelThinks()` | Provider and model cookbooks: hosted builtin tool definitions, provider media/voice vocabularies, and model binding checks |
282
285
  | `createDecisionExampleDraft()`, `decisionExampleDraft(images?)`, `DECISION_EXAMPLE_STATE`, `decisionExampleAssets()` | The decision example: Jev 1.14 asked about a pantry shelf, with box, Number and Choice questions. Its four pictures ship with it, and load only when the example is made, so `createDecisionExampleDraft` and `decisionExampleAssets` return a promise; `decisionExampleDraft` is the same draft with the pictures it is given, none by default, for a page that only shows its shape. The ginger, the colour chart and the flag are the decision's own; a decision sends each one its state or questions name. Each box question names the image it reads: the Ginger and Union Jack questions read `photo`, and the chart question reads `<apple_ripeness>`. The run tab starts with the shelf in its state. Each is written as its reference, such as `<ginger>`, in the state or in the questions. The shelf and ginger photos are CC0 and the flag is public domain, all from Wikimedia Commons. The colour chart was drawn for the example |
283
286
  | `createLiveExampleDraft()`, `createNarratorExampleDraft()`, `createConsoleExampleDraft()`, `createArchitectWorkspace()` | The other examples: the concierge as a live agent, a speech narrator, a host tool console, and a code architect that calls the narrator through an agent tool |
284
287
  | `setProfileType()`, `includeFacet()`, `excludeFacet()`, `newModelBinding()`, `newToolSpec()` | Draft edits that keep it consistent with `PROFILE_GRAPH` |
@@ -1,5 +1,5 @@
1
1
  import { TheoremError, z } from '@theoremjs/agents';
2
- import { GEMINI_MODELS_URL } from '@theoremjs/agents/presets/google';
2
+ import { GEMINI_MODELS_URL } from "./cookbooks/providers.js";
3
3
  /** Which service a pasted key belongs to, from its published prefix; `undefined` when unknown. */
4
4
  export function keyKind(secret) {
5
5
  const key = secret?.trim() ?? '';
@@ -11,14 +11,26 @@ import { modelBindingNodeId, providerNodeId, toolSpecNodeId } from "./tree.js";
11
11
  import { agentDraft, agentNodeId, scopedNodeId, } from "./workspace.js";
12
12
  /** The agents an agent tool can run, and the one type that can summarise. */
13
13
  const CALLABLE_TYPES = new Set(['text', 'image', 'speech']);
14
+ const STAGE_READER_TYPES = new Set(['decision', 'text']);
14
15
  function references(workspace) {
15
16
  const tools = new Map(workspace.toolSpecs.map((tool) => [tool.key, tool]));
16
17
  return workspace.agents.flatMap((agent) => [
17
18
  ...agent.tools.allow.flatMap((key) => {
18
19
  const tool = tools.get(key);
19
- return tool?.toolType === 'agent' && tool.agentKey
20
- ? [{ from: agent, to: tool.agentKey, nodeId: toolSpecNodeId(key), field: 'agentKey' }]
21
- : [];
20
+ if (tool?.toolType === 'agent' && tool.agentKey) {
21
+ return [{ from: agent, to: tool.agentKey, nodeId: toolSpecNodeId(key), field: 'agentKey' }];
22
+ }
23
+ if (tool?.toolType !== 'agent' && tool?.stageAgentKey) {
24
+ return [
25
+ {
26
+ from: agent,
27
+ to: tool.stageAgentKey,
28
+ nodeId: toolSpecNodeId(key),
29
+ field: 'stageAgentKey',
30
+ },
31
+ ];
32
+ }
33
+ return [];
22
34
  }),
23
35
  ...agent.modelBindings.flatMap((binding) => binding.compactTiming && binding.compactWith
24
36
  ? [
@@ -69,12 +81,12 @@ function circleMessage(ref, path, idOf) {
69
81
  const from = `'${idOf(ref.from.key) ?? ''}'`;
70
82
  const to = `'${idOf(ref.to) ?? ''}'`;
71
83
  if (ref.from.key === ref.to) {
72
- return ref.field === 'agentKey'
84
+ return ref.field === 'agentKey' || ref.field === 'stageAgentKey'
73
85
  ? `${from} has this tool on, and the tool runs ${from} itself. Choose another agent for it to run, or turn it off for ${from}.`
74
86
  : `${from} can't summarise its own conversation. Choose another text agent.`;
75
87
  }
76
88
  const circle = [ref.from.key, ...path].map((key) => idOf(key) ?? '').join(' → ');
77
- return ref.field === 'agentKey'
89
+ return ref.field === 'agentKey' || ref.field === 'stageAgentKey'
78
90
  ? `${from} has this tool on, and it runs ${to}, which leads back to ${from} (${circle}). Agents can't run each other in a circle: turn this tool off for ${from}, or remove the way back.`
79
91
  : `${to} summarises for ${from}, and ${to} leads back to ${from} (${circle}). Agents can't run each other in a circle: choose another agent to summarise, or remove the way back.`;
80
92
  }
@@ -144,6 +156,9 @@ function wrongTypeMessage(ref, target) {
144
156
  if (ref.field === 'agentKey' && !CALLABLE_TYPES.has(type)) {
145
157
  return `'${id}' is a ${type} agent. An agent tool runs a text, image, or speech agent.`;
146
158
  }
159
+ if (ref.field === 'stageAgentKey' && !STAGE_READER_TYPES.has(type)) {
160
+ return `'${id}' is a ${type} agent. A tool reader runs a decision or text agent.`;
161
+ }
147
162
  if (ref.field === 'compactWith' && type !== 'text') {
148
163
  return `'${id}' is a ${type} agent. Only a text agent summarises.`;
149
164
  }
@@ -286,9 +301,13 @@ export function workspaceRunAgent(compiled, agentId) {
286
301
  }));
287
302
  return { ...chatted, dependencies };
288
303
  }
289
- /** The agent ids a compiled agent names: its agent tools' and its compaction's. */
304
+ /** The agent ids a compiled agent names: its agent tools', stage readers', and its compaction's. */
290
305
  function namedAgents(agent) {
291
- const tools = agent.customTools.flatMap((tool) => (tool.type === 'agent' ? [tool.profile] : []));
306
+ const tools = agent.customTools.flatMap((tool) => {
307
+ if (tool.type === 'agent')
308
+ return [tool.profile];
309
+ return tool.stageAgent ? [tool.stageAgent] : [];
310
+ });
292
311
  const models = 'models' in agent.profile ? Object.values(agent.profile.models) : [];
293
312
  const compactors = models.flatMap((binding) => binding.compaction?.profile ? [binding.compaction.profile] : []);
294
313
  return [...tools, ...compactors];
package/compile.js CHANGED
@@ -2,10 +2,10 @@ import { defineProfile, describeError, liveIngressChannelDefault, TheoremError,
2
2
  import { BOUNDARIES, DETECT_DEFAULTS, DETECTOR_META, DETECTORS, detectProblem, hintProblem, patternListProblem, TOOL_BOUNDARIES, validateLabelOverrides, } from '@theoremjs/agents/guardrails';
3
3
  import { activityLabelProblem, agentToolInputFor, agentToolOutput, jsonSchemaFromZod, mimeAllowed, outOfScopeFields, systemPromptProblem, } from '@theoremjs/agents/kernel';
4
4
  import { resolveObservabilityPolicy } from '@theoremjs/agents/observability';
5
- import { GOOGLE_SPEECH_FORMATS, GOOGLE_THINKING_LEVELS } from '@theoremjs/agents/presets/google';
6
5
  import { HTTP_METHODS, IMAGE_ATTACHMENT_ACCEPT_MIMES, PROFILE_HANDLE_MAX_CHARS, PROFILE_ID_MAX_CHARS, } from '@theoremjs/agents/schema';
7
6
  import { isCredentialName, MASK } from '@theoremjs/agents/surface';
8
7
  import { STUDIO_KEY_SLOT_CAP } from "./browser-connection.js";
8
+ import { GOOGLE_SPEECH_FORMATS, GOOGLE_THINKING_LEVELS } from "./cookbooks/providers.js";
9
9
  import { COMPACTION_DRAFT_DEFAULTS, draftAllows, draftFacets, INLINE_LABELS, MODEL_LIMITS, TIMER_MAX_MS, takesContinueInstruction, } from "./draft.js";
10
10
  import { isGoogleRoute, isProviderBuiltinId, modelBindingViolation } from "./policy.js";
11
11
  import { modelRoute, protocolOptionFields, servedProtocols, servesProfileType, } from "./providers.js";
@@ -601,7 +601,18 @@ function compileTool(tool, report, agentIdOf, agentInputOf) {
601
601
  const common = toolCommon(tool, fail, agentInputOf);
602
602
  const labels = toolLabels(tool, common, fail);
603
603
  const compiled = TOOL_COMPILERS[tool.toolType](tool, common, fail, agentIdOf);
604
- return failed ? undefined : { ...compiled, ...(labels ? { labels } : {}) };
604
+ const stageKey = tool.toolType !== 'agent' ? (tool.stageAgentKey?.trim() ?? '') : '';
605
+ const stageAgent = stageKey ? agentIdOf(stageKey) : undefined;
606
+ if (stageKey && !stageAgent) {
607
+ fail('The agent that reads this tool is gone. Pick another.', 'stageAgentKey');
608
+ }
609
+ return failed
610
+ ? undefined
611
+ : {
612
+ ...compiled,
613
+ ...(labels ? { labels } : {}),
614
+ ...(stageAgent && compiled.type !== 'agent' ? { stageAgent } : {}),
615
+ };
605
616
  }
606
617
  function compileTools(draft, withLoader, withParallel, report, agentIdOf, agentInputOf) {
607
618
  const customTools = [];
@@ -1,5 +1,13 @@
1
- import { type DecisionImageDraft, type StudioDraft } from './draft.ts';
2
- import { type StudioWorkspace } from './workspace.ts';
1
+ import { type DecisionImageDraft, type StudioDraft, type ToolSpecDraft } from '../draft.ts';
2
+ import { type StudioWorkspace } from '../workspace.ts';
3
+ /** Public cognitive block (bonsai.thinker) plus private research standards (`{private: …}`). */
4
+ export declare const DEMO_RESEARCH_SYSTEM = "Role: Advanced reasoning engine for research on how language models keep, retrieve, and recombine context. You solve high-complexity, ambiguous, and multi-variable problems through deep first-principles analysis.\n\nCognitive Standards:\n- First-Principles Decomposition: Reduce problems to foundational mechanics, physical laws, and core causal primitives. Do not rely on surface-level heuristics or rote pattern-matching.\n- Adversarial Stress-Testing: Actively challenge initial assumptions. Explore competing hypotheses, edge cases, failure modes, and potential confounds before converging on a solution.\n- Systems Dynamics: Model non-linear interactions, feedback loops, dependencies, and second-order consequences across variables.\n- Epistemic Precision: Explicitly distinguish established empirical facts from logical deductions, probabilistic estimates, and speculative hypotheses. Calibrate confidence to available evidence.\n\nExecution:\nProvide thorough, exhaustive, and intellectually uncompromised reasoning. Prioritize causal clarity, mathematical/scientific validity, and deep insight over artificial brevity.\n\n{private:\nStandards:\n- The newest work is often not indexed yet; one search is rarely enough.\n- A claim rests on a primary source: the paper, the model card, the dataset card, the repository. A blog or a list is a lead to its primary source; DeepWiki answers are leads only.\n- Quote exact words from what the tools returned. Say how sure you are, and what you could not check.\n}";
5
+ export declare const DEMO_CONCIERGE_SYSTEM = "Role: Elite, charismatic travel concierge.\n\nCommunication Standards:\n- Readable Formatting: Use markdown where it helps the reader: short headings, bullet lists, bold for key names, and tables for side-by-side comparisons.\n- Adaptive Pacing: Deliver high-signal, concise answers. Avoid overwhelming monologues; provide the immediate insight or recommendation first, then offer a natural next step.\n\nTool & Fact Grounding:\n- Absolute Grounding: Ground all dynamic facts (weather, currency conversions, distances, geography, destination research) using available tools before answering. Never invent live data.\n- Silent Execution: Never narrate tool calls, announce function names, or reference underlying APIs. Seamlessly integrate verified findings into your response.\n- Complete Resolution: Execute multi-step tool chains silently to completion before delivering the synthesized answer.\n\nMultimodal Understanding:\n- Immediately extract actionable constraints (dates, flight times, locations, budgets) from provided images, documents, tickets, or audio, and weave them directly into your response.";
6
+ export declare const DEMO_ARCHITECT_SYSTEM = "Role: Senior software architect who researches before advising.\n\nCommunication Standards:\n- Readable Formatting: Use markdown where it helps the reader: short headings, bullet lists, code blocks for code, and tables for side-by-side comparisons.\n- Answer First: Lead with the recommendation, then the reasons and the trade-offs. Name what you could not confirm.\n\nTool & Fact Grounding:\n- Absolute Grounding: Ground claims about a library, a repository, a package version, or a cloud service in the tools before answering. Never invent an API, a version, or a default.\n- Silent Execution: Never narrate tool calls or announce function names. Work findings into the answer.\n- Complete Resolution: Finish multi-step research before you answer.\n\nAudio briefings:\n- When asked for a podcast, a briefing, or anything to listen to, write a short spoken script of what you found, in plain sentences with no markdown, and pass it to narrate. Then say in one line what the briefing covers.";
7
+ export declare const DEMO_LIVE_CONCIERGE_SYSTEM = "Role: Elite, charismatic travel concierge, on a call.\n\nSpeaking:\n- Speak in short, natural sentences. No lists, no markdown, no reading out of addresses, or codes unless asked.\n- Give the recommendation first, then offer one next step.\n\nTool & Fact Grounding:\n- Ground weather, currency, distances, and places in the tools before you answer. Never invent live data.\n- Never name a tool or say that you are calling one.";
8
+ /** The structured reply schema for `research.scout`. */
9
+ export declare const RESEARCH_REPLY_SCHEMA_ID = "research.reply";
10
+ export declare const RESEARCH_REPLY_SCHEMA_JSON: string;
3
11
  /** The agent id the decision example opens under; its run starts with the pantry's state and pictures. */
4
12
  export declare const DECISION_EXAMPLE_AGENT_ID = "pantry.jev";
5
13
  /** What the decision example's questions are asked about: the shelf, and why we ask. */
@@ -13,9 +21,7 @@ export declare function decisionExampleAssets(): Promise<{
13
21
  }>;
14
22
  /**
15
23
  * A look at a pantry shelf on TypeSafe's Jev 1.14: boxes around what it finds, a colour chart and
16
- * a flag to match against, and plain questions about what is there. The draft a blank agent becomes
17
- * when its type is set to decision, with every section that type brings, and the pictures ship with
18
- * it, so it runs as it opens.
24
+ * a flag to match against, and plain questions about what is there.
19
25
  */
20
26
  export declare function createDecisionExampleDraft(): Promise<StudioDraft>;
21
27
  /** The decision example with the pictures given: none for a page that only shows its shape. */
@@ -24,6 +30,16 @@ export declare function decisionExampleDraft(images?: DecisionImageDraft[]): Stu
24
30
  export declare function createSpanExampleDraft(): StudioDraft;
25
31
  /** A multimodal embedding profile using Gemini Embeddings 2's free preview model, taking every file type it does. */
26
32
  export declare function createGeminiEmbeddingExampleDraft(): StudioDraft;
33
+ /** The demo tools named, in the library's order. */
34
+ export declare function exampleTools(names: readonly string[]): ToolSpecDraft[];
35
+ /** The decision page-reader (`research.pagereader`) that filters passages for `research.scout` at `post_tool`. */
36
+ export declare function createPageReaderExampleDraft(): StudioDraft;
37
+ /** The research scout on its own: searches papers, models, datasets, repos, and docs. */
38
+ export declare function createResearchScoutDraft(): StudioDraft;
39
+ /** The research scout and the Jev page reader it filters pages with, added to a workspace. */
40
+ export declare function addResearchExample(workspace: StudioWorkspace): StudioWorkspace;
41
+ /** A workspace of the research scout and its Jev page reader, with the scout in the chat. */
42
+ export declare function createResearchWorkspace(): StudioWorkspace;
27
43
  /** A fresh copy of the travel concierge draft: a text agent with the tools a trip needs. */
28
44
  export declare function createExampleDraft(): StudioDraft;
29
45
  /** The travel concierge on a call: the same tools, a live model, and an instruction for speech. */
@@ -36,3 +52,17 @@ export declare function createConsoleExampleDraft(): StudioDraft;
36
52
  export declare function addArchitectExample(workspace: StudioWorkspace): StudioWorkspace;
37
53
  /** A workspace of the code architect and its narrator, with the architect in the chat. */
38
54
  export declare function createArchitectWorkspace(): StudioWorkspace;
55
+ export type CookbookId = 'research' | 'concierge' | 'architect' | 'live-concierge' | 'decision' | 'span-decision' | 'gemini-embedding-2' | 'narrator' | 'console';
56
+ export interface CookbookEntry {
57
+ id: CookbookId;
58
+ kind: 'agent' | 'system';
59
+ label: string;
60
+ description: string;
61
+ question?: string;
62
+ createWorkspace: () => StudioWorkspace | Promise<StudioWorkspace>;
63
+ addToWorkspace: (workspace: StudioWorkspace) => StudioWorkspace | Promise<StudioWorkspace>;
64
+ }
65
+ export declare const RESEARCH_FIRST_TURN_PROMPT = "Find recent papers, models, or datasets on episodic memory, vector-space memory stores, and context recombination for language models, and quote the exact claims from their cards or abstracts.";
66
+ /** The canonical cookbook catalog, ordered with `research` first, `concierge` second, `architect` third. */
67
+ export declare const COOKBOOKS: Readonly<Record<CookbookId, CookbookEntry>>;
68
+ export declare const COOKBOOK_IDS: readonly CookbookId[];