@quolu/lattice 0.84.0 → 0.84.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quolu/lattice",
3
- "version": "0.84.0",
3
+ "version": "0.84.1",
4
4
  "description": "Schedulability compiler for multi-agent development: observe real code boundaries, refactor the conflicting seam, recompile the plan for parallel execution",
5
5
  "author": {
6
6
  "name": "Quo / クオ at kitepon.dev",
@@ -110,7 +110,7 @@ export async function reportProjectDashboardDelivery({ projectId, env, stderr,
110
110
  ? { stage: FAILURE_STAGES.get(subreason), subreason }
111
111
  : { stage: 'unknown', subreason: 'unavailable' };
112
112
  }
113
- // a15: no bridge is the seat's choice, not a failure; say nothing on every write.
114
- if (delivery.state !== 'local_only') stderr?.write(`${JSON.stringify(delivery)}\n`);
113
+ // a15: only a failed delivery is news on a write; no bridge or a delivered page says nothing.
114
+ if (delivery.state === 'failed') stderr?.write(`${JSON.stringify(delivery)}\n`);
115
115
  return delivery;
116
116
  }
@@ -24,6 +24,7 @@ import {
24
24
  import { isTodoIndependenceLegacyMarker } from './todo-independence-contracts.mjs';
25
25
  import { selectIndependenceGuidance } from './todo-independence-guidance.mjs';
26
26
  import { ensureTodoDashboardActivity } from './todo-dashboard-registry.mjs';
27
+ import { seatIdentityFields } from './seat-identity.mjs';
27
28
  import { reportProjectDashboardDelivery } from './dashboard-delivery.mjs';
28
29
  import { resolveProjectIdentity } from './project-identity.mjs';
29
30
  import {
@@ -432,6 +433,7 @@ export async function runSessionContext({ cwd, stdout, cliVersion, env = process
432
433
  ? [] : await summarizeIndependence({ repoRoot: state.repoRoot, store: state.store, todo: state.todo });
433
434
  const result = {
434
435
  schema: SESSION_CONTEXT_SCHEMA,
436
+ ...seatIdentityFields(env),
435
437
  // project discoveryの答えをそのまま埋める。hostは既存の検証器を再利用できる。
436
438
  status: state.result,
437
439
  // todoは`lattice todo status`のresultそのもの。新しい意味論を発明しない。
@@ -12,6 +12,7 @@ import { parseTree } from 'jsonc-parser';
12
12
 
13
13
  import { canonicalizeTodoArtifact, isTodoIdentifier, todoSelfDigest } from './todo-contracts.mjs';
14
14
  import { readOrCreateTerminalIdSync, terminalPublicLabel } from './terminal-identity.mjs';
15
+ import { resolveSeatIdentity } from './seat-identity.mjs';
15
16
  import { TodoStoreError } from './todo-store.mjs';
16
17
 
17
18
  const MAX_AUTHORING_INPUT_BYTES = 8_388_608;
@@ -30,6 +31,11 @@ function defaultActorHost(env) {
30
31
  return terminalId === null ? 'host' : terminalPublicLabel(terminalId);
31
32
  }
32
33
 
34
+ function seatAgent(env) {
35
+ const { seat_id } = resolveSeatIdentity(env);
36
+ return isTodoIdentifier(seat_id) ? seat_id : null;
37
+ }
38
+
33
39
  // u03s A57: a set but non-identifier value is treated like an unset one (no refusal).
34
40
  export function resolveTodoActor(env) {
35
41
  return {
@@ -39,9 +45,10 @@ export function resolveTodoActor(env) {
39
45
  session: isTodoIdentifier(env.LATTICE_TODO_ACTOR_SESSION)
40
46
  ? env.LATTICE_TODO_ACTOR_SESSION
41
47
  : 'session',
48
+ // Seats on one machine share USER; the seat id keeps their `own` tasks apart (seat-contract).
42
49
  agent: isTodoIdentifier(env.LATTICE_TODO_ACTOR_AGENT)
43
50
  ? env.LATTICE_TODO_ACTOR_AGENT
44
- : sanitizeActorIdentifier(env.USER ?? env.LOGNAME, 'agent'),
51
+ : seatAgent(env) ?? sanitizeActorIdentifier(env.USER ?? env.LOGNAME, 'agent'),
45
52
  };
46
53
  }
47
54