octto 0.1.2 → 0.1.4
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/README.md +1 -14
- package/dist/config/loader.d.ts +1 -1
- package/dist/index.js +50 -9
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -2,24 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
An interactive browser UI for AI brainstorming. Stop typing in terminals. Start clicking in browsers.
|
|
4
4
|
|
|
5
|
-
## The Problem
|
|
6
5
|
|
|
7
|
-
AI brainstorming today happens in the terminal:
|
|
8
|
-
```
|
|
9
|
-
Agent: What framework do you want?
|
|
10
|
-
You: *types* React
|
|
11
|
-
Agent: *thinks for 10 seconds*
|
|
12
|
-
Agent: What about styling?
|
|
13
|
-
You: *types* Tailwind
|
|
14
|
-
Agent: *thinks*
|
|
15
|
-
...repeat for 10 minutes...
|
|
16
|
-
```
|
|
17
6
|
|
|
18
|
-
|
|
7
|
+
https://github.com/user-attachments/assets/9ba8868d-16f3-4451-9b73-6b7e1fc54655
|
|
19
8
|
|
|
20
|
-
## The Solution
|
|
21
9
|
|
|
22
|
-
**A browser window with visual questions you can answer in seconds.**
|
|
23
10
|
|
|
24
11
|
When you describe your idea, octto opens an interactive UI:
|
|
25
12
|
|
package/dist/config/loader.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -14,7 +14,7 @@ var __export = (target, all) => {
|
|
|
14
14
|
var agent = {
|
|
15
15
|
description: "Analyzes a request and creates exploration branches with scopes",
|
|
16
16
|
mode: "subagent",
|
|
17
|
-
model: "
|
|
17
|
+
model: "openai/gpt-5.2-codex",
|
|
18
18
|
temperature: 0.5,
|
|
19
19
|
prompt: `<purpose>
|
|
20
20
|
Analyze the user's request and create 2-4 exploration branches.
|
|
@@ -178,7 +178,7 @@ Plan review. config: { question, sections: [{id, title, content}] }
|
|
|
178
178
|
var agent2 = {
|
|
179
179
|
description: "Runs interactive brainstorming sessions using branch-based exploration",
|
|
180
180
|
mode: "primary",
|
|
181
|
-
model: "
|
|
181
|
+
model: "openai/gpt-5.2-codex",
|
|
182
182
|
temperature: 0.7,
|
|
183
183
|
prompt: `<purpose>
|
|
184
184
|
Run brainstorming sessions using branch-based exploration.
|
|
@@ -241,7 +241,7 @@ After end_brainstorm, write to docs/plans/YYYY-MM-DD-{topic}-design.md with:
|
|
|
241
241
|
var agent3 = {
|
|
242
242
|
description: "Evaluates branch Q&A and decides whether to ask more or complete",
|
|
243
243
|
mode: "subagent",
|
|
244
|
-
model: "
|
|
244
|
+
model: "openai/gpt-5.2-codex",
|
|
245
245
|
temperature: 0.5,
|
|
246
246
|
prompt: `<purpose>
|
|
247
247
|
You evaluate a brainstorming branch's Q&A history and decide:
|
|
@@ -800,20 +800,61 @@ var OcttoConfigSchema = object({
|
|
|
800
800
|
});
|
|
801
801
|
|
|
802
802
|
// src/config/loader.ts
|
|
803
|
+
var VALID_AGENT_NAMES = Object.values(AGENTS);
|
|
804
|
+
function formatValidationErrors(issues) {
|
|
805
|
+
return issues.map((issue) => {
|
|
806
|
+
const path = issue.path?.map((p) => p.key).join(".") ?? "root";
|
|
807
|
+
return ` - ${path}: ${issue.message}`;
|
|
808
|
+
}).join(`
|
|
809
|
+
`);
|
|
810
|
+
}
|
|
803
811
|
async function load(configDir) {
|
|
804
812
|
const baseDir = configDir ?? join(homedir(), ".config", "opencode");
|
|
805
813
|
const configPath = join(baseDir, "octto.json");
|
|
814
|
+
let parsed;
|
|
806
815
|
try {
|
|
807
816
|
const content = await readFile(configPath, "utf-8");
|
|
808
|
-
|
|
809
|
-
const result = safeParse(OcttoConfigSchema, parsed);
|
|
810
|
-
if (!result.success) {
|
|
811
|
-
return null;
|
|
812
|
-
}
|
|
813
|
-
return result.output;
|
|
817
|
+
parsed = JSON.parse(content);
|
|
814
818
|
} catch {
|
|
815
819
|
return null;
|
|
816
820
|
}
|
|
821
|
+
const result = safeParse(OcttoConfigSchema, parsed);
|
|
822
|
+
if (result.success) {
|
|
823
|
+
return result.output;
|
|
824
|
+
}
|
|
825
|
+
console.warn(`[octto] Config validation errors in ${configPath}:`);
|
|
826
|
+
console.warn(formatValidationErrors(result.issues));
|
|
827
|
+
if (typeof parsed !== "object" || parsed === null || !("agents" in parsed)) {
|
|
828
|
+
console.warn("[octto] No valid agents found in config, using defaults");
|
|
829
|
+
return null;
|
|
830
|
+
}
|
|
831
|
+
const rawAgents = parsed.agents;
|
|
832
|
+
if (typeof rawAgents !== "object" || rawAgents === null) {
|
|
833
|
+
console.warn("[octto] Invalid agents format, using defaults");
|
|
834
|
+
return null;
|
|
835
|
+
}
|
|
836
|
+
const validAgents = {};
|
|
837
|
+
let hasValidAgent = false;
|
|
838
|
+
for (const [name, override] of Object.entries(rawAgents)) {
|
|
839
|
+
if (!VALID_AGENT_NAMES.includes(name)) {
|
|
840
|
+
console.warn(`[octto] Unknown agent "${name}" - valid names: ${VALID_AGENT_NAMES.join(", ")}`);
|
|
841
|
+
continue;
|
|
842
|
+
}
|
|
843
|
+
const agentResult = safeParse(AgentOverrideSchema, override);
|
|
844
|
+
if (agentResult.success) {
|
|
845
|
+
validAgents[name] = agentResult.output;
|
|
846
|
+
hasValidAgent = true;
|
|
847
|
+
} else {
|
|
848
|
+
console.warn(`[octto] Invalid config for agent "${name}":`);
|
|
849
|
+
console.warn(formatValidationErrors(agentResult.issues));
|
|
850
|
+
}
|
|
851
|
+
}
|
|
852
|
+
if (!hasValidAgent) {
|
|
853
|
+
console.warn("[octto] No valid agent overrides found, using defaults");
|
|
854
|
+
return null;
|
|
855
|
+
}
|
|
856
|
+
console.warn("[octto] Partial config loaded - some overrides applied despite errors");
|
|
857
|
+
return { agents: validAgents };
|
|
817
858
|
}
|
|
818
859
|
async function loadCustomConfig(agents2, configDir) {
|
|
819
860
|
const config = await load(configDir);
|