@zackbart/connecta 0.29.0 → 0.30.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 +67 -0
- package/README.md +123 -134
- package/bin/connecta.mjs +13 -2
- package/bin/version.mjs +1 -1
- package/dist/argument-redaction.js +230 -0
- package/dist/auth-elicitation.js +14 -9
- package/dist/authorization-handoff.js +111 -0
- package/dist/catalog-cache.js +2 -2
- package/dist/catalog-service.js +103 -63
- package/dist/config.d.ts +2 -0
- package/dist/config.js +12 -7
- package/dist/connectors/guarded-fetch.js +3 -3
- package/dist/connectors/negotiation-cache.js +1 -1
- package/dist/downstream-input-context.js +9 -0
- package/dist/downstream-input.js +13 -11
- package/dist/errors.d.ts +36 -12
- package/dist/errors.js +19 -9
- package/dist/execute.js +375 -43
- package/dist/executor-result.js +11 -9
- package/dist/executors/quickjs-child.js +12 -5
- package/dist/executors/quickjs-protocol.js +5 -6
- package/dist/executors/quickjs-runtime.js +6 -1
- package/dist/executors/quickjs.js +20 -4
- package/dist/guest-runtime.js +52 -2
- package/dist/guest-types.d.ts +47 -5
- package/dist/index.d.ts +1 -1
- package/dist/invocation.js +40 -14
- package/dist/meta-output.js +0 -15
- package/dist/meta-tools.js +166 -95
- package/dist/oauth-handoff.js +88 -11
- package/dist/program-result.js +5 -0
- package/dist/program-writes.js +5 -1
- package/dist/provider.d.ts +1 -1
- package/dist/providers/_shared/google/workspace.d.ts +1 -1
- package/dist/providers/_shared/request-token.js +83 -0
- package/dist/providers/infisical/index.d.ts +7 -0
- package/dist/providers/infisical/index.js +713 -0
- package/dist/providers/infisical/skill.generated.js +8 -0
- package/dist/registry.d.ts +8 -6
- package/dist/registry.js +134 -61
- package/dist/resource-read.js +4 -1
- package/dist/routes/mcp.js +11 -2
- package/dist/sent-secrets.d.ts +54 -13
- package/dist/sent-secrets.js +770 -231
- package/dist/skills.js +26 -16
- package/dist/sqlite.js +21 -6
- package/dist/storage/keys.js +20 -5
- package/dist/storage/memory.js +9 -4
- package/dist/storage/sql.js +18 -9
- package/dist/types.d.ts +17 -3
- package/dist/usage-guide.js +49 -40
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/worker.js +2 -1
- package/documentation/README.md +63 -0
- package/documentation/architecture.md +121 -89
- package/documentation/auth.md +138 -5
- package/documentation/code-mode.md +224 -107
- package/documentation/deploying.md +146 -0
- package/documentation/integrating.md +159 -0
- package/documentation/meta-tools.md +135 -30
- package/documentation/operating.md +135 -0
- package/documentation/operator-tests.md +4 -0
- package/documentation/operator-ui.md +132 -0
- package/documentation/provider-migration-0.29.md +5 -0
- package/examples/worker/README.md +7 -0
- package/package.json +7 -1
- package/templates/node/README.md +7 -0
- package/templates/node/package.json +1 -1
package/dist/errors.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
// Typed failure contract for connector tool calls. Web-API only — no node:
|
|
2
2
|
// imports here.
|
|
3
|
+
import { redactCallArguments } from "./argument-redaction.js";
|
|
3
4
|
const CLASSIFICATION_CODE_TABLE = {
|
|
4
5
|
timeout: true,
|
|
5
6
|
auth_required: true,
|
|
@@ -116,25 +117,34 @@ export function boundedEchoText(value, maxBytes = MAX_ECHOED_BYTES) {
|
|
|
116
117
|
return `${echoDecoder.decode(bytes.slice(0, end))}…`;
|
|
117
118
|
}
|
|
118
119
|
/**
|
|
119
|
-
*
|
|
120
|
-
*
|
|
121
|
-
*
|
|
122
|
-
*
|
|
123
|
-
* ones — there is nothing honest to put in the field.
|
|
120
|
+
* Snapshot the caller's arguments after bounded schema-aware writeOnly omission,
|
|
121
|
+
* then apply the shared byte budget without clipping. Unresolved sensitivity
|
|
122
|
+
* omits the entire echo. argsRedacted marks partial or withheld arguments as
|
|
123
|
+
* reconciliation context; any retry must use the caller's original arguments.
|
|
124
124
|
*/
|
|
125
|
-
export function echoedCallArgs(args) {
|
|
125
|
+
export function echoedCallArgs(args, schema) {
|
|
126
126
|
if (args === undefined)
|
|
127
127
|
return {};
|
|
128
128
|
let text;
|
|
129
|
+
let redacted = false;
|
|
129
130
|
try {
|
|
130
|
-
|
|
131
|
+
const filtered = schema ? redactCallArguments(args, schema) : { value: args, redacted: false };
|
|
132
|
+
redacted = filtered.redacted;
|
|
133
|
+
if (!("value" in filtered))
|
|
134
|
+
return { argsRedacted: true };
|
|
135
|
+
const safeArgs = filtered.value;
|
|
136
|
+
text = JSON.stringify(safeArgs);
|
|
131
137
|
}
|
|
132
138
|
catch {
|
|
133
|
-
return {};
|
|
139
|
+
return redacted ? { argsRedacted: true } : {};
|
|
134
140
|
}
|
|
135
141
|
if (text === undefined)
|
|
136
142
|
return {};
|
|
137
|
-
return echoEncoder.encode(text).length <= MAX_ECHOED_BYTES
|
|
143
|
+
return echoEncoder.encode(text).length <= MAX_ECHOED_BYTES
|
|
144
|
+
? { args: JSON.parse(text), ...(redacted ? { argsRedacted: true } : {}) }
|
|
145
|
+
: redacted
|
|
146
|
+
? { argsRedacted: true }
|
|
147
|
+
: {};
|
|
138
148
|
}
|
|
139
149
|
function boundedValidation(details) {
|
|
140
150
|
if (!details)
|