@diagonal-hq/workflows 0.10.4 → 0.10.6

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/README.md CHANGED
@@ -55,7 +55,7 @@ export default defineWorkflow(
55
55
 
56
56
  A migration with `export const config` or `title` still builds, with a warning.
57
57
 
58
- Create a file with `diagonal make:migration <name>`, or `npm run migration -- <name>` in a workspace template. It creates `migrations/YYYYMMDDHHmmss_name.ts`. Deployment activation queues all new filenames independently as ordinary asynchronous workflows. They can run concurrently. The timestamp sorts filenames for listing and history and does not enforce execution order. Put dependent operations in one script. The platform records the filename for the workspace environment in Postgres before launch. It records every terminal outcome and never launches that filename again. Manual and nested workflow calls cannot run migration files. Inspect the existing workflow execution status for a failure, then add a new migration file to correct it.
58
+ Create a file with `npx diagonal make:migration <name>`. It creates `migrations/YYYYMMDDHHmmss_name.ts`. Deployment activation queues all new filenames independently as ordinary asynchronous workflows. They can run concurrently. The timestamp sorts filenames for listing and history and does not enforce execution order. Put dependent operations in one script. The platform records the filename for the workspace environment in Postgres before launch. It records every terminal outcome and never launches that filename again. Manual and nested workflow calls cannot run migration files. Inspect the existing workflow execution status for a failure, then add a new migration file to correct it.
59
59
 
60
60
  Migrations run after schema activation. Existing schema safety guards still apply. Deploy a new field as optional, fill it in a migration, then make it required in a later release. A failed migration can leave completed writes in place, so account for those writes in the correction.
61
61
 
@@ -97,7 +97,7 @@ function isFailure(value2) {
97
97
  }
98
98
 
99
99
  // packages/workflows/src/generated/capabilities.ts
100
- var SDK_VERSION = 79;
100
+ var SDK_VERSION = 80;
101
101
  var ai = {
102
102
  /** Ask a decisions model typed questions about some content and get labelled answers with their probabilities */
103
103
  decide: (input) => invoke("ai.decide", input),
@@ -152,7 +152,7 @@ var data = {
152
152
  /** Find a record by attributes, or create a new one when no match exists */
153
153
  findOrCreate: (input) => invoke("data.find-or-create", input),
154
154
  relation: {
155
- /** Attach a related record to a singular relation (BelongsTo, HasOne) */
155
+ /** Attach a related record to a relation. Plural relations (BelongsToMany, HasMany) keep their existing records. */
156
156
  attach: (input) => invoke("data.relation.attach", input),
157
157
  /** Attach related records to a plural relation (BelongsToMany, HasMany) */
158
158
  attachMany: (input) => invoke("data.relation.attach-many", input),
@@ -1,7 +1,7 @@
1
1
  import type { ResourceKeyWith } from "../data.js";
2
2
  import type { ContentDocument } from "../input.js";
3
3
  import type { DeepReadonly, Liquid, StaticLiquid } from "../liquid.js";
4
- export declare const SDK_VERSION = 79;
4
+ export declare const SDK_VERSION = 80;
5
5
  export interface WorkspaceSystemFields {
6
6
  "ai_custom_system_prompt": string | null;
7
7
  "brand_kit": {
@@ -2158,7 +2158,7 @@ export declare const data: {
2158
2158
  /** Find a record by attributes, or create a new one when no match exists */
2159
2159
  findOrCreate: (input: DataFindOrCreateInput) => Promise<DataFindOrCreateOutput>;
2160
2160
  relation: {
2161
- /** Attach a related record to a singular relation (BelongsTo, HasOne) */
2161
+ /** Attach a related record to a relation. Plural relations (BelongsToMany, HasMany) keep their existing records. */
2162
2162
  attach: (input: DataRelationAttachInput) => Promise<DataRelationAttachOutput>;
2163
2163
  /** Attach related records to a plural relation (BelongsToMany, HasMany) */
2164
2164
  attachMany: (input: DataRelationAttachManyInput) => Promise<DataRelationAttachManyOutput>;
package/dist/index.js CHANGED
@@ -37,7 +37,7 @@ import {
37
37
  web,
38
38
  workflow,
39
39
  workspace
40
- } from "./chunks/chunk-YZBFKUC2.js";
40
+ } from "./chunks/chunk-TLV6MFLC.js";
41
41
  import {
42
42
  InputField,
43
43
  InputSchema,
@@ -35,7 +35,7 @@ import {
35
35
  web,
36
36
  workflow,
37
37
  workspace
38
- } from "../chunks/chunk-YZBFKUC2.js";
38
+ } from "../chunks/chunk-TLV6MFLC.js";
39
39
  import {
40
40
  InputField,
41
41
  InputSchema,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@diagonal-hq/workflows",
3
- "version": "0.10.4",
3
+ "version": "0.10.6",
4
4
  "description": "The authoring API of Diagonal managed workflows, their capabilities, and the workflow test helpers.",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "repository": {