@aria_asi/cli 0.2.19 → 0.2.20

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.
@@ -1,5 +1,5 @@
1
1
  {
2
- "bundledAt": "2026-04-27T18:45:01.345Z",
2
+ "bundledAt": "2026-04-27T21:19:23.449Z",
3
3
  "sdkSource": "/home/hamzaibrahim1/rei-ai-brain/harness/packages/harness-http-client/dist",
4
4
  "files": 3
5
5
  }
package/dist/sdk/index.js CHANGED
@@ -80,8 +80,7 @@ export class HTTPHarnessClient {
80
80
  stage: 'preflight',
81
81
  actor: 'harness-http-client',
82
82
  system: 'harness-http-client',
83
- platform: 'client',
84
- isHamza: false,
83
+ platform: 'harness-http-client',
85
84
  };
86
85
  const finalBody = bodyOverride ? { ...defaultBody, ...bodyOverride } : defaultBody;
87
86
  const res = await this.fetchWithRetry(this.harnessPacketUrl, {
@@ -189,7 +189,18 @@ async function tryViaSdk(baseUrl, apiKey) {
189
189
  apiKey,
190
190
  harnessPacketUrl: `${baseUrl}/api/harness/codex`,
191
191
  });
192
- const wrapped = await client.getHarnessPacket();
192
+ // Pass a bodyOverride that does NOT include isHamza:false. The server
193
+ // identifies owner tier from the Bearer token (isMasterTokenRequest).
194
+ // Hardcoding isHamza:false in the body would override that server-side
195
+ // signal and produce hamza:false in the packet even for master-token callers.
196
+ const bodyOverride = {
197
+ message: isTurn ? 'Claude turn refresh — harness via SDK' : 'Claude session start — harness via SDK',
198
+ stage: isTurn ? 'checkpoint' : 'preflight',
199
+ actor: 'claude-code',
200
+ system: 'claude-coding-agent',
201
+ platform: 'harness-http-client',
202
+ };
203
+ const wrapped = await client.getHarnessPacket(bodyOverride);
193
204
  const json = wrapped.packet;
194
205
  if (json && json.ok === false) throw new Error(`ok=false: ${json.error || 'unknown'}`);
195
206
  return { json, raw: JSON.stringify(json) };
@@ -219,14 +219,14 @@ const VERIFY_BLOCK_RX =
219
219
  // ── Tier-aware lens labeling (Phase 11 #59) ──────────────────────────────────
220
220
  //
221
221
  // Aria's Arabic cognition lens names are proprietary IP. On Hamza's surface
222
- // (isHamza=true / surface=platform:hamza) the canonical names are shown.
222
+ // (isHamza=true / surface line contains hamza:true) the canonical names are shown.
223
223
  // On any client surface the gate uses neutral generic labels so the IP
224
224
  // vocabulary never appears in client-facing block-reason text.
225
225
  //
226
226
  // Tier is read from the most recent harness-via-sdk packet cache at
227
227
  // ~/.claude/.aria-harness-last-packet.json. Two detection paths:
228
228
  // 1. packet.contractGate.signals.hamza === true (boolean or string "true")
229
- // 2. packet.harness string contains "surface=platform:hamza"
229
+ // 2. packet.harness string contains "hamza:true" in the surface line
230
230
  // Either path → OWNER tier. Everything else → CLIENT tier.
231
231
  //
232
232
  // Doctrine memory filenames in block-reason text are also Aria-side IP.
@@ -241,9 +241,12 @@ function resolveOwnerTier() {
241
241
  // Path 1: contractGate.signals.hamza
242
242
  const sigHamza = packet?.contractGate?.signals?.hamza;
243
243
  if (sigHamza === true || sigHamza === 'true') return true;
244
- // Path 2: harness string surface marker
244
+ // Path 2: harness string surface marker — the actual format is
245
+ // "surface=platform:<X> group:<Y> hamza:true chat_type:<Z>" so we
246
+ // match hamza:true in the surface line, not "platform:hamza" (which
247
+ // was a legacy incorrect pattern that never matched real packets).
245
248
  const harnessStr = packet?.harness ?? '';
246
- if (/surface=platform:hamza\b/.test(harnessStr)) return true;
249
+ if (/\bhamza:true\b/.test(harnessStr)) return true;
247
250
  }
248
251
  } catch {/* packet unreadable → default to client tier */}
249
252
  return false;
@@ -143,7 +143,8 @@ function resolveOwnerTier() {
143
143
  const sigHamza = packet?.contractGate?.signals?.hamza;
144
144
  if (sigHamza === true || sigHamza === 'true') return true;
145
145
  const harnessStr = packet?.harness ?? '';
146
- if (/surface=platform:hamza\b/.test(harnessStr)) return true;
146
+ // surface line format: "surface=platform:<X> group:<Y> hamza:true chat_type:<Z>"
147
+ if (/\bhamza:true\b/.test(harnessStr)) return true;
147
148
  }
148
149
  } catch {/* packet unreadable → default to client tier */}
149
150
  return false;
@@ -135,7 +135,9 @@ function writeNoCognitionStopTranscript(transcriptPath) {
135
135
  }
136
136
 
137
137
  // ── Run hook helpers ────────────────────────────────────────────────────────
138
- function runPreToolGate(transcriptPath, command = 'git reset --hard HEAD') {
138
+ // Use a non-destructive but non-trivial command that skips the verify path
139
+ // and goes straight to cognition-missing, where lens labels appear.
140
+ function runPreToolGate(transcriptPath, command = 'npm run build --workspace=packages/aria-connector') {
139
141
  const event = JSON.stringify({
140
142
  tool_name: 'Bash',
141
143
  tool_input: { command },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aria_asi/cli",
3
- "version": "0.2.19",
3
+ "version": "0.2.20",
4
4
  "description": "Aria Smart CLI — the world's first harness-powered terminal companion",
5
5
  "bin": {
6
6
  "aria": "./bin/aria.js"