@sickr/cli 0.9.9 → 0.9.10

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.
Files changed (2) hide show
  1. package/dist/run.js +15 -6
  2. package/package.json +2 -2
package/dist/run.js CHANGED
@@ -124,6 +124,19 @@ export function steerMatchesRunner(msg, identity) {
124
124
  return normTarget(msg.targetAgent) === normTarget(identity.agent);
125
125
  return true;
126
126
  }
127
+ export function normalizeRunEventForRunner(event, identity) {
128
+ if (event.runner && event.runner !== identity.runner)
129
+ return null;
130
+ if (!event.runner && event.agent && normTarget(event.agent) !== normTarget(identity.agent))
131
+ return null;
132
+ if (!event.agent)
133
+ event.agent = identity.agent;
134
+ if (!event.runner)
135
+ event.runner = identity.runner;
136
+ if (event.session)
137
+ identity.sessions.add(event.session);
138
+ return event;
139
+ }
127
140
  export function decideSteer(msg, defaultMode = 'pty') {
128
141
  const text = String(msg.text ?? '');
129
142
  if (!text)
@@ -509,13 +522,9 @@ function pumpNewLines(ws, offsets, identity) {
509
522
  for (const line of result.lines) {
510
523
  for (const fragment of splitJsonObjects(line)) {
511
524
  try {
512
- const event = JSON.parse(fragment);
513
- if (event.runner && event.runner !== identity.runner)
514
- continue;
515
- if (!event.runner && event.agent && normTarget(event.agent) !== normTarget(identity.agent))
525
+ const event = normalizeRunEventForRunner(JSON.parse(fragment), identity);
526
+ if (!event)
516
527
  continue;
517
- if (event.session)
518
- identity.sessions.add(event.session);
519
528
  ws.send(JSON.stringify({ kind: 'event', event }));
520
529
  }
521
530
  catch { /* skip malformed */ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sickr/cli",
3
- "version": "0.9.9",
3
+ "version": "0.9.10",
4
4
  "type": "module",
5
5
  "description": "npx @sickr/cli - replay, live look, and workflow orchestration for AI coding agents.",
6
6
  "bin": {
@@ -14,7 +14,7 @@
14
14
  "access": "public"
15
15
  },
16
16
  "scripts": {
17
- "build": "tsc",
17
+ "build": "node --max-old-space-size=4096 ./node_modules/typescript/bin/tsc",
18
18
  "test": "vitest run",
19
19
  "dev": "tsc -w",
20
20
  "prepublishOnly": "npm run build && npm test && node scripts/pre-publish-check.mjs"