thoth-agents 0.12.0 → 0.13.1

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 (43) hide show
  1. package/README.md +11 -2
  2. package/dist/{chunk-7F33WUSD.js → chunk-422L76R5.js} +2 -2
  3. package/dist/chunk-6O4GKDS7.js +207 -0
  4. package/dist/{chunk-SEF6PFM6.js → chunk-A7IGKE4R.js} +132 -157
  5. package/dist/{chunk-NY2IPJ7V.js → chunk-HFBCW4MD.js} +554 -236
  6. package/dist/{chunk-QOA2AETX.js → chunk-KUA3F4D6.js} +3 -3
  7. package/dist/cli/index.js +6 -6
  8. package/dist/cli/opencode-profiles.d.ts +10 -0
  9. package/dist/cli/tui/index.js +3 -3
  10. package/dist/config/loader.d.ts +1 -4
  11. package/dist/config/schema.d.ts +0 -22
  12. package/dist/index.js +824 -30
  13. package/dist/opencode/context.d.ts +16 -0
  14. package/dist/opencode/profile-rpc-handlers.d.ts +3 -0
  15. package/dist/opencode/profile-rpc.d.ts +688 -0
  16. package/dist/opencode/profile-runtime.d.ts +3 -0
  17. package/dist/opencode/profile-sessions.d.ts +18 -0
  18. package/dist/opencode/profiles/editor.d.ts +44 -0
  19. package/dist/opencode/profiles/index.d.ts +18 -0
  20. package/dist/opencode/profiles/resolver.d.ts +12 -0
  21. package/dist/opencode/profiles/store.d.ts +63 -0
  22. package/dist/opencode/profiles/types.d.ts +26 -0
  23. package/dist/opencode/tool-overrides/evaluator.d.ts +13 -0
  24. package/dist/opencode/tool-overrides/index.d.ts +5 -0
  25. package/dist/opencode/tool-overrides/store.d.ts +38 -0
  26. package/dist/opencode/tool-overrides/types.d.ts +32 -0
  27. package/dist/opencode/tool-overrides/validation.d.ts +5 -0
  28. package/dist/opencode/tool-overrides/wildcard.d.ts +3 -0
  29. package/dist/opencode/tool-rpc-handlers.d.ts +3 -0
  30. package/dist/opencode/tool-rpc.d.ts +428 -0
  31. package/dist/pi.js +2 -2
  32. package/dist/tui/fixtures.d.ts +2 -0
  33. package/dist/tui/flow.d.ts +16 -0
  34. package/dist/tui/index.d.ts +7 -0
  35. package/dist/tui/index.js +1386 -0
  36. package/dist/tui/model.d.ts +84 -0
  37. package/dist/tui/tools/fixtures.d.ts +3 -0
  38. package/dist/tui/tools/flow.d.ts +11 -0
  39. package/dist/tui/tools/model.d.ts +97 -0
  40. package/package.json +5 -1
  41. package/plugin/.claude-plugin/plugin.json +1 -1
  42. package/plugin/.codex-plugin/plugin.json +1 -1
  43. package/thoth-agents.schema.json +0 -70
@@ -16,7 +16,7 @@ import {
16
16
  loadAgentPrompt,
17
17
  renderAgentRoutingDescription,
18
18
  renderRolePrompt
19
- } from "./chunk-NY2IPJ7V.js";
19
+ } from "./chunk-HFBCW4MD.js";
20
20
 
21
21
  // src/agents/designer.ts
22
22
  var DESIGNER_PROMPT = renderRolePrompt(
@@ -363,7 +363,7 @@ var SUBAGENT_FACTORIES = {
363
363
  function createAgents(config) {
364
364
  const protoSubAgents = Object.entries(SUBAGENT_FACTORIES).map(([name, factory]) => {
365
365
  const override = getAgentOverride(config, name);
366
- const prompts = loadAgentPrompt(name, config?.preset);
366
+ const prompts = loadAgentPrompt(name);
367
367
  const model = getPrimaryModelForPrompt(override?.model) ?? DEFAULT_MODELS[name];
368
368
  const agent = factory(model, prompts.prompt, prompts.appendPrompt);
369
369
  agent.description = renderAgentRoutingDescription(getAgentRole(name));
@@ -379,7 +379,7 @@ function createAgents(config) {
379
379
  return agent;
380
380
  });
381
381
  const orchestratorOverride = getAgentOverride(config, "orchestrator");
382
- const orchestratorPrompts = loadAgentPrompt("orchestrator", config?.preset);
382
+ const orchestratorPrompts = loadAgentPrompt("orchestrator");
383
383
  const orchestrator = createOrchestratorAgent(
384
384
  orchestratorOverride?.model ?? `openai/${OPENCODE_OPENAI_ORCHESTRATOR_PRESET.model}`,
385
385
  orchestratorPrompts.prompt,
package/dist/cli/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  opencodeAdapter
4
- } from "../chunk-QOA2AETX.js";
4
+ } from "../chunk-KUA3F4D6.js";
5
5
  import {
6
6
  CODEX_PLUGIN_ID,
7
7
  CODEX_ROLE_NAMES,
@@ -80,11 +80,11 @@ import {
80
80
  safeAtomicWriteFileSync,
81
81
  scalarLocation,
82
82
  syncOpenCodeOwnedSkills
83
- } from "../chunk-SEF6PFM6.js";
83
+ } from "../chunk-A7IGKE4R.js";
84
84
  import "../chunk-MIDGZE34.js";
85
85
  import {
86
86
  piAdapter
87
- } from "../chunk-7F33WUSD.js";
87
+ } from "../chunk-422L76R5.js";
88
88
  import {
89
89
  ALL_AGENT_NAMES,
90
90
  detectCurrentConfig,
@@ -95,7 +95,7 @@ import {
95
95
  resolveExecutingPackageVersion,
96
96
  updateOpenCodeMainConfig,
97
97
  writeLiteConfig
98
- } from "../chunk-NY2IPJ7V.js";
98
+ } from "../chunk-HFBCW4MD.js";
99
99
 
100
100
  // src/cli/index.ts
101
101
  import { pathToFileURL } from "url";
@@ -687,7 +687,7 @@ function formatConfigSummary(dryRun) {
687
687
  const lines = [];
688
688
  lines.push(`${BOLD}Configuration Summary${RESET}`);
689
689
  lines.push("");
690
- lines.push(` ${BOLD}Preset:${RESET} ${BLUE}openai${RESET}`);
690
+ lines.push(` ${BOLD}Profile:${RESET} ${BLUE}openai${RESET}`);
691
691
  lines.push(` ${SYMBOLS.check} Six-role adaptive thoth-agents roster`);
692
692
  lines.push(` ${SYMBOLS.check} OpenAI models by default`);
693
693
  lines.push(
@@ -1338,7 +1338,7 @@ External required skills are installed for every harness:
1338
1338
  simplify, tdd, progressive-context-router, and grill-me.
1339
1339
  Their installation is mandatory and cannot be skipped.
1340
1340
 
1341
- The generated OpenCode config supports the built-in OpenAI preset only.
1341
+ The generated OpenCode config supports the built-in OpenAI profile only.
1342
1342
 
1343
1343
  Examples:
1344
1344
  thoth-agents
@@ -0,0 +1,10 @@
1
+ import { type EffectiveRoster, ModelProfileStore, type NamedModelProfile } from '../opencode/profiles';
2
+ /** The CLI edits global installation state, not a project's pin or shadow. */
3
+ export declare function openCodeProfileStore(roster?: EffectiveRoster): ModelProfileStore;
4
+ export declare function activeOpenCodeProfile(): {
5
+ name?: string;
6
+ profile?: NamedModelProfile;
7
+ };
8
+ export declare function effectiveOpenCodeProfile(config: Record<string, unknown> | null): NamedModelProfile;
9
+ export declare function syncOpenCodeProfile(reset?: boolean): void;
10
+ export declare function withoutLegacyPresets(config: Record<string, unknown>): Record<string, unknown>;
@@ -2,10 +2,10 @@ import {
2
2
  defaultTuiOperations,
3
3
  effortChoicesForModel,
4
4
  listOperationHarnesses
5
- } from "../../chunk-SEF6PFM6.js";
5
+ } from "../../chunk-A7IGKE4R.js";
6
6
  import "../../chunk-MIDGZE34.js";
7
- import "../../chunk-7F33WUSD.js";
8
- import "../../chunk-NY2IPJ7V.js";
7
+ import "../../chunk-422L76R5.js";
8
+ import "../../chunk-HFBCW4MD.js";
9
9
 
10
10
  // src/cli/tui/index.tsx
11
11
  import { render } from "ink";
@@ -20,14 +20,11 @@ export declare function loadPluginConfig(directory: string): PluginConfig;
20
20
  /**
21
21
  * Load custom prompt for an agent from the prompts directory.
22
22
  * Checks for {agent}.md (replaces default) and {agent}_append.md (appends to default).
23
- * If preset is provided and safe for paths, it first checks {preset}/ subdirectory,
24
- * then falls back to the root prompts directory.
25
23
  *
26
24
  * @param agentName - Name of the agent (e.g., "orchestrator", "explorer")
27
- * @param preset - Optional preset name for preset-scoped prompt lookup
28
25
  * @returns Object with prompt and/or appendPrompt if files exist
29
26
  */
30
- export declare function loadAgentPrompt(agentName: string, preset?: string): {
27
+ export declare function loadAgentPrompt(agentName: string): {
31
28
  prompt?: string;
32
29
  appendPrompt?: string;
33
30
  };
@@ -65,17 +65,6 @@ export type ModelEntry = {
65
65
  id: string;
66
66
  variant?: string;
67
67
  };
68
- export declare const PresetSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
69
- model: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
70
- id: z.ZodString;
71
- variant: z.ZodOptional<z.ZodString>;
72
- }, z.core.$strip>]>>]>>;
73
- skills: z.ZodOptional<z.ZodArray<z.ZodString>>;
74
- temperature: z.ZodOptional<z.ZodNumber>;
75
- steps: z.ZodOptional<z.ZodNumber>;
76
- variant: z.ZodCatch<z.ZodOptional<z.ZodString>>;
77
- }, z.core.$strip>>;
78
- export type Preset = z.infer<typeof PresetSchema>;
79
68
  export declare const AgentNameSchema: z.ZodEnum<{
80
69
  orchestrator: "orchestrator";
81
70
  explorer: "explorer";
@@ -111,7 +100,6 @@ export declare const FailoverConfigSchema: z.ZodObject<{
111
100
  export type FailoverConfig = z.infer<typeof FailoverConfigSchema>;
112
101
  export declare const PluginConfigSchema: z.ZodObject<{
113
102
  $schema: z.ZodOptional<z.ZodString>;
114
- preset: z.ZodOptional<z.ZodString>;
115
103
  setDefaultAgent: z.ZodOptional<z.ZodBoolean>;
116
104
  scoringEngineVersion: z.ZodOptional<z.ZodEnum<{
117
105
  v1: "v1";
@@ -157,16 +145,6 @@ export declare const PluginConfigSchema: z.ZodObject<{
157
145
  fallback3: z.ZodString;
158
146
  }, z.core.$strip>;
159
147
  }, z.core.$strict>>;
160
- presets: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodObject<{
161
- model: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
162
- id: z.ZodString;
163
- variant: z.ZodOptional<z.ZodString>;
164
- }, z.core.$strip>]>>]>>;
165
- skills: z.ZodOptional<z.ZodArray<z.ZodString>>;
166
- temperature: z.ZodOptional<z.ZodNumber>;
167
- steps: z.ZodOptional<z.ZodNumber>;
168
- variant: z.ZodCatch<z.ZodOptional<z.ZodString>>;
169
- }, z.core.$strip>>>>;
170
148
  agents: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
171
149
  model: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
172
150
  id: z.ZodString;