@eventmodelers/cli 2.0.3 ā 2.0.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/cli.js +12 -3
- package/package.json +1 -1
- package/shared/build-kit/lib/build-log-share.js +8 -1
package/cli.js
CHANGED
|
@@ -3863,8 +3863,10 @@ credentialFlags(program
|
|
|
3863
3863
|
}
|
|
3864
3864
|
// Asked once, for the kit in this directory (the first one found when there is none), and
|
|
3865
3865
|
// handed to the others ā the modeling agent reads this directory's config.
|
|
3866
|
-
|
|
3867
|
-
|
|
3866
|
+
// With no build kit (--modeling alone), the credentials belong to this directory itself:
|
|
3867
|
+
// a kit dir that need not exist, since only its parent is used.
|
|
3868
|
+
const rootDir = dirs.find((dir) => dirname(dir) === cwd) ?? dirs[0] ?? join(cwd, '.agent-modeling-kit');
|
|
3869
|
+
console.log(`\nš Credentials for ${dirs.length ? relative(cwd, rootDir) || '.' : 'the modeling agent'}, shared by all`);
|
|
3868
3870
|
const { organizationId, boardId, token, baseUrl } = await forceBuildKitCredentials(rootDir, cwd, opts, globalOpts);
|
|
3869
3871
|
for (const dir of dirs.filter((d) => d !== rootDir)) {
|
|
3870
3872
|
await forceBuildKitCredentials(dir, cwd, opts, globalOpts, { organizationId, boardId, token, baseUrl });
|
|
@@ -5154,5 +5156,12 @@ program
|
|
|
5154
5156
|
}
|
|
5155
5157
|
});
|
|
5156
5158
|
|
|
5157
|
-
|
|
5159
|
+
try {
|
|
5160
|
+
await program.parseAsync();
|
|
5161
|
+
} catch (err) {
|
|
5162
|
+
// A bug or bad input must end as one readable line, not a Node stack trace.
|
|
5163
|
+
console.error(`ā ${err?.message ?? err}`);
|
|
5164
|
+
if (process.env.EVENTMODELERS_DEBUG && err?.stack) console.error(err.stack);
|
|
5165
|
+
process.exitCode = 1;
|
|
5166
|
+
}
|
|
5158
5167
|
if (sharedRl) sharedRl.close();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eventmodelers/cli",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.4",
|
|
4
4
|
"description": "Eventmodelers CLI ā real-time Claude agent + skills for Claude Code, for any stack (Node, Supabase, Axon, OpenCQRS, UmaDB, Kurrent, or modeling-only)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
// log, each carrying the slice, the iteration id, the board, the org and the date ā and a
|
|
6
6
|
// `slice-done` after an iteration that settled the slice as Done. Always on.
|
|
7
7
|
// sync with --sync, the events that name a slice are uploaded to POST ā¦/boards/:boardId/buildlog,
|
|
8
|
-
// numbered (the event's own `seq`, which defines the order) and tagged with the kit type (backend, or ui for a kit that picks up from Waiting) ā
|
|
8
|
+
// numbered (only while the slice has an iteration open ā an agent records only when it is active; the event's own `seq`, which defines the order) and tagged with the kit type (backend, or ui for a kit that picks up from Waiting) ā
|
|
9
9
|
// constantly, on a short interval for as long as the loop runs, so a live dashboard follows the
|
|
10
10
|
// build, and once more at the start and end of each iteration.
|
|
11
11
|
//
|
|
@@ -21,6 +21,8 @@ import { statusKey } from './slice-state.js';
|
|
|
21
21
|
|
|
22
22
|
export const SYNC_STATE_FILE = 'build-log-sync.json';
|
|
23
23
|
export const SYNC_INTERVAL_MS = 2_000;
|
|
24
|
+
// Always shared, even with no iteration open: they are what opens and closes one.
|
|
25
|
+
const BOUNDARY = new Set(['iteration-started', 'iteration-closed', 'slice-done']);
|
|
24
26
|
const NOOP = { iterationStarted: () => null, iterationClosed: () => {}, flush: async () => {}, start: () => {}, stop: () => {} };
|
|
25
27
|
|
|
26
28
|
function readState(path) {
|
|
@@ -61,8 +63,13 @@ export function createBuildLogShare({ kitDir, cfg, meta, agentType = 'BUILD', ki
|
|
|
61
63
|
const entries = [];
|
|
62
64
|
for (const e of fresh) {
|
|
63
65
|
if (!e.slice) continue;
|
|
66
|
+
// An agent records only while it is active: events of a slice with no iteration open are not shared. The kit mirrors
|
|
67
|
+
// every slice's board status as `board-observed`, whether or not it is working on it ā that is not the agent's work.
|
|
68
|
+
// The boundaries themselves (the iteration's start and end, and slice-done after it) always are.
|
|
69
|
+
if (!iterations[e.slice] && !BOUNDARY.has(e.type)) continue;
|
|
64
70
|
if (e.type === 'iteration-started') iterations[e.slice] = e.iteration;
|
|
65
71
|
entries.push(toBuildLogEntry(e, { agentId: cfg.agentId, iteration: e.iteration ?? iterations[e.slice], boardId: cfg.boardId, organizationId: cfg.organizationId, kitType, seq: e.seq }));
|
|
72
|
+
if (e.type === 'iteration-closed') delete iterations[e.slice];
|
|
66
73
|
}
|
|
67
74
|
if (entries.length) {
|
|
68
75
|
const res = await fetch(`${cfg.baseUrl}/api/org/${cfg.organizationId}/boards/${cfg.boardId}/buildlog`, {
|