@astralos/cli 0.1.5 → 0.1.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/README.md +36 -1
- package/dist/astral.js +16 -5
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -24,6 +24,7 @@ astral workspace current
|
|
|
24
24
|
astral tools list
|
|
25
25
|
astral tools describe code.list_repos
|
|
26
26
|
astral tools call code.list_repos --input '{}'
|
|
27
|
+
astral domains --help
|
|
27
28
|
astral link
|
|
28
29
|
astral deploy
|
|
29
30
|
astral agent-setup
|
|
@@ -65,11 +66,45 @@ one repo: `astral code search` needs `--repo owner/repo`, and
|
|
|
65
66
|
`astral code list-repos` lists the workspace repos instead of `repo list`.
|
|
66
67
|
|
|
67
68
|
For an Astral repo, `repo clone` and `repo view` work. Astral repos have no pull
|
|
68
|
-
requests. Use `astral code clone`, `astral code push
|
|
69
|
+
requests. Use `astral code clone`, then `astral code push` or plain `git push`
|
|
70
|
+
in the clone.
|
|
69
71
|
|
|
70
72
|
`astral code setup-git` makes git ask `astral code credential` for github.com.
|
|
71
73
|
Plain `git clone`, `fetch`, and `push` then use the same one-repo token.
|
|
72
74
|
|
|
75
|
+
Limit: the git credential protocol does not tell the helper if git fetches or
|
|
76
|
+
pushes. So for plain git, the helper always asks for the push password or
|
|
77
|
+
token first (one repo, short-lived). Without push access it gets a read one:
|
|
78
|
+
a clone or fetch works, and a push fails with a permission error.
|
|
79
|
+
|
|
80
|
+
## Domains
|
|
81
|
+
|
|
82
|
+
`astral domains` loads commands and flags from your workspace's catalog.
|
|
83
|
+
Only tools in that catalog appear in the group.
|
|
84
|
+
|
|
85
|
+
```sh
|
|
86
|
+
astral domains search
|
|
87
|
+
astral domains list
|
|
88
|
+
astral domains get
|
|
89
|
+
astral domains price
|
|
90
|
+
astral domains dns-list
|
|
91
|
+
astral domains dns-create
|
|
92
|
+
astral domains dns-delete
|
|
93
|
+
astral domains connect-to-site
|
|
94
|
+
astral domains disconnect-from-site
|
|
95
|
+
astral domains add-external
|
|
96
|
+
astral domains remove-external
|
|
97
|
+
astral domains verify
|
|
98
|
+
astral domains set-auto-renew
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
Use each command's `--help` to see its required input. Path parameters become
|
|
102
|
+
flags: `id` becomes `--id`, and `record_id` becomes `--record-id`.
|
|
103
|
+
|
|
104
|
+
Domain purchases are paid and non-refundable. `domains.buy` is not a generated
|
|
105
|
+
command. Use `astral call domains.buy --input '<json>'` through the normal
|
|
106
|
+
approval flow.
|
|
107
|
+
|
|
73
108
|
## Agent instructions
|
|
74
109
|
|
|
75
110
|
`astral agent-setup` prints a marked AGENTS.md snippet. It needs no sign-in.
|
package/dist/astral.js
CHANGED
|
@@ -10275,7 +10275,7 @@ var ASTRAL_APPROVAL_HEADER = "Astral-Approval";
|
|
|
10275
10275
|
// package.json
|
|
10276
10276
|
var package_default = {
|
|
10277
10277
|
name: "@astralos/cli",
|
|
10278
|
-
version: "0.1.
|
|
10278
|
+
version: "0.1.7",
|
|
10279
10279
|
license: "MIT",
|
|
10280
10280
|
description: "The Astral command line. Every Astral tool, from a terminal or an agent.",
|
|
10281
10281
|
publishConfig: {
|
|
@@ -10926,6 +10926,15 @@ var URL_ENV = "ASTRAL_GIT_URL";
|
|
|
10926
10926
|
var UUID = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
|
|
10927
10927
|
var toolPath = (name) => `/api/v1/tools/${encodeURIComponent(name)}`;
|
|
10928
10928
|
var readCredentials = async (client, id) => (await client.call({ method: "POST", path: toolPath("code.git_read_credentials"), json: { id } })).credentials;
|
|
10929
|
+
var helperRepoCredentials = async (client, id) => {
|
|
10930
|
+
try {
|
|
10931
|
+
return (await client.call({ method: "POST", path: toolPath("code.git_write_credentials"), json: { id } })).credentials;
|
|
10932
|
+
} catch (error) {
|
|
10933
|
+
if (!(error instanceof CliError) || error.error.type !== "permission_denied")
|
|
10934
|
+
throw error;
|
|
10935
|
+
return readCredentials(client, id);
|
|
10936
|
+
}
|
|
10937
|
+
};
|
|
10929
10938
|
var resolveRepo = async (client, ref) => {
|
|
10930
10939
|
if (UUID.test(ref))
|
|
10931
10940
|
return { id: ref, name: ref, kind: "astral" };
|
|
@@ -11089,7 +11098,7 @@ var helperCredentials = async (runtime, globals, repoId) => {
|
|
|
11089
11098
|
}
|
|
11090
11099
|
if (!repoId)
|
|
11091
11100
|
return null;
|
|
11092
|
-
return
|
|
11101
|
+
return helperRepoCredentials(clientFor(runtime, globals), repoId);
|
|
11093
11102
|
};
|
|
11094
11103
|
|
|
11095
11104
|
// src/gh.ts
|
|
@@ -11472,12 +11481,13 @@ var registerTool = (command, tool, runtime) => {
|
|
|
11472
11481
|
});
|
|
11473
11482
|
};
|
|
11474
11483
|
var findCommand = (program, name) => program.commands.find((command) => command.name() === name || command.aliases().includes(name));
|
|
11484
|
+
var isLeafCommand = (command) => command.commands.length === 0 && command.name() !== "domains";
|
|
11475
11485
|
var addGeneratedCommands = (program, runtime, catalog) => {
|
|
11476
11486
|
for (const tool of catalog.tools) {
|
|
11477
|
-
if (CREDENTIAL_TOOLS.has(tool.name))
|
|
11487
|
+
if (CREDENTIAL_TOOLS.has(tool.name) || tool.name === "domains.buy")
|
|
11478
11488
|
continue;
|
|
11479
11489
|
let app = findCommand(program, tool.app);
|
|
11480
|
-
if (app && app
|
|
11490
|
+
if (app && isLeafCommand(app))
|
|
11481
11491
|
continue;
|
|
11482
11492
|
if (!app)
|
|
11483
11493
|
app = program.command(tool.app).description(`tools from ${tool.app}`);
|
|
@@ -11496,7 +11506,7 @@ var registerGenerated = async (program, runtime, argv) => {
|
|
|
11496
11506
|
return;
|
|
11497
11507
|
const app = findCommand(program, name);
|
|
11498
11508
|
const toolName = tokens.slice(groupIndex + 1).find((token) => !token.startsWith("-"));
|
|
11499
|
-
if (app && (app
|
|
11509
|
+
if (app && (isLeafCommand(app) || toolName && findCommand(app, toolName)))
|
|
11500
11510
|
return;
|
|
11501
11511
|
try {
|
|
11502
11512
|
addGeneratedCommands(program, runtime, await loadCatalog(runtime, globalsOf(program)));
|
|
@@ -20198,6 +20208,7 @@ var buildProgram = async (runtime) => {
|
|
|
20198
20208
|
registerTools(program, runtime);
|
|
20199
20209
|
registerProject(program, runtime);
|
|
20200
20210
|
registerSitesLogs(program, runtime);
|
|
20211
|
+
program.command("domains").description("manage domains");
|
|
20201
20212
|
return program;
|
|
20202
20213
|
};
|
|
20203
20214
|
var run = async (argv, runtime) => {
|