@xanots/sdk 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (106) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +384 -0
  3. package/dist/agent-file-refresh-7XCACU34.js +95 -0
  4. package/dist/bin.d.ts +1 -0
  5. package/dist/bin.js +184 -0
  6. package/dist/capture-HUV5BNTC.js +32 -0
  7. package/dist/chunk-26CNBZE2.js +963 -0
  8. package/dist/chunk-33ND6LKO.js +78 -0
  9. package/dist/chunk-3DUAGYGP.js +1550 -0
  10. package/dist/chunk-3IGNIP6R.js +89 -0
  11. package/dist/chunk-47WDWMBJ.js +14 -0
  12. package/dist/chunk-4BXJGVZ3.js +318 -0
  13. package/dist/chunk-4HT3BNZ7.js +675 -0
  14. package/dist/chunk-4YMD2OOZ.js +23 -0
  15. package/dist/chunk-5WGEURVI.js +156 -0
  16. package/dist/chunk-5YTBTF25.js +29 -0
  17. package/dist/chunk-6DHBYBTO.js +166 -0
  18. package/dist/chunk-76QBEIGO.js +66 -0
  19. package/dist/chunk-7DKX2SPN.js +100 -0
  20. package/dist/chunk-7REDODS2.js +468 -0
  21. package/dist/chunk-C56BC2FY.js +254 -0
  22. package/dist/chunk-DGSF2Q5H.js +60 -0
  23. package/dist/chunk-EMCAWMHC.js +3982 -0
  24. package/dist/chunk-EZG76F7R.js +159 -0
  25. package/dist/chunk-FJ6ZS5KB.js +3607 -0
  26. package/dist/chunk-GNPVYOPB.js +17 -0
  27. package/dist/chunk-HJPTWBLH.js +38 -0
  28. package/dist/chunk-IZW6MK3U.js +248 -0
  29. package/dist/chunk-LH6Z6KFV.js +247 -0
  30. package/dist/chunk-MZUI3JNX.js +93 -0
  31. package/dist/chunk-NDZFBZHC.js +167 -0
  32. package/dist/chunk-NOO35BQ2.js +37 -0
  33. package/dist/chunk-NUQCEOKA.js +13 -0
  34. package/dist/chunk-QTNO2WD6.js +56 -0
  35. package/dist/chunk-RVB7ITKN.js +49 -0
  36. package/dist/chunk-TRU5OHQ5.js +6904 -0
  37. package/dist/chunk-VKFQJEMW.js +814 -0
  38. package/dist/chunk-VTIL47DT.js +125 -0
  39. package/dist/chunk-WHOJWOSV.js +112 -0
  40. package/dist/chunk-WKP4D5MO.js +1692 -0
  41. package/dist/chunk-X4DVXBFY.js +38 -0
  42. package/dist/chunk-XQ22GLYS.js +118 -0
  43. package/dist/chunk-YDZYMZBE.js +670 -0
  44. package/dist/chunk-YGPIY3WT.js +1146 -0
  45. package/dist/chunk-YYRDLFSJ.js +602 -0
  46. package/dist/chunk-ZUTSMMAG.js +46 -0
  47. package/dist/cli.d.ts +331 -0
  48. package/dist/cli.js +33 -0
  49. package/dist/codegen-command-OOKK6AZK.js +40 -0
  50. package/dist/codegen.d.ts +114 -0
  51. package/dist/codegen.js +71 -0
  52. package/dist/completion-TIPPZN7H.js +298 -0
  53. package/dist/config-NL33PN4D.js +84 -0
  54. package/dist/deploy-command-4EQ7XX5G.js +451 -0
  55. package/dist/env-target-IFJ5QDHC.js +16 -0
  56. package/dist/ephemeral-command-3X3I4ULC.js +242 -0
  57. package/dist/index.d.ts +4477 -0
  58. package/dist/index.js +300 -0
  59. package/dist/init-command-R6H7ZXW5.js +27 -0
  60. package/dist/internal.d.ts +74 -0
  61. package/dist/internal.js +2065 -0
  62. package/dist/io-AMIKRLPC.js +11 -0
  63. package/dist/live-diff-Y3AKETHE.js +196 -0
  64. package/dist/lock-3CVKALKT.js +37 -0
  65. package/dist/lock-commands-XTR2YKLY.js +232 -0
  66. package/dist/login-command-ACJF6KWQ.js +167 -0
  67. package/dist/logout-command-MX3MJS5U.js +68 -0
  68. package/dist/loop-OM3P2Z6O.js +93 -0
  69. package/dist/marketplace-command-RATXTKXN.js +379 -0
  70. package/dist/meta-client-OW5WKWW7.js +170 -0
  71. package/dist/node.d.ts +59 -0
  72. package/dist/node.js +442 -0
  73. package/dist/profile-command-SWJ3SPKR.js +77 -0
  74. package/dist/release-command-VV5UVZKL.js +427 -0
  75. package/dist/response-CVAE2kMj.d.ts +1915 -0
  76. package/dist/routes-manifest-SP3ZXLMR.js +244 -0
  77. package/dist/runtime-V4C3AC3A.js +13 -0
  78. package/dist/sandbox-details-command-HJE5SPVG.js +18 -0
  79. package/dist/sandbox-export-command-QCJY4GMV.js +24 -0
  80. package/dist/static-host-D6KS7X45.js +138 -0
  81. package/dist/store-BQ97nKIF.d.ts +7760 -0
  82. package/dist/test-command-TSPBQHBM.js +383 -0
  83. package/dist/validate-command-4ERHJSCO.js +122 -0
  84. package/dist/verify-rollout-FAVQ6EJY.js +40 -0
  85. package/dist/workspace-K72NP7SX.js +49 -0
  86. package/dist/workspace-command-OF23DPNI.js +156 -0
  87. package/dist/workspace-export-AJMGN3CQ.js +10 -0
  88. package/llms/fields.md +104 -0
  89. package/llms/filters.md +183 -0
  90. package/llms/kinds-agent-mcp.md +11 -0
  91. package/llms/kinds-core.md +68 -0
  92. package/llms/kinds-realtime.md +76 -0
  93. package/llms/lambda.md +111 -0
  94. package/llms/legacy.md +43 -0
  95. package/llms/object-kinds.md +31 -0
  96. package/llms/statements-calls.md +23 -0
  97. package/llms/statements-catalog.md +309 -0
  98. package/llms/statements-data.md +58 -0
  99. package/llms/statements-runtime.md +48 -0
  100. package/llms/tests.md +58 -0
  101. package/llms/triggers.md +22 -0
  102. package/llms/values.md +29 -0
  103. package/llms-full.txt +1672 -0
  104. package/llms.txt +483 -0
  105. package/manifest.json +9592 -0
  106. package/package.json +110 -0
@@ -0,0 +1,159 @@
1
+ // src/emit/ui.ts
2
+ function resolveColor(isTTY) {
3
+ return process.env.FORCE_COLOR ? process.env.FORCE_COLOR !== "0" : !process.env.NO_COLOR && isTTY === true;
4
+ }
5
+ function makePalette(on) {
6
+ const paint = (code, s) => on ? `\x1B[${code}m${s}\x1B[0m` : s;
7
+ return {
8
+ bold: (s) => paint("1", s),
9
+ dim: (s) => paint("2", s),
10
+ green: (s) => paint("32", s),
11
+ red: (s) => paint("31", s),
12
+ yellow: (s) => paint("33", s),
13
+ cyan: (s) => paint("36", s)
14
+ };
15
+ }
16
+ var style = makePalette(resolveColor(process.stderr.isTTY));
17
+ function stderrStyle() {
18
+ return makePalette(resolveColor(process.stderr.isTTY));
19
+ }
20
+ function stdoutStyle() {
21
+ return makePalette(resolveColor(process.stdout.isTTY));
22
+ }
23
+ function formatFields(rows) {
24
+ const s = stdoutStyle();
25
+ const width = Math.max(0, ...rows.map(([label]) => label.length));
26
+ return rows.map(([label, value]) => ` ${s.dim(label.padEnd(width))} ${value}`).join("\n") + "\n";
27
+ }
28
+ function step(msg) {
29
+ process.stderr.write(`${style.cyan("\u2192")} ${msg}
30
+ `);
31
+ }
32
+ function success(msg) {
33
+ process.stderr.write(`${style.green("\u2713")} ${msg}
34
+ `);
35
+ }
36
+ function error(msg) {
37
+ process.stderr.write(`${stderrStyle().red("\u2717")} ${msg}
38
+ `);
39
+ }
40
+ function warn(msg) {
41
+ process.stderr.write(`${style.yellow("!")} ${msg}
42
+ `);
43
+ }
44
+ function info(msg) {
45
+ process.stderr.write(`${style.cyan("i")} ${msg}
46
+ `);
47
+ }
48
+ function detail(msg) {
49
+ process.stderr.write(` ${style.dim(msg)}
50
+ `);
51
+ }
52
+ function link(url) {
53
+ process.stderr.write(` ${style.bold(style.cyan(url))}
54
+ `);
55
+ }
56
+ function blank() {
57
+ process.stderr.write("\n");
58
+ }
59
+ function formatDuration(ms) {
60
+ const safe = Math.max(0, ms);
61
+ if (safe < 1e3) return `${Math.round(safe)}ms`;
62
+ if (safe < 6e4) return `${(safe / 1e3).toFixed(1)}s`;
63
+ const minutes = Math.floor(safe / 6e4);
64
+ const seconds = Math.round(safe % 6e4 / 1e3);
65
+ return `${minutes}m ${String(seconds).padStart(2, "0")}s`;
66
+ }
67
+ function elapsedSuffix(startedAt, now = Date.now()) {
68
+ return ` ${style.dim(`(${formatDuration(now - startedAt)})`)}`;
69
+ }
70
+ var SPINNER_FRAMES = ["\u280B", "\u2819", "\u2839", "\u2838", "\u283C", "\u2834", "\u2826", "\u2827", "\u2807", "\u280F"];
71
+ var SPINNER_FRAME_MS = 80;
72
+ function spinner(msg) {
73
+ let text = msg;
74
+ if (process.stderr.isTTY !== true) {
75
+ detail(msg);
76
+ return { update: () => {
77
+ }, stop: () => {
78
+ } };
79
+ }
80
+ const start = Date.now();
81
+ let frame = 0;
82
+ let live = true;
83
+ const clear = () => process.stderr.write("\r\x1B[2K");
84
+ const render = () => {
85
+ const secs = Math.round((Date.now() - start) / 1e3);
86
+ const suffix = secs >= 1 ? ` ${style.dim(`(${secs}s)`)}` : "";
87
+ clear();
88
+ process.stderr.write(`${style.cyan(SPINNER_FRAMES[frame % SPINNER_FRAMES.length])} ${style.dim(text)}${suffix}`);
89
+ frame += 1;
90
+ };
91
+ render();
92
+ const timer = setInterval(render, SPINNER_FRAME_MS);
93
+ timer.unref();
94
+ const self = {
95
+ update(next) {
96
+ text = next;
97
+ },
98
+ stop() {
99
+ if (!live) return;
100
+ live = false;
101
+ liveSpinners.delete(self);
102
+ clearInterval(timer);
103
+ clear();
104
+ }
105
+ };
106
+ liveSpinners.add(self);
107
+ return self;
108
+ }
109
+ var liveSpinners = /* @__PURE__ */ new Set();
110
+ function clearProgress() {
111
+ for (const spin of [...liveSpinners]) spin.stop();
112
+ }
113
+ async function withSpinner(msg, work) {
114
+ const spin = spinner(msg);
115
+ try {
116
+ return await work();
117
+ } finally {
118
+ spin.stop();
119
+ }
120
+ }
121
+ function formatExpiration(expiresAt) {
122
+ if (expiresAt === void 0 || expiresAt === null || expiresAt === "") return "\u2014";
123
+ const ms = typeof expiresAt === "number" ? expiresAt * 1e3 : Date.parse(String(expiresAt).replace(" ", "T"));
124
+ if (Number.isNaN(ms)) return String(expiresAt);
125
+ const diff = (ms - Date.now()) / 1e3;
126
+ if (diff <= 0) return "expired";
127
+ const hours = Math.floor(diff / 3600);
128
+ const minutes = Math.floor(diff % 3600 / 60);
129
+ return `in ${hours}h ${minutes}m`;
130
+ }
131
+ function hostLabel(origin) {
132
+ try {
133
+ return new URL(origin).host;
134
+ } catch {
135
+ return origin.replace(/^https?:\/\//, "").replace(/\/+$/, "");
136
+ }
137
+ }
138
+
139
+ export {
140
+ style,
141
+ stderrStyle,
142
+ stdoutStyle,
143
+ formatFields,
144
+ step,
145
+ success,
146
+ error,
147
+ warn,
148
+ info,
149
+ detail,
150
+ link,
151
+ blank,
152
+ elapsedSuffix,
153
+ spinner,
154
+ clearProgress,
155
+ withSpinner,
156
+ formatExpiration,
157
+ hostLabel
158
+ };
159
+ //# sourceMappingURL=chunk-EZG76F7R.js.map