@feastalytics/cli 0.1.1 → 0.1.3
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 +62 -0
- package/dist/cli.js +825 -231
- package/feast/SKILL.md +23 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -16,6 +16,21 @@ Or run without installing:
|
|
|
16
16
|
npx @feastalytics/cli <command>
|
|
17
17
|
```
|
|
18
18
|
|
|
19
|
+
### Staying current
|
|
20
|
+
|
|
21
|
+
Neither install path updates itself. Once a day the CLI checks npm for a newer
|
|
22
|
+
published version and, if there is one, prints a one-line notice to stderr after
|
|
23
|
+
the command finishes:
|
|
24
|
+
|
|
25
|
+
```
|
|
26
|
+
Update available: feast 0.1.1 → 0.2.0
|
|
27
|
+
npx @feastalytics/cli@latest <command> (or: npm install -g @feastalytics/cli@latest)
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
The check is skipped when stderr isn't a TTY, when `CI` is set, or when
|
|
31
|
+
`FEAST_NO_UPDATE_CHECK` or `NO_UPDATE_NOTIFIER` is set. It never blocks longer
|
|
32
|
+
than 1.5s and fails silently offline.
|
|
33
|
+
|
|
19
34
|
## Usage
|
|
20
35
|
|
|
21
36
|
```bash
|
|
@@ -78,6 +93,53 @@ To refresh from a local checkout instead of GitHub, run `npx skills add ./feast
|
|
|
78
93
|
- `FEAST_API_URL` — override the API base URL (e.g. a local dev server)
|
|
79
94
|
- `FEAST_API_KEY` — override the static API key
|
|
80
95
|
|
|
96
|
+
### Non-interactive credentials
|
|
97
|
+
|
|
98
|
+
`feast login` stores tokens under `~/.config/feast-cli/` and refreshes them on
|
|
99
|
+
demand. That does not work where there is no interactive login and no writable
|
|
100
|
+
home directory — most importantly inside a sandboxed agent, where the token is
|
|
101
|
+
supplied by the host and must never be readable by the agent itself.
|
|
102
|
+
|
|
103
|
+
Set `FEAST_ACCESS_TOKEN` for that case:
|
|
104
|
+
|
|
105
|
+
```bash
|
|
106
|
+
export FEAST_ACCESS_TOKEN="$TOKEN"
|
|
107
|
+
export FEAST_ORGANIZATION_ID=4fafb31e-dd46-4081-9778-c298e577a1d1
|
|
108
|
+
export FEAST_PREFERRED_ROLE=OWNER
|
|
109
|
+
feast call listCampaigns
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
- `FEAST_ACCESS_TOKEN` — access token sent verbatim as `x-access-token`
|
|
113
|
+
- `FEAST_ORGANIZATION_ID` — **pins** the organization
|
|
114
|
+
- `FEAST_PREFERRED_ROLE` — **pins** the role; a role name (`OWNER`) or a full role ARN
|
|
115
|
+
|
|
116
|
+
When `FEAST_ACCESS_TOKEN` is set the CLI reads no token from disk, refreshes
|
|
117
|
+
nothing, and **never decodes the token**. Normally the organization and role are
|
|
118
|
+
read from the token's `cognito:groups` claim, so both must be supplied instead.
|
|
119
|
+
|
|
120
|
+
Not decoding the token is the point, not a limitation: it lets the token be an
|
|
121
|
+
opaque placeholder that a secret store substitutes for the real value after the
|
|
122
|
+
request leaves the machine, so a compromised sandbox yields nothing.
|
|
123
|
+
|
|
124
|
+
`FEAST_ORGANIZATION_ID` and `FEAST_PREFERRED_ROLE` pin the session rather than
|
|
125
|
+
just defaulting it. `--org` and `--role` may repeat the pinned value but cannot
|
|
126
|
+
change it:
|
|
127
|
+
|
|
128
|
+
```
|
|
129
|
+
$ FEAST_ORGANIZATION_ID=org-A feast call listCampaigns --org org-B
|
|
130
|
+
FEAST_ORGANIZATION_ID pins this session to org-A, so --org org-B is not allowed.
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
Pinning the role is how you run an agent at **reduced** privilege. The API
|
|
134
|
+
validates a requested role against the user's real Cognito groups, so it will
|
|
135
|
+
happily accept `OWNER` from a user who is an owner — only the pin can hold that
|
|
136
|
+
user's agent down to `VIEWER`.
|
|
137
|
+
|
|
138
|
+
Neither pin is a security boundary on its own: both are ordinary environment
|
|
139
|
+
variables, so anything that can set env vars in the same process tree can change
|
|
140
|
+
them. They stop a tool call from wandering, not a determined process. Scope the
|
|
141
|
+
token itself if you need a hard guarantee.
|
|
142
|
+
|
|
81
143
|
## Development
|
|
82
144
|
|
|
83
145
|
```bash
|