@nimblebrain/mpak-sdk 0.1.0 → 0.1.2

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/dist/types.d.ts DELETED
@@ -1,146 +0,0 @@
1
- /**
2
- * Type definitions for mpak SDK
3
- *
4
- * Types are derived from the OpenAPI schema (generated by openapi-typescript)
5
- */
6
- import type { paths } from './schema.js';
7
- /** Extract the JSON response type from a path operation */
8
- type ResponseOf<T> = T extends {
9
- responses: {
10
- 200: {
11
- content: {
12
- 'application/json': infer R;
13
- };
14
- };
15
- };
16
- } ? R : never;
17
- /** Extract query parameters from a path operation */
18
- type QueryOf<T> = T extends {
19
- parameters: {
20
- query?: infer Q;
21
- };
22
- } ? Q : never;
23
- /** Response from GET /v1/bundles/search */
24
- export type BundleSearchResponse = ResponseOf<paths['/v1/bundles/search']['get']>;
25
- /** Response from GET /v1/bundles/@{scope}/{package} */
26
- export type BundleDetailResponse = ResponseOf<paths['/v1/bundles/@{scope}/{package}']['get']>;
27
- /** Response from GET /v1/bundles/@{scope}/{package}/versions */
28
- export type BundleVersionsResponse = ResponseOf<paths['/v1/bundles/@{scope}/{package}/versions']['get']>;
29
- /** Response from GET /v1/bundles/@{scope}/{package}/versions/{version} */
30
- export type BundleVersionResponse = ResponseOf<paths['/v1/bundles/@{scope}/{package}/versions/{version}']['get']>;
31
- /** Response from GET /v1/bundles/@{scope}/{package}/versions/{version}/download */
32
- export type BundleDownloadResponse = ResponseOf<paths['/v1/bundles/@{scope}/{package}/versions/{version}/download']['get']>;
33
- /** Response from GET /v1/bundles/@{scope}/{package}/index.json */
34
- export type BundleIndexResponse = ResponseOf<paths['/v1/bundles/@{scope}/{package}/index.json']['get']>;
35
- /** Query parameters for bundle search */
36
- export type BundleSearchParams = QueryOf<paths['/v1/bundles/search']['get']>;
37
- export type Bundle = BundleSearchResponse['bundles'][number];
38
- export type BundleDetail = BundleDetailResponse;
39
- export type BundleVersion = BundleVersionsResponse['versions'][number];
40
- export type BundleArtifact = BundleVersionResponse['artifacts'][number];
41
- export type BundleDownloadInfo = BundleDownloadResponse;
42
- /** Response from GET /v1/skills/search */
43
- export type SkillSearchResponse = ResponseOf<paths['/v1/skills/search']['get']>;
44
- /** Response from GET /v1/skills/@{scope}/{name} */
45
- export type SkillDetailResponse = ResponseOf<paths['/v1/skills/@{scope}/{name}']['get']>;
46
- /** Response from GET /v1/skills/@{scope}/{name}/download */
47
- export type SkillDownloadResponse = ResponseOf<paths['/v1/skills/@{scope}/{name}/download']['get']>;
48
- /** Query parameters for skill search */
49
- export type SkillSearchParams = QueryOf<paths['/v1/skills/search']['get']>;
50
- export type Skill = SkillSearchResponse['skills'][number];
51
- export type SkillDetail = SkillDetailResponse;
52
- export type SkillDownloadInfo = SkillDownloadResponse;
53
- export type SkillVersion = SkillDetailResponse['versions'][number];
54
- /** Platform identifier (os + arch) */
55
- export interface Platform {
56
- os: string;
57
- arch: string;
58
- }
59
- /** Pagination info returned by search endpoints */
60
- export interface Pagination {
61
- limit: number;
62
- offset: number;
63
- has_more: boolean;
64
- }
65
- /** Provenance information for verified packages */
66
- export interface Provenance {
67
- schema_version: string;
68
- provider: string;
69
- repository: string;
70
- sha: string;
71
- }
72
- /** Author information */
73
- export interface Author {
74
- name: string;
75
- url?: string;
76
- email?: string;
77
- }
78
- /**
79
- * Configuration options for MpakClient
80
- */
81
- export interface MpakClientConfig {
82
- /**
83
- * Base URL for the mpak registry API
84
- * @default 'https://api.mpak.dev'
85
- */
86
- registryUrl?: string;
87
- /**
88
- * Request timeout in milliseconds
89
- * @default 30000
90
- */
91
- timeout?: number;
92
- }
93
- /**
94
- * Base fields shared by all skill reference types
95
- */
96
- interface SkillReferenceBase {
97
- /** Skill artifact identifier (e.g., '@nimbletools/folk-crm') */
98
- name: string;
99
- /** Semver version (e.g., '1.0.0') or 'latest' */
100
- version: string;
101
- /** SHA256 integrity hash (format: 'sha256-hexdigest') */
102
- integrity?: string;
103
- }
104
- /**
105
- * Skill reference from mpak registry
106
- */
107
- export interface MpakSkillReference extends SkillReferenceBase {
108
- source: 'mpak';
109
- }
110
- /**
111
- * Skill reference from GitHub repository
112
- */
113
- export interface GithubSkillReference extends SkillReferenceBase {
114
- source: 'github';
115
- /** GitHub repository (owner/repo) */
116
- repo: string;
117
- /** Path to skill file in repo */
118
- path: string;
119
- }
120
- /**
121
- * Skill reference from direct URL
122
- */
123
- export interface UrlSkillReference extends SkillReferenceBase {
124
- source: 'url';
125
- /** Direct download URL */
126
- url: string;
127
- }
128
- /**
129
- * Discriminated union of skill reference types
130
- */
131
- export type SkillReference = MpakSkillReference | GithubSkillReference | UrlSkillReference;
132
- /**
133
- * Result of resolving a skill reference
134
- */
135
- export interface ResolvedSkill {
136
- /** The markdown content of the skill */
137
- content: string;
138
- /** Version that was resolved */
139
- version: string;
140
- /** Source the skill was fetched from */
141
- source: 'mpak' | 'github' | 'url';
142
- /** Whether integrity was verified */
143
- verified: boolean;
144
- }
145
- export {};
146
- //# sourceMappingURL=types.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAMzC,2DAA2D;AAC3D,KAAK,UAAU,CAAC,CAAC,IAAI,CAAC,SAAS;IAC7B,SAAS,EAAE;QAAE,GAAG,EAAE;YAAE,OAAO,EAAE;gBAAE,kBAAkB,EAAE,MAAM,CAAC,CAAA;aAAE,CAAA;SAAE,CAAA;KAAE,CAAC;CAClE,GACG,CAAC,GACD,KAAK,CAAC;AAEV,qDAAqD;AACrD,KAAK,OAAO,CAAC,CAAC,IAAI,CAAC,SAAS;IAAE,UAAU,EAAE;QAAE,KAAK,CAAC,EAAE,MAAM,CAAC,CAAA;KAAE,CAAA;CAAE,GAAG,CAAC,GAAG,KAAK,CAAC;AAM5E,2CAA2C;AAC3C,MAAM,MAAM,oBAAoB,G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C;IAErB;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAMD;;GAEG;AACH,UAAU,kBAAkB;IAC1B,gEAAgE;IAChE,IAAI,EAAE,MAAM,CAAC;IACb,iDAAiD;IACjD,OAAO,EAAE,MAAM,CAAC;IAChB,yDAAyD;IACzD,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;GAEG;AACH,MAAM,WAAW,kBAAmB,SAAQ,kBAAkB;IAC5D,MAAM,EAAE,MAAM,CAAC;CAChB;AAED;;GAEG;AACH,MAAM,WAAW,oBAAqB,SAAQ,kBAAkB;IAC9D,MAAM,EAAE,QAAQ,CAAC;IACjB,qCAAqC;IACrC,IAAI,EAAE,MAAM,CAAC;IACb,iCAAiC;IACjC,IAAI,EAAE,MAAM,CAAC;CACd;AAED;;GAEG;AACH,MAAM,WAAW,iBAAkB,SAAQ,kBAAkB;IAC3D,MAAM,EAAE,KAAK,CAAC;IACd,0BAA0B;IAC1B,GAAG,EAAE,MAAM,CAAC;CACb;AAED;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG,kBAAkB,GAAG,oBAAoB,GAAG,iBAAiB,CAAC;AAE3F;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,wCAAwC;IACxC,OAAO,EAAE,MAAM,CAAC;IAChB,gCAAgC;IAChC,OAAO,EAAE,MAAM,CAAC;IAChB,wCAAwC;IACxC,MAAM,EAAE,MAAM,GAAG,QAAQ,GAAG,KAAK,CAAC;IAClC,qCAAqC;IACrC,QAAQ,EAAE,OAAO,CAAC;CACnB"}
package/dist/types.js DELETED
@@ -1,7 +0,0 @@
1
- /**
2
- * Type definitions for mpak SDK
3
- *
4
- * Types are derived from the OpenAPI schema (generated by openapi-typescript)
5
- */
6
- export {};
7
- //# sourceMappingURL=types.js.map
package/dist/types.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;GAIG"}