@zhama/tego-plugin-sdk 1.37.2 → 1.40.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.
Files changed (53) hide show
  1. package/agent/guides/host-api-versions.md +3 -0
  2. package/agent/reference/plugin-sdk-api.md +1 -0
  3. package/dist/access.d.cts +1 -0
  4. package/dist/access.d.ts +1 -0
  5. package/dist/{chunk-EIVA5BR6.js → chunk-2KXEYXM2.js} +1 -1
  6. package/dist/{chunk-I5Z3ECC4.js → chunk-44LPR67H.js} +1 -1
  7. package/dist/chunk-66LDWN4T.cjs +1 -0
  8. package/dist/{chunk-HZ4YWRYX.cjs → chunk-6EKQMOYT.cjs} +2 -2
  9. package/dist/{chunk-SKNPNPJP.cjs → chunk-H6GXDFLP.cjs} +1 -1
  10. package/dist/{chunk-6HNG5OZI.cjs → chunk-IOZFHJ4F.cjs} +1 -1
  11. package/dist/chunk-JV2G2Z33.js +1 -0
  12. package/dist/{chunk-DRHBXEPK.cjs → chunk-QQOUNXLC.cjs} +7 -7
  13. package/dist/{chunk-IQNSBHBI.js → chunk-UZBWS5AR.js} +1 -1
  14. package/dist/{chunk-56QOZQTY.js → chunk-XOXUS4VI.js} +1 -1
  15. package/dist/decision-card-IF2c4wvM.d.cts +161 -0
  16. package/dist/decision-card-IF2c4wvM.d.ts +161 -0
  17. package/dist/dev.cjs +3 -3
  18. package/dist/dev.js +1 -1
  19. package/dist/doctor.cjs +6 -6
  20. package/dist/doctor.js +13 -13
  21. package/dist/hono.d.cts +1 -0
  22. package/dist/hono.d.ts +1 -0
  23. package/dist/index.cjs +1 -1
  24. package/dist/index.d.cts +14 -1
  25. package/dist/index.d.ts +14 -1
  26. package/dist/index.js +1 -1
  27. package/dist/manifest.cjs +1 -1
  28. package/dist/manifest.d.cts +654 -654
  29. package/dist/manifest.d.ts +654 -654
  30. package/dist/manifest.js +1 -1
  31. package/dist/pack.cjs +1 -1
  32. package/dist/pack.js +1 -1
  33. package/dist/publish.cjs +1 -1
  34. package/dist/publish.d.cts +6 -3
  35. package/dist/publish.d.ts +6 -3
  36. package/dist/publish.js +1 -1
  37. package/dist/scaffold.cjs +2 -2
  38. package/dist/scaffold.js +1 -1
  39. package/dist/server-runtime.cjs +1 -1
  40. package/dist/server-runtime.d.cts +1 -0
  41. package/dist/server-runtime.d.ts +1 -0
  42. package/dist/server-runtime.js +1 -1
  43. package/dist/server.cjs +1 -1
  44. package/dist/server.d.cts +58 -33
  45. package/dist/server.d.ts +58 -33
  46. package/dist/server.js +1 -1
  47. package/dist/testing.d.cts +1 -0
  48. package/dist/testing.d.ts +1 -0
  49. package/dist/vite.cjs +1 -1
  50. package/dist/vite.js +1 -1
  51. package/package.json +1 -1
  52. /package/dist/{chunk-QKSPPMVN.js → chunk-CDJQ7OPA.js} +0 -0
  53. /package/dist/{chunk-BN6TGHSB.cjs → chunk-SR5V7ZC2.cjs} +0 -0
package/dist/server.d.cts CHANGED
@@ -1,5 +1,6 @@
1
1
  import { z } from 'zod';
2
2
  import { PluginUserContext } from './frontend.cjs';
3
+ export { n as DECISION_CARD_FALLBACKS, D as DecisionCard, a as DecisionCardBlock, b as DecisionCardButton, c as DecisionCardButtonId, d as DecisionCardChoice, e as DecisionCardCommit, f as DecisionCardField, g as DecisionCardGroup, h as DecisionCardItem, i as DecisionCardItemResult, j as DecisionCardSource, k as DecisionCardState, l as DecisionItemStatus, m as decisionCardPath, o as isDecisionCardBlock, s as splitDecisionCardBlocks, p as stripDecisionCardFallback } from './decision-card-IF2c4wvM.cjs';
3
4
 
4
5
  /** Invitation requests never accept platform roles or tenant overrides. */
5
6
  declare const accountInviteSchema: z.ZodEffects<z.ZodObject<{
@@ -14,32 +15,32 @@ declare const accountInviteSchema: z.ZodEffects<z.ZodObject<{
14
15
  requestId: string;
15
16
  organizationName: string;
16
17
  email?: string | undefined;
17
- phone?: string | undefined;
18
18
  username?: string | undefined;
19
+ phone?: string | undefined;
19
20
  userId?: string | undefined;
20
21
  fullName?: string | undefined;
21
22
  }, {
22
23
  requestId: string;
23
24
  organizationName: string;
24
25
  email?: string | undefined;
25
- phone?: string | undefined;
26
26
  username?: string | undefined;
27
+ phone?: string | undefined;
27
28
  userId?: string | undefined;
28
29
  fullName?: string | undefined;
29
30
  }>, {
30
31
  requestId: string;
31
32
  organizationName: string;
32
33
  email?: string | undefined;
33
- phone?: string | undefined;
34
34
  username?: string | undefined;
35
+ phone?: string | undefined;
35
36
  userId?: string | undefined;
36
37
  fullName?: string | undefined;
37
38
  }, {
38
39
  requestId: string;
39
40
  organizationName: string;
40
41
  email?: string | undefined;
41
- phone?: string | undefined;
42
42
  username?: string | undefined;
43
+ phone?: string | undefined;
43
44
  userId?: string | undefined;
44
45
  fullName?: string | undefined;
45
46
  }>;
@@ -58,36 +59,36 @@ declare const accountProvisionSchema: z.ZodEffects<z.ZodObject<{
58
59
  requestId: string;
59
60
  organizationName: string;
60
61
  email?: string | undefined;
61
- phone?: string | undefined;
62
62
  password?: string | undefined;
63
63
  username?: string | undefined;
64
+ phone?: string | undefined;
64
65
  userId?: string | undefined;
65
66
  fullName?: string | undefined;
66
67
  }, {
67
68
  requestId: string;
68
69
  organizationName: string;
69
70
  email?: string | undefined;
70
- phone?: string | undefined;
71
71
  password?: string | undefined;
72
72
  username?: string | undefined;
73
+ phone?: string | undefined;
73
74
  userId?: string | undefined;
74
75
  fullName?: string | undefined;
75
76
  }>, {
76
77
  requestId: string;
77
78
  organizationName: string;
78
79
  email?: string | undefined;
79
- phone?: string | undefined;
80
80
  password?: string | undefined;
81
81
  username?: string | undefined;
82
+ phone?: string | undefined;
82
83
  userId?: string | undefined;
83
84
  fullName?: string | undefined;
84
85
  }, {
85
86
  requestId: string;
86
87
  organizationName: string;
87
88
  email?: string | undefined;
88
- phone?: string | undefined;
89
89
  password?: string | undefined;
90
90
  username?: string | undefined;
91
+ phone?: string | undefined;
91
92
  userId?: string | undefined;
92
93
  fullName?: string | undefined;
93
94
  }>;
@@ -444,13 +445,13 @@ declare const pluginCollectionEnsureSchema: z.ZodObject<{
444
445
  /** @deprecated Accepted for older clients; reads use ordinary knowledge ACL. */
445
446
  policyScope: z.ZodOptional<z.ZodString>;
446
447
  }, "strict", z.ZodTypeAny, {
447
- key: string;
448
448
  name: string;
449
+ key: string;
449
450
  accessMode?: "managed" | "private" | undefined;
450
451
  policyScope?: string | undefined;
451
452
  }, {
452
- key: string;
453
453
  name: string;
454
+ key: string;
454
455
  accessMode?: "managed" | "private" | undefined;
455
456
  policyScope?: string | undefined;
456
457
  }>;
@@ -461,23 +462,23 @@ declare const pluginCollectionPermissionsSchema: z.ZodObject<{
461
462
  subjectType: z.ZodEnum<["user", "team", "role", "tenant"]>;
462
463
  subjectId: z.ZodString;
463
464
  }, "strict", z.ZodTypeAny, {
464
- subjectType: "tenant" | "user" | "team" | "role";
465
+ subjectType: "user" | "team" | "tenant" | "role";
465
466
  subjectId: string;
466
467
  }, {
467
- subjectType: "tenant" | "user" | "team" | "role";
468
+ subjectType: "user" | "team" | "tenant" | "role";
468
469
  subjectId: string;
469
470
  }>, "many">;
470
471
  }, "strict", z.ZodTypeAny, {
471
472
  key: string;
472
473
  grants: {
473
- subjectType: "tenant" | "user" | "team" | "role";
474
+ subjectType: "user" | "team" | "tenant" | "role";
474
475
  subjectId: string;
475
476
  }[];
476
477
  syncRevision?: string | undefined;
477
478
  }, {
478
479
  key: string;
479
480
  grants: {
480
- subjectType: "tenant" | "user" | "team" | "role";
481
+ subjectType: "user" | "team" | "tenant" | "role";
481
482
  subjectId: string;
482
483
  }[];
483
484
  syncRevision?: string | undefined;
@@ -523,23 +524,23 @@ declare const pluginCollectionAccessSchema: z.ZodEffects<z.ZodObject<{
523
524
  /** Identity snapshot returned by access({enabled:false}); required to resume. */
524
525
  identityRevision: z.ZodOptional<z.ZodString>;
525
526
  }, "strict", z.ZodTypeAny, {
526
- key?: string | undefined;
527
527
  enabled?: boolean | undefined;
528
+ key?: string | undefined;
528
529
  syncRevision?: string | undefined;
529
530
  identityRevision?: string | undefined;
530
531
  }, {
531
- key?: string | undefined;
532
532
  enabled?: boolean | undefined;
533
+ key?: string | undefined;
533
534
  syncRevision?: string | undefined;
534
535
  identityRevision?: string | undefined;
535
536
  }>, {
536
- key?: string | undefined;
537
537
  enabled?: boolean | undefined;
538
+ key?: string | undefined;
538
539
  syncRevision?: string | undefined;
539
540
  identityRevision?: string | undefined;
540
541
  }, {
541
- key?: string | undefined;
542
542
  enabled?: boolean | undefined;
543
+ key?: string | undefined;
543
544
  syncRevision?: string | undefined;
544
545
  identityRevision?: string | undefined;
545
546
  }>;
@@ -552,31 +553,31 @@ declare const pluginCollectionImportSchema: z.ZodObject<{
552
553
  text: z.ZodString;
553
554
  metadata: z.ZodOptional<z.ZodEffects<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>, Record<string, string | number | boolean | null>, Record<string, string | number | boolean | null>>>;
554
555
  }, "strict", z.ZodTypeAny, {
555
- title: string;
556
556
  text: string;
557
+ title: string;
557
558
  externalId: string;
558
559
  metadata?: Record<string, string | number | boolean | null> | undefined;
559
560
  }, {
560
- title: string;
561
561
  text: string;
562
+ title: string;
562
563
  externalId: string;
563
564
  metadata?: Record<string, string | number | boolean | null> | undefined;
564
565
  }>, "many">, {
565
- title: string;
566
566
  text: string;
567
+ title: string;
567
568
  externalId: string;
568
569
  metadata?: Record<string, string | number | boolean | null> | undefined;
569
570
  }[], {
570
- title: string;
571
571
  text: string;
572
+ title: string;
572
573
  externalId: string;
573
574
  metadata?: Record<string, string | number | boolean | null> | undefined;
574
575
  }[]>;
575
576
  }, "strict", z.ZodTypeAny, {
576
577
  key: string;
577
578
  documents: {
578
- title: string;
579
579
  text: string;
580
+ title: string;
580
581
  externalId: string;
581
582
  metadata?: Record<string, string | number | boolean | null> | undefined;
582
583
  }[];
@@ -584,8 +585,8 @@ declare const pluginCollectionImportSchema: z.ZodObject<{
584
585
  }, {
585
586
  key: string;
586
587
  documents: {
587
- title: string;
588
588
  text: string;
589
+ title: string;
589
590
  externalId: string;
590
591
  metadata?: Record<string, string | number | boolean | null> | undefined;
591
592
  }[];
@@ -687,8 +688,8 @@ declare const pluginCollectionDocumentContentSchema: z.ZodObject<{
687
688
  page: z.ZodDefault<z.ZodNumber>;
688
689
  pageSize: z.ZodDefault<z.ZodNumber>;
689
690
  }, "strict", z.ZodTypeAny, {
690
- key: string;
691
691
  page: number;
692
+ key: string;
692
693
  externalId: string;
693
694
  pageSize: number;
694
695
  }, {
@@ -704,13 +705,13 @@ declare const pluginCollectionSearchSchema: z.ZodObject<{
704
705
  /** Equality per key; an array matches any of its values. */
705
706
  filter: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>, z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>, "many">]>>>;
706
707
  }, "strict", z.ZodTypeAny, {
707
- key: string;
708
708
  query: string;
709
+ key: string;
709
710
  topK: number;
710
711
  filter?: Record<string, string | number | boolean | (string | number | boolean | null)[] | null> | undefined;
711
712
  }, {
712
- key: string;
713
713
  query: string;
714
+ key: string;
714
715
  filter?: Record<string, string | number | boolean | (string | number | boolean | null)[] | null> | undefined;
715
716
  topK?: number | undefined;
716
717
  }>;
@@ -888,39 +889,39 @@ declare const pluginKnowledgeBaseInputSchema: z.ZodObject<{
888
889
  expiresAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
889
890
  }, "strict", z.ZodTypeAny, {
890
891
  permission: "view" | "manage" | "use" | "operate";
891
- subjectType: "tenant" | "user" | "team" | "role";
892
+ subjectType: "user" | "team" | "tenant" | "role";
892
893
  subjectId: string;
893
894
  expiresAt?: string | null | undefined;
894
895
  }, {
895
896
  permission: "view" | "manage" | "use" | "operate";
896
- subjectType: "tenant" | "user" | "team" | "role";
897
+ subjectType: "user" | "team" | "tenant" | "role";
897
898
  subjectId: string;
898
899
  expiresAt?: string | null | undefined;
899
900
  }>, "many">;
900
901
  idempotencyKey: z.ZodString;
901
902
  }, "strict", z.ZodTypeAny, {
903
+ name: string;
902
904
  scope: {
903
905
  type: "team";
904
906
  teamId: string;
905
907
  };
906
- name: string;
907
908
  grants: {
908
909
  permission: "view" | "manage" | "use" | "operate";
909
- subjectType: "tenant" | "user" | "team" | "role";
910
+ subjectType: "user" | "team" | "tenant" | "role";
910
911
  subjectId: string;
911
912
  expiresAt?: string | null | undefined;
912
913
  }[];
913
914
  idempotencyKey: string;
914
915
  description?: string | undefined;
915
916
  }, {
917
+ name: string;
916
918
  scope: {
917
919
  type: "team";
918
920
  teamId: string;
919
921
  };
920
- name: string;
921
922
  grants: {
922
923
  permission: "view" | "manage" | "use" | "operate";
923
- subjectType: "tenant" | "user" | "team" | "role";
924
+ subjectType: "user" | "team" | "tenant" | "role";
924
925
  subjectId: string;
925
926
  expiresAt?: string | null | undefined;
926
927
  }[];
@@ -1548,6 +1549,25 @@ interface PluginHostApi {
1548
1549
  }): Promise<{
1549
1550
  source: unknown;
1550
1551
  }>;
1552
+ /**
1553
+ * Host API 1.39, requires `messages.latest_user`. The person's newest message in a
1554
+ * topic shared with this employee. `origin` is written by the host: `typed` or
1555
+ * `voice` are the person's own words; anything else, or null, is not. A long message
1556
+ * comes back with empty `content`: an answer is short, and this does not read history.
1557
+ */
1558
+ latestUserMessage(input: {
1559
+ topicId: string;
1560
+ userId: string;
1561
+ avatarId: string;
1562
+ }): Promise<{
1563
+ message: {
1564
+ id: string;
1565
+ topicId: string;
1566
+ origin: string | null;
1567
+ content: string;
1568
+ createdAt: string;
1569
+ } | null;
1570
+ }>;
1551
1571
  };
1552
1572
  /**
1553
1573
  * A person's live work delegations, as the host holds them.
@@ -1678,6 +1698,11 @@ interface PluginAttentionReceipt {
1678
1698
  }
1679
1699
  interface PluginAttentionStatus {
1680
1700
  itemId: string;
1701
+ /**
1702
+ * Host API 1.40. Who actually holds it: a person away may have named a delegate, and
1703
+ * the host then sends a colleague's request to them instead of who was asked.
1704
+ */
1705
+ recipientUserId?: string;
1681
1706
  state: 'pending' | 'seen' | 'answered' | 'declined' | 'expired' | 'cancelled';
1682
1707
  recordRef: string | null;
1683
1708
  response: {
package/dist/server.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  import { z } from 'zod';
2
2
  import { PluginUserContext } from './frontend.js';
3
+ export { n as DECISION_CARD_FALLBACKS, D as DecisionCard, a as DecisionCardBlock, b as DecisionCardButton, c as DecisionCardButtonId, d as DecisionCardChoice, e as DecisionCardCommit, f as DecisionCardField, g as DecisionCardGroup, h as DecisionCardItem, i as DecisionCardItemResult, j as DecisionCardSource, k as DecisionCardState, l as DecisionItemStatus, m as decisionCardPath, o as isDecisionCardBlock, s as splitDecisionCardBlocks, p as stripDecisionCardFallback } from './decision-card-IF2c4wvM.js';
3
4
 
4
5
  /** Invitation requests never accept platform roles or tenant overrides. */
5
6
  declare const accountInviteSchema: z.ZodEffects<z.ZodObject<{
@@ -14,32 +15,32 @@ declare const accountInviteSchema: z.ZodEffects<z.ZodObject<{
14
15
  requestId: string;
15
16
  organizationName: string;
16
17
  email?: string | undefined;
17
- phone?: string | undefined;
18
18
  username?: string | undefined;
19
+ phone?: string | undefined;
19
20
  userId?: string | undefined;
20
21
  fullName?: string | undefined;
21
22
  }, {
22
23
  requestId: string;
23
24
  organizationName: string;
24
25
  email?: string | undefined;
25
- phone?: string | undefined;
26
26
  username?: string | undefined;
27
+ phone?: string | undefined;
27
28
  userId?: string | undefined;
28
29
  fullName?: string | undefined;
29
30
  }>, {
30
31
  requestId: string;
31
32
  organizationName: string;
32
33
  email?: string | undefined;
33
- phone?: string | undefined;
34
34
  username?: string | undefined;
35
+ phone?: string | undefined;
35
36
  userId?: string | undefined;
36
37
  fullName?: string | undefined;
37
38
  }, {
38
39
  requestId: string;
39
40
  organizationName: string;
40
41
  email?: string | undefined;
41
- phone?: string | undefined;
42
42
  username?: string | undefined;
43
+ phone?: string | undefined;
43
44
  userId?: string | undefined;
44
45
  fullName?: string | undefined;
45
46
  }>;
@@ -58,36 +59,36 @@ declare const accountProvisionSchema: z.ZodEffects<z.ZodObject<{
58
59
  requestId: string;
59
60
  organizationName: string;
60
61
  email?: string | undefined;
61
- phone?: string | undefined;
62
62
  password?: string | undefined;
63
63
  username?: string | undefined;
64
+ phone?: string | undefined;
64
65
  userId?: string | undefined;
65
66
  fullName?: string | undefined;
66
67
  }, {
67
68
  requestId: string;
68
69
  organizationName: string;
69
70
  email?: string | undefined;
70
- phone?: string | undefined;
71
71
  password?: string | undefined;
72
72
  username?: string | undefined;
73
+ phone?: string | undefined;
73
74
  userId?: string | undefined;
74
75
  fullName?: string | undefined;
75
76
  }>, {
76
77
  requestId: string;
77
78
  organizationName: string;
78
79
  email?: string | undefined;
79
- phone?: string | undefined;
80
80
  password?: string | undefined;
81
81
  username?: string | undefined;
82
+ phone?: string | undefined;
82
83
  userId?: string | undefined;
83
84
  fullName?: string | undefined;
84
85
  }, {
85
86
  requestId: string;
86
87
  organizationName: string;
87
88
  email?: string | undefined;
88
- phone?: string | undefined;
89
89
  password?: string | undefined;
90
90
  username?: string | undefined;
91
+ phone?: string | undefined;
91
92
  userId?: string | undefined;
92
93
  fullName?: string | undefined;
93
94
  }>;
@@ -444,13 +445,13 @@ declare const pluginCollectionEnsureSchema: z.ZodObject<{
444
445
  /** @deprecated Accepted for older clients; reads use ordinary knowledge ACL. */
445
446
  policyScope: z.ZodOptional<z.ZodString>;
446
447
  }, "strict", z.ZodTypeAny, {
447
- key: string;
448
448
  name: string;
449
+ key: string;
449
450
  accessMode?: "managed" | "private" | undefined;
450
451
  policyScope?: string | undefined;
451
452
  }, {
452
- key: string;
453
453
  name: string;
454
+ key: string;
454
455
  accessMode?: "managed" | "private" | undefined;
455
456
  policyScope?: string | undefined;
456
457
  }>;
@@ -461,23 +462,23 @@ declare const pluginCollectionPermissionsSchema: z.ZodObject<{
461
462
  subjectType: z.ZodEnum<["user", "team", "role", "tenant"]>;
462
463
  subjectId: z.ZodString;
463
464
  }, "strict", z.ZodTypeAny, {
464
- subjectType: "tenant" | "user" | "team" | "role";
465
+ subjectType: "user" | "team" | "tenant" | "role";
465
466
  subjectId: string;
466
467
  }, {
467
- subjectType: "tenant" | "user" | "team" | "role";
468
+ subjectType: "user" | "team" | "tenant" | "role";
468
469
  subjectId: string;
469
470
  }>, "many">;
470
471
  }, "strict", z.ZodTypeAny, {
471
472
  key: string;
472
473
  grants: {
473
- subjectType: "tenant" | "user" | "team" | "role";
474
+ subjectType: "user" | "team" | "tenant" | "role";
474
475
  subjectId: string;
475
476
  }[];
476
477
  syncRevision?: string | undefined;
477
478
  }, {
478
479
  key: string;
479
480
  grants: {
480
- subjectType: "tenant" | "user" | "team" | "role";
481
+ subjectType: "user" | "team" | "tenant" | "role";
481
482
  subjectId: string;
482
483
  }[];
483
484
  syncRevision?: string | undefined;
@@ -523,23 +524,23 @@ declare const pluginCollectionAccessSchema: z.ZodEffects<z.ZodObject<{
523
524
  /** Identity snapshot returned by access({enabled:false}); required to resume. */
524
525
  identityRevision: z.ZodOptional<z.ZodString>;
525
526
  }, "strict", z.ZodTypeAny, {
526
- key?: string | undefined;
527
527
  enabled?: boolean | undefined;
528
+ key?: string | undefined;
528
529
  syncRevision?: string | undefined;
529
530
  identityRevision?: string | undefined;
530
531
  }, {
531
- key?: string | undefined;
532
532
  enabled?: boolean | undefined;
533
+ key?: string | undefined;
533
534
  syncRevision?: string | undefined;
534
535
  identityRevision?: string | undefined;
535
536
  }>, {
536
- key?: string | undefined;
537
537
  enabled?: boolean | undefined;
538
+ key?: string | undefined;
538
539
  syncRevision?: string | undefined;
539
540
  identityRevision?: string | undefined;
540
541
  }, {
541
- key?: string | undefined;
542
542
  enabled?: boolean | undefined;
543
+ key?: string | undefined;
543
544
  syncRevision?: string | undefined;
544
545
  identityRevision?: string | undefined;
545
546
  }>;
@@ -552,31 +553,31 @@ declare const pluginCollectionImportSchema: z.ZodObject<{
552
553
  text: z.ZodString;
553
554
  metadata: z.ZodOptional<z.ZodEffects<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>, Record<string, string | number | boolean | null>, Record<string, string | number | boolean | null>>>;
554
555
  }, "strict", z.ZodTypeAny, {
555
- title: string;
556
556
  text: string;
557
+ title: string;
557
558
  externalId: string;
558
559
  metadata?: Record<string, string | number | boolean | null> | undefined;
559
560
  }, {
560
- title: string;
561
561
  text: string;
562
+ title: string;
562
563
  externalId: string;
563
564
  metadata?: Record<string, string | number | boolean | null> | undefined;
564
565
  }>, "many">, {
565
- title: string;
566
566
  text: string;
567
+ title: string;
567
568
  externalId: string;
568
569
  metadata?: Record<string, string | number | boolean | null> | undefined;
569
570
  }[], {
570
- title: string;
571
571
  text: string;
572
+ title: string;
572
573
  externalId: string;
573
574
  metadata?: Record<string, string | number | boolean | null> | undefined;
574
575
  }[]>;
575
576
  }, "strict", z.ZodTypeAny, {
576
577
  key: string;
577
578
  documents: {
578
- title: string;
579
579
  text: string;
580
+ title: string;
580
581
  externalId: string;
581
582
  metadata?: Record<string, string | number | boolean | null> | undefined;
582
583
  }[];
@@ -584,8 +585,8 @@ declare const pluginCollectionImportSchema: z.ZodObject<{
584
585
  }, {
585
586
  key: string;
586
587
  documents: {
587
- title: string;
588
588
  text: string;
589
+ title: string;
589
590
  externalId: string;
590
591
  metadata?: Record<string, string | number | boolean | null> | undefined;
591
592
  }[];
@@ -687,8 +688,8 @@ declare const pluginCollectionDocumentContentSchema: z.ZodObject<{
687
688
  page: z.ZodDefault<z.ZodNumber>;
688
689
  pageSize: z.ZodDefault<z.ZodNumber>;
689
690
  }, "strict", z.ZodTypeAny, {
690
- key: string;
691
691
  page: number;
692
+ key: string;
692
693
  externalId: string;
693
694
  pageSize: number;
694
695
  }, {
@@ -704,13 +705,13 @@ declare const pluginCollectionSearchSchema: z.ZodObject<{
704
705
  /** Equality per key; an array matches any of its values. */
705
706
  filter: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>, z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>, "many">]>>>;
706
707
  }, "strict", z.ZodTypeAny, {
707
- key: string;
708
708
  query: string;
709
+ key: string;
709
710
  topK: number;
710
711
  filter?: Record<string, string | number | boolean | (string | number | boolean | null)[] | null> | undefined;
711
712
  }, {
712
- key: string;
713
713
  query: string;
714
+ key: string;
714
715
  filter?: Record<string, string | number | boolean | (string | number | boolean | null)[] | null> | undefined;
715
716
  topK?: number | undefined;
716
717
  }>;
@@ -888,39 +889,39 @@ declare const pluginKnowledgeBaseInputSchema: z.ZodObject<{
888
889
  expiresAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
889
890
  }, "strict", z.ZodTypeAny, {
890
891
  permission: "view" | "manage" | "use" | "operate";
891
- subjectType: "tenant" | "user" | "team" | "role";
892
+ subjectType: "user" | "team" | "tenant" | "role";
892
893
  subjectId: string;
893
894
  expiresAt?: string | null | undefined;
894
895
  }, {
895
896
  permission: "view" | "manage" | "use" | "operate";
896
- subjectType: "tenant" | "user" | "team" | "role";
897
+ subjectType: "user" | "team" | "tenant" | "role";
897
898
  subjectId: string;
898
899
  expiresAt?: string | null | undefined;
899
900
  }>, "many">;
900
901
  idempotencyKey: z.ZodString;
901
902
  }, "strict", z.ZodTypeAny, {
903
+ name: string;
902
904
  scope: {
903
905
  type: "team";
904
906
  teamId: string;
905
907
  };
906
- name: string;
907
908
  grants: {
908
909
  permission: "view" | "manage" | "use" | "operate";
909
- subjectType: "tenant" | "user" | "team" | "role";
910
+ subjectType: "user" | "team" | "tenant" | "role";
910
911
  subjectId: string;
911
912
  expiresAt?: string | null | undefined;
912
913
  }[];
913
914
  idempotencyKey: string;
914
915
  description?: string | undefined;
915
916
  }, {
917
+ name: string;
916
918
  scope: {
917
919
  type: "team";
918
920
  teamId: string;
919
921
  };
920
- name: string;
921
922
  grants: {
922
923
  permission: "view" | "manage" | "use" | "operate";
923
- subjectType: "tenant" | "user" | "team" | "role";
924
+ subjectType: "user" | "team" | "tenant" | "role";
924
925
  subjectId: string;
925
926
  expiresAt?: string | null | undefined;
926
927
  }[];
@@ -1548,6 +1549,25 @@ interface PluginHostApi {
1548
1549
  }): Promise<{
1549
1550
  source: unknown;
1550
1551
  }>;
1552
+ /**
1553
+ * Host API 1.39, requires `messages.latest_user`. The person's newest message in a
1554
+ * topic shared with this employee. `origin` is written by the host: `typed` or
1555
+ * `voice` are the person's own words; anything else, or null, is not. A long message
1556
+ * comes back with empty `content`: an answer is short, and this does not read history.
1557
+ */
1558
+ latestUserMessage(input: {
1559
+ topicId: string;
1560
+ userId: string;
1561
+ avatarId: string;
1562
+ }): Promise<{
1563
+ message: {
1564
+ id: string;
1565
+ topicId: string;
1566
+ origin: string | null;
1567
+ content: string;
1568
+ createdAt: string;
1569
+ } | null;
1570
+ }>;
1551
1571
  };
1552
1572
  /**
1553
1573
  * A person's live work delegations, as the host holds them.
@@ -1678,6 +1698,11 @@ interface PluginAttentionReceipt {
1678
1698
  }
1679
1699
  interface PluginAttentionStatus {
1680
1700
  itemId: string;
1701
+ /**
1702
+ * Host API 1.40. Who actually holds it: a person away may have named a delegate, and
1703
+ * the host then sends a colleague's request to them instead of who was asked.
1704
+ */
1705
+ recipientUserId?: string;
1681
1706
  state: 'pending' | 'seen' | 'answered' | 'declined' | 'expired' | 'cancelled';
1682
1707
  recordRef: string | null;
1683
1708
  response: {
package/dist/server.js CHANGED
@@ -1 +1 @@
1
- export{PLUGIN_COLLECTION_CONTENT_PAGE_MAX,PLUGIN_COLLECTION_IMPORT_MAX,PLUGIN_CONTEXT_HEADERS,accountInvitationSchema,accountInviteSchema,accountPasswordResetSchema,accountProvisionSchema,definePluginBackend,directoryIdentitySchema,directoryListSchema,directoryMatchSchema,directoryPrincipalSchema,directoryValidateSchema,pluginAdminActionSchema,pluginAdminProofSchema,pluginApprovalDigestSchema,pluginApprovedSchema,pluginCollectionAccessSchema,pluginCollectionDeleteSchema,pluginCollectionDocumentContentSchema,pluginCollectionDocumentsStatusSchema,pluginCollectionEnsureSchema,pluginCollectionImportFilesSchema,pluginCollectionImportSchema,pluginCollectionMoveSchema,pluginCollectionPermissionsSchema,pluginCollectionRemoveSchema,pluginCollectionSearchSchema,pluginCollectionStatusSchema,pluginDiagramSchema,pluginDocumentBatchInputSchema,pluginDocumentBatchItemSchema,pluginDocumentContentInputSchema,pluginKnowledgeBaseInputSchema,pluginKnowledgeListInputSchema,pluginKnowledgeReferenceSchema,pluginKnowledgeVerifySchema}from"./chunk-QKSPPMVN.js";
1
+ export{PLUGIN_COLLECTION_CONTENT_PAGE_MAX,PLUGIN_COLLECTION_IMPORT_MAX,PLUGIN_CONTEXT_HEADERS,accountInvitationSchema,accountInviteSchema,accountPasswordResetSchema,accountProvisionSchema,definePluginBackend,directoryIdentitySchema,directoryListSchema,directoryMatchSchema,directoryPrincipalSchema,directoryValidateSchema,pluginAdminActionSchema,pluginAdminProofSchema,pluginApprovalDigestSchema,pluginApprovedSchema,pluginCollectionAccessSchema,pluginCollectionDeleteSchema,pluginCollectionDocumentContentSchema,pluginCollectionDocumentsStatusSchema,pluginCollectionEnsureSchema,pluginCollectionImportFilesSchema,pluginCollectionImportSchema,pluginCollectionMoveSchema,pluginCollectionPermissionsSchema,pluginCollectionRemoveSchema,pluginCollectionSearchSchema,pluginCollectionStatusSchema,pluginDiagramSchema,pluginDocumentBatchInputSchema,pluginDocumentBatchItemSchema,pluginDocumentContentInputSchema,pluginKnowledgeBaseInputSchema,pluginKnowledgeListInputSchema,pluginKnowledgeReferenceSchema,pluginKnowledgeVerifySchema}from"./chunk-CDJQ7OPA.js";export{DECISION_CARD_FALLBACKS,decisionCardPath,isDecisionCardBlock,splitDecisionCardBlocks,stripDecisionCardFallback}from"./chunk-JV2G2Z33.js";
@@ -1,6 +1,7 @@
1
1
  import { PluginHostApi } from './server.cjs';
2
2
  import 'zod';
3
3
  import './frontend.cjs';
4
+ import './decision-card-IF2c4wvM.cjs';
4
5
 
5
6
  /**
6
7
  * Test helpers for a plugin's backend part.
package/dist/testing.d.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  import { PluginHostApi } from './server.js';
2
2
  import 'zod';
3
3
  import './frontend.js';
4
+ import './decision-card-IF2c4wvM.js';
4
5
 
5
6
  /**
6
7
  * Test helpers for a plugin's backend part.
package/dist/vite.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";var n=Object.defineProperty;var e=(t,r)=>n(t,"name",{value:r,configurable:!0});var chunkHZ4YWRYX_cjs=require("./chunk-HZ4YWRYX.cjs");require("./chunk-6HNG5OZI.cjs"),Object.defineProperty(exports,"TEGO_PLUGIN_DEV_OVERRIDES",{enumerable:!0,get:e(function(){return chunkHZ4YWRYX_cjs.TEGO_PLUGIN_DEV_OVERRIDES},"get")}),Object.defineProperty(exports,"scopeRootForm",{enumerable:!0,get:e(function(){return chunkHZ4YWRYX_cjs.scopeRootForm},"get")}),Object.defineProperty(exports,"tegoPluginFrontend",{enumerable:!0,get:e(function(){return chunkHZ4YWRYX_cjs.tegoPluginFrontend},"get")}),Object.defineProperty(exports,"tegoPluginScopeRoot",{enumerable:!0,get:e(function(){return chunkHZ4YWRYX_cjs.tegoPluginScopeRoot},"get")}),Object.defineProperty(exports,"tegoPluginTailwind",{enumerable:!0,get:e(function(){return chunkHZ4YWRYX_cjs.tegoPluginTailwind},"get")});
1
+ "use strict";var n=Object.defineProperty;var e=(t,r)=>n(t,"name",{value:r,configurable:!0});var chunk6EKQMOYT_cjs=require("./chunk-6EKQMOYT.cjs");require("./chunk-IOZFHJ4F.cjs"),Object.defineProperty(exports,"TEGO_PLUGIN_DEV_OVERRIDES",{enumerable:!0,get:e(function(){return chunk6EKQMOYT_cjs.TEGO_PLUGIN_DEV_OVERRIDES},"get")}),Object.defineProperty(exports,"scopeRootForm",{enumerable:!0,get:e(function(){return chunk6EKQMOYT_cjs.scopeRootForm},"get")}),Object.defineProperty(exports,"tegoPluginFrontend",{enumerable:!0,get:e(function(){return chunk6EKQMOYT_cjs.tegoPluginFrontend},"get")}),Object.defineProperty(exports,"tegoPluginScopeRoot",{enumerable:!0,get:e(function(){return chunk6EKQMOYT_cjs.tegoPluginScopeRoot},"get")}),Object.defineProperty(exports,"tegoPluginTailwind",{enumerable:!0,get:e(function(){return chunk6EKQMOYT_cjs.tegoPluginTailwind},"get")});
package/dist/vite.js CHANGED
@@ -1 +1 @@
1
- export{TEGO_PLUGIN_DEV_OVERRIDES,scopeRootForm,tegoPluginFrontend,tegoPluginScopeRoot,tegoPluginTailwind}from"./chunk-I5Z3ECC4.js";import"./chunk-56QOZQTY.js";
1
+ export{TEGO_PLUGIN_DEV_OVERRIDES,scopeRootForm,tegoPluginFrontend,tegoPluginScopeRoot,tegoPluginTailwind}from"./chunk-44LPR67H.js";import"./chunk-XOXUS4VI.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zhama/tego-plugin-sdk",
3
- "version": "1.37.2",
3
+ "version": "1.40.1",
4
4
  "type": "module",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.js",
File without changes
File without changes