@tarileo/avileo-catalog-cli 0.3.0 → 0.3.2
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 +63 -16
- package/dist/index.js +342 -71
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,25 +1,64 @@
|
|
|
1
1
|
# @tarileo/avileo-catalog-cli
|
|
2
2
|
|
|
3
|
-
The Avileo tenant-agent command line interface for a registered
|
|
3
|
+
The Avileo tenant-agent command line interface for a registered business with effective catalog-agent access.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
The origin-pinning contract below describes this checkout. A package version in
|
|
6
|
+
`package.json` does not prove npm availability: `0.3.2` has not been published
|
|
7
|
+
by this release closure. Public handoff must wait for the operator's verified
|
|
8
|
+
package version/artifact and an activated destination. Never substitute an older
|
|
9
|
+
CLI that lacks these flags or silently pair with the integrated deployment.
|
|
10
|
+
|
|
11
|
+
For an authorized local-source session, build the workspace SDK first and run
|
|
12
|
+
the CLI from the repository root:
|
|
6
13
|
|
|
7
14
|
```sh
|
|
8
|
-
|
|
15
|
+
bun run --filter @tarileo/avileo-sdk build
|
|
16
|
+
bun apps/avileo/agent-cli/src/index.ts auth login --base-url <origin> --json
|
|
9
17
|
```
|
|
10
18
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
19
|
+
Hereafter `avileo` means that same verified CLI command prefix. Pass only the
|
|
20
|
+
explicit API origin supplied by the operator; package source and API destination
|
|
21
|
+
are independent decisions.
|
|
22
|
+
|
|
23
|
+
The CLI prints only the verification URI, user code, status and pinned
|
|
24
|
+
`baseUrl`, opens the link with a safe executable when available, polls until
|
|
25
|
+
approval, and stores the new Agent Key locally with `0600` permissions. The key
|
|
26
|
+
is never printed or placed in the URL. Use `auth status --json` to inspect the
|
|
27
|
+
source (`environment` or `local`) and the pinned origin without revealing the
|
|
28
|
+
key, and `auth logout --json` to remove only the local credential; remote
|
|
29
|
+
revocation remains an Avileo action.
|
|
30
|
+
|
|
31
|
+
Origins must use HTTPS, except plain HTTP for local development hosts
|
|
32
|
+
(loopback, private or Tailscale addresses). Without `--base-url` or
|
|
33
|
+
`AVILEO_AGENT_BASE_URL`, the CLI pairs with production
|
|
34
|
+
(`https://avileo.theelena.me`) and pins it. If the pinned origin fails, fix the
|
|
35
|
+
target; the CLI never falls back to another origin on its own.
|
|
17
36
|
|
|
18
|
-
|
|
37
|
+
If Avileo has already issued an Agent Key, configure it without putting the
|
|
38
|
+
secret in shell history, process arguments or JSON:
|
|
39
|
+
|
|
40
|
+
```sh
|
|
41
|
+
avileo auth configure --base-url <origin> --json
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
The command reads the key without echoing it and stores it locally. For CI/CD
|
|
45
|
+
and automated agents, continue injecting `AVILEO_AGENT_API_KEY`.
|
|
19
46
|
Environment credentials always take priority over the local credential file.
|
|
20
47
|
Never pass an Agent Key through flags, prompts or JSON input.
|
|
21
48
|
|
|
22
|
-
`AVILEO_AGENT_BASE_URL
|
|
49
|
+
`--base-url` wins over `AVILEO_AGENT_BASE_URL`, which remains the advanced
|
|
50
|
+
development/test override: set it before `auth login` or `auth configure` so
|
|
51
|
+
the origin is pinned with the credential. Commands reject
|
|
52
|
+
`CLI_ORIGIN_CONFLICT` when the variable points to a different origin than the
|
|
53
|
+
pinned credential — remove the override or re-authenticate with
|
|
54
|
+
`auth login --base-url <origin>`; an existing key is never sent to another
|
|
55
|
+
host. Invalid or unsafe origins fail with `CLI_ORIGIN_UNSUPPORTED`.
|
|
56
|
+
|
|
57
|
+
Local credentials created before origin pinning must be authorized again with
|
|
58
|
+
`auth login --base-url <origin>`. A stored key without a bound origin fails
|
|
59
|
+
with `CLI_CONFIGURATION_ERROR` before any request; the CLI cannot infer its
|
|
60
|
+
destination safely and does not migrate it to production or an environment
|
|
61
|
+
override.
|
|
23
62
|
|
|
24
63
|
Use `--from <json-file>` for structured mutation input. Direct mutations validate
|
|
25
64
|
locally by default; pass `--apply` only after reviewing the result. The CLI is
|
|
@@ -29,8 +68,16 @@ reference for headers, idempotency, resources and errors.
|
|
|
29
68
|
|
|
30
69
|
For operators and AI agents, the recommended sequence is:
|
|
31
70
|
|
|
32
|
-
1. Run `business show --json
|
|
33
|
-
2.
|
|
34
|
-
3.
|
|
35
|
-
4.
|
|
36
|
-
5.
|
|
71
|
+
1. Run `business show --json` to confirm the connected business and actions.
|
|
72
|
+
2. Run `business profile show --json` when evaluating profile completeness.
|
|
73
|
+
3. Read the exact catalog resource before proposing a change.
|
|
74
|
+
4. Run direct mutations without `--apply` to review local validation or a diff.
|
|
75
|
+
5. Add `--apply` to create a proposal; this does not mutate the business.
|
|
76
|
+
6. Ask the human to approve the exact proposal in Avileo, then apply the
|
|
77
|
+
returned operation or approval ID.
|
|
78
|
+
7. Use the durable import preview/apply flow for structured supplier lists.
|
|
79
|
+
|
|
80
|
+
Profile updates use a direct JSON object with `business profile update --from
|
|
81
|
+
profile-update.json`. Without `--apply` the command returns a local diff; with
|
|
82
|
+
`--apply` it creates a `business.profile.update` proposal. After approval, run
|
|
83
|
+
`operation apply <id> --json` and re-read the profile.
|