gcf-aif-ext 0.12.0 → 0.12.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.
- package/extension.json +1 -1
- package/lib/config-set.js +31 -4
- package/lib/domain.js +17 -5
- package/package.json +1 -1
package/extension.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://raw.githubusercontent.com/lee-to/ai-factory/2.x/schemas/extension.schema.json",
|
|
3
3
|
"name": "gcf-aif-ext",
|
|
4
|
-
"version": "0.12.
|
|
4
|
+
"version": "0.12.1",
|
|
5
5
|
"description": "Game Context Framework for AI Factory",
|
|
6
6
|
"skills": [
|
|
7
7
|
"skills/gcf-init",
|
package/lib/config-set.js
CHANGED
|
@@ -146,6 +146,28 @@ export const SETTINGS = [
|
|
|
146
146
|
|
|
147
147
|
const BY_KEY = new Map(SETTINGS.map((s) => [s.key, s]));
|
|
148
148
|
|
|
149
|
+
// What a settings screen groups the keys under, in its order.
|
|
150
|
+
/** @type {[string, string[]][]} */
|
|
151
|
+
const GROUPS = [
|
|
152
|
+
['Language', ['language.ui', 'language.artifacts']],
|
|
153
|
+
['Runs', ['run_mode', 'plan_passes', 'dod_attempts']],
|
|
154
|
+
['Checks (DoD)', ['dod.test', 'dod.build', 'dod_timeout_min']],
|
|
155
|
+
['Chat', ['chat.ask', 'chat.answer_timeout_min']],
|
|
156
|
+
['Context', ['context_handoff_pct', 'context_window', 'auto_compact_pct']],
|
|
157
|
+
[
|
|
158
|
+
'Limits',
|
|
159
|
+
[
|
|
160
|
+
'wip_built_limit',
|
|
161
|
+
'tune_limit',
|
|
162
|
+
'unplayed_warn_after',
|
|
163
|
+
'built_stale_after_commits',
|
|
164
|
+
'question_stale_after_commits',
|
|
165
|
+
],
|
|
166
|
+
],
|
|
167
|
+
['Design import', ['context_budget', 'pillars_budget', 'envelope_default_spread']],
|
|
168
|
+
];
|
|
169
|
+
const GROUP_OF = new Map(GROUPS.flatMap(([group, keys]) => keys.map((k) => [k, group])));
|
|
170
|
+
|
|
149
171
|
/** The default a setting holds while its file does not set it; the artifacts follow the ui. */
|
|
150
172
|
function defaultOf(s, aif) {
|
|
151
173
|
const [head, sub] = s.key.split('.');
|
|
@@ -158,9 +180,9 @@ function defaultOf(s, aif) {
|
|
|
158
180
|
}
|
|
159
181
|
|
|
160
182
|
/**
|
|
161
|
-
* Each setting with what its file sets (null: not set, the default holds) and its
|
|
162
|
-
* what a settings screen shows. `raw` is the parsed config.yml, before the
|
|
163
|
-
* parsed `.ai-factory/config.yaml`.
|
|
183
|
+
* Each setting with its group, what its file sets (null: not set, the default holds) and its
|
|
184
|
+
* default: what a settings screen shows, by group. `raw` is the parsed config.yml, before the
|
|
185
|
+
* defaults; `aif` the parsed `.ai-factory/config.yaml`.
|
|
164
186
|
*/
|
|
165
187
|
export function settingsOf(raw, aif = {}) {
|
|
166
188
|
return SETTINGS.map((s) => {
|
|
@@ -174,7 +196,12 @@ export function settingsOf(raw, aif = {}) {
|
|
|
174
196
|
// AI Factory's file is not checked by GCF's rules: a value that is no language shows unset.
|
|
175
197
|
const shown = s.file ? languageIn(aif, sub) : value;
|
|
176
198
|
|
|
177
|
-
return {
|
|
199
|
+
return {
|
|
200
|
+
...s,
|
|
201
|
+
group: GROUP_OF.get(s.key) ?? 'Other',
|
|
202
|
+
value: shown,
|
|
203
|
+
default: defaultOf(s, aif),
|
|
204
|
+
};
|
|
178
205
|
});
|
|
179
206
|
}
|
|
180
207
|
|
package/lib/domain.js
CHANGED
|
@@ -20,6 +20,10 @@ const COLUMN_TEXT = {
|
|
|
20
20
|
parked: ['parked', 'A bug kept as a known issue; unblock takes it back to ready'],
|
|
21
21
|
};
|
|
22
22
|
|
|
23
|
+
// The statuses where only the operator moves an item on (Board-PRD §1.3, "waiting for me"):
|
|
24
|
+
// a verdict, a decision, a playtest, an unblock. Parked waits by choice, not on the operator.
|
|
25
|
+
const HUMAN = new Set(['blocked', 'awaiting-verdict', 'awaiting-decision', 'unplayed']);
|
|
26
|
+
|
|
23
27
|
const GATE_HELP = {
|
|
24
28
|
verdict: 'Closed by a playtest: keep, tune or kill',
|
|
25
29
|
auto: 'Closed by the run itself when its checks are green; no playtest',
|
|
@@ -82,17 +86,24 @@ const ITEM_SPECS = {
|
|
|
82
86
|
fields: [CONSTRAINT, UNVERIFIED, UNTICKED],
|
|
83
87
|
rare: true,
|
|
84
88
|
},
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
CONSTRAINT,
|
|
88
|
-
]),
|
|
89
|
+
// A keep stores no note (`gcf verdict --note` is a tune's remark, a kill's reason).
|
|
90
|
+
'verdict:keep': verdict('keep', 'Played and kept: it goes to history', [CONSTRAINT]),
|
|
89
91
|
'verdict:tune': verdict('tune', 'Played; needs a change: back to ready with the note', [
|
|
90
92
|
{ key: 'note', label: 'What to change', kind: 'longtext', required: true },
|
|
91
93
|
]),
|
|
92
94
|
'verdict:kill': verdict(
|
|
93
95
|
'kill',
|
|
94
96
|
'Played and rejected: it goes to the graveyard',
|
|
95
|
-
[
|
|
97
|
+
[
|
|
98
|
+
{ key: 'note', label: 'Why', kind: 'longtext' },
|
|
99
|
+
{
|
|
100
|
+
key: 'tags',
|
|
101
|
+
label: 'Graveyard tags',
|
|
102
|
+
kind: 'tags',
|
|
103
|
+
help: 'How the graveyard finds it again; its systems when none',
|
|
104
|
+
},
|
|
105
|
+
REMOVE,
|
|
106
|
+
],
|
|
96
107
|
true,
|
|
97
108
|
),
|
|
98
109
|
'decide:go': decide('go', 'Approved: it goes to history as decided'),
|
|
@@ -430,6 +441,7 @@ export function domainOf(extensions = {}) {
|
|
|
430
441
|
status,
|
|
431
442
|
label: COLUMN_TEXT[status][0],
|
|
432
443
|
help: COLUMN_TEXT[status][1],
|
|
444
|
+
...(HUMAN.has(status) && { human: true }),
|
|
433
445
|
})),
|
|
434
446
|
moves: {
|
|
435
447
|
...(harness && { run: RUN }),
|