@vellumai/assistant 0.12.2-staging.6 → 0.12.2-staging.8
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 +2 -2
- package/scripts/postinstall.ts +33 -0
- package/src/oauth/seed-providers.ts +30 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vellumai/assistant",
|
|
3
|
-
"version": "0.12.2-staging.
|
|
3
|
+
"version": "0.12.2-staging.8",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"test:stable": "EXCLUDE_EXPERIMENTAL=true bun run scripts/test.ts",
|
|
35
35
|
"test:bench": "find src -type f -name '*.benchmark.test.ts' -print0 | xargs -0 -P 1 -I {} bun test {}",
|
|
36
36
|
"test:filesystem-tools": "bash scripts/test-filesystem-tools.sh",
|
|
37
|
-
"postinstall": "
|
|
37
|
+
"postinstall": "bun run scripts/postinstall.ts"
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
40
|
"@agentclientprotocol/sdk": "0.25.0",
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { spawnSync } from "node:child_process";
|
|
2
|
+
import { existsSync } from "node:fs";
|
|
3
|
+
import { join, resolve } from "node:path";
|
|
4
|
+
|
|
5
|
+
const repoRoot = resolve(import.meta.dir, "../..");
|
|
6
|
+
|
|
7
|
+
// Repository setup is best-effort, including installs outside a Git checkout.
|
|
8
|
+
function run(command: string, args: string[]): boolean {
|
|
9
|
+
return (
|
|
10
|
+
spawnSync(command, args, {
|
|
11
|
+
cwd: repoRoot,
|
|
12
|
+
stdio: ["ignore", "inherit", "ignore"],
|
|
13
|
+
windowsHide: true,
|
|
14
|
+
}).status === 0
|
|
15
|
+
);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
if (!run("git", ["config", "core.hooksPath"])) {
|
|
19
|
+
run("git", ["config", "core.hooksPath", ".githooks"]);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
const syncScript = join(repoRoot, "meta", "sync-bundled-copies.ts");
|
|
23
|
+
if (existsSync(syncScript) && run(process.execPath, ["run", syncScript])) {
|
|
24
|
+
run(process.execPath, [
|
|
25
|
+
"run",
|
|
26
|
+
join(
|
|
27
|
+
repoRoot,
|
|
28
|
+
"assistant",
|
|
29
|
+
"scripts",
|
|
30
|
+
"generate-bundled-plugin-packages.ts",
|
|
31
|
+
),
|
|
32
|
+
]);
|
|
33
|
+
}
|
|
@@ -1398,11 +1398,20 @@ export const PROVIDER_SEED_DATA: Record<
|
|
|
1398
1398
|
"read_customers",
|
|
1399
1399
|
"write_customers",
|
|
1400
1400
|
"read_inventory",
|
|
1401
|
+
"write_inventory",
|
|
1401
1402
|
"read_locations",
|
|
1402
1403
|
"read_fulfillments",
|
|
1404
|
+
"write_fulfillments",
|
|
1403
1405
|
"read_discounts",
|
|
1404
1406
|
"write_discounts",
|
|
1405
1407
|
"read_price_rules",
|
|
1408
|
+
"write_price_rules",
|
|
1409
|
+
"read_content",
|
|
1410
|
+
"write_content",
|
|
1411
|
+
"read_reports",
|
|
1412
|
+
// Location, shipping, and marketing writes stay opt-in from the scope
|
|
1413
|
+
// picker: they change store setup rather than day-to-day operations,
|
|
1414
|
+
// and keeping them out of the defaults keeps the install consent short.
|
|
1406
1415
|
// write_themes covers listing, duplicating, and publishing themes.
|
|
1407
1416
|
// Writing theme files (settings, JSON templates, Liquid) also requires
|
|
1408
1417
|
// Shopify's theme-code exemption on the app itself, which is granted
|
|
@@ -1449,6 +1458,7 @@ export const PROVIDER_SEED_DATA: Record<
|
|
|
1449
1458
|
description: "Adjust inventory levels and items",
|
|
1450
1459
|
},
|
|
1451
1460
|
{ scope: "read_locations", description: "Read store locations" },
|
|
1461
|
+
{ scope: "write_locations", description: "Add and edit store locations" },
|
|
1452
1462
|
{ scope: "read_fulfillments", description: "Read fulfillment services" },
|
|
1453
1463
|
{
|
|
1454
1464
|
scope: "write_fulfillments",
|
|
@@ -1468,6 +1478,14 @@ export const PROVIDER_SEED_DATA: Record<
|
|
|
1468
1478
|
},
|
|
1469
1479
|
{ scope: "read_files", description: "Read files uploaded to the store" },
|
|
1470
1480
|
{ scope: "write_files", description: "Upload and update files" },
|
|
1481
|
+
{
|
|
1482
|
+
scope: "read_content",
|
|
1483
|
+
description: "Read blog posts, pages, and comments",
|
|
1484
|
+
},
|
|
1485
|
+
{
|
|
1486
|
+
scope: "write_content",
|
|
1487
|
+
description: "Create and update blog posts, pages, and comments",
|
|
1488
|
+
},
|
|
1471
1489
|
{ scope: "read_gift_cards", description: "Read gift cards" },
|
|
1472
1490
|
{
|
|
1473
1491
|
scope: "write_gift_cards",
|
|
@@ -1481,11 +1499,23 @@ export const PROVIDER_SEED_DATA: Record<
|
|
|
1481
1499
|
scope: "read_shipping",
|
|
1482
1500
|
description: "Read shipping and delivery carrier services",
|
|
1483
1501
|
},
|
|
1502
|
+
{
|
|
1503
|
+
scope: "write_shipping",
|
|
1504
|
+
description: "Create and update delivery carrier services",
|
|
1505
|
+
},
|
|
1506
|
+
{
|
|
1507
|
+
scope: "read_reports",
|
|
1508
|
+
description: "Run ShopifyQL sales and analytics queries",
|
|
1509
|
+
},
|
|
1484
1510
|
{ scope: "read_analytics", description: "Read analytics and reports" },
|
|
1485
1511
|
{
|
|
1486
1512
|
scope: "read_marketing_events",
|
|
1487
1513
|
description: "Read marketing events and activities",
|
|
1488
1514
|
},
|
|
1515
|
+
{
|
|
1516
|
+
scope: "write_marketing_events",
|
|
1517
|
+
description: "Create and update marketing events and activities",
|
|
1518
|
+
},
|
|
1489
1519
|
{ scope: "read_order_edits", description: "Read order edits" },
|
|
1490
1520
|
{
|
|
1491
1521
|
scope: "write_order_edits",
|