@eum-agent/extension-catalog 1.0.3 → 1.1.0

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/dist/index.js CHANGED
@@ -445,6 +445,18 @@ const OwnerContextSchema = z.array(OwnerContextEntrySchema).max(16).superRefine(
445
445
  });
446
446
  }).transform((entries) => freezeWidget(JSON.parse(JSON.stringify(entries))));
447
447
  //#endregion
448
+ //#region ../../core/kernel/src/vocab/model-replay.ts
449
+ /** Opaque protocol state with a fixed UTF-8 storage budget. */
450
+ const ModelReplayDataSchema = z.custom((value) => isLosslessJson(value) && new TextEncoder().encode(JSON.stringify(value)).byteLength <= 2097152);
451
+ /** Host-bound producer identity; only that binding may consume the opaque data. */
452
+ const ModelReplaySchema = z.strictObject({
453
+ owner: z.string().min(1).max(256),
454
+ protocolId: z.string().min(1).max(256),
455
+ providerId: z.string().min(1).max(256),
456
+ model: z.string().min(1).max(256),
457
+ data: ModelReplayDataSchema
458
+ });
459
+ //#endregion
448
460
  //#region ../../core/kernel/src/vocab/message.ts
449
461
  /**
450
462
  * The transcript's message shapes: the authoritative history that assembly
@@ -563,7 +575,19 @@ const FileRefSchema = z.object({
563
575
  * interleave in the order a person composed them. */
564
576
  const FilePartSchema = z.object({
565
577
  type: z.literal("file"),
566
- file: FileRefSchema
578
+ file: FileRefSchema,
579
+ /** Presentation preference; file bytes and model input remain unchanged. */
580
+ display: z.enum(["inline", "link"]).optional(),
581
+ /** Host-stamped actual producer; never accepted as execution authority. */
582
+ source: z.object({
583
+ providerId: z.string().min(1),
584
+ model: z.string().min(1),
585
+ route: z.enum(["native", "tool"]),
586
+ /** Connection display name captured by the host at generation time. */
587
+ providerName: z.string().min(1).optional(),
588
+ /** Configured model display name captured by the host when available. */
589
+ modelName: z.string().min(1).optional()
590
+ }).optional()
567
591
  });
568
592
  /** The host stamps the producing activation before persisting a block. */
569
593
  const SavedRequiredContextBlockSchema = z.object({
@@ -662,6 +686,10 @@ const OutputTruncationSchema = z.object({
662
686
  incompleteThinking: z.literal(true).optional()
663
687
  });
664
688
  const MessageSchema = z.object({
689
+ /** Host request identity for committed model usage and observation matching. */
690
+ modelCallId: z.string().min(1).max(256).optional(),
691
+ /** Protocol replay receipt stamped by the host after successful model completion. */
692
+ modelReplay: ModelReplaySchema.optional(),
665
693
  finishReason: FinishReasonSchema.optional(),
666
694
  outputTruncation: OutputTruncationSchema.optional(),
667
695
  outputContinuation: z.object({
@@ -769,6 +797,8 @@ const HumanOptionSchema = z.object({
769
797
  * text is the only answer there is. */
770
798
  const HumanQuestionSchema = z.object({
771
799
  id: z.string().min(1),
800
+ /** Optional short title for question navigation, separate from the complete text. */
801
+ header: z.string().optional(),
772
802
  text: z.string().min(1),
773
803
  options: z.array(HumanOptionSchema),
774
804
  freeText: z.boolean(),
@@ -1276,6 +1306,8 @@ const ContextOperationStatusSchema = z.enum([
1276
1306
  ]);
1277
1307
  /** Durable accounting and outcome for one automatic or explicit context operation. */
1278
1308
  const ContextOperationEventSchema = z.object({
1309
+ /** Independent auxiliary request identity, shared by its checkpoint and final accounting. */
1310
+ modelCallId: z.string().min(1).max(256).optional(),
1279
1311
  kind: z.literal("context-operation"),
1280
1312
  sessionId: SessionIdSchema,
1281
1313
  address: SessionAddressSchema,
@@ -1317,6 +1349,8 @@ const TurnEndedEventSchema = z.object({
1317
1349
  });
1318
1350
  /** Marks the end of copied history in a new independent session. */
1319
1351
  const HistorySeededEventSchema = z.object({
1352
+ /** Context identity of the retained prefix, independent of the destination session. */
1353
+ historyEpoch: z.string().optional(),
1320
1354
  kind: z.literal("history-seeded"),
1321
1355
  sessionId: SessionIdSchema,
1322
1356
  address: SessionAddressSchema,
@@ -2033,6 +2067,10 @@ const ReadingPartHeader = z.object({
2033
2067
  contentRef: ContentRef,
2034
2068
  metadataRef: ContentRef.optional(),
2035
2069
  callId: z.string().optional(),
2070
+ /** Effective admitted tool name, available without loading its input. */
2071
+ toolName: z.string().optional(),
2072
+ /** Committed tool-result failure flag, available without loading its output. */
2073
+ isError: z.boolean().optional(),
2036
2074
  relatedMessageId: z.string().optional(),
2037
2075
  association: z.enum([
2038
2076
  "loaded",
@@ -2080,6 +2118,7 @@ const SessionHistoryPageRequest = z.object({
2080
2118
  historyGeneration: z.number().int().nonnegative(),
2081
2119
  cursor: z.string().max(2048).optional(),
2082
2120
  aroundMessageId: z.string().optional(),
2121
+ turnId: z.string().optional(),
2083
2122
  limit: page
2084
2123
  }).strict().refine((p) => !(p.cursor && p.aroundMessageId))
2085
2124
  });
@@ -2192,6 +2231,54 @@ z.object({
2192
2231
  hasMore: z.boolean(),
2193
2232
  nextCursor: z.string().optional()
2194
2233
  });
2234
+ /** Selects complete Turn identities independently of their transcript length. */
2235
+ const SessionTurnPageRequest = z.object({
2236
+ method: z.literal("session.turnPage"),
2237
+ params: z.object({
2238
+ sessionId: z.string(),
2239
+ historyGeneration: z.number().int().nonnegative(),
2240
+ cursor: z.string().max(2048).optional(),
2241
+ aroundTurnId: z.string().optional(),
2242
+ aroundMessageId: z.string().optional(),
2243
+ limit: z.number().int().min(1).max(10).default(10)
2244
+ }).strict().refine((p) => [
2245
+ p.cursor,
2246
+ p.aroundTurnId,
2247
+ p.aroundMessageId
2248
+ ].filter(Boolean).length <= 1)
2249
+ });
2250
+ z.object({
2251
+ view: HistoryView,
2252
+ turns: z.array(ReadingTurnHeader).max(10),
2253
+ hasOlder: z.boolean(),
2254
+ hasNewer: z.boolean(),
2255
+ olderCursor: z.string().max(2048).optional(),
2256
+ newerCursor: z.string().max(2048).optional(),
2257
+ targetTurnId: z.string().optional()
2258
+ });
2259
+ /** One original part, or a partless message; repeated message headers have the same identity. */
2260
+ const TurnTranscriptEntry = z.object({
2261
+ message: ReadingMessageHeader,
2262
+ part: ReadingPartHeader.optional()
2263
+ });
2264
+ /** Reads bounded ordered descriptors within one Turn; bodies remain immutable range references. */
2265
+ const SessionTurnTranscriptPageRequest = z.object({
2266
+ method: z.literal("session.turnTranscriptPage"),
2267
+ params: z.object({
2268
+ sessionId: z.string(),
2269
+ historyGeneration: z.number().int().nonnegative(),
2270
+ turnId: z.string(),
2271
+ cursor: z.string().max(2048).optional(),
2272
+ limit: page
2273
+ }).strict()
2274
+ });
2275
+ z.object({
2276
+ view: HistoryView,
2277
+ turnId: z.string(),
2278
+ entries: z.array(TurnTranscriptEntry).max(64),
2279
+ hasMore: z.boolean(),
2280
+ nextCursor: z.string().max(2048).optional()
2281
+ });
2195
2282
  //#endregion
2196
2283
  //#region ../../core/protocol/src/index.ts
2197
2284
  /**
@@ -2413,6 +2500,8 @@ const HumanOption = z.object({
2413
2500
  });
2414
2501
  const HumanQuestion = z.object({
2415
2502
  id: z.string().min(1),
2503
+ /** Optional short title for question navigation, separate from the complete text. */
2504
+ header: z.string().optional(),
2416
2505
  text: z.string().min(1),
2417
2506
  options: z.array(HumanOption),
2418
2507
  /** Whether an answer may skip the options and give text alone. */
@@ -3428,13 +3517,13 @@ const SessionSendRequest = z.object({
3428
3517
  }).optional()
3429
3518
  })
3430
3519
  }).refine((request) => !request.params.rewind || request.params.operationId !== void 0);
3431
- /** Creates a new independent session before a current user message. */
3520
+ /** Forks before a committed user input in the displayed history generation; the source may run. */
3432
3521
  const SessionForkRequest = z.object({
3433
3522
  method: z.literal("session.fork"),
3434
3523
  params: z.object({
3435
3524
  sessionId: z.string(),
3436
3525
  beforeMessageId: z.string().uuid(),
3437
- expectedRevision: z.number().int().nonnegative(),
3526
+ expectedHistoryGeneration: z.number().int().nonnegative(),
3438
3527
  operationId: z.string().uuid()
3439
3528
  })
3440
3529
  });
@@ -4107,6 +4196,8 @@ const RequestBody = z.discriminatedUnion("method", [
4107
4196
  SessionCreateRequest,
4108
4197
  SessionWatchRequest,
4109
4198
  SessionHistoryPageRequest,
4199
+ SessionTurnPageRequest,
4200
+ SessionTurnTranscriptPageRequest,
4110
4201
  SessionMessagePartsRequest,
4111
4202
  SessionMessageContentsRequest,
4112
4203
  SessionLivePageRequest,
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "en-US": "Extension Catalog",
5
5
  "zh-CN": "扩展目录"
6
6
  },
7
- "version": "1.0.3",
7
+ "version": "1.1.0",
8
8
  "type": "module",
9
9
  "description": "Extension Catalog",
10
10
  "license": "MIT",
@@ -25,7 +25,7 @@
25
25
  "semver": "7.8.5"
26
26
  },
27
27
  "devDependencies": {
28
- "@eum-agent/plugin": "1.0.1",
28
+ "@eum-agent/plugin": "1.1.0",
29
29
  "@types/react": "^19.2.18",
30
30
  "@types/react-dom": "^19.2.5",
31
31
  "react": "^19.2.0",
@@ -42,7 +42,7 @@
42
42
  "@types/semver": "7.8.0",
43
43
  "i18next": "^26.4.1",
44
44
  "@eum-agent/infra-local": "1.0.1",
45
- "@eum-agent/storage-sqlite": "1.0.1"
45
+ "@eum-agent/storage-sqlite": "1.1.0"
46
46
  },
47
47
  "yaoguang": {
48
48
  "kind": "extension",
@@ -53,7 +53,7 @@
53
53
  "dependencies": {},
54
54
  "foundationDependencies": {
55
55
  "@eum-agent/infra-local": "1.0.1",
56
- "@eum-agent/storage-sqlite": "1.0.1"
56
+ "@eum-agent/storage-sqlite": "1.1.0"
57
57
  }
58
58
  },
59
59
  "scripts": {
package/ui/ui.js CHANGED
@@ -2827,6 +2827,7 @@ function CatalogPanel({ controller, installed, active, renderActions, renderSele
2827
2827
  onClick: () => controller.cancelPreview(),
2828
2828
  children: t("extensionCatalog.cancel")
2829
2829
  }), /* @__PURE__ */ jsx(Button, {
2830
+ variant: "primary",
2830
2831
  disabled: state.busy,
2831
2832
  loading: state.busy,
2832
2833
  onClick: () => {