@edgestore/cli 1.0.0-rc.6 → 1.0.0-rc.7
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/agent-assets/skills.json +3 -3
- package/dist/bin.mjs +28 -17
- package/package.json +2 -2
package/agent-assets/skills.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 1,
|
|
3
|
-
"revision": "
|
|
3
|
+
"revision": "a41182e1d6c8254cac64febaaf62a9480ffddfc1b3600362c3845aed573cdbbe",
|
|
4
4
|
"files": {
|
|
5
|
-
"edgestore-setup/SKILL.md": "---\nname: edgestore-setup\ndescription: Use when adding, extending, or troubleshooting EdgeStore file uploads, upload UI, or bucket access policies in a TypeScript/React application. Not for unrelated storage migrations or account administration.\nlicense: MIT\n---\n\n# EdgeStore setup\n\nImplement uploads through the application's UI and server route. Verify the upload\nand retrieval there; if runtime access is unavailable, report what remains untested.\n\n## Establish the application and API version\n\nUse `edgestore --cwd <app> agent context --json` when the CLI is available. Otherwise\ninspect the selected workspace's manifests, installed EdgeStore package metadata,\nexisting routes/provider, and backend env-file convention. In a monorepo identify\nthe frontend and backend separately. Use the app's package versions, not the CLI's.\n\nRead the relevant installed `@edgestore/server`, `@edgestore/react`, or\n`@edgestore/sdk` `agent-docs/README.md` and follow its local references. These\nbelong to the installed package version; the skill and CLI can be newer. If the\nreference is absent, use installed types/source and version-matched documentation,\nand mention the fallback. Read the references again after installing packages.\n\nFor an existing 0.x integration, resolve maintenance versus migration with the\nuser before changing APIs. Preserve installed versions unless an upgrade is\nauthorized. For new integrations, install EdgeStore v1 packages from the `rc`\ntag (for example, `@edgestore/server@rc` and `@edgestore/react@rc`); use\n`@edgestore/sdk@rc` or `@edgestore/cli@rc` when needed. For missing packages in\nan existing integration, choose a compatible, explicit version. Use other\nprereleases only when requested or required by the application.\n\n## Choose the integration\n\nReuse the app's architecture, existing buckets, and configured storage provider.\nRead the matching installed server reference: `next.md` (App or Pages Router),\n`tanstack-start.md`, `remix.md` (Remix or React Router framework mode), `astro.md`,\n`hono.md`, `express.md`, or `fastify.md`. Check the app's routing convention and\nframework version before adapting examples. A React Router client-side app still\nneeds a backend. Reuse the existing backend or ask which one to add. Preserve S3,\nAzure, and custom providers rather than provisioning hosted EdgeStore resources.\n\nInfer a bucket name from the application's feature (for example avatars or\nattachments); fall back to `publicFiles` when context is insufficient. Infer public\nversus protected access from the application
|
|
5
|
+
"edgestore-setup/SKILL.md": "---\nname: edgestore-setup\ndescription: Use when adding, extending, or troubleshooting EdgeStore file uploads, upload UI, or bucket access policies in a TypeScript/React application. Not for unrelated storage migrations or account administration.\nlicense: MIT\n---\n\n# EdgeStore setup\n\nImplement uploads through the application's UI and server route. Verify the upload\nand retrieval there; if runtime access is unavailable, report what remains untested.\n\n## Establish the application and API version\n\nUse `edgestore --cwd <app> agent context --json` when the CLI is available. Otherwise\ninspect the selected workspace's manifests, installed EdgeStore package metadata,\nexisting routes/provider, and backend env-file convention. In a monorepo identify\nthe frontend and backend separately. Use the app's package versions, not the CLI's.\n\nRead the relevant installed `@edgestore/server`, `@edgestore/react`, or\n`@edgestore/sdk` `agent-docs/README.md` and follow its local references. These\nbelong to the installed package version; the skill and CLI can be newer. If the\nreference is absent, use installed types/source and version-matched documentation,\nand mention the fallback. Read the references again after installing packages.\n\nFor an existing 0.x integration, resolve maintenance versus migration with the\nuser before changing APIs. Preserve installed versions unless an upgrade is\nauthorized. For new integrations, install EdgeStore v1 packages from the `rc`\ntag (for example, `@edgestore/server@rc` and `@edgestore/react@rc`); use\n`@edgestore/sdk@rc` or `@edgestore/cli@rc` when needed. For missing packages in\nan existing integration, choose a compatible, explicit version. Use other\nprereleases only when requested or required by the application.\n\n## Choose the integration\n\nReuse the app's architecture, existing buckets, and configured storage provider.\nRead the matching installed server reference: `next.md` (App or Pages Router),\n`tanstack-start.md`, `remix.md` (Remix or React Router framework mode), `astro.md`,\n`hono.md`, `express.md`, or `fastify.md`. Check the app's routing convention and\nframework version before adapting examples. A React Router client-side app still\nneeds a backend. Reuse the existing backend or ask which one to add. Preserve S3,\nAzure, and custom providers rather than provisioning hosted EdgeStore resources.\n\nInfer a bucket name from the application's feature (for example avatars or\nattachments); fall back to `publicFiles` when context is insufficient. Infer public\nversus protected access from the application. Ask when the access policy is\nambiguous or the files may be sensitive. Configure the application's authorization\nrules for protected files.\n\nBefore changing configuration or provisioning, summarize the proposed setup for\napproval: app/backend, provider, account/project to create or reuse, bucket name,\nwho can access files, upload limits, and env destination. Proceed once approved;\nask again only if the plan materially changes. Reuse an existing env file when\nthe backend already loads it; otherwise use the framework's convention. Preserve\nexisting env values.\n\n## Use MCP and the CLI\n\nPrefer an available MCP for an action it supports; otherwise use the CLI.\nFor hosted setup, complete authentication, project linking, and credential\ndelivery as part of the task. When the CLI is needed but missing, install or\ninvoke `@edgestore/cli` with the application's package manager using the version\nguidance above. Start with read-only discovery.\nWhen sign-in is needed, initiate it with the available tooling, ask the user to\ncomplete the browser step, then resume setup and verification.\n\nCreating resources requires authorization for that setup. A project already\ncreated through MCP should be linked locally, not created again through CLI.\nAfter an uncertain mutation result, inspect for the resource before retrying or\nswitching tools. Do not delete/empty buckets, revoke keys, enable billable overage, or\nchange unrelated resources as an implicit setup step.\n\nFor hosted provisioning or credential delivery, read\n[references/hosted-setup.md](references/hosted-setup.md).\n\n## Implement and verify\n\nConfigure the backend router/provider and the matching client endpoint using\ninstalled references. Keep server keys in a loaded, gitignored backend env file,\nnot frontend variables (`VITE_*`, `NEXT_PUBLIC_*`).\nTreat credentials as required configuration. Do not add conditional providers,\nupload-enable flags, or disabled setup placeholders merely because authentication\nis pending. Finish setup instead; preserve optional-storage behavior only when\nthe application requires it.\nIn split workspaces, export the real backend router type and import it with\n`import type` on the frontend. For cross-origin calls, configure CORS for the\nintended frontend origin. Wrap the upload UI with the React provider.\n\nFor new attachment UI, reuse an existing upload component or build a reusable\ndropzone, preferably with `react-dropzone`, with accessible file selection,\nprogress, and error feedback. Use the React package's `dropzone.md`, `multi-file.md`,\nand `uploader-provider.md` references for examples. If absent, see the\n[Dropzone](https://edgestore.dev/docs/components/dropzone.md),\n[Multi-file uploader](https://edgestore.dev/docs/components/multi-file.md), and\n[Uploader provider](https://edgestore.dev/docs/components/uploader-provider.md) guides.\nAdapt the examples to the installed APIs and app styling; do not introduce a new\nstyling system just to use them.\n\nFor a failing integration, read the installed server's `troubleshooting.md` and\nthe React package's `errors.md`. Diagnose the failing app request before changing\nremote resources or credentials.\n\nRun `edgestore --cwd <app> doctor --offline` when available, plus the app's own\ntypecheck/build/tests. Investigate doctor warnings and skipped checks. Start the\napp, upload a small test file through its UI and server route, and independently\nretrieve and check the bytes.\nFor protected access, verify unauthenticated retrieval is denied and authorized\nretrieval works.\n\nUse the account and project authorized for testing. Keep credentials and signed\nURLs out of agent output; retrieve protected files in a local process that returns\nonly the result. Clean up only this task's test resources. Summarize the integration\nchoices, checks performed, blockers, and any test resources left behind.\n",
|
|
6
6
|
"edgestore-setup/agents/openai.yaml": "interface:\n display_name: \"EdgeStore Setup\"\n short_description: \"Use when adding or troubleshooting EdgeStore file uploads.\"\n",
|
|
7
|
-
"edgestore-setup/references/hosted-setup.md": "# Hosted setup and credential handoff\n\nUse MCP first for supported account/project/bucket discovery and authorized\nchanges; otherwise use the CLI. Confirm the account and project in the tool's\nmetadata before making changes.\n\nTo configure MCP:\n\n```sh\nedgestore mcp setup --client codex --dry-run --json\nedgestore mcp setup --client codex --yes\n```\n\nUse `claude` or `cursor` for those clients. Setup configures\n`https://api.edgestore.dev/mcp`. Sign in through your client and review the\nrequested permissions.\n\nCheck `--help` for the installed CLI's available commands. Use `--json` and file\ndelivery to keep secrets out of tool output.
|
|
7
|
+
"edgestore-setup/references/hosted-setup.md": "# Hosted setup and credential handoff\n\nUse MCP first for supported account/project/bucket discovery and authorized\nchanges; otherwise use the CLI. Confirm the account and project in the tool's\nmetadata before making changes.\n\nTo configure MCP:\n\n```sh\nedgestore mcp setup --client codex --dry-run --json\nedgestore mcp setup --client codex --yes\n```\n\nUse `claude` or `cursor` for those clients. Setup configures\n`https://api.edgestore.dev/mcp`. Sign in through your client and review the\nrequested permissions.\n\nCheck `--help` for the installed CLI's available commands. Use `--json` and file\ndelivery to keep secrets out of tool output. For CLI authentication, run\n`edgestore login`. If it opens a browser, use that flow rather than opening the\nsame authorization URL again.\n\nAfter MCP creates/selects a project, link the backend to that same project and\nexisting env convention:\n\n```sh\nedgestore --cwd <backend> project link <project-base-path> --env-file <env-file> --json\n```\n\nReuse an existing valid backend key when possible. When a new key is authorized:\n\n```sh\nedgestore --cwd <backend> project key create <project-base-path> --name local --output <env-file> --json\n```\n\nThe destination must be gitignored. If values already exist, inspect the\nconfiguration before considering `--update`. Check key presence and project\nassociation without reading secret values into agent context. If file delivery is\nunavailable, ask the user to configure the key locally, not paste it into chat.\nDo not substitute dashboard instructions for setup the available tools can perform.\nOn partial failure, follow the returned recovery status before retrying.\n\n`init` provisions or links resources. Use `project link` when MCP has already\ncreated the project.\n"
|
|
8
8
|
}
|
|
9
9
|
}
|
package/dist/bin.mjs
CHANGED
|
@@ -3023,8 +3023,8 @@ async function projectCreateCommand(runtime, flags, options) {
|
|
|
3023
3023
|
});
|
|
3024
3024
|
const keyLines = isInteractive(runtime, flags) && result.projectKey ? [
|
|
3025
3025
|
'',
|
|
3026
|
-
`
|
|
3027
|
-
`
|
|
3026
|
+
`EDGESTORE_ACCESS_KEY=${result.projectKey.key.accessKey}`,
|
|
3027
|
+
`EDGESTORE_SECRET_KEY=${result.projectKey.secretKey}`,
|
|
3028
3028
|
'',
|
|
3029
3029
|
'Save this secret now. You will not be able to view it again.'
|
|
3030
3030
|
] : [];
|
|
@@ -3632,10 +3632,13 @@ function parseDotenvAssignment(line) {
|
|
|
3632
3632
|
};
|
|
3633
3633
|
}
|
|
3634
3634
|
function dotenvValue(contents, name) {
|
|
3635
|
+
return readDotenvValue(contents, name) || undefined;
|
|
3636
|
+
}
|
|
3637
|
+
function readDotenvValue(contents, name) {
|
|
3635
3638
|
let value;
|
|
3636
3639
|
for (const line of contents.split('\n')){
|
|
3637
3640
|
const assignment = parseDotenvAssignment(line);
|
|
3638
|
-
if (assignment?.name === name) value = assignment.value
|
|
3641
|
+
if (assignment?.name === name) value = assignment.value;
|
|
3639
3642
|
}
|
|
3640
3643
|
return value;
|
|
3641
3644
|
}
|
|
@@ -3662,6 +3665,10 @@ function findClosingQuote(value, quote) {
|
|
|
3662
3665
|
}
|
|
3663
3666
|
return -1;
|
|
3664
3667
|
}
|
|
3668
|
+
function projectEnvValue(contents, name) {
|
|
3669
|
+
// Preserve an explicitly empty canonical value, matching server resolution.
|
|
3670
|
+
return readDotenvValue(contents, name) ?? readDotenvValue(contents, name.replace('EDGESTORE_', 'EDGE_STORE_'));
|
|
3671
|
+
}
|
|
3665
3672
|
|
|
3666
3673
|
async function localApplicationChecks(directory) {
|
|
3667
3674
|
const checks = [];
|
|
@@ -3710,7 +3717,7 @@ async function localApplicationChecks(directory) {
|
|
|
3710
3717
|
const exposed = [
|
|
3711
3718
|
...contents.matchAll(/^(?:export\s+)?((?:VITE_|NEXT_PUBLIC_|PUBLIC_)\w*EDGE_?STORE\w*(?:SECRET|ACCESS)_KEY)\s*=/gm)
|
|
3712
3719
|
].some((match)=>Boolean(dotenvValue(contents, match[1])));
|
|
3713
|
-
const backendKeys = Boolean(dotenvValue(contents, 'EDGE_STORE_SECRET_KEY') || dotenvValue(contents, 'EDGE_STORE_ACCESS_KEY'));
|
|
3720
|
+
const backendKeys = Boolean(dotenvValue(contents, 'EDGESTORE_SECRET_KEY') || dotenvValue(contents, 'EDGESTORE_ACCESS_KEY') || dotenvValue(contents, 'EDGE_STORE_SECRET_KEY') || dotenvValue(contents, 'EDGE_STORE_ACCESS_KEY'));
|
|
3714
3721
|
if (exposed || backendKeys && application.role === 'frontend') {
|
|
3715
3722
|
checks.push({
|
|
3716
3723
|
name: 'Environment boundary',
|
|
@@ -4146,14 +4153,14 @@ async function checkEnvFile(runtime, localConfig, checks) {
|
|
|
4146
4153
|
label
|
|
4147
4154
|
};
|
|
4148
4155
|
}
|
|
4149
|
-
const accessKey =
|
|
4150
|
-
const hasSecretKey = Boolean(
|
|
4156
|
+
const accessKey = projectEnvValue(contents, 'EDGESTORE_ACCESS_KEY');
|
|
4157
|
+
const hasSecretKey = Boolean(projectEnvValue(contents, 'EDGESTORE_SECRET_KEY'));
|
|
4151
4158
|
checks.push({
|
|
4152
4159
|
name: label,
|
|
4153
4160
|
status: accessKey && hasSecretKey ? 'pass' : 'warn',
|
|
4154
4161
|
detail: [
|
|
4155
|
-
`
|
|
4156
|
-
`
|
|
4162
|
+
`EDGESTORE_ACCESS_KEY ${accessKey ? 'present' : 'missing'}`,
|
|
4163
|
+
`EDGESTORE_SECRET_KEY ${hasSecretKey ? 'present' : 'missing'}`
|
|
4157
4164
|
].join(', ')
|
|
4158
4165
|
});
|
|
4159
4166
|
return {
|
|
@@ -4616,7 +4623,11 @@ function assertAssignmentsAvailable(input) {
|
|
|
4616
4623
|
}
|
|
4617
4624
|
}
|
|
4618
4625
|
function hasAssignment(contents, name) {
|
|
4619
|
-
|
|
4626
|
+
const legacyName = name.replace(/^EDGESTORE_/, 'EDGE_STORE_');
|
|
4627
|
+
return contents.split('\n').some((line)=>{
|
|
4628
|
+
const assignment = parseDotenvAssignment(line);
|
|
4629
|
+
return assignment?.name === name || assignment?.name === legacyName;
|
|
4630
|
+
});
|
|
4620
4631
|
}
|
|
4621
4632
|
function updateAssignments(contents, values) {
|
|
4622
4633
|
const replaced = new Set();
|
|
@@ -4823,8 +4834,8 @@ async function initCommand(runtime, flags, options) {
|
|
|
4823
4834
|
let envFile;
|
|
4824
4835
|
if (secretOutput) {
|
|
4825
4836
|
await preflightEnvSecret(packageCwd, [
|
|
4826
|
-
'
|
|
4827
|
-
'
|
|
4837
|
+
'EDGESTORE_ACCESS_KEY',
|
|
4838
|
+
'EDGESTORE_SECRET_KEY'
|
|
4828
4839
|
], {
|
|
4829
4840
|
output: secretOutput,
|
|
4830
4841
|
update: options.update
|
|
@@ -4843,8 +4854,8 @@ async function initCommand(runtime, flags, options) {
|
|
|
4843
4854
|
await deliverEnvSecretWithRollback({
|
|
4844
4855
|
cwd: packageCwd,
|
|
4845
4856
|
values: {
|
|
4846
|
-
|
|
4847
|
-
|
|
4857
|
+
EDGESTORE_ACCESS_KEY: keyResult.key.accessKey,
|
|
4858
|
+
EDGESTORE_SECRET_KEY: keyResult.secretKey
|
|
4848
4859
|
},
|
|
4849
4860
|
options: {
|
|
4850
4861
|
output: secretOutput,
|
|
@@ -5861,8 +5872,8 @@ async function createAndDeliverKey(context, input) {
|
|
|
5861
5872
|
}
|
|
5862
5873
|
async function preflightKeyDelivery(runtime, options) {
|
|
5863
5874
|
await preflightEnvSecret(runtime.cwd, [
|
|
5864
|
-
'
|
|
5865
|
-
'
|
|
5875
|
+
'EDGESTORE_ACCESS_KEY',
|
|
5876
|
+
'EDGESTORE_SECRET_KEY'
|
|
5866
5877
|
], options);
|
|
5867
5878
|
if (options.output) await protectSecretFile(runtime.cwd, options.output);
|
|
5868
5879
|
}
|
|
@@ -5873,8 +5884,8 @@ function requireSecretDelivery(runtime, flags, options) {
|
|
|
5873
5884
|
}
|
|
5874
5885
|
function keyValues(accessKey, secretKey) {
|
|
5875
5886
|
return {
|
|
5876
|
-
|
|
5877
|
-
|
|
5887
|
+
EDGESTORE_ACCESS_KEY: accessKey,
|
|
5888
|
+
EDGESTORE_SECRET_KEY: secretKey
|
|
5878
5889
|
};
|
|
5879
5890
|
}
|
|
5880
5891
|
function envLines(values) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@edgestore/cli",
|
|
3
|
-
"version": "1.0.0-rc.
|
|
3
|
+
"version": "1.0.0-rc.7",
|
|
4
4
|
"description": "Command-line interface for EdgeStore accounts and projects",
|
|
5
5
|
"homepage": "https://edgestore.dev",
|
|
6
6
|
"license": "MIT",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"@babel/parser": "7.29.7",
|
|
40
40
|
"@babel/types": "7.29.7",
|
|
41
41
|
"@clack/prompts": "1.7.0",
|
|
42
|
-
"@edgestore/sdk": "1.0.0-rc.
|
|
42
|
+
"@edgestore/sdk": "1.0.0-rc.7",
|
|
43
43
|
"@manypkg/find-root": "3.1.0",
|
|
44
44
|
"@manypkg/get-packages": "3.1.0",
|
|
45
45
|
"@napi-rs/keyring": "1.3.0",
|