@liquidmetal-ai/raindrop 0.8.0 → 0.9.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 (208) hide show
  1. package/README.md +254 -207
  2. package/bundle/chunk-5AOMZVOJ.js +48 -0
  3. package/bundle/chunk-5AP5HNN3.js +133 -0
  4. package/bundle/chunk-6CDCK5IP.js +58 -0
  5. package/bundle/chunk-6GTBXHHK.js +502 -0
  6. package/bundle/chunk-A26NDSVL.js +12148 -0
  7. package/bundle/{chunk-6UE75KX2.js → chunk-AKNNZNIC.js} +1 -2
  8. package/bundle/{chunk-CW5ZHVPX.js → chunk-DOTQ3CSX.js} +2 -2
  9. package/bundle/chunk-FO7VH4GU.js +75 -0
  10. package/bundle/chunk-HEOY5F6W.js +147 -0
  11. package/bundle/chunk-HMD2JXLE.js +238722 -0
  12. package/bundle/chunk-KGZ7KWP4.js +44 -0
  13. package/bundle/chunk-MNUILM7W.js +380 -0
  14. package/bundle/chunk-OROAB5YF.js +805 -0
  15. package/bundle/chunk-OZWZILJX.js +4539 -0
  16. package/bundle/{chunk-6B4I2CKP.js → chunk-YDVG2SA2.js} +4 -4
  17. package/bundle/chunk-ZQQFKWNC.js +22452 -0
  18. package/bundle/commands/annotation/get.js +4 -4
  19. package/bundle/commands/annotation/list.js +4 -4
  20. package/bundle/commands/annotation/put.js +4 -4
  21. package/bundle/commands/auth/list.js +2 -2
  22. package/bundle/commands/auth/login.js +3 -3
  23. package/bundle/commands/auth/logout.js +2 -2
  24. package/bundle/commands/auth/select.js +3 -3
  25. package/bundle/commands/bucket/create-credential.js +3 -3
  26. package/bundle/commands/bucket/delete-credential.js +3 -3
  27. package/bundle/commands/bucket/get-credential.js +3 -3
  28. package/bundle/commands/bucket/list-credentials.js +3 -3
  29. package/bundle/commands/build/branch.js +26 -14
  30. package/bundle/commands/build/checkout.js +6 -6
  31. package/bundle/commands/build/clone.js +5 -5
  32. package/bundle/commands/build/delete.js +24 -14
  33. package/bundle/commands/build/deploy.js +25 -13
  34. package/bundle/commands/build/env/get.js +19 -6
  35. package/bundle/commands/build/env/set.js +19 -6
  36. package/bundle/commands/build/find.js +18 -10
  37. package/bundle/commands/build/generate.js +4 -4
  38. package/bundle/commands/build/init.js +3 -3
  39. package/bundle/commands/build/list-templates.js +63 -0
  40. package/bundle/commands/build/list.js +4 -4
  41. package/bundle/commands/build/package-template.js +238 -0
  42. package/bundle/commands/build/sandbox.js +16 -10
  43. package/bundle/commands/build/start.js +10 -6
  44. package/bundle/commands/build/status.js +16 -11
  45. package/bundle/commands/build/stop.js +10 -6
  46. package/bundle/commands/build/tools/check.js +2 -2
  47. package/bundle/commands/build/tools/fmt.js +2 -2
  48. package/bundle/commands/build/unsandbox.js +16 -10
  49. package/bundle/commands/build/upload.js +23 -9
  50. package/bundle/commands/build/validate.js +5 -5
  51. package/bundle/commands/build/workos/delete.js +4 -4
  52. package/bundle/commands/build/workos/env/attach.js +20 -8
  53. package/bundle/commands/build/workos/env/create.js +60 -11
  54. package/bundle/commands/build/workos/env/delete.js +3 -3
  55. package/bundle/commands/build/workos/env/detach.js +20 -8
  56. package/bundle/commands/build/workos/env/get.js +21 -3
  57. package/bundle/commands/build/workos/env/list.js +3 -3
  58. package/bundle/commands/build/workos/env/set.js +91 -25
  59. package/bundle/commands/build/workos/invite.js +3 -3
  60. package/bundle/commands/build/workos/setup.js +14 -5
  61. package/bundle/commands/build/workos/status.js +116 -25
  62. package/bundle/commands/dns/create.js +2 -2
  63. package/bundle/commands/dns/delete.js +4 -4
  64. package/bundle/commands/dns/get.js +4 -4
  65. package/bundle/commands/dns/list.js +3 -3
  66. package/bundle/commands/dns/records/create.js +2 -2
  67. package/bundle/commands/dns/records/delete.js +3 -3
  68. package/bundle/commands/dns/records/get.js +2 -2
  69. package/bundle/commands/dns/records/list.js +2 -2
  70. package/bundle/commands/dns/records/update.js +2 -2
  71. package/bundle/commands/logs/query.js +15 -10
  72. package/bundle/commands/logs/tail.js +16 -11
  73. package/bundle/commands/mcp/install-claude.js +2 -2
  74. package/bundle/commands/mcp/install-gemini.js +2 -2
  75. package/bundle/commands/mcp/install-goose.js +2 -2
  76. package/bundle/commands/mcp/status.js +2 -2
  77. package/bundle/commands/object/delete.js +27 -14
  78. package/bundle/commands/object/get.js +27 -14
  79. package/bundle/commands/object/list.js +28 -15
  80. package/bundle/commands/object/put.js +27 -14
  81. package/bundle/commands/query/chunk-search.js +24 -10
  82. package/bundle/commands/query/document.js +39 -16
  83. package/bundle/commands/query/events.js +13 -8
  84. package/bundle/commands/query/reindex.js +14 -6
  85. package/bundle/commands/query/search.js +40 -17
  86. package/bundle/commands/tail.js +2 -2
  87. package/bundle/index.js +1 -1
  88. package/dist/base-command.d.ts.map +1 -1
  89. package/dist/base-command.js +27 -0
  90. package/dist/commands/annotation/get.js +1 -1
  91. package/dist/commands/annotation/list.js +1 -1
  92. package/dist/commands/annotation/put.js +1 -1
  93. package/dist/commands/bucket/create-credential.js +1 -1
  94. package/dist/commands/bucket/delete-credential.js +1 -1
  95. package/dist/commands/bucket/get-credential.js +1 -1
  96. package/dist/commands/bucket/list-credentials.js +1 -1
  97. package/dist/commands/build/branch.d.ts +2 -0
  98. package/dist/commands/build/branch.d.ts.map +1 -1
  99. package/dist/commands/build/branch.js +18 -5
  100. package/dist/commands/build/checkout.js +1 -1
  101. package/dist/commands/build/delete.d.ts +1 -0
  102. package/dist/commands/build/delete.d.ts.map +1 -1
  103. package/dist/commands/build/delete.js +25 -12
  104. package/dist/commands/build/deploy.d.ts +2 -0
  105. package/dist/commands/build/deploy.d.ts.map +1 -1
  106. package/dist/commands/build/deploy.js +17 -4
  107. package/dist/commands/build/env/get.d.ts +2 -0
  108. package/dist/commands/build/env/get.d.ts.map +1 -1
  109. package/dist/commands/build/env/get.js +18 -4
  110. package/dist/commands/build/env/set.d.ts +2 -0
  111. package/dist/commands/build/env/set.d.ts.map +1 -1
  112. package/dist/commands/build/env/set.js +18 -4
  113. package/dist/commands/build/find.d.ts +1 -0
  114. package/dist/commands/build/find.d.ts.map +1 -1
  115. package/dist/commands/build/find.js +18 -7
  116. package/dist/commands/build/generate.js +1 -1
  117. package/dist/commands/build/list-templates.d.ts +11 -0
  118. package/dist/commands/build/list-templates.d.ts.map +1 -0
  119. package/dist/commands/build/list-templates.js +47 -0
  120. package/dist/commands/build/list.js +1 -1
  121. package/dist/commands/build/package-template.d.ts +28 -0
  122. package/dist/commands/build/package-template.d.ts.map +1 -0
  123. package/dist/commands/build/package-template.js +256 -0
  124. package/dist/commands/build/sandbox.d.ts +1 -0
  125. package/dist/commands/build/sandbox.d.ts.map +1 -1
  126. package/dist/commands/build/sandbox.js +10 -3
  127. package/dist/commands/build/start.d.ts +1 -0
  128. package/dist/commands/build/start.d.ts.map +1 -1
  129. package/dist/commands/build/start.js +9 -4
  130. package/dist/commands/build/status.d.ts +1 -0
  131. package/dist/commands/build/status.d.ts.map +1 -1
  132. package/dist/commands/build/status.js +13 -7
  133. package/dist/commands/build/stop.d.ts +1 -0
  134. package/dist/commands/build/stop.d.ts.map +1 -1
  135. package/dist/commands/build/stop.js +9 -4
  136. package/dist/commands/build/unsandbox.d.ts +1 -0
  137. package/dist/commands/build/unsandbox.d.ts.map +1 -1
  138. package/dist/commands/build/unsandbox.js +10 -3
  139. package/dist/commands/build/upload.d.ts +3 -1
  140. package/dist/commands/build/upload.d.ts.map +1 -1
  141. package/dist/commands/build/upload.js +19 -4
  142. package/dist/commands/build/validate.js +1 -1
  143. package/dist/commands/build/workos/env/attach.d.ts +2 -0
  144. package/dist/commands/build/workos/env/attach.d.ts.map +1 -1
  145. package/dist/commands/build/workos/env/attach.js +17 -5
  146. package/dist/commands/build/workos/env/create.d.ts +3 -0
  147. package/dist/commands/build/workos/env/create.d.ts.map +1 -1
  148. package/dist/commands/build/workos/env/create.js +61 -8
  149. package/dist/commands/build/workos/env/detach.d.ts +2 -0
  150. package/dist/commands/build/workos/env/detach.d.ts.map +1 -1
  151. package/dist/commands/build/workos/env/detach.js +17 -5
  152. package/dist/commands/build/workos/env/get.d.ts.map +1 -1
  153. package/dist/commands/build/workos/env/get.js +19 -0
  154. package/dist/commands/build/workos/env/set.d.ts +12 -6
  155. package/dist/commands/build/workos/env/set.d.ts.map +1 -1
  156. package/dist/commands/build/workos/env/set.js +83 -22
  157. package/dist/commands/build/workos/setup.d.ts +1 -0
  158. package/dist/commands/build/workos/setup.d.ts.map +1 -1
  159. package/dist/commands/build/workos/setup.js +12 -3
  160. package/dist/commands/build/workos/status.d.ts +5 -0
  161. package/dist/commands/build/workos/status.d.ts.map +1 -1
  162. package/dist/commands/build/workos/status.js +128 -21
  163. package/dist/commands/logs/query.d.ts +1 -0
  164. package/dist/commands/logs/query.d.ts.map +1 -1
  165. package/dist/commands/logs/query.js +13 -7
  166. package/dist/commands/logs/tail.d.ts +1 -0
  167. package/dist/commands/logs/tail.d.ts.map +1 -1
  168. package/dist/commands/logs/tail.js +14 -8
  169. package/dist/commands/object/delete.d.ts +1 -0
  170. package/dist/commands/object/delete.d.ts.map +1 -1
  171. package/dist/commands/object/delete.js +25 -11
  172. package/dist/commands/object/get.d.ts +1 -0
  173. package/dist/commands/object/get.d.ts.map +1 -1
  174. package/dist/commands/object/get.js +25 -11
  175. package/dist/commands/object/list.d.ts +1 -0
  176. package/dist/commands/object/list.d.ts.map +1 -1
  177. package/dist/commands/object/list.js +26 -12
  178. package/dist/commands/object/put.d.ts +1 -0
  179. package/dist/commands/object/put.d.ts.map +1 -1
  180. package/dist/commands/object/put.js +25 -11
  181. package/dist/commands/query/chunk-search.d.ts +1 -0
  182. package/dist/commands/query/chunk-search.d.ts.map +1 -1
  183. package/dist/commands/query/chunk-search.js +21 -6
  184. package/dist/commands/query/document.d.ts +3 -1
  185. package/dist/commands/query/document.d.ts.map +1 -1
  186. package/dist/commands/query/document.js +36 -13
  187. package/dist/commands/query/events.d.ts +1 -0
  188. package/dist/commands/query/events.d.ts.map +1 -1
  189. package/dist/commands/query/events.js +12 -6
  190. package/dist/commands/query/reindex.d.ts +1 -0
  191. package/dist/commands/query/reindex.d.ts.map +1 -1
  192. package/dist/commands/query/reindex.js +13 -4
  193. package/dist/commands/query/search.d.ts +2 -0
  194. package/dist/commands/query/search.d.ts.map +1 -1
  195. package/dist/commands/query/search.js +37 -13
  196. package/dist/index.d.ts.map +1 -1
  197. package/dist/index.js +3 -1
  198. package/dist/templates/registry.d.ts +38 -0
  199. package/dist/templates/registry.d.ts.map +1 -0
  200. package/dist/templates/registry.js +72 -0
  201. package/dist/tsconfig.tsbuildinfo +1 -0
  202. package/oclif.manifest.json +2823 -2047
  203. package/package.json +3 -3
  204. package/templates/db/node_modules/.bin/prisma +2 -2
  205. package/templates/db/node_modules/.bin/prisma-kysely +2 -2
  206. package/templates/db/node_modules/.bin/tsc +2 -2
  207. package/templates/db/node_modules/.bin/tsserver +2 -2
  208. package/templates/db/node_modules/.bin/zx +2 -2
@@ -0,0 +1,48 @@
1
+ import {
2
+ init_cjs_shims
3
+ } from "./chunk-HMD2JXLE.js";
4
+
5
+ // src/lib/dns-utils.ts
6
+ init_cjs_shims();
7
+ async function resolveDnsNameToZoneId(dnsClient, organizationId, userId, dnsName) {
8
+ try {
9
+ const normalizedDnsName = dnsName.endsWith(".") ? dnsName.slice(0, -1) : dnsName;
10
+ let pageToken;
11
+ do {
12
+ const response = await dnsClient.listDNSZones({
13
+ organizationId,
14
+ userId,
15
+ pageSize: 100,
16
+ // Use a larger page size for efficiency
17
+ pageToken
18
+ });
19
+ if (response.zones) {
20
+ const exactMatch = response.zones.find(
21
+ (zone) => zone.fullyQualifiedDomainName === normalizedDnsName
22
+ );
23
+ if (exactMatch?.zoneId) {
24
+ return exactMatch.zoneId;
25
+ }
26
+ const parentZone = response.zones.find((zone) => {
27
+ if (!zone.fullyQualifiedDomainName) return false;
28
+ const zoneFqdn = zone.fullyQualifiedDomainName;
29
+ return normalizedDnsName.endsWith(`.${zoneFqdn}`) || normalizedDnsName === zoneFqdn;
30
+ });
31
+ if (parentZone?.zoneId) {
32
+ return parentZone.zoneId;
33
+ }
34
+ }
35
+ pageToken = response.nextPageToken;
36
+ } while (pageToken);
37
+ throw new Error(`No DNS zone found for domain name: ${dnsName}`);
38
+ } catch (error) {
39
+ if (error instanceof Error) {
40
+ throw error;
41
+ }
42
+ throw new Error(`Failed to resolve DNS name to zone ID: ${error}`);
43
+ }
44
+ }
45
+
46
+ export {
47
+ resolveDnsNameToZoneId
48
+ };
@@ -0,0 +1,133 @@
1
+ import {
2
+ init_cjs_shims,
3
+ timestampMs
4
+ } from "./chunk-HMD2JXLE.js";
5
+
6
+ // src/log-helpers.ts
7
+ init_cjs_shims();
8
+ function formatLogAttribute(key, value, displayValue) {
9
+ if (key === "http.status") {
10
+ const statusCode = parseInt(value);
11
+ const statusEmoji = statusCode >= 200 && statusCode < 300 ? "\u2705" : statusCode >= 400 ? "\u274C" : "\u26A0\uFE0F";
12
+ return `${key}: ${statusEmoji} ${value}`;
13
+ } else if (key === "http.method" || key === "http.url") {
14
+ return `${key}: ${value}`;
15
+ } else if (key === "query") {
16
+ return `\u{1F5C4}\uFE0F SQL Query: ${value}`;
17
+ } else if (key === "rows_read") {
18
+ return `\u{1F4CA} Rows Read: ${value}`;
19
+ } else if (key === "rows_written") {
20
+ return `\u270D\uFE0F Rows Written: ${value}`;
21
+ } else if (key === "db") {
22
+ return `\u{1F3E6} Database: ${value}`;
23
+ } else if (key === "error") {
24
+ if (value && value !== "undefined") {
25
+ return `\u274C Error: ${value}`;
26
+ }
27
+ return null;
28
+ } else if (key === "fields" || key === "meta") {
29
+ try {
30
+ const parsed = JSON.parse(displayValue);
31
+ if (key === "meta" && parsed) {
32
+ const metrics = [];
33
+ if (parsed.duration) metrics.push(`${parsed.duration}ms`);
34
+ if (parsed.rows_read) metrics.push(`${parsed.rows_read} rows read`);
35
+ if (parsed.rows_written && parsed.rows_written > 0) metrics.push(`${parsed.rows_written} rows written`);
36
+ if (parsed.served_by_region) metrics.push(`${parsed.served_by_region}`);
37
+ if (parsed.size_after) metrics.push(`DB: ${(parsed.size_after / 1024).toFixed(1)}KB`);
38
+ if (metrics.length > 0) {
39
+ return `\u{1F4CA} ${key}: ${metrics.join(", ")}`;
40
+ } else {
41
+ return `${key}: ${JSON.stringify(parsed, (_, v) => typeof v === "bigint" ? v.toString() : v)}`;
42
+ }
43
+ } else {
44
+ return `${key}: ${JSON.stringify(parsed, (_, v) => typeof v === "bigint" ? v.toString() : v)}`;
45
+ }
46
+ } catch {
47
+ return `${key}: ${displayValue}`;
48
+ }
49
+ } else {
50
+ return `${key}: ${displayValue}`;
51
+ }
52
+ }
53
+ function displayEventAttributes(event, logger, indentLevel = " ") {
54
+ if (event.attributes && Object.keys(event.attributes).length > 0) {
55
+ Object.entries(event.attributes).forEach(([key, value]) => {
56
+ if (value !== void 0 && value !== null) {
57
+ let displayValue = value;
58
+ try {
59
+ const parsed = JSON.parse(value);
60
+ if (typeof parsed === "object" && parsed !== null) {
61
+ displayValue = JSON.stringify(parsed, (_, v) => {
62
+ if (typeof v === "bigint") {
63
+ return v.toString();
64
+ }
65
+ return v;
66
+ }, 2);
67
+ }
68
+ } catch {
69
+ }
70
+ const formattedAttribute = formatLogAttribute(key, value, displayValue);
71
+ if (formattedAttribute) {
72
+ logger.log(`${indentLevel}${formattedAttribute}`);
73
+ }
74
+ }
75
+ });
76
+ }
77
+ }
78
+ function displayTraceGroupedEvents(events, logger) {
79
+ const eventsByTrace = /* @__PURE__ */ new Map();
80
+ events.forEach((event) => {
81
+ const traceId = event.trace?.eventId || "unknown";
82
+ if (!eventsByTrace.has(traceId)) {
83
+ eventsByTrace.set(traceId, []);
84
+ }
85
+ const traceEvents = eventsByTrace.get(traceId);
86
+ if (traceEvents) {
87
+ traceEvents.push(event);
88
+ }
89
+ });
90
+ for (const [traceId, traceEvents] of eventsByTrace) {
91
+ if (traceEvents.length === 0) continue;
92
+ traceEvents.sort((a, b) => {
93
+ if (a.eventOrder !== void 0 && b.eventOrder !== void 0) {
94
+ return a.eventOrder - b.eventOrder;
95
+ }
96
+ const aTime = a.trace?.startTime ? timestampMs(a.trace.startTime) : 0;
97
+ const bTime = b.trace?.startTime ? timestampMs(b.trace.startTime) : 0;
98
+ return aTime - bTime;
99
+ });
100
+ const firstEvent = traceEvents[0];
101
+ const lastEvent = traceEvents[traceEvents.length - 1];
102
+ const startTime = firstEvent.trace?.startTime ? timestampMs(firstEvent.trace.startTime) : 0;
103
+ const endTime = lastEvent.trace?.endTime ? timestampMs(lastEvent.trace.endTime) : lastEvent.trace?.startTime ? timestampMs(lastEvent.trace.startTime) : 0;
104
+ const traceDuration = endTime > startTime ? ` (${endTime - startTime}ms total)` : "";
105
+ const timestamp = firstEvent.trace?.startTime ? new Date(timestampMs(firstEvent.trace.startTime)).toLocaleString() : "Unknown time";
106
+ logger.log(`[${timestamp}] \u{1F517} Trace: ${traceId}${traceDuration}`);
107
+ if (firstEvent.organization?.id || firstEvent.application?.name) {
108
+ const contextParts = [];
109
+ if (firstEvent.organization?.id) contextParts.push(`Org: ${firstEvent.organization.id}`);
110
+ if (firstEvent.application?.name) contextParts.push(`App: ${firstEvent.application.name}`);
111
+ if (firstEvent.application?.version?.id) contextParts.push(`v${firstEvent.application.version.id}`);
112
+ if (firstEvent.script?.name) contextParts.push(`Script: ${firstEvent.script.name}`);
113
+ logger.log(` ${contextParts.join(", ")}`);
114
+ }
115
+ traceEvents.forEach((event, index) => {
116
+ const eventName = event.name || "Event";
117
+ const status = event.status || "ok";
118
+ const statusEmoji = status === "error" ? "\u274C" : "\u2705";
119
+ let duration = "";
120
+ if (event.trace?.endTime && event.trace?.startTime) {
121
+ const durationMs = timestampMs(event.trace.endTime) - timestampMs(event.trace.startTime);
122
+ duration = ` (${durationMs}ms)`;
123
+ }
124
+ logger.log(` ${index + 1}. ${statusEmoji} ${eventName}${duration}`);
125
+ displayEventAttributes(event, logger, " ");
126
+ });
127
+ logger.log("");
128
+ }
129
+ }
130
+
131
+ export {
132
+ displayTraceGroupedEvents
133
+ };
@@ -0,0 +1,58 @@
1
+ import {
2
+ init_cjs_shims
3
+ } from "./chunk-G6NE675D.js";
4
+
5
+ // src/templates/registry.ts
6
+ init_cjs_shims();
7
+ var GITHUB_DEMOS_REPO = "https://github.com/LiquidMetal-AI/lm-raindrop-demos.git";
8
+ var TEMPLATE_REGISTRY = [
9
+ {
10
+ id: "liquidmetal/smartbucket",
11
+ name: "SmartBucket",
12
+ description: "Initialize a new Raindrop project with SmartBucket and service components from scratch",
13
+ type: "init"
14
+ },
15
+ {
16
+ id: "liquidmetal/agent-template",
17
+ name: "Agent Template",
18
+ description: "A foundational template for building agents on the LiquidMetal platform",
19
+ type: "clone",
20
+ githubPath: "agent-template",
21
+ githubRepo: GITHUB_DEMOS_REPO
22
+ },
23
+ {
24
+ id: "liquidmetal/git-haiku-demo",
25
+ name: "Git Haiku Demo",
26
+ description: "A demonstration application showcasing git integration capabilities",
27
+ type: "clone",
28
+ githubPath: "git-haiku-demo",
29
+ githubRepo: GITHUB_DEMOS_REPO
30
+ },
31
+ {
32
+ id: "liquidmetal/hello-world",
33
+ name: "Hello World",
34
+ description: "An introductory example for getting started with the platform",
35
+ type: "clone",
36
+ githubPath: "hello-world",
37
+ githubRepo: GITHUB_DEMOS_REPO
38
+ },
39
+ {
40
+ id: "liquidmetal/voice-agent-demo",
41
+ name: "Voice Agent Demo",
42
+ description: "A sample application demonstrating voice-based agent functionality",
43
+ type: "clone",
44
+ githubPath: "voice-agent-demo",
45
+ githubRepo: GITHUB_DEMOS_REPO
46
+ }
47
+ ];
48
+ function getTemplateById(id) {
49
+ return TEMPLATE_REGISTRY.find((template) => template.id === id);
50
+ }
51
+ function listTemplates() {
52
+ return TEMPLATE_REGISTRY;
53
+ }
54
+
55
+ export {
56
+ getTemplateById,
57
+ listTemplates
58
+ };