@zackbart/connecta 0.25.0 → 0.26.1
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/AGENTS.md +6 -5
- package/CHANGELOG.md +387 -0
- package/README.md +32 -15
- package/SECURITY.md +6 -5
- package/bin/connecta.mjs +5 -1
- package/dist/activity.d.ts +10 -3
- package/dist/activity.js +10 -1
- package/dist/artifacts/connector.d.ts +55 -0
- package/dist/artifacts/connector.js +724 -0
- package/dist/artifacts/document.js +80 -0
- package/dist/artifacts/guide.js +140 -0
- package/dist/artifacts/html-scan.js +329 -0
- package/dist/artifacts/json.js +68 -0
- package/dist/artifacts/kv-store.d.ts +20 -0
- package/dist/artifacts/kv-store.js +140 -0
- package/dist/artifacts/markdown.js +478 -0
- package/dist/artifacts/module.d.ts +37 -0
- package/dist/artifacts/module.js +60 -0
- package/dist/artifacts/operations.d.ts +195 -0
- package/dist/artifacts/operations.js +944 -0
- package/dist/artifacts/refresh.d.ts +53 -0
- package/dist/artifacts/refresh.js +235 -0
- package/dist/artifacts/routes.js +217 -0
- package/dist/artifacts/types.d.ts +214 -0
- package/dist/artifacts/types.js +22 -0
- package/dist/artifacts/validate.d.ts +62 -0
- package/dist/artifacts/validate.js +653 -0
- package/dist/artifacts.d.ts +6 -0
- package/dist/artifacts.js +9 -0
- package/dist/auth/downstream-oauth.js +397 -48
- package/dist/auth/oauth-start-reset.js +20 -0
- package/dist/branding.d.ts +87 -0
- package/dist/branding.js +170 -1
- package/dist/catalog-service.js +39 -29
- package/dist/catalog.js +42 -8
- package/dist/connector-access.d.ts +18 -4
- package/dist/connector-access.js +65 -20
- package/dist/connector-caller.d.ts +8 -0
- package/dist/connector-caller.js +19 -0
- package/dist/connectors/remote-mcp.js +48 -9
- package/dist/errors.d.ts +16 -1
- package/dist/errors.js +28 -0
- package/dist/execute.js +431 -75
- package/dist/executor-admission.d.ts +11 -1
- package/dist/executor-admission.js +79 -14
- package/dist/executors/quickjs.js +4 -2
- package/dist/index.d.ts +62 -6
- package/dist/index.js +230 -6
- package/dist/invocation.js +56 -10
- package/dist/meta-tools.js +7 -2
- package/dist/module-contracts.d.ts +21 -1
- package/dist/oauth-callback-outcome.js +43 -18
- package/dist/operator-ui/generated.js +2 -2
- package/dist/operator-ui/model.d.ts +62 -5
- package/dist/operator-ui/view.js +372 -28
- package/dist/page-styles.js +7 -0
- package/dist/program-source.js +116 -0
- package/dist/registry.d.ts +42 -6
- package/dist/registry.js +164 -60
- package/dist/resumable.js +1291 -0
- package/dist/routes/activity.js +6 -69
- package/dist/routes/actor-labels.js +114 -0
- package/dist/routes/credentials.js +27 -5
- package/dist/routes/mcp.js +120 -59
- package/dist/routes/oauth-management.js +87 -20
- package/dist/routes/oauth.js +54 -87
- package/dist/routes/operator.js +1 -0
- package/dist/routes/shared.d.ts +23 -1
- package/dist/routes/shared.js +20 -2
- package/dist/routes/ui-data.js +2 -1
- package/dist/routes/ui.js +19 -4
- package/dist/run-journal.js +347 -0
- package/dist/runtime/shared-read.js +106 -0
- package/dist/server.js +30 -2
- package/dist/skills.js +30 -11
- package/dist/timeout.js +26 -0
- package/dist/tool-safety.d.ts +35 -0
- package/dist/tool-safety.js +31 -0
- package/dist/types.d.ts +23 -0
- package/dist/ui.d.ts +17 -5
- package/dist/ui.js +51 -68
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/documentation/architecture.md +214 -27
- package/documentation/auth.md +186 -2
- package/documentation/code-mode.md +236 -63
- package/documentation/meta-tools.md +55 -29
- package/ethos.md +12 -10
- package/examples/worker/AGENTS.md +6 -0
- package/examples/worker/README.md +174 -10
- package/examples/worker/src/d1-activity-row.ts +14 -2
- package/examples/worker/src/d1-activity.ts +4 -2
- package/examples/worker/src/index.ts +36 -1
- package/examples/worker/src/r2-artifact-blobs.ts +29 -0
- package/examples/worker/wrangler.jsonc +5 -1
- package/package.json +6 -2
- package/templates/node/AGENTS.md +9 -2
- package/templates/node/README.md +31 -3
- package/templates/node/package.json +1 -1
- package/templates/node/src/index.ts +27 -0
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import type { Connector } from "../types.js";
|
|
2
|
+
import { type ArtifactOperations } from "./operations.js";
|
|
3
|
+
import { type ArtifactRefreshService } from "./refresh.js";
|
|
4
|
+
import type { ArtifactAllowlist, ArtifactIssue, ArtifactKind, ArtifactLimits } from "./types.js";
|
|
5
|
+
/** What a deployment's render check is handed: exactly what the viewer loads. */
|
|
6
|
+
export interface ArtifactRenderCheckInput {
|
|
7
|
+
/** The complete frame document, data injected. */
|
|
8
|
+
document: string;
|
|
9
|
+
/** The Content-Security-Policy the viewer serves it under. */
|
|
10
|
+
csp: string;
|
|
11
|
+
kind: ArtifactKind;
|
|
12
|
+
/** Aborted when the check's 20-second deadline or the call's own passes. */
|
|
13
|
+
signal: AbortSignal;
|
|
14
|
+
}
|
|
15
|
+
export type ArtifactRenderCheckResult = {
|
|
16
|
+
ok: true;
|
|
17
|
+
warnings?: string[];
|
|
18
|
+
} | {
|
|
19
|
+
ok: false;
|
|
20
|
+
errors: string[];
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* A real render check — a headless browser, say — run on `validate_artifact`
|
|
24
|
+
* and on every write that changes what a page renders. It must answer within
|
|
25
|
+
* 20 seconds; a throw or a timeout fails the write as retryable `unavailable`
|
|
26
|
+
* and saves nothing.
|
|
27
|
+
*/
|
|
28
|
+
export type ArtifactRenderCheck = (input: ArtifactRenderCheckInput) => Promise<ArtifactRenderCheckResult>;
|
|
29
|
+
type RenderVerdict = {
|
|
30
|
+
ok: true;
|
|
31
|
+
warnings: ArtifactIssue[];
|
|
32
|
+
} | {
|
|
33
|
+
ok: false;
|
|
34
|
+
errors: ArtifactIssue[];
|
|
35
|
+
} | {
|
|
36
|
+
ok: false;
|
|
37
|
+
unavailable: string;
|
|
38
|
+
};
|
|
39
|
+
/** Run a hook under its 20-second deadline and the call's own signal. Never throws. */
|
|
40
|
+
export declare function runRenderCheck(hook: ArtifactRenderCheck, input: {
|
|
41
|
+
document: string;
|
|
42
|
+
csp: string;
|
|
43
|
+
kind: ArtifactKind;
|
|
44
|
+
}, callSignal: AbortSignal | undefined): Promise<RenderVerdict>;
|
|
45
|
+
export interface ArtifactsConnectorOptions {
|
|
46
|
+
operations: ArtifactOperations;
|
|
47
|
+
refresh: ArtifactRefreshService;
|
|
48
|
+
allowlist: ArtifactAllowlist;
|
|
49
|
+
limits: ArtifactLimits;
|
|
50
|
+
renderCheck?: ArtifactRenderCheck;
|
|
51
|
+
/** Where pages are served, when not the deployment's own origin. */
|
|
52
|
+
origin?: string;
|
|
53
|
+
}
|
|
54
|
+
export declare function artifactsConnector(options: ArtifactsConnectorOptions): Connector;
|
|
55
|
+
export {};
|