@jini-ai/plugins 0.7.3-next.2 → 0.7.4
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/CHANGELOG.md +7 -0
- package/README.md +53 -0
- package/dist/host/activation-polling.d.ts +67 -0
- package/dist/host/activation-polling.js +113 -0
- package/dist/host/activation.d.ts +2 -30
- package/dist/host/contributions.d.ts +2 -9
- package/dist/host/contributions.js +1 -1
- package/dist/host/hook-refusals.d.ts +49 -0
- package/dist/host/hook-refusals.js +65 -0
- package/dist/host/index.d.ts +3 -1
- package/dist/host/index.js +1 -0
- package/dist/host/node/browser-provider-assets.d.ts +2 -1
- package/dist/host/node/browser-provider-assets.js +2 -2
- package/dist/host/node/discovery.js +4 -4
- package/dist/host/node/install.d.ts +6 -1
- package/dist/host/node/install.js +20 -18
- package/dist/host/node/integrity-command.d.ts +2 -1
- package/dist/host/node/integrity-command.js +3 -3
- package/dist/host/node/loader.d.ts +3 -2
- package/dist/host/node/loader.js +6 -6
- package/dist/host/node/module-snapshot.d.ts +4 -3
- package/dist/host/node/module-snapshot.js +5 -5
- package/dist/host/node/package-files.d.ts +2 -1
- package/dist/host/node/package-files.js +6 -6
- package/dist/host/node/runtime-activation.d.ts +35 -0
- package/dist/host/node/runtime-activation.js +188 -0
- package/dist/host/node/runtime-boot.d.ts +16 -0
- package/dist/host/node/runtime-boot.js +153 -0
- package/dist/host/node/runtime-conflicts.d.ts +38 -0
- package/dist/host/node/runtime-conflicts.js +42 -0
- package/dist/host/node/runtime-contracts.d.ts +4 -3
- package/dist/host/node/runtime-core.js +65 -465
- package/dist/host/node/runtime-load-target.d.ts +14 -0
- package/dist/host/node/runtime-load-target.js +15 -0
- package/dist/host/node/runtime-reload.d.ts +12 -0
- package/dist/host/node/runtime-reload.js +107 -0
- package/dist/host/node/runtime-state.d.ts +52 -0
- package/dist/host/node/runtime-state.js +50 -0
- package/dist/host/node/source-drafts.d.ts +1 -1
- package/dist/host/node/source-drafts.js +17 -15
- package/dist/host/plugin-claims.d.ts +2 -9
- package/dist/host/plugin-format.d.ts +5 -5
- package/dist/host/plugin-format.js +9 -10
- package/dist/host/ports.d.ts +3 -28
- package/dist/host/tools/install.js +1 -1
- package/dist/host/uninstall.d.ts +2 -2
- package/dist/host/worker/import-policy.d.ts +49 -0
- package/dist/host/worker/import-policy.js +86 -0
- package/dist/host/worker/import-seam.js +21 -2
- package/dist/host/worker/index.d.ts +1 -0
- package/dist/host/worker/index.js +1 -0
- package/dist/host/worker/protocol.d.ts +4 -0
- package/dist/host/worker/run-call.js +2 -1
- package/dist/host/worker/start.d.ts +18 -1
- package/dist/host/worker/start.js +27 -6
- package/dist/react/PluginProviderSettingsDialog.d.ts +144 -0
- package/dist/react/PluginProviderSettingsDialog.js +54 -0
- package/dist/react/plugin-install-port.d.ts +29 -0
- package/dist/react/plugin-install-port.js +15 -0
- package/dist/runtime/agent-tools.d.ts +174 -0
- package/dist/runtime/agent-tools.js +121 -0
- package/dist/runtime/built-ins/word-count/count-words.d.ts +21 -0
- package/dist/runtime/built-ins/word-count/count-words.js +48 -0
- package/dist/runtime/built-ins/word-count/plugin.d.ts +6 -0
- package/dist/runtime/built-ins/word-count/plugin.js +12 -0
- package/dist/runtime/capability-card.d.ts +22 -0
- package/dist/runtime/capability-card.js +30 -0
- package/dist/runtime/enable-confirmation-ui.d.ts +28 -0
- package/dist/runtime/enable-confirmation-ui.js +54 -0
- package/dist/runtime/install-consent.d.ts +12 -0
- package/dist/runtime/install-consent.js +27 -0
- package/dist/runtime/install-source.d.ts +26 -0
- package/dist/runtime/install-source.js +61 -0
- package/dist/runtime/install-tool-catalog.d.ts +9 -0
- package/dist/runtime/install-tool-catalog.js +25 -0
- package/dist/runtime/lower-tool-access.d.ts +17 -0
- package/dist/runtime/lower-tool-access.js +14 -0
- package/dist/runtime/plugin-export.d.ts +13 -0
- package/dist/runtime/plugin-export.js +14 -0
- package/dist/runtime/plugin-host-copy.d.ts +17 -0
- package/dist/runtime/plugin-host-copy.js +7 -0
- package/dist/runtime/plugin-tool-ids.d.ts +18 -0
- package/dist/runtime/plugin-tool-ids.js +4 -0
- package/dist/runtime/plugin-tool-messages.d.ts +97 -0
- package/dist/runtime/plugin-tool-messages.js +90 -0
- package/dist/runtime/sdk-resolver.d.ts +60 -0
- package/dist/runtime/sdk-resolver.js +97 -0
- package/dist/runtime/service-ports.d.ts +43 -0
- package/dist/runtime/service-ports.js +3 -0
- package/dist/runtime/source-tool-catalog.d.ts +7 -0
- package/dist/runtime/source-tool-catalog.js +33 -0
- package/dist/runtime/uninstall-confirmation-ui.d.ts +31 -0
- package/dist/runtime/uninstall-confirmation-ui.js +38 -0
- package/dist/runtime/widget-partials.d.ts +22 -0
- package/dist/runtime/widget-partials.js +13 -0
- package/dist/site/lipay/manifest.d.ts +10 -0
- package/dist/site/lipay/manifest.js +96 -0
- package/dist/site/store/manifest.d.ts +10 -0
- package/dist/site/store/manifest.js +37 -0
- package/package.json +158 -8
- package/dist/host/provider-config-source.d.ts +0 -47
- package/dist/host/provider-config-source.js +0 -2
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
const LIPAY_PLUGIN_ID = "lipay";
|
|
2
|
+
/**
|
|
3
|
+
* The publisher is the HOST's first-party id, not the engine's: it is persisted in `_plugin_identity`
|
|
4
|
+
* and compared strictly on every boot (`checkNamespaceAdoption`), so a site that already minted the
|
|
5
|
+
* `lipay` row under its host's id must keep declaring that id. Changing it is a data migration.
|
|
6
|
+
*/
|
|
7
|
+
export function createLipayManifest(required, _optional = {}) {
|
|
8
|
+
return {
|
|
9
|
+
pluginId: LIPAY_PLUGIN_ID,
|
|
10
|
+
pluginTier: "tier-2",
|
|
11
|
+
provenance: { sourceUrl: "builtin://lipay", publisher: required.publisher },
|
|
12
|
+
tables: LIPAY_TABLES,
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
const LIPAY_TABLES = [
|
|
16
|
+
{
|
|
17
|
+
// One row per payment attempt (the "intent"), provider-agnostic.
|
|
18
|
+
name: "payments",
|
|
19
|
+
columns: [
|
|
20
|
+
{ name: "id", type: "TEXT", primaryKey: true },
|
|
21
|
+
{ name: "workspace_id", type: "TEXT", notNull: true },
|
|
22
|
+
{ name: "provider_id", type: "TEXT", notNull: true },
|
|
23
|
+
// Caller-supplied. The outbound idempotency guard.
|
|
24
|
+
{ name: "idempotency_key", type: "TEXT", notNull: true },
|
|
25
|
+
{ name: "status", type: "TEXT", notNull: true },
|
|
26
|
+
// Integer minor units. NEVER a float, NEVER "cents": JPY/KRW have zero decimal places,
|
|
27
|
+
// KWD/BHD/JOD have three, so the scale is a property of the currency, not a constant 100.
|
|
28
|
+
{ name: "amount_minor", type: "INTEGER", notNull: true },
|
|
29
|
+
{ name: "currency", type: "TEXT", notNull: true },
|
|
30
|
+
{ name: "amount_refunded_minor", type: "INTEGER", notNull: true },
|
|
31
|
+
// The provider's own charge id. Null until the provider responds.
|
|
32
|
+
{ name: "provider_ref", type: "TEXT" },
|
|
33
|
+
// The CALLER's domain reference (order id, invoice id, membership id, …). lipay
|
|
34
|
+
// deliberately never learns what it points at — an `order_id` column would couple
|
|
35
|
+
// payments to one commerce model and lock out a membership or donations plugin.
|
|
36
|
+
{ name: "reference", type: "TEXT" },
|
|
37
|
+
{ name: "created_at", type: "INTEGER", notNull: true },
|
|
38
|
+
{ name: "updated_at", type: "INTEGER", notNull: true },
|
|
39
|
+
{ name: "last_error", type: "TEXT" },
|
|
40
|
+
],
|
|
41
|
+
indexes: [
|
|
42
|
+
// Outbound replay protection: a retried charge with the same key hits this, not the provider.
|
|
43
|
+
{ name: "idem", columns: ["workspace_id", "idempotency_key"], unique: true },
|
|
44
|
+
// Webhook → payment correlation. This is the lookup WooCommerce indexed but never exposed,
|
|
45
|
+
// leaving every gateway to reimplement correlation its own way.
|
|
46
|
+
{ name: "ref", columns: ["provider_id", "provider_ref"] },
|
|
47
|
+
{ name: "wsstatus", columns: ["workspace_id", "status", "created_at"] },
|
|
48
|
+
],
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
// Every inbound provider notification, verified and normalized.
|
|
52
|
+
name: "events",
|
|
53
|
+
columns: [
|
|
54
|
+
{ name: "id", type: "TEXT", primaryKey: true },
|
|
55
|
+
{ name: "workspace_id", type: "TEXT", notNull: true },
|
|
56
|
+
{ name: "provider_id", type: "TEXT", notNull: true },
|
|
57
|
+
// The provider's own event id. THE inbound idempotency key.
|
|
58
|
+
{ name: "provider_event_id", type: "TEXT", notNull: true },
|
|
59
|
+
// Null when the event arrives before its payment row can be correlated.
|
|
60
|
+
{ name: "payment_id", type: "TEXT" },
|
|
61
|
+
{ name: "kind", type: "TEXT", notNull: true },
|
|
62
|
+
{ name: "occurred_at", type: "INTEGER", notNull: true },
|
|
63
|
+
{ name: "received_at", type: "INTEGER", notNull: true },
|
|
64
|
+
// 0/1 — the declared type set has no BOOLEAN.
|
|
65
|
+
{ name: "applied", type: "INTEGER", notNull: true },
|
|
66
|
+
{ name: "payload", type: "TEXT", notNull: true },
|
|
67
|
+
],
|
|
68
|
+
indexes: [
|
|
69
|
+
// Replay of an already-seen event fails at the INSERT, not in a code branch a provider
|
|
70
|
+
// author could forget to write.
|
|
71
|
+
{ name: "dedupe", columns: ["provider_id", "provider_event_id"], unique: true },
|
|
72
|
+
{ name: "bypayment", columns: ["payment_id", "occurred_at"] },
|
|
73
|
+
],
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
name: "refunds",
|
|
77
|
+
columns: [
|
|
78
|
+
{ name: "id", type: "TEXT", primaryKey: true },
|
|
79
|
+
{ name: "workspace_id", type: "TEXT", notNull: true },
|
|
80
|
+
{ name: "payment_id", type: "TEXT", notNull: true },
|
|
81
|
+
{ name: "idempotency_key", type: "TEXT", notNull: true },
|
|
82
|
+
{ name: "provider_ref", type: "TEXT" },
|
|
83
|
+
{ name: "amount_minor", type: "INTEGER", notNull: true },
|
|
84
|
+
{ name: "currency", type: "TEXT", notNull: true },
|
|
85
|
+
{ name: "status", type: "TEXT", notNull: true },
|
|
86
|
+
{ name: "reason", type: "TEXT" },
|
|
87
|
+
{ name: "created_at", type: "INTEGER", notNull: true },
|
|
88
|
+
{ name: "updated_at", type: "INTEGER", notNull: true },
|
|
89
|
+
],
|
|
90
|
+
indexes: [
|
|
91
|
+
{ name: "idem", columns: ["workspace_id", "idempotency_key"], unique: true },
|
|
92
|
+
{ name: "bypayment", columns: ["payment_id"] },
|
|
93
|
+
],
|
|
94
|
+
},
|
|
95
|
+
];
|
|
96
|
+
//# sourceMappingURL=manifest.js.map
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { DataModuleDecl } from "@jini-ai/core/contracts/site/db-data-modules";
|
|
2
|
+
/**
|
|
3
|
+
* The publisher is the HOST's first-party id, not the engine's: it is persisted in `_plugin_identity`
|
|
4
|
+
* and compared strictly on every boot (`checkNamespaceAdoption`), so a site that already minted the
|
|
5
|
+
* `store` row under its host's id must keep declaring that id. Changing it is a data migration.
|
|
6
|
+
*/
|
|
7
|
+
export declare function createStoreManifest(required: {
|
|
8
|
+
publisher: string;
|
|
9
|
+
}, _optional?: Record<string, never>): DataModuleDecl;
|
|
10
|
+
//# sourceMappingURL=manifest.d.ts.map
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
const STORE_PLUGIN_ID = "store";
|
|
2
|
+
/**
|
|
3
|
+
* The publisher is the HOST's first-party id, not the engine's: it is persisted in `_plugin_identity`
|
|
4
|
+
* and compared strictly on every boot (`checkNamespaceAdoption`), so a site that already minted the
|
|
5
|
+
* `store` row under its host's id must keep declaring that id. Changing it is a data migration.
|
|
6
|
+
*/
|
|
7
|
+
export function createStoreManifest(required, _optional = {}) {
|
|
8
|
+
return {
|
|
9
|
+
pluginId: STORE_PLUGIN_ID,
|
|
10
|
+
pluginTier: "tier-2",
|
|
11
|
+
provenance: { sourceUrl: "builtin://store", publisher: required.publisher },
|
|
12
|
+
tables: STORE_TABLES,
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
const STORE_TABLES = [
|
|
16
|
+
{
|
|
17
|
+
name: "products",
|
|
18
|
+
columns: [
|
|
19
|
+
{ name: "id", type: "TEXT", primaryKey: true },
|
|
20
|
+
{ name: "title", type: "TEXT", notNull: true },
|
|
21
|
+
{ name: "price", type: "INTEGER", notNull: true },
|
|
22
|
+
{ name: "stock", type: "INTEGER", notNull: true },
|
|
23
|
+
{ name: "version", type: "INTEGER", notNull: true },
|
|
24
|
+
],
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
name: "orders",
|
|
28
|
+
columns: [
|
|
29
|
+
{ name: "id", type: "TEXT", primaryKey: true },
|
|
30
|
+
{ name: "product_id", type: "TEXT", notNull: true },
|
|
31
|
+
{ name: "qty", type: "INTEGER", notNull: true },
|
|
32
|
+
{ name: "total", type: "INTEGER", notNull: true },
|
|
33
|
+
{ name: "at", type: "INTEGER", notNull: true },
|
|
34
|
+
],
|
|
35
|
+
},
|
|
36
|
+
];
|
|
37
|
+
//# sourceMappingURL=manifest.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jini-ai/plugins",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.4",
|
|
4
4
|
"description": "Host-independent extension glue and site-plugin runtime with injected SDK, trust, archive and storage ports.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -18,18 +18,45 @@
|
|
|
18
18
|
"./host/node": "node",
|
|
19
19
|
"./host/worker": "node",
|
|
20
20
|
"./host/sql": "node",
|
|
21
|
-
"./host/tools": "node"
|
|
21
|
+
"./host/tools": "node",
|
|
22
|
+
"./host/hook-refusals": "universal",
|
|
23
|
+
"./runtime/install-consent": "universal",
|
|
24
|
+
"./runtime/plugin-tool-ids": "universal",
|
|
25
|
+
"./runtime/plugin-export": "universal",
|
|
26
|
+
"./runtime/agent-tools": "universal",
|
|
27
|
+
"./runtime/plugin-tool-messages": "universal",
|
|
28
|
+
"./runtime/source-tool-catalog": "universal",
|
|
29
|
+
"./runtime/install-tool-catalog": "universal",
|
|
30
|
+
"./runtime/capability-card": "universal",
|
|
31
|
+
"./runtime/plugin-host-copy": "universal",
|
|
32
|
+
"./runtime/enable-confirmation-ui": "universal",
|
|
33
|
+
"./runtime/uninstall-confirmation-ui": "universal",
|
|
34
|
+
"./runtime/lower-tool-access": "universal",
|
|
35
|
+
"./site/lipay/manifest": "universal",
|
|
36
|
+
"./site/store/manifest": "universal",
|
|
37
|
+
"./runtime/sdk-resolver": "node",
|
|
38
|
+
"./runtime/service-ports": "universal",
|
|
39
|
+
"./runtime/built-ins/word-count/count-words": "universal",
|
|
40
|
+
"./react/plugin-install-port": "browser",
|
|
41
|
+
"./runtime/install-source": "universal",
|
|
42
|
+
"./runtime/built-ins/word-count/plugin": "universal",
|
|
43
|
+
"./runtime/widget-partials": "universal",
|
|
44
|
+
"./react/PluginProviderSettingsDialog": "browser"
|
|
22
45
|
},
|
|
23
46
|
"isolation": {
|
|
24
47
|
"forbidden": {
|
|
25
48
|
"./host": [
|
|
26
49
|
"node:"
|
|
27
50
|
]
|
|
51
|
+
},
|
|
52
|
+
"entries": {
|
|
53
|
+
"./runtime/widget-partials": "host"
|
|
28
54
|
}
|
|
29
55
|
},
|
|
30
56
|
"optionalPeers": {
|
|
31
57
|
"semver": "opt-in: plugin version compatibility; import @jini-ai/plugins/host — Plugin version compatibility could not load semver. Install semver to enable this feature, or check its installed version and native binaries.",
|
|
32
|
-
"kysely": "opt-in: sql storage adapters; import @jini-ai/plugins/host/sql — SQL storage adapters could not load kysely. Install kysely to enable this feature, or check its installed version and native binaries."
|
|
58
|
+
"kysely": "opt-in: sql storage adapters; import @jini-ai/plugins/host/sql — SQL storage adapters could not load kysely. Install kysely to enable this feature, or check its installed version and native binaries.",
|
|
59
|
+
"react": "opt-in: react browser bindings; import @jini-ai/plugins/react/PluginProviderSettingsDialog — React browser bindings could not load react. Install react to enable this feature, or check its installed version."
|
|
33
60
|
}
|
|
34
61
|
},
|
|
35
62
|
"type": "module",
|
|
@@ -64,6 +91,121 @@
|
|
|
64
91
|
"types": "./dist/host/tools/index.d.ts",
|
|
65
92
|
"import": "./dist/host/tools/index.js",
|
|
66
93
|
"default": "./dist/host/tools/index.js"
|
|
94
|
+
},
|
|
95
|
+
"./runtime/install-consent": {
|
|
96
|
+
"types": "./dist/runtime/install-consent.d.ts",
|
|
97
|
+
"import": "./dist/runtime/install-consent.js",
|
|
98
|
+
"default": "./dist/runtime/install-consent.js"
|
|
99
|
+
},
|
|
100
|
+
"./host/hook-refusals": {
|
|
101
|
+
"types": "./dist/host/hook-refusals.d.ts",
|
|
102
|
+
"import": "./dist/host/hook-refusals.js",
|
|
103
|
+
"default": "./dist/host/hook-refusals.js"
|
|
104
|
+
},
|
|
105
|
+
"./runtime/plugin-tool-ids": {
|
|
106
|
+
"types": "./dist/runtime/plugin-tool-ids.d.ts",
|
|
107
|
+
"import": "./dist/runtime/plugin-tool-ids.js",
|
|
108
|
+
"default": "./dist/runtime/plugin-tool-ids.js"
|
|
109
|
+
},
|
|
110
|
+
"./runtime/plugin-export": {
|
|
111
|
+
"types": "./dist/runtime/plugin-export.d.ts",
|
|
112
|
+
"import": "./dist/runtime/plugin-export.js",
|
|
113
|
+
"default": "./dist/runtime/plugin-export.js"
|
|
114
|
+
},
|
|
115
|
+
"./runtime/agent-tools": {
|
|
116
|
+
"types": "./dist/runtime/agent-tools.d.ts",
|
|
117
|
+
"import": "./dist/runtime/agent-tools.js",
|
|
118
|
+
"default": "./dist/runtime/agent-tools.js"
|
|
119
|
+
},
|
|
120
|
+
"./runtime/plugin-tool-messages": {
|
|
121
|
+
"types": "./dist/runtime/plugin-tool-messages.d.ts",
|
|
122
|
+
"import": "./dist/runtime/plugin-tool-messages.js",
|
|
123
|
+
"default": "./dist/runtime/plugin-tool-messages.js"
|
|
124
|
+
},
|
|
125
|
+
"./runtime/source-tool-catalog": {
|
|
126
|
+
"types": "./dist/runtime/source-tool-catalog.d.ts",
|
|
127
|
+
"import": "./dist/runtime/source-tool-catalog.js",
|
|
128
|
+
"default": "./dist/runtime/source-tool-catalog.js"
|
|
129
|
+
},
|
|
130
|
+
"./runtime/install-tool-catalog": {
|
|
131
|
+
"types": "./dist/runtime/install-tool-catalog.d.ts",
|
|
132
|
+
"import": "./dist/runtime/install-tool-catalog.js",
|
|
133
|
+
"default": "./dist/runtime/install-tool-catalog.js"
|
|
134
|
+
},
|
|
135
|
+
"./runtime/capability-card": {
|
|
136
|
+
"types": "./dist/runtime/capability-card.d.ts",
|
|
137
|
+
"import": "./dist/runtime/capability-card.js",
|
|
138
|
+
"default": "./dist/runtime/capability-card.js"
|
|
139
|
+
},
|
|
140
|
+
"./runtime/lower-tool-access": {
|
|
141
|
+
"types": "./dist/runtime/lower-tool-access.d.ts",
|
|
142
|
+
"import": "./dist/runtime/lower-tool-access.js",
|
|
143
|
+
"default": "./dist/runtime/lower-tool-access.js"
|
|
144
|
+
},
|
|
145
|
+
"./runtime/plugin-host-copy": {
|
|
146
|
+
"types": "./dist/runtime/plugin-host-copy.d.ts",
|
|
147
|
+
"import": "./dist/runtime/plugin-host-copy.js",
|
|
148
|
+
"default": "./dist/runtime/plugin-host-copy.js"
|
|
149
|
+
},
|
|
150
|
+
"./runtime/enable-confirmation-ui": {
|
|
151
|
+
"types": "./dist/runtime/enable-confirmation-ui.d.ts",
|
|
152
|
+
"import": "./dist/runtime/enable-confirmation-ui.js",
|
|
153
|
+
"default": "./dist/runtime/enable-confirmation-ui.js"
|
|
154
|
+
},
|
|
155
|
+
"./runtime/uninstall-confirmation-ui": {
|
|
156
|
+
"types": "./dist/runtime/uninstall-confirmation-ui.d.ts",
|
|
157
|
+
"import": "./dist/runtime/uninstall-confirmation-ui.js",
|
|
158
|
+
"default": "./dist/runtime/uninstall-confirmation-ui.js"
|
|
159
|
+
},
|
|
160
|
+
"./site/lipay/manifest": {
|
|
161
|
+
"types": "./dist/site/lipay/manifest.d.ts",
|
|
162
|
+
"import": "./dist/site/lipay/manifest.js",
|
|
163
|
+
"default": "./dist/site/lipay/manifest.js"
|
|
164
|
+
},
|
|
165
|
+
"./site/store/manifest": {
|
|
166
|
+
"types": "./dist/site/store/manifest.d.ts",
|
|
167
|
+
"import": "./dist/site/store/manifest.js",
|
|
168
|
+
"default": "./dist/site/store/manifest.js"
|
|
169
|
+
},
|
|
170
|
+
"./runtime/sdk-resolver": {
|
|
171
|
+
"types": "./dist/runtime/sdk-resolver.d.ts",
|
|
172
|
+
"import": "./dist/runtime/sdk-resolver.js",
|
|
173
|
+
"default": "./dist/runtime/sdk-resolver.js"
|
|
174
|
+
},
|
|
175
|
+
"./runtime/service-ports": {
|
|
176
|
+
"types": "./dist/runtime/service-ports.d.ts",
|
|
177
|
+
"import": "./dist/runtime/service-ports.js",
|
|
178
|
+
"default": "./dist/runtime/service-ports.js"
|
|
179
|
+
},
|
|
180
|
+
"./runtime/built-ins/word-count/count-words": {
|
|
181
|
+
"types": "./dist/runtime/built-ins/word-count/count-words.d.ts",
|
|
182
|
+
"import": "./dist/runtime/built-ins/word-count/count-words.js",
|
|
183
|
+
"default": "./dist/runtime/built-ins/word-count/count-words.js"
|
|
184
|
+
},
|
|
185
|
+
"./react/plugin-install-port": {
|
|
186
|
+
"types": "./dist/react/plugin-install-port.d.ts",
|
|
187
|
+
"import": "./dist/react/plugin-install-port.js",
|
|
188
|
+
"default": "./dist/react/plugin-install-port.js"
|
|
189
|
+
},
|
|
190
|
+
"./runtime/install-source": {
|
|
191
|
+
"types": "./dist/runtime/install-source.d.ts",
|
|
192
|
+
"import": "./dist/runtime/install-source.js",
|
|
193
|
+
"default": "./dist/runtime/install-source.js"
|
|
194
|
+
},
|
|
195
|
+
"./runtime/built-ins/word-count/plugin": {
|
|
196
|
+
"types": "./dist/runtime/built-ins/word-count/plugin.d.ts",
|
|
197
|
+
"import": "./dist/runtime/built-ins/word-count/plugin.js",
|
|
198
|
+
"default": "./dist/runtime/built-ins/word-count/plugin.js"
|
|
199
|
+
},
|
|
200
|
+
"./runtime/widget-partials": {
|
|
201
|
+
"types": "./dist/runtime/widget-partials.d.ts",
|
|
202
|
+
"import": "./dist/runtime/widget-partials.js",
|
|
203
|
+
"default": "./dist/runtime/widget-partials.js"
|
|
204
|
+
},
|
|
205
|
+
"./react/PluginProviderSettingsDialog": {
|
|
206
|
+
"types": "./dist/react/PluginProviderSettingsDialog.d.ts",
|
|
207
|
+
"import": "./dist/react/PluginProviderSettingsDialog.js",
|
|
208
|
+
"default": "./dist/react/PluginProviderSettingsDialog.js"
|
|
67
209
|
}
|
|
68
210
|
},
|
|
69
211
|
"files": [
|
|
@@ -83,19 +225,24 @@
|
|
|
83
225
|
"registry": "https://registry.npmjs.org"
|
|
84
226
|
},
|
|
85
227
|
"dependencies": {
|
|
86
|
-
"@jini-ai/core": "^0.7.
|
|
228
|
+
"@jini-ai/core": "^0.7.4"
|
|
87
229
|
},
|
|
88
230
|
"peerDependencies": {
|
|
89
231
|
"semver": "^7.6.2",
|
|
90
|
-
"kysely": "^0.29.6"
|
|
232
|
+
"kysely": "^0.29.6",
|
|
233
|
+
"react": "^18.3.0 || ^19.0.0"
|
|
91
234
|
},
|
|
92
235
|
"devDependencies": {
|
|
93
236
|
"semver": "^7.6.2",
|
|
94
237
|
"@types/semver": "^7.5.8",
|
|
95
238
|
"kysely": "^0.29.6",
|
|
96
|
-
"
|
|
97
|
-
"
|
|
98
|
-
"@
|
|
239
|
+
"react": "^19.2.0",
|
|
240
|
+
"react-dom": "^19.2.0",
|
|
241
|
+
"@types/react": "^19.2.0",
|
|
242
|
+
"@types/react-dom": "^19.2.0",
|
|
243
|
+
"@jini-ai/db": "0.7.4",
|
|
244
|
+
"@jini-ai/platform": "^0.7.4",
|
|
245
|
+
"@jini-ai/core": "^0.7.4"
|
|
99
246
|
},
|
|
100
247
|
"peerDependenciesMeta": {
|
|
101
248
|
"semver": {
|
|
@@ -103,6 +250,9 @@
|
|
|
103
250
|
},
|
|
104
251
|
"kysely": {
|
|
105
252
|
"optional": true
|
|
253
|
+
},
|
|
254
|
+
"react": {
|
|
255
|
+
"optional": true
|
|
106
256
|
}
|
|
107
257
|
},
|
|
108
258
|
"scripts": {
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
/** Storage-neutral contracts for a provider plugin's saved configuration. */
|
|
2
|
-
export interface ProviderKeyUsage {
|
|
3
|
-
readonly keyId?: string;
|
|
4
|
-
readonly store: "project" | "site";
|
|
5
|
-
readonly usedByThisSite: boolean;
|
|
6
|
-
readonly usedBy: readonly string[];
|
|
7
|
-
}
|
|
8
|
-
export interface ProviderWriteResult extends ProviderKeyUsage {
|
|
9
|
-
readonly keyId: string;
|
|
10
|
-
}
|
|
11
|
-
/** Saved values for one provider plugin; keys are the plugin's declared setting names. */
|
|
12
|
-
export interface ProviderPluginConfig {
|
|
13
|
-
readonly settings: Readonly<Record<string, string>>;
|
|
14
|
-
readonly secrets: Readonly<Record<string, string>>;
|
|
15
|
-
}
|
|
16
|
-
/** The admin card's view: public values and the NAMES of saved secrets, never a secret value. */
|
|
17
|
-
export interface ProviderSettingsView {
|
|
18
|
-
readonly settings: Readonly<Record<string, string>>;
|
|
19
|
-
readonly secretNames: readonly string[];
|
|
20
|
-
/** A row is saved but this machine cannot open it (the store's key was lost or re-minted): shown as
|
|
21
|
-
* not configured, with a notice to enter the settings again. */
|
|
22
|
-
readonly unreadable?: true;
|
|
23
|
-
}
|
|
24
|
-
export interface ProviderConfigSource {
|
|
25
|
-
usage(required: {
|
|
26
|
-
pluginId: string;
|
|
27
|
-
}, optional?: Record<string, never>): Promise<ProviderKeyUsage>;
|
|
28
|
-
/** Which store this is, for the admin card ("saved for this project" vs "this site"). */
|
|
29
|
-
readonly scope: "project" | "site";
|
|
30
|
-
/** Null when nothing was ever saved for the plugin.
|
|
31
|
-
* @throws {ProviderConfigUnreadableError} When a row is saved but cannot be opened here. */
|
|
32
|
-
read(required: {
|
|
33
|
-
pluginId: string;
|
|
34
|
-
}, optional?: Record<string, never>): Promise<ProviderPluginConfig | null>;
|
|
35
|
-
/** Public values and secret names. The row holding both halves is decrypted to read them, so an
|
|
36
|
-
* endpoint and its credential are one saved snapshot, but no secret value is returned.
|
|
37
|
-
* Null when nothing was saved. */
|
|
38
|
-
readSettings(required: {
|
|
39
|
-
pluginId: string;
|
|
40
|
-
}, optional?: Record<string, never>): Promise<ProviderSettingsView | null>;
|
|
41
|
-
/** Saves the whole config, overwriting a row this machine cannot open. */
|
|
42
|
-
write(required: {
|
|
43
|
-
pluginId: string;
|
|
44
|
-
config: ProviderPluginConfig;
|
|
45
|
-
}, optional?: Record<string, never>): Promise<ProviderWriteResult | void>;
|
|
46
|
-
}
|
|
47
|
-
//# sourceMappingURL=provider-config-source.d.ts.map
|