@zackbart/connecta 0.40.0 → 0.41.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 +87 -0
- package/bin/version.mjs +1 -1
- package/dist/activity.d.ts +30 -4
- package/dist/activity.js +28 -2
- package/dist/agent-observation.js +24 -2
- package/dist/agent-routes.js +4 -41
- package/dist/auth/clerk.d.ts +6 -1
- package/dist/auth/clerk.js +16 -0
- package/dist/auth/cloudflare-access.js +49 -7
- package/dist/auth/downstream-oauth/consent.js +79 -29
- package/dist/auth/downstream-oauth/grant-store.js +58 -7
- package/dist/auth/downstream-oauth/refresh-records.js +6 -5
- package/dist/auth/downstream-oauth.js +12 -4
- package/dist/auth/oauth-request-not-sent.js +4 -0
- package/dist/auth/static-oauth.js +51 -21
- package/dist/catalog-cache.js +62 -21
- package/dist/catalog-freshness.js +13 -0
- package/dist/catalog-service.js +39 -12
- package/dist/catalog.js +103 -38
- package/dist/config.d.ts +10 -4
- package/dist/config.js +30 -7
- package/dist/connectors/remote-mcp/call.js +1 -1
- package/dist/connectors/remote-mcp/connection.js +52 -18
- package/dist/connectors/remote-mcp/oauth.js +2 -2
- package/dist/connectors/remote-mcp/resources.js +5 -2
- package/dist/connectors/remote-mcp/transport.js +24 -6
- package/dist/connectors/remote-mcp.js +4 -4
- package/dist/credential-contract.d.ts +3 -1
- package/dist/describe-config.d.ts +1 -0
- package/dist/describe-config.js +1 -0
- package/dist/downstream-input.js +11 -2
- package/dist/errors.d.ts +8 -1
- package/dist/errors.js +2 -0
- package/dist/execute.js +20 -7
- package/dist/executor-result.js +1 -1
- package/dist/executors/quickjs-child.js +1 -1
- package/dist/executors/quickjs-runtime.js +1 -1
- package/dist/executors/quickjs.js +1 -1
- package/dist/guarded-transport.js +2 -0
- package/dist/http/client.js +7 -0
- package/dist/http/hatch.js +2 -0
- package/dist/http/node-transport.js +110 -4
- package/dist/http/oauth.js +17 -6
- package/dist/index.js +10 -21
- package/dist/invocation-failure.js +28 -0
- package/dist/invocation.js +72 -33
- package/dist/membership.d.ts +1 -1
- package/dist/meta-tools.js +27 -13
- package/dist/module-contracts.d.ts +3 -1
- package/dist/native-tools.js +11 -4
- package/dist/node.d.ts +7 -0
- package/dist/node.js +82 -3
- package/dist/operation-activity.js +103 -0
- package/dist/operator-record.d.ts +8 -0
- package/dist/operator-record.js +15 -0
- package/dist/operator-ui/generated.js +2 -2
- package/dist/provider.d.ts +1 -1
- package/dist/providers/_shared/google/workspace.d.ts +1 -1
- package/dist/providers/breeze/index.js +1 -1
- package/dist/providers/ccb/index.js +1 -1
- package/dist/providers/cloudflare/index.js +1 -1
- package/dist/providers/docs/index.js +1 -1
- package/dist/providers/drive/index.js +1 -1
- package/dist/providers/forms/index.js +1 -1
- package/dist/providers/github/index.js +1 -1
- package/dist/providers/gmail/index.js +1 -1
- package/dist/providers/granola/index.js +1 -1
- package/dist/providers/overflow/index.js +1 -1
- package/dist/providers/planning-center/index.js +1 -1
- package/dist/providers/planning-center/lib/constants.d.ts +1 -1
- package/dist/providers/quickbooks/api.js +28 -25
- package/dist/providers/quickbooks/index.js +1 -1
- package/dist/providers/quickbooks/lib/writes.js +55 -0
- package/dist/providers/quickbooks/safety.js +17 -5
- package/dist/providers/quickbooks/skill.generated.js +1 -1
- package/dist/providers/sheets/index.js +1 -1
- package/dist/providers/slides/index.js +1 -1
- package/dist/providers/stripe/index.js +2 -2
- package/dist/providers/tithely/index.js +1 -1
- package/dist/providers/vercel/api.js +1 -0
- package/dist/registry.js +16 -4
- package/dist/resource-read.js +21 -2
- package/dist/route-names.js +44 -0
- package/dist/routes/activity-context.js +1 -0
- package/dist/routes/activity-disclosure.js +26 -4
- package/dist/routes/activity.js +2 -1
- package/dist/routes/mcp.js +32 -13
- package/dist/routes/ui-config.js +1 -1
- package/dist/routes/ui-data.js +3 -2
- package/dist/runtime/native-storage.js +12 -0
- package/dist/runtime/request-reads.js +66 -14
- package/dist/runtime/request-scope.js +2 -1
- package/dist/skill-origin.js +16 -0
- package/dist/skills.js +132 -43
- package/dist/storage/d1-driver.js +33 -5
- package/dist/storage/keys.js +7 -1
- package/dist/storage/sql-native.js +60 -3
- package/dist/storage/sql.js +6 -0
- package/dist/timing-trace.js +84 -0
- package/dist/types.d.ts +5 -0
- package/dist/url-safety.js +38 -20
- package/dist/utility-recovery.js +33 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/worker.js +33 -8
- package/documentation/architecture.md +48 -1
- package/documentation/auth.md +116 -36
- package/documentation/code-mode.md +61 -46
- package/documentation/deploying.md +25 -1
- package/documentation/meta-tools.md +113 -11
- package/documentation/operating.md +86 -1
- package/documentation/operator-ui.md +51 -2
- package/documentation/providers.md +16 -14
- package/package.json +10 -8
- package/templates/node/package.json +1 -1
|
@@ -287,7 +287,7 @@ stack each row into a card.
|
|
|
287
287
|
|
|
288
288
|
### Activity
|
|
289
289
|
|
|
290
|
-
Counts for the loaded history (calls, failed, tools, catalog changes), also
|
|
290
|
+
Counts for the loaded history (calls, failed, tools, catalog changes, and opt-in operations), also
|
|
291
291
|
in its accessible summary, and a strip of calls over time with failures in
|
|
292
292
|
red when the calls span more than a minute.
|
|
293
293
|
|
|
@@ -304,7 +304,9 @@ red when the calls span more than a minute.
|
|
|
304
304
|
row lists what was recorded: result, how it ran, classification, exact
|
|
305
305
|
duration and size, caller, stable caller id, request id, client, and
|
|
306
306
|
connecta version. Unrecorded fields are left out. Catalog changes are rows
|
|
307
|
-
with added, removed and changed counts.
|
|
307
|
+
with added, removed and changed counts. Opt-in operation rows use fixed names
|
|
308
|
+
(Search, Describe, Result page, Skill read, Program) and an Operation detail;
|
|
309
|
+
they do not count as calls, failed calls, friction, tools or last calls.
|
|
308
310
|
- **Empty.** "No calls yet" with Refresh, or "No matches" with Clear filters.
|
|
309
311
|
|
|
310
312
|
### Navigation, gates and recovery
|
|
@@ -767,6 +769,53 @@ names, descriptions or schemas enter the event. Private catalog changes require
|
|
|
767
769
|
a matching principal owner even when the connector uses shared auth. Empty credential declarations
|
|
768
770
|
report `credential_required` before running a connector status or catalog probe.
|
|
769
771
|
|
|
772
|
+
### Opt in to operation history
|
|
773
|
+
|
|
774
|
+
Set `operations: true` on the existing activity module, for example
|
|
775
|
+
`activity: activityHistory({ store, operations: true })`, where `store` is the
|
|
776
|
+
configured platform activity store. The default is off: existing deployments
|
|
777
|
+
emit no operation rows. Each admitted search, describe, result page, skill read
|
|
778
|
+
and whole program adds one event through the existing detached sink. Workers
|
|
779
|
+
attach its promise to `waitUntil`; Node does not await it in the response path.
|
|
780
|
+
This adds storage writes and retention cleanup work for every operation.
|
|
781
|
+
|
|
782
|
+
Rows use `kind: "operation"`, `source: "execute_code"`, and a fixed operation
|
|
783
|
+
name. They contain duration, outcome, a checked error code, returned page
|
|
784
|
+
byte count when already measured, and host-call counts for a program. No query, tool
|
|
785
|
+
address supplied by a caller, skill name, result ID, code, arguments, result
|
|
786
|
+
contents or raw error text enters the row. Custom history readers must exclude
|
|
787
|
+
operation rows from call/friction counts. The public kind union adds
|
|
788
|
+
`"operation"`; exhaustive consumers may need a new case even when their
|
|
789
|
+
runtime configuration leaves recording off.
|
|
790
|
+
|
|
791
|
+
Operation disclosure is deliberately conservative:
|
|
792
|
+
|
|
793
|
+
- The existing maintainer permission and optional `readGate` still apply.
|
|
794
|
+
- Scope means every connector visible to the admitted endpoint, rather than
|
|
795
|
+
just the connectors named by a particular argument. A single-connector scope
|
|
796
|
+
uses that connector ID; other scopes use a reserved operation ID internally.
|
|
797
|
+
- Every connector in that scope must still be visible through a whole-connector
|
|
798
|
+
grant to both the reader and the recorded pool. Address-only grants do not
|
|
799
|
+
disclose operations. Removed pools/connectors or invalid scope metadata
|
|
800
|
+
withhold the entire row.
|
|
801
|
+
- All human operations are owner-only. Scopes containing personal auth,
|
|
802
|
+
caller-bound auth or a dynamically discovered catalog are also owner-only,
|
|
803
|
+
since static configuration cannot prove the catalog public. Owner-only rows
|
|
804
|
+
require the recorded principal basis and an exact match to the reader's
|
|
805
|
+
admitted principal ID and namespace. An agent without a provable admitted
|
|
806
|
+
human owner has those rows withheld.
|
|
807
|
+
- Shared machine operations over statically declared catalogs are visible to
|
|
808
|
+
maintainers only when the complete scope passes those checks. This policy
|
|
809
|
+
can withhold single-connector work performed on a mixed endpoint.
|
|
810
|
+
|
|
811
|
+
Existing D1 and SQLite activity tables need no new columns. The existing
|
|
812
|
+
kind-tagged metadata text slot stores the checked operation scope and counts;
|
|
813
|
+
legacy tool and catalog-change rows keep their format. The timeline shows
|
|
814
|
+
operations separately and excludes them from call totals, friction, tool
|
|
815
|
+
counts, call strips and last-call overlays.
|
|
816
|
+
|
|
817
|
+
### Activity actor labels
|
|
818
|
+
|
|
770
819
|
Activity label resolvers receive an optional `AbortSignal`. Pass it to user-directory
|
|
771
820
|
fetches and stop work when it aborts: the reader has left or the label lookup
|
|
772
821
|
budget has expired. Clerk label lookups follow the same lifetime and discard
|
|
@@ -275,12 +275,12 @@ discovery for your deployment's catalog.
|
|
|
275
275
|
</details>
|
|
276
276
|
|
|
277
277
|
<details>
|
|
278
|
-
<summary>QuickBooks Online (
|
|
278
|
+
<summary>QuickBooks Online (11 tools)</summary>
|
|
279
279
|
|
|
280
280
|
[Setup](#quickbooks-online). **API source:** Hand-authored endpoint contracts. No vendored OpenAPI document.
|
|
281
281
|
|
|
282
282
|
- **Named reads:** `get_company_info`, `get_record`, `get_report`, `search_records`.
|
|
283
|
-
- **Named writes:** `create_customer`, `create_invoice`, `update_customer`.
|
|
283
|
+
- **Named writes:** `create_customer`, `create_invoice`, `update_customer`, `update_unsent_invoice`.
|
|
284
284
|
- **API reads:** `quickbooks_api_details`, `quickbooks_api_read`, `quickbooks_api_search`.
|
|
285
285
|
- **API writes:** None.
|
|
286
286
|
|
|
@@ -1520,18 +1520,20 @@ Creation fixes EmailStatus to `NotSet` and IPN/online/card/ACH/PayPal/Affirm
|
|
|
1520
1520
|
payment flags to false, accepts no email fields, and never calls a send endpoint.
|
|
1521
1521
|
Intuit's documented autosend path requires company opt-in, enabled online
|
|
1522
1522
|
payments and `NeedToSend` with BillEmail; the fixed creation body withholds
|
|
1523
|
-
those request conditions.
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
|
|
1523
|
+
those request conditions.
|
|
1524
|
+
|
|
1525
|
+
`update_unsent_invoice` changes only DocNumber. Supply caller-observed Id and
|
|
1526
|
+
SyncToken and an explicit docNumber. It reads the US company and invoice,
|
|
1527
|
+
requires USD, explicit NotSet, no DeliveryInfo and every IPN/online/card/ACH/
|
|
1528
|
+
PayPal/Affirm payment flag explicitly false. Unknown state, send-ready or
|
|
1529
|
+
delivered state and stale versions fail before POST; no newer version is
|
|
1530
|
+
substituted. The sparse body preserves omitted delivery/payment fields.
|
|
1531
|
+
No date edits are exposed. Applying autosend prerequisites to updates is an
|
|
1532
|
+
inference, not an update-specific Intuit no-email guarantee. NotSet and absent
|
|
1533
|
+
delivery information cannot prove there was never historical delivery.
|
|
1534
|
+
Do not reset state to qualify or replace an invoice to bypass a refusal.
|
|
1535
|
+
Deletes, voids, delivery, payment execution, batch and other accounting writes
|
|
1536
|
+
remain unavailable. The API hatch refuses POSTs even when named writes are enabled.
|
|
1535
1537
|
|
|
1536
1538
|
Each write requires `requestId`, a stable identifier for the exact intent,
|
|
1537
1539
|
unique across all requests/tools for this company: 1–50 ASCII letters, digits,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zackbart/connecta",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.41.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"description": "One MCP to rule them all — a single MCP endpoint aggregating many downstream connectors behind a code-first surface of six meta-tools.",
|
|
@@ -173,8 +173,8 @@
|
|
|
173
173
|
"build:operator-ui": "node scripts/build-operator-ui.mjs",
|
|
174
174
|
"check:operator-ui": "node scripts/build-operator-ui.mjs --check",
|
|
175
175
|
"check:clerk-sdk": "node scripts/build-clerk-sdk.mjs --check",
|
|
176
|
-
"build": "
|
|
177
|
-
"typecheck": "tsc -p tsconfig.json --noEmit && tsc -p tsconfig.operator-ui.json --noEmit",
|
|
176
|
+
"build": "node scripts/eval-runtime.mjs --build",
|
|
177
|
+
"typecheck": "node node_modules/typescript-native/bin/tsc -p tsconfig.json --noEmit && node node_modules/typescript-native/bin/tsc -p tsconfig.operator-ui.json --noEmit",
|
|
178
178
|
"test": "vitest run",
|
|
179
179
|
"test:browser:install": "playwright install chromium",
|
|
180
180
|
"test:browser": "playwright test",
|
|
@@ -182,19 +182,20 @@
|
|
|
182
182
|
"pretest:browser:snapshots": "pnpm run build:operator-ui",
|
|
183
183
|
"test:node": "vitest run --config vitest.config.node.ts",
|
|
184
184
|
"test:workers": "vitest run --project workers",
|
|
185
|
+
"check:node-shards": "node scripts/check-node-shards.mjs",
|
|
185
186
|
"check:docs": "node scripts/check-doc-links.mjs",
|
|
186
187
|
"check:lint": "oxlint -D correctness --report-unused-disable-directives .",
|
|
187
188
|
"check:unused": "knip --include dependencies,unlisted,exports,nsExports,types,nsTypes",
|
|
188
|
-
"check:examples": "tsc -p tsconfig.template.node.json && tsc -p tsconfig.examples.worker.json",
|
|
189
|
+
"check:examples": "node node_modules/typescript/bin/tsc -p tsconfig.template.node.json && node node_modules/typescript/bin/tsc -p tsconfig.examples.worker.json",
|
|
189
190
|
"check:security": "pnpm audit --prod --audit-level moderate",
|
|
190
191
|
"check:package": "node scripts/check-package.mjs",
|
|
191
192
|
"check:declarations": "node scripts/check-declarations.mjs --dist .",
|
|
192
193
|
"check:bundle": "node scripts/bundle-size.mjs",
|
|
193
194
|
"providers:check": "tsx scripts/drift-check.mjs --specs --manual",
|
|
194
|
-
"eval:selftest": "tsx eval
|
|
195
|
-
"eval:agent": "tsx eval
|
|
196
|
-
"eval:smoke": "tsx eval
|
|
197
|
-
"eval:outcomes": "tsx eval
|
|
195
|
+
"eval:selftest": "node --import tsx scripts/eval-runtime.mjs selftest",
|
|
196
|
+
"eval:agent": "node --import tsx scripts/eval-runtime.mjs run-agent",
|
|
197
|
+
"eval:smoke": "node --import tsx scripts/eval-runtime.mjs run-smoke",
|
|
198
|
+
"eval:outcomes": "node --import tsx scripts/eval-runtime.mjs run-outcomes",
|
|
198
199
|
"preeval:outcomes": "node scripts/generate-version.mjs && pnpm run build:operator-ui",
|
|
199
200
|
"eval:perf": "tsx eval/run-perf.ts",
|
|
200
201
|
"eval:report": "tsx eval/report.ts",
|
|
@@ -279,6 +280,7 @@
|
|
|
279
280
|
"react-dom": "^19.3.1",
|
|
280
281
|
"tsx": "^4.23.15",
|
|
281
282
|
"typescript": "^6.0.3",
|
|
283
|
+
"typescript-native": "npm:typescript@7.0.2",
|
|
282
284
|
"undici": "6.29.1",
|
|
283
285
|
"vite": "^8.3.4",
|
|
284
286
|
"vitest": "^5.0.4",
|