@jskit-ai/agent-docs 0.1.155 → 0.1.157
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/guide/agent/app-extras/assistant.md +46 -0
- package/guide/agent/app-setup/authentication.md +68 -0
- package/package.json +1 -1
- package/patterns/feature-package/example/booking-engine/package.json +1 -1
- package/patterns/minimal-foundation/example/package.json +4 -4
- package/patterns/shell-foundation/example/package.json +5 -5
- package/patterns/shell-foundation/example/packages/main/package.json +1 -1
- package/reference/autogen/PATTERN_INDEX.md +185 -20
- package/reference/autogen/README.md +8 -2
- package/reference/autogen/packages/auth-provider-local-core.md +3 -5
- package/reference/autogen/packages/connector-google-calendar.md +42 -0
- package/reference/autogen/packages/connectors-catalog.md +1320 -0
- package/reference/autogen/packages/connectors-core.md +85 -0
- package/reference/autogen/packages/connectors-web.md +31 -0
- package/reference/autogen/packages/payments-core.md +79 -0
- package/reference/autogen/packages/payments-web.md +37 -0
- package/reference/autogen/packages/{google-rewarded-core.md → rewarded-core.md} +36 -36
- package/reference/autogen/packages/rewarded-web.md +75 -0
- package/reference/autogen/packages/workspaces-core.md +7 -0
- package/skills/jskit/references/pattern-index.md +185 -20
- package/skills/jskit/references/patterns/app/minimal-foundation/example/package.json +4 -4
- package/skills/jskit/references/patterns/app/shell-foundation/example/package.json +5 -5
- package/skills/jskit/references/patterns/app/shell-foundation/example/packages/main/package.json +1 -1
- package/skills/jskit/references/patterns/auth/supabase-auth/PATTERN.md +25 -0
- package/skills/jskit/references/patterns/auth/supabase-auth/example/package.json +1 -1
- package/skills/jskit/references/patterns/connectors/ai-connections/PATTERN.md +84 -0
- package/skills/jskit/references/patterns/connectors/ai-connections/example/ai-model.js +11 -0
- package/skills/jskit/references/patterns/connectors/ai-connections/example/perplexity-answer.js +29 -0
- package/skills/jskit/references/patterns/connectors/api-key-connection/PATTERN.md +368 -0
- package/skills/jskit/references/patterns/connectors/api-key-connection/example/connections.js +18 -0
- package/skills/jskit/references/patterns/connectors/api-key-connection/example/integrations.json +19 -0
- package/skills/jskit/references/patterns/connectors/assistant-mcp/PATTERN.md +110 -0
- package/skills/jskit/references/patterns/connectors/assistant-mcp/example/integrations.json +13 -0
- package/skills/jskit/references/patterns/connectors/assistant-mcp-oauth/PATTERN.md +235 -0
- package/skills/jskit/references/patterns/connectors/assistant-mcp-oauth/example/integrations.json +102 -0
- package/skills/jskit/references/patterns/connectors/aws-storage-queries/PATTERN.md +169 -0
- package/skills/jskit/references/patterns/connectors/aws-storage-queries/example/formats/data-formats.js +35 -0
- package/skills/jskit/references/patterns/connectors/aws-storage-queries/example/formats/package-lock.json +49 -0
- package/skills/jskit/references/patterns/connectors/aws-storage-queries/example/formats/package.json +12 -0
- package/skills/jskit/references/patterns/connectors/aws-storage-queries/example/formats/verify-formats.mjs +37 -0
- package/skills/jskit/references/patterns/connectors/aws-storage-queries/example/integrations.json +38 -0
- package/skills/jskit/references/patterns/connectors/aws-storage-queries/example/s3-transfer.js +34 -0
- package/skills/jskit/references/patterns/connectors/calendar-cli/PATTERN.md +106 -0
- package/skills/jskit/references/patterns/connectors/calendar-cli/example/.env.example +6 -0
- package/skills/jskit/references/patterns/connectors/calendar-cli/example/integrations.json +23 -0
- package/skills/jskit/references/patterns/connectors/calendar-cli/example/knexfile.js +5 -0
- package/skills/jskit/references/patterns/connectors/calendar-cli/example/package.json +16 -0
- package/skills/jskit/references/patterns/connectors/calendar-cli/example/scripts/calendar.js +102 -0
- package/skills/jskit/references/patterns/connectors/event-delivery/PATTERN.md +151 -0
- package/skills/jskit/references/patterns/connectors/event-delivery/example/integrations.json +17 -0
- package/skills/jskit/references/patterns/connectors/firebase-messaging/PATTERN.md +156 -0
- package/skills/jskit/references/patterns/connectors/firebase-messaging/example/server/notifications.js +23 -0
- package/skills/jskit/references/patterns/connectors/google-ads-search/PATTERN.md +92 -0
- package/skills/jskit/references/patterns/connectors/google-ads-search/example/ads-setup.js +25 -0
- package/skills/jskit/references/patterns/connectors/oauth-connection/PATTERN.md +724 -0
- package/skills/jskit/references/patterns/connectors/oauth-connection/example/integrations.json +20 -0
- package/skills/jskit/references/patterns/connectors/paddle-catalogue/PATTERN.md +78 -0
- package/skills/jskit/references/patterns/connectors/paddle-catalogue/example/create-products.js +38 -0
- package/skills/jskit/references/patterns/connectors/public-image/PATTERN.md +84 -0
- package/skills/jskit/references/patterns/connectors/public-image/example/integrations.json +13 -0
- package/skills/jskit/references/patterns/connectors/public-image/example/logo-url.js +16 -0
- package/skills/jskit/references/patterns/connectors/redshift-queries/PATTERN.md +150 -0
- package/skills/jskit/references/patterns/connectors/redshift-queries/example/integrations.json +33 -0
- package/skills/jskit/references/patterns/connectors/source-scanning/PATTERN.md +83 -0
- package/skills/jskit/references/patterns/connectors/source-scanning/example/source-scanner.js +13 -0
- package/skills/jskit/references/patterns/crud/json-api-resource-package/example/packages/books/package.json +2 -2
- package/skills/jskit/references/patterns/database/mysql-application/example/package.json +1 -1
- package/skills/jskit/references/patterns/database/postgres-application/example/package.json +1 -1
- package/skills/jskit/references/patterns/realtime/realtime-application/example/package.json +2 -2
- package/skills/jskit/references/patterns/rewards/google-rewarded/PATTERN.md +69 -0
- package/skills/jskit/references/patterns/rewards/google-rewarded/example/GoogleRewardedDeliveryProvider.js +12 -0
- package/skills/jskit/references/patterns/rewards/google-rewarded/example/googlePublisherTag.js +142 -0
- package/skills/jskit/references/patterns/server/feature-package/example/booking-engine/package.json +1 -1
- package/skills/jskit/references/patterns/users/user-administration-server/example/packages/users/package.json +2 -2
- package/skills/jskit/references/patterns/users/user-administration-server/example/packages/users-workspace/package.json +3 -3
- package/reference/autogen/packages/google-rewarded-web.md +0 -65
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { readFile } from "node:fs/promises";
|
|
2
|
+
import { parseIntegrationConfiguration } from "@jskit-ai/connectors-core/shared/configuration";
|
|
3
|
+
import { createConnectionService, createEnvironmentReferenceResolver } from "@jskit-ai/connectors-core/server";
|
|
4
|
+
import { createFileConnectionStore, createCredentialProtection } from "@jskit-ai/connectors-core/server/file-storage";
|
|
5
|
+
import { firebaseCloudMessagingProvider } from "@jskit-ai/connectors-catalog/server/firebase-cloud-messaging";
|
|
6
|
+
|
|
7
|
+
export async function openNotificationConnections({
|
|
8
|
+
configurationPath, runtimeDirectory, credentialKey, environment,
|
|
9
|
+
authorizeConnectionOperation
|
|
10
|
+
}) {
|
|
11
|
+
const providers = [firebaseCloudMessagingProvider];
|
|
12
|
+
const configuration = parseIntegrationConfiguration(
|
|
13
|
+
await readFile(configurationPath, "utf8"), { providers }
|
|
14
|
+
);
|
|
15
|
+
const protection = createCredentialProtection({
|
|
16
|
+
keys: { current: credentialKey }, activeKeyId: "current"
|
|
17
|
+
});
|
|
18
|
+
const store = createFileConnectionStore({ directory: runtimeDirectory, protection });
|
|
19
|
+
return createConnectionService({ configuration, providers, store,
|
|
20
|
+
resolveReference: createEnvironmentReferenceResolver(environment),
|
|
21
|
+
authorize: authorizeConnectionOperation
|
|
22
|
+
});
|
|
23
|
+
}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: connectors/google-ads-search
|
|
3
|
+
title: Existing-account Google Ads Search
|
|
4
|
+
summary: Compose reviewed Search campaigns with project-owned Google OAuth and portable saved plans.
|
|
5
|
+
keywords: google, ads, search, campaigns, conversion, cli, connectors
|
|
6
|
+
requires: @jskit-ai/connectors-core, @jskit-ai/connectors-catalog
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Existing-account Google Ads Search
|
|
10
|
+
|
|
11
|
+
## Use when
|
|
12
|
+
|
|
13
|
+
Use the application's normal configuration, Env resolution, OAuth connection
|
|
14
|
+
store and authenticated administrator policy. This is an optional application
|
|
15
|
+
command composition fragment, not an editor dependency of the runtime library.
|
|
16
|
+
|
|
17
|
+
## Framework APIs
|
|
18
|
+
|
|
19
|
+
```js
|
|
20
|
+
import { createGoogleAdsSearchService } from '@jskit-ai/connectors-catalog/server/google-ads-search';
|
|
21
|
+
const ads = createGoogleAdsSearchService({ connections, configuration, context, integrationId });
|
|
22
|
+
const review = await ads.preview(); // local and Google validation only
|
|
23
|
+
// Only after the administrator reviews it:
|
|
24
|
+
const created = await ads.create(review.reviewId); // starts PAUSED
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
`configuration.extensions.googleAdsSearch[integrationId]` holds the saved plan.
|
|
28
|
+
Validate it with `validateGoogleAdsSearchPlan` from the package's shared
|
|
29
|
+
`google-ads-search` export. Keep OAuth settings separate so campaign edits do not
|
|
30
|
+
invalidate consent. The runtime has no Vibe64 protocol, frontend, Env injection or
|
|
31
|
+
storage owner. CLI apps can call it directly. Normal `connections.authorize` must
|
|
32
|
+
authorize the trusted application's advertising administrator for each operation;
|
|
33
|
+
never accept a subject identity from a request body.
|
|
34
|
+
|
|
35
|
+
For Vibe64, compose `example/ads-setup.js` into the app's existing Integration setup
|
|
36
|
+
command and return exactly one JSON result on stdout. Derive `context` and the
|
|
37
|
+
allowed integration ID from trusted command composition before calling the
|
|
38
|
+
fragment. Keep connection status/connect/reconnect/disconnect operations intact.
|
|
39
|
+
Read the public Vibe64 `application-google-ads.md` command contract when targeting
|
|
40
|
+
that editor. Other frameworks implement its JSON/Env and operation contract with
|
|
41
|
+
their native libraries; they do not execute this JavaScript fragment.
|
|
42
|
+
|
|
43
|
+
The Search recipe supports only non-political manual-CPC campaigns with one ad
|
|
44
|
+
group, phrase keywords and a website conversion goal. Account creation, PMax,
|
|
45
|
+
Demand Gen, billing provisioning and automatic assistant tool attachment are not
|
|
46
|
+
implemented. Google API validation does not establish account approval, website
|
|
47
|
+
readiness or conversion-tag installation. The operator must verify those before
|
|
48
|
+
the separately reviewed launch. Lost write responses are uncertain: inspect the
|
|
49
|
+
provider instead of replaying the operation. Disconnect does not stop ad spend.
|
|
50
|
+
|
|
51
|
+
## Do not use when
|
|
52
|
+
|
|
53
|
+
Do not use this recipe to provision accounts, build PMax/Demand Gen campaigns or
|
|
54
|
+
expose an unrestricted advertising endpoint to unauthenticated app users.
|
|
55
|
+
|
|
56
|
+
## Product decisions
|
|
57
|
+
|
|
58
|
+
Select the existing client account, website lead goal, location/language, budget,
|
|
59
|
+
manual CPC bid and copy. Store them in the saved Search plan, not OAuth settings.
|
|
60
|
+
Confirm non-political advertising and separately approve actual launch/spending.
|
|
61
|
+
|
|
62
|
+
## Invariants
|
|
63
|
+
|
|
64
|
+
The application owns the Google connection, trusted account authorization and
|
|
65
|
+
persistent OAuth grants. Reviews include live account values and the saved plan.
|
|
66
|
+
Creation is paused and atomic; launch rechecks the live review. Do not replay a
|
|
67
|
+
write after an uncertain response. Disconnecting does not pause campaigns.
|
|
68
|
+
|
|
69
|
+
## Example files
|
|
70
|
+
|
|
71
|
+
`example/ads-setup.js` maps the optional editor command to the shared service. It
|
|
72
|
+
contains no HTTP endpoint, credential resolution or trusted-identity inference.
|
|
73
|
+
|
|
74
|
+
## Variation points
|
|
75
|
+
|
|
76
|
+
CLI apps invoke the service directly. App-owned setup commands adapt the same
|
|
77
|
+
service to their host. Other frameworks use native Google APIs and the same
|
|
78
|
+
portable plan/operation semantics; they do not run this JavaScript fragment.
|
|
79
|
+
|
|
80
|
+
## Verification
|
|
81
|
+
|
|
82
|
+
Use controlled provider responses to check precise money strings, targeting,
|
|
83
|
+
OAuth preservation, validate-only review, paused creation, stale-review rejection,
|
|
84
|
+
explicit launch confirmation and no automatic replay of failed writes. Test
|
|
85
|
+
normal application authorization before resolving credentials. Actual Google
|
|
86
|
+
approval and conversion/billing readiness require operator verification.
|
|
87
|
+
|
|
88
|
+
## Avoid
|
|
89
|
+
|
|
90
|
+
Do not put secrets in JSON, stdout or chat. Do not execute conversion snippets in
|
|
91
|
+
the editor, confuse OAuth consent with advertiser approval, or claim live account
|
|
92
|
+
acceptance from fixture tests. Keep larger campaign types outside this recipe.
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
// Compose the service in the application's existing authenticated command owner.
|
|
2
|
+
// No stdin value establishes the trusted application/administrator identity.
|
|
3
|
+
export async function dispatchAdsSetup(request, service) {
|
|
4
|
+
if (request?.protocol !== "vibe64.integration-setup.command.v1" || typeof request.requestId !== "string" ||
|
|
5
|
+
!/^[A-Za-z0-9_-]{1,200}$/.test(request.requestId) || !request.ads || Array.isArray(request.ads) || typeof request.ads !== "object") {
|
|
6
|
+
throw new Error("Invalid advertising setup request.");
|
|
7
|
+
}
|
|
8
|
+
const args = request.ads;
|
|
9
|
+
let data;
|
|
10
|
+
switch (request.operation) {
|
|
11
|
+
case "ads-discover": data = await service.discover(args.customerId); break;
|
|
12
|
+
case "ads-targets": data = await service.targets(args.customerId, args.name); break;
|
|
13
|
+
case "ads-conversion": data = await service.createConversion(args); break;
|
|
14
|
+
case "ads-preview": data = await service.preview(); break;
|
|
15
|
+
case "ads-create": data = await service.create(args.reviewId); break;
|
|
16
|
+
case "ads-campaign": data = await service.campaign(args.campaignId); break;
|
|
17
|
+
case "ads-launch": data = await service.launch(args); break;
|
|
18
|
+
case "ads-pause": data = await service.pause(args.campaignId); break;
|
|
19
|
+
case "ads-report": data = await service.report(); break;
|
|
20
|
+
default: throw new Error("Unsupported advertising setup operation.");
|
|
21
|
+
}
|
|
22
|
+
const response = { protocol: request.protocol, requestId: request.requestId, status: "ads", operation: request.operation, data };
|
|
23
|
+
if (Buffer.byteLength(JSON.stringify(response)) > 32768) throw new Error("Advertising result exceeds the editor's display limit. Inspect Google Ads before repeating any write.");
|
|
24
|
+
return response;
|
|
25
|
+
}
|