@heychunky/core 0.1.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 (118) hide show
  1. package/README.md +2 -0
  2. package/dist/admin/apps.d.ts +49 -0
  3. package/dist/admin/apps.d.ts.map +1 -0
  4. package/dist/admin/apps.js +97 -0
  5. package/dist/admin/apps.js.map +1 -0
  6. package/dist/admin/index.d.ts +26 -0
  7. package/dist/admin/index.d.ts.map +1 -0
  8. package/dist/admin/index.js +27 -0
  9. package/dist/admin/index.js.map +1 -0
  10. package/dist/admin/master.d.ts +9 -0
  11. package/dist/admin/master.d.ts.map +1 -0
  12. package/dist/admin/master.js +14 -0
  13. package/dist/admin/master.js.map +1 -0
  14. package/dist/admin/provision.d.ts +42 -0
  15. package/dist/admin/provision.d.ts.map +1 -0
  16. package/dist/admin/provision.js +157 -0
  17. package/dist/admin/provision.js.map +1 -0
  18. package/dist/admin/run.d.ts +89 -0
  19. package/dist/admin/run.d.ts.map +1 -0
  20. package/dist/admin/run.js +218 -0
  21. package/dist/admin/run.js.map +1 -0
  22. package/dist/admin/secrets/infisical.d.ts +45 -0
  23. package/dist/admin/secrets/infisical.d.ts.map +1 -0
  24. package/dist/admin/secrets/infisical.js +182 -0
  25. package/dist/admin/secrets/infisical.js.map +1 -0
  26. package/dist/admin/services/agentmail.d.ts +16 -0
  27. package/dist/admin/services/agentmail.d.ts.map +1 -0
  28. package/dist/admin/services/agentmail.js +43 -0
  29. package/dist/admin/services/agentmail.js.map +1 -0
  30. package/dist/admin/services/ai-gateway.d.ts +13 -0
  31. package/dist/admin/services/ai-gateway.d.ts.map +1 -0
  32. package/dist/admin/services/ai-gateway.js +32 -0
  33. package/dist/admin/services/ai-gateway.js.map +1 -0
  34. package/dist/admin/services/bunny.d.ts +16 -0
  35. package/dist/admin/services/bunny.d.ts.map +1 -0
  36. package/dist/admin/services/bunny.js +59 -0
  37. package/dist/admin/services/bunny.js.map +1 -0
  38. package/dist/admin/services/cloudflare.d.ts +42 -0
  39. package/dist/admin/services/cloudflare.d.ts.map +1 -0
  40. package/dist/admin/services/cloudflare.js +97 -0
  41. package/dist/admin/services/cloudflare.js.map +1 -0
  42. package/dist/admin/services/db.d.ts +16 -0
  43. package/dist/admin/services/db.d.ts.map +1 -0
  44. package/dist/admin/services/db.js +81 -0
  45. package/dist/admin/services/db.js.map +1 -0
  46. package/dist/admin/services/elevenlabs.d.ts +22 -0
  47. package/dist/admin/services/elevenlabs.d.ts.map +1 -0
  48. package/dist/admin/services/elevenlabs.js +45 -0
  49. package/dist/admin/services/elevenlabs.js.map +1 -0
  50. package/dist/admin/services/firecrawl.d.ts +13 -0
  51. package/dist/admin/services/firecrawl.d.ts.map +1 -0
  52. package/dist/admin/services/firecrawl.js +36 -0
  53. package/dist/admin/services/firecrawl.js.map +1 -0
  54. package/dist/admin/services/fireworks.d.ts +9 -0
  55. package/dist/admin/services/fireworks.d.ts.map +1 -0
  56. package/dist/admin/services/fireworks.js +31 -0
  57. package/dist/admin/services/fireworks.js.map +1 -0
  58. package/dist/admin/services/github.d.ts +26 -0
  59. package/dist/admin/services/github.d.ts.map +1 -0
  60. package/dist/admin/services/github.js +164 -0
  61. package/dist/admin/services/github.js.map +1 -0
  62. package/dist/admin/services/neon.d.ts +42 -0
  63. package/dist/admin/services/neon.d.ts.map +1 -0
  64. package/dist/admin/services/neon.js +157 -0
  65. package/dist/admin/services/neon.js.map +1 -0
  66. package/dist/admin/services/resend.d.ts +38 -0
  67. package/dist/admin/services/resend.d.ts.map +1 -0
  68. package/dist/admin/services/resend.js +81 -0
  69. package/dist/admin/services/resend.js.map +1 -0
  70. package/dist/admin/services/togetherai.d.ts +10 -0
  71. package/dist/admin/services/togetherai.d.ts.map +1 -0
  72. package/dist/admin/services/togetherai.js +36 -0
  73. package/dist/admin/services/togetherai.js.map +1 -0
  74. package/dist/admin/services/vercel.d.ts +66 -0
  75. package/dist/admin/services/vercel.d.ts.map +1 -0
  76. package/dist/admin/services/vercel.js +209 -0
  77. package/dist/admin/services/vercel.js.map +1 -0
  78. package/dist/admin/syncenv.d.ts +12 -0
  79. package/dist/admin/syncenv.d.ts.map +1 -0
  80. package/dist/admin/syncenv.js +114 -0
  81. package/dist/admin/syncenv.js.map +1 -0
  82. package/dist/admin/users.d.ts +27 -0
  83. package/dist/admin/users.d.ts.map +1 -0
  84. package/dist/admin/users.js +48 -0
  85. package/dist/admin/users.js.map +1 -0
  86. package/dist/config/environments.d.ts +50 -0
  87. package/dist/config/environments.d.ts.map +1 -0
  88. package/dist/config/environments.js +62 -0
  89. package/dist/config/environments.js.map +1 -0
  90. package/dist/config/names.d.ts +45 -0
  91. package/dist/config/names.d.ts.map +1 -0
  92. package/dist/config/names.js +75 -0
  93. package/dist/config/names.js.map +1 -0
  94. package/dist/http/errors.d.ts +45 -0
  95. package/dist/http/errors.d.ts.map +1 -0
  96. package/dist/http/errors.js +70 -0
  97. package/dist/http/errors.js.map +1 -0
  98. package/dist/http/request.d.ts +36 -0
  99. package/dist/http/request.d.ts.map +1 -0
  100. package/dist/http/request.js +73 -0
  101. package/dist/http/request.js.map +1 -0
  102. package/dist/index.d.ts +15 -0
  103. package/dist/index.d.ts.map +1 -0
  104. package/dist/index.js +15 -0
  105. package/dist/index.js.map +1 -0
  106. package/dist/registry.d.ts +66 -0
  107. package/dist/registry.d.ts.map +1 -0
  108. package/dist/registry.js +137 -0
  109. package/dist/registry.js.map +1 -0
  110. package/dist/secrets/store.d.ts +50 -0
  111. package/dist/secrets/store.d.ts.map +1 -0
  112. package/dist/secrets/store.js +71 -0
  113. package/dist/secrets/store.js.map +1 -0
  114. package/dist/services/types.d.ts +39 -0
  115. package/dist/services/types.d.ts.map +1 -0
  116. package/dist/services/types.js +28 -0
  117. package/dist/services/types.js.map +1 -0
  118. package/package.json +40 -0
@@ -0,0 +1,75 @@
1
+ /**
2
+ * How an app's name maps onto the names providers actually use.
3
+ *
4
+ * There is no single right answer, because providers were named by hand over
5
+ * years and disagree with each other. Today, for the same estate:
6
+ *
7
+ * delters.com → Vercel project "delters" (bare name)
8
+ * carmelcity.ai → Vercel project "carmelcity-ai" (dots to hyphens)
9
+ *
10
+ * So a lookup cannot slug one way and hope. It generates the forms a provider
11
+ * plausibly used and tries them in order of how likely they are to be right.
12
+ *
13
+ * The previous rule stripped every non-alphanumeric character, turning
14
+ * "delters.com" into "delterscom" — which matched nothing, ever. `sync-env`
15
+ * therefore never found a project for any app, and the apps report claimed
16
+ * there were no Vercel projects while eleven existed.
17
+ */
18
+ /** Lowercase, keep only letters, digits and single hyphens. */
19
+ function clean(s) {
20
+ return s
21
+ .toLowerCase()
22
+ .replace(/[^a-z0-9]+/g, "-")
23
+ .replace(/^-+|-+$/g, "");
24
+ }
25
+ /**
26
+ * The product name without its domain suffix.
27
+ * `delters.com` → `delters`, `carmel.city` → `carmel`, `heychunky` → `heychunky`.
28
+ */
29
+ export function baseName(app) {
30
+ const dot = app.indexOf(".");
31
+ return clean(dot === -1 ? app : app.slice(0, dot));
32
+ }
33
+ /**
34
+ * Every form a provider might have used for this app, most likely first.
35
+ * Deduplicated, so a name with no dot yields exactly one candidate.
36
+ *
37
+ * carmelcity.ai → ["carmelcity-ai", "carmelcity", "carmelcityai"]
38
+ * delters.com → ["delters-com", "delters", "delterscom"]
39
+ * heychunky → ["heychunky"]
40
+ */
41
+ export function nameCandidates(app) {
42
+ const hyphenated = clean(app);
43
+ const bare = baseName(app);
44
+ const squashed = app.toLowerCase().replace(/[^a-z0-9]/g, "");
45
+ return [...new Set([hyphenated, bare, squashed].filter(Boolean))];
46
+ }
47
+ /**
48
+ * Find the entry whose name matches this app, preferring earlier candidates.
49
+ * Returns undefined rather than throwing — a missing project is a normal
50
+ * state during provisioning, not an error.
51
+ */
52
+ export function matchByName(app, items, nameOf) {
53
+ const candidates = nameCandidates(app);
54
+ for (const candidate of candidates) {
55
+ const hit = items.find((i) => clean(nameOf(i)) === candidate);
56
+ if (hit)
57
+ return hit;
58
+ }
59
+ return undefined;
60
+ }
61
+ /** The app's storage zone names on Bunny: `<base>` and `<base>-private`. */
62
+ export function zoneNames(app) {
63
+ const base = baseName(app);
64
+ return { public: base, private: `${base}-private` };
65
+ }
66
+ /** Subdomains the factory attaches to an app's domain. */
67
+ export function subdomains(domain) {
68
+ return {
69
+ test: `test.${domain}`,
70
+ cdn: `cdn.${domain}`,
71
+ secure: `secure.${domain}`,
72
+ www: `www.${domain}`,
73
+ };
74
+ }
75
+ //# sourceMappingURL=names.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"names.js","sourceRoot":"","sources":["../../src/config/names.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,+DAA+D;AAC/D,SAAS,KAAK,CAAC,CAAS;IACtB,OAAO,CAAC;SACL,WAAW,EAAE;SACb,OAAO,CAAC,aAAa,EAAE,GAAG,CAAC;SAC3B,OAAO,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC;AAC7B,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,QAAQ,CAAC,GAAW;IAClC,MAAM,GAAG,GAAG,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IAC7B,OAAO,KAAK,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC;AACrD,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,cAAc,CAAC,GAAW;IACxC,MAAM,UAAU,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC;IAC9B,MAAM,IAAI,GAAG,QAAQ,CAAC,GAAG,CAAC,CAAC;IAC3B,MAAM,QAAQ,GAAG,GAAG,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,YAAY,EAAE,EAAE,CAAC,CAAC;IAC7D,OAAO,CAAC,GAAG,IAAI,GAAG,CAAC,CAAC,UAAU,EAAE,IAAI,EAAE,QAAQ,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;AACpE,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,WAAW,CACzB,GAAW,EACX,KAAmB,EACnB,MAA2B;IAE3B,MAAM,UAAU,GAAG,cAAc,CAAC,GAAG,CAAC,CAAC;IACvC,KAAK,MAAM,SAAS,IAAI,UAAU,EAAE,CAAC;QACnC,MAAM,GAAG,GAAG,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,KAAK,SAAS,CAAC,CAAC;QAC9D,IAAI,GAAG;YAAE,OAAO,GAAG,CAAC;IACtB,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC;AAED,4EAA4E;AAC5E,MAAM,UAAU,SAAS,CAAC,GAAW;IACnC,MAAM,IAAI,GAAG,QAAQ,CAAC,GAAG,CAAC,CAAC;IAC3B,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,IAAI,UAAU,EAAE,CAAC;AACtD,CAAC;AAED,0DAA0D;AAC1D,MAAM,UAAU,UAAU,CAAC,MAAc;IACvC,OAAO;QACL,IAAI,EAAE,QAAQ,MAAM,EAAE;QACtB,GAAG,EAAE,OAAO,MAAM,EAAE;QACpB,MAAM,EAAE,UAAU,MAAM,EAAE;QAC1B,GAAG,EAAE,OAAO,MAAM,EAAE;KACrB,CAAC;AACJ,CAAC"}
@@ -0,0 +1,45 @@
1
+ /**
2
+ * Typed failures.
3
+ *
4
+ * Every failure used to be `new Error(string)`, which means a caller cannot
5
+ * tell "retry in 30 seconds" from "this will never work". A worker resuming a
6
+ * 45-step provisioning run has to know the difference, so the type carries it.
7
+ */
8
+ export declare abstract class HttpError extends Error {
9
+ readonly status: number;
10
+ readonly url: string;
11
+ readonly body: string;
12
+ constructor(name: string, message: string, status: number, url: string, body: string);
13
+ /** Whether trying the same request again could plausibly succeed. */
14
+ abstract get retryable(): boolean;
15
+ }
16
+ /** The credential is wrong, expired, or lacks the permission. Never retry. */
17
+ export declare class AuthError extends HttpError {
18
+ constructor(status: number, url: string, body: string);
19
+ get retryable(): boolean;
20
+ }
21
+ /** It does not exist. Often a normal state, not a failure. */
22
+ export declare class NotFoundError extends HttpError {
23
+ constructor(url: string, body: string);
24
+ get retryable(): boolean;
25
+ }
26
+ /** The request was malformed. Retrying sends the same bad request. */
27
+ export declare class ValidationError extends HttpError {
28
+ constructor(status: number, url: string, body: string);
29
+ get retryable(): boolean;
30
+ }
31
+ /** Slow down. Carries the provider's own advice on how long to wait. */
32
+ export declare class RateLimitError extends HttpError {
33
+ /** Seconds to wait, when the provider said. */
34
+ readonly retryAfter: number | undefined;
35
+ constructor(url: string, body: string, retryAfter?: number);
36
+ get retryable(): boolean;
37
+ }
38
+ /** The provider broke. Worth trying again. */
39
+ export declare class ServiceError extends HttpError {
40
+ constructor(status: number, url: string, body: string);
41
+ get retryable(): boolean;
42
+ }
43
+ /** Map a response onto the right error. */
44
+ export declare function errorFor(status: number, url: string, body: string, retryAfter?: number): HttpError;
45
+ //# sourceMappingURL=errors.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../src/http/errors.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,8BAAsB,SAAU,SAAQ,KAAK;IAC3C,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;gBAEV,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM;IAQpF,qEAAqE;IACrE,QAAQ,KAAK,SAAS,IAAI,OAAO,CAAC;CACnC;AAED,8EAA8E;AAC9E,qBAAa,SAAU,SAAQ,SAAS;gBAC1B,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM;IAGrD,IAAI,SAAS,IAAI,OAAO,CAAkB;CAC3C;AAED,8DAA8D;AAC9D,qBAAa,aAAc,SAAQ,SAAS;gBAC9B,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM;IAGrC,IAAI,SAAS,IAAI,OAAO,CAAkB;CAC3C;AAED,sEAAsE;AACtE,qBAAa,eAAgB,SAAQ,SAAS;gBAChC,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM;IAGrD,IAAI,SAAS,IAAI,OAAO,CAAkB;CAC3C;AAED,wEAAwE;AACxE,qBAAa,cAAe,SAAQ,SAAS;IAC3C,+CAA+C;IAC/C,QAAQ,CAAC,UAAU,EAAE,MAAM,GAAG,SAAS,CAAC;gBAE5B,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,MAAM;IAI1D,IAAI,SAAS,IAAI,OAAO,CAAiB;CAC1C;AAED,8CAA8C;AAC9C,qBAAa,YAAa,SAAQ,SAAS;gBAC7B,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM;IAGrD,IAAI,SAAS,IAAI,OAAO,CAAiB;CAC1C;AAED,2CAA2C;AAC3C,wBAAgB,QAAQ,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,CAMlG"}
@@ -0,0 +1,70 @@
1
+ /**
2
+ * Typed failures.
3
+ *
4
+ * Every failure used to be `new Error(string)`, which means a caller cannot
5
+ * tell "retry in 30 seconds" from "this will never work". A worker resuming a
6
+ * 45-step provisioning run has to know the difference, so the type carries it.
7
+ */
8
+ export class HttpError extends Error {
9
+ status;
10
+ url;
11
+ body;
12
+ constructor(name, message, status, url, body) {
13
+ super(message);
14
+ this.name = name;
15
+ this.status = status;
16
+ this.url = url;
17
+ this.body = body;
18
+ }
19
+ }
20
+ /** The credential is wrong, expired, or lacks the permission. Never retry. */
21
+ export class AuthError extends HttpError {
22
+ constructor(status, url, body) {
23
+ super("AuthError", `Not authorised (${status}) — the key is wrong or lacks permission`, status, url, body);
24
+ }
25
+ get retryable() { return false; }
26
+ }
27
+ /** It does not exist. Often a normal state, not a failure. */
28
+ export class NotFoundError extends HttpError {
29
+ constructor(url, body) {
30
+ super("NotFoundError", "Not found", 404, url, body);
31
+ }
32
+ get retryable() { return false; }
33
+ }
34
+ /** The request was malformed. Retrying sends the same bad request. */
35
+ export class ValidationError extends HttpError {
36
+ constructor(status, url, body) {
37
+ super("ValidationError", `Rejected (${status}): ${body.slice(0, 200)}`, status, url, body);
38
+ }
39
+ get retryable() { return false; }
40
+ }
41
+ /** Slow down. Carries the provider's own advice on how long to wait. */
42
+ export class RateLimitError extends HttpError {
43
+ /** Seconds to wait, when the provider said. */
44
+ retryAfter;
45
+ constructor(url, body, retryAfter) {
46
+ super("RateLimitError", `Rate limited${retryAfter ? ` — retry in ${retryAfter}s` : ""}`, 429, url, body);
47
+ this.retryAfter = retryAfter;
48
+ }
49
+ get retryable() { return true; }
50
+ }
51
+ /** The provider broke. Worth trying again. */
52
+ export class ServiceError extends HttpError {
53
+ constructor(status, url, body) {
54
+ super("ServiceError", `Service error (${status})`, status, url, body);
55
+ }
56
+ get retryable() { return true; }
57
+ }
58
+ /** Map a response onto the right error. */
59
+ export function errorFor(status, url, body, retryAfter) {
60
+ if (status === 401 || status === 403)
61
+ return new AuthError(status, url, body);
62
+ if (status === 404)
63
+ return new NotFoundError(url, body);
64
+ if (status === 429)
65
+ return new RateLimitError(url, body, retryAfter);
66
+ if (status >= 500)
67
+ return new ServiceError(status, url, body);
68
+ return new ValidationError(status, url, body);
69
+ }
70
+ //# sourceMappingURL=errors.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"errors.js","sourceRoot":"","sources":["../../src/http/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EAAE,GAAG,EAAE,IAAI,CAAC,CAAC;AAChD,CAAC"}
@@ -0,0 +1,36 @@
1
+ /** How a service wants its credential presented. */
2
+ export interface Credentials {
3
+ token: string;
4
+ /** Header name. Default `authorization: Bearer <token>`. */
5
+ header?: string;
6
+ /** Prefix for the value. Default `Bearer ` when using authorization. */
7
+ scheme?: string;
8
+ }
9
+ export interface RequestOptions {
10
+ method?: "GET" | "POST" | "PATCH" | "PUT" | "DELETE";
11
+ credentials?: Credentials;
12
+ body?: unknown;
13
+ headers?: Record<string, string>;
14
+ /** Injected for tests. Defaults to global fetch. */
15
+ fetchImpl?: typeof fetch;
16
+ }
17
+ /** Like `request`, but hands back headers too — GitHub declares scopes there. */
18
+ export declare function requestWithHeaders<T>(url: string, opts?: RequestOptions): Promise<{
19
+ data: T;
20
+ headers: Headers;
21
+ status: number;
22
+ }>;
23
+ export declare function request<T>(url: string, opts?: RequestOptions): Promise<T>;
24
+ /**
25
+ * Retry a request while the error says it is worth retrying.
26
+ *
27
+ * Honours the provider's own `Retry-After` rather than guessing, and gives up
28
+ * immediately on anything unretryable — an auth failure retried three times is
29
+ * three failures and a slower error message.
30
+ */
31
+ export declare function withRetry<T>(fn: () => Promise<T>, opts?: {
32
+ attempts?: number;
33
+ baseDelayMs?: number;
34
+ sleep?: (ms: number) => Promise<void>;
35
+ }): Promise<T>;
36
+ //# sourceMappingURL=request.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"request.d.ts","sourceRoot":"","sources":["../../src/http/request.ts"],"names":[],"mappings":"AASA,oDAAoD;AACpD,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,4DAA4D;IAC5D,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,wEAAwE;IACxE,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,cAAc;IAC7B,MAAM,CAAC,EAAE,KAAK,GAAG,MAAM,GAAG,OAAO,GAAG,KAAK,GAAG,QAAQ,CAAC;IACrD,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACjC,oDAAoD;IACpD,SAAS,CAAC,EAAE,OAAO,KAAK,CAAC;CAC1B;AAQD,iFAAiF;AACjF,wBAAsB,kBAAkB,CAAC,CAAC,EACxC,GAAG,EAAE,MAAM,EACX,IAAI,GAAE,cAAmB,GACxB,OAAO,CAAC;IAAE,IAAI,EAAE,CAAC,CAAC;IAAC,OAAO,EAAE,OAAO,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC,CAyBxD;AAED,wBAAsB,OAAO,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,GAAE,cAAmB,GAAG,OAAO,CAAC,CAAC,CAAC,CAEnF;AAED;;;;;;GAMG;AACH,wBAAsB,SAAS,CAAC,CAAC,EAC/B,EAAE,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,EACpB,IAAI,GAAE;IAAE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;CAAO,GAC5F,OAAO,CAAC,CAAC,CAAC,CAmBZ"}
@@ -0,0 +1,73 @@
1
+ /**
2
+ * One request helper for every service.
3
+ *
4
+ * Isomorphic: `fetch` only. The `fetchImpl` option exists so tests can drive it
5
+ * without a network, which is what lets the Core's test suite run with no vault
6
+ * session and no connection.
7
+ */
8
+ import { errorFor, RateLimitError } from "./errors.js";
9
+ function authHeaders(c) {
10
+ if (!c)
11
+ return {};
12
+ if (c.header)
13
+ return { [c.header]: c.scheme ? `${c.scheme}${c.token}` : c.token };
14
+ return { authorization: `${c.scheme ?? "Bearer "}${c.token}` };
15
+ }
16
+ /** Like `request`, but hands back headers too — GitHub declares scopes there. */
17
+ export async function requestWithHeaders(url, opts = {}) {
18
+ const doFetch = opts.fetchImpl ?? fetch;
19
+ const headers = {
20
+ accept: "application/json",
21
+ ...authHeaders(opts.credentials),
22
+ ...opts.headers,
23
+ };
24
+ if (opts.body !== undefined)
25
+ headers["content-type"] = "application/json";
26
+ const res = await doFetch(url, {
27
+ method: opts.method ?? "GET",
28
+ headers,
29
+ body: opts.body !== undefined ? JSON.stringify(opts.body) : undefined,
30
+ });
31
+ if (!res.ok) {
32
+ const text = await res.text().catch(() => "");
33
+ const after = res.headers.get("retry-after");
34
+ throw errorFor(res.status, url, text, after ? Number(after) : undefined);
35
+ }
36
+ if (res.status === 204) {
37
+ return { data: undefined, headers: res.headers, status: res.status };
38
+ }
39
+ return { data: (await res.json()), headers: res.headers, status: res.status };
40
+ }
41
+ export async function request(url, opts = {}) {
42
+ return (await requestWithHeaders(url, opts)).data;
43
+ }
44
+ /**
45
+ * Retry a request while the error says it is worth retrying.
46
+ *
47
+ * Honours the provider's own `Retry-After` rather than guessing, and gives up
48
+ * immediately on anything unretryable — an auth failure retried three times is
49
+ * three failures and a slower error message.
50
+ */
51
+ export async function withRetry(fn, opts = {}) {
52
+ const attempts = opts.attempts ?? 3;
53
+ const base = opts.baseDelayMs ?? 500;
54
+ const sleep = opts.sleep ?? ((ms) => new Promise((r) => setTimeout(r, ms)));
55
+ let last;
56
+ for (let i = 0; i < attempts; i++) {
57
+ try {
58
+ return await fn();
59
+ }
60
+ catch (err) {
61
+ last = err;
62
+ const e = err;
63
+ if (typeof e?.retryable !== "boolean" || !e.retryable)
64
+ throw err;
65
+ if (i === attempts - 1)
66
+ break;
67
+ const advised = err instanceof RateLimitError && err.retryAfter ? err.retryAfter * 1000 : 0;
68
+ await sleep(Math.max(advised, base * 2 ** i));
69
+ }
70
+ }
71
+ throw last;
72
+ }
73
+ //# sourceMappingURL=request.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"request.js","sourceRoot":"","sources":["../../src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C,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC;IAEpF,IAAI,IAAa,CAAC;IAClB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,QAAQ,EAAE,CAAC,EAAE,EAAE,CAAC;QAClC,IAAI,CAAC;YACH,OAAO,MAAM,EAAE,EAAE,CAAC;QACpB,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,IAAI,GAAG,GAAG,CAAC;YACX,MAAM,CAAC,GAAG,GAAgB,CAAC;YAC3B,IAAI,OAAO,CAAC,EAAE,SAAS,KAAK,SAAS,IAAI,CAAC,CAAC,CAAC,SAAS;gBAAE,MAAM,GAAG,CAAC;YACjE,IAAI,CAAC,KAAK,QAAQ,GAAG,CAAC;gBAAE,MAAM;YAC9B,MAAM,OAAO,GAAG,GAAG,YAAY,cAAc,IAAI,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,GAAG,CAAC,UAAU,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;YAC5F,MAAM,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,OAAO,EAAE,IAAI,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAChD,CAAC;IACH,CAAC;IACD,MAAM,IAAI,CAAC;AACb,CAAC"}
@@ -0,0 +1,15 @@
1
+ /**
2
+ * @heychunky/core — the engine the CLI, the worker and apps run on.
3
+ *
4
+ * This entry point is isomorphic: it runs in a browser bundle, an edge
5
+ * function and Node alike. Anything needing a filesystem, a child process or
6
+ * an operator's vault session lives behind `@heychunky/core/admin`.
7
+ */
8
+ export * from "./config/names.ts";
9
+ export * from "./config/environments.ts";
10
+ export * from "./secrets/store.ts";
11
+ export * from "./services/types.ts";
12
+ export * from "./registry.ts";
13
+ export * from "./http/errors.ts";
14
+ export * from "./http/request.ts";
15
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,cAAc,mBAAmB,CAAC;AAClC,cAAc,0BAA0B,CAAC;AACzC,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,15 @@
1
+ /**
2
+ * @heychunky/core — the engine the CLI, the worker and apps run on.
3
+ *
4
+ * This entry point is isomorphic: it runs in a browser bundle, an edge
5
+ * function and Node alike. Anything needing a filesystem, a child process or
6
+ * an operator's vault session lives behind `@heychunky/core/admin`.
7
+ */
8
+ export * from "./config/names.js";
9
+ export * from "./config/environments.js";
10
+ export * from "./secrets/store.js";
11
+ export * from "./services/types.js";
12
+ export * from "./registry.js";
13
+ export * from "./http/errors.js";
14
+ export * from "./http/request.js";
15
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,cAAc,mBAAmB,CAAC;AAClC,cAAc,0BAA0B,CAAC;AACzC,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC"}
@@ -0,0 +1,66 @@
1
+ /**
2
+ * Every action the factory can take, declared as data.
3
+ *
4
+ * Four things read this list and therefore cannot disagree with each other:
5
+ * the CLI's help, the CLI's decision to prompt, the worker's decision whether
6
+ * to retry after a crash, and the access report comparing what a key *holds*
7
+ * against what any command actually *uses*.
8
+ *
9
+ * The gate is data, not a judgement made at runtime. A whole policy you can
10
+ * read in one file beats one scattered across thirty call sites.
11
+ */
12
+ /** How much ceremony an action requires before it runs. */
13
+ export type Gate =
14
+ /** Reads. Nothing changes. Runs without asking. */
15
+ "none"
16
+ /** Say what is about to happen, wait for a yes. */
17
+ | "confirm"
18
+ /**
19
+ * Spends money, destroys data, or reaches citizens. A fresh explicit yes
20
+ * every time — never inherited from earlier in the session — naming the
21
+ * target. The client refuses without it, so the guarantee survives a wrong
22
+ * skill file.
23
+ */
24
+ | "danger";
25
+ /** Which credential an action reaches for. */
26
+ export type Tier =
27
+ /** Factory keys. The operator's side. */
28
+ "admin"
29
+ /** The app's own credentials. Never a factory key. */
30
+ | "app";
31
+ export interface Action {
32
+ service: string;
33
+ /** verb-noun, kebab-case. `create-repo`, not `create`. */
34
+ action: string;
35
+ tier: Tier;
36
+ gate: Gate;
37
+ /**
38
+ * Whether running it twice is the same as running it once.
39
+ *
40
+ * Load-bearing for the worker: a job that dies mid-run must know which steps
41
+ * are safe to repeat. Creating a Neon branch is; buying a domain is not.
42
+ */
43
+ idempotent: boolean;
44
+ /** True when running it costs money. */
45
+ spends?: boolean;
46
+ /** One line, for `--help` and the access report. */
47
+ summary: string;
48
+ }
49
+ export declare const ACTIONS: Action[];
50
+ /** Every action for a service, in declaration order. */
51
+ export declare function actionsFor(service: string): Action[];
52
+ /** One action, or undefined. Callers decide whether a miss is an error. */
53
+ export declare function findAction(service: string, action: string): Action | undefined;
54
+ /** Services that appear in the registry, deduplicated, in declaration order. */
55
+ export declare function services(): string[];
56
+ /** Everything that spends money, destroys data, or reaches citizens. */
57
+ export declare function dangerous(): Action[];
58
+ /**
59
+ * Whether this action may run given what the caller has confirmed.
60
+ *
61
+ * Advisory — the guarantee is that destructive clients refuse without an
62
+ * explicit flag. This is what lets a CLI or a worker decide *before* calling,
63
+ * so it can ask rather than fail.
64
+ */
65
+ export declare function mayRun(action: Action, confirmed: boolean): boolean;
66
+ //# sourceMappingURL=registry.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../src/registry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,2DAA2D;AAC3D,MAAM,MAAM,IAAI;AACd,mDAAmD;AACjD,MAAM;AACR,mDAAmD;GACjD,SAAS;AACX;;;;;GAKG;GACD,QAAQ,CAAC;AAEb,8CAA8C;AAC9C,MAAM,MAAM,IAAI;AACd,yCAAyC;AACvC,OAAO;AACT,sDAAsD;GACpD,KAAK,CAAC;AAEV,MAAM,WAAW,MAAM;IACrB,OAAO,EAAE,MAAM,CAAC;IAChB,0DAA0D;IAC1D,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,IAAI,CAAC;IACX,IAAI,EAAE,IAAI,CAAC;IACX;;;;;OAKG;IACH,UAAU,EAAE,OAAO,CAAC;IACpB,wCAAwC;IACxC,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,oDAAoD;IACpD,OAAO,EAAE,MAAM,CAAC;CACjB;AAID,eAAO,MAAM,OAAO,EAAE,MAAM,EAwG3B,CAAC;AAEF,wDAAwD;AACxD,wBAAgB,UAAU,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,CAEpD;AAED,2EAA2E;AAC3E,wBAAgB,UAAU,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAE9E;AAED,gFAAgF;AAChF,wBAAgB,QAAQ,IAAI,MAAM,EAAE,CAEnC;AAED,wEAAwE;AACxE,wBAAgB,SAAS,IAAI,MAAM,EAAE,CAEpC;AAED;;;;;;GAMG;AACH,wBAAgB,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,GAAG,OAAO,CAElE"}
@@ -0,0 +1,137 @@
1
+ /**
2
+ * Every action the factory can take, declared as data.
3
+ *
4
+ * Four things read this list and therefore cannot disagree with each other:
5
+ * the CLI's help, the CLI's decision to prompt, the worker's decision whether
6
+ * to retry after a crash, and the access report comparing what a key *holds*
7
+ * against what any command actually *uses*.
8
+ *
9
+ * The gate is data, not a judgement made at runtime. A whole policy you can
10
+ * read in one file beats one scattered across thirty call sites.
11
+ */
12
+ const A = (a) => a;
13
+ export const ACTIONS = [
14
+ // ─── github ────────────────────────────────────────────────────────────────
15
+ A({ service: "github", action: "list-repos", tier: "admin", gate: "none", idempotent: true,
16
+ summary: "Every repository this token can reach, across all organisations" }),
17
+ A({ service: "github", action: "list-public-repos", tier: "admin", gate: "none", idempotent: true,
18
+ summary: "Public repositories on the user — the policy expects none" }),
19
+ A({ service: "github", action: "create-repo", tier: "admin", gate: "confirm", idempotent: true,
20
+ summary: "Create a private repository in an organisation or on the user" }),
21
+ A({ service: "github", action: "delete-repo", tier: "admin", gate: "danger", idempotent: false,
22
+ summary: "Delete a repository, with its issues, pull requests and history" }),
23
+ A({ service: "github", action: "create-branch", tier: "admin", gate: "confirm", idempotent: true,
24
+ summary: "Create a branch from another branch" }),
25
+ // ─── vercel ────────────────────────────────────────────────────────────────
26
+ A({ service: "vercel", action: "list-projects", tier: "admin", gate: "none", idempotent: true,
27
+ summary: "Vercel projects on the team" }),
28
+ A({ service: "vercel", action: "list-deployments", tier: "admin", gate: "none", idempotent: true,
29
+ summary: "Recent deployments, newest first" }),
30
+ A({ service: "vercel", action: "list-env-keys", tier: "admin", gate: "none", idempotent: true,
31
+ summary: "Environment variable names on a project — never their values" }),
32
+ A({ service: "vercel", action: "create-project", tier: "admin", gate: "confirm", idempotent: true,
33
+ summary: "Create a project, optionally linked to a GitHub repository" }),
34
+ A({ service: "vercel", action: "list-domains", tier: "admin", gate: "none", idempotent: true,
35
+ summary: "Domains on a project, and whether their DNS checks out" }),
36
+ A({ service: "vercel", action: "add-domain", tier: "admin", gate: "confirm", idempotent: true,
37
+ summary: "Attach a domain to a project" }),
38
+ A({ service: "vercel", action: "create-deployment", tier: "admin", gate: "confirm", idempotent: false,
39
+ summary: "Build a git ref — production needs the branch named" }),
40
+ A({ service: "vercel", action: "promote-deployment", tier: "admin", gate: "confirm", idempotent: true,
41
+ summary: "Make an existing deployment the live one, without rebuilding" }),
42
+ A({ service: "vercel", action: "set-env-var", tier: "admin", gate: "confirm", idempotent: true,
43
+ summary: "Set one variable for one environment, replacing what is there" }),
44
+ // ─── neon ──────────────────────────────────────────────────────────────────
45
+ A({ service: "neon", action: "list-projects", tier: "admin", gate: "none", idempotent: true,
46
+ summary: "Neon projects across every organisation this key can see" }),
47
+ A({ service: "neon", action: "list-branches", tier: "admin", gate: "none", idempotent: true,
48
+ summary: "Branches on a Neon project, and which is the default" }),
49
+ A({ service: "neon", action: "create-project", tier: "admin", gate: "confirm", idempotent: true,
50
+ spends: true, summary: "Create a database project, with its default branch and endpoint" }),
51
+ A({ service: "neon", action: "create-branch", tier: "admin", gate: "confirm", idempotent: true,
52
+ spends: true, summary: "Create a branch with its own compute endpoint" }),
53
+ A({ service: "neon", action: "delete-branch", tier: "admin", gate: "danger", idempotent: false,
54
+ summary: "Delete a branch and everything in it. Neon refuses the default branch" }),
55
+ A({ service: "neon", action: "reset-branch", tier: "admin", gate: "danger", idempotent: false,
56
+ summary: "Overwrite a branch from its parent, discarding everything in it" }),
57
+ A({ service: "neon", action: "list-tables", tier: "app", gate: "none", idempotent: true,
58
+ summary: "Tables in the app's own database" }),
59
+ A({ service: "neon", action: "list-columns", tier: "app", gate: "none", idempotent: true,
60
+ summary: "Columns of one table, with their types" }),
61
+ A({ service: "neon", action: "run-query", tier: "app", gate: "none", idempotent: true,
62
+ summary: "Read-only SQL, inside a Postgres READ ONLY transaction" }),
63
+ A({ service: "neon", action: "run-write", tier: "app", gate: "confirm", idempotent: false,
64
+ summary: "Mutate the app's data — production requires a separate opt-in" }),
65
+ // ─── cloudflare ────────────────────────────────────────────────────────────
66
+ A({ service: "cloudflare", action: "list-zones", tier: "admin", gate: "none", idempotent: true,
67
+ summary: "Cloudflare zones on the account, and whether each is active" }),
68
+ A({ service: "cloudflare", action: "list-dns-records", tier: "admin", gate: "none", idempotent: true,
69
+ summary: "DNS records for one domain" }),
70
+ A({ service: "cloudflare", action: "set-dns-record", tier: "admin", gate: "confirm", idempotent: true,
71
+ summary: "Add a DNS record, replacing one of the same type and name" }),
72
+ // ─── resend ────────────────────────────────────────────────────────────────
73
+ A({ service: "resend", action: "list-domains", tier: "admin", gate: "none", idempotent: true,
74
+ summary: "Sending domains and whether they are verified" }),
75
+ A({ service: "resend", action: "create-domain", tier: "admin", gate: "confirm", idempotent: true,
76
+ summary: "Add a sending domain, and return the DNS records it needs" }),
77
+ A({ service: "resend", action: "verify-domain", tier: "admin", gate: "confirm", idempotent: true,
78
+ summary: "Ask Resend to check a domain's DNS and mark it verified" }),
79
+ A({ service: "resend", action: "create-sending-key", tier: "admin", gate: "confirm", idempotent: false,
80
+ summary: "A key that can only send, and only from one domain" }),
81
+ A({ service: "resend", action: "list-keys", tier: "admin", gate: "none", idempotent: true,
82
+ summary: "API keys on the account — names only" }),
83
+ // ─── agentmail ─────────────────────────────────────────────────────────────
84
+ A({ service: "agentmail", action: "list-inboxes", tier: "admin", gate: "none", idempotent: true,
85
+ summary: "Agent inboxes on the account, with their addresses" }),
86
+ A({ service: "agentmail", action: "list-domains", tier: "admin", gate: "none", idempotent: true,
87
+ summary: "Sending domains and their DKIM state" }),
88
+ // ─── bunny ─────────────────────────────────────────────────────────────────
89
+ A({ service: "bunny", action: "list-zones", tier: "admin", gate: "none", idempotent: true,
90
+ summary: "Storage zones and how much they hold" }),
91
+ A({ service: "bunny", action: "list-app-zones", tier: "admin", gate: "none", idempotent: true,
92
+ summary: "Storage zones belonging to one app" }),
93
+ // ─── inference ─────────────────────────────────────────────────────────────
94
+ A({ service: "elevenlabs", action: "list-voices", tier: "admin", gate: "none", idempotent: true,
95
+ summary: "Voices available on the plan" }),
96
+ A({ service: "elevenlabs", action: "list-models", tier: "admin", gate: "none", idempotent: true,
97
+ summary: "Speech synthesis models available on the plan" }),
98
+ A({ service: "ai-gateway", action: "list-models", tier: "admin", gate: "none", idempotent: true,
99
+ summary: "Models reachable through the AI Gateway" }),
100
+ A({ service: "ai-gateway", action: "get-credits", tier: "admin", gate: "none", idempotent: true,
101
+ summary: "Remaining balance on the AI Gateway account" }),
102
+ A({ service: "togetherai", action: "list-models", tier: "admin", gate: "none", idempotent: true,
103
+ summary: "Models available for inference on Together AI" }),
104
+ A({ service: "fireworks", action: "list-models", tier: "admin", gate: "none", idempotent: true,
105
+ summary: "Models available for inference on Fireworks" }),
106
+ A({ service: "firecrawl", action: "get-credits", tier: "admin", gate: "none", idempotent: true,
107
+ summary: "Remaining crawl credits and when the period ends" }),
108
+ A({ service: "firecrawl", action: "scrape-url", tier: "admin", gate: "confirm", idempotent: true,
109
+ spends: true, summary: "Scrape one URL — consumes credits" }),
110
+ ];
111
+ /** Every action for a service, in declaration order. */
112
+ export function actionsFor(service) {
113
+ return ACTIONS.filter((a) => a.service === service);
114
+ }
115
+ /** One action, or undefined. Callers decide whether a miss is an error. */
116
+ export function findAction(service, action) {
117
+ return ACTIONS.find((a) => a.service === service && a.action === action);
118
+ }
119
+ /** Services that appear in the registry, deduplicated, in declaration order. */
120
+ export function services() {
121
+ return [...new Set(ACTIONS.map((a) => a.service))];
122
+ }
123
+ /** Everything that spends money, destroys data, or reaches citizens. */
124
+ export function dangerous() {
125
+ return ACTIONS.filter((a) => a.gate === "danger");
126
+ }
127
+ /**
128
+ * Whether this action may run given what the caller has confirmed.
129
+ *
130
+ * Advisory — the guarantee is that destructive clients refuse without an
131
+ * explicit flag. This is what lets a CLI or a worker decide *before* calling,
132
+ * so it can ask rather than fail.
133
+ */
134
+ export function mayRun(action, confirmed) {
135
+ return action.gate === "none" || confirmed;
136
+ }
137
+ //# sourceMappingURL=registry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"registry.js","sourceRoot":"","sources":["../src/registry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AA0CH,MAAM,CAAC,GAAG,CAAC,CAAS,EAAU,EAAE,CAAC,CAAC,CAAC;AAEnC,MAAM,CAAC,MAAM,OAAO,GAAa;IAC/B,8EAA8E;IAC9E,CAAC,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,YAAY,EAAE,IAAI,EAAE,OAAO,EAAE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