@maestrofrontier/frontier 1.4.5 → 1.6.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/.agents/plugins/marketplace.json +21 -21
- package/.codex-plugin/plugin.json +29 -29
- package/.cursorrules +197 -194
- package/AGENTS.md +3 -3
- package/README.md +368 -368
- package/bin/maestro.cjs +75 -75
- package/commands/compress.md +36 -36
- package/commands/frontier.md +124 -124
- package/commands/terse.md +23 -23
- package/docs/codex.md +167 -167
- package/docs/orchestration.md +168 -168
- package/frontier/cli.cjs +279 -252
- package/frontier/config.cjs +468 -468
- package/frontier/dispatch.cjs +267 -255
- package/frontier/judge.cjs +92 -92
- package/frontier/progress.cjs +138 -0
- package/frontier/run.cjs +201 -180
- package/frontier/schema.cjs +112 -112
- package/frontier/semaphore.cjs +49 -49
- package/frontier/synthesize.cjs +79 -79
- package/hooks/frontier-autorun.cjs +135 -120
- package/hooks/hooks.json +103 -103
- package/hooks/maestro-doctrine-guard.cjs +81 -81
- package/hooks/maestro-gate-reminder.cjs +22 -7
- package/hooks/maestro-gate-telemetry.cjs +79 -77
- package/hooks/maestro-phase-scope.cjs +118 -118
- package/hooks/maestro-statusline-sync.cjs +152 -152
- package/hooks/maestro-subagent-guard.cjs +148 -148
- package/hooks/maestro-terse-mode.cjs +189 -189
- package/hooks/maestro-toolbudget-advisory.cjs +127 -127
- package/integrations/README.md +111 -111
- package/integrations/cline/skills/frontier/SKILL.md +75 -75
- package/integrations/codex/prompts/frontier.md +70 -70
- package/integrations/codex/prompts/update.md +39 -39
- package/integrations/codex/skills/maestro-frontier/SKILL.md +122 -122
- package/integrations/codex/skills/maestro-settings/SKILL.md +55 -55
- package/integrations/codex/skills/maestro-terse/SKILL.md +58 -58
- package/integrations/codex/skills/maestro-update/SKILL.md +31 -31
- package/integrations/cursor/commands/frontier.md +63 -63
- package/integrations/cursor/commands/update.md +34 -34
- package/integrations/gemini/commands/frontier.toml +76 -76
- package/integrations/windsurf/workflows/frontier.md +70 -70
- package/package.json +59 -58
- package/scripts/install.cjs +1014 -1014
- package/settings/cli.cjs +140 -140
- package/settings/config.cjs +309 -309
- package/skills/maestro-frontier/SKILL.md +122 -122
- package/skills/maestro-settings/SKILL.md +55 -55
- package/skills/maestro-terse/SKILL.md +58 -58
- package/skills/maestro-update/SKILL.md +31 -31
- package/skills/terse/SKILL.md +74 -74
package/settings/cli.cjs
CHANGED
|
@@ -1,140 +1,140 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
// Maestro Settings — portable CLI. Usable from Codex and any other agent,
|
|
3
|
-
// and the write path the /maestro:settings command calls. Subcommands:
|
|
4
|
-
// settings status [--json]
|
|
5
|
-
// settings set <terse|frontier|context-bar> <value> [--judge M] [--synth M] [--models a,b,c]
|
|
6
|
-
// All state I/O goes through settings/config.cjs, which is the one writer
|
|
7
|
-
// over the three existing stores. Zero deps, CJS.
|
|
8
|
-
|
|
9
|
-
'use strict';
|
|
10
|
-
|
|
11
|
-
const settings = require('./config.cjs');
|
|
12
|
-
|
|
13
|
-
function getFlag(argv, flag) {
|
|
14
|
-
const i = argv.indexOf(flag);
|
|
15
|
-
return i !== -1 && i + 1 < argv.length ? argv[i + 1] : null;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
function fmtFrontier(f) {
|
|
19
|
-
if (!f || !f.mode || f.mode === 'off') return 'off';
|
|
20
|
-
if (f.mode === 'single') return 'single ' + (f.model || '?');
|
|
21
|
-
if (f.mode === 'fusion') {
|
|
22
|
-
let s = 'fusion ' + (f.preset || '?');
|
|
23
|
-
if (f.preset === 'custom' && Array.isArray(f.models)) s += ' [' + f.models.join(',') + ']';
|
|
24
|
-
const extra = [];
|
|
25
|
-
if (f.judgeModel) extra.push('judge=' + f.judgeModel);
|
|
26
|
-
if (f.synthModel) extra.push('synth=' + f.synthModel);
|
|
27
|
-
if (extra.length) s += ' ' + extra.join(' ');
|
|
28
|
-
return s;
|
|
29
|
-
}
|
|
30
|
-
return f.mode;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
function cmdStatus(argv) {
|
|
34
|
-
const scope = getFlag(argv, '--scope') || undefined;
|
|
35
|
-
const all = settings.readAll(scope);
|
|
36
|
-
if (argv.includes('--json')) {
|
|
37
|
-
process.stdout.write(JSON.stringify(all, null, 2) + '\n');
|
|
38
|
-
return;
|
|
39
|
-
}
|
|
40
|
-
const t = all.terse;
|
|
41
|
-
const cb = all.contextBar;
|
|
42
|
-
const lines = ['Maestro settings'];
|
|
43
|
-
lines.push(' terse ' + t.level + ' (source: ' + t.source + ')' +
|
|
44
|
-
(t.envOverride ? ' [MAESTRO_TERSE_LEVEL override active]' : ''));
|
|
45
|
-
lines.push(' frontier ' + fmtFrontier(all.frontier));
|
|
46
|
-
lines.push(' context-bar ' + (cb.enabled ? 'on' : 'off') +
|
|
47
|
-
(cb.scriptConfirmed ? '' : ' [status-line script unconfirmed: ' + cb.dir + ']'));
|
|
48
|
-
process.stdout.write(lines.join('\n') + '\n');
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
function cmdList(argv) {
|
|
52
|
-
const c = settings.catalog();
|
|
53
|
-
if (argv.includes('--json')) {
|
|
54
|
-
process.stdout.write(JSON.stringify(c, null, 2) + '\n');
|
|
55
|
-
return;
|
|
56
|
-
}
|
|
57
|
-
const labelOf = {};
|
|
58
|
-
c.frontier.models.forEach(m => { labelOf[m.id] = m.label; });
|
|
59
|
-
const lines = ['Maestro settings — available values'];
|
|
60
|
-
lines.push(' terse ' + c.terse.values.join(' | '));
|
|
61
|
-
lines.push(' context-bar ' + c.contextBar.values.join(' | '));
|
|
62
|
-
lines.push(' frontier off | single:<model> | fusion:<preset>');
|
|
63
|
-
lines.push(' models ' + c.frontier.models.map(m => m.id + ' (' + m.label + ')').join(', '));
|
|
64
|
-
lines.push(' presets');
|
|
65
|
-
c.frontier.presets.forEach(p => {
|
|
66
|
-
const desc = p.models
|
|
67
|
-
? p.models.map(id => labelOf[id] || id).join(' + ')
|
|
68
|
-
: 'choose your own models (--models a,b,c)';
|
|
69
|
-
lines.push(' ' + p.id.padEnd(14) + desc);
|
|
70
|
-
});
|
|
71
|
-
lines.push(' judge/synth ' + c.frontier.stageModels.join(', ') +
|
|
72
|
-
' (default judge=' + c.frontier.defaults.judge + ', synth=' + c.frontier.defaults.synth + ')');
|
|
73
|
-
process.stdout.write(lines.join('\n') + '\n');
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
function cmdSet(argv) {
|
|
77
|
-
const key = argv[0];
|
|
78
|
-
const value = argv[1];
|
|
79
|
-
if (!key || value === undefined) {
|
|
80
|
-
process.stderr.write('Usage: settings set <terse|frontier|context-bar> <value>\n');
|
|
81
|
-
process.exit(2);
|
|
82
|
-
}
|
|
83
|
-
const opts = {
|
|
84
|
-
judge: getFlag(argv, '--judge'),
|
|
85
|
-
synth: getFlag(argv, '--synth'),
|
|
86
|
-
models: getFlag(argv, '--models'),
|
|
87
|
-
model: getFlag(argv, '--model'),
|
|
88
|
-
preset: getFlag(argv, '--preset'),
|
|
89
|
-
scope: getFlag(argv, '--scope'),
|
|
90
|
-
};
|
|
91
|
-
Object.keys(opts).forEach(k => { if (opts[k] == null) delete opts[k]; });
|
|
92
|
-
|
|
93
|
-
const r = settings.setKey(key, value, opts);
|
|
94
|
-
if (!r.ok) {
|
|
95
|
-
process.stderr.write('ERROR: ' + r.error + '\n');
|
|
96
|
-
process.exit(2);
|
|
97
|
-
}
|
|
98
|
-
process.stdout.write('set ' + key + ' = ' + value + '\n');
|
|
99
|
-
if (r.warning) process.stdout.write('WARNING: ' + r.warning + '\n');
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
function usageText() {
|
|
103
|
-
return (
|
|
104
|
-
'Usage:\n' +
|
|
105
|
-
' settings status [--json] [--scope <name>]\n' +
|
|
106
|
-
' settings list [--json]\n' +
|
|
107
|
-
' settings help\n' +
|
|
108
|
-
' settings set <key> <value> [--judge M] [--synth M] [--models a,b,c] [--scope <name>]\n' +
|
|
109
|
-
' terse <off|lite|full|ultra>\n' +
|
|
110
|
-
' frontier <off | single:<model> | fusion:<preset>>\n' +
|
|
111
|
-
' context-bar <on|off>\n' +
|
|
112
|
-
' --scope targets a frontier state; use codex-project/codex-workspace for Codex repo scope, or an explicit name such as codex-global for shared state\n'
|
|
113
|
-
);
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
function usage() {
|
|
117
|
-
process.stderr.write(usageText());
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
// `help` prints the usage grammar plus the available-values catalog to
|
|
121
|
-
// stdout, so a non-interactive user (Codex, scripts) gets the same matrix the
|
|
122
|
-
// keyboard picker offers.
|
|
123
|
-
function cmdHelp() {
|
|
124
|
-
process.stdout.write(usageText() + '\n');
|
|
125
|
-
cmdList([]);
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
function main() {
|
|
129
|
-
const argv = process.argv.slice(2);
|
|
130
|
-
const cmd = argv[0];
|
|
131
|
-
if (cmd === 'status') cmdStatus(argv.slice(1));
|
|
132
|
-
else if (cmd === 'list') cmdList(argv.slice(1));
|
|
133
|
-
else if (cmd === 'help' || cmd === '--help' || cmd === '-h') cmdHelp();
|
|
134
|
-
else if (cmd === 'set') cmdSet(argv.slice(1));
|
|
135
|
-
else { usage(); process.exit(2); }
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
if (require.main === module) main();
|
|
139
|
-
|
|
140
|
-
module.exports = { main, fmtFrontier };
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// Maestro Settings — portable CLI. Usable from Codex and any other agent,
|
|
3
|
+
// and the write path the /maestro:settings command calls. Subcommands:
|
|
4
|
+
// settings status [--json]
|
|
5
|
+
// settings set <terse|frontier|context-bar> <value> [--judge M] [--synth M] [--models a,b,c]
|
|
6
|
+
// All state I/O goes through settings/config.cjs, which is the one writer
|
|
7
|
+
// over the three existing stores. Zero deps, CJS.
|
|
8
|
+
|
|
9
|
+
'use strict';
|
|
10
|
+
|
|
11
|
+
const settings = require('./config.cjs');
|
|
12
|
+
|
|
13
|
+
function getFlag(argv, flag) {
|
|
14
|
+
const i = argv.indexOf(flag);
|
|
15
|
+
return i !== -1 && i + 1 < argv.length ? argv[i + 1] : null;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
function fmtFrontier(f) {
|
|
19
|
+
if (!f || !f.mode || f.mode === 'off') return 'off';
|
|
20
|
+
if (f.mode === 'single') return 'single ' + (f.model || '?');
|
|
21
|
+
if (f.mode === 'fusion') {
|
|
22
|
+
let s = 'fusion ' + (f.preset || '?');
|
|
23
|
+
if (f.preset === 'custom' && Array.isArray(f.models)) s += ' [' + f.models.join(',') + ']';
|
|
24
|
+
const extra = [];
|
|
25
|
+
if (f.judgeModel) extra.push('judge=' + f.judgeModel);
|
|
26
|
+
if (f.synthModel) extra.push('synth=' + f.synthModel);
|
|
27
|
+
if (extra.length) s += ' ' + extra.join(' ');
|
|
28
|
+
return s;
|
|
29
|
+
}
|
|
30
|
+
return f.mode;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
function cmdStatus(argv) {
|
|
34
|
+
const scope = getFlag(argv, '--scope') || undefined;
|
|
35
|
+
const all = settings.readAll(scope);
|
|
36
|
+
if (argv.includes('--json')) {
|
|
37
|
+
process.stdout.write(JSON.stringify(all, null, 2) + '\n');
|
|
38
|
+
return;
|
|
39
|
+
}
|
|
40
|
+
const t = all.terse;
|
|
41
|
+
const cb = all.contextBar;
|
|
42
|
+
const lines = ['Maestro settings'];
|
|
43
|
+
lines.push(' terse ' + t.level + ' (source: ' + t.source + ')' +
|
|
44
|
+
(t.envOverride ? ' [MAESTRO_TERSE_LEVEL override active]' : ''));
|
|
45
|
+
lines.push(' frontier ' + fmtFrontier(all.frontier));
|
|
46
|
+
lines.push(' context-bar ' + (cb.enabled ? 'on' : 'off') +
|
|
47
|
+
(cb.scriptConfirmed ? '' : ' [status-line script unconfirmed: ' + cb.dir + ']'));
|
|
48
|
+
process.stdout.write(lines.join('\n') + '\n');
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
function cmdList(argv) {
|
|
52
|
+
const c = settings.catalog();
|
|
53
|
+
if (argv.includes('--json')) {
|
|
54
|
+
process.stdout.write(JSON.stringify(c, null, 2) + '\n');
|
|
55
|
+
return;
|
|
56
|
+
}
|
|
57
|
+
const labelOf = {};
|
|
58
|
+
c.frontier.models.forEach(m => { labelOf[m.id] = m.label; });
|
|
59
|
+
const lines = ['Maestro settings — available values'];
|
|
60
|
+
lines.push(' terse ' + c.terse.values.join(' | '));
|
|
61
|
+
lines.push(' context-bar ' + c.contextBar.values.join(' | '));
|
|
62
|
+
lines.push(' frontier off | single:<model> | fusion:<preset>');
|
|
63
|
+
lines.push(' models ' + c.frontier.models.map(m => m.id + ' (' + m.label + ')').join(', '));
|
|
64
|
+
lines.push(' presets');
|
|
65
|
+
c.frontier.presets.forEach(p => {
|
|
66
|
+
const desc = p.models
|
|
67
|
+
? p.models.map(id => labelOf[id] || id).join(' + ')
|
|
68
|
+
: 'choose your own models (--models a,b,c)';
|
|
69
|
+
lines.push(' ' + p.id.padEnd(14) + desc);
|
|
70
|
+
});
|
|
71
|
+
lines.push(' judge/synth ' + c.frontier.stageModels.join(', ') +
|
|
72
|
+
' (default judge=' + c.frontier.defaults.judge + ', synth=' + c.frontier.defaults.synth + ')');
|
|
73
|
+
process.stdout.write(lines.join('\n') + '\n');
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
function cmdSet(argv) {
|
|
77
|
+
const key = argv[0];
|
|
78
|
+
const value = argv[1];
|
|
79
|
+
if (!key || value === undefined) {
|
|
80
|
+
process.stderr.write('Usage: settings set <terse|frontier|context-bar> <value>\n');
|
|
81
|
+
process.exit(2);
|
|
82
|
+
}
|
|
83
|
+
const opts = {
|
|
84
|
+
judge: getFlag(argv, '--judge'),
|
|
85
|
+
synth: getFlag(argv, '--synth'),
|
|
86
|
+
models: getFlag(argv, '--models'),
|
|
87
|
+
model: getFlag(argv, '--model'),
|
|
88
|
+
preset: getFlag(argv, '--preset'),
|
|
89
|
+
scope: getFlag(argv, '--scope'),
|
|
90
|
+
};
|
|
91
|
+
Object.keys(opts).forEach(k => { if (opts[k] == null) delete opts[k]; });
|
|
92
|
+
|
|
93
|
+
const r = settings.setKey(key, value, opts);
|
|
94
|
+
if (!r.ok) {
|
|
95
|
+
process.stderr.write('ERROR: ' + r.error + '\n');
|
|
96
|
+
process.exit(2);
|
|
97
|
+
}
|
|
98
|
+
process.stdout.write('set ' + key + ' = ' + value + '\n');
|
|
99
|
+
if (r.warning) process.stdout.write('WARNING: ' + r.warning + '\n');
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
function usageText() {
|
|
103
|
+
return (
|
|
104
|
+
'Usage:\n' +
|
|
105
|
+
' settings status [--json] [--scope <name>]\n' +
|
|
106
|
+
' settings list [--json]\n' +
|
|
107
|
+
' settings help\n' +
|
|
108
|
+
' settings set <key> <value> [--judge M] [--synth M] [--models a,b,c] [--scope <name>]\n' +
|
|
109
|
+
' terse <off|lite|full|ultra>\n' +
|
|
110
|
+
' frontier <off | single:<model> | fusion:<preset>>\n' +
|
|
111
|
+
' context-bar <on|off>\n' +
|
|
112
|
+
' --scope targets a frontier state; use codex-project/codex-workspace for Codex repo scope, or an explicit name such as codex-global for shared state\n'
|
|
113
|
+
);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
function usage() {
|
|
117
|
+
process.stderr.write(usageText());
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
// `help` prints the usage grammar plus the available-values catalog to
|
|
121
|
+
// stdout, so a non-interactive user (Codex, scripts) gets the same matrix the
|
|
122
|
+
// keyboard picker offers.
|
|
123
|
+
function cmdHelp() {
|
|
124
|
+
process.stdout.write(usageText() + '\n');
|
|
125
|
+
cmdList([]);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
function main() {
|
|
129
|
+
const argv = process.argv.slice(2);
|
|
130
|
+
const cmd = argv[0];
|
|
131
|
+
if (cmd === 'status') cmdStatus(argv.slice(1));
|
|
132
|
+
else if (cmd === 'list') cmdList(argv.slice(1));
|
|
133
|
+
else if (cmd === 'help' || cmd === '--help' || cmd === '-h') cmdHelp();
|
|
134
|
+
else if (cmd === 'set') cmdSet(argv.slice(1));
|
|
135
|
+
else { usage(); process.exit(2); }
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
if (require.main === module) main();
|
|
139
|
+
|
|
140
|
+
module.exports = { main, fmtFrontier };
|