@fias/create-fias-plugin 1.6.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,3 +1,5 @@
|
|
|
1
|
+
<!-- fias-sdk-guide-version: 2.16.0 -->
|
|
2
|
+
|
|
1
3
|
# FIAS Plugin Development Guide
|
|
2
4
|
|
|
3
5
|
This project is a FIAS platform plugin — a React application that runs in a sandboxed iframe within the FIAS marketplace. This file provides the context AI coding assistants need to build, test, and submit plugins effectively.
|
|
@@ -663,7 +665,7 @@ await invoke({ query: 'latest EU AI Act enforcement dates' });
|
|
|
663
665
|
|
|
664
666
|
### `useVaultDocuments()` — User-owned Vault documents
|
|
665
667
|
|
|
666
|
-
**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)
|
|
667
669
|
**Returns:** `VaultDocumentsApi`
|
|
668
670
|
|
|
669
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>/`.
|
|
@@ -696,6 +698,17 @@ const result = await vault.upload(bytes, {
|
|
|
696
698
|
});
|
|
697
699
|
// result.status transitions 'uploaded' → 'available' once indexed for search
|
|
698
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
|
+
|
|
699
712
|
// Semantic search across documents this arche owns
|
|
700
713
|
// (burns user credits per the AI Markup Invariant — call sparingly)
|
|
701
714
|
const { matches } = await vault.search('quarterly revenue', { topK: 5 });
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
<!-- fias-sdk-guide-version: 2.16.0 -->
|
|
2
|
+
|
|
1
3
|
# FIAS Plugin Development Guide
|
|
2
4
|
|
|
3
5
|
This project is a FIAS platform plugin — a React application that runs in a sandboxed iframe within the FIAS marketplace. This file provides the context AI coding assistants need to build, test, and submit plugins effectively.
|
|
@@ -663,7 +665,7 @@ await invoke({ query: 'latest EU AI Act enforcement dates' });
|
|
|
663
665
|
|
|
664
666
|
### `useVaultDocuments()` — User-owned Vault documents
|
|
665
667
|
|
|
666
|
-
**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)
|
|
667
669
|
**Returns:** `VaultDocumentsApi`
|
|
668
670
|
|
|
669
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>/`.
|
|
@@ -696,6 +698,17 @@ const result = await vault.upload(bytes, {
|
|
|
696
698
|
});
|
|
697
699
|
// result.status transitions 'uploaded' → 'available' once indexed for search
|
|
698
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
|
+
|
|
699
712
|
// Semantic search across documents this arche owns
|
|
700
713
|
// (burns user credits per the AI Markup Invariant — call sparingly)
|
|
701
714
|
const { matches } = await vault.search('quarterly revenue', { topK: 5 });
|