@sequenceholdings/artifact-studio 0.10.0 → 0.11.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.
@@ -0,0 +1,34 @@
1
+ import { createConsumerPlatformClient } from '@sequenceholdings/platform/browser';
2
+ import { createArtifactServerClient } from './client.js';
3
+ /** Shared endpoint clients are bound to the existing verified broker, never a bearer fallback. */
4
+ export function createArtifactServerPlatformAdapter(client) {
5
+ const shared = createConsumerPlatformClient({ transport: {
6
+ request: ({ path, method, body }) => client.api[method === 'GET' ? 'get' : method === 'POST' ? 'post' : method === 'PUT' ? 'put' : method === 'PATCH' ? 'patch' : 'delete'](path, body),
7
+ } });
8
+ return {
9
+ ...shared,
10
+ context: client.context,
11
+ principal: client.principal,
12
+ mode: client.mode,
13
+ log: client.log,
14
+ api: client.api,
15
+ /** Broker domains retain their narrower, manifest-declared operation contracts. */
16
+ agents: { ...shared.agents, ...client.agents },
17
+ groups: { ...shared.groups, ...client.groups },
18
+ functions: { ...shared.functions, invoke: ({ id, params }) => client.functions.invoke(id, params) },
19
+ storage: client.storage,
20
+ processes: client.processes,
21
+ flags: client.flags,
22
+ audit: client.audit,
23
+ files: { ...shared.files, download: (input) => client.api.fetch(shared.files.downloadPath(input)) },
24
+ };
25
+ }
26
+ /** One per Next.js request. Uses the same context verification and explicit service transition as the legacy factory. */
27
+ export async function createArtifactServerPlatformClient(options) {
28
+ const client = await createArtifactServerClient(options);
29
+ const adapt = (source) => ({
30
+ ...source.platform,
31
+ asService: () => adapt(source.asService()),
32
+ });
33
+ return adapt(client);
34
+ }
package/dist/server.d.ts CHANGED
@@ -20,3 +20,5 @@ export type { ArtifactGroupDetail, ArtifactGroupDirectoryPage, ArtifactGroupDire
20
20
  export type { ArtifactTaskAssignments } from './server/task-assignments.js';
21
21
  export type { ArtifactGroupTasksQuery, ArtifactGroupTasksPage } from './server/task-assignments.js';
22
22
  export type { ArtifactHumanCompletionQuery, ArtifactHumanCompletion, ArtifactHumanContinuation } from './server/human-completion.js';
23
+ export { createArtifactServerPlatformClient } from './server/platform-client.js';
24
+ export type { ArtifactServerPlatform, ArtifactServerPlatformClient } from './server/platform-client.js';
package/dist/server.js CHANGED
@@ -6,3 +6,4 @@ export { getArtifactRequestContext, readArtifactRuntimeConfig } from './server/r
6
6
  export { ArtifactContextError, getArtifactBrowserBootstrap, ARTIFACT_REQUEST_AUTHENTICATION_HEADER, verifyArtifactRequestAuthentication } from './server/request-context.js';
7
7
  export { verifyArtifactExternalContext } from './server/external-context.js';
8
8
  export { externalEvidence } from './server/principal.js';
9
+ export { createArtifactServerPlatformClient } from './server/platform-client.js';
@@ -186,6 +186,10 @@ own origin rather than a neighbour's. When the application origin is on a
186
186
  different site from its Atlas frame, a cookie it needs there must also be
187
187
  `SameSite=None; Partitioned`, or the browser drops it.
188
188
 
189
+ For the same reason, the gateway refuses any `POST`, `PUT`, `PATCH`, `DELETE` or
190
+ WebSocket upgrade whose `Origin` is not your application's own. It does not guard
191
+ `GET`, `HEAD` or `OPTIONS`, so never change state in response to them.
192
+
189
193
  The local process is ordinary code running as your operating-system user.
190
194
  Atlas governs access to platform resources; it does not sandbox your laptop's
191
195
  filesystem or all outbound network connections.
@@ -12,6 +12,7 @@ minimumReleaseAgeExclude:
12
12
  - '@sequenceholdings/custom-roles-manifest'
13
13
  - '@sequenceholdings/lattice-form-renderer'
14
14
  - '@sequenceholdings/orm'
15
+ - '@sequenceholdings/platform'
15
16
  - '@sequenceholdings/storage'
16
17
  strictDepBuilds: true
17
18
  allowBuilds:
@@ -10,7 +10,7 @@
10
10
  },
11
11
  "dependencies": {},
12
12
  "devDependencies": {
13
- "@sequenceholdings/artifact-studio": "^0.10.0",
13
+ "@sequenceholdings/artifact-studio": "^0.11.0",
14
14
  "@sequenceholdings/atlas-ui": "^3.1.1",
15
15
  "@tailwindcss/postcss": "^4.2.2",
16
16
  "@tailwindcss/vite": "^4.2.2",
package/package.json CHANGED
@@ -9,7 +9,7 @@
9
9
  "publishConfig": {
10
10
  "access": "public"
11
11
  },
12
- "version": "0.10.0",
12
+ "version": "0.11.0",
13
13
  "description": "SDK types and CLI library for building Artifact Studio apps. Driven via `seq-studio artifact <sub>` (@sequenceholdings/studio-cli), which runs the `./cli` runCli export.",
14
14
  "type": "module",
15
15
  "exports": {
@@ -171,9 +171,10 @@
171
171
  "google-auth-library": "^10.5.0",
172
172
  "server-only": "0.0.1",
173
173
  "parse5": "7.3.0",
174
+ "@sequenceholdings/storage": "0.1.3",
174
175
  "@sequenceholdings/lattice-form-renderer": "0.2.0",
175
- "@sequenceholdings/storage": "0.1.2",
176
- "@sequenceholdings/orm": "2.7.0"
176
+ "@sequenceholdings/orm": "2.8.1",
177
+ "@sequenceholdings/platform": "0.1.0"
177
178
  },
178
179
  "devDependencies": {
179
180
  "@types/js-yaml": "^4.0.9",
@@ -186,6 +186,10 @@ own origin rather than a neighbour's. When the application origin is on a
186
186
  different site from its Atlas frame, a cookie it needs there must also be
187
187
  `SameSite=None; Partitioned`, or the browser drops it.
188
188
 
189
+ For the same reason, the gateway refuses any `POST`, `PUT`, `PATCH`, `DELETE` or
190
+ WebSocket upgrade whose `Origin` is not your application's own. It does not guard
191
+ `GET`, `HEAD` or `OPTIONS`, so never change state in response to them.
192
+
189
193
  The local process is ordinary code running as your operating-system user.
190
194
  Atlas governs access to platform resources; it does not sandbox your laptop's
191
195
  filesystem or all outbound network connections.
@@ -12,6 +12,7 @@ minimumReleaseAgeExclude:
12
12
  - '@sequenceholdings/custom-roles-manifest'
13
13
  - '@sequenceholdings/lattice-form-renderer'
14
14
  - '@sequenceholdings/orm'
15
+ - '@sequenceholdings/platform'
15
16
  - '@sequenceholdings/storage'
16
17
  strictDepBuilds: true
17
18
  allowBuilds:
@@ -10,7 +10,7 @@
10
10
  },
11
11
  "dependencies": {},
12
12
  "devDependencies": {
13
- "@sequenceholdings/artifact-studio": "^0.10.0",
13
+ "@sequenceholdings/artifact-studio": "^0.11.0",
14
14
  "@sequenceholdings/atlas-ui": "^3.1.1",
15
15
  "@tailwindcss/postcss": "^4.2.2",
16
16
  "@tailwindcss/vite": "^4.2.2",