@revfleet/hscli 0.9.8 → 0.11.0
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/CHANGELOG.md +132 -0
- package/README.md +142 -13
- package/SECURITY.md +14 -3
- package/dist/cli.js +3 -3
- package/dist/cli.js.map +1 -1
- package/dist/cloud/cloud-run-caller-contract.d.ts +28 -0
- package/dist/cloud/cloud-run-caller-contract.js +35 -0
- package/dist/cloud/cloud-run-caller-contract.js.map +1 -0
- package/dist/cloud/main.d.ts +1 -0
- package/dist/cloud/main.js +15 -0
- package/dist/cloud/main.js.map +1 -0
- package/dist/cloud/server.d.ts +5 -0
- package/dist/cloud/server.js +133 -0
- package/dist/cloud/server.js.map +1 -0
- package/dist/commands/agent/access-baseline.d.ts +47 -0
- package/dist/commands/agent/access-baseline.js +238 -0
- package/dist/commands/agent/access-baseline.js.map +1 -0
- package/dist/commands/agent/index.js +99 -11
- package/dist/commands/agent/index.js.map +1 -1
- package/dist/commands/agent/recipes.d.ts +7 -1
- package/dist/commands/agent/recipes.js +57 -1
- package/dist/commands/agent/recipes.js.map +1 -1
- package/dist/commands/agent/reporting-joinability.d.ts +129 -0
- package/dist/commands/agent/reporting-joinability.js +412 -0
- package/dist/commands/agent/reporting-joinability.js.map +1 -0
- package/dist/commands/agent/runner.d.ts +1 -0
- package/dist/commands/agent/runner.js +181 -27
- package/dist/commands/agent/runner.js.map +1 -1
- package/dist/commands/audit/index.js +2 -1
- package/dist/commands/audit/index.js.map +1 -1
- package/dist/commands/auth/index.d.ts +6 -2
- package/dist/commands/auth/index.js +172 -57
- package/dist/commands/auth/index.js.map +1 -1
- package/dist/commands/backup/index.js +6 -8
- package/dist/commands/backup/index.js.map +1 -1
- package/dist/commands/crm/describe.js +3 -3
- package/dist/commands/crm/describe.js.map +1 -1
- package/dist/commands/crm/index.js +2 -0
- package/dist/commands/crm/index.js.map +1 -1
- package/dist/commands/crm/record-layouts.d.ts +3 -0
- package/dist/commands/crm/record-layouts.js +246 -0
- package/dist/commands/crm/record-layouts.js.map +1 -0
- package/dist/commands/crm/shared.d.ts +1 -0
- package/dist/commands/crm/shared.js +7 -3
- package/dist/commands/crm/shared.js.map +1 -1
- package/dist/commands/crm/sync.js +170 -27
- package/dist/commands/crm/sync.js.map +1 -1
- package/dist/commands/doctor/index.js +5 -5
- package/dist/commands/doctor/index.js.map +1 -1
- package/dist/commands/internal/index.js +20 -6
- package/dist/commands/internal/index.js.map +1 -1
- package/dist/commands/internal-session.d.ts +4 -0
- package/dist/commands/internal-session.js +27 -0
- package/dist/commands/internal-session.js.map +1 -1
- package/dist/commands/lists/index.js +18 -0
- package/dist/commands/lists/index.js.map +1 -1
- package/dist/commands/marketing/index.js +5 -5
- package/dist/commands/marketing/index.js.map +1 -1
- package/dist/commands/mcp.d.ts +2 -1
- package/dist/commands/mcp.js +49 -5
- package/dist/commands/mcp.js.map +1 -1
- package/dist/commands/sales/index.js +2 -0
- package/dist/commands/sales/index.js.map +1 -1
- package/dist/commands/sales/views.d.ts +3 -0
- package/dist/commands/sales/views.js +263 -0
- package/dist/commands/sales/views.js.map +1 -0
- package/dist/commands/settings/index.js +20 -0
- package/dist/commands/settings/index.js.map +1 -1
- package/dist/commands/trace/index.js +11 -4
- package/dist/commands/trace/index.js.map +1 -1
- package/dist/commands/workflows/index.js +2 -0
- package/dist/commands/workflows/index.js.map +1 -1
- package/dist/commands/workflows/internal.d.ts +3 -0
- package/dist/commands/workflows/internal.js +332 -0
- package/dist/commands/workflows/internal.js.map +1 -0
- package/dist/core/auth.d.ts +18 -2
- package/dist/core/auth.js +96 -3
- package/dist/core/auth.js.map +1 -1
- package/dist/core/bounded-response.d.ts +2 -0
- package/dist/core/bounded-response.js +37 -0
- package/dist/core/bounded-response.js.map +1 -0
- package/dist/core/capabilities.d.ts +8 -0
- package/dist/core/capabilities.js +31 -3
- package/dist/core/capabilities.js.map +1 -1
- package/dist/core/http.d.ts +16 -0
- package/dist/core/http.js +151 -35
- package/dist/core/http.js.map +1 -1
- package/dist/core/output.js +20 -4
- package/dist/core/output.js.map +1 -1
- package/dist/core/permissions.js +15 -1
- package/dist/core/permissions.js.map +1 -1
- package/dist/core/policy.js +8 -0
- package/dist/core/policy.js.map +1 -1
- package/dist/core/request-path.d.ts +13 -0
- package/dist/core/request-path.js +90 -0
- package/dist/core/request-path.js.map +1 -0
- package/dist/core/schema-cache.js +6 -2
- package/dist/core/schema-cache.js.map +1 -1
- package/dist/core/vault.js +10 -5
- package/dist/core/vault.js.map +1 -1
- package/dist/core/version.d.ts +1 -0
- package/dist/core/version.js +3 -0
- package/dist/core/version.js.map +1 -0
- package/dist/mcp/compat-hubspot.d.ts +5 -14
- package/dist/mcp/compat-hubspot.js +19 -16
- package/dist/mcp/compat-hubspot.js.map +1 -1
- package/dist/mcp/diagnostics.d.ts +157 -0
- package/dist/mcp/diagnostics.js +200 -0
- package/dist/mcp/diagnostics.js.map +1 -0
- package/dist/mcp/ecosystem.d.ts +107 -0
- package/dist/mcp/ecosystem.js +127 -0
- package/dist/mcp/ecosystem.js.map +1 -0
- package/dist/mcp/ext-tools.d.ts +4 -3
- package/dist/mcp/ext-tools.js +20 -8
- package/dist/mcp/ext-tools.js.map +1 -1
- package/dist/mcp/profiles.d.ts +9 -0
- package/dist/mcp/profiles.js +38 -4
- package/dist/mcp/profiles.js.map +1 -1
- package/dist/mcp/server.d.ts +118 -1
- package/dist/mcp/server.js +67 -10
- package/dist/mcp/server.js.map +1 -1
- package/docs/CAPABILITY_LIBRARY.md +7 -1
- package/docs/CLOUD_RUN.md +188 -0
- package/docs/COMMAND_TREE.md +20 -6
- package/docs/COMPARISON.md +14 -6
- package/docs/COOKBOOK.md +46 -2
- package/docs/INTERNAL-ENDPOINTS-DISCOVERY.md +59 -0
- package/docs/INTERNAL-ENDPOINTS.md +13 -0
- package/docs/INTERNAL_ENDPOINTS.md +23 -5
- package/docs/MCP.md +48 -6
- package/docs/MCP_TOOL_CATALOG.md +188 -186
- package/docs/OPERATIONAL_PLAYBOOKS.md +9 -8
- package/docs/PORTAL_BACKUP.md +26 -2
- package/docs/RELEASE_GOVERNANCE.md +7 -0
- package/docs/SAFETY_MODEL.md +23 -4
- package/docs/TUTORIALS/secure-agent-writes.md +3 -2
- package/docs/VALIDATION_BOUNDARIES.md +101 -0
- package/docs/policy-templates/compliance-strict.json +7 -0
- package/examples/cloud-run-mcp-caller.mjs +71 -0
- package/package.json +11 -8
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,137 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.11.0 - 2026-09-11
|
|
4
|
+
|
|
5
|
+
0.11.0 adds bounded, evidence-first operator contracts and a separate
|
|
6
|
+
hosted MCP service surface. Existing CLI commands and JSON envelopes
|
|
7
|
+
remain compatible.
|
|
8
|
+
|
|
9
|
+
### Added
|
|
10
|
+
|
|
11
|
+
- Added `hscli agent access-baseline`, a read-only, aggregate-only decision
|
|
12
|
+
matrix over the existing capability families. It requires explicit
|
|
13
|
+
read-only confirmation and does not schedule, score, submit or write.
|
|
14
|
+
- Added `hscli agent reporting-joinability`, an independent, aggregate-only
|
|
15
|
+
contract for a narrow sequence → meeting → deal evidence chain. It does not
|
|
16
|
+
audit HubSpot's native report/dashboard UI, and report inventory/attribution
|
|
17
|
+
correctness remains unavailable rather than inferred.
|
|
18
|
+
- Added guarded internal sales contacts-view discovery with its documented
|
|
19
|
+
internal-session boundary; it is not exposed as a generic browser transport.
|
|
20
|
+
|
|
21
|
+
### Hosted MCP surface
|
|
22
|
+
|
|
23
|
+
- Added a separate IAM-protected Streamable HTTP MCP surface with exactly
|
|
24
|
+
`hscli_service_info`, `crm_properties_list` and `crm_pipelines_list`. It is
|
|
25
|
+
not the local stdio catalog and does not expose a generic HubSpot transport.
|
|
26
|
+
|
|
27
|
+
### Fixed
|
|
28
|
+
|
|
29
|
+
- Fixed slow piped-token input so a valid token arriving after an initial stdin
|
|
30
|
+
EAGAIN condition is awaited rather than rejected.
|
|
31
|
+
- Updated the hosted MCP version metadata to use the package-derived hscli
|
|
32
|
+
version, consistently with CLI and stdio MCP metadata.
|
|
33
|
+
- Replaced a workstation-specific `gcloud` default with PATH or explicit-command
|
|
34
|
+
discovery. The release helper now has a no-submit `-Plan` mode, build-only
|
|
35
|
+
default, explicit no-traffic candidate, and explicit promotion/rollback
|
|
36
|
+
revision actions.
|
|
37
|
+
- Unified local CI, tag-release CI, Cloud Build and npm's prepublish lifecycle
|
|
38
|
+
on the documented strict release gate, including
|
|
39
|
+
`npm audit --audit-level=low`.
|
|
40
|
+
|
|
41
|
+
### Security and compatibility
|
|
42
|
+
|
|
43
|
+
- Refreshed dependency and local-safety hardening after the 0.10.0 tag.
|
|
44
|
+
- The hosted MCP is IAM-gated, GET-only, request-bounded,
|
|
45
|
+
credential-redacting, redirect-rejecting, no-retry and browser-Origin
|
|
46
|
+
rejecting. Its caller supplies a fresh, backend-authorized portal context per
|
|
47
|
+
request; it does not persist a user's credential.
|
|
48
|
+
- Existing CLI commands and JSON envelopes are unchanged. The hosted MCP
|
|
49
|
+
service is a separate optional surface, not a replacement for stdio MCP or
|
|
50
|
+
the CLI.
|
|
51
|
+
|
|
52
|
+
## 0.10.0 - 2026-07-31
|
|
53
|
+
|
|
54
|
+
### Added
|
|
55
|
+
|
|
56
|
+
- Added `hscli mcp setup`, `mcp matrix`, and `mcp doctor --all` for a
|
|
57
|
+
secret-free, plan-only three-server journey across HubSpot Remote MCP,
|
|
58
|
+
HubSpot Developer MCP, and hscli's operator MCP.
|
|
59
|
+
- Added object-level MCP output schemas to the documented 11-tool HubSpot
|
|
60
|
+
name-compatible subset.
|
|
61
|
+
|
|
62
|
+
- Added dedicated browser-session operator reads for workflow current state,
|
|
63
|
+
full revision history, rolling canvas errors, CRM record layouts/cards, and
|
|
64
|
+
complete internal list filter trees. Every result reports its source and
|
|
65
|
+
completeness instead of presenting internal evidence as public-API truth.
|
|
66
|
+
- Added `settings users seat-history <userId>` to read the public app-user CRM
|
|
67
|
+
object (`0-115`) with `hs_assigned_seats` property history.
|
|
68
|
+
- Added a guarded, CLI-only `crm record-layouts update-card` command. It changes
|
|
69
|
+
only the ordered `configuration.propertyNames` list after reading the live
|
|
70
|
+
card, then snapshots, performs one non-retried full-card PUT, and verifies the
|
|
71
|
+
saved order under the same portal/ticket/action-contract gates as workflow
|
|
72
|
+
replacement.
|
|
73
|
+
- Added an experimental, CLI-only `workflows update-internal` adapter for
|
|
74
|
+
`POST /api/automationplatform/v1/hybrid/batch`. It is plan-only by default
|
|
75
|
+
and requires a disabled single flow, same-session portal proof, validation,
|
|
76
|
+
a private rollback snapshot, `version = live + 1`, no-retry transport,
|
|
77
|
+
post-save current/revision verification, `--force`, change ticket, sealed
|
|
78
|
+
action contract, explicit experimental opt-in, and an ID-bound high-risk
|
|
79
|
+
acknowledgement.
|
|
80
|
+
|
|
81
|
+
- Added `hscli mcp manifest` and `hscli mcp doctor` plus equivalent local MCP
|
|
82
|
+
tools. They report the packaged server version, protocol/transport support,
|
|
83
|
+
tool-surface coverage, profile isolation, portal pinning, policy, and cached
|
|
84
|
+
capability state without returning credentials.
|
|
85
|
+
- Added stable MCP output schemas for the manifest and doctor results, plus a
|
|
86
|
+
real client/server transport contract test.
|
|
87
|
+
- Added explicit `private-app`, `service-key`, and `personal-access-key` login
|
|
88
|
+
modes. Credential type is never guessed from a token prefix.
|
|
89
|
+
- Personal Access Keys are exchanged through HubSpot local development auth,
|
|
90
|
+
refreshed five minutes before expiry, and pinned to the stored portal ID.
|
|
91
|
+
- `auth whoami` now reports Service Key profiles as REST-only and shows whether
|
|
92
|
+
a refreshable credential is configured without exposing it.
|
|
93
|
+
|
|
94
|
+
### Security
|
|
95
|
+
|
|
96
|
+
- MCP live writes now require an operator-controlled server startup gate
|
|
97
|
+
(`--allow-writes`) in addition to tool-level `force: true`. Servers lock to
|
|
98
|
+
the startup profile unless `--allow-cross-profile` is explicitly selected.
|
|
99
|
+
- Corrected read-only safety metadata for statistics, submission, membership,
|
|
100
|
+
signed-URL, enrollment-list, import-error, and local module-compose tools.
|
|
101
|
+
|
|
102
|
+
### Fixed
|
|
103
|
+
|
|
104
|
+
- Replaced the known-404 marketing email statistics route with the working
|
|
105
|
+
aggregate campaign endpoint for both CLI and MCP.
|
|
106
|
+
- Replaced outdated “drop-in 1:1” Remote MCP claims with the precise
|
|
107
|
+
name-compatible-subset contract and its authentication/transport caveats.
|
|
108
|
+
|
|
109
|
+
- Internal captures and workflow snapshots now enforce owner-only `0700`
|
|
110
|
+
directories and `0600` files.
|
|
111
|
+
- The generic read-only internal capture catalogue explicitly rejects
|
|
112
|
+
`/api/automationplatform/v1/hybrid/batch`, even if an endpoint is incorrectly
|
|
113
|
+
labeled as a read-like POST. The internal workflow write is not exposed to
|
|
114
|
+
MCP.
|
|
115
|
+
- Added per-request `retryMode: "never"` so non-idempotent internal operations
|
|
116
|
+
cannot be replayed automatically after 429, 5xx, timeout, or network errors;
|
|
117
|
+
ambiguous outcomes require reconciliation against fresh server state.
|
|
118
|
+
|
|
119
|
+
- Every MCP tool now publishes conservative `readOnly`, `destructive`,
|
|
120
|
+
`idempotent`, and `openWorld` annotations. Mixed-operation and unknown tools
|
|
121
|
+
fail closed as write/destructive; unenrollment, raw API, and compatibility
|
|
122
|
+
management tools can no longer be mislabeled as reads.
|
|
123
|
+
- Personal Access Keys, Service Keys, and generic credential fields are now
|
|
124
|
+
included in structured output and error redaction.
|
|
125
|
+
- Added regression coverage for concurrent PAK refresh, portal mismatch refusal,
|
|
126
|
+
static Service Key handling, input conflicts, and secret-free CLI output.
|
|
127
|
+
- Auth vault writes now enforce owner-only `0600` permissions, including after
|
|
128
|
+
encrypt/decrypt transitions. Failed identity verification cannot overwrite an
|
|
129
|
+
existing profile, and explicit verification bypasses do not inherit stale
|
|
130
|
+
portal metadata. Profiles created with that bypass are blocked from writes
|
|
131
|
+
until portal identity is verified. Credential replacement and refresh now
|
|
132
|
+
preserve the same portal pin across static keys, Personal Access Keys, and
|
|
133
|
+
OAuth profiles.
|
|
134
|
+
|
|
3
135
|
## 0.9.8 - 2026-07-14
|
|
4
136
|
|
|
5
137
|
### Changed
|
package/README.md
CHANGED
|
@@ -52,15 +52,45 @@ Running `hscli` with no command opens the guided operator home. It shows the
|
|
|
52
52
|
active portal, safety posture, the latest baseline, and one recommended next
|
|
53
53
|
step. Use `hscli --help` when you want the full command reference.
|
|
54
54
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
55
|
+
hscli supports four explicit credential models. `auth login` handles the first
|
|
56
|
+
three; OAuth uses the dedicated `oauth-exchange` flow:
|
|
57
|
+
|
|
58
|
+
- `private-app` (default): legacy portal-scoped Private App token.
|
|
59
|
+
- `service-key`: account-level, scoped REST credential for system-to-system
|
|
60
|
+
operations. It is used directly as Bearer auth and is reported as REST-only.
|
|
61
|
+
- `personal-access-key`: user-and-account-specific local-development key. hscli
|
|
62
|
+
exchanges it for a short-lived access token and refreshes it five minutes
|
|
63
|
+
before expiry.
|
|
64
|
+
- `oauth`: developer-app installation managed by `oauth-exchange` and automatic
|
|
65
|
+
refresh.
|
|
66
|
+
|
|
67
|
+
Credential type is never inferred from a `pat-*` prefix because Service Keys and
|
|
68
|
+
Private App tokens can look alike. In an interactive terminal, `auth login`
|
|
69
|
+
opens a hidden terminal prompt, so the credential never appears in shell history or
|
|
70
|
+
terminal output:
|
|
58
71
|
|
|
59
72
|
```bash
|
|
60
|
-
|
|
73
|
+
hscli auth login --auth-type private-app --profile client-readonly
|
|
74
|
+
hscli auth login --auth-type service-key --profile automation
|
|
75
|
+
hscli auth login --auth-type personal-access-key --portal-id 123456 --profile local-dev
|
|
76
|
+
hscli --profile local-dev auth whoami
|
|
61
77
|
```
|
|
62
78
|
|
|
63
|
-
|
|
79
|
+
In CI or a non-interactive shell, pass the selected credential through stdin:
|
|
80
|
+
|
|
81
|
+
```bash
|
|
82
|
+
printf '%s' "$HUBSPOT_SERVICE_KEY" | hscli auth login \
|
|
83
|
+
--auth-type service-key --profile automation --token-stdin
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
Profiles are stored owner-only under `~/.revfleet` (`0700` directory, `0600`
|
|
87
|
+
file) and can be encrypted with `hscli auth encrypt`. A PAK profile stores the
|
|
88
|
+
PAK because it is required to mint replacement access tokens; encrypt the vault
|
|
89
|
+
on shared or higher-risk workstations.
|
|
90
|
+
|
|
91
|
+
`--no-verify` is an explicit bootstrap escape hatch for static credentials. The
|
|
92
|
+
resulting profile can read, but hscli blocks writes until a normal verified
|
|
93
|
+
login records the portal identity.
|
|
64
94
|
|
|
65
95
|
For EU/AP/NA hublet routing, hscli auto-detects from token/account metadata. You can also pin it explicitly:
|
|
66
96
|
|
|
@@ -180,6 +210,24 @@ instead of open-ended portal access:
|
|
|
180
210
|
```bash
|
|
181
211
|
hscli agent list
|
|
182
212
|
hscli agent plan portal-baseline --json
|
|
213
|
+
# This command has no HubSpot network activity.
|
|
214
|
+
hscli --profile client-readonly agent plan access-baseline --json
|
|
215
|
+
|
|
216
|
+
# Review the exact public endpoint reads, then acknowledge them explicitly.
|
|
217
|
+
hscli --profile client-readonly agent run access-baseline \
|
|
218
|
+
--confirm-read-only \
|
|
219
|
+
--output ./evidence/access-baseline
|
|
220
|
+
|
|
221
|
+
# Re-render the local status matrix without calling HubSpot or RevFleet.
|
|
222
|
+
hscli agent access-baseline report ./evidence/access-baseline
|
|
223
|
+
|
|
224
|
+
# Plan a separate, aggregate-only reporting joinability re-check. The plan is no-network.
|
|
225
|
+
hscli agent plan reporting-joinability
|
|
226
|
+
hscli --profile client-readonly agent run reporting-joinability \
|
|
227
|
+
--confirm-read-only \
|
|
228
|
+
--output ./evidence/reporting-joinability
|
|
229
|
+
hscli agent reporting-joinability report ./evidence/reporting-joinability
|
|
230
|
+
|
|
183
231
|
hscli agent evidence export ./evidence/portal-baseline --output ./evidence/revfleet-evidence.json
|
|
184
232
|
hscli agent plan automation-risk --json
|
|
185
233
|
hscli --profile sandbox agent run automation-risk --output ./evidence/automation-risk
|
|
@@ -194,9 +242,20 @@ Runbooks are public-API-first, MCP-compatible, schedule-renderable, and
|
|
|
194
242
|
auditable. `agent plan` never calls HubSpot; it prints the exact read/report
|
|
195
243
|
commands. `agent run` executes those argument arrays with `shell:false` and
|
|
196
244
|
writes a manifest, checkpoint, per-step output, request telemetry, and JSONL
|
|
197
|
-
event ledger. `--resume` skips completed steps
|
|
245
|
+
event ledger. `--resume` skips completed steps only when its existing checkpoint
|
|
246
|
+
and manifest share the same run ID and match the recipe, resolved commands,
|
|
247
|
+
profile, policy context, and change-ticket context; it also requires the local
|
|
248
|
+
output files and matching completion events for every reused step. It refuses
|
|
249
|
+
missing or legacy/unlinked provenance before writing evidence, so a new run must
|
|
250
|
+
omit `--resume`. A valid resume preserves the original run ID and start time and
|
|
251
|
+
appends a `run-resumed` ledger event; it never presents reused steps as a fresh
|
|
252
|
+
run. `--continue-on-error` preserves
|
|
198
253
|
partial evidence while finishing the remaining diagnostics.
|
|
199
254
|
|
|
255
|
+
> Access Baseline is unscored, read-only, and local-only. It reports evidence availability for the existing endpoint families; it does not inspect CRM rows, prove a subscription, grant a scope, authorize a write, or submit evidence to RevFleet. It cannot be scheduled.
|
|
256
|
+
|
|
257
|
+
> Reporting Joinability is a separate, unscored, read-only, local-only contract for an operational `sequence → meeting → deal` evidence chain. It makes three status-only public reads for meeting/deal metadata and association definition; the sequence surface remains explicitly `not_probed` because the documented list request requires an identity that this contract never derives, stores, or sends. It does not audit HubSpot native report/dashboard UI, inspect CRM rows or IDs, prove an actual association, schedule itself, expose an MCP tool, submit evidence, or remediate anything. Its report inventory and attribution correctness are unavailable and never inferred.
|
|
258
|
+
|
|
200
259
|
For approved fixes, seal the exact hscli argv in a versioned action contract.
|
|
201
260
|
Contracts are offline-verifiable and bind execution to one profile, portal,
|
|
202
261
|
expiry, and optional change ticket. They never contain tokens or shell text:
|
|
@@ -212,6 +271,58 @@ hscli --json --profile sandbox --force agent contract apply ./action-contract.js
|
|
|
212
271
|
present. Approved operations use argument arrays with `shell:false`, then run
|
|
213
272
|
the contract's read-only verification command.
|
|
214
273
|
|
|
274
|
+
### Internal workflow evidence and guarded replacement
|
|
275
|
+
|
|
276
|
+
Some workflow evidence is available only through an authenticated HubSpot UI
|
|
277
|
+
session. These commands are explicit browser-session adapters; they are not
|
|
278
|
+
generic internal API passthroughs:
|
|
279
|
+
|
|
280
|
+
```bash
|
|
281
|
+
hscli --json workflows inspect 123 \
|
|
282
|
+
--portal-id 456 --cookie-file ./hubspot-session.cookies
|
|
283
|
+
hscli --json workflows revisions 123 \
|
|
284
|
+
--portal-id 456 --cookie-file ./hubspot-session.cookies
|
|
285
|
+
hscli --json workflows errors 123 \
|
|
286
|
+
--portal-id 456 --cookie-file ./hubspot-session.cookies
|
|
287
|
+
hscli --json crm record-layouts get 789 \
|
|
288
|
+
--portal-id 456 --cookie-file ./hubspot-session.cookies
|
|
289
|
+
hscli --json crm record-layouts update-card 789 \
|
|
290
|
+
--portal-id 456 --expected-portal-id 456 \
|
|
291
|
+
--cookie-file ./hubspot-session.cookies \
|
|
292
|
+
--properties firstname,lastname,email
|
|
293
|
+
hscli --json lists inspect-filters 321 \
|
|
294
|
+
--portal-id 456 --cookie-file ./hubspot-session.cookies
|
|
295
|
+
hscli --json settings users seat-history 123
|
|
296
|
+
```
|
|
297
|
+
|
|
298
|
+
`settings users seat-history` is the public-API companion to the internal seat
|
|
299
|
+
inventory. It reads object type `0-115` with history for
|
|
300
|
+
`hs_assigned_seats`, so seat changes remain inspectable without a browser
|
|
301
|
+
cookie.
|
|
302
|
+
|
|
303
|
+
`workflows update-internal` is deliberately harder to invoke. It replaces one
|
|
304
|
+
complete, disabled workflow through HubSpot's undocumented
|
|
305
|
+
`POST /api/automationplatform/v1/hybrid/batch` editor endpoint. The command is
|
|
306
|
+
plan-only unless `--execute` is present, validates the proposal first, derives
|
|
307
|
+
`version = live + 1`, writes a private rollback snapshot, sends exactly one
|
|
308
|
+
non-retried save request, and verifies both current state and revision history.
|
|
309
|
+
Execution additionally requires matching `--portal-id` and
|
|
310
|
+
`--expected-portal-id`, a same-session portal identity proof, global `--force`,
|
|
311
|
+
global `--change-ticket`, `--experimental-internal-write`, the exact
|
|
312
|
+
`--acknowledge "REPLACE WORKFLOW <id>"` phrase, and a sealed action contract.
|
|
313
|
+
|
|
314
|
+
This experimental write is CLI-only. It is intentionally excluded from
|
|
315
|
+
`hscli internal capture` and from MCP tools because HubSpot can change the
|
|
316
|
+
internal contract without notice. Capture and snapshot files are created with
|
|
317
|
+
owner-only permissions (`0700` directories and `0600` files).
|
|
318
|
+
|
|
319
|
+
`crm record-layouts update-card` follows the same plan-first model. It does not
|
|
320
|
+
accept an arbitrary replacement payload: it fetches the live card and changes
|
|
321
|
+
only the complete ordered `configuration.propertyNames` list. Execution
|
|
322
|
+
requires the same ticket, contract, force, portal-proof, experimental opt-in,
|
|
323
|
+
and ID-bound acknowledgement gates; the full merged card is snapshotted,
|
|
324
|
+
written once with retries disabled, and read back for exact order verification.
|
|
325
|
+
|
|
215
326
|
Scope checks are built in:
|
|
216
327
|
|
|
217
328
|
```bash
|
|
@@ -357,10 +468,15 @@ hscli --force --policy-file ./policy.json --change-ticket CHG-123 \
|
|
|
357
468
|
Drop `hscli` into any MCP client — Claude Desktop, Cursor, Claude Code, or your own agent runtime.
|
|
358
469
|
|
|
359
470
|
```bash
|
|
360
|
-
hscli mcp #
|
|
361
|
-
hscli mcp --surface crm # curated CRM read/write tools
|
|
471
|
+
hscli mcp # 31 diagnostics + essential read tools (default)
|
|
472
|
+
hscli mcp --surface crm # 138 curated CRM read/write tools
|
|
362
473
|
hscli mcp --surface migration # curated cross-product migration tools
|
|
363
|
-
hscli mcp --surface full # all
|
|
474
|
+
hscli mcp --surface full # all 182 tools, including raw API
|
|
475
|
+
hscli --json mcp manifest # inspect protocol, transport, and tool metadata
|
|
476
|
+
hscli --profile prod --json mcp doctor # inspect local safety readiness
|
|
477
|
+
hscli --profile prod --json mcp doctor --all # include external HubSpot MCP checks
|
|
478
|
+
hscli --profile prod --json mcp setup --client codex # secret-free setup plan
|
|
479
|
+
hscli --json mcp matrix # compare trust boundaries and intended use
|
|
364
480
|
```
|
|
365
481
|
|
|
366
482
|
For Claude Desktop, add to `claude_desktop_config.json`:
|
|
@@ -380,14 +496,26 @@ For Claude Desktop, add to `claude_desktop_config.json`:
|
|
|
380
496
|
The MCP server exposes three tool families across explicit surfaces:
|
|
381
497
|
|
|
382
498
|
- **Per-object tools** — `crm_contacts_list`, `crm_deals_create`, `crm_custom_records_search`, …
|
|
383
|
-
- **HubSpot Remote MCP
|
|
384
|
-
- **
|
|
499
|
+
- **HubSpot Remote MCP name-compatible subset** — a documented snapshot of familiar names such as `search_crm_objects` and `manage_crm_objects`; transport, authentication, schemas, permissions, and some semantics differ
|
|
500
|
+
- **Operator surface** — workflows, files, forms, webhooks, HubDB, conversations, and more, using hscli profiles, dry-runs, policy, and audit evidence
|
|
385
501
|
|
|
386
502
|
`minimal` is intentionally the default so an agent does not pay the context
|
|
387
|
-
and security cost of
|
|
503
|
+
and security cost of 182 tools for a simple CRM read. The raw `hub_api_request`
|
|
388
504
|
tool exists only in `full`. See the generated [tool catalog](docs/MCP_TOOL_CATALOG.md).
|
|
389
505
|
|
|
390
|
-
Every
|
|
506
|
+
Every tool publishes conservative MCP safety annotations. Token redaction is
|
|
507
|
+
enforced on every response. A normal `hscli --profile <name> mcp serve` locks
|
|
508
|
+
the server to that startup profile; cross-profile calls require the explicit
|
|
509
|
+
`--allow-cross-profile` startup flag. Live writes require both `force: true`
|
|
510
|
+
on the tool call and the operator-controlled `--allow-writes` startup flag,
|
|
511
|
+
then retain policy, portal-pin, and change-ticket gates. Sealed action-contract
|
|
512
|
+
prepare/apply/verify is a stronger boundary and is not yet automatically bound
|
|
513
|
+
to MCP writes; `mcp doctor` makes that limitation visible.
|
|
514
|
+
|
|
515
|
+
HubSpot's two official MCP products should normally run alongside hscli:
|
|
516
|
+
Remote MCP (`https://mcp.hubspot.com`) for user-authorized CRM operations and
|
|
517
|
+
Developer MCP (`hs mcp setup`) for app/CMS development. `mcp setup` prints a
|
|
518
|
+
plan only; it never stores OAuth credentials or edits a client configuration.
|
|
391
519
|
|
|
392
520
|
## Observability
|
|
393
521
|
|
|
@@ -502,6 +630,7 @@ Under `HSCLI_HOME` (default: `~/.revfleet`):
|
|
|
502
630
|
- [docs/ARCHITECTURE.md](docs/ARCHITECTURE.md) · [docs/SAFETY_MODEL.md](docs/SAFETY_MODEL.md) · [docs/WHY_HOW_WHAT.md](docs/WHY_HOW_WHAT.md)
|
|
503
631
|
- [docs/ROADMAP-DATE-BASED-API.md](docs/ROADMAP-DATE-BASED-API.md) — HubSpot's `/YYYY-MM/` migration plan
|
|
504
632
|
- [docs/PORTAL_BACKUP.md](docs/PORTAL_BACKUP.md) — full-portal downgrade/migration backup runbook
|
|
633
|
+
- [docs/VALIDATION_BOUNDARIES.md](docs/VALIDATION_BOUNDARIES.md) — what local, CI, and approved live evidence can (and cannot) establish
|
|
505
634
|
- [docs/PLUGIN_GUIDE.md](docs/PLUGIN_GUIDE.md) — writing plugins
|
|
506
635
|
- [docs/COOKBOOK.md](docs/COOKBOOK.md) — recipes
|
|
507
636
|
- [docs/PUBLISHING.md](docs/PUBLISHING.md) — release runbook (maintainers)
|
package/SECURITY.md
CHANGED
|
@@ -14,14 +14,25 @@
|
|
|
14
14
|
- JSON mode is preferred for machine handling to avoid ad-hoc parsing leaks.
|
|
15
15
|
|
|
16
16
|
## Secret Storage Policy
|
|
17
|
-
-
|
|
17
|
+
- Credentials are stored in a profile-based auth file under `HSCLI_HOME` or default `~/.revfleet`.
|
|
18
18
|
- File permissions are locked to owner-only (`0700` dir, `0600` auth file).
|
|
19
|
-
- Prefer `auth login
|
|
19
|
+
- Prefer the hidden `auth login` prompt, or `--token-stdin` in CI, over an inline
|
|
20
|
+
`--token` value to reduce
|
|
21
|
+
shell-history/process-list exposure.
|
|
22
|
+
- Personal Access Key profiles retain the PAK to refresh their short-lived
|
|
23
|
+
access token. Encrypt the vault with `hscli auth encrypt` on shared or
|
|
24
|
+
higher-risk workstations.
|
|
20
25
|
- No token echo in CLI responses.
|
|
21
26
|
- Roadmap item: optional encrypted keychain-backed storage.
|
|
22
27
|
|
|
23
28
|
## Auth Scope Minimization
|
|
24
|
-
- Use
|
|
29
|
+
- Use Private App tokens or Service Keys with only the scopes required for the
|
|
30
|
+
operation set. Service Keys are REST-only credentials.
|
|
31
|
+
- Personal Access Keys inherit the authenticated user's account permissions;
|
|
32
|
+
their selected scope groups further limit that access. Use them for local
|
|
33
|
+
operator workflows, not unattended shared automation.
|
|
34
|
+
- Static credentials saved with `--no-verify` are marked unverified and cannot
|
|
35
|
+
write until a verified login records the portal identity.
|
|
25
36
|
- Separate profiles by environment (sandbox/prod) to reduce blast radius.
|
|
26
37
|
- Prefer read-only tokens for non-mutation workflows.
|
|
27
38
|
|
package/dist/cli.js
CHANGED
|
@@ -55,7 +55,7 @@ import { registerContactsV1, registerCompaniesV2, registerDealsV1, registerOwner
|
|
|
55
55
|
import { CliError, printError } from "./core/output.js";
|
|
56
56
|
import { loadPlugins } from "./core/plugins.js";
|
|
57
57
|
import { normalizeApiBaseUrl, normalizeStoredHublet, resolveApiDomain } from "./core/auth.js";
|
|
58
|
-
import
|
|
58
|
+
import { HSCLI_VERSION } from "./core/version.js";
|
|
59
59
|
export function createProgram() {
|
|
60
60
|
const program = new Command();
|
|
61
61
|
let ctx = { profile: "default", json: false, dryRun: false, force: false, strictCapabilities: false, format: "table" };
|
|
@@ -69,7 +69,7 @@ export function createProgram() {
|
|
|
69
69
|
" ┌──┐\n"
|
|
70
70
|
+ " │hs│ hscli · agentic HubSpot CLI + MCP server\n"
|
|
71
71
|
+ " └──┘ @revfleet/hscli · MIT · github.com/revfleet/hscli")
|
|
72
|
-
.version(
|
|
72
|
+
.version(HSCLI_VERSION)
|
|
73
73
|
.option("--profile <name>", "Auth profile", "default")
|
|
74
74
|
.option("--json", "JSON output")
|
|
75
75
|
.option("--format <mode>", "Output format: json|jsonl|table|csv|yaml")
|
|
@@ -205,7 +205,7 @@ export function createProgram() {
|
|
|
205
205
|
registerBusinessUnits(program, () => ctx);
|
|
206
206
|
registerBroadcastsRoot(program, () => ctx);
|
|
207
207
|
registerFormIntegrations(program, () => ctx);
|
|
208
|
-
registerMcp(program);
|
|
208
|
+
registerMcp(program, () => ctx);
|
|
209
209
|
// A bare `hscli` is the first interaction after installation. Give terminal
|
|
210
210
|
// users the contextual home instead of a long command inventory; `--help`
|
|
211
211
|
// remains the explicit full command reference.
|
package/dist/cli.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAC5D,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAClE,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC1D,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC1D,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAClE,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAC9D,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAChE,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,EA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AE,CAAC;IACzD,OAAO,SAAS,CAAC;AACnB,CAAC;AAED,SAAS,mBAAmB,CAAC,GAAY,EAAE,QAAiB;IAC1D,MAAM,QAAQ,GAAG,OAAO,CAAC;IACzB,MAAM,KAAK,GAAG,CAAC,GAAG,KAAK,SAAS,IAAI,GAAG,KAAK,IAAI,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;IAChG,MAAM,OAAO,GAAG,IAAI,GAAG,CAAC,CAAC,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC;IACnE,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC;QACxB,MAAM,IAAI,QAAQ,CAAC,gBAAgB,EAAE,sDAAsD,CAAC,CAAC;IAC/F,CAAC;IACD,IAAI,QAAQ,IAAI,KAAK,KAAK,MAAM,IAAI,GAAG,KAAK,SAAS,IAAI,GAAG,KAAK,IAAI,EAAE,CAAC;QACtE,MAAM,IAAI,QAAQ,CAAC,gBAAgB,EAAE,iDAAiD,CAAC,CAAC;IAC1F,CAAC;IACD,OAAO,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAE,KAAqD,CAAC;AACpF,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export type CloudRunMcpCallerContract = Readonly<{
|
|
2
|
+
version: "hscli.cloud-run-mcp-caller/v1";
|
|
3
|
+
caller: Readonly<{
|
|
4
|
+
identity: "attached-cloud-run-service-account";
|
|
5
|
+
credentialSource: "application-default-credentials";
|
|
6
|
+
idTokenClient: "google-auth-library.getIdTokenClient";
|
|
7
|
+
credentialSentToMcp: "google-signed-id-token";
|
|
8
|
+
}>;
|
|
9
|
+
cloudRun: Readonly<{
|
|
10
|
+
serviceAudience: string;
|
|
11
|
+
mcpUrl: string;
|
|
12
|
+
authorizationHeader: "X-Serverless-Authorization";
|
|
13
|
+
}>;
|
|
14
|
+
hubSpotContext: Readonly<{
|
|
15
|
+
owner: "authorized-backend";
|
|
16
|
+
lifetime: "per-request";
|
|
17
|
+
browserSuppliedValues: "rejected";
|
|
18
|
+
headers: readonly ["X-HubSpot-Access-Token", "X-HubSpot-Portal-Id", "X-HubSpot-Hublet"];
|
|
19
|
+
}>;
|
|
20
|
+
hostedSurface: Readonly<{
|
|
21
|
+
client: "official-streamable-http";
|
|
22
|
+
tools: readonly ["hscli_service_info", "crm_properties_list", "crm_pipelines_list"];
|
|
23
|
+
browserOrigins: "rejected";
|
|
24
|
+
}>;
|
|
25
|
+
}>;
|
|
26
|
+
export declare function createCloudRunMcpCallerContract(input: {
|
|
27
|
+
cloudRunServiceUrl: string;
|
|
28
|
+
}): CloudRunMcpCallerContract;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
export function createCloudRunMcpCallerContract(input) {
|
|
2
|
+
const service = new URL(input.cloudRunServiceUrl);
|
|
3
|
+
if (service.protocol !== "https:")
|
|
4
|
+
throw new Error("Cloud Run service base URL must use HTTPS");
|
|
5
|
+
if (service.pathname !== "/" || service.search || service.hash || service.username || service.password || service.port) {
|
|
6
|
+
throw new Error("Cloud Run service base URL must be an origin without a path");
|
|
7
|
+
}
|
|
8
|
+
const serviceAudience = service.origin;
|
|
9
|
+
return {
|
|
10
|
+
version: "hscli.cloud-run-mcp-caller/v1",
|
|
11
|
+
caller: {
|
|
12
|
+
identity: "attached-cloud-run-service-account",
|
|
13
|
+
credentialSource: "application-default-credentials",
|
|
14
|
+
idTokenClient: "google-auth-library.getIdTokenClient",
|
|
15
|
+
credentialSentToMcp: "google-signed-id-token",
|
|
16
|
+
},
|
|
17
|
+
cloudRun: {
|
|
18
|
+
serviceAudience,
|
|
19
|
+
mcpUrl: `${serviceAudience}/mcp`,
|
|
20
|
+
authorizationHeader: "X-Serverless-Authorization",
|
|
21
|
+
},
|
|
22
|
+
hubSpotContext: {
|
|
23
|
+
owner: "authorized-backend",
|
|
24
|
+
lifetime: "per-request",
|
|
25
|
+
browserSuppliedValues: "rejected",
|
|
26
|
+
headers: ["X-HubSpot-Access-Token", "X-HubSpot-Portal-Id", "X-HubSpot-Hublet"],
|
|
27
|
+
},
|
|
28
|
+
hostedSurface: {
|
|
29
|
+
client: "official-streamable-http",
|
|
30
|
+
tools: ["hscli_service_info", "crm_properties_list", "crm_pipelines_list"],
|
|
31
|
+
browserOrigins: "rejected",
|
|
32
|
+
},
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
//# sourceMappingURL=cloud-run-caller-contract.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cloud-run-caller-contract.js","sourceRoot":"","sources":["../../src/cloud/cloud-run-caller-contract.ts"],"names":[],"mappings":"AA0BA,MAAM,UAAU,+BAA+B,CAAC,KAAqC;IACnF,MAAM,OAAO,GAAG,IAAI,GAAG,CAAC,KAAK,CAAC,kBAAkB,CAAC,CAAC;IAClD,IAAI,OAAO,CAAC,QAAQ,KAAK,QAAQ;QAAE,MAAM,IAAI,KAAK,CAAC,2CAA2C,CAAC,CAAC;IAChG,IAAI,OAAO,CAAC,QAAQ,KAAK,GAAG,IAAI,OAAO,CAAC,MAAM,IAAI,OAAO,CAAC,IAAI,IAAI,OAAO,CAAC,QAAQ,IAAI,OAAO,CAAC,QAAQ,IAAI,OAAO,CAAC,IAAI,EAAE,CAAC;QACvH,MAAM,IAAI,KAAK,CAAC,6DAA6D,CAAC,CAAC;IACjF,CAAC;IACD,MAAM,eAAe,GAAG,OAAO,CAAC,MAAM,CAAC;IACvC,OAAO;QACL,OAAO,EAAE,+BAA+B;QACxC,MAAM,EAAE;YACN,QAAQ,EAAE,oCAAoC;YAC9C,gBAAgB,EAAE,iCAAiC;YACnD,aAAa,EAAE,sCAAsC;YACrD,mBAAmB,EAAE,wBAAwB;SAC9C;QACD,QAAQ,EAAE;YACR,eAAe;YACf,MAAM,EAAE,GAAG,eAAe,MAAM;YAChC,mBAAmB,EAAE,4BAA4B;SAClD;QACD,cAAc,EAAE;YACd,KAAK,EAAE,oBAAoB;YAC3B,QAAQ,EAAE,aAAa;YACvB,qBAAqB,EAAE,UAAU;YACjC,OAAO,EAAE,CAAC,wBAAwB,EAAE,qBAAqB,EAAE,kBAAkB,CAAC;SAC/E;QACD,aAAa,EAAE;YACb,MAAM,EAAE,0BAA0B;YAClC,KAAK,EAAE,CAAC,oBAAoB,EAAE,qBAAqB,EAAE,oBAAoB,CAAC;YAC1E,cAAc,EAAE,UAAU;SAC3B;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { createCloudServer } from "./server.js";
|
|
2
|
+
const cloud = Boolean(process.env.K_SERVICE);
|
|
3
|
+
if (!cloud && process.env.HSCLI_CLOUD_LOCAL !== "1") {
|
|
4
|
+
throw new Error("Run behind Cloud Run IAM, or opt into loopback-only testing with HSCLI_CLOUD_LOCAL=1");
|
|
5
|
+
}
|
|
6
|
+
const port = Number(process.env.PORT ?? 8080);
|
|
7
|
+
const server = createCloudServer({ sourceSha: process.env.HSCLI_SOURCE_SHA });
|
|
8
|
+
server.listen(port, cloud ? "0.0.0.0" : "127.0.0.1", () => {
|
|
9
|
+
process.stdout.write(JSON.stringify({ event: "ready", service: "revfleet-hscli-cloud" }) + "\n");
|
|
10
|
+
});
|
|
11
|
+
process.on("SIGTERM", () => {
|
|
12
|
+
server.close();
|
|
13
|
+
setTimeout(() => { server.closeAllConnections(); process.exit(0); }, 8_000).unref();
|
|
14
|
+
});
|
|
15
|
+
//# sourceMappingURL=main.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"main.js","sourceRoot":"","sources":["../../src/cloud/main.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAEhD,MAAM,KAAK,GAAG,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;AAC7C,IAAI,CAAC,KAAK,IAAI,OAAO,CAAC,GAAG,CAAC,iBAAiB,KAAK,GAAG,EAAE,CAAC;IACpD,MAAM,IAAI,KAAK,CAAC,sFAAsF,CAAC,CAAC;AAC1G,CAAC;AACD,MAAM,IAAI,GAAG,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,IAAI,IAAI,CAAC,CAAC;AAC9C,MAAM,MAAM,GAAG,iBAAiB,CAAC,EAAE,SAAS,EAAE,OAAO,CAAC,GAAG,CAAC,gBAAgB,EAAE,CAAC,CAAC;AAC9E,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,EAAE;IACxD,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,sBAAsB,EAAE,CAAC,GAAG,IAAI,CAAC,CAAC;AACnG,CAAC,CAAC,CAAC;AACH,OAAO,CAAC,EAAE,CAAC,SAAS,EAAE,GAAG,EAAE;IACzB,MAAM,CAAC,KAAK,EAAE,CAAC;IACf,UAAU,CAAC,GAAG,EAAE,GAAG,MAAM,CAAC,mBAAmB,EAAE,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,KAAK,EAAE,CAAC;AACtF,CAAC,CAAC,CAAC"}
|