@burdenoff/microfe-botmanor 2026.1120.22 → 2026.1120.24

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 (64) hide show
  1. package/dist/botlit/BotlitRoutes.js +37 -33
  2. package/dist/botlit/BotlitRoutes.js.map +1 -1
  3. package/dist/botlit/BotmanorRootInner.js +46 -45
  4. package/dist/botlit/BotmanorRootInner.js.map +1 -1
  5. package/dist/botlit/components/PlanUsageCard.d.ts +2 -0
  6. package/dist/botlit/components/PlanUsageCard.js +79 -0
  7. package/dist/botlit/components/PlanUsageCard.js.map +1 -0
  8. package/dist/botlit/components/QuotaExhaustedDialog.d.ts +14 -3
  9. package/dist/botlit/components/QuotaExhaustedDialog.js +33 -13
  10. package/dist/botlit/components/QuotaExhaustedDialog.js.map +1 -1
  11. package/dist/botlit/components/StoreOwnPackagesCard.d.ts +13 -0
  12. package/dist/botlit/components/StoreOwnPackagesCard.js +101 -0
  13. package/dist/botlit/components/StoreOwnPackagesCard.js.map +1 -0
  14. package/dist/botlit/components/StorePackageDraftCard.d.ts +13 -0
  15. package/dist/botlit/components/StorePackageDraftCard.js +200 -0
  16. package/dist/botlit/components/StorePackageDraftCard.js.map +1 -0
  17. package/dist/botlit/components/StorePolicyBundleCard.d.ts +8 -0
  18. package/dist/botlit/components/StorePolicyBundleCard.js +143 -0
  19. package/dist/botlit/components/StorePolicyBundleCard.js.map +1 -0
  20. package/dist/botlit/components/StorePublishingParts.d.ts +39 -0
  21. package/dist/botlit/components/StorePublishingParts.js +95 -0
  22. package/dist/botlit/components/StorePublishingParts.js.map +1 -0
  23. package/dist/botlit/components/StoreReviewQueueCard.d.ts +13 -0
  24. package/dist/botlit/components/StoreReviewQueueCard.js +131 -0
  25. package/dist/botlit/components/StoreReviewQueueCard.js.map +1 -0
  26. package/dist/botlit/components/StoreSubmissionsCard.d.ts +15 -0
  27. package/dist/botlit/components/StoreSubmissionsCard.js +168 -0
  28. package/dist/botlit/components/StoreSubmissionsCard.js.map +1 -0
  29. package/dist/botlit/hooks/usePlanUsage.d.ts +19 -0
  30. package/dist/botlit/hooks/usePlanUsage.js +45 -0
  31. package/dist/botlit/hooks/usePlanUsage.js.map +1 -0
  32. package/dist/botlit/hooks/useStorePublishing.d.ts +164 -0
  33. package/dist/botlit/hooks/useStorePublishing.js +234 -0
  34. package/dist/botlit/hooks/useStorePublishing.js.map +1 -0
  35. package/dist/botlit/pages/BotDetailPage.js +4 -4
  36. package/dist/botlit/pages/DashboardPage.js +151 -149
  37. package/dist/botlit/pages/DashboardPage.js.map +1 -1
  38. package/dist/botlit/pages/StorePage.js +89 -82
  39. package/dist/botlit/pages/StorePage.js.map +1 -1
  40. package/dist/botlit/pages/StorePublishingPage.d.ts +3 -0
  41. package/dist/botlit/pages/StorePublishingPage.js +77 -0
  42. package/dist/botlit/pages/StorePublishingPage.js.map +1 -0
  43. package/dist/botlit/pages/index.d.ts +1 -0
  44. package/dist/botlit/providers/QuotaGuard.d.ts +2 -0
  45. package/dist/botlit/providers/QuotaGuard.js +51 -0
  46. package/dist/botlit/providers/QuotaGuard.js.map +1 -0
  47. package/dist/botlit/providers/quotaGuardContext.d.ts +11 -0
  48. package/dist/botlit/providers/quotaGuardContext.js +9 -0
  49. package/dist/botlit/providers/quotaGuardContext.js.map +1 -0
  50. package/dist/botlit/utils/quotaErrors.d.ts +48 -0
  51. package/dist/botlit/utils/quotaErrors.js +118 -0
  52. package/dist/botlit/utils/quotaErrors.js.map +1 -0
  53. package/dist/botlit/utils/storePublishing.d.ts +19 -0
  54. package/dist/botlit/utils/storePublishing.js +65 -0
  55. package/dist/botlit/utils/storePublishing.js.map +1 -0
  56. package/dist/botlit/utils/watchPlanLimits.d.ts +12 -0
  57. package/dist/botlit/utils/watchPlanLimits.js +27 -0
  58. package/dist/botlit/utils/watchPlanLimits.js.map +1 -0
  59. package/dist/generated/wspace-operations.d.ts +816 -0
  60. package/dist/generated/wspace-operations.js +276 -127
  61. package/dist/generated/wspace-operations.js.map +1 -1
  62. package/dist/generated/wspace-types.d.ts +201 -0
  63. package/dist/generated/wspace-types.js.map +1 -1
  64. package/package.json +1 -1
@@ -0,0 +1,65 @@
1
+ // src/botlit/utils/storePublishing.ts
2
+ var e = {
3
+ AGENT: {
4
+ type: "ASSISTANT",
5
+ systemPrompt: "",
6
+ capabilities: []
7
+ },
8
+ APP: {
9
+ type: "CHATBOT",
10
+ routingStrategy: "SINGLE_AGENT",
11
+ welcomeMessage: ""
12
+ },
13
+ PROMPT_TEMPLATE: {
14
+ templateText: "",
15
+ variables: []
16
+ },
17
+ SKILL: {
18
+ promptTemplate: "",
19
+ capabilityFlags: { requiresTools: !1 }
20
+ },
21
+ RETRIEVAL_PROFILE: {
22
+ strategyMode: "HYBRID",
23
+ topK: 5,
24
+ citationsRequired: !0
25
+ },
26
+ POLICY_BUNDLE: { policies: [] },
27
+ MCP_PACK: { tools: [] },
28
+ CHANNEL_TEMPLATE: {
29
+ platform: "",
30
+ defaultRoutes: []
31
+ },
32
+ A2A_AGENT: { agentCard: {} },
33
+ KB_TEMPLATE: { chunking: {
34
+ strategy: "RECURSIVE",
35
+ size: 800
36
+ } }
37
+ }, t = "flex h-10 w-full rounded-md border border-border-default bg-bg-surface px-3 py-2 text-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)]", n = () => ({
38
+ id: null,
39
+ kind: "AGENT",
40
+ name: "",
41
+ slug: "",
42
+ version: "1.0.0",
43
+ description: "",
44
+ content: JSON.stringify(e.AGENT, null, 2),
45
+ readme: ""
46
+ });
47
+ function r(e) {
48
+ let t = e.manifest ?? {};
49
+ return {
50
+ id: e.id,
51
+ kind: e.kind,
52
+ name: typeof t.name == "string" ? t.name : "",
53
+ slug: e.slug,
54
+ version: e.version,
55
+ description: typeof t.description == "string" ? t.description : "",
56
+ content: JSON.stringify(t.content ?? {}, null, 2),
57
+ readme: e.readme ?? ""
58
+ };
59
+ }
60
+ function i(e, t) {
61
+ return e instanceof Error && e.message ? e.message : t;
62
+ }
63
+ export { e as KIND_TEMPLATES, t as SELECT_CLASS, r as draftFormFrom, n as emptyDraftForm, i as errorMessage };
64
+
65
+ //# sourceMappingURL=storePublishing.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"storePublishing.js","names":["KIND_TEMPLATES","SELECT_CLASS","emptyDraftForm","draftFormFrom","manifest","submission","errorMessage","error","fallback"],"sources":["../../../src/botlit/utils/storePublishing.ts"],"sourcesContent":["/**\n * Store publishing form model (BOFF-15360)\n * @module botlit/utils\n *\n * The package draft form, its starting content per kind, and small helpers\n * shared by the store publishing components.\n */\n\nimport type { StoreSubmissionRecord } from '../hooks/useStorePublishing';\n\n/** Kinds a workspace can publish, with a starting content template for each. */\nexport const KIND_TEMPLATES: Record<string, Record<string, unknown>> = {\n AGENT: { type: 'ASSISTANT', systemPrompt: '', capabilities: [] },\n APP: { type: 'CHATBOT', routingStrategy: 'SINGLE_AGENT', welcomeMessage: '' },\n PROMPT_TEMPLATE: { templateText: '', variables: [] },\n SKILL: { promptTemplate: '', capabilityFlags: { requiresTools: false } },\n RETRIEVAL_PROFILE: { strategyMode: 'HYBRID', topK: 5, citationsRequired: true },\n POLICY_BUNDLE: { policies: [] },\n MCP_PACK: { tools: [] },\n CHANNEL_TEMPLATE: { platform: '', defaultRoutes: [] },\n A2A_AGENT: { agentCard: {} },\n KB_TEMPLATE: { chunking: { strategy: 'RECURSIVE', size: 800 } },\n};\n\nexport const SELECT_CLASS =\n 'flex h-10 w-full rounded-md border border-border-default bg-bg-surface px-3 py-2 text-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)]';\n\n/** The package draft form. `id` is set once the draft is saved. */\nexport interface DraftForm {\n id: string | null;\n kind: string;\n name: string;\n slug: string;\n version: string;\n description: string;\n content: string;\n readme: string;\n}\n\nexport const emptyDraftForm = (): DraftForm => ({\n id: null,\n kind: 'AGENT',\n name: '',\n slug: '',\n version: '1.0.0',\n description: '',\n content: JSON.stringify(KIND_TEMPLATES.AGENT, null, 2),\n readme: '',\n});\n\n/** The form for editing a saved submission. */\nexport function draftFormFrom(submission: StoreSubmissionRecord): DraftForm {\n const manifest = submission.manifest ?? {};\n return {\n id: submission.id,\n kind: submission.kind,\n name: typeof manifest.name === 'string' ? manifest.name : '',\n slug: submission.slug,\n version: submission.version,\n description: typeof manifest.description === 'string' ? manifest.description : '',\n content: JSON.stringify(manifest.content ?? {}, null, 2),\n readme: submission.readme ?? '',\n };\n}\n\nexport function errorMessage(error: unknown, fallback: string): string {\n return error instanceof Error && error.message ? error.message : fallback;\n}\n"],"mappings":";AAWA,IAAaA,IAA0D;CACrE,OAAO;EAAE,MAAM;EAAa,cAAc;EAAI,cAAc,CAAC;CAAE;CAC/D,KAAK;EAAE,MAAM;EAAW,iBAAiB;EAAgB,gBAAgB;CAAG;CAC5E,iBAAiB;EAAE,cAAc;EAAI,WAAW,CAAC;CAAE;CACnD,OAAO;EAAE,gBAAgB;EAAI,iBAAiB,EAAE,eAAe,GAAM;CAAE;CACvE,mBAAmB;EAAE,cAAc;EAAU,MAAM;EAAG,mBAAmB;CAAK;CAC9E,eAAe,EAAE,UAAU,CAAC,EAAE;CAC9B,UAAU,EAAE,OAAO,CAAC,EAAE;CACtB,kBAAkB;EAAE,UAAU;EAAI,eAAe,CAAC;CAAE;CACpD,WAAW,EAAE,WAAW,CAAC,EAAE;CAC3B,aAAa,EAAE,UAAU;EAAE,UAAU;EAAa,MAAM;CAAI,EAAE;AAChE,GAEaC,IACX,yLAcWC,WAAmC;CAC9C,IAAI;CACJ,MAAM;CACN,MAAM;CACN,MAAM;CACN,SAAS;CACT,aAAa;CACb,SAAS,KAAK,UAAUF,EAAe,OAAO,MAAM,CAAC;CACrD,QAAQ;AACV;AAGA,SAAgBG,EAAc,GAA8C;CAC1E,IAAMC,IAAWC,EAAW,YAAY,CAAC;CACzC,OAAO;EACL,IAAIA,EAAW;EACf,MAAMA,EAAW;EACjB,MAAM,OAAOD,EAAS,QAAS,WAAWA,EAAS,OAAO;EAC1D,MAAMC,EAAW;EACjB,SAASA,EAAW;EACpB,aAAa,OAAOD,EAAS,eAAgB,WAAWA,EAAS,cAAc;EAC/E,SAAS,KAAK,UAAUA,EAAS,WAAW,CAAC,GAAG,MAAM,CAAC;EACvD,QAAQC,EAAW,UAAU;CAC/B;AACF;AAEA,SAAgBC,EAAa,GAAgB,GAA0B;CACrE,OAAOC,aAAiB,SAASA,EAAM,UAAUA,EAAM,UAAUC;AACnE"}
@@ -0,0 +1,12 @@
1
+ import { PlanLimitError } from './quotaErrors';
2
+ interface MutatingClient {
3
+ mutate: (options: never) => Promise<unknown>;
4
+ }
5
+ /**
6
+ * Wraps a GraphQL client so `onLimit` hears about every mutation that fails
7
+ * on a plan limit, whether Apollo rejects or resolves with `result.error`.
8
+ * Everything else passes through to the client untouched (methods stay bound
9
+ * to it, so Apollo's private state keeps working).
10
+ */
11
+ export declare function watchPlanLimits<T extends MutatingClient>(client: T, onLimit: (error: PlanLimitError) => void): T;
12
+ export {};
@@ -0,0 +1,27 @@
1
+ import { findPlanLimitError as e } from "./quotaErrors.js";
2
+ // src/botlit/utils/watchPlanLimits.ts
3
+ function t(t, n) {
4
+ let r = (t) => {
5
+ let r = e(t);
6
+ r && n(r);
7
+ }, i = async (e) => {
8
+ try {
9
+ let n = await t.mutate(e);
10
+ if (typeof n == "object" && n) {
11
+ let e = n.error;
12
+ e == null ? "errors" in n && r(n) : r(e);
13
+ }
14
+ return n;
15
+ } catch (e) {
16
+ throw r(e), e;
17
+ }
18
+ }, a = /* @__PURE__ */ new Map();
19
+ return new Proxy(t, { get(e, t) {
20
+ if (t === "mutate") return i;
21
+ let n = Reflect.get(e, t, e);
22
+ return typeof n == "function" ? (a.has(t) || a.set(t, n.bind(e)), a.get(t)) : n;
23
+ } });
24
+ }
25
+ export { t as watchPlanLimits };
26
+
27
+ //# sourceMappingURL=watchPlanLimits.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"watchPlanLimits.js","names":["watchPlanLimits","report","limit","findPlanLimitError","failure","onLimit","mutate","result","client","options","bound","property","value","target"],"sources":["../../../src/botlit/utils/watchPlanLimits.ts"],"sourcesContent":["/**\n * Plan-limit watching for a GraphQL client (BOFF-15484)\n * @module botlit/utils\n *\n * Used by `providers/QuotaGuard.tsx`; kept out of the component file so Fast\n * Refresh can preserve the provider's state.\n */\n\nimport { findPlanLimitError, type PlanLimitError } from './quotaErrors';\n\ninterface MutatingClient {\n // `never` so any client's mutate (whatever its options type) fits; the\n // wrapper only forwards the options it was given, untouched.\n mutate: (options: never) => Promise<unknown>;\n}\n\n/**\n * Wraps a GraphQL client so `onLimit` hears about every mutation that fails\n * on a plan limit, whether Apollo rejects or resolves with `result.error`.\n * Everything else passes through to the client untouched (methods stay bound\n * to it, so Apollo's private state keeps working).\n */\nexport function watchPlanLimits<T extends MutatingClient>(\n client: T,\n onLimit: (error: PlanLimitError) => void\n): T {\n const report = (failure: unknown) => {\n const limit = findPlanLimitError(failure);\n if (limit) onLimit(limit);\n };\n const mutate = async (options: never): Promise<unknown> => {\n try {\n const result = await client.mutate(options);\n if (result !== null && typeof result === 'object') {\n // Apollo v4 resolves with `error`; an `errorPolicy: 'all'` caller gets `errors`.\n const failure = (result as { error?: unknown }).error;\n if (failure != null) report(failure);\n else if ('errors' in result) report(result);\n }\n return result;\n } catch (failure) {\n report(failure);\n throw failure;\n }\n };\n const bound = new Map<PropertyKey, unknown>();\n return new Proxy(client, {\n get(target, property) {\n if (property === 'mutate') return mutate;\n const value: unknown = Reflect.get(target, property, target);\n if (typeof value !== 'function') return value;\n // Stable identity per method, bound to the real client.\n if (!bound.has(property)) {\n bound.set(property, (value as (...args: unknown[]) => unknown).bind(target));\n }\n return bound.get(property);\n },\n });\n}\n"],"mappings":";;AAsBA,SAAgBA,EACd,GACA,GACG;CACH,IAAMC,KAAU,MAAqB;EACnC,IAAMC,IAAQC,EAAmBC,CAAO;EACxC,AAAIF,KAAOG,EAAQH,CAAK;CAC1B,GACMI,IAAS,OAAO,MAAqC;EACzD,IAAI;GACF,IAAMC,IAAS,MAAMC,EAAO,OAAOC,CAAO;GAC1C,IAAuB,OAAOF,KAAW,YAArCA,GAA+C;IAEjD,IAAMH,IAAWG,EAA+B;IAChD,AAAIH,KAAW,OACN,YAAYG,KAAQN,EAAOM,CAAM,IADrBN,EAAOG,CAAO;GAErC;GACA,OAAOG;EACT,SAASH,GAAS;GAEhB,MADAH,EAAOG,CAAO,GACRA;EACR;CACF,GACMM,oBAAQ,IAAI,IAA0B;CAC5C,OAAO,IAAI,MAAMF,GAAQ,EACvB,IAAI,GAAQ,GAAU;EACpB,IAAIG,MAAa,UAAU,OAAOL;EAClC,IAAMM,IAAiB,QAAQ,IAAIC,GAAQF,GAAUE,CAAM;EAM3D,OALI,OAAOD,KAAU,cAEhBF,EAAM,IAAIC,CAAQ,KACrBD,EAAM,IAAIC,GAAWC,EAA0C,KAAKC,CAAM,CAAC,GAEtEH,EAAM,IAAIC,CAAQ,KALeC;CAM1C,EACF,CAAC;AACH"}