pacific-cli 0.2.0__tar.gz → 0.3.0__tar.gz
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.
- {pacific_cli-0.2.0 → pacific_cli-0.3.0}/PKG-INFO +149 -34
- {pacific_cli-0.2.0 → pacific_cli-0.3.0}/README.md +148 -33
- {pacific_cli-0.2.0 → pacific_cli-0.3.0}/demos/agent_access/README.md +4 -4
- {pacific_cli-0.2.0 → pacific_cli-0.3.0}/demos/agent_access/agents/agent.yaml +1 -1
- {pacific_cli-0.2.0 → pacific_cli-0.3.0}/demos/agent_access/corpus/manifest.yaml +1 -1
- {pacific_cli-0.2.0 → pacific_cli-0.3.0}/demos/agent_access/corpus/manifest_test.py +1 -1
- {pacific_cli-0.2.0 → pacific_cli-0.3.0}/demos/agent_access/demo.sh +10 -10
- {pacific_cli-0.2.0 → pacific_cli-0.3.0}/demos/agent_access/demo_test.py +8 -8
- {pacific_cli-0.2.0 → pacific_cli-0.3.0}/openapi/public_api_openapi.json +8073 -4035
- {pacific_cli-0.2.0 → pacific_cli-0.3.0}/pyproject.toml +1 -1
- {pacific_cli-0.2.0 → pacific_cli-0.3.0}/scripts/trim_openapi.py +8 -0
- {pacific_cli-0.2.0 → pacific_cli-0.3.0}/src/pacific_cli/__init__.py +2 -2
- {pacific_cli-0.2.0 → pacific_cli-0.3.0}/src/pacific_cli/admin/commands.py +21 -15
- {pacific_cli-0.2.0 → pacific_cli-0.3.0}/src/pacific_cli/admin/service.py +2 -2
- {pacific_cli-0.2.0 → pacific_cli-0.3.0}/src/pacific_cli/admin/service_test.py +1 -1
- {pacific_cli-0.2.0 → pacific_cli-0.3.0}/src/pacific_cli/agents/commands.py +8 -4
- pacific_cli-0.3.0/src/pacific_cli/aliases/__init__.py +1 -0
- pacific_cli-0.3.0/src/pacific_cli/aliases/commands.py +38 -0
- pacific_cli-0.3.0/src/pacific_cli/aliases/commands_test.py +63 -0
- pacific_cli-0.3.0/src/pacific_cli/aliases/config.py +22 -0
- pacific_cli-0.3.0/src/pacific_cli/aliases/types.py +18 -0
- {pacific_cli-0.2.0 → pacific_cli-0.3.0}/src/pacific_cli/auth/client.py +22 -3
- {pacific_cli-0.2.0 → pacific_cli-0.3.0}/src/pacific_cli/auth/client_test.py +1 -1
- {pacific_cli-0.2.0 → pacific_cli-0.3.0}/src/pacific_cli/auth/commands.py +67 -34
- {pacific_cli-0.2.0 → pacific_cli-0.3.0}/src/pacific_cli/auth/config.py +23 -17
- pacific_cli-0.3.0/src/pacific_cli/auth/login_pages.py +99 -0
- {pacific_cli-0.2.0 → pacific_cli-0.3.0}/src/pacific_cli/auth/oauth.py +7 -5
- {pacific_cli-0.2.0 → pacific_cli-0.3.0}/src/pacific_cli/auth/oauth_test.py +28 -2
- {pacific_cli-0.2.0 → pacific_cli-0.3.0}/src/pacific_cli/auth/profiles.py +57 -28
- {pacific_cli-0.2.0 → pacific_cli-0.3.0}/src/pacific_cli/auth/profiles_test.py +82 -7
- {pacific_cli-0.2.0 → pacific_cli-0.3.0}/src/pacific_cli/auth/runtime.py +1 -1
- {pacific_cli-0.2.0 → pacific_cli-0.3.0}/src/pacific_cli/auth/sessions.py +1 -1
- {pacific_cli-0.2.0 → pacific_cli-0.3.0}/src/pacific_cli/auth/types.py +32 -0
- {pacific_cli-0.2.0 → pacific_cli-0.3.0}/src/pacific_cli/config.py +1 -1
- {pacific_cli-0.2.0 → pacific_cli-0.3.0}/src/pacific_cli/contract_test.py +91 -0
- pacific_cli-0.3.0/src/pacific_cli/documents/__init__.py +1 -0
- {pacific_cli-0.2.0 → pacific_cli-0.3.0}/src/pacific_cli/documents/commands.py +35 -18
- {pacific_cli-0.2.0 → pacific_cli-0.3.0}/src/pacific_cli/documents/commands_test.py +21 -14
- {pacific_cli-0.2.0 → pacific_cli-0.3.0}/src/pacific_cli/documents/config.py +4 -1
- {pacific_cli-0.2.0 → pacific_cli-0.3.0}/src/pacific_cli/documents/service.py +5 -4
- {pacific_cli-0.2.0 → pacific_cli-0.3.0}/src/pacific_cli/documents/service_test.py +19 -2
- {pacific_cli-0.2.0 → pacific_cli-0.3.0}/src/pacific_cli/keys/commands.py +16 -9
- {pacific_cli-0.2.0 → pacific_cli-0.3.0}/src/pacific_cli/main.py +50 -11
- {pacific_cli-0.2.0 → pacific_cli-0.3.0}/src/pacific_cli/main_test.py +79 -11
- {pacific_cli-0.2.0 → pacific_cli-0.3.0}/src/pacific_cli/mcp/client.py +1 -1
- {pacific_cli-0.2.0 → pacific_cli-0.3.0}/src/pacific_cli/mcp/client_test.py +1 -1
- {pacific_cli-0.2.0 → pacific_cli-0.3.0}/src/pacific_cli/mcp/fake_server_test.py +1 -1
- {pacific_cli-0.2.0 → pacific_cli-0.3.0}/src/pacific_cli/mcp/types.py +1 -1
- pacific_cli-0.3.0/src/pacific_cli/monitors/__init__.py +1 -0
- pacific_cli-0.3.0/src/pacific_cli/monitors/commands.py +404 -0
- pacific_cli-0.3.0/src/pacific_cli/monitors/commands_test.py +180 -0
- pacific_cli-0.3.0/src/pacific_cli/monitors/config.py +22 -0
- pacific_cli-0.3.0/src/pacific_cli/monitors/service.py +179 -0
- pacific_cli-0.3.0/src/pacific_cli/monitors/service_test.py +366 -0
- pacific_cli-0.3.0/src/pacific_cli/monitors/types.py +298 -0
- {pacific_cli-0.2.0 → pacific_cli-0.3.0}/src/pacific_cli/policy/commands.py +92 -34
- {pacific_cli-0.2.0 → pacific_cli-0.3.0}/src/pacific_cli/policy/commands_test.py +16 -24
- {pacific_cli-0.2.0 → pacific_cli-0.3.0}/src/pacific_cli/policy/service.py +1 -1
- {pacific_cli-0.2.0 → pacific_cli-0.3.0}/src/pacific_cli/policy/types.py +13 -0
- pacific_cli-0.3.0/src/pacific_cli/refusals.py +41 -0
- pacific_cli-0.3.0/src/pacific_cli/samples/__init__.py +1 -0
- pacific_cli-0.3.0/src/pacific_cli/samples/commands.py +60 -0
- pacific_cli-0.3.0/src/pacific_cli/samples/commands_test.py +41 -0
- pacific_cli-0.3.0/src/pacific_cli/samples/config.py +35 -0
- pacific_cli-0.3.0/src/pacific_cli/samples/files/acme-vendor-agreement.pdf +93 -0
- pacific_cli-0.3.0/src/pacific_cli/samples/files/helios-ridge-q3-2026-compliance-certificate.pdf +80 -0
- pacific_cli-0.3.0/src/pacific_cli/samples/files/helios-ridge-q3-2026-update.pdf +80 -0
- pacific_cli-0.3.0/src/pacific_cli/samples/files/northwind-freight-q3-2026-update.pdf +80 -0
- pacific_cli-0.3.0/src/pacific_cli/samples/service.py +56 -0
- pacific_cli-0.3.0/src/pacific_cli/samples/service_test.py +61 -0
- pacific_cli-0.3.0/src/pacific_cli/samples/types.py +32 -0
- pacific_cli-0.3.0/src/pacific_cli/schemas/__init__.py +1 -0
- pacific_cli-0.3.0/src/pacific_cli/schemas/commands.py +188 -0
- pacific_cli-0.3.0/src/pacific_cli/schemas/commands_test.py +104 -0
- pacific_cli-0.3.0/src/pacific_cli/schemas/config.py +16 -0
- pacific_cli-0.3.0/src/pacific_cli/schemas/service.py +232 -0
- pacific_cli-0.3.0/src/pacific_cli/schemas/service_test.py +512 -0
- pacific_cli-0.3.0/src/pacific_cli/schemas/types.py +192 -0
- {pacific_cli-0.2.0 → pacific_cli-0.3.0}/src/pacific_cli/search/commands.py +15 -6
- {pacific_cli-0.2.0 → pacific_cli-0.3.0}/src/pacific_cli/search/commands_test.py +23 -4
- pacific_cli-0.3.0/src/pacific_cli/tryout/__init__.py +1 -0
- pacific_cli-0.3.0/src/pacific_cli/tryout/commands.py +57 -0
- pacific_cli-0.3.0/src/pacific_cli/tryout/config.py +7 -0
- pacific_cli-0.3.0/src/pacific_cli/tryout/service.py +66 -0
- pacific_cli-0.3.0/src/pacific_cli/tryout/service_test.py +198 -0
- pacific_cli-0.3.0/src/pacific_cli/tryout/types.py +29 -0
- {pacific_cli-0.2.0 → pacific_cli-0.3.0}/uv.lock +1 -1
- pacific_cli-0.2.0/src/pacific_cli/documents/__init__.py +0 -1
- {pacific_cli-0.2.0 → pacific_cli-0.3.0}/.gitignore +0 -0
- {pacific_cli-0.2.0 → pacific_cli-0.3.0}/LICENSE +0 -0
- {pacific_cli-0.2.0 → pacific_cli-0.3.0}/RELEASING.md +0 -0
- {pacific_cli-0.2.0 → pacific_cli-0.3.0}/demos/agent_access/corpus/acquisition-plan.pdf +0 -0
- {pacific_cli-0.2.0 → pacific_cli-0.3.0}/demos/agent_access/corpus/board-minutes.pdf +0 -0
- {pacific_cli-0.2.0 → pacific_cli-0.3.0}/demos/agent_access/corpus/executive-compensation.pdf +0 -0
- {pacific_cli-0.2.0 → pacific_cli-0.3.0}/demos/agent_access/corpus/holiday-calendar.pdf +0 -0
- {pacific_cli-0.2.0 → pacific_cli-0.3.0}/demos/agent_access/corpus/make_pdfs.py +0 -0
- {pacific_cli-0.2.0 → pacific_cli-0.3.0}/demos/agent_access/corpus/office-relocation.pdf +0 -0
- {pacific_cli-0.2.0 → pacific_cli-0.3.0}/demos/agent_access/corpus/tern-sensor-faq.pdf +0 -0
- {pacific_cli-0.2.0 → pacific_cli-0.3.0}/demos/agent_access/corpus/travel-policy.pdf +0 -0
- {pacific_cli-0.2.0 → pacific_cli-0.3.0}/demos/agent_access/corpus/workforce-plan.pdf +0 -0
- {pacific_cli-0.2.0 → pacific_cli-0.3.0}/demos/agent_access/policies/demo-access.general-only.yaml +0 -0
- {pacific_cli-0.2.0 → pacific_cli-0.3.0}/demos/agent_access/policies/demo-access.yaml +0 -0
- {pacific_cli-0.2.0 → pacific_cli-0.3.0}/src/pacific_cli/__main__.py +0 -0
- {pacific_cli-0.2.0 → pacific_cli-0.3.0}/src/pacific_cli/admin/__init__.py +0 -0
- {pacific_cli-0.2.0 → pacific_cli-0.3.0}/src/pacific_cli/admin/commands_test.py +0 -0
- {pacific_cli-0.2.0 → pacific_cli-0.3.0}/src/pacific_cli/admin/config.py +0 -0
- {pacific_cli-0.2.0 → pacific_cli-0.3.0}/src/pacific_cli/admin/types.py +0 -0
- {pacific_cli-0.2.0 → pacific_cli-0.3.0}/src/pacific_cli/agents/__init__.py +0 -0
- {pacific_cli-0.2.0 → pacific_cli-0.3.0}/src/pacific_cli/auth/__init__.py +0 -0
- {pacific_cli-0.2.0 → pacific_cli-0.3.0}/src/pacific_cli/documents/types.py +0 -0
- {pacific_cli-0.2.0 → pacific_cli-0.3.0}/src/pacific_cli/keys/__init__.py +0 -0
- {pacific_cli-0.2.0 → pacific_cli-0.3.0}/src/pacific_cli/keys/config.py +0 -0
- {pacific_cli-0.2.0 → pacific_cli-0.3.0}/src/pacific_cli/keys/service.py +0 -0
- {pacific_cli-0.2.0 → pacific_cli-0.3.0}/src/pacific_cli/keys/service_test.py +0 -0
- {pacific_cli-0.2.0 → pacific_cli-0.3.0}/src/pacific_cli/keys/types.py +0 -0
- {pacific_cli-0.2.0 → pacific_cli-0.3.0}/src/pacific_cli/mcp/__init__.py +0 -0
- {pacific_cli-0.2.0 → pacific_cli-0.3.0}/src/pacific_cli/mcp/commands.py +0 -0
- {pacific_cli-0.2.0 → pacific_cli-0.3.0}/src/pacific_cli/mcp/config.py +0 -0
- {pacific_cli-0.2.0 → pacific_cli-0.3.0}/src/pacific_cli/mcp/service.py +0 -0
- {pacific_cli-0.2.0 → pacific_cli-0.3.0}/src/pacific_cli/mcp/service_test.py +0 -0
- {pacific_cli-0.2.0 → pacific_cli-0.3.0}/src/pacific_cli/policy/__init__.py +0 -0
- {pacific_cli-0.2.0 → pacific_cli-0.3.0}/src/pacific_cli/policy/config.py +0 -0
- {pacific_cli-0.2.0 → pacific_cli-0.3.0}/src/pacific_cli/policy/recorded/policy_get_effective_access.json +0 -0
- {pacific_cli-0.2.0 → pacific_cli-0.3.0}/src/pacific_cli/policy/recorded/policy_list_calls.json +0 -0
- {pacific_cli-0.2.0 → pacific_cli-0.3.0}/src/pacific_cli/policy/service_test.py +0 -0
- {pacific_cli-0.2.0 → pacific_cli-0.3.0}/src/pacific_cli/search/__init__.py +0 -0
- {pacific_cli-0.2.0 → pacific_cli-0.3.0}/src/pacific_cli/search/config.py +0 -0
- {pacific_cli-0.2.0 → pacific_cli-0.3.0}/src/pacific_cli/search/service.py +0 -0
- {pacific_cli-0.2.0 → pacific_cli-0.3.0}/src/pacific_cli/search/types.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: pacific-cli
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.3.0
|
|
4
4
|
Summary: The pacific command: upload documents with policy metadata, and write, list and attach access policies, against a Pacific server's public API
|
|
5
5
|
Project-URL: Homepage, https://pacific.app
|
|
6
6
|
Project-URL: Documentation, https://docs.pacific.app
|
|
@@ -30,13 +30,13 @@ Description-Content-Type: text/markdown
|
|
|
30
30
|
|
|
31
31
|
# pacific — the command line for Pacific
|
|
32
32
|
|
|
33
|
-
Upload documents
|
|
34
|
-
|
|
35
|
-
(`/public/v1`).
|
|
33
|
+
Upload documents, write access policies, and attach them to people and agents
|
|
34
|
+
on Pacific, over its public API (`/public/v1`).
|
|
36
35
|
|
|
37
36
|
```bash
|
|
38
37
|
uv tool install pacific-cli # or: pipx install pacific-cli
|
|
39
|
-
pacific
|
|
38
|
+
pacific login # sign in to Pacific's cloud in the browser
|
|
39
|
+
pacific try # upload the sample documents and search them
|
|
40
40
|
```
|
|
41
41
|
|
|
42
42
|
The package is `pacific-cli`; the command it installs is `pacific`. It needs
|
|
@@ -44,18 +44,23 @@ Python 3.12 or later (`uv tool` and `pipx` fetch one if you need it).
|
|
|
44
44
|
|
|
45
45
|
## Profiles: which server, as whom
|
|
46
46
|
|
|
47
|
+
Out of the box the CLI talks to Pacific's cloud through a built-in `prod`
|
|
48
|
+
profile (`https://api.pacific.app`, MCP `https://mcp.pacific.app`), so
|
|
49
|
+
`pacific login` works straight after install.
|
|
50
|
+
|
|
47
51
|
```bash
|
|
48
|
-
pacific
|
|
49
|
-
pacific profile add
|
|
50
|
-
pacific
|
|
51
|
-
pacific profile
|
|
52
|
+
pacific login # signs in to prod, the built-in default
|
|
53
|
+
pacific profile add local --base-url http://localhost:5001 --use # a local server
|
|
54
|
+
pacific profile use prod # back to Pacific's cloud
|
|
55
|
+
pacific profile ls # * marks the current profile
|
|
52
56
|
pacific profile show # what this command would run as, and why
|
|
53
57
|
```
|
|
54
58
|
|
|
55
59
|
A command runs as `--profile`, then `$PACIFIC_PROFILE`, then the current
|
|
56
60
|
profile. `$PACIFIC_API_KEY` replaces that profile's credential, and
|
|
57
61
|
`$PACIFIC_BASE_URL` stands in for a profile when none is selected, so a CI job
|
|
58
|
-
needs no config file.
|
|
62
|
+
needs no config file. With none of these, it runs as the built-in `prod`
|
|
63
|
+
profile; adding a profile named `prod` replaces it. Profiles live in `$PACIFIC_CLI_CONFIG_DIR`, else
|
|
59
64
|
`$XDG_CONFIG_HOME/pacific`, else `~/.config/pacific`: `config.json` holds the
|
|
60
65
|
servers and `credentials.json` (mode 0600) the keys and sessions.
|
|
61
66
|
|
|
@@ -65,7 +70,7 @@ servers and `credentials.json` (mode 0600) the keys and sessions.
|
|
|
65
70
|
it was minted with (`documents:write` to upload, `tools:read`/`tools:write`
|
|
66
71
|
for policy, `admin:read`/`admin:write` for dummy users), so it is how to give
|
|
67
72
|
a profile less than your full access.
|
|
68
|
-
- **Browser** — `pacific
|
|
73
|
+
- **Browser** — `pacific login` opens the server's sign-in page and waits
|
|
69
74
|
on a loopback port, as Claude Code does (RFC 8252: discovery, a client
|
|
70
75
|
registered for that one redirect, PKCE S256, the token bound to the public
|
|
71
76
|
API). The session refreshes itself. `--no-browser` prints the link instead.
|
|
@@ -74,7 +79,7 @@ servers and `credentials.json` (mode 0600) the keys and sessions.
|
|
|
74
79
|
scopes limit it; with none it acts with your full access:
|
|
75
80
|
|
|
76
81
|
```bash
|
|
77
|
-
pacific
|
|
82
|
+
pacific login --scope documents:write --scope tools:read
|
|
78
83
|
```
|
|
79
84
|
|
|
80
85
|
The server refuses a scope it does not define before you sign in. A server
|
|
@@ -84,23 +89,45 @@ servers and `credentials.json` (mode 0600) the keys and sessions.
|
|
|
84
89
|
and says to use a key.
|
|
85
90
|
|
|
86
91
|
```bash
|
|
87
|
-
pacific
|
|
92
|
+
pacific whoami # who the server says you are, your scopes
|
|
88
93
|
# (asks with documents:read)
|
|
89
94
|
curl -H "Authorization: Bearer $(pacific auth token)" "$URL/public/v1/documents"
|
|
90
|
-
pacific
|
|
95
|
+
pacific logout # revokes the browser sessions (API and MCP)
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
## Trying it, and the sample documents
|
|
99
|
+
|
|
100
|
+
`pacific try` is the quickstart in one command: it copies the sample documents
|
|
101
|
+
into `./pacific-samples` (or `try DIR`), uploads them and waits until they are
|
|
102
|
+
searchable, searches them, and prints what to do next. It is safe to rerun:
|
|
103
|
+
samples already on disk are reused, and ones already uploaded (same name, no
|
|
104
|
+
labels) are skipped, so a rerun only searches again. Only hits in the samples
|
|
105
|
+
are shown; when there are none yet, it prints the search to retry once
|
|
106
|
+
indexing catches up.
|
|
107
|
+
|
|
108
|
+
The CLI ships the sample documents docs.pacific.app uses, so the quickstart
|
|
109
|
+
needs no files of your own. No sign-in is needed to copy them.
|
|
110
|
+
|
|
111
|
+
```bash
|
|
112
|
+
pacific samples list # each file and what it is
|
|
113
|
+
pacific samples copy # into ./pacific-samples (or: copy DIR)
|
|
114
|
+
pacific upload pacific-samples/*.pdf --wait
|
|
91
115
|
```
|
|
92
116
|
|
|
117
|
+
`copy` refuses before writing anything when a sample file is already there;
|
|
118
|
+
`--overwrite` replaces it.
|
|
119
|
+
|
|
93
120
|
## Uploading with policy metadata
|
|
94
121
|
|
|
95
122
|
```bash
|
|
96
|
-
pacific
|
|
123
|
+
pacific upload deck.pdf memo.docx \
|
|
97
124
|
-l board -l refcode:r100 \
|
|
98
125
|
-a deal_stage=diligence -a region=emea -a region=us \
|
|
99
126
|
--wait # until each is searchable; prints its id
|
|
100
|
-
pacific
|
|
101
|
-
pacific
|
|
102
|
-
pacific
|
|
103
|
-
pacific
|
|
127
|
+
pacific upload *.pdf -l demo --skip-existing --wait # safe to rerun
|
|
128
|
+
pacific ls # oldest 50, with their labels
|
|
129
|
+
pacific ls --limit 200 # or --all, printed a page at a time
|
|
130
|
+
pacific job JOB_ID
|
|
104
131
|
```
|
|
105
132
|
|
|
106
133
|
`--skip-existing` reads the documents you can read once, skips a file already
|
|
@@ -119,9 +146,9 @@ file goes to `/ingest`; more go to `/ingest/bulk` in batches of
|
|
|
119
146
|
```bash
|
|
120
147
|
pacific policy apply -f board-readers.yaml --dry-run # the server's verdict, nothing written
|
|
121
148
|
pacific policy apply -f board-readers.yaml # create, or write the next version
|
|
122
|
-
pacific policy
|
|
149
|
+
pacific policy ls # --kind agents|services|resource-sets
|
|
123
150
|
pacific policy get board-readers > board-readers.json # edit, then apply it back
|
|
124
|
-
pacific
|
|
151
|
+
pacific principals user --query alice
|
|
125
152
|
pacific policy attach board-readers user alice@acme.com
|
|
126
153
|
pacific policy attach board-readers group "Investment Committee"
|
|
127
154
|
pacific policy attached user alice@acme.com
|
|
@@ -129,10 +156,10 @@ pacific policy detach board-readers user alice@acme.com
|
|
|
129
156
|
pacific policy me
|
|
130
157
|
pacific policy simulate --as alice@acme.com # what she can search now
|
|
131
158
|
pacific policy simulate --as alice@acme.com --candidate restrict.yaml # and after a change
|
|
132
|
-
pacific
|
|
133
|
-
pacific
|
|
134
|
-
pacific
|
|
135
|
-
pacific
|
|
159
|
+
pacific access agent research_bot # each connector's tools, and what the policies answer
|
|
160
|
+
pacific access user alice@acme.com # --json for the server's answer
|
|
161
|
+
pacific activity --agent-id research_bot --outcome blocked # call history, newest first
|
|
162
|
+
pacific activity --user-id alice@acme.com --since 2026-11-25T10:00:00Z
|
|
136
163
|
```
|
|
137
164
|
|
|
138
165
|
`simulate` judges documents for a person without writing anything: a sample of
|
|
@@ -159,33 +186,107 @@ and the agents they may act as; an administrator about anyone. When the
|
|
|
159
186
|
organization does not enforce tool-call policies yet, it says so and each
|
|
160
187
|
decision is what the policies would answer.
|
|
161
188
|
|
|
162
|
-
`
|
|
189
|
+
`activity` prints the organization's recent tool calls and API calls, newest
|
|
163
190
|
first, one per line: when, how it ended, who, what was called, and what decided
|
|
164
191
|
it. Filter with `--agent-id`, `--user-id` (an id or an email), `--tool`,
|
|
165
192
|
`--outcome` and `--since`; `--internal-tools hidden` leaves out the tools
|
|
166
193
|
Pacific's own AI uses to run itself. A page with more after it prints the
|
|
167
194
|
cursor to pass back with `--cursor`. `--json` prints the server's reply.
|
|
168
195
|
|
|
196
|
+
## Schemas
|
|
197
|
+
|
|
198
|
+
An entity schema is a type Pacific extracts from your documents (a company, a
|
|
199
|
+
fund, a loan) and the attributes to read for it. Write one as a file:
|
|
200
|
+
|
|
201
|
+
```yaml
|
|
202
|
+
# company.yaml
|
|
203
|
+
entity_type: Company
|
|
204
|
+
description: A company we lend to or invest in
|
|
205
|
+
attributes:
|
|
206
|
+
- display_name: Net Leverage
|
|
207
|
+
description: Net debt divided by EBITDA, as a multiple
|
|
208
|
+
value_type: multiple
|
|
209
|
+
- display_name: Sector
|
|
210
|
+
description: The industry the company operates in
|
|
211
|
+
value_type: text
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
```bash
|
|
215
|
+
pacific schemas apply -f company.yaml # create Company, or edit it if it exists
|
|
216
|
+
pacific schemas list
|
|
217
|
+
pacific schemas get Company # an id or the entity type's name
|
|
218
|
+
pacific schemas get Company --draft # an attribute edit no FindAll has run yet
|
|
219
|
+
pacific schemas history Company # every saved edit, newest first
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
`apply` creates the type when no schema has that `entity_type`, and otherwise
|
|
223
|
+
replaces its description and attributes with the file's. An attribute keeps its
|
|
224
|
+
id, and the values already extracted for it, by keeping its `display_name` (in
|
|
225
|
+
any case); an attribute the file leaves out is removed, and the server refuses
|
|
226
|
+
to remove one a monitor watches. A write starts no extraction: a new type is
|
|
227
|
+
inert, and an attribute edit is a draft until a FindAll runs it. A description
|
|
228
|
+
edit applies at once. There is no delete; remove a type in the schema editor.
|
|
229
|
+
`value_type` is one of the editor's types (`text`, `number`, `multiple`,
|
|
230
|
+
`currency`, `percentage`, `date`, `year`, `list`, ...); the server validates the
|
|
231
|
+
file. A condition's unit must fit it: "exceeds 6x" needs a `multiple`.
|
|
232
|
+
|
|
233
|
+
Reading needs `entities:read` and writing `entities:write`. A full-access
|
|
234
|
+
browser sign-in holds both. Every command takes `--json` for the server's reply.
|
|
235
|
+
|
|
236
|
+
## Monitors
|
|
237
|
+
|
|
238
|
+
A monitor watches an entity type's extracted values for a condition you write
|
|
239
|
+
in plain language, and emails its subscribers when a document makes it true.
|
|
240
|
+
|
|
241
|
+
```bash
|
|
242
|
+
pacific monitors preview "Alert when a company's net leverage exceeds 6x" # nothing is stored
|
|
243
|
+
pacific monitors create "Alert when a company's net leverage exceeds 6x" \
|
|
244
|
+
--name "Leverage over 6x" --subscriber analyst@example.com --severity HIGH
|
|
245
|
+
pacific monitors list
|
|
246
|
+
pacific monitors get MONITOR_ID
|
|
247
|
+
pacific monitors events MONITOR_ID --since 2026-12-01 # the times it fired, newest first
|
|
248
|
+
pacific monitors subscribe MONITOR_ID --subscriber pm@example.com
|
|
249
|
+
pacific monitors delete MONITOR_ID
|
|
250
|
+
```
|
|
251
|
+
|
|
252
|
+
The server compiles the condition into typed conditions on an entity type, and
|
|
253
|
+
adds an attribute to the type when the condition names one it lacks; `preview`
|
|
254
|
+
shows the type, conditions and attributes a create would use, without writing.
|
|
255
|
+
To pin what it chose, pass the preview's ids to `create` with
|
|
256
|
+
`--entity-schema-id` and `--entity-id`, or watch a FindAll's entities with
|
|
257
|
+
`--findall-id`. `--disabled` creates it switched off.
|
|
258
|
+
|
|
259
|
+
Reading needs `monitors:read`, and `preview` needs `entities:read` as well,
|
|
260
|
+
because it reads the entity types and entities a create would use. `create` and
|
|
261
|
+
`delete` need `monitors:write` and `entities:write`, because a monitor can add an
|
|
262
|
+
attribute to its type; `subscribe` needs `monitors:write`. Each write scope
|
|
263
|
+
includes its read, so this covers every monitor command:
|
|
264
|
+
|
|
265
|
+
```bash
|
|
266
|
+
pacific login --scope monitors:write --scope entities:write
|
|
267
|
+
pacific keys create -s monitors:write -s entities:write --name "demo" --expires 7d
|
|
268
|
+
```
|
|
269
|
+
|
|
169
270
|
## Searching, and acting as an agent
|
|
170
271
|
|
|
171
272
|
```bash
|
|
172
273
|
pacific search "board deck budget" # as you
|
|
173
|
-
pacific
|
|
274
|
+
pacific login --mcp # once: sign in to the MCP endpoint
|
|
174
275
|
pacific agents list # who you may act as
|
|
175
|
-
pacific search "board deck budget" --as
|
|
176
|
-
pacific search "board deck budget" --as
|
|
276
|
+
pacific search "board deck budget" --as demo_reader
|
|
277
|
+
pacific search "board deck budget" --as demo_reader --json # files, best first
|
|
177
278
|
```
|
|
178
279
|
|
|
179
280
|
As you, `search` calls the public API's `/search/content` with the profile's
|
|
180
281
|
key or browser session. As an agent, it calls the same search as the MCP tool
|
|
181
282
|
`search_content`, through a separate sign-in to the profile's MCP endpoint
|
|
182
|
-
(`--mcp-url`; `https://mcp.pacific.app`
|
|
283
|
+
(`--mcp-url`; the built-in `prod` profile has `https://mcp.pacific.app`), and the agent's
|
|
183
284
|
rules decide what it finds. Approving that sign-in accepts the server's MCP
|
|
184
285
|
terms of service, as connecting any MCP client does.
|
|
185
286
|
|
|
186
287
|
A person's session acts as an agent one call at a time: each call names the
|
|
187
288
|
agent in `pacific__acting_as`, and a call that names none runs as you. The CLI
|
|
188
|
-
adds it to every call it makes with `--as
|
|
289
|
+
adds it to every call it makes with `--as`, so none can leave it out.
|
|
189
290
|
The first search as an agent (and the first after an approval lapses) prints
|
|
190
291
|
an approval link and opens it; the CLI waits until you approve, up to
|
|
191
292
|
`$PACIFIC_CLI_AGENT_APPROVAL_TIMEOUT` (ten minutes), then runs the search.
|
|
@@ -222,7 +323,7 @@ refuses agent keys. Listing needs `admin:read`, and creating and removing
|
|
|
222
323
|
holds both; a key or a scoped sign-in holds them only if it named them:
|
|
223
324
|
|
|
224
325
|
```bash
|
|
225
|
-
pacific
|
|
326
|
+
pacific login --scope admin:write --scope tools:write
|
|
226
327
|
pacific keys create -s admin:write -s tools:write --name "policy tests" --expires 7d
|
|
227
328
|
```
|
|
228
329
|
|
|
@@ -230,7 +331,7 @@ pacific keys create -s admin:write -s tools:write --name "policy tests" --expire
|
|
|
230
331
|
|
|
231
332
|
```bash
|
|
232
333
|
pacific keys create -s documents:write -s tools:read --name "CI deploy" --expires 90d
|
|
233
|
-
pacific keys
|
|
334
|
+
pacific keys ls # without their values
|
|
234
335
|
pacific keys revoke api_key_...
|
|
235
336
|
```
|
|
236
337
|
|
|
@@ -251,9 +352,23 @@ asking for `keys:manage` alone, makes the request, and revokes that sign-in.
|
|
|
251
352
|
To keep a session that may list and revoke without signing in each time:
|
|
252
353
|
|
|
253
354
|
```bash
|
|
254
|
-
pacific
|
|
355
|
+
pacific login --scope keys:manage
|
|
255
356
|
```
|
|
256
357
|
|
|
358
|
+
## Old command names
|
|
359
|
+
|
|
360
|
+
Commands renamed to short top-level verbs keep their old names as hidden
|
|
361
|
+
aliases: they run the same command but are left out of `--help`.
|
|
362
|
+
|
|
363
|
+
| Old | New |
|
|
364
|
+
|---|---|
|
|
365
|
+
| `auth login`, `auth logout`, `auth status` | `login`, `logout`, `whoami` |
|
|
366
|
+
| `documents upload`, `documents list`, `documents job` | `upload`, `ls`, `job` |
|
|
367
|
+
| `policy access`, `policy calls`, `policy principals` | `access`, `activity`, `principals` |
|
|
368
|
+
| `policy list`, `policy delete` | `policy ls`, `policy rm` |
|
|
369
|
+
| `keys list`, `profile list`, `profile remove` | `keys ls`, `profile ls`, `profile rm` |
|
|
370
|
+
| `search --as-agent` | `search --as` |
|
|
371
|
+
|
|
257
372
|
## Developing
|
|
258
373
|
|
|
259
374
|
```bash
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
# pacific — the command line for Pacific
|
|
2
2
|
|
|
3
|
-
Upload documents
|
|
4
|
-
|
|
5
|
-
(`/public/v1`).
|
|
3
|
+
Upload documents, write access policies, and attach them to people and agents
|
|
4
|
+
on Pacific, over its public API (`/public/v1`).
|
|
6
5
|
|
|
7
6
|
```bash
|
|
8
7
|
uv tool install pacific-cli # or: pipx install pacific-cli
|
|
9
|
-
pacific
|
|
8
|
+
pacific login # sign in to Pacific's cloud in the browser
|
|
9
|
+
pacific try # upload the sample documents and search them
|
|
10
10
|
```
|
|
11
11
|
|
|
12
12
|
The package is `pacific-cli`; the command it installs is `pacific`. It needs
|
|
@@ -14,18 +14,23 @@ Python 3.12 or later (`uv tool` and `pipx` fetch one if you need it).
|
|
|
14
14
|
|
|
15
15
|
## Profiles: which server, as whom
|
|
16
16
|
|
|
17
|
+
Out of the box the CLI talks to Pacific's cloud through a built-in `prod`
|
|
18
|
+
profile (`https://api.pacific.app`, MCP `https://mcp.pacific.app`), so
|
|
19
|
+
`pacific login` works straight after install.
|
|
20
|
+
|
|
17
21
|
```bash
|
|
18
|
-
pacific
|
|
19
|
-
pacific profile add
|
|
20
|
-
pacific
|
|
21
|
-
pacific profile
|
|
22
|
+
pacific login # signs in to prod, the built-in default
|
|
23
|
+
pacific profile add local --base-url http://localhost:5001 --use # a local server
|
|
24
|
+
pacific profile use prod # back to Pacific's cloud
|
|
25
|
+
pacific profile ls # * marks the current profile
|
|
22
26
|
pacific profile show # what this command would run as, and why
|
|
23
27
|
```
|
|
24
28
|
|
|
25
29
|
A command runs as `--profile`, then `$PACIFIC_PROFILE`, then the current
|
|
26
30
|
profile. `$PACIFIC_API_KEY` replaces that profile's credential, and
|
|
27
31
|
`$PACIFIC_BASE_URL` stands in for a profile when none is selected, so a CI job
|
|
28
|
-
needs no config file.
|
|
32
|
+
needs no config file. With none of these, it runs as the built-in `prod`
|
|
33
|
+
profile; adding a profile named `prod` replaces it. Profiles live in `$PACIFIC_CLI_CONFIG_DIR`, else
|
|
29
34
|
`$XDG_CONFIG_HOME/pacific`, else `~/.config/pacific`: `config.json` holds the
|
|
30
35
|
servers and `credentials.json` (mode 0600) the keys and sessions.
|
|
31
36
|
|
|
@@ -35,7 +40,7 @@ servers and `credentials.json` (mode 0600) the keys and sessions.
|
|
|
35
40
|
it was minted with (`documents:write` to upload, `tools:read`/`tools:write`
|
|
36
41
|
for policy, `admin:read`/`admin:write` for dummy users), so it is how to give
|
|
37
42
|
a profile less than your full access.
|
|
38
|
-
- **Browser** — `pacific
|
|
43
|
+
- **Browser** — `pacific login` opens the server's sign-in page and waits
|
|
39
44
|
on a loopback port, as Claude Code does (RFC 8252: discovery, a client
|
|
40
45
|
registered for that one redirect, PKCE S256, the token bound to the public
|
|
41
46
|
API). The session refreshes itself. `--no-browser` prints the link instead.
|
|
@@ -44,7 +49,7 @@ servers and `credentials.json` (mode 0600) the keys and sessions.
|
|
|
44
49
|
scopes limit it; with none it acts with your full access:
|
|
45
50
|
|
|
46
51
|
```bash
|
|
47
|
-
pacific
|
|
52
|
+
pacific login --scope documents:write --scope tools:read
|
|
48
53
|
```
|
|
49
54
|
|
|
50
55
|
The server refuses a scope it does not define before you sign in. A server
|
|
@@ -54,23 +59,45 @@ servers and `credentials.json` (mode 0600) the keys and sessions.
|
|
|
54
59
|
and says to use a key.
|
|
55
60
|
|
|
56
61
|
```bash
|
|
57
|
-
pacific
|
|
62
|
+
pacific whoami # who the server says you are, your scopes
|
|
58
63
|
# (asks with documents:read)
|
|
59
64
|
curl -H "Authorization: Bearer $(pacific auth token)" "$URL/public/v1/documents"
|
|
60
|
-
pacific
|
|
65
|
+
pacific logout # revokes the browser sessions (API and MCP)
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
## Trying it, and the sample documents
|
|
69
|
+
|
|
70
|
+
`pacific try` is the quickstart in one command: it copies the sample documents
|
|
71
|
+
into `./pacific-samples` (or `try DIR`), uploads them and waits until they are
|
|
72
|
+
searchable, searches them, and prints what to do next. It is safe to rerun:
|
|
73
|
+
samples already on disk are reused, and ones already uploaded (same name, no
|
|
74
|
+
labels) are skipped, so a rerun only searches again. Only hits in the samples
|
|
75
|
+
are shown; when there are none yet, it prints the search to retry once
|
|
76
|
+
indexing catches up.
|
|
77
|
+
|
|
78
|
+
The CLI ships the sample documents docs.pacific.app uses, so the quickstart
|
|
79
|
+
needs no files of your own. No sign-in is needed to copy them.
|
|
80
|
+
|
|
81
|
+
```bash
|
|
82
|
+
pacific samples list # each file and what it is
|
|
83
|
+
pacific samples copy # into ./pacific-samples (or: copy DIR)
|
|
84
|
+
pacific upload pacific-samples/*.pdf --wait
|
|
61
85
|
```
|
|
62
86
|
|
|
87
|
+
`copy` refuses before writing anything when a sample file is already there;
|
|
88
|
+
`--overwrite` replaces it.
|
|
89
|
+
|
|
63
90
|
## Uploading with policy metadata
|
|
64
91
|
|
|
65
92
|
```bash
|
|
66
|
-
pacific
|
|
93
|
+
pacific upload deck.pdf memo.docx \
|
|
67
94
|
-l board -l refcode:r100 \
|
|
68
95
|
-a deal_stage=diligence -a region=emea -a region=us \
|
|
69
96
|
--wait # until each is searchable; prints its id
|
|
70
|
-
pacific
|
|
71
|
-
pacific
|
|
72
|
-
pacific
|
|
73
|
-
pacific
|
|
97
|
+
pacific upload *.pdf -l demo --skip-existing --wait # safe to rerun
|
|
98
|
+
pacific ls # oldest 50, with their labels
|
|
99
|
+
pacific ls --limit 200 # or --all, printed a page at a time
|
|
100
|
+
pacific job JOB_ID
|
|
74
101
|
```
|
|
75
102
|
|
|
76
103
|
`--skip-existing` reads the documents you can read once, skips a file already
|
|
@@ -89,9 +116,9 @@ file goes to `/ingest`; more go to `/ingest/bulk` in batches of
|
|
|
89
116
|
```bash
|
|
90
117
|
pacific policy apply -f board-readers.yaml --dry-run # the server's verdict, nothing written
|
|
91
118
|
pacific policy apply -f board-readers.yaml # create, or write the next version
|
|
92
|
-
pacific policy
|
|
119
|
+
pacific policy ls # --kind agents|services|resource-sets
|
|
93
120
|
pacific policy get board-readers > board-readers.json # edit, then apply it back
|
|
94
|
-
pacific
|
|
121
|
+
pacific principals user --query alice
|
|
95
122
|
pacific policy attach board-readers user alice@acme.com
|
|
96
123
|
pacific policy attach board-readers group "Investment Committee"
|
|
97
124
|
pacific policy attached user alice@acme.com
|
|
@@ -99,10 +126,10 @@ pacific policy detach board-readers user alice@acme.com
|
|
|
99
126
|
pacific policy me
|
|
100
127
|
pacific policy simulate --as alice@acme.com # what she can search now
|
|
101
128
|
pacific policy simulate --as alice@acme.com --candidate restrict.yaml # and after a change
|
|
102
|
-
pacific
|
|
103
|
-
pacific
|
|
104
|
-
pacific
|
|
105
|
-
pacific
|
|
129
|
+
pacific access agent research_bot # each connector's tools, and what the policies answer
|
|
130
|
+
pacific access user alice@acme.com # --json for the server's answer
|
|
131
|
+
pacific activity --agent-id research_bot --outcome blocked # call history, newest first
|
|
132
|
+
pacific activity --user-id alice@acme.com --since 2026-11-25T10:00:00Z
|
|
106
133
|
```
|
|
107
134
|
|
|
108
135
|
`simulate` judges documents for a person without writing anything: a sample of
|
|
@@ -129,33 +156,107 @@ and the agents they may act as; an administrator about anyone. When the
|
|
|
129
156
|
organization does not enforce tool-call policies yet, it says so and each
|
|
130
157
|
decision is what the policies would answer.
|
|
131
158
|
|
|
132
|
-
`
|
|
159
|
+
`activity` prints the organization's recent tool calls and API calls, newest
|
|
133
160
|
first, one per line: when, how it ended, who, what was called, and what decided
|
|
134
161
|
it. Filter with `--agent-id`, `--user-id` (an id or an email), `--tool`,
|
|
135
162
|
`--outcome` and `--since`; `--internal-tools hidden` leaves out the tools
|
|
136
163
|
Pacific's own AI uses to run itself. A page with more after it prints the
|
|
137
164
|
cursor to pass back with `--cursor`. `--json` prints the server's reply.
|
|
138
165
|
|
|
166
|
+
## Schemas
|
|
167
|
+
|
|
168
|
+
An entity schema is a type Pacific extracts from your documents (a company, a
|
|
169
|
+
fund, a loan) and the attributes to read for it. Write one as a file:
|
|
170
|
+
|
|
171
|
+
```yaml
|
|
172
|
+
# company.yaml
|
|
173
|
+
entity_type: Company
|
|
174
|
+
description: A company we lend to or invest in
|
|
175
|
+
attributes:
|
|
176
|
+
- display_name: Net Leverage
|
|
177
|
+
description: Net debt divided by EBITDA, as a multiple
|
|
178
|
+
value_type: multiple
|
|
179
|
+
- display_name: Sector
|
|
180
|
+
description: The industry the company operates in
|
|
181
|
+
value_type: text
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
```bash
|
|
185
|
+
pacific schemas apply -f company.yaml # create Company, or edit it if it exists
|
|
186
|
+
pacific schemas list
|
|
187
|
+
pacific schemas get Company # an id or the entity type's name
|
|
188
|
+
pacific schemas get Company --draft # an attribute edit no FindAll has run yet
|
|
189
|
+
pacific schemas history Company # every saved edit, newest first
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
`apply` creates the type when no schema has that `entity_type`, and otherwise
|
|
193
|
+
replaces its description and attributes with the file's. An attribute keeps its
|
|
194
|
+
id, and the values already extracted for it, by keeping its `display_name` (in
|
|
195
|
+
any case); an attribute the file leaves out is removed, and the server refuses
|
|
196
|
+
to remove one a monitor watches. A write starts no extraction: a new type is
|
|
197
|
+
inert, and an attribute edit is a draft until a FindAll runs it. A description
|
|
198
|
+
edit applies at once. There is no delete; remove a type in the schema editor.
|
|
199
|
+
`value_type` is one of the editor's types (`text`, `number`, `multiple`,
|
|
200
|
+
`currency`, `percentage`, `date`, `year`, `list`, ...); the server validates the
|
|
201
|
+
file. A condition's unit must fit it: "exceeds 6x" needs a `multiple`.
|
|
202
|
+
|
|
203
|
+
Reading needs `entities:read` and writing `entities:write`. A full-access
|
|
204
|
+
browser sign-in holds both. Every command takes `--json` for the server's reply.
|
|
205
|
+
|
|
206
|
+
## Monitors
|
|
207
|
+
|
|
208
|
+
A monitor watches an entity type's extracted values for a condition you write
|
|
209
|
+
in plain language, and emails its subscribers when a document makes it true.
|
|
210
|
+
|
|
211
|
+
```bash
|
|
212
|
+
pacific monitors preview "Alert when a company's net leverage exceeds 6x" # nothing is stored
|
|
213
|
+
pacific monitors create "Alert when a company's net leverage exceeds 6x" \
|
|
214
|
+
--name "Leverage over 6x" --subscriber analyst@example.com --severity HIGH
|
|
215
|
+
pacific monitors list
|
|
216
|
+
pacific monitors get MONITOR_ID
|
|
217
|
+
pacific monitors events MONITOR_ID --since 2026-12-01 # the times it fired, newest first
|
|
218
|
+
pacific monitors subscribe MONITOR_ID --subscriber pm@example.com
|
|
219
|
+
pacific monitors delete MONITOR_ID
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
The server compiles the condition into typed conditions on an entity type, and
|
|
223
|
+
adds an attribute to the type when the condition names one it lacks; `preview`
|
|
224
|
+
shows the type, conditions and attributes a create would use, without writing.
|
|
225
|
+
To pin what it chose, pass the preview's ids to `create` with
|
|
226
|
+
`--entity-schema-id` and `--entity-id`, or watch a FindAll's entities with
|
|
227
|
+
`--findall-id`. `--disabled` creates it switched off.
|
|
228
|
+
|
|
229
|
+
Reading needs `monitors:read`, and `preview` needs `entities:read` as well,
|
|
230
|
+
because it reads the entity types and entities a create would use. `create` and
|
|
231
|
+
`delete` need `monitors:write` and `entities:write`, because a monitor can add an
|
|
232
|
+
attribute to its type; `subscribe` needs `monitors:write`. Each write scope
|
|
233
|
+
includes its read, so this covers every monitor command:
|
|
234
|
+
|
|
235
|
+
```bash
|
|
236
|
+
pacific login --scope monitors:write --scope entities:write
|
|
237
|
+
pacific keys create -s monitors:write -s entities:write --name "demo" --expires 7d
|
|
238
|
+
```
|
|
239
|
+
|
|
139
240
|
## Searching, and acting as an agent
|
|
140
241
|
|
|
141
242
|
```bash
|
|
142
243
|
pacific search "board deck budget" # as you
|
|
143
|
-
pacific
|
|
244
|
+
pacific login --mcp # once: sign in to the MCP endpoint
|
|
144
245
|
pacific agents list # who you may act as
|
|
145
|
-
pacific search "board deck budget" --as
|
|
146
|
-
pacific search "board deck budget" --as
|
|
246
|
+
pacific search "board deck budget" --as demo_reader
|
|
247
|
+
pacific search "board deck budget" --as demo_reader --json # files, best first
|
|
147
248
|
```
|
|
148
249
|
|
|
149
250
|
As you, `search` calls the public API's `/search/content` with the profile's
|
|
150
251
|
key or browser session. As an agent, it calls the same search as the MCP tool
|
|
151
252
|
`search_content`, through a separate sign-in to the profile's MCP endpoint
|
|
152
|
-
(`--mcp-url`; `https://mcp.pacific.app`
|
|
253
|
+
(`--mcp-url`; the built-in `prod` profile has `https://mcp.pacific.app`), and the agent's
|
|
153
254
|
rules decide what it finds. Approving that sign-in accepts the server's MCP
|
|
154
255
|
terms of service, as connecting any MCP client does.
|
|
155
256
|
|
|
156
257
|
A person's session acts as an agent one call at a time: each call names the
|
|
157
258
|
agent in `pacific__acting_as`, and a call that names none runs as you. The CLI
|
|
158
|
-
adds it to every call it makes with `--as
|
|
259
|
+
adds it to every call it makes with `--as`, so none can leave it out.
|
|
159
260
|
The first search as an agent (and the first after an approval lapses) prints
|
|
160
261
|
an approval link and opens it; the CLI waits until you approve, up to
|
|
161
262
|
`$PACIFIC_CLI_AGENT_APPROVAL_TIMEOUT` (ten minutes), then runs the search.
|
|
@@ -192,7 +293,7 @@ refuses agent keys. Listing needs `admin:read`, and creating and removing
|
|
|
192
293
|
holds both; a key or a scoped sign-in holds them only if it named them:
|
|
193
294
|
|
|
194
295
|
```bash
|
|
195
|
-
pacific
|
|
296
|
+
pacific login --scope admin:write --scope tools:write
|
|
196
297
|
pacific keys create -s admin:write -s tools:write --name "policy tests" --expires 7d
|
|
197
298
|
```
|
|
198
299
|
|
|
@@ -200,7 +301,7 @@ pacific keys create -s admin:write -s tools:write --name "policy tests" --expire
|
|
|
200
301
|
|
|
201
302
|
```bash
|
|
202
303
|
pacific keys create -s documents:write -s tools:read --name "CI deploy" --expires 90d
|
|
203
|
-
pacific keys
|
|
304
|
+
pacific keys ls # without their values
|
|
204
305
|
pacific keys revoke api_key_...
|
|
205
306
|
```
|
|
206
307
|
|
|
@@ -221,9 +322,23 @@ asking for `keys:manage` alone, makes the request, and revokes that sign-in.
|
|
|
221
322
|
To keep a session that may list and revoke without signing in each time:
|
|
222
323
|
|
|
223
324
|
```bash
|
|
224
|
-
pacific
|
|
325
|
+
pacific login --scope keys:manage
|
|
225
326
|
```
|
|
226
327
|
|
|
328
|
+
## Old command names
|
|
329
|
+
|
|
330
|
+
Commands renamed to short top-level verbs keep their old names as hidden
|
|
331
|
+
aliases: they run the same command but are left out of `--help`.
|
|
332
|
+
|
|
333
|
+
| Old | New |
|
|
334
|
+
|---|---|
|
|
335
|
+
| `auth login`, `auth logout`, `auth status` | `login`, `logout`, `whoami` |
|
|
336
|
+
| `documents upload`, `documents list`, `documents job` | `upload`, `ls`, `job` |
|
|
337
|
+
| `policy access`, `policy calls`, `policy principals` | `access`, `activity`, `principals` |
|
|
338
|
+
| `policy list`, `policy delete` | `policy ls`, `policy rm` |
|
|
339
|
+
| `keys list`, `profile list`, `profile remove` | `keys ls`, `profile ls`, `profile rm` |
|
|
340
|
+
| `search --as-agent` | `search --as` |
|
|
341
|
+
|
|
227
342
|
## Developing
|
|
228
343
|
|
|
229
344
|
```bash
|
|
@@ -47,10 +47,10 @@ output is the same every time.
|
|
|
47
47
|
demo-access` and its version history show the change.
|
|
48
48
|
|
|
49
49
|
Each PDF is uploaded with two labels, `agent-demo` and its category, because
|
|
50
|
-
labels are what `pacific
|
|
50
|
+
labels are what `pacific ls` shows and what the policy matches.
|
|
51
51
|
The agent file holds the placeholder `{{ADMIN}}` where the admin's Pacific
|
|
52
52
|
user id goes; the server takes a user id there, not an email. `demo.sh`
|
|
53
|
-
replaces it with the id `pacific
|
|
53
|
+
replaces it with the id `pacific whoami` prints.
|
|
54
54
|
|
|
55
55
|
## Before you start
|
|
56
56
|
|
|
@@ -64,8 +64,8 @@ replaces it with the id `pacific auth status` prints.
|
|
|
64
64
|
|
|
65
65
|
```bash
|
|
66
66
|
pacific profile add demo --base-url https://api.pacific.app --mcp-url https://mcp.pacific.app --use
|
|
67
|
-
pacific
|
|
68
|
-
pacific
|
|
67
|
+
pacific login # uploads and policy: the API
|
|
68
|
+
pacific login --mcp # acting as the agent: MCP
|
|
69
69
|
```
|
|
70
70
|
|
|
71
71
|
## The shared steps
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
#
|
|
9
9
|
# {{ADMIN}} stands for that admin's Pacific user id (a UUID), which the server
|
|
10
10
|
# requires here: `prn:user:<email>` is refused as unresolved. demo.sh replaces
|
|
11
|
-
# every {{ADMIN}} with the id `pacific
|
|
11
|
+
# every {{ADMIN}} with the id `pacific whoami` prints as `user` before it
|
|
12
12
|
# applies this file. Creating an agent accepts the Pacific MCP terms, so it is
|
|
13
13
|
# applied with --accept-mcp-terms.
|
|
14
14
|
api_version: policy.pacific.app/v1alpha1
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
#
|
|
3
3
|
# Every demo path reads this file. Each document is uploaded with its labels:
|
|
4
4
|
# `agent-demo` on all of them, and its category, `general` or `restricted`.
|
|
5
|
-
# Labels are what `pacific
|
|
5
|
+
# Labels are what `pacific ls` shows and what the demo-access
|
|
6
6
|
# policy matches (policies/). Each document holds one fact no other document
|
|
7
7
|
# mentions: `question` asks for it, `answer` is what a correct reply says, and
|
|
8
8
|
# every string in `answer_keywords` must appear in that reply (compared
|
|
@@ -4,7 +4,7 @@ Each path uploads what ``manifest.yaml`` lists, asks its questions, and scores
|
|
|
4
4
|
an answer by its keywords. That only works if each keyword is in its own PDF
|
|
5
5
|
and in no other, so a correct answer can only have come from the document the
|
|
6
6
|
agent was allowed to read. A document's category is a label, so
|
|
7
|
-
``pacific
|
|
7
|
+
``pacific ls`` shows it and the demo-access policy can match it;
|
|
8
8
|
the policy's edit must narrow it to the ``general`` category and nothing else.
|
|
9
9
|
"""
|
|
10
10
|
|