@fias/create-fias-plugin 1.7.0 → 1.8.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fias/create-fias-plugin",
3
- "version": "1.7.0",
3
+ "version": "1.8.0",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -1,4 +1,4 @@
1
- <!-- fias-sdk-guide-version: 2.14.0 -->
1
+ <!-- fias-sdk-guide-version: 2.16.0 -->
2
2
 
3
3
  # FIAS Plugin Development Guide
4
4
 
@@ -665,7 +665,7 @@ await invoke({ query: 'latest EU AI Act enforcement dates' });
665
665
 
666
666
  ### `useVaultDocuments()` — User-owned Vault documents
667
667
 
668
- **Permissions:** `vault:documents:read` (list / read / getDownloadUrl / search), `vault:documents:write` (write / update / delete / attach / detach / upload)
668
+ **Permissions:** `vault:documents:read` (list / read / readBytes / getDownloadUrl / search), `vault:documents:write` (write / update / delete / attach / detach / upload)
669
669
  **Returns:** `VaultDocumentsApi`
670
670
 
671
671
  The Vault is the platform's persistent document store for the signed-in user. Distinct from `useFiasStorage` (per-plugin sandbox): Vault docs live in the user's My Data, survive plugin uninstall, and can be cross-referenced from other arches. Documents this arche creates are scoped to it (`source_arche_id`) and surfaced to the user under `/My-Fias/Arches/<archeId>/`.
@@ -698,6 +698,17 @@ const result = await vault.upload(bytes, {
698
698
  });
699
699
  // result.status transitions 'uploaded' → 'available' once indexed for search
700
700
 
701
+ // Read back the raw bytes of a document THIS arche created (any content
702
+ // type) — the reopen path for binary-processing plugins (e.g. a PDF editor
703
+ // reloading a saved PDF). Capped at 15 MB (OWN_DOCUMENT_TOO_LARGE names the
704
+ // cap) with its own tight per-minute budget: read sequentially and surface
705
+ // a RATE_LIMIT error verbatim instead of retrying in a loop. Documents this
706
+ // arche did NOT create reject with DOCUMENT_NOT_FOUND — the user's own
707
+ // files are reachable only through useVaultUserDocuments (picker consent).
708
+ // A document whose upload never finished rejects with OWN_DOCUMENT_NOT_READY
709
+ // but still appears in list() — don't assume every listed doc has bytes.
710
+ const { bytes: saved } = await vault.readBytes(documentId);
711
+
701
712
  // Semantic search across documents this arche owns
702
713
  // (burns user credits per the AI Markup Invariant — call sparingly)
703
714
  const { matches } = await vault.search('quarterly revenue', { topK: 5 });
@@ -1,4 +1,4 @@
1
- <!-- fias-sdk-guide-version: 2.14.0 -->
1
+ <!-- fias-sdk-guide-version: 2.16.0 -->
2
2
 
3
3
  # FIAS Plugin Development Guide
4
4
 
@@ -665,7 +665,7 @@ await invoke({ query: 'latest EU AI Act enforcement dates' });
665
665
 
666
666
  ### `useVaultDocuments()` — User-owned Vault documents
667
667
 
668
- **Permissions:** `vault:documents:read` (list / read / getDownloadUrl / search), `vault:documents:write` (write / update / delete / attach / detach / upload)
668
+ **Permissions:** `vault:documents:read` (list / read / readBytes / getDownloadUrl / search), `vault:documents:write` (write / update / delete / attach / detach / upload)
669
669
  **Returns:** `VaultDocumentsApi`
670
670
 
671
671
  The Vault is the platform's persistent document store for the signed-in user. Distinct from `useFiasStorage` (per-plugin sandbox): Vault docs live in the user's My Data, survive plugin uninstall, and can be cross-referenced from other arches. Documents this arche creates are scoped to it (`source_arche_id`) and surfaced to the user under `/My-Fias/Arches/<archeId>/`.
@@ -698,6 +698,17 @@ const result = await vault.upload(bytes, {
698
698
  });
699
699
  // result.status transitions 'uploaded' → 'available' once indexed for search
700
700
 
701
+ // Read back the raw bytes of a document THIS arche created (any content
702
+ // type) — the reopen path for binary-processing plugins (e.g. a PDF editor
703
+ // reloading a saved PDF). Capped at 15 MB (OWN_DOCUMENT_TOO_LARGE names the
704
+ // cap) with its own tight per-minute budget: read sequentially and surface
705
+ // a RATE_LIMIT error verbatim instead of retrying in a loop. Documents this
706
+ // arche did NOT create reject with DOCUMENT_NOT_FOUND — the user's own
707
+ // files are reachable only through useVaultUserDocuments (picker consent).
708
+ // A document whose upload never finished rejects with OWN_DOCUMENT_NOT_READY
709
+ // but still appears in list() — don't assume every listed doc has bytes.
710
+ const { bytes: saved } = await vault.readBytes(documentId);
711
+
701
712
  // Semantic search across documents this arche owns
702
713
  // (burns user credits per the AI Markup Invariant — call sparingly)
703
714
  const { matches } = await vault.search('quarterly revenue', { topK: 5 });