@morlay/ui-conversation-message-actions 0.0.17 → 0.0.19-alpha.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.
Files changed (45) hide show
  1. package/README.md +29 -98
  2. package/dist/client.cjs +1380 -0
  3. package/dist/client.d.cts +6 -0
  4. package/dist/client.d.mts +6 -0
  5. package/dist/index.d.cts +98 -0
  6. package/dist/index.d.mts +3 -10
  7. package/dist/index.mjs +460 -2
  8. package/dist/invariant.d.cts +7 -0
  9. package/dist/{plan-BSa7k9HO.d.mts → plan-CT_6Y1fD.d.cts} +11 -9
  10. package/dist/plan-Cm9hCord.d.mts +101 -0
  11. package/dist/plan.d.cts +2 -0
  12. package/dist/plan.d.mts +2 -2
  13. package/dist/plan.mjs +145 -11
  14. package/dist/shared-LK3nImWW.mjs +55 -0
  15. package/dist/testing.d.cts +3242 -0
  16. package/dist/testing.d.mts +25 -19
  17. package/dist/testing.mjs +2140 -3939
  18. package/package.json +35 -32
  19. package/src/client/chat-node/MessageIconActions.styles.ts +76 -0
  20. package/src/client/chat-node/MessageIconActions.tsx +30 -11
  21. package/src/client/chat-node/MessageItem.styles.ts +247 -0
  22. package/src/client/chat-node/MessageItem.tsx +32 -39
  23. package/src/client/chat-node/message-chrome.ts +0 -2
  24. package/src/client/chat-node/register.ts +3 -4
  25. package/src/client/chat-node/use-calendar-day.ts +0 -4
  26. package/src/client/composer-stats/StatsPills.styles.ts +57 -0
  27. package/src/client/composer-stats/StatsPills.tsx +384 -0
  28. package/src/client/composer-stats/register.ts +17 -0
  29. package/src/client/composer-stats/stat-dialog.styles.ts +70 -0
  30. package/src/client/composer-stats/stat-dialog.ts +52 -0
  31. package/src/client/composer-stats/token-format.ts +85 -0
  32. package/src/client/composer-stats/turn-reading.ts +35 -0
  33. package/src/client/controller.ts +32 -114
  34. package/src/client/index.ts +8 -24
  35. package/src/index.ts +102 -111
  36. package/src/plan.ts +189 -24
  37. package/src/shared.ts +1 -1
  38. package/src/testing.ts +1 -5
  39. package/src/types.ts +1 -1
  40. package/dist/client.js +0 -806
  41. package/dist/src-B4HwXsob.mjs +0 -499
  42. package/src/client/chat-node/MessageIconActions.module.css +0 -86
  43. package/src/client/chat-node/MessageItem.module.css +0 -290
  44. package/src/client/css-modules.d.ts +0 -4
  45. package/src/client/import-action.tsx +0 -74
@@ -296,7 +296,7 @@ declare class ValidationError extends TypeError {
296
296
  type Schema<S = any, T = S> = Schemastery<S, T>;
297
297
  declare const Schema: Schemastery.Static;
298
298
  //#endregion
299
- //#region ../../../node_modules/.pnpm/zod@4.6.4/node_modules/zod/v4/core/json-schema.d.cts
299
+ //#region ../../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/json-schema.d.cts
300
300
  type _JSONSchema = boolean | JSONSchema;
301
301
  type SchemaType = "object" | "array" | "string" | "number" | "boolean" | "null" | "integer";
302
302
  type JSONSchema = {
@@ -365,7 +365,7 @@ type JSONSchema = {
365
365
  };
366
366
  type BaseSchema = JSONSchema;
367
367
  //#endregion
368
- //#region ../../../node_modules/.pnpm/zod@4.6.4/node_modules/zod/v4/core/standard-schema.d.cts
368
+ //#region ../../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/standard-schema.d.cts
369
369
  /** The Standard interface. */
370
370
  interface StandardTypedV1<Input = unknown, Output = Input> {
371
371
  /** The Standard properties. */
@@ -484,7 +484,7 @@ declare namespace StandardJSONSchemaV1 {
484
484
  }
485
485
  interface StandardSchemaWithJSONProps<Input = unknown, Output = Input> extends StandardSchemaV1.Props<Input, Output>, StandardJSONSchemaV1.Props<Input, Output> {}
486
486
  //#endregion
487
- //#region ../../../node_modules/.pnpm/zod@4.6.4/node_modules/zod/v4/core/registries.d.cts
487
+ //#region ../../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/registries.d.cts
488
488
  declare const $output: unique symbol;
489
489
  type $output = typeof $output;
490
490
  declare const $input: unique symbol;
@@ -511,7 +511,7 @@ interface JSONSchemaMeta {
511
511
  }
512
512
  interface GlobalMeta extends JSONSchemaMeta {}
513
513
  //#endregion
514
- //#region ../../../node_modules/.pnpm/zod@4.6.4/node_modules/zod/v4/core/to-json-schema.d.cts
514
+ //#region ../../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/to-json-schema.d.cts
515
515
  type Processor<T extends $ZodType = $ZodType> = (schema: T, ctx: ToJSONSchemaContext, json: BaseSchema, params: ProcessParams) => void;
516
516
  /**
517
517
  * Called for each schema that has no JSON Schema equivalent. Return a JSON Schema to use in its
@@ -633,7 +633,7 @@ interface ZodStandardJSONSchemaPayload<T> extends BaseSchema {
633
633
  "~standard": ZodStandardSchemaWithJSON$1<T>;
634
634
  }
635
635
  //#endregion
636
- //#region ../../../node_modules/.pnpm/zod@4.6.4/node_modules/zod/v4/core/util.d.cts
636
+ //#region ../../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/util.d.cts
637
637
  type MimeTypes = "application/json" | "application/xml" | "application/x-www-form-urlencoded" | "application/javascript" | "application/pdf" | "application/zip" | "application/vnd.ms-excel" | "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" | "application/msword" | "application/vnd.openxmlformats-officedocument.wordprocessingml.document" | "application/vnd.ms-powerpoint" | "application/vnd.openxmlformats-officedocument.presentationml.presentation" | "application/octet-stream" | "application/graphql" | "text/html" | "text/plain" | "text/css" | "text/javascript" | "text/csv" | "image/png" | "image/jpeg" | "image/gif" | "image/svg+xml" | "image/webp" | "audio/mpeg" | "audio/ogg" | "audio/wav" | "audio/webm" | "video/mp4" | "video/webm" | "video/ogg" | "font/woff" | "font/woff2" | "font/ttf" | "font/otf" | "multipart/form-data" | (string & {});
638
638
  type IsAny<T> = 0 extends 1 & T ? true : false;
639
639
  type Omit$1<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>;
@@ -669,14 +669,14 @@ declare abstract class Class {
669
669
  /** A trait's prototype members: a partial view of its own interface, with `this` typed as the instance. */
670
670
  type ProtoOf<T> = { [K in keyof T]?: (T[K] extends ((...args: infer A) => infer R) ? (...args: A) => R : T[K]) | undefined; } & ThisType<T>;
671
671
  //#endregion
672
- //#region ../../../node_modules/.pnpm/zod@4.6.4/node_modules/zod/v4/core/versions.d.cts
672
+ //#region ../../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/versions.d.cts
673
673
  declare const version: {
674
674
  readonly major: 4;
675
675
  readonly minor: 6;
676
676
  readonly patch: number;
677
677
  };
678
678
  //#endregion
679
- //#region ../../../node_modules/.pnpm/zod@4.6.4/node_modules/zod/v4/core/schemas.d.cts
679
+ //#region ../../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/schemas.d.cts
680
680
  interface ParseContext<T extends $ZodIssueBase = never> {
681
681
  /** Customize error messages. */
682
682
  readonly error?: $ZodErrorMap<T>;
@@ -1470,7 +1470,7 @@ interface $ZodCustom<O = unknown, I = unknown> extends $ZodType {
1470
1470
  declare const $ZodCustom: $constructor<$ZodCustom>;
1471
1471
  type $ZodTypes = $ZodString | $ZodNumber | $ZodBigInt | $ZodBoolean | $ZodDate | $ZodSymbol | $ZodUndefined | $ZodNullable | $ZodNull | $ZodAny | $ZodUnknown | $ZodNever | $ZodVoid | $ZodArray | $ZodObject | $ZodUnion | $ZodIntersection | $ZodTuple | $ZodRecord | $ZodMap | $ZodSet | $ZodLiteral | $ZodEnum | $ZodFunction | $ZodPromise | $ZodLazy | $ZodOptional | $ZodDefault | $ZodPrefault | $ZodTemplateLiteral | $ZodCustom | $ZodTransform | $ZodNonOptional | $ZodReadonly | $ZodNaN | $ZodPipe | $ZodSuccess | $ZodCatch | $ZodFile;
1472
1472
  //#endregion
1473
- //#region ../../../node_modules/.pnpm/zod@4.6.4/node_modules/zod/v4/core/checks.d.cts
1473
+ //#region ../../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/checks.d.cts
1474
1474
  interface $ZodCheckDef {
1475
1475
  check: string;
1476
1476
  error?: $ZodErrorMap<never> | undefined;
@@ -1528,7 +1528,7 @@ interface $ZodCheckLengthEquals<T extends HasLength = HasLength> extends $ZodChe
1528
1528
  declare const $ZodCheckLengthEquals: $constructor<$ZodCheckLengthEquals>;
1529
1529
  type $ZodStringFormats = "email" | "url" | "emoji" | "uuid" | "guid" | "nanoid" | "cuid" | "cuid2" | "ulid" | "xid" | "ksuid" | "datetime" | "date" | "time" | "duration" | "ipv4" | "ipv6" | "cidrv4" | "cidrv6" | "base64" | "base64url" | "json_string" | "e164" | "credit_card" | "iban" | "lowercase" | "uppercase" | "regex" | "jwt" | "starts_with" | "ends_with" | "includes";
1530
1530
  //#endregion
1531
- //#region ../../../node_modules/.pnpm/zod@4.6.4/node_modules/zod/v4/core/errors.d.cts
1531
+ //#region ../../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/errors.d.cts
1532
1532
  interface $ZodIssueBase {
1533
1533
  readonly code?: string;
1534
1534
  readonly input?: unknown;
@@ -1657,7 +1657,7 @@ type $ZodFormattedError<T, U = string> = {
1657
1657
  _errors: U[];
1658
1658
  } & Flatten<_ZodFormattedError<T, U>>;
1659
1659
  //#endregion
1660
- //#region ../../../node_modules/.pnpm/zod@4.6.4/node_modules/zod/v4/core/core.d.cts
1660
+ //#region ../../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/core.d.cts
1661
1661
  type ZodTrait = {
1662
1662
  _zod: {
1663
1663
  def: any;
@@ -1703,7 +1703,7 @@ type output<T> = T extends {
1703
1703
  };
1704
1704
  } ? T["_zod"]["output"] : unknown;
1705
1705
  //#endregion
1706
- //#region ../../../node_modules/.pnpm/zod@4.6.4/node_modules/zod/v4/core/api.d.cts
1706
+ //#region ../../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/api.d.cts
1707
1707
  type Params<T extends $ZodType | $ZodCheck, IssueTypes extends $ZodIssueBase, OmitKeys extends keyof T["_zod"]["def"] = never> = Flatten<Partial<EmptyToNever<Omit<T["_zod"]["def"], OmitKeys> & ([IssueTypes] extends [never] ? {} : {
1708
1708
  error?: string | $ZodErrorMap<IssueTypes> | undefined;
1709
1709
  /** @deprecated This parameter is deprecated. Use `error` instead. */
@@ -1735,7 +1735,7 @@ interface $ZodSuperRefineParams {
1735
1735
  when?: ((payload: ParsePayload) => boolean) | undefined;
1736
1736
  }
1737
1737
  //#endregion
1738
- //#region ../../../node_modules/.pnpm/zod@4.6.4/node_modules/zod/v4/classic/errors.d.cts
1738
+ //#region ../../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/classic/errors.d.cts
1739
1739
  /** An Error-like class used to store Zod validation issues. */
1740
1740
  interface ZodError<T = unknown> extends $ZodError<T> {
1741
1741
  /** @deprecated Use the `z.treeifyError(err)` function instead. */
@@ -1753,7 +1753,7 @@ interface ZodError<T = unknown> extends $ZodError<T> {
1753
1753
  }
1754
1754
  declare const ZodError: $constructor<ZodError>;
1755
1755
  //#endregion
1756
- //#region ../../../node_modules/.pnpm/zod@4.6.4/node_modules/zod/v4/classic/parse.d.cts
1756
+ //#region ../../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/classic/parse.d.cts
1757
1757
  type ZodSafeParseResult<T> = ZodSafeParseSuccess<T> | ZodSafeParseError<T>;
1758
1758
  type ZodSafeParseSuccess<T> = {
1759
1759
  success: true;
@@ -1766,7 +1766,7 @@ type ZodSafeParseError<T> = {
1766
1766
  error: ZodError<T>;
1767
1767
  };
1768
1768
  //#endregion
1769
- //#region ../../../node_modules/.pnpm/zod@4.6.4/node_modules/zod/v4/classic/schemas.d.cts
1769
+ //#region ../../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/classic/schemas.d.cts
1770
1770
  type ZodStandardSchemaWithJSON<T> = StandardSchemaWithJSONProps<input<T>, output<T>>;
1771
1771
  interface ZodType<out Output = unknown, out Input = unknown, out Internals extends $ZodTypeInternals<Output, Input> = $ZodTypeInternals<Output, Input>> extends $ZodType<Output, Input, Internals> {
1772
1772
  def: Internals["def"];
@@ -2798,6 +2798,17 @@ declare class WorkspaceRegistry extends Service {
2798
2798
  * @returns resolution after durability.
2799
2799
  */
2800
2800
  archiveSession(sessionId: SessionId): Promise<void>;
2801
+ /**
2802
+ * Unarchive one session durably by dropping it from the registry-global
2803
+ * archive set; the accounting slot was never touched, so the session
2804
+ * returns to its recorded position. Unarchiving runs no session-existence
2805
+ * check because removing an id cannot introduce an unknown one, so an
2806
+ * entry whose session is gone still resolves. An id that is not archived
2807
+ * resolves without writing.
2808
+ * @param sessionId - The session to unarchive.
2809
+ * @returns resolution after durability.
2810
+ */
2811
+ unarchiveSession(sessionId: SessionId): Promise<void>;
2801
2812
  /**
2802
2813
  * Whether a session is live, header-indexed, or present in a fresh
2803
2814
  * persistence listing. Only a definite miss returns false — a failing
@@ -3202,9 +3213,7 @@ declare class EmptySettings extends SettingsProvider {
3202
3213
  }
3203
3214
  //#endregion
3204
3215
  //#region ../session-rdb/src/testing/contract.d.ts
3205
- /** Build a minimal {@link SessionHeader} for a session id. */
3206
3216
  declare function meta(id: string, cwd?: string): SessionHeader$1;
3207
- /** A well-formed one-turn event log (contiguous seqs from 0). */
3208
3217
  declare function oneTurnLog(): SessionEvent$1[];
3209
3218
  //#endregion
3210
3219
  //#region src/shared.d.ts
@@ -3219,11 +3228,8 @@ interface Harness {
3219
3228
  declare function harness(provide?: (ctx: Context) => void): Promise<Harness>;
3220
3229
  declare function twoTurnLog(): SessionEvent[];
3221
3230
  declare function createPersisted(ctx: Context, id: string, events: readonly SessionEvent[], header?: SessionHeader): Promise<void>;
3222
- /** 构造一条 user/message 事件。 */
3223
3231
  declare function userMessage(seq: number, id: string, text: string, time?: number): SessionEvent;
3224
- /** 构造一条 assistant/message 事件(纯文本回复)。 */
3225
3232
  declare function assistantMessage(seq: number, turn: number, step: number, id: string, text: string, time?: number): SessionEvent;
3226
- /** 真实 agent-loop 形状的一轮:轮首输入 + 可选 followup,可闭合。 */
3227
3233
  declare function turnLog(base: number, turn: number, opts?: {
3228
3234
  users?: Array<{
3229
3235
  id: string;