@gibs-dev/sdk 0.1.0 → 0.1.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.
package/README.md CHANGED
@@ -1,19 +1,19 @@
1
- # @gibs/sdk
1
+ # @gibs-dev/sdk
2
2
 
3
3
  Official JavaScript/TypeScript SDK for the [Gibs](https://gibs.dev) multi-regulation compliance API.
4
4
 
5
- Gibs provides instant, source-cited compliance answers for EU regulations including the AI Act and GDPR. Every claim is traced to a specific article in the legal corpus.
5
+ Gibs provides instant, source-cited compliance answers for EU regulations including the AI Act, GDPR, and DORA. Every claim is traced to a specific article in the legal corpus.
6
6
 
7
7
  ## Installation
8
8
 
9
9
  ```bash
10
- npm install @gibs/sdk
10
+ npm install @gibs-dev/sdk
11
11
  ```
12
12
 
13
13
  ## Quick Start
14
14
 
15
15
  ```typescript
16
- import { GibsClient } from '@gibs/sdk';
16
+ import { GibsClient } from '@gibs-dev/sdk';
17
17
 
18
18
  const client = new GibsClient({ apiKey: 'gbs_live_xxx' });
19
19
 
@@ -25,18 +25,24 @@ const classification = await client.classify({
25
25
  });
26
26
 
27
27
  console.log(classification.risk_level); // "high"
28
- console.log(classification.obligations); // [{id: "risk_mgmt", ...}, ...]
29
- console.log(classification.sources); // [{article_id: "ai_act_art6", ...}]
28
+ console.log(classification.reasoning); // Detailed explanation with article references
29
+ console.log(classification.sources); // [{article_id: "Article 6", ...}]
30
30
 
31
31
  // Ask a compliance question
32
32
  const answer = await client.check({
33
33
  question: 'What are the transparency requirements for chatbots under the AI Act?',
34
- regulation: 'ai_act',
35
34
  });
36
35
 
37
36
  console.log(answer.answer); // Detailed answer with article citations
38
37
  console.log(answer.confidence); // "high" | "medium" | "low"
39
38
  console.log(answer.sources); // Source citations
39
+
40
+ // DORA: ICT resilience for financial entities
41
+ const dora = await client.check({
42
+ question: 'What are the ICT incident reporting timelines under DORA?',
43
+ });
44
+
45
+ console.log(dora.answer); // Timeline with Article 19 citations
40
46
  ```
41
47
 
42
48
  ## Requirements
@@ -70,20 +76,21 @@ const result = await client.classify({
70
76
  });
71
77
 
72
78
  // result.risk_level: "prohibited" | "high" | "limited" | "minimal"
73
- // result.confidence: 0.0 - 1.0
79
+ // result.confidence: number (0.0 - 1.0)
74
80
  // result.reasoning: string
75
81
  // result.obligations: Obligation[]
76
82
  // result.sources: SourceCitation[]
83
+ // result.corpus_version: string
84
+ // result.processing_time_ms: number
77
85
  ```
78
86
 
79
87
  ### `client.check(request)`
80
88
 
81
- Ask a compliance question and get a grounded answer with source citations.
89
+ Ask a compliance question and get a grounded answer with source citations. The API automatically detects which regulation(s) the question targets (AI Act, GDPR, DORA) and routes to the correct corpus.
82
90
 
83
91
  ```typescript
84
92
  const answer = await client.check({
85
93
  question: 'What are GDPR data subject rights?',
86
- regulation: 'gdpr',
87
94
  system_context: {
88
95
  industry: 'healthcare',
89
96
  data_types: 'patient records',
@@ -95,6 +102,8 @@ const answer = await client.check({
95
102
  // answer.sources: SourceCitation[]
96
103
  // answer.should_abstain: boolean
97
104
  // answer.abstention_reason: string | null
105
+ // answer.corpus_version: string
106
+ // answer.processing_time_ms: number
98
107
  ```
99
108
 
100
109
  ### `client.health()`
@@ -145,7 +154,7 @@ import {
145
154
  GibsRateLimitError, // HTTP 429 (rate limit exceeded)
146
155
  GibsTimeoutError, // Request timed out
147
156
  GibsConnectionError // Network connectivity issues
148
- } from '@gibs/sdk';
157
+ } from '@gibs-dev/sdk';
149
158
 
150
159
  try {
151
160
  const result = await client.classify({
@@ -198,7 +207,7 @@ import type {
198
207
  RiskLevel,
199
208
  ConfidenceLevel,
200
209
  KeyInfo,
201
- } from '@gibs/sdk';
210
+ } from '@gibs-dev/sdk';
202
211
  ```
203
212
 
204
213
  ## License
@@ -12,7 +12,7 @@ import type { CheckRequest, CheckResponse, ClassifyRequest, ClassifyResponse, Cr
12
12
  *
13
13
  * @example
14
14
  * ```ts
15
- * import { GibsClient } from '@gibs/sdk';
15
+ * import { GibsClient } from '@gibs-dev/sdk';
16
16
  *
17
17
  * const client = new GibsClient({ apiKey: 'gbs_live_xxx' });
18
18
  *
@@ -10,7 +10,7 @@
10
10
  Object.defineProperty(exports, "__esModule", { value: true });
11
11
  exports.GibsClient = void 0;
12
12
  const errors_js_1 = require("./errors.js");
13
- const VERSION = '0.1.0';
13
+ const VERSION = '0.1.1';
14
14
  const DEFAULT_BASE_URL = 'https://api.gibs.dev';
15
15
  const DEFAULT_TIMEOUT_MS = 120_000;
16
16
  const DEFAULT_MAX_RETRIES = 3;
@@ -25,7 +25,7 @@ const RETRYABLE_STATUS_CODES = new Set([408, 429, 500, 502, 503, 504]);
25
25
  *
26
26
  * @example
27
27
  * ```ts
28
- * import { GibsClient } from '@gibs/sdk';
28
+ * import { GibsClient } from '@gibs-dev/sdk';
29
29
  *
30
30
  * const client = new GibsClient({ apiKey: 'gbs_live_xxx' });
31
31
  *
@@ -3,7 +3,7 @@
3
3
  *
4
4
  * @example
5
5
  * ```ts
6
- * import { GibsClient } from '@gibs/sdk';
6
+ * import { GibsClient } from '@gibs-dev/sdk';
7
7
  *
8
8
  * const client = new GibsClient({ apiKey: 'gbs_live_xxx' });
9
9
  *
package/dist/cjs/index.js CHANGED
@@ -4,7 +4,7 @@
4
4
  *
5
5
  * @example
6
6
  * ```ts
7
- * import { GibsClient } from '@gibs/sdk';
7
+ * import { GibsClient } from '@gibs-dev/sdk';
8
8
  *
9
9
  * const client = new GibsClient({ apiKey: 'gbs_live_xxx' });
10
10
  *
@@ -12,7 +12,7 @@ import type { CheckRequest, CheckResponse, ClassifyRequest, ClassifyResponse, Cr
12
12
  *
13
13
  * @example
14
14
  * ```ts
15
- * import { GibsClient } from '@gibs/sdk';
15
+ * import { GibsClient } from '@gibs-dev/sdk';
16
16
  *
17
17
  * const client = new GibsClient({ apiKey: 'gbs_live_xxx' });
18
18
  *
@@ -7,7 +7,7 @@
7
7
  * @module client
8
8
  */
9
9
  import { GibsAPIError, GibsAuthError, GibsConnectionError, GibsRateLimitError, GibsTimeoutError, } from './errors.js';
10
- const VERSION = '0.1.0';
10
+ const VERSION = '0.1.1';
11
11
  const DEFAULT_BASE_URL = 'https://api.gibs.dev';
12
12
  const DEFAULT_TIMEOUT_MS = 120_000;
13
13
  const DEFAULT_MAX_RETRIES = 3;
@@ -22,7 +22,7 @@ const RETRYABLE_STATUS_CODES = new Set([408, 429, 500, 502, 503, 504]);
22
22
  *
23
23
  * @example
24
24
  * ```ts
25
- * import { GibsClient } from '@gibs/sdk';
25
+ * import { GibsClient } from '@gibs-dev/sdk';
26
26
  *
27
27
  * const client = new GibsClient({ apiKey: 'gbs_live_xxx' });
28
28
  *
@@ -3,7 +3,7 @@
3
3
  *
4
4
  * @example
5
5
  * ```ts
6
- * import { GibsClient } from '@gibs/sdk';
6
+ * import { GibsClient } from '@gibs-dev/sdk';
7
7
  *
8
8
  * const client = new GibsClient({ apiKey: 'gbs_live_xxx' });
9
9
  *
package/dist/esm/index.js CHANGED
@@ -3,7 +3,7 @@
3
3
  *
4
4
  * @example
5
5
  * ```ts
6
- * import { GibsClient } from '@gibs/sdk';
6
+ * import { GibsClient } from '@gibs-dev/sdk';
7
7
  *
8
8
  * const client = new GibsClient({ apiKey: 'gbs_live_xxx' });
9
9
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gibs-dev/sdk",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Official JavaScript/TypeScript SDK for the Gibs multi-regulation compliance API",
5
5
  "author": "Gibbr AB",
6
6
  "license": "MIT",