@fias/arche-sdk 1.2.0 → 1.3.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.
File without changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fias/arche-sdk",
3
- "version": "1.2.0",
3
+ "version": "1.3.0",
4
4
  "description": "SDK for building FIAS platform plugin arches",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -249,29 +249,32 @@ These are hard limits enforced by the platform. Code that violates these will fa
249
249
 
250
250
  ## Development Workflow
251
251
 
252
- ### Step 1: Authenticate (one-time)
252
+ ### Starting Development
253
253
 
254
254
  ```bash
255
- npx fias-dev login # Opens browser to sign in, saves API key automatically
255
+ npm start # Starts both Vite + dev harness
256
256
  ```
257
257
 
258
- This opens the FIAS platform in your browser. If you're already signed in, the API key is created and saved automatically. If not, you'll need to sign in (or sign up for a FIAS account if you don't have one — an invite code is required for new accounts). The URL is also printed in the terminal if the browser doesn't open automatically.
258
+ This starts the plugin in **mock mode** (free, offline). Open **http://localhost:3200** in your browser to see the plugin running inside the harness.
259
259
 
260
- ### Step 2: Start development
260
+ Port 3200 is the dev harness that wraps the plugin in the platform iframe. Port 3100 is just the raw Vite server and won't work correctly on its own.
261
261
 
262
- ```bash
263
- npm start # Starts both Vite + dev harness with real AI (uses credits)
264
- ```
262
+ ### Switching to Live Mode (Real AI)
265
263
 
266
- Or for offline development without credits (AI calls return canned responses):
264
+ In the harness toolbar, click the **MOCK** badge to switch to **LIVE** mode. If you haven't authenticated yet, a login popup will open automatically. Sign in with your FIAS account and the harness will switch to live mode.
267
265
 
268
- ```bash
269
- npm run start:mock # Starts both Vite + dev harness with mock AI
270
- ```
266
+ You can choose between **Staging** and **Production** environments using the dropdown in the toolbar. Each environment requires separate authentication.
271
267
 
272
- Open http://localhost:3200 in your browser.
268
+ **IMPORTANT:** Live mode uses real AI and costs credits. Mock mode returns canned responses and does NOT call real AI models. If you want actual AI-powered features to work during testing, you MUST switch to live mode.
273
269
 
274
- **Advanced:** If you prefer separate terminals, use `npm run dev` (Vite on port 3100) and `npm run dev:harness` or `npm run dev:mock` (harness on port 3200) independently.
270
+ ### CLI Authentication (Alternative)
271
+
272
+ You can also authenticate via the command line:
273
+
274
+ ```bash
275
+ npx fias-dev login # Authenticate with staging (default)
276
+ npx fias-dev login --env production # Authenticate with production
277
+ ```
275
278
 
276
279
  ### Browsing Available Entities
277
280
 
@@ -249,29 +249,32 @@ These are hard limits enforced by the platform. Code that violates these will fa
249
249
 
250
250
  ## Development Workflow
251
251
 
252
- ### Step 1: Authenticate (one-time)
252
+ ### Starting Development
253
253
 
254
254
  ```bash
255
- npx fias-dev login # Opens browser to sign in, saves API key automatically
255
+ npm start # Starts both Vite + dev harness
256
256
  ```
257
257
 
258
- This opens the FIAS platform in your browser. If you're already signed in, the API key is created and saved automatically. If not, you'll need to sign in (or sign up for a FIAS account if you don't have one — an invite code is required for new accounts). The URL is also printed in the terminal if the browser doesn't open automatically.
258
+ This starts the plugin in **mock mode** (free, offline). Open **http://localhost:3200** in your browser to see the plugin running inside the harness.
259
259
 
260
- ### Step 2: Start development
260
+ Port 3200 is the dev harness that wraps the plugin in the platform iframe. Port 3100 is just the raw Vite server and won't work correctly on its own.
261
261
 
262
- ```bash
263
- npm start # Starts both Vite + dev harness with real AI (uses credits)
264
- ```
262
+ ### Switching to Live Mode (Real AI)
265
263
 
266
- Or for offline development without credits (AI calls return canned responses):
264
+ In the harness toolbar, click the **MOCK** badge to switch to **LIVE** mode. If you haven't authenticated yet, a login popup will open automatically. Sign in with your FIAS account and the harness will switch to live mode.
267
265
 
268
- ```bash
269
- npm run start:mock # Starts both Vite + dev harness with mock AI
270
- ```
266
+ You can choose between **Staging** and **Production** environments using the dropdown in the toolbar. Each environment requires separate authentication.
271
267
 
272
- Open http://localhost:3200 in your browser.
268
+ **IMPORTANT:** Live mode uses real AI and costs credits. Mock mode returns canned responses and does NOT call real AI models. If you want actual AI-powered features to work during testing, you MUST switch to live mode.
273
269
 
274
- **Advanced:** If you prefer separate terminals, use `npm run dev` (Vite on port 3100) and `npm run dev:harness` or `npm run dev:mock` (harness on port 3200) independently.
270
+ ### CLI Authentication (Alternative)
271
+
272
+ You can also authenticate via the command line:
273
+
274
+ ```bash
275
+ npx fias-dev login # Authenticate with staging (default)
276
+ npx fias-dev login --env production # Authenticate with production
277
+ ```
275
278
 
276
279
  ### Browsing Available Entities
277
280
 
@@ -3,13 +3,11 @@
3
3
  "version": "1.0.0",
4
4
  "private": true,
5
5
  "scripts": {
6
- "start": "vite & sleep 2 && fias-dev --live",
7
- "start:mock": "vite & sleep 2 && fias-dev",
6
+ "start": "vite & sleep 2 && fias-dev",
8
7
  "dev": "vite",
9
8
  "build": "vite build",
10
9
  "validate": "tsc --noEmit",
11
- "dev:harness": "fias-dev --live",
12
- "dev:mock": "fias-dev",
10
+ "dev:harness": "fias-dev",
13
11
  "submit": "fias-dev submit"
14
12
  },
15
13
  "dependencies": {