@pagelines/sdk 1.0.643 → 1.0.644

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.
package/README.md CHANGED
@@ -396,7 +396,7 @@ const andrew = getDemoAgentByHandle('andrew')
396
396
 
397
397
  **Public-Only Access**: `getPublicAgent()` and `getAgentByEmail()` only return agents with `visibility: 'public'`.
398
398
 
399
- **Authentication Required**: User operations require valid JWT token in `sdk.token.value`.
399
+ **Authentication Required**: User operations require a valid opaque session token in `sdk.token.value`.
400
400
 
401
401
  **Rate Limiting**: Widget includes 10 comments/hour per agent, 100 likes/hour (future).
402
402
 
@@ -1,6 +1,6 @@
1
1
  var M = Object.defineProperty;
2
2
  var m = (e, l) => M(e, "name", { value: l, configurable: !0 });
3
- import { defineComponent as $, ref as y, onMounted as g, openBlock as s, createElementBlock as c, createElementVNode as i, normalizeClass as d, computed as C, watch as E, onUnmounted as A, createBlock as x, Teleport as V, createVNode as h, Transition as k, withCtx as w, createCommentVNode as n, normalizeProps as L, guardReactiveProps as S, withModifiers as T, toDisplayString as N, renderSlot as z } from "vue";
3
+ import { defineComponent as $, ref as v, onMounted as g, openBlock as s, createElementBlock as c, createElementVNode as i, normalizeClass as d, computed as C, watch as E, onUnmounted as A, createBlock as x, Teleport as V, createVNode as h, Transition as k, withCtx as w, createCommentVNode as n, normalizeProps as L, guardReactiveProps as S, withModifiers as T, toDisplayString as N, renderSlot as z } from "vue";
4
4
  const j = ["aria-label"], P = { class: "absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-[28px] h-[28px] overflow-hidden" }, U = /* @__PURE__ */ $({
5
5
  name: "FClose",
6
6
  __name: "FClose",
@@ -9,7 +9,7 @@ const j = ["aria-label"], P = { class: "absolute top-1/2 left-1/2 -translate-x-1
9
9
  },
10
10
  emits: ["click"],
11
11
  setup(e) {
12
- const l = y(!1);
12
+ const l = v(!1);
13
13
  return g(() => {
14
14
  setTimeout(() => {
15
15
  l.value = !0;
@@ -33,7 +33,7 @@ const j = ["aria-label"], P = { class: "absolute top-1/2 left-1/2 -translate-x-1
33
33
  ])
34
34
  ], 8, j));
35
35
  }
36
- }), D = { class: "flex h-full overflow-scroll no-scrollbar items-center justify-center text-center p-4 py-8" }, K = {
36
+ }), D = { class: "flex min-h-full items-center justify-center text-center p-4" }, K = {
37
37
  key: 0,
38
38
  class: "text-base p-4 font-semibold"
39
39
  }, R = {
@@ -58,7 +58,7 @@ const j = ["aria-label"], P = { class: "absolute top-1/2 left-1/2 -translate-x-1
58
58
  },
59
59
  emits: ["update:vis", "close", "escape"],
60
60
  setup(e, { emit: l }) {
61
- const u = l, o = y(!1);
61
+ const u = l, o = v(!1);
62
62
  function r(t) {
63
63
  const { reason: a } = t;
64
64
  u("update:vis", !1), u("close", !0), a === "escape" && u("escape", !0);
@@ -66,7 +66,7 @@ const j = ["aria-label"], P = { class: "absolute top-1/2 left-1/2 -translate-x-1
66
66
  m(r, "close");
67
67
  const F = C(() => {
68
68
  const t = e.modalClass ? [e.modalClass] : ["max-w-screen-md p-24"], a = e.styleClass ? [e.styleClass] : ["bg-theme-0", "shadow-xl"];
69
- return e.fullScreen ? t.push("fixed inset-0") : t.push("rounded-2xl my-6 mx-3"), [
69
+ return e.fullScreen ? t.push("fixed inset-0") : t.push("rounded-2xl"), [
70
70
  "relative",
71
71
  "text-left",
72
72
  "transform",
@@ -76,7 +76,7 @@ const j = ["aria-label"], P = { class: "absolute top-1/2 left-1/2 -translate-x-1
76
76
  ...t,
77
77
  ...a
78
78
  ];
79
- }), v = y(!1), f = [];
79
+ }), y = v(!1), f = [];
80
80
  function b(t) {
81
81
  t.key === "Escape" && e.vis && r({ reason: "escape" });
82
82
  }
@@ -85,7 +85,7 @@ const j = ["aria-label"], P = { class: "absolute top-1/2 left-1/2 -translate-x-1
85
85
  const t = E(
86
86
  () => e.vis,
87
87
  (a) => {
88
- a ? setTimeout(() => v.value = !0, 300) : v.value = !1;
88
+ a ? setTimeout(() => y.value = !0, 300) : y.value = !1;
89
89
  },
90
90
  { immediate: !0 }
91
91
  );
@@ -137,7 +137,7 @@ const j = ["aria-label"], P = { class: "absolute top-1/2 left-1/2 -translate-x-1
137
137
  _: 1
138
138
  }),
139
139
  i("div", {
140
- class: "fixed inset-0 z-40 overflow-y-auto",
140
+ class: "fixed inset-0 z-40 overflow-y-auto overscroll-contain no-scrollbar",
141
141
  onClick: a[3] || (a[3] = (p) => r({ reason: "escape" }))
142
142
  }, [
143
143
  i("div", D, [
@@ -1 +1 @@
1
- {"version":3,"file":"FModal.vue_vue_type_script_setup_true_lang.js","sources":["../../../src/ui/common/FClose.vue","../../../src/ui/common/FModal.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { onMounted, ref } from 'vue'\n\ndefineOptions({ name: 'FClose' })\n\ndefineProps<{\n ariaLabel?: string\n}>()\n\ndefineEmits<{\n click: [event: MouseEvent]\n}>()\n\nconst inView = ref(false)\n\nonMounted(() => {\n setTimeout(() => {\n inView.value = true\n }, 100)\n})\n</script>\n\n<template>\n <button\n type=\"button\"\n :aria-label=\"ariaLabel || 'Close'\"\n class=\"close block cursor-pointer w-[60px] h-[60px] rounded-full transition-all duration-1000 ease-[cubic-bezier(0.25,1,0.33,1)] hover:scale-110 active:scale-90 hover:rotate-90\"\n @click=\"$emit('click', $event)\"\n >\n <!-- Background circle (invisible, for hover area) -->\n <span class=\"absolute inset-0 rounded-full transition-all\" />\n\n <!-- Close lines container -->\n <span class=\"absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-[28px] h-[28px] overflow-hidden\">\n <!-- Line 1 - animates from bottom-left to center, rotates 45deg -->\n <span\n class=\"absolute h-full w-[3px] rounded-[5px] left-[13px] transition-all duration-[400ms] ease-[cubic-bezier(0.52,0.01,0.16,1)]\"\n :class=\"inView ? 'translate-y-0 translate-x-0 rotate-45' : 'translate-y-[30px] -translate-x-[30px] rotate-0'\"\n style=\"background-color: currentColor; transition-delay: 0.15s\"\n />\n\n <!-- Line 2 - animates from top-left to center, rotates -45deg -->\n <span\n class=\"absolute h-full w-[3px] rounded-[5px] left-[13px] transition-all duration-[400ms] ease-[cubic-bezier(0.52,0.01,0.16,1)]\"\n :class=\"inView ? 'translate-y-0 translate-x-0 -rotate-45' : '-translate-y-[30px] -translate-x-[30px] rotate-0'\"\n style=\"background-color: currentColor; transition-delay: 0.45s\"\n />\n </span>\n </button>\n</template>\n","<script lang=\"ts\" setup>\nimport { computed, onMounted, onUnmounted, ref, watch } from 'vue'\nimport FClose from './FClose.vue'\n\ndefineOptions({ name: 'FModal' })\n\nconst {\n vis = false,\n modalClass,\n styleClass,\n fullScreen = false,\n hasClose = false,\n title = '',\n transitionMode = 'modal',\n teleportTo = 'body',\n disableTeleport = false,\n} = defineProps<{\n vis?: boolean\n modalClass?: string\n styleClass?: string\n fullScreen?: boolean\n hasClose?: boolean\n title?: string\n transitionMode?: 'modal' | 'slideUp'\n teleportTo?: string | Element\n disableTeleport?: boolean\n}>()\n\nconst emit = defineEmits<{\n 'update:vis': [value: boolean]\n 'close': [value: boolean]\n 'escape': [value: boolean]\n}>()\n\nconst isMounted = ref(false)\n\nfunction close(args: { reason: 'escape' | 'reset' }): void {\n const { reason } = args\n emit('update:vis', false)\n emit('close', true)\n if (reason === 'escape')\n emit('escape', true)\n}\n\nconst classes = computed(() => {\n const cls = modalClass ? [modalClass] : ['max-w-screen-md p-24']\n const style = styleClass ? [styleClass] : ['bg-theme-0', 'shadow-xl']\n\n if (fullScreen)\n cls.push('fixed inset-0')\n else\n cls.push('rounded-2xl my-6 mx-3')\n\n return [\n 'relative',\n 'text-left',\n 'transform',\n 'transition-all',\n 'w-full',\n 'overflow-hidden',\n ...cls,\n ...style,\n ]\n})\n\nconst afterVisible = ref(false)\nconst cleanups: (() => void)[] = []\n\nfunction onKeydown(event: KeyboardEvent): void {\n if (event.key === 'Escape' && vis)\n close({ reason: 'escape' })\n}\n\nonMounted(async () => {\n isMounted.value = true\n\n const unwatch = watch(\n () => vis,\n (vis) => {\n if (vis) {\n setTimeout(() => (afterVisible.value = true), 300)\n } else {\n afterVisible.value = false\n }\n },\n { immediate: true },\n )\n\n cleanups.push(unwatch)\n\n if (typeof document !== 'undefined') {\n document.addEventListener('keydown', onKeydown)\n cleanups.push(() => document.removeEventListener('keydown', onKeydown))\n }\n})\n\nonUnmounted(() => {\n cleanups.forEach((c) => c())\n})\n\nconst modalTransition = computed(() => {\n if (transitionMode === 'slideUp') {\n return {\n enterActiveClass: 'ease-[cubic-bezier(0.25,1,0.33,1)] duration-500',\n enterFromClass: 'opacity-0 translate-y-full scale-95',\n enterToClass: 'opacity-100 translate-y-0 scale-100',\n leaveActiveClass: 'ease-[cubic-bezier(0.25,1,0.33,1)] duration-500',\n leaveFromClass: 'opacity-100 translate-y-0 scale-100',\n leaveToClass: 'opacity-0 translate-y-full scale-95',\n }\n }\n return {\n enterActiveClass: 'ease-[cubic-bezier(0.25,1,0.33,1)] duration-500',\n enterFromClass: 'opacity-0 scale-75',\n enterToClass: 'opacity-100 translate-y-0 scale-100',\n leaveActiveClass: 'ease-[cubic-bezier(0.25,1,0.33,1)] duration-500',\n leaveFromClass: 'opacity-100 translate-y-0 scale-100',\n leaveToClass: 'opacity-0 scale-75',\n }\n})\n</script>\n\n<script lang=\"ts\">\nexport default {\n inheritAttrs: false,\n}\n</script>\n\n<template>\n <Teleport v-if=\"isMounted\" :to=\"teleportTo\" :disabled=\"disableTeleport\">\n <div\n class=\"fixed inset-0 z-50\"\n aria-labelledby=\"modal-title\"\n role=\"dialog\"\n aria-modal=\"true\"\n :class=\"!vis ? 'pointer-events-none' : ''\"\n >\n <Transition\n enter-active-class=\"ease-out duration-300\"\n enter-from-class=\"opacity-0\"\n enter-to-class=\"opacity-100\"\n leave-active-class=\"ease-in duration-200\"\n leave-from-class=\"opacity-100\"\n leave-to-class=\"opacity-0\"\n >\n <div\n v-if=\"vis\"\n class=\"fixed inset-0 bg-theme-800/60 active:bg-theme-800/80 cursor-pointer dark:bg-theme-600/90 backdrop-blur-sm transition-opacity\"\n @click=\"close({ reason: 'escape' })\"\n />\n </Transition>\n <div\n class=\"fixed inset-0 z-40 overflow-y-auto\"\n @click=\"close({ reason: 'escape' })\"\n >\n <div class=\"flex h-full overflow-scroll no-scrollbar items-center justify-center text-center p-4 py-8\">\n <Transition v-bind=\"modalTransition\">\n <div\n v-if=\"vis\"\n :class=\"classes\"\n class=\"w-full\"\n @click.stop\n >\n <div\n v-if=\"hasClose || title || $slots.actions\"\n :class=\"!title && (hasClose || $slots.actions) ? 'absolute top-0 right-0 z-10' : 'flex justify-between items-center'\"\n >\n <h2 v-if=\"title\" class=\"text-base p-4 font-semibold\">\n {{ title }}\n </h2>\n <div v-if=\"hasClose || $slots.actions\" class=\"flex items-center gap-2 px-2\">\n <slot name=\"actions\" />\n <FClose\n v-if=\"hasClose\"\n class=\"relative\"\n data-test-id=\"close-modal\"\n @click.stop=\"close({ reason: 'escape' })\"\n />\n </div>\n </div>\n <slot />\n </div>\n </Transition>\n </div>\n </div>\n </div>\n </Teleport>\n</template>\n"],"names":["inView","ref","onMounted","_createElementBlock","__props","_cache","$event","$emit","_createElementVNode","_hoisted_2","_normalizeClass","__default__","emit","__emit","isMounted","close","args","reason","__name","classes","computed","cls","style","afterVisible","cleanups","onKeydown","event","unwatch","watch","vis","onUnmounted","c","modalTransition","_createBlock","_Teleport","_createVNode","_Transition","_hoisted_1","$slots","_toDisplayString","_openBlock","_hoisted_3","_renderSlot","_ctx","FClose"],"mappings":";;;;;;;;;;;AAaA,UAAMA,IAASC,EAAI,EAAK;AAExB,WAAAC,EAAU,MAAM;AACd,iBAAW,MAAM;AACf,QAAAF,EAAO,QAAQ;AAAA,MACjB,GAAG,GAAG;AAAA,IACR,CAAC,mBAICG,EAyBS,UAAA;AAAA,MAxBP,MAAK;AAAA,MACJ,cAAYC,EAAA,aAAS;AAAA,MACtB,OAAM;AAAA,MACL,SAAKC,EAAA,CAAA,MAAAA,EAAA,CAAA,IAAA,CAAAC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":"FModal.vue_vue_type_script_setup_true_lang.js","sources":["../../../src/ui/common/FClose.vue","../../../src/ui/common/FModal.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { onMounted, ref } from 'vue'\n\ndefineOptions({ name: 'FClose' })\n\ndefineProps<{\n ariaLabel?: string\n}>()\n\ndefineEmits<{\n click: [event: MouseEvent]\n}>()\n\nconst inView = ref(false)\n\nonMounted(() => {\n setTimeout(() => {\n inView.value = true\n }, 100)\n})\n</script>\n\n<template>\n <button\n type=\"button\"\n :aria-label=\"ariaLabel || 'Close'\"\n class=\"close block cursor-pointer w-[60px] h-[60px] rounded-full transition-all duration-1000 ease-[cubic-bezier(0.25,1,0.33,1)] hover:scale-110 active:scale-90 hover:rotate-90\"\n @click=\"$emit('click', $event)\"\n >\n <!-- Background circle (invisible, for hover area) -->\n <span class=\"absolute inset-0 rounded-full transition-all\" />\n\n <!-- Close lines container -->\n <span class=\"absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-[28px] h-[28px] overflow-hidden\">\n <!-- Line 1 - animates from bottom-left to center, rotates 45deg -->\n <span\n class=\"absolute h-full w-[3px] rounded-[5px] left-[13px] transition-all duration-[400ms] ease-[cubic-bezier(0.52,0.01,0.16,1)]\"\n :class=\"inView ? 'translate-y-0 translate-x-0 rotate-45' : 'translate-y-[30px] -translate-x-[30px] rotate-0'\"\n style=\"background-color: currentColor; transition-delay: 0.15s\"\n />\n\n <!-- Line 2 - animates from top-left to center, rotates -45deg -->\n <span\n class=\"absolute h-full w-[3px] rounded-[5px] left-[13px] transition-all duration-[400ms] ease-[cubic-bezier(0.52,0.01,0.16,1)]\"\n :class=\"inView ? 'translate-y-0 translate-x-0 -rotate-45' : '-translate-y-[30px] -translate-x-[30px] rotate-0'\"\n style=\"background-color: currentColor; transition-delay: 0.45s\"\n />\n </span>\n </button>\n</template>\n","<script lang=\"ts\" setup>\nimport { computed, onMounted, onUnmounted, ref, watch } from 'vue'\nimport FClose from './FClose.vue'\n\ndefineOptions({ name: 'FModal' })\n\nconst {\n vis = false,\n modalClass,\n styleClass,\n fullScreen = false,\n hasClose = false,\n title = '',\n transitionMode = 'modal',\n teleportTo = 'body',\n disableTeleport = false,\n} = defineProps<{\n vis?: boolean\n modalClass?: string\n styleClass?: string\n fullScreen?: boolean\n hasClose?: boolean\n title?: string\n transitionMode?: 'modal' | 'slideUp'\n teleportTo?: string | Element\n disableTeleport?: boolean\n}>()\n\nconst emit = defineEmits<{\n 'update:vis': [value: boolean]\n 'close': [value: boolean]\n 'escape': [value: boolean]\n}>()\n\nconst isMounted = ref(false)\n\nfunction close(args: { reason: 'escape' | 'reset' }): void {\n const { reason } = args\n emit('update:vis', false)\n emit('close', true)\n if (reason === 'escape')\n emit('escape', true)\n}\n\nconst classes = computed(() => {\n const cls = modalClass ? [modalClass] : ['max-w-screen-md p-24']\n const style = styleClass ? [styleClass] : ['bg-theme-0', 'shadow-xl']\n\n if (fullScreen)\n cls.push('fixed inset-0')\n else\n cls.push('rounded-2xl')\n\n return [\n 'relative',\n 'text-left',\n 'transform',\n 'transition-all',\n 'w-full',\n 'overflow-hidden',\n ...cls,\n ...style,\n ]\n})\n\nconst afterVisible = ref(false)\nconst cleanups: (() => void)[] = []\n\nfunction onKeydown(event: KeyboardEvent): void {\n if (event.key === 'Escape' && vis)\n close({ reason: 'escape' })\n}\n\nonMounted(async () => {\n isMounted.value = true\n\n const unwatch = watch(\n () => vis,\n (vis) => {\n if (vis) {\n setTimeout(() => (afterVisible.value = true), 300)\n } else {\n afterVisible.value = false\n }\n },\n { immediate: true },\n )\n\n cleanups.push(unwatch)\n\n if (typeof document !== 'undefined') {\n document.addEventListener('keydown', onKeydown)\n cleanups.push(() => document.removeEventListener('keydown', onKeydown))\n }\n})\n\nonUnmounted(() => {\n cleanups.forEach((c) => c())\n})\n\nconst modalTransition = computed(() => {\n if (transitionMode === 'slideUp') {\n return {\n enterActiveClass: 'ease-[cubic-bezier(0.25,1,0.33,1)] duration-500',\n enterFromClass: 'opacity-0 translate-y-full scale-95',\n enterToClass: 'opacity-100 translate-y-0 scale-100',\n leaveActiveClass: 'ease-[cubic-bezier(0.25,1,0.33,1)] duration-500',\n leaveFromClass: 'opacity-100 translate-y-0 scale-100',\n leaveToClass: 'opacity-0 translate-y-full scale-95',\n }\n }\n return {\n enterActiveClass: 'ease-[cubic-bezier(0.25,1,0.33,1)] duration-500',\n enterFromClass: 'opacity-0 scale-75',\n enterToClass: 'opacity-100 translate-y-0 scale-100',\n leaveActiveClass: 'ease-[cubic-bezier(0.25,1,0.33,1)] duration-500',\n leaveFromClass: 'opacity-100 translate-y-0 scale-100',\n leaveToClass: 'opacity-0 scale-75',\n }\n})\n</script>\n\n<script lang=\"ts\">\nexport default {\n inheritAttrs: false,\n}\n</script>\n\n<template>\n <Teleport v-if=\"isMounted\" :to=\"teleportTo\" :disabled=\"disableTeleport\">\n <div\n class=\"fixed inset-0 z-50\"\n aria-labelledby=\"modal-title\"\n role=\"dialog\"\n aria-modal=\"true\"\n :class=\"!vis ? 'pointer-events-none' : ''\"\n >\n <Transition\n enter-active-class=\"ease-out duration-300\"\n enter-from-class=\"opacity-0\"\n enter-to-class=\"opacity-100\"\n leave-active-class=\"ease-in duration-200\"\n leave-from-class=\"opacity-100\"\n leave-to-class=\"opacity-0\"\n >\n <div\n v-if=\"vis\"\n class=\"fixed inset-0 bg-theme-800/60 active:bg-theme-800/80 cursor-pointer dark:bg-theme-600/90 backdrop-blur-sm transition-opacity\"\n @click=\"close({ reason: 'escape' })\"\n />\n </Transition>\n <div\n class=\"fixed inset-0 z-40 overflow-y-auto overscroll-contain no-scrollbar\"\n @click=\"close({ reason: 'escape' })\"\n >\n <!-- min-h-full, never h-full: a taller-than-viewport panel must grow this\n row so the outer layer scrolls; h-full + items-center centers the\n overflow and clips the modal top unreachably. p-4 = the 1em minimum\n viewport gap for tall modals. -->\n <div class=\"flex min-h-full items-center justify-center text-center p-4\">\n <Transition v-bind=\"modalTransition\">\n <div\n v-if=\"vis\"\n :class=\"classes\"\n class=\"w-full\"\n @click.stop\n >\n <div\n v-if=\"hasClose || title || $slots.actions\"\n :class=\"!title && (hasClose || $slots.actions) ? 'absolute top-0 right-0 z-10' : 'flex justify-between items-center'\"\n >\n <h2 v-if=\"title\" class=\"text-base p-4 font-semibold\">\n {{ title }}\n </h2>\n <div v-if=\"hasClose || $slots.actions\" class=\"flex items-center gap-2 px-2\">\n <slot name=\"actions\" />\n <FClose\n v-if=\"hasClose\"\n class=\"relative\"\n data-test-id=\"close-modal\"\n @click.stop=\"close({ reason: 'escape' })\"\n />\n </div>\n </div>\n <slot />\n </div>\n </Transition>\n </div>\n </div>\n </div>\n </Teleport>\n</template>\n"],"names":["inView","ref","onMounted","_createElementBlock","__props","_cache","$event","$emit","_createElementVNode","_hoisted_2","_normalizeClass","__default__","emit","__emit","isMounted","close","args","reason","__name","classes","computed","cls","style","afterVisible","cleanups","onKeydown","event","unwatch","watch","vis","onUnmounted","c","modalTransition","_createBlock","_Teleport","_createVNode","_Transition","_hoisted_1","$slots","_toDisplayString","_openBlock","_hoisted_3","_renderSlot","_ctx","FClose"],"mappings":";;;;;;;;;;;AAaA,UAAMA,IAASC,EAAI,EAAK;AAExB,WAAAC,EAAU,MAAM;AACd,iBAAW,MAAM;AACf,QAAAF,EAAO,QAAQ;AAAA,MACjB,GAAG,GAAG;AAAA,IACR,CAAC,mBAICG,EAyBS,UAAA;AAAA,MAxBP,MAAK;AAAA,MACJ,cAAYC,EAAA,aAAS;AAAA,MACtB,OAAM;AAAA,MACL,SAAKC,EAAA,CAAA,MAAAA,EAAA,CAAA,IAAA,CAAAC,MAAEC,EAAAA,MAAK,SAAUD,CAAM;AAAA,IAAA;sBAG7BE,EAA6D,QAAA,EAAvD,OAAM,+CAAA,GAA8C,MAAA,EAAA;AAAA,MAG1DA,EAcO,QAdPC,GAcO;AAAA,QAZLD,EAIE,QAAA;AAAA,UAHA,OAAKE,EAAA,CAAC,2HACEV,EAAA,QAAM,0CAAA,iDAAA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;AAAA,YAAA;;;;QAGjBP,EAqCM,OAAA;AAAA,UApCJ,OAAM;AAAA,UACL,gCAAOO,EAAK,EAAA,QAAA,UAAA;AAAA,QAAA;UAMbP,EA4BM,OA5BN6B,GA4BM;AAAA,YA3BJF,EA0BaC,OA1BOJ,EAAA,KAAe,CAAA,GAAA;AAAA,yBACjC,MAwBM;AAAA,gBAvBE5B,EAAA,YADRD,EAwBM,OAAA;AAAA;kBAtBH,OAAKO,EAAA,CAAES,EAAA,OACF,QAAQ,CAAA;AAAA,kBACb,2BAAD,MAAA;AAAA,kBAAA,GAAW,CAAA,MAAA,CAAA;AAAA,gBAAA;kBAGHf,EAAA,YAAYA,EAAA,SAASkC,EAAAA,OAAO,gBADpCnC,EAgBM,OAAA;AAAA;oBAdH,UAAQC,EAAA,UAAUA,cAAYkC,EAAAA,OAAO,WAAO,gCAAA,mCAAA;AAAA,kBAAA;oBAEnClC,EAAA,cAAVD,EAEK,MAFLM,GAEK8B,EADAnC,EAAA,KAAK,GAAA,CAAA;oBAECA,EAAA,YAAYkC,EAAAA,OAAO,WAA9BE,KAAArC,EAQM,OARNsC,GAQM;AAAA,sBAPJC,EAAuBC,EAAA,QAAA,SAAA;AAAA,sBAEfvC,EAAA,iBADR6B,EAKEW,GAAA;AAAA;wBAHA,OAAM;AAAA,wBACN,gBAAa;AAAA,wBACZ,kCAAY7B,EAAK,EAAA,QAAA,SAAA,CAAA,GAAA,CAAA,MAAA,CAAA;AAAA,sBAAA;;;kBAIxB2B,EAAQC,EAAA,QAAA,SAAA;AAAA,gBAAA;;;;;;;;;;"}
@@ -99,6 +99,12 @@ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {
99
99
  actionUrl: string;
100
100
  help?: string | undefined;
101
101
  } | undefined;
102
+ operation?: {
103
+ kind: "wake" | "sleep" | "restart" | "rebuild" | "config_apply";
104
+ status: "failed" | "running" | "coalesced";
105
+ startedAt: string;
106
+ detail?: string | undefined;
107
+ } | undefined;
102
108
  }) => any;
103
109
  }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
104
110
  onCreated?: ((agent: {
@@ -197,6 +203,12 @@ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {
197
203
  actionUrl: string;
198
204
  help?: string | undefined;
199
205
  } | undefined;
206
+ operation?: {
207
+ kind: "wake" | "sleep" | "restart" | "rebuild" | "config_apply";
208
+ status: "failed" | "running" | "coalesced";
209
+ startedAt: string;
210
+ detail?: string | undefined;
211
+ } | undefined;
200
212
  }) => any) | undefined;
201
213
  }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
202
214
  export default _default;
package/dist/api.d.ts CHANGED
@@ -1,9 +1,4 @@
1
1
  import { ApiResponse } from '@pagelines/core';
2
- export interface RefreshFetchHooks {
3
- getDeviceId: () => string | null;
4
- onAccessTokenRefreshed: (token: string) => void;
5
- onTerminalFailure: () => void;
6
- }
7
2
  export interface ApiClientSettings {
8
3
  isDev: boolean;
9
4
  apiBase?: string;
@@ -14,4 +9,10 @@ export interface ApiClientSettings {
14
9
  * Centralizes the isDev/apiBase/production URL logic used across SDK clients.
15
10
  */
16
11
  export declare function resolveApiBase(apiBase?: string, isDev?: boolean): string;
17
- export declare function createApiFetch(settings: ApiClientSettings, responseHandler?: (response: ApiResponse) => void, refreshHooks?: RefreshFetchHooks): typeof globalThis.fetch;
12
+ export declare function createApiFetch(settings: ApiClientSettings, responseHandler?: (response: ApiResponse) => void,
13
+ /**
14
+ * Fires when the server answers 401 TOKEN_ERROR — the one long-lived
15
+ * session token is dead (revoked / expired / signed out elsewhere).
16
+ * There is no refresh to attempt; the caller clears its session state.
17
+ */
18
+ onSessionDead?: () => void): typeof globalThis.fetch;
@@ -108,5 +108,11 @@ export declare function getDemoAgentByHandle(handle: string): Partial<{
108
108
  actionUrl: string;
109
109
  help?: string | undefined;
110
110
  } | undefined;
111
+ operation?: {
112
+ kind: "wake" | "sleep" | "restart" | "rebuild" | "config_apply";
113
+ status: "failed" | "running" | "coalesced";
114
+ startedAt: string;
115
+ detail?: string | undefined;
116
+ } | undefined;
111
117
  }> | undefined;
112
118
  export { staticAgents } from '@/modules/agent/static/data';