History

Move product access rules out of the SDK

Rhys Sullivan committed 1 month ago

Commit c676e561 parent a72e51d161 files · +3935 −867Browse files

Showing the changes to examples/docs-sdk-quickstart (2 of 161 files). Show all

Unified · Split

2 files
  1. examples/docs-sdk-quickstart/package.json +1 −0
  2. examples/docs-sdk-quickstart/src/main.ts +4 −0
examples/docs-sdk-quickstart/package.json+1−0
@@ -10,6 +10,7 @@ · 9 unmodified lines
10 },10 },
11 "dependencies": {11 "dependencies": {
12 "@executor-js/plugin-openapi": "workspace:*",12 "@executor-js/plugin-openapi": "workspace:*",
13 "@executor-js/product-access": "workspace:*",
13 "@executor-js/sdk": "workspace:*",14 "@executor-js/sdk": "workspace:*",
14 "effect": "catalog:"15 "effect": "catalog:"
15 },16 },
examples/docs-sdk-quickstart/src/main.ts+4−0
@@ -8,6 +8,7 @@ import { · 7 unmodified lines
8 type CredentialProvider,8 type CredentialProvider,
9} from "@executor-js/sdk/promise";9} from "@executor-js/sdk/promise";
10import { openApiPlugin, variable } from "@executor-js/plugin-openapi/promise";10import { openApiPlugin, variable } from "@executor-js/plugin-openapi/promise";
11import { workspaceServiceAccess } from "@executor-js/product-access";
11 12
12const inventoryApi = {13const inventoryApi = {
13 openapi: "3.0.0",14 openapi: "3.0.0",
@@ -92,6 +93,9 @@ const memoryProvider: CredentialProvider = { · 78 unmodified lines
92};93};
93 94
94const executor = await createExecutor({95const executor = await createExecutor({
96 // Subject-less single-workspace embedder: the product posture is stated
97 // explicitly — the SDK ships no default.
98 access: workspaceServiceAccess(),
95 plugins: [openApiPlugin()],99 plugins: [openApiPlugin()],
96 providers: [memoryProvider],100 providers: [memoryProvider],
97 onElicitation: "accept-all",101 onElicitation: "accept-all",

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t