@zhama/tego-plugin-sdk 1.36.1 → 1.36.2

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.
@@ -624,4 +624,4 @@ interface ResolvedPluginParts {
624
624
  */
625
625
  declare function resolvePluginParts(manifest: TegoPluginManifest): ResolvedPluginParts;
626
626
 
627
- export { resolvePluginParts as $, type PluginConfigDeclaration as A, type PluginConfigFieldSchema as B, CLAW_MANIFEST_FILENAME as C, type PluginConfigFieldType as D, EMPTY_CONFIG_SECTION_SUMMARY as E, type PluginConfigSchema as F, type PluginConfigUiHint as G, type PluginFrontendPart as H, type PluginParts as I, type PluginPermissions as J, type PluginPublicFrontendPart as K, type LocalizedText as L, type PluginPublicRouteMethod as M, type PluginSchemaRepair as N, type PluginWorkDelegationDeclaration as O, type PluginPublicRoute as P, type ResolvedClawPart as Q, type ResolvedBackendPart as R, type ResolvedFrontendPart as S, type TegoPluginManifest as T, type ResolvedPluginParts as U, type ResolvedPublicFrontendPart as V, applyConfigDefaults as W, configFieldLabel as X, declaredPartNames as Y, redactSecrets as Z, resolvePluginDeclares as _, type PluginBackendRuntime as a, resolvePluginScope as a0, restoreSecrets as a1, summarizeClawConfig as a2, summarizeConfigDeclaration as a3, type PluginScope as b, type PluginPartName as c, type PluginDeclares as d, type PluginConfigSection as e, type PluginConfigSectionSummary as f, type PluginNavIcon as g, type PluginNavEntry as h, type PluginAgentReadinessDeclaration as i, PLUGIN_BACKEND_PLATFORMS as j, PLUGIN_BACKEND_RUNTIMES as k, PLUGIN_CONFIG_SECRET_SENTINEL as l, PLUGIN_CONFIG_SECTIONS as m, PLUGIN_MANIFEST_FILENAME as n, PLUGIN_NAV_ICONS as o, PLUGIN_NAV_ICON_FALLBACK as p, PLUGIN_PART_DEFAULTS as q, PLUGIN_PART_NAMES as r, type PluginAgentReadinessItem as s, type PluginAgentReadinessResponse as t, type PluginAuditDeclarations as u, type PluginAuditToolDeclaration as v, type PluginBackendLimits as w, type PluginBackendPart as x, type PluginBackendPlatform as y, type PluginClawPart as z };
627
+ export { resolvePluginParts as $, type PluginConfigDeclaration as A, type PluginConfigFieldSchema as B, CLAW_MANIFEST_FILENAME as C, type PluginConfigFieldType as D, EMPTY_CONFIG_SECTION_SUMMARY as E, type PluginConfigSchema as F, type PluginConfigUiHint as G, type PluginFrontendPart as H, type PluginParts as I, type PluginPermissions as J, type PluginPublicFrontendPart as K, type LocalizedText as L, type PluginPublicRouteMethod as M, type PluginSchemaRepair as N, type PluginWorkDelegationDeclaration as O, type PluginNavEntry as P, type ResolvedClawPart as Q, type ResolvedBackendPart as R, type ResolvedFrontendPart as S, type TegoPluginManifest as T, type ResolvedPluginParts as U, type ResolvedPublicFrontendPart as V, applyConfigDefaults as W, configFieldLabel as X, declaredPartNames as Y, redactSecrets as Z, resolvePluginDeclares as _, type PluginPublicRoute as a, resolvePluginScope as a0, restoreSecrets as a1, summarizeClawConfig as a2, summarizeConfigDeclaration as a3, type PluginBackendRuntime as b, type PluginScope as c, type PluginPartName as d, type PluginDeclares as e, type PluginConfigSection as f, type PluginConfigSectionSummary as g, type PluginNavIcon as h, type PluginAgentReadinessDeclaration as i, PLUGIN_BACKEND_PLATFORMS as j, PLUGIN_BACKEND_RUNTIMES as k, PLUGIN_CONFIG_SECRET_SENTINEL as l, PLUGIN_CONFIG_SECTIONS as m, PLUGIN_MANIFEST_FILENAME as n, PLUGIN_NAV_ICONS as o, PLUGIN_NAV_ICON_FALLBACK as p, PLUGIN_PART_DEFAULTS as q, PLUGIN_PART_NAMES as r, type PluginAgentReadinessItem as s, type PluginAgentReadinessResponse as t, type PluginAuditDeclarations as u, type PluginAuditToolDeclaration as v, type PluginBackendLimits as w, type PluginBackendPart as x, type PluginBackendPlatform as y, type PluginClawPart as z };
@@ -624,4 +624,4 @@ interface ResolvedPluginParts {
624
624
  */
625
625
  declare function resolvePluginParts(manifest: TegoPluginManifest): ResolvedPluginParts;
626
626
 
627
- export { resolvePluginParts as $, type PluginConfigDeclaration as A, type PluginConfigFieldSchema as B, CLAW_MANIFEST_FILENAME as C, type PluginConfigFieldType as D, EMPTY_CONFIG_SECTION_SUMMARY as E, type PluginConfigSchema as F, type PluginConfigUiHint as G, type PluginFrontendPart as H, type PluginParts as I, type PluginPermissions as J, type PluginPublicFrontendPart as K, type LocalizedText as L, type PluginPublicRouteMethod as M, type PluginSchemaRepair as N, type PluginWorkDelegationDeclaration as O, type PluginPublicRoute as P, type ResolvedClawPart as Q, type ResolvedBackendPart as R, type ResolvedFrontendPart as S, type TegoPluginManifest as T, type ResolvedPluginParts as U, type ResolvedPublicFrontendPart as V, applyConfigDefaults as W, configFieldLabel as X, declaredPartNames as Y, redactSecrets as Z, resolvePluginDeclares as _, type PluginBackendRuntime as a, resolvePluginScope as a0, restoreSecrets as a1, summarizeClawConfig as a2, summarizeConfigDeclaration as a3, type PluginScope as b, type PluginPartName as c, type PluginDeclares as d, type PluginConfigSection as e, type PluginConfigSectionSummary as f, type PluginNavIcon as g, type PluginNavEntry as h, type PluginAgentReadinessDeclaration as i, PLUGIN_BACKEND_PLATFORMS as j, PLUGIN_BACKEND_RUNTIMES as k, PLUGIN_CONFIG_SECRET_SENTINEL as l, PLUGIN_CONFIG_SECTIONS as m, PLUGIN_MANIFEST_FILENAME as n, PLUGIN_NAV_ICONS as o, PLUGIN_NAV_ICON_FALLBACK as p, PLUGIN_PART_DEFAULTS as q, PLUGIN_PART_NAMES as r, type PluginAgentReadinessItem as s, type PluginAgentReadinessResponse as t, type PluginAuditDeclarations as u, type PluginAuditToolDeclaration as v, type PluginBackendLimits as w, type PluginBackendPart as x, type PluginBackendPlatform as y, type PluginClawPart as z };
627
+ export { resolvePluginParts as $, type PluginConfigDeclaration as A, type PluginConfigFieldSchema as B, CLAW_MANIFEST_FILENAME as C, type PluginConfigFieldType as D, EMPTY_CONFIG_SECTION_SUMMARY as E, type PluginConfigSchema as F, type PluginConfigUiHint as G, type PluginFrontendPart as H, type PluginParts as I, type PluginPermissions as J, type PluginPublicFrontendPart as K, type LocalizedText as L, type PluginPublicRouteMethod as M, type PluginSchemaRepair as N, type PluginWorkDelegationDeclaration as O, type PluginNavEntry as P, type ResolvedClawPart as Q, type ResolvedBackendPart as R, type ResolvedFrontendPart as S, type TegoPluginManifest as T, type ResolvedPluginParts as U, type ResolvedPublicFrontendPart as V, applyConfigDefaults as W, configFieldLabel as X, declaredPartNames as Y, redactSecrets as Z, resolvePluginDeclares as _, type PluginPublicRoute as a, resolvePluginScope as a0, restoreSecrets as a1, summarizeClawConfig as a2, summarizeConfigDeclaration as a3, type PluginBackendRuntime as b, type PluginScope as c, type PluginPartName as d, type PluginDeclares as e, type PluginConfigSection as f, type PluginConfigSectionSummary as g, type PluginNavIcon as h, type PluginAgentReadinessDeclaration as i, PLUGIN_BACKEND_PLATFORMS as j, PLUGIN_BACKEND_RUNTIMES as k, PLUGIN_CONFIG_SECRET_SENTINEL as l, PLUGIN_CONFIG_SECTIONS as m, PLUGIN_MANIFEST_FILENAME as n, PLUGIN_NAV_ICONS as o, PLUGIN_NAV_ICON_FALLBACK as p, PLUGIN_PART_DEFAULTS as q, PLUGIN_PART_NAMES as r, type PluginAgentReadinessItem as s, type PluginAgentReadinessResponse as t, type PluginAuditDeclarations as u, type PluginAuditToolDeclaration as v, type PluginBackendLimits as w, type PluginBackendPart as x, type PluginBackendPlatform as y, type PluginClawPart as z };
@@ -1,5 +1,5 @@
1
1
  import { z } from 'zod';
2
- import { T as TegoPluginManifest, y as PluginBackendPlatform } from './manifest-types-DQARCQJt.cjs';
2
+ import { T as TegoPluginManifest, y as PluginBackendPlatform } from './manifest-types-CUTNfJTa.cjs';
3
3
  import { A as AccessCatalog } from './catalog-CSSbrfEf.cjs';
4
4
 
5
5
  /**
@@ -1,5 +1,5 @@
1
1
  import { z } from 'zod';
2
- import { T as TegoPluginManifest, y as PluginBackendPlatform } from './manifest-types-DQARCQJt.js';
2
+ import { T as TegoPluginManifest, y as PluginBackendPlatform } from './manifest-types-CUTNfJTa.js';
3
3
  import { A as AccessCatalog } from './catalog-CSSbrfEf.js';
4
4
 
5
5
  /**
package/dist/pack.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";var u=Object.defineProperty;var e=(r,n)=>u(r,"name",{value:n,configurable:!0});var chunkTHMWRUAT_cjs=require("./chunk-THMWRUAT.cjs");require("./chunk-W7C357A6.cjs"),require("./chunk-3WA3M347.cjs"),require("./chunk-ROFUQLOZ.cjs"),require("./chunk-C2OCOPZQ.cjs"),require("./chunk-AJY7ZHXK.cjs"),require("./chunk-OP64Y4IN.cjs"),Object.defineProperty(exports,"buildAgentTemplate",{enumerable:!0,get:e(function(){return chunkTHMWRUAT_cjs.buildAgentTemplate},"get")}),Object.defineProperty(exports,"buildPluginBackend",{enumerable:!0,get:e(function(){return chunkTHMWRUAT_cjs.buildPluginBackend},"get")}),Object.defineProperty(exports,"buildPluginTemplates",{enumerable:!0,get:e(function(){return chunkTHMWRUAT_cjs.buildPluginTemplates},"get")}),Object.defineProperty(exports,"lockPlugin",{enumerable:!0,get:e(function(){return chunkTHMWRUAT_cjs.lockPlugin},"get")}),Object.defineProperty(exports,"packPlugin",{enumerable:!0,get:e(function(){return chunkTHMWRUAT_cjs.packPlugin},"get")}),Object.defineProperty(exports,"watchPluginFrontend",{enumerable:!0,get:e(function(){return chunkTHMWRUAT_cjs.watchPluginFrontend},"get")});
1
+ "use strict";var t=Object.defineProperty;var e=(r,n)=>t(r,"name",{value:n,configurable:!0});var chunkPWSTCQRN_cjs=require("./chunk-PWSTCQRN.cjs");require("./chunk-W7C357A6.cjs"),require("./chunk-3WA3M347.cjs"),require("./chunk-ROFUQLOZ.cjs"),require("./chunk-C2OCOPZQ.cjs"),require("./chunk-AJY7ZHXK.cjs"),require("./chunk-OP64Y4IN.cjs"),Object.defineProperty(exports,"buildAgentTemplate",{enumerable:!0,get:e(function(){return chunkPWSTCQRN_cjs.buildAgentTemplate},"get")}),Object.defineProperty(exports,"buildPluginBackend",{enumerable:!0,get:e(function(){return chunkPWSTCQRN_cjs.buildPluginBackend},"get")}),Object.defineProperty(exports,"buildPluginTemplates",{enumerable:!0,get:e(function(){return chunkPWSTCQRN_cjs.buildPluginTemplates},"get")}),Object.defineProperty(exports,"lockPlugin",{enumerable:!0,get:e(function(){return chunkPWSTCQRN_cjs.lockPlugin},"get")}),Object.defineProperty(exports,"packPlugin",{enumerable:!0,get:e(function(){return chunkPWSTCQRN_cjs.packPlugin},"get")}),Object.defineProperty(exports,"readManifest",{enumerable:!0,get:e(function(){return chunkPWSTCQRN_cjs.readManifest},"get")}),Object.defineProperty(exports,"watchPluginFrontend",{enumerable:!0,get:e(function(){return chunkPWSTCQRN_cjs.watchPluginFrontend},"get")});
package/dist/pack.d.cts CHANGED
@@ -1,4 +1,4 @@
1
- import { T as TegoPluginManifest, R as ResolvedBackendPart } from './manifest-types-DQARCQJt.cjs';
1
+ import { T as TegoPluginManifest, R as ResolvedBackendPart } from './manifest-types-CUTNfJTa.cjs';
2
2
 
3
3
  /**
4
4
  * Staging a `runtime: "python"` backend: source, locked wheels, and a lock
@@ -144,6 +144,7 @@ interface WatchPluginOptions {
144
144
  * Never resolves — the caller is a foreground command the author interrupts.
145
145
  */
146
146
  declare function watchPluginFrontend(options: WatchPluginOptions): Promise<never>;
147
+ declare function readManifest(root: string): Promise<TegoPluginManifest>;
147
148
  interface BuildPluginBackendOptions {
148
149
  /** Package root: the directory holding `tego.plugin.json`. */
149
150
  root: string;
@@ -166,4 +167,4 @@ interface BuildPluginBackendOptions {
166
167
  */
167
168
  declare function buildPluginBackend(part: ResolvedBackendPart, options: BuildPluginBackendOptions): Promise<void>;
168
169
 
169
- export { type BuildPluginBackendOptions, type PackPluginOptions, type PackedPlugin, type WatchPluginOptions, buildAgentTemplate, buildPluginBackend, buildPluginTemplates, lockPlugin, packPlugin, watchPluginFrontend };
170
+ export { type BuildPluginBackendOptions, type PackPluginOptions, type PackedPlugin, type WatchPluginOptions, buildAgentTemplate, buildPluginBackend, buildPluginTemplates, lockPlugin, packPlugin, readManifest, watchPluginFrontend };
package/dist/pack.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { T as TegoPluginManifest, R as ResolvedBackendPart } from './manifest-types-DQARCQJt.js';
1
+ import { T as TegoPluginManifest, R as ResolvedBackendPart } from './manifest-types-CUTNfJTa.js';
2
2
 
3
3
  /**
4
4
  * Staging a `runtime: "python"` backend: source, locked wheels, and a lock
@@ -144,6 +144,7 @@ interface WatchPluginOptions {
144
144
  * Never resolves — the caller is a foreground command the author interrupts.
145
145
  */
146
146
  declare function watchPluginFrontend(options: WatchPluginOptions): Promise<never>;
147
+ declare function readManifest(root: string): Promise<TegoPluginManifest>;
147
148
  interface BuildPluginBackendOptions {
148
149
  /** Package root: the directory holding `tego.plugin.json`. */
149
150
  root: string;
@@ -166,4 +167,4 @@ interface BuildPluginBackendOptions {
166
167
  */
167
168
  declare function buildPluginBackend(part: ResolvedBackendPart, options: BuildPluginBackendOptions): Promise<void>;
168
169
 
169
- export { type BuildPluginBackendOptions, type PackPluginOptions, type PackedPlugin, type WatchPluginOptions, buildAgentTemplate, buildPluginBackend, buildPluginTemplates, lockPlugin, packPlugin, watchPluginFrontend };
170
+ export { type BuildPluginBackendOptions, type PackPluginOptions, type PackedPlugin, type WatchPluginOptions, buildAgentTemplate, buildPluginBackend, buildPluginTemplates, lockPlugin, packPlugin, readManifest, watchPluginFrontend };
package/dist/pack.js CHANGED
@@ -1 +1 @@
1
- export{buildAgentTemplate,buildPluginBackend,buildPluginTemplates,lockPlugin,packPlugin,watchPluginFrontend}from"./chunk-3KUOBGJN.js";import"./chunk-7K37PVGV.js";import"./chunk-5CU33JVY.js";import"./chunk-BTHXQWHT.js";import"./chunk-7XHF3YSK.js";import"./chunk-VMCGDDGP.js";import"./chunk-SNUCO2MK.js";
1
+ export{buildAgentTemplate,buildPluginBackend,buildPluginTemplates,lockPlugin,packPlugin,readManifest,watchPluginFrontend}from"./chunk-P2Q2AKWP.js";import"./chunk-7K37PVGV.js";import"./chunk-5CU33JVY.js";import"./chunk-BTHXQWHT.js";import"./chunk-7XHF3YSK.js";import"./chunk-VMCGDDGP.js";import"./chunk-SNUCO2MK.js";
package/dist/publish.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";var $=Object.defineProperty;var s=(e,a)=>$(e,"name",{value:a,configurable:!0});var chunkTHMWRUAT_cjs=require("./chunk-THMWRUAT.cjs");require("./chunk-W7C357A6.cjs"),require("./chunk-3WA3M347.cjs");var chunkROFUQLOZ_cjs=require("./chunk-ROFUQLOZ.cjs");require("./chunk-C2OCOPZQ.cjs"),require("./chunk-AJY7ZHXK.cjs"),require("./chunk-OP64Y4IN.cjs");var promises=require("fs/promises"),path=require("path"),API_PREFIX="/api/v1/tego-os";async function publishPlugin(e){const a=e.log===null?()=>{}:e.log??(t=>console.log(t)),n=await chunkTHMWRUAT_cjs.packPlugin({root:e.root,log:a});return publishPackedPlugin(n,e)}s(publishPlugin,"publishPlugin");async function publishPackedPlugin(e,a){const n=a.log===null?()=>{}:a.log??(p=>console.log(p)),t=a.fetchImpl??fetch,r=createCaller(a.server,a.token,t),u=await promises.readFile(e.file),o=path.basename(e.file);n("\u203A presigning upload");const c=await r("POST","/admin/runtime-plugins/presign-stream",{filename:o,mimeType:"application/zip",size:u.byteLength});n(`\u203A uploading ${o} (${u.byteLength} bytes)`),await putArchive(a.server,c.uploadUrl,u,t),n("\u203A inspecting package");const l=await r("POST","/admin/runtime-plugins/inspect",{uploadToken:c.uploadToken});n(` ${l.pluginId}@${l.semanticVersion} \u2014 ${describeParts(l)}${l.isUpgrade?" (upgrade)":""}${l.requiresConfig?", needs config":""}`),n("\u203A finalizing release");const g=await r("POST","/admin/runtime-plugins/upload",{uploadToken:c.uploadToken,...a.meta});let i=g.release;n(` release ${i.id} (${i.status})`),(a.approve??!0)&&(n("\u203A approving release"),i=await r("POST",`/admin/runtime-plugins/releases/${encodeURIComponent(i.id)}/approve`,{}),n(` release ${i.id} (${i.status})`));let d=null;if(a.install??!0){const p=chunkROFUQLOZ_cjs.resolvePluginScope(e.manifest),f=p==="avatar"?{releaseId:i.id,avatarIds:a.avatarIds??[]}:{releaseId:i.id};n(`\u203A installing for tenant (${p}-scoped)`),d=await r("POST","/admin/runtime-plugins/installs",f),reportInstall(d,n)}return{packed:e,preview:l,catalog:g.catalog,release:i,install:d}}s(publishPackedPlugin,"publishPackedPlugin");function describeParts(e){const a=[];return e.parts.frontend&&a.push(`frontend (${e.parts.frontend.locales.length} locales)`),e.parts.backend&&a.push(`backend (${e.parts.backend.migrationCount} migrations)`),e.parts.claw&&a.push("claw"),a.join(", ")||"no parts"}s(describeParts,"describeParts");function reportInstall(e,a){const n=e.avatars;if(!n||n.attempted===0){a(` installed ${e.pluginId}@${e.version}`);return}const t=n.attempted-n.failures.length;a(` installed ${e.pluginId}@${e.version} \u2014 ${t}/${n.attempted} avatars`);for(const r of n.failures)a(` \u2717 ${r.avatarId}: ${r.message}`)}s(reportInstall,"reportInstall");function createCaller(e,a,n){const t=e.replace(/\/+$/,"");return s(async function(u,o,c){const l=await n(`${t}${API_PREFIX}${o}`,{method:u,headers:{authorization:`Bearer ${a}`,...c===void 0?{}:{"content-type":"application/json"}},...c===void 0?{}:{body:JSON.stringify(c)}});return unwrap(l,`${u} ${o}`)},"call")}s(createCaller,"createCaller");async function putArchive(e,a,n,t){const r=e.replace(/\/+$/,""),u=await t(`${r}${a}`,{method:"PUT",headers:{"content-type":"application/zip"},body:n});await unwrap(u,"PUT upload")}s(putArchive,"putArchive");async function unwrap(e,a){let n;try{n=await e.json()}catch{n=null}if(!e.ok||!n?.success){const t=n?.error?.message??`HTTP ${e.status}`;throw new Error(`${a} failed: ${t}`)}return n.data}s(unwrap,"unwrap"),exports.publishPackedPlugin=publishPackedPlugin,exports.publishPlugin=publishPlugin;
1
+ "use strict";var $=Object.defineProperty;var s=(e,a)=>$(e,"name",{value:a,configurable:!0});var chunkPWSTCQRN_cjs=require("./chunk-PWSTCQRN.cjs");require("./chunk-W7C357A6.cjs"),require("./chunk-3WA3M347.cjs");var chunkROFUQLOZ_cjs=require("./chunk-ROFUQLOZ.cjs");require("./chunk-C2OCOPZQ.cjs"),require("./chunk-AJY7ZHXK.cjs"),require("./chunk-OP64Y4IN.cjs");var promises=require("fs/promises"),path=require("path"),API_PREFIX="/api/v1/tego-os";async function publishPlugin(e){const a=e.log===null?()=>{}:e.log??(t=>console.log(t)),n=await chunkPWSTCQRN_cjs.packPlugin({root:e.root,log:a});return publishPackedPlugin(n,e)}s(publishPlugin,"publishPlugin");async function publishPackedPlugin(e,a){const n=a.log===null?()=>{}:a.log??(p=>console.log(p)),t=a.fetchImpl??fetch,r=createCaller(a.server,a.token,t),u=await promises.readFile(e.file),o=path.basename(e.file);n("\u203A presigning upload");const c=await r("POST","/admin/runtime-plugins/presign-stream",{filename:o,mimeType:"application/zip",size:u.byteLength});n(`\u203A uploading ${o} (${u.byteLength} bytes)`),await putArchive(a.server,c.uploadUrl,u,t),n("\u203A inspecting package");const l=await r("POST","/admin/runtime-plugins/inspect",{uploadToken:c.uploadToken});n(` ${l.pluginId}@${l.semanticVersion} \u2014 ${describeParts(l)}${l.isUpgrade?" (upgrade)":""}${l.requiresConfig?", needs config":""}`),n("\u203A finalizing release");const g=await r("POST","/admin/runtime-plugins/upload",{uploadToken:c.uploadToken,...a.meta});let i=g.release;n(` release ${i.id} (${i.status})`),(a.approve??!0)&&(n("\u203A approving release"),i=await r("POST",`/admin/runtime-plugins/releases/${encodeURIComponent(i.id)}/approve`,{}),n(` release ${i.id} (${i.status})`));let d=null;if(a.install??!0){const p=chunkROFUQLOZ_cjs.resolvePluginScope(e.manifest),f=p==="avatar"?{releaseId:i.id,avatarIds:a.avatarIds??[]}:{releaseId:i.id};n(`\u203A installing for tenant (${p}-scoped)`),d=await r("POST","/admin/runtime-plugins/installs",f),reportInstall(d,n)}return{packed:e,preview:l,catalog:g.catalog,release:i,install:d}}s(publishPackedPlugin,"publishPackedPlugin");function describeParts(e){const a=[];return e.parts.frontend&&a.push(`frontend (${e.parts.frontend.locales.length} locales)`),e.parts.backend&&a.push(`backend (${e.parts.backend.migrationCount} migrations)`),e.parts.claw&&a.push("claw"),a.join(", ")||"no parts"}s(describeParts,"describeParts");function reportInstall(e,a){const n=e.avatars;if(!n||n.attempted===0){a(` installed ${e.pluginId}@${e.version}`);return}const t=n.attempted-n.failures.length;a(` installed ${e.pluginId}@${e.version} \u2014 ${t}/${n.attempted} avatars`);for(const r of n.failures)a(` \u2717 ${r.avatarId}: ${r.message}`)}s(reportInstall,"reportInstall");function createCaller(e,a,n){const t=e.replace(/\/+$/,"");return s(async function(u,o,c){const l=await n(`${t}${API_PREFIX}${o}`,{method:u,headers:{authorization:`Bearer ${a}`,...c===void 0?{}:{"content-type":"application/json"}},...c===void 0?{}:{body:JSON.stringify(c)}});return unwrap(l,`${u} ${o}`)},"call")}s(createCaller,"createCaller");async function putArchive(e,a,n,t){const r=e.replace(/\/+$/,""),u=await t(`${r}${a}`,{method:"PUT",headers:{"content-type":"application/zip"},body:n});await unwrap(u,"PUT upload")}s(putArchive,"putArchive");async function unwrap(e,a){let n;try{n=await e.json()}catch{n=null}if(!e.ok||!n?.success){const t=n?.error?.message??`HTTP ${e.status}`;throw new Error(`${a} failed: ${t}`)}return n.data}s(unwrap,"unwrap"),exports.publishPackedPlugin=publishPackedPlugin,exports.publishPlugin=publishPlugin;
@@ -1,5 +1,5 @@
1
1
  import { PackedPlugin } from './pack.cjs';
2
- import './manifest-types-DQARCQJt.cjs';
2
+ import './manifest-types-CUTNfJTa.cjs';
3
3
 
4
4
  interface PublishPluginOptions {
5
5
  /** Package root: the directory holding `tego.plugin.json`. */
package/dist/publish.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { PackedPlugin } from './pack.js';
2
- import './manifest-types-DQARCQJt.js';
2
+ import './manifest-types-CUTNfJTa.js';
3
3
 
4
4
  interface PublishPluginOptions {
5
5
  /** Package root: the directory holding `tego.plugin.json`. */
package/dist/publish.js CHANGED
@@ -1 +1 @@
1
- var h=Object.defineProperty;var o=(e,a)=>h(e,"name",{value:a,configurable:!0});import{packPlugin as v}from"./chunk-3KUOBGJN.js";import"./chunk-7K37PVGV.js";import"./chunk-5CU33JVY.js";import{resolvePluginScope as P}from"./chunk-BTHXQWHT.js";import"./chunk-7XHF3YSK.js";import"./chunk-VMCGDDGP.js";import"./chunk-SNUCO2MK.js";import{readFile as w}from"fs/promises";import{basename as y}from"path";var I="/api/v1/tego-os";async function T(e){const a=e.log===null?()=>{}:e.log??(n=>console.log(n)),t=await v({root:e.root,log:a});return f(t,e)}o(T,"publishPlugin");async function f(e,a){const t=a.log===null?()=>{}:a.log??(p=>console.log(p)),n=a.fetchImpl??fetch,r=A(a.server,a.token,n),s=await w(e.file),c=y(e.file);t("\u203A presigning upload");const u=await r("POST","/admin/runtime-plugins/presign-stream",{filename:c,mimeType:"application/zip",size:s.byteLength});t(`\u203A uploading ${c} (${s.byteLength} bytes)`),await S(a.server,u.uploadUrl,s,n),t("\u203A inspecting package");const l=await r("POST","/admin/runtime-plugins/inspect",{uploadToken:u.uploadToken});t(` ${l.pluginId}@${l.semanticVersion} \u2014 ${b(l)}${l.isUpgrade?" (upgrade)":""}${l.requiresConfig?", needs config":""}`),t("\u203A finalizing release");const g=await r("POST","/admin/runtime-plugins/upload",{uploadToken:u.uploadToken,...a.meta});let i=g.release;t(` release ${i.id} (${i.status})`),(a.approve??!0)&&(t("\u203A approving release"),i=await r("POST",`/admin/runtime-plugins/releases/${encodeURIComponent(i.id)}/approve`,{}),t(` release ${i.id} (${i.status})`));let d=null;if(a.install??!0){const p=P(e.manifest),$=p==="avatar"?{releaseId:i.id,avatarIds:a.avatarIds??[]}:{releaseId:i.id};t(`\u203A installing for tenant (${p}-scoped)`),d=await r("POST","/admin/runtime-plugins/installs",$),k(d,t)}return{packed:e,preview:l,catalog:g.catalog,release:i,install:d}}o(f,"publishPackedPlugin");function b(e){const a=[];return e.parts.frontend&&a.push(`frontend (${e.parts.frontend.locales.length} locales)`),e.parts.backend&&a.push(`backend (${e.parts.backend.migrationCount} migrations)`),e.parts.claw&&a.push("claw"),a.join(", ")||"no parts"}o(b,"describeParts");function k(e,a){const t=e.avatars;if(!t||t.attempted===0){a(` installed ${e.pluginId}@${e.version}`);return}const n=t.attempted-t.failures.length;a(` installed ${e.pluginId}@${e.version} \u2014 ${n}/${t.attempted} avatars`);for(const r of t.failures)a(` \u2717 ${r.avatarId}: ${r.message}`)}o(k,"reportInstall");function A(e,a,t){const n=e.replace(/\/+$/,"");return o(async function(s,c,u){const l=await t(`${n}${I}${c}`,{method:s,headers:{authorization:`Bearer ${a}`,...u===void 0?{}:{"content-type":"application/json"}},...u===void 0?{}:{body:JSON.stringify(u)}});return m(l,`${s} ${c}`)},"call")}o(A,"createCaller");async function S(e,a,t,n){const r=e.replace(/\/+$/,""),s=await n(`${r}${a}`,{method:"PUT",headers:{"content-type":"application/zip"},body:t});await m(s,"PUT upload")}o(S,"putArchive");async function m(e,a){let t;try{t=await e.json()}catch{t=null}if(!e.ok||!t?.success){const n=t?.error?.message??`HTTP ${e.status}`;throw new Error(`${a} failed: ${n}`)}return t.data}o(m,"unwrap");export{f as publishPackedPlugin,T as publishPlugin};
1
+ var h=Object.defineProperty;var o=(e,a)=>h(e,"name",{value:a,configurable:!0});import{packPlugin as v}from"./chunk-P2Q2AKWP.js";import"./chunk-7K37PVGV.js";import"./chunk-5CU33JVY.js";import{resolvePluginScope as P}from"./chunk-BTHXQWHT.js";import"./chunk-7XHF3YSK.js";import"./chunk-VMCGDDGP.js";import"./chunk-SNUCO2MK.js";import{readFile as w}from"fs/promises";import{basename as y}from"path";var I="/api/v1/tego-os";async function T(e){const a=e.log===null?()=>{}:e.log??(n=>console.log(n)),t=await v({root:e.root,log:a});return f(t,e)}o(T,"publishPlugin");async function f(e,a){const t=a.log===null?()=>{}:a.log??(p=>console.log(p)),n=a.fetchImpl??fetch,r=A(a.server,a.token,n),s=await w(e.file),c=y(e.file);t("\u203A presigning upload");const u=await r("POST","/admin/runtime-plugins/presign-stream",{filename:c,mimeType:"application/zip",size:s.byteLength});t(`\u203A uploading ${c} (${s.byteLength} bytes)`),await S(a.server,u.uploadUrl,s,n),t("\u203A inspecting package");const l=await r("POST","/admin/runtime-plugins/inspect",{uploadToken:u.uploadToken});t(` ${l.pluginId}@${l.semanticVersion} \u2014 ${b(l)}${l.isUpgrade?" (upgrade)":""}${l.requiresConfig?", needs config":""}`),t("\u203A finalizing release");const g=await r("POST","/admin/runtime-plugins/upload",{uploadToken:u.uploadToken,...a.meta});let i=g.release;t(` release ${i.id} (${i.status})`),(a.approve??!0)&&(t("\u203A approving release"),i=await r("POST",`/admin/runtime-plugins/releases/${encodeURIComponent(i.id)}/approve`,{}),t(` release ${i.id} (${i.status})`));let d=null;if(a.install??!0){const p=P(e.manifest),$=p==="avatar"?{releaseId:i.id,avatarIds:a.avatarIds??[]}:{releaseId:i.id};t(`\u203A installing for tenant (${p}-scoped)`),d=await r("POST","/admin/runtime-plugins/installs",$),k(d,t)}return{packed:e,preview:l,catalog:g.catalog,release:i,install:d}}o(f,"publishPackedPlugin");function b(e){const a=[];return e.parts.frontend&&a.push(`frontend (${e.parts.frontend.locales.length} locales)`),e.parts.backend&&a.push(`backend (${e.parts.backend.migrationCount} migrations)`),e.parts.claw&&a.push("claw"),a.join(", ")||"no parts"}o(b,"describeParts");function k(e,a){const t=e.avatars;if(!t||t.attempted===0){a(` installed ${e.pluginId}@${e.version}`);return}const n=t.attempted-t.failures.length;a(` installed ${e.pluginId}@${e.version} \u2014 ${n}/${t.attempted} avatars`);for(const r of t.failures)a(` \u2717 ${r.avatarId}: ${r.message}`)}o(k,"reportInstall");function A(e,a,t){const n=e.replace(/\/+$/,"");return o(async function(s,c,u){const l=await t(`${n}${I}${c}`,{method:s,headers:{authorization:`Bearer ${a}`,...u===void 0?{}:{"content-type":"application/json"}},...u===void 0?{}:{body:JSON.stringify(u)}});return m(l,`${s} ${c}`)},"call")}o(A,"createCaller");async function S(e,a,t,n){const r=e.replace(/\/+$/,""),s=await n(`${r}${a}`,{method:"PUT",headers:{"content-type":"application/zip"},body:t});await m(s,"PUT upload")}o(S,"putArchive");async function m(e,a){let t;try{t=await e.json()}catch{t=null}if(!e.ok||!t?.success){const n=t?.error?.message??`HTTP ${e.status}`;throw new Error(`${a} failed: ${n}`)}return t.data}o(m,"unwrap");export{f as publishPackedPlugin,T as publishPlugin};
package/dist/scaffold.cjs CHANGED
@@ -6,6 +6,7 @@ backend/dist/
6
6
  claw/dist/
7
7
  coverage/
8
8
  .turbo/
9
+ .tego-dev/
9
10
  `,STANDALONE_PNPM_WORKSPACE=`allowBuilds:
10
11
  esbuild: true
11
12
  `,STANDALONE_TSCONFIG_FILES={"tsconfig.base.json":{$schema:"https://json.schemastore.org/tsconfig",compilerOptions:{strict:!0,useUnknownInCatchVariables:!0,allowJs:!0,skipLibCheck:!0,forceConsistentCasingInFileNames:!0,resolveJsonModule:!0,isolatedModules:!0,verbatimModuleSyntax:!0,declaration:!0,declarationMap:!0,esModuleInterop:!0,incremental:!1,noUncheckedIndexedAccess:!0,moduleDetection:"force",exactOptionalPropertyTypes:!0,target:"ES2022",lib:["ES2022","DOM","DOM.Iterable"],module:"ESNext",moduleResolution:"bundler"},exclude:["node_modules"]},"tsconfig.frontend.json":{$schema:"https://json.schemastore.org/tsconfig",extends:"./tsconfig.base.json",compilerOptions:{target:"ES2020",lib:["ES2020","DOM","DOM.Iterable"],module:"ESNext",moduleResolution:"bundler",jsx:"react-jsx",noEmit:!1,declaration:!0,declarationMap:!0,outDir:"dist"}},"tsconfig.backend.json":{$schema:"https://json.schemastore.org/tsconfig",extends:"./tsconfig.base.json",compilerOptions:{target:"ES2022",lib:["ES2022"],module:"ESNext",moduleResolution:"bundler",types:["node"],noEmit:!1,declaration:!0,declarationMap:!0,outDir:"dist"}}};function tsconfigPreset(e,t){return t==="workspace"?`@tego/tsconfig/plugin-${e}.json`:`../tsconfig.${e}.json`}i(tsconfigPreset,"tsconfigPreset");var STANDALONE_ESLINT_CONFIG=`import js from '@eslint/js';
@@ -41,7 +42,7 @@ export default tseslint.config(
41
42
  prettierConfig
42
43
  );
43
44
  `,STANDALONE_LINT_DEPENDENCIES={"@eslint/js":"^9.16.0","eslint-config-prettier":"^10.1.8","eslint-plugin-prettier":"^5.5.4","eslint-plugin-react-hooks":"^5.2.0",globals:"^15.13.0","typescript-eslint":"^8.17.0"};function standaloneRootFiles(){return[{path:".prettierrc.json",contents:json(STANDALONE_PRETTIER)},{path:".gitignore",contents:STANDALONE_GITIGNORE},{path:"pnpm-workspace.yaml",contents:STANDALONE_PNPM_WORKSPACE},...Object.entries(STANDALONE_TSCONFIG_FILES).map(([e,t])=>({path:e,contents:json(t)}))]}i(standaloneRootFiles,"standaloneRootFiles");var STANDALONE_TOOLCHAIN={"@typescript/native-preview":"7.0.0-dev.20260519.1",eslint:"^9.39.1",prettier:"^3.7.4",typescript:"^5.9.3"},SUPPORTED_LOCALES=["zh-CN","zh-TW","en","ja","ko","de","es","fr","it","pt"];function packageNameFor(e){return`@tego/plugin-${e.replace(/^tego-/,"")}`}i(packageNameFor,"packageNameFor");function keyNamespaceFor(e){return e.replace(/^tego-/,"")}i(keyNamespaceFor,"keyNamespaceFor");function json(e){return`${JSON.stringify(e,null,2)}
44
- `}i(json,"json");function manifest(e){const t=keyNamespaceFor(e.id),n=e.parts.includes("frontend"),o=e.parts.includes("backend"),a=e.parts.includes("claw"),s={};n&&(s.frontend={icon:"puzzle",nav:[{key:"home",labelKey:`${t}.nav.home`,icon:"layout-dashboard",order:0,path:"/home"}]}),o&&(s.backend={limits:{memoryMb:256,requestTimeoutMs:15e3}}),a&&(s.claw={hooks:{}});const r={manifestVersion:1,id:e.id,version:"0.1.0",displayName:{"zh-CN":e.displayNameZh,en:e.displayNameEn},description:{"zh-CN":e.descriptionZh,en:e.descriptionEn},author:"Tego"};return(n||o)&&(r.hostApiRange=e.hostApiRange),r.scope=e.scope,o&&(r.declares={database:!0}),r.parts=s,{path:"tego.plugin.json",contents:json(r)}}i(manifest,"manifest");function rootPackageJson(e,t){const n=e.parts.includes("frontend"),o=e.parts.includes("backend"),a=e.parts.includes("claw"),s=["tsgo --noEmit -p shared/tsconfig.json"];n&&s.push("tsgo --noEmit -p frontend/tsconfig.json"),o&&s.push("tsgo --noEmit -p backend/tsconfig.json"),a&&s.push("tsgo --noEmit -p claw/tsconfig.json");const r={"@tego/plugin-sdk":sdkSpec("@tego/plugin-sdk",e,t),"@types/node":"^22.10.1",vitest:"^4.1.10"};t==="workspace"&&Object.assign(r,{"@tego/eslint-config":"workspace:*","@tego/tsconfig":"workspace:*"}),n&&Object.assign(r,{"@tanstack/react-query":"^5.62.7","@tego/ui":sdkSpec("@tego/ui",e,t),"@types/react":"^19.2.1","@types/react-dom":"^19.2.1","lucide-react":"^0.469.0",react:"^19.0.0","react-dom":"^19.0.0","react-i18next":"15.4.1",vite:"^6.3.5"}),o&&Object.assign(r,{"@types/pg":"^8.11.10",hono:"^4.10.7",pg:"^8.13.1"}),a&&(r.typebox="1.3.16"),t==="npm"&&Object.assign(r,STANDALONE_TOOLCHAIN,STANDALONE_LINT_DEPENDENCIES);const c={name:packageNameFor(e.id),version:"0.1.0",private:!0,type:"module",description:e.descriptionEn,scripts:{build:"tego-plugin-pack",watch:"tego-plugin-pack --watch","type-check":s.join(" && "),lint:"eslint .","lint:fix":"eslint . --fix",test:"vitest run"},devDependencies:sortedRecord(r)};return{path:"package.json",contents:json(c)}}i(rootPackageJson,"rootPackageJson");function sortedRecord(e){const t={};for(const n of Object.keys(e).sort())t[n]=e[n];return t}i(sortedRecord,"sortedRecord");function eslintConfig(e){return e==="npm"?{path:"eslint.config.js",contents:STANDALONE_ESLINT_CONFIG}:{path:"eslint.config.js",contents:`import baseConfig from '@tego/eslint-config';
45
+ `}i(json,"json");function manifest(e){const t=keyNamespaceFor(e.id),n=e.parts.includes("frontend"),o=e.parts.includes("backend"),a=e.parts.includes("claw"),s={};n&&(s.frontend={icon:"puzzle",nav:[{key:"home",labelKey:`${t}.nav.home`,icon:"layout-dashboard",order:0,path:"/home"}]}),o&&(s.backend={limits:{memoryMb:256,requestTimeoutMs:15e3}}),a&&(s.claw={hooks:{}});const r={manifestVersion:1,id:e.id,version:"0.1.0",displayName:{"zh-CN":e.displayNameZh,en:e.displayNameEn},description:{"zh-CN":e.descriptionZh,en:e.descriptionEn},author:"Tego"};return(n||o)&&(r.hostApiRange=e.hostApiRange),r.scope=e.scope,o&&(r.declares={database:!0}),r.parts=s,{path:"tego.plugin.json",contents:json(r)}}i(manifest,"manifest");function rootPackageJson(e,t){const n=e.parts.includes("frontend"),o=e.parts.includes("backend"),a=e.parts.includes("claw"),s=["tsgo --noEmit -p shared/tsconfig.json"];n&&s.push("tsgo --noEmit -p frontend/tsconfig.json"),o&&s.push("tsgo --noEmit -p backend/tsconfig.json"),a&&s.push("tsgo --noEmit -p claw/tsconfig.json");const r={"@tego/plugin-sdk":sdkSpec("@tego/plugin-sdk",e,t),"@types/node":"^22.10.1",vitest:"^4.1.10"};t==="workspace"&&Object.assign(r,{"@tego/eslint-config":"workspace:*","@tego/tsconfig":"workspace:*"}),n&&Object.assign(r,{"@tanstack/react-query":"^5.62.7","@tego/ui":sdkSpec("@tego/ui",e,t),"@types/react":"^19.2.1","@types/react-dom":"^19.2.1","lucide-react":"^0.469.0",react:"^19.0.0","react-dom":"^19.0.0","react-i18next":"15.4.1",vite:"^6.3.5"}),o&&Object.assign(r,{"@types/pg":"^8.11.10",hono:"^4.10.7",pg:"^8.13.1"}),a&&(r.typebox="1.3.16"),t==="npm"&&Object.assign(r,STANDALONE_TOOLCHAIN,STANDALONE_LINT_DEPENDENCIES);const c={name:packageNameFor(e.id),version:"0.1.0",private:!0,type:"module",description:e.descriptionEn,scripts:{build:"tego-plugin-pack",watch:"tego-plugin-pack --watch",dev:"tego-plugin dev","type-check":s.join(" && "),lint:"eslint .","lint:fix":"eslint . --fix",test:"vitest run"},devDependencies:sortedRecord(r)};return{path:"package.json",contents:json(c)}}i(rootPackageJson,"rootPackageJson");function sortedRecord(e){const t={};for(const n of Object.keys(e).sort())t[n]=e[n];return t}i(sortedRecord,"sortedRecord");function eslintConfig(e){return e==="npm"?{path:"eslint.config.js",contents:STANDALONE_ESLINT_CONFIG}:{path:"eslint.config.js",contents:`import baseConfig from '@tego/eslint-config';
45
46
 
46
47
  export default [
47
48
  ...baseConfig,
package/dist/scaffold.js CHANGED
@@ -6,6 +6,7 @@ backend/dist/
6
6
  claw/dist/
7
7
  coverage/
8
8
  .turbo/
9
+ .tego-dev/
9
10
  `,q=`allowBuilds:
10
11
  esbuild: true
11
12
  `,E={"tsconfig.base.json":{$schema:"https://json.schemastore.org/tsconfig",compilerOptions:{strict:!0,useUnknownInCatchVariables:!0,allowJs:!0,skipLibCheck:!0,forceConsistentCasingInFileNames:!0,resolveJsonModule:!0,isolatedModules:!0,verbatimModuleSyntax:!0,declaration:!0,declarationMap:!0,esModuleInterop:!0,incremental:!1,noUncheckedIndexedAccess:!0,moduleDetection:"force",exactOptionalPropertyTypes:!0,target:"ES2022",lib:["ES2022","DOM","DOM.Iterable"],module:"ESNext",moduleResolution:"bundler"},exclude:["node_modules"]},"tsconfig.frontend.json":{$schema:"https://json.schemastore.org/tsconfig",extends:"./tsconfig.base.json",compilerOptions:{target:"ES2020",lib:["ES2020","DOM","DOM.Iterable"],module:"ESNext",moduleResolution:"bundler",jsx:"react-jsx",noEmit:!1,declaration:!0,declarationMap:!0,outDir:"dist"}},"tsconfig.backend.json":{$schema:"https://json.schemastore.org/tsconfig",extends:"./tsconfig.base.json",compilerOptions:{target:"ES2022",lib:["ES2022"],module:"ESNext",moduleResolution:"bundler",types:["node"],noEmit:!1,declaration:!0,declarationMap:!0,outDir:"dist"}}};function u(e,t){return t==="workspace"?`@tego/tsconfig/plugin-${e}.json`:`../tsconfig.${e}.json`}i(u,"tsconfigPreset");var H=`import js from '@eslint/js';
@@ -41,7 +42,7 @@ export default tseslint.config(
41
42
  prettierConfig
42
43
  );
43
44
  `,z={"@eslint/js":"^9.16.0","eslint-config-prettier":"^10.1.8","eslint-plugin-prettier":"^5.5.4","eslint-plugin-react-hooks":"^5.2.0",globals:"^15.13.0","typescript-eslint":"^8.17.0"};function B(){return[{path:".prettierrc.json",contents:c(F)},{path:".gitignore",contents:M},{path:"pnpm-workspace.yaml",contents:q},...Object.entries(E).map(([e,t])=>({path:e,contents:c(t)}))]}i(B,"standaloneRootFiles");var U={"@typescript/native-preview":"7.0.0-dev.20260519.1",eslint:"^9.39.1",prettier:"^3.7.4",typescript:"^5.9.3"},G=["zh-CN","zh-TW","en","ja","ko","de","es","fr","it","pt"];function h(e){return`@tego/plugin-${e.replace(/^tego-/,"")}`}i(h,"packageNameFor");function v(e){return e.replace(/^tego-/,"")}i(v,"keyNamespaceFor");function c(e){return`${JSON.stringify(e,null,2)}
44
- `}i(c,"json");function K(e){const t=v(e.id),n=e.parts.includes("frontend"),o=e.parts.includes("backend"),a=e.parts.includes("claw"),s={};n&&(s.frontend={icon:"puzzle",nav:[{key:"home",labelKey:`${t}.nav.home`,icon:"layout-dashboard",order:0,path:"/home"}]}),o&&(s.backend={limits:{memoryMb:256,requestTimeoutMs:15e3}}),a&&(s.claw={hooks:{}});const r={manifestVersion:1,id:e.id,version:"0.1.0",displayName:{"zh-CN":e.displayNameZh,en:e.displayNameEn},description:{"zh-CN":e.descriptionZh,en:e.descriptionEn},author:"Tego"};return(n||o)&&(r.hostApiRange=e.hostApiRange),r.scope=e.scope,o&&(r.declares={database:!0}),r.parts=s,{path:"tego.plugin.json",contents:c(r)}}i(K,"manifest");function J(e,t){const n=e.parts.includes("frontend"),o=e.parts.includes("backend"),a=e.parts.includes("claw"),s=["tsgo --noEmit -p shared/tsconfig.json"];n&&s.push("tsgo --noEmit -p frontend/tsconfig.json"),o&&s.push("tsgo --noEmit -p backend/tsconfig.json"),a&&s.push("tsgo --noEmit -p claw/tsconfig.json");const r={"@tego/plugin-sdk":k("@tego/plugin-sdk",e,t),"@types/node":"^22.10.1",vitest:"^4.1.10"};t==="workspace"&&Object.assign(r,{"@tego/eslint-config":"workspace:*","@tego/tsconfig":"workspace:*"}),n&&Object.assign(r,{"@tanstack/react-query":"^5.62.7","@tego/ui":k("@tego/ui",e,t),"@types/react":"^19.2.1","@types/react-dom":"^19.2.1","lucide-react":"^0.469.0",react:"^19.0.0","react-dom":"^19.0.0","react-i18next":"15.4.1",vite:"^6.3.5"}),o&&Object.assign(r,{"@types/pg":"^8.11.10",hono:"^4.10.7",pg:"^8.13.1"}),a&&(r.typebox="1.3.16"),t==="npm"&&Object.assign(r,U,z);const l={name:h(e.id),version:"0.1.0",private:!0,type:"module",description:e.descriptionEn,scripts:{build:"tego-plugin-pack",watch:"tego-plugin-pack --watch","type-check":s.join(" && "),lint:"eslint .","lint:fix":"eslint . --fix",test:"vitest run"},devDependencies:Q(r)};return{path:"package.json",contents:c(l)}}i(J,"rootPackageJson");function Q(e){const t={};for(const n of Object.keys(e).sort())t[n]=e[n];return t}i(Q,"sortedRecord");function W(e){return e==="npm"?{path:"eslint.config.js",contents:H}:{path:"eslint.config.js",contents:`import baseConfig from '@tego/eslint-config';
45
+ `}i(c,"json");function K(e){const t=v(e.id),n=e.parts.includes("frontend"),o=e.parts.includes("backend"),a=e.parts.includes("claw"),s={};n&&(s.frontend={icon:"puzzle",nav:[{key:"home",labelKey:`${t}.nav.home`,icon:"layout-dashboard",order:0,path:"/home"}]}),o&&(s.backend={limits:{memoryMb:256,requestTimeoutMs:15e3}}),a&&(s.claw={hooks:{}});const r={manifestVersion:1,id:e.id,version:"0.1.0",displayName:{"zh-CN":e.displayNameZh,en:e.displayNameEn},description:{"zh-CN":e.descriptionZh,en:e.descriptionEn},author:"Tego"};return(n||o)&&(r.hostApiRange=e.hostApiRange),r.scope=e.scope,o&&(r.declares={database:!0}),r.parts=s,{path:"tego.plugin.json",contents:c(r)}}i(K,"manifest");function J(e,t){const n=e.parts.includes("frontend"),o=e.parts.includes("backend"),a=e.parts.includes("claw"),s=["tsgo --noEmit -p shared/tsconfig.json"];n&&s.push("tsgo --noEmit -p frontend/tsconfig.json"),o&&s.push("tsgo --noEmit -p backend/tsconfig.json"),a&&s.push("tsgo --noEmit -p claw/tsconfig.json");const r={"@tego/plugin-sdk":k("@tego/plugin-sdk",e,t),"@types/node":"^22.10.1",vitest:"^4.1.10"};t==="workspace"&&Object.assign(r,{"@tego/eslint-config":"workspace:*","@tego/tsconfig":"workspace:*"}),n&&Object.assign(r,{"@tanstack/react-query":"^5.62.7","@tego/ui":k("@tego/ui",e,t),"@types/react":"^19.2.1","@types/react-dom":"^19.2.1","lucide-react":"^0.469.0",react:"^19.0.0","react-dom":"^19.0.0","react-i18next":"15.4.1",vite:"^6.3.5"}),o&&Object.assign(r,{"@types/pg":"^8.11.10",hono:"^4.10.7",pg:"^8.13.1"}),a&&(r.typebox="1.3.16"),t==="npm"&&Object.assign(r,U,z);const l={name:h(e.id),version:"0.1.0",private:!0,type:"module",description:e.descriptionEn,scripts:{build:"tego-plugin-pack",watch:"tego-plugin-pack --watch",dev:"tego-plugin dev","type-check":s.join(" && "),lint:"eslint .","lint:fix":"eslint . --fix",test:"vitest run"},devDependencies:Q(r)};return{path:"package.json",contents:c(l)}}i(J,"rootPackageJson");function Q(e){const t={};for(const n of Object.keys(e).sort())t[n]=e[n];return t}i(Q,"sortedRecord");function W(e){return e==="npm"?{path:"eslint.config.js",contents:H}:{path:"eslint.config.js",contents:`import baseConfig from '@tego/eslint-config';
45
46
 
46
47
  export default [
47
48
  ...baseConfig,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zhama/tego-plugin-sdk",
3
- "version": "1.36.1",
3
+ "version": "1.36.2",
4
4
  "type": "module",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.js",
@@ -103,6 +103,11 @@
103
103
  "import": "./dist/publish.js",
104
104
  "default": "./dist/publish.js"
105
105
  },
106
+ "./dev": {
107
+ "types": "./dist/dev.d.ts",
108
+ "import": "./dist/dev.js",
109
+ "default": "./dist/dev.js"
110
+ },
106
111
  "./testing": {
107
112
  "types": "./dist/testing.d.ts",
108
113
  "import": "./dist/testing.js",
@@ -124,6 +129,7 @@
124
129
  "esbuild": "^0.25.12",
125
130
  "jszip": "^3.10.1",
126
131
  "magic-string": "^0.30.21",
132
+ "tailwindcss": "^3.4.18",
127
133
  "zod": "^3.24.1",
128
134
  "zod-to-json-schema": "^3.25.2"
129
135
  },