@zhama/tego-plugin-sdk 1.37.1 → 1.40.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 (71) hide show
  1. package/README.md +48 -9
  2. package/agent/RULES.md +34 -11
  3. package/agent/guides/agent-templates.md +51 -0
  4. package/agent/guides/backend.md +8 -0
  5. package/agent/guides/host-api-versions.md +3 -0
  6. package/agent/reference/plugin-sdk-api.md +1 -0
  7. package/agent/rules.json +500 -0
  8. package/agent/skills/add-agent-template/SKILL.md +19 -0
  9. package/agent/skills/add-claw-tool/SKILL.md +21 -0
  10. package/agent/skills/add-i18n-strings/SKILL.md +19 -0
  11. package/agent/skills/add-migration/SKILL.md +22 -0
  12. package/agent/skills/add-route-with-access/SKILL.md +30 -0
  13. package/agent/skills/add-screen/SKILL.md +27 -0
  14. package/bin/tego-plugin.mjs +7 -3
  15. package/dist/access.d.cts +1 -0
  16. package/dist/access.d.ts +1 -0
  17. package/dist/{chunk-EIVA5BR6.js → chunk-2KXEYXM2.js} +1 -1
  18. package/dist/{chunk-I5Z3ECC4.js → chunk-44LPR67H.js} +1 -1
  19. package/dist/chunk-66LDWN4T.cjs +1 -0
  20. package/dist/{chunk-HZ4YWRYX.cjs → chunk-6EKQMOYT.cjs} +2 -2
  21. package/dist/{chunk-SKNPNPJP.cjs → chunk-H6GXDFLP.cjs} +1 -1
  22. package/dist/{chunk-6HNG5OZI.cjs → chunk-IOZFHJ4F.cjs} +1 -1
  23. package/dist/chunk-JV2G2Z33.js +1 -0
  24. package/dist/{chunk-4LKRXDYY.cjs → chunk-QQOUNXLC.cjs} +8 -8
  25. package/dist/{chunk-FCYAAOHC.js → chunk-UZBWS5AR.js} +2 -2
  26. package/dist/{chunk-56QOZQTY.js → chunk-XOXUS4VI.js} +1 -1
  27. package/dist/decision-card-IF2c4wvM.d.cts +161 -0
  28. package/dist/decision-card-IF2c4wvM.d.ts +161 -0
  29. package/dist/dev.cjs +8 -3
  30. package/dist/dev.d.cts +33 -2
  31. package/dist/dev.d.ts +33 -2
  32. package/dist/dev.js +13 -8
  33. package/dist/doctor.cjs +15 -8
  34. package/dist/doctor.d.cts +99 -2
  35. package/dist/doctor.d.ts +99 -2
  36. package/dist/doctor.js +15 -8
  37. package/dist/eslint.cjs +1 -0
  38. package/dist/eslint.d.cts +29 -0
  39. package/dist/eslint.d.ts +29 -0
  40. package/dist/eslint.js +1 -0
  41. package/dist/hono.d.cts +1 -0
  42. package/dist/hono.d.ts +1 -0
  43. package/dist/index.cjs +1 -1
  44. package/dist/index.d.cts +14 -1
  45. package/dist/index.d.ts +14 -1
  46. package/dist/index.js +1 -1
  47. package/dist/manifest.cjs +1 -1
  48. package/dist/manifest.js +1 -1
  49. package/dist/pack.cjs +1 -1
  50. package/dist/pack.d.cts +5 -0
  51. package/dist/pack.d.ts +5 -0
  52. package/dist/pack.js +1 -1
  53. package/dist/publish.cjs +1 -1
  54. package/dist/publish.js +1 -1
  55. package/dist/scaffold.cjs +53 -8
  56. package/dist/scaffold.js +59 -14
  57. package/dist/server-runtime.cjs +1 -1
  58. package/dist/server-runtime.d.cts +1 -0
  59. package/dist/server-runtime.d.ts +1 -0
  60. package/dist/server-runtime.js +1 -1
  61. package/dist/server.cjs +1 -1
  62. package/dist/server.d.cts +25 -0
  63. package/dist/server.d.ts +25 -0
  64. package/dist/server.js +1 -1
  65. package/dist/testing.d.cts +1 -0
  66. package/dist/testing.d.ts +1 -0
  67. package/dist/vite.cjs +1 -1
  68. package/dist/vite.js +1 -1
  69. package/package.json +8 -1
  70. /package/dist/{chunk-QKSPPMVN.js → chunk-CDJQ7OPA.js} +0 -0
  71. /package/dist/{chunk-BN6TGHSB.cjs → chunk-SR5V7ZC2.cjs} +0 -0
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<{
@@ -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.1",
3
+ "version": "1.40.0",
4
4
  "type": "module",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.js",
@@ -125,6 +125,13 @@
125
125
  "import": "./dist/doctor.js",
126
126
  "default": "./dist/doctor.js"
127
127
  },
128
+ "./eslint": {
129
+ "types": "./dist/eslint.d.ts",
130
+ "import": "./dist/eslint.js",
131
+ "require": "./dist/eslint.cjs",
132
+ "default": "./dist/eslint.js"
133
+ },
134
+ "./agent/rules.json": "./agent/rules.json",
128
135
  "./dev": {
129
136
  "types": "./dist/dev.d.ts",
130
137
  "import": "./dist/dev.js",
File without changes
File without changes