@linxiraos/pi-agent-core 1.1.7 → 1.1.8

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/CHANGELOG.md CHANGED
@@ -2,6 +2,11 @@
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
+ ## [1.1.8] - 2026-09-04
6
+
7
+ - OMP sync v18.1.2–v18.1.5: Agent Hub activity stream groundwork, declarative provider auth registry, and tool-roster notice plumbing shared with the session layer.
8
+ - Fixed the session extension rebinding path so freshly prepared extensions bind without re-evaluating the module.
9
+
5
10
  ## [1.1.7] - 2026-09-01
6
11
 
7
12
  - 同步上游 OMP v18.0.11(`b8ce33a58911c26bed1d84f0db9a5e2e727c49a2`)。
@@ -15,12 +20,6 @@
15
20
 
16
21
  - 同步上游 OMP v18.0.5 / v18.0.6(内部运行时与构建改进)。
17
22
 
18
- ## [1.1.2] - 2026-08-25
19
-
20
- ### Fixed
21
-
22
- - Republished as 1.1.2 to reset the `latest` tag after the broken 1.1.0 (no functional change over 1.1.1).
23
-
24
23
  ## [1.1.1] - 2026-08-25
25
24
 
26
25
  ### Fixed
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "type": "module",
3
3
  "name": "@linxiraos/pi-agent-core",
4
- "version": "1.1.7",
4
+ "version": "1.1.8",
5
5
  "description": "General-purpose agent with transport abstraction, state management, and attachment support",
6
6
  "homepage": "https://linxira-os.github.io/zeta/",
7
7
  "author": "Can Boluk",
@@ -35,16 +35,16 @@
35
35
  "fmt": "biome format --write ."
36
36
  },
37
37
  "dependencies": {
38
- "@linxiraos/pi-ai": "1.1.7",
39
- "@linxiraos/pi-catalog": "1.1.7",
40
- "@linxiraos/pi-natives": "1.1.7",
41
- "@linxiraos/pi-utils": "1.1.7",
42
- "@linxiraos/pi-wire": "1.1.7",
43
- "@linxiraos/pi-snapcompact": "1.1.7",
38
+ "@linxiraos/pi-ai": "1.1.8",
39
+ "@linxiraos/pi-catalog": "1.1.8",
40
+ "@linxiraos/pi-natives": "1.1.8",
41
+ "@linxiraos/pi-utils": "1.1.8",
42
+ "@linxiraos/pi-wire": "1.1.8",
43
+ "@linxiraos/pi-snapcompact": "1.1.8",
44
44
  "@opentelemetry/api": "^1.9.1"
45
45
  },
46
46
  "devDependencies": {
47
- "@linxiraos/pi-omptype": "1.1.7",
47
+ "@linxiraos/pi-omptype": "1.1.8",
48
48
  "@opentelemetry/context-async-hooks": "^2.9.0",
49
49
  "@opentelemetry/sdk-trace-base": "^2.9.0",
50
50
  "@types/bun": "^1.3.14"
package/src/agent-loop.ts CHANGED
@@ -768,7 +768,7 @@ function createDetailedCapture(config: AgentLoopConfig): {
768
768
  const wired: AgentLoopConfig = {
769
769
  ...config,
770
770
  telemetry: {
771
- ...(config.telemetry ?? {}),
771
+ ...config.telemetry,
772
772
  onRunEnd: (summary, coverage) => {
773
773
  captured = { summary, coverage };
774
774
  userHook?.(summary, coverage);
@@ -324,9 +324,7 @@ async function attemptCompactionV2Streaming(
324
324
  ...(request.reasoning || model.useResponsesLite
325
325
  ? {
326
326
  // Lite implies gpt-5.4+, where codex-rs sends `all_turns` replay.
327
- reasoning: model.useResponsesLite
328
- ? { ...(request.reasoning ?? {}), context: "all_turns" }
329
- : request.reasoning,
327
+ reasoning: model.useResponsesLite ? { ...request.reasoning, context: "all_turns" } : request.reasoning,
330
328
  include: ["reasoning.encrypted_content"],
331
329
  }
332
330
  : {}),
@@ -403,7 +401,7 @@ function buildCompactionV2Headers(
403
401
  ? {
404
402
  "content-type": "application/json",
405
403
  "api-key": apiKey,
406
- ...(model.headers ?? {}),
404
+ ...model.headers,
407
405
  }
408
406
  : {
409
407
  "content-type": "application/json",
@@ -1644,7 +1644,7 @@ export async function compact(
1644
1644
  }),
1645
1645
  { signal },
1646
1646
  );
1647
- preserveData = { ...(preserveData ?? {}), ...storeCompactionV2PreserveData(remote, model) };
1647
+ preserveData = { ...preserveData, ...storeCompactionV2PreserveData(remote, model) };
1648
1648
  usedRemoteCompaction = true;
1649
1649
  } catch (err) {
1650
1650
  // A user/session abort is a cancellation, not a remote failure —
@@ -226,6 +226,7 @@ export function convertMessageToLlm(message: AgentMessage): Message | undefined
226
226
  },
227
227
  ],
228
228
  attribution: "agent",
229
+ historyRewriteAt: message.timestamp,
229
230
  timestamp: message.timestamp,
230
231
  };
231
232
  case "compactionSummary":
@@ -245,6 +246,7 @@ export function convertMessageToLlm(message: AgentMessage): Message | undefined
245
246
  ...(message.images ?? []),
246
247
  ],
247
248
  attribution: "agent",
249
+ historyRewriteAt: message.timestamp,
248
250
  providerPayload: message.providerPayload,
249
251
  timestamp: message.timestamp,
250
252
  };
@@ -390,7 +390,7 @@ export function withOpenAiRemoteCompactionPreserveData(
390
390
  ): Record<string, unknown> | undefined {
391
391
  if (remoteCompaction) {
392
392
  return {
393
- ...(preserveData ?? {}),
393
+ ...preserveData,
394
394
  [OPENAI_REMOTE_COMPACTION_PRESERVE_KEY]: remoteCompaction,
395
395
  };
396
396
  }
@@ -803,12 +803,12 @@ export async function requestOpenAiRemoteCompaction(
803
803
  ? {
804
804
  "content-type": "application/json",
805
805
  "api-key": apiKey,
806
- ...(model.headers ?? {}),
806
+ ...model.headers,
807
807
  }
808
808
  : {
809
809
  "content-type": "application/json",
810
810
  Authorization: `Bearer ${apiKey}`,
811
- ...(model.headers ?? {}),
811
+ ...model.headers,
812
812
  };
813
813
 
814
814
  // Codex endpoints require additional auth headers
@@ -141,6 +141,7 @@ function estimatePrunedSavings(tokens: number, notice: string): number {
141
141
  * mutations inside the cheap-to-recache tail.
142
142
  */
143
143
  function computeMessageSuffixTokens(entries: readonly SessionEntry[], tokenizer: Tokenizer): number[] {
144
+ // [suppressed] length preallocation
144
145
  const suffix = new Array<number>(entries.length);
145
146
  let accumulated = 0;
146
147
  for (let i = entries.length - 1; i >= 0; i--) {
@@ -318,6 +318,7 @@ export function collectShakeRegions(entries: SessionEntry[], tokenizer: Tokenize
318
318
  if (n === 0) return [];
319
319
 
320
320
  // Tokens of all entries strictly more recent than index i.
321
+ // [suppressed] length preallocation
321
322
  const accumulatedAfter = new Array<number>(n);
322
323
  let acc = 0;
323
324
  for (let i = n - 1; i >= 0; i--) {