gcf-board 0.26.0 → 0.27.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/dist/server/app.js +9 -3
- package/dist/server/talks.js +16 -8
- package/dist/shared/board.js +1 -1
- package/dist/web/assets/{index-CAApAJNx.css → index-BCfiz95-.css} +1 -1
- package/dist/web/assets/{index-BkakrCSw.js → index-Ds32enMs.js} +56 -56
- package/dist/web/index.html +2 -2
- package/package.json +1 -1
package/dist/server/app.js
CHANGED
|
@@ -80,6 +80,7 @@ const PLAY_START_MS = 30 * 60_000;
|
|
|
80
80
|
const WORD_RE = /^[\w][\w-]*$/;
|
|
81
81
|
// A device id goes into a shell command: the core takes only these characters (d5).
|
|
82
82
|
const DEVICE_RE = /^\w[\w.:-]*$/;
|
|
83
|
+
const PROFILE_RE = /^(?:debug|release)$/;
|
|
83
84
|
/** The core's command for a Play route, its body checked: words where words go. */
|
|
84
85
|
export function playArgs(what, body) {
|
|
85
86
|
const word = (v, name, re = WORD_RE) => {
|
|
@@ -94,6 +95,9 @@ export function playArgs(what, body) {
|
|
|
94
95
|
};
|
|
95
96
|
// A card, or the checkout as it is ("Play main", docs/Play-Setup-Plan.md d30).
|
|
96
97
|
const who = () => (flag(body.main, 'main') ? ['--main'] : [word(body.id, 'id')]);
|
|
98
|
+
const opt = (v, name, re = WORD_RE) => v === undefined || v === null ? [] : [`--${name}`, word(v, name, re)];
|
|
99
|
+
// Which profile (docs/Handoff-Plan.md t18): debug when none is named.
|
|
100
|
+
const profile = () => opt(body.profile, 'profile', PROFILE_RE);
|
|
97
101
|
if (what === 'stop')
|
|
98
102
|
return ['gcf', 'playtest', 'stop', '--json'];
|
|
99
103
|
if (what === 'devices')
|
|
@@ -103,13 +107,15 @@ export function playArgs(what, body) {
|
|
|
103
107
|
...['gcf', 'playtest', 'build', ...who(), '--queue', '--json'],
|
|
104
108
|
// "Build again" (d23): a snapshot of the same code is replaced, not taken.
|
|
105
109
|
...(flag(body.fresh, 'fresh') ? ['--fresh'] : []),
|
|
110
|
+
// Which build (t16): else the card's own, else auto_build.
|
|
111
|
+
...opt(body.of, 'of'),
|
|
112
|
+
...profile(),
|
|
106
113
|
];
|
|
107
114
|
return [
|
|
108
115
|
...['gcf', 'playtest', 'start', ...who(), '--queue', '--json'],
|
|
109
116
|
...['--target', word(body.target, 'target')],
|
|
110
|
-
...(body.device
|
|
111
|
-
|
|
112
|
-
: ['--device', word(body.device, 'device', DEVICE_RE)]),
|
|
117
|
+
...opt(body.device, 'device', DEVICE_RE),
|
|
118
|
+
...profile(),
|
|
113
119
|
];
|
|
114
120
|
}
|
|
115
121
|
function jsonOf(r, what) {
|
package/dist/server/talks.js
CHANGED
|
@@ -213,22 +213,30 @@ function playLines(board, item) {
|
|
|
213
213
|
'a tech card with propose_item_new that adds them and names them in AGENTS.md.',
|
|
214
214
|
'',
|
|
215
215
|
];
|
|
216
|
-
|
|
217
|
-
const
|
|
218
|
-
const
|
|
219
|
-
|
|
216
|
+
// Its builds by build and profile (schema 5): what is ready, what is made now.
|
|
217
|
+
const builds = item.builds ?? [];
|
|
218
|
+
const targets = board.play.targets
|
|
219
|
+
.map((t) => `${t.name} (${t.open}${t.build ? `, plays ${t.build}` : ''})`)
|
|
220
|
+
.join(', ') || 'none';
|
|
221
|
+
const ready = builds.filter((b) => b.ok);
|
|
222
|
+
const shared = ready.find((b) => b.shared_with?.length)?.shared_with ?? [];
|
|
223
|
+
const sharedText = shared.length ? ` The same build as ${shared.join(', ')}.` : '';
|
|
224
|
+
const said = builds.some((b) => b.building)
|
|
220
225
|
? 'its build is being made now.'
|
|
221
|
-
:
|
|
222
|
-
? `its
|
|
223
|
-
`${b.
|
|
226
|
+
: ready.length
|
|
227
|
+
? `its builds are ready: ${ready
|
|
228
|
+
.map((b) => `${b.build} ${b.profile} at commit ${b.commit?.slice(0, 7) ?? 'unknown'}, built ` +
|
|
229
|
+
`${b.built_at}, ${b.source === 'click' ? 'by hand, so it may hold later cards' : 'by its run'}`)
|
|
230
|
+
.join('; ')}.${sharedText}`
|
|
224
231
|
: 'it has no build yet: its Play button builds it first.';
|
|
232
|
+
const problem = builds.find((b) => b.problem)?.problem;
|
|
225
233
|
const running = board.play.running?.id === item.id
|
|
226
234
|
? [`It plays now on ${board.play.running.target}: ${board.play.running.open}.`]
|
|
227
235
|
: [];
|
|
228
236
|
return [
|
|
229
237
|
'',
|
|
230
238
|
`To play it: ${said}`,
|
|
231
|
-
...(
|
|
239
|
+
...(problem ? [`The last build failed: ${problem.split('\n')[0]}`] : []),
|
|
232
240
|
...running,
|
|
233
241
|
`Targets: ${targets}.`,
|
|
234
242
|
'Never answer that you cannot build it: the card has its Play button, which builds first;',
|
package/dist/shared/board.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// The read model of `ai-factory gcf board --json` (Methodology §11): the board refuses a schema
|
|
2
2
|
// it does not know. Types only, plus the version this board reads.
|
|
3
|
-
export const BOARD_SCHEMA =
|
|
3
|
+
export const BOARD_SCHEMA = 5;
|
|
4
4
|
// Where a project keeps files given to an item or an inbox entry (Board-PRD §5.3, §5.6): only
|
|
5
5
|
// there may the board hand out a file that is not text. One list: a later kind is one line.
|
|
6
6
|
const ATTACHED = [
|