pcific 0.0.0-stage → 0.2.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 (64) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +50 -2
  3. package/dist/SKILL.md +127 -0
  4. package/dist/api/catalog.js +637 -0
  5. package/dist/api/run.js +960 -0
  6. package/dist/api/search.js +171 -0
  7. package/dist/api/shortcuts.js +799 -0
  8. package/dist/bin.js +648 -0
  9. package/dist/commands/auth.js +513 -0
  10. package/dist/commands/doctor.js +410 -0
  11. package/dist/commands/init.js +306 -0
  12. package/dist/commands/sync.js +214 -0
  13. package/dist/detect.js +214 -0
  14. package/dist/env.js +339 -0
  15. package/dist/goLive.js +629 -0
  16. package/dist/keyLink.js +305 -0
  17. package/dist/mcp/server.js +206 -0
  18. package/dist/mcp/tools.js +689 -0
  19. package/dist/python/template.js +793 -0
  20. package/dist/schema/discover.js +324 -0
  21. package/dist/schema/helpers.js +396 -0
  22. package/dist/schema/prismaToJsonSchema.js +197 -0
  23. package/dist/schema/push.js +570 -0
  24. package/dist/schema/tsToJsonSchema.js +405 -0
  25. package/dist/schema/zodToJsonSchema.js +442 -0
  26. package/dist/templates/openapi.json +1 -0
  27. package/dist/templates/sdk/auth.ts +139 -0
  28. package/dist/templates/sdk/client.ts +1059 -0
  29. package/dist/templates/sdk/errors.ts +76 -0
  30. package/dist/templates/sdk/generated-types.ts +5746 -0
  31. package/dist/templates/sdk/http.ts +359 -0
  32. package/dist/templates/sdk/index.ts +84 -0
  33. package/dist/templates/sdk/json.ts +24 -0
  34. package/dist/templates/sdk/kit.ts +516 -0
  35. package/dist/templates/sdk/multipart.ts +99 -0
  36. package/dist/templates/sdk/sse.ts +131 -0
  37. package/dist/templates/sdk/verify.ts +766 -0
  38. package/dist/templates/sdk-js/auth.d.ts +20 -0
  39. package/dist/templates/sdk-js/auth.js +85 -0
  40. package/dist/templates/sdk-js/client.d.ts +324 -0
  41. package/dist/templates/sdk-js/client.js +607 -0
  42. package/dist/templates/sdk-js/errors.d.ts +51 -0
  43. package/dist/templates/sdk-js/errors.js +48 -0
  44. package/dist/templates/sdk-js/generated-types.d.ts +5736 -0
  45. package/dist/templates/sdk-js/generated-types.js +5 -0
  46. package/dist/templates/sdk-js/http.d.ts +50 -0
  47. package/dist/templates/sdk-js/http.js +263 -0
  48. package/dist/templates/sdk-js/index.d.ts +9 -0
  49. package/dist/templates/sdk-js/index.js +7 -0
  50. package/dist/templates/sdk-js/json.d.ts +11 -0
  51. package/dist/templates/sdk-js/json.js +16 -0
  52. package/dist/templates/sdk-js/kit.d.ts +220 -0
  53. package/dist/templates/sdk-js/kit.js +208 -0
  54. package/dist/templates/sdk-js/multipart.d.ts +23 -0
  55. package/dist/templates/sdk-js/multipart.js +61 -0
  56. package/dist/templates/sdk-js/sse.d.ts +12 -0
  57. package/dist/templates/sdk-js/sse.js +99 -0
  58. package/dist/templates/sdk-js/verify.d.ts +114 -0
  59. package/dist/templates/sdk-js/verify.js +506 -0
  60. package/dist/templates.js +925 -0
  61. package/dist/ui.js +399 -0
  62. package/dist/webhooks/events.js +171 -0
  63. package/dist/webhooks/listen.js +772 -0
  64. package/package.json +32 -4
@@ -0,0 +1,76 @@
1
+ import type { JsonValue } from "./json.js";
2
+
3
+ export interface PcificProblem {
4
+ path?: string;
5
+ where?: string;
6
+ problem?: string;
7
+ tryThis?: string;
8
+ category?: string;
9
+ }
10
+
11
+ export interface PcificApiErrorInit {
12
+ status: number;
13
+ code: string;
14
+ error: string;
15
+ tryThis: string;
16
+ where?: string;
17
+ retryable?: boolean;
18
+ problems?: PcificProblem[];
19
+ requestId?: string;
20
+ existingId?: string;
21
+ rawBody?: JsonValue;
22
+ }
23
+
24
+ export class PcificConfigError extends Error {
25
+ readonly code: string;
26
+ readonly tryThis: string;
27
+
28
+ constructor(message: string, options: { code?: string; tryThis?: string } = {}) {
29
+ super(message);
30
+ this.name = "PcificConfigError";
31
+ this.code = options.code ?? "PCIFIC_CONFIG_ERROR";
32
+ this.tryThis = options.tryThis ?? "Check your PCIFIC API key and PCIFIC_MODE environment variables.";
33
+ }
34
+ }
35
+
36
+ export class PcificApiError extends Error {
37
+ readonly status: number;
38
+ readonly code: string;
39
+ readonly error: string;
40
+ readonly tryThis: string;
41
+ readonly where?: string;
42
+ readonly retryable: boolean;
43
+ readonly problems: PcificProblem[];
44
+ readonly requestId?: string;
45
+ readonly existingId?: string;
46
+ readonly rawBody?: JsonValue;
47
+
48
+ constructor(init: PcificApiErrorInit) {
49
+ super(init.tryThis ? `${init.error} ${init.tryThis}` : init.error);
50
+ this.name = "PcificApiError";
51
+ this.status = init.status;
52
+ this.code = init.code;
53
+ this.error = init.error;
54
+ this.tryThis = init.tryThis;
55
+ this.where = init.where;
56
+ this.retryable = init.retryable ?? false;
57
+ this.problems = init.problems ?? [];
58
+ this.requestId = init.requestId;
59
+ this.existingId = init.existingId;
60
+ this.rawBody = init.rawBody;
61
+ }
62
+ }
63
+
64
+ export class PcificStreamError extends Error {
65
+ readonly code?: string;
66
+ readonly tryThis?: string;
67
+ readonly payload?: JsonValue;
68
+
69
+ constructor(message: string, options: { code?: string; tryThis?: string; payload?: JsonValue } = {}) {
70
+ super(message);
71
+ this.name = "PcificStreamError";
72
+ this.code = options.code;
73
+ this.tryThis = options.tryThis;
74
+ this.payload = options.payload;
75
+ }
76
+ }