gcf-board 0.18.4 → 0.18.7
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 +52 -20
- package/dist/server/auth.js +3 -3
- package/dist/server/events.js +6 -1
- package/dist/server/moves.js +16 -2
- package/dist/server/talks.js +40 -28
- package/dist/server/ws.js +187 -0
- package/dist/web/assets/index-BckF9M34.css +1 -0
- package/dist/web/assets/index-JQbwhhY5.js +88 -0
- package/dist/web/index.html +2 -2
- package/node_modules/gcf-session/lib/chat.js +14 -3
- package/node_modules/gcf-session/package.json +1 -1
- package/package.json +1 -1
- package/dist/web/assets/index-CV00U5y_.js +0 -81
- package/dist/web/assets/index-r-gA2aJJ.css +0 -1
package/dist/web/index.html
CHANGED
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
<meta charset="UTF-8" />
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
6
|
<title>GCF board</title>
|
|
7
|
-
<script type="module" crossorigin src="/assets/index-
|
|
8
|
-
<link rel="stylesheet" crossorigin href="/assets/index-
|
|
7
|
+
<script type="module" crossorigin src="/assets/index-JQbwhhY5.js"></script>
|
|
8
|
+
<link rel="stylesheet" crossorigin href="/assets/index-BckF9M34.css">
|
|
9
9
|
</head>
|
|
10
10
|
<body>
|
|
11
11
|
<div id="root"></div>
|
|
@@ -16,6 +16,7 @@ import {
|
|
|
16
16
|
import { homedir } from 'node:os';
|
|
17
17
|
import path from 'node:path';
|
|
18
18
|
import { CHAT_FLAGS, encode as claudeInput } from './adapter/claude.js';
|
|
19
|
+
import { kindOf } from './activity.js';
|
|
19
20
|
|
|
20
21
|
export { CHAT_FLAGS };
|
|
21
22
|
|
|
@@ -414,7 +415,8 @@ function say(c, text, by, m = {}) {
|
|
|
414
415
|
if (entry) entry.echo = true;
|
|
415
416
|
const shown = paths.length ? { images: paths } : {};
|
|
416
417
|
const again = retry ? { retry: true } : {};
|
|
417
|
-
|
|
418
|
+
// The chat shows what the operator wrote: the context that went before it is the agent's.
|
|
419
|
+
post(c, { type: 'say', by, text: own, ...shown, n: c.sent, ...(id ? { id } : {}), ...again });
|
|
418
420
|
|
|
419
421
|
return true;
|
|
420
422
|
}
|
|
@@ -531,7 +533,14 @@ async function decided(c, requestId, { allow, by = 'operator', always = false })
|
|
|
531
533
|
if (!allow) {
|
|
532
534
|
send(c, c.encode.deny(requestId, `the operator refused: ${title}`));
|
|
533
535
|
|
|
534
|
-
return post(c, {
|
|
536
|
+
return post(c, {
|
|
537
|
+
type: 'denied',
|
|
538
|
+
request_id: requestId,
|
|
539
|
+
tool: card.tool,
|
|
540
|
+
kind: kindOf(card.tool),
|
|
541
|
+
by,
|
|
542
|
+
title,
|
|
543
|
+
});
|
|
535
544
|
}
|
|
536
545
|
|
|
537
546
|
let rule = always ? card.always : null;
|
|
@@ -724,7 +733,7 @@ function permit(c, e) {
|
|
|
724
733
|
/** Refuse a tool call (`{request_id, tool}`) by the engine's own word, with no card before it. */
|
|
725
734
|
function refuse(c, { request_id: requestId, tool }, message, more = {}) {
|
|
726
735
|
send(c, c.encode.deny(requestId, message));
|
|
727
|
-
post(c, { type: 'denied', tool, by: 'engine', ...more });
|
|
736
|
+
post(c, { type: 'denied', tool, kind: kindOf(tool), by: 'engine', ...more });
|
|
728
737
|
}
|
|
729
738
|
|
|
730
739
|
// What the operator reads of each neutral event of the session, by its type.
|
|
@@ -759,6 +768,8 @@ const SEEN = {
|
|
|
759
768
|
post(c, {
|
|
760
769
|
type: 'denied',
|
|
761
770
|
tool: e.tool,
|
|
771
|
+
// The kind a card names (shell, edit…): the board folds the refusal into a line under it.
|
|
772
|
+
kind: kindOf(e.tool),
|
|
762
773
|
by: 'rule',
|
|
763
774
|
...(call ? { title: cut(call.title, TITLE_MAX), ...refusedBy(c.deny, call) } : {}),
|
|
764
775
|
...(why ? { description: cut(why, WHY_MAX) } : {}),
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gcf-session",
|
|
3
|
-
"version": "0.17.
|
|
3
|
+
"version": "0.17.6",
|
|
4
4
|
"private": true,
|
|
5
5
|
"description": "The session engine of GCF: one agent session and a run as a chain of them, the chat protocol, the provider adapters. Bundled by gcf-harness-aif-ext and gcf-board, never published.",
|
|
6
6
|
"type": "module",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gcf-board",
|
|
3
|
-
"version": "0.18.
|
|
3
|
+
"version": "0.18.7",
|
|
4
4
|
"description": "A local web board for GCF game projects: shows `gcf board --json` and runs the same ai-factory gcf commands an operator runs in a console",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|