@processfocus/runtime-local 0.1.0-next.1 → 0.1.0-next.2

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
@@ -9,9 +9,9 @@ Use Bun 1.4.2 and Node.js 26 (verified on Linux with Node 26.3.1).
9
9
  Install the fixed release group in your organisation project:
10
10
 
11
11
  ```bash
12
- bun add @processfocus/cli@0.1.0-next.1 \
13
- @processfocus/runtime-local@0.1.0-next.1 \
14
- processfocus@0.1.0-next.1
12
+ bun add @processfocus/cli@0.1.0-next.2 \
13
+ @processfocus/runtime-local@0.1.0-next.2 \
14
+ processfocus@0.1.0-next.2
15
15
  ```
16
16
 
17
17
  Define standard project scripts:
@@ -23,12 +23,12 @@ import {
23
23
  LocalCedarConfigStatic,
24
24
  LocalCedarConfigHotReload,
25
25
  LocalCedarAuthorizationLive
26
- } from "./chunk-fn7b5pxw.js";
26
+ } from "./chunk-yhzbn4vx.js";
27
27
  import {
28
28
  serveOnExactPort,
29
29
  serveWithPortFallback,
30
30
  writePortFile
31
- } from "./chunk-6b6t8tyq.js";
31
+ } from "./chunk-6ntmymmx.js";
32
32
 
33
33
  // src/authentication-server/authentication-server.ts
34
34
  import { parseArgs as utilParseArgs } from "util";
@@ -172,7 +172,7 @@ import {
172
172
  retryTransientSqliteError,
173
173
  PolicyWatcherService,
174
174
  LocalCedarConfig
175
- } from "./chunk-fn7b5pxw.js";
175
+ } from "./chunk-yhzbn4vx.js";
176
176
  import {
177
177
  __toESM,
178
178
  __commonJS,
@@ -45662,6 +45662,8 @@ var startProcessExecution = (processId, processPath, startStepPath, state, optio
45662
45662
  const startInTransaction = sqlClient.withTransaction(Effect20.gen(function* () {
45663
45663
  const { processStateId, stepId } = yield* processExecutionOps.insertProcessState(processId, startStepPath, state, startedByExternalParticipantId, completedByRoleId);
45664
45664
  const executionId = yield* processExecutionOps.insertProcessExecution(processStateId, callerExecutionId, options.withoutWaiting ?? false);
45665
+ if (options.onSubmit)
45666
+ yield* options.onSubmit;
45665
45667
  const scheduledFlowId = enqueueStartSystemStep ? undefined : yield* scheduledFlowOps.insertScheduledFlow(executionId, stepId, {
45666
45668
  ...completedByRoleId !== undefined ? { completedByRoleId } : {}
45667
45669
  });
@@ -45729,6 +45731,13 @@ var startProcessExecution = (processId, processPath, startStepPath, state, optio
45729
45731
  timestamp: DateTime6.formatIso(requestTime)
45730
45732
  };
45731
45733
  });
45734
+ var executeFormSubmission = (step, input) => {
45735
+ if (typeof step.executeSubmit !== "function")
45736
+ return Effect20.void;
45737
+ return step.executeSubmit(input).pipe(Effect20.mapError((error) => new InputValidationError({
45738
+ errors: [{ field: error.field, message: error.message }]
45739
+ })));
45740
+ };
45732
45741
  var startProcess = (processId, processPath, startStepPath, input, inputSchema, step, context, options) => Effect20.gen(function* () {
45733
45742
  yield* checkRestrictedFieldSubmissions(context, startStepPath, input, step);
45734
45743
  const currentProviderUser = currentProviderUserDefault(context);
@@ -45771,6 +45780,7 @@ var startProcess = (processId, processPath, startStepPath, input, inputSchema, s
45771
45780
  }
45772
45781
  return yield* startProcessExecution(processId, processPath, startStepPath, validatedInput, {
45773
45782
  ...options,
45783
+ onSubmit: executeFormSubmission(step, validatedInput),
45774
45784
  trigger: processStartTriggerForSession(context.jwt?.properties),
45775
45785
  ...normalizedExternalParticipantEmail ? { externalParticipantEmail: normalizedExternalParticipantEmail } : {}
45776
45786
  });
@@ -45980,6 +45990,7 @@ var completeStep = (todoId, input, step, inputSchema, context, options = {}) =>
45980
45990
  }
45981
45991
  }
45982
45992
  }
45993
+ yield* executeFormSubmission(step, validatedInput);
45983
45994
  const scheduledFlowId = todoInfo.barrierScheduledFlowId ? todoInfo.barrierScheduledFlowId : yield* scheduledFlowOps.insertOrGetScheduledFlow(todoId, todoInfo.processExecutionId, todoInfo.targetStepId, {
45984
45995
  ...completedByRoleId !== undefined ? { completedByRoleId } : {}
45985
45996
  });
@@ -48664,6 +48675,16 @@ var systemSchema = Effect32.gen(function* () {
48664
48675
  }))
48665
48676
  };
48666
48677
  }),
48678
+ execution: (_parent, args, context) => Effect32.gen(function* () {
48679
+ const executionOps = yield* ExecutionCollectionOps;
48680
+ const [row] = yield* executionOps.getByIds([args.id]);
48681
+ if (!row)
48682
+ return null;
48683
+ const principal = yield* buildStepPrincipal(context);
48684
+ const document2 = yield* executionOps.mapToGraphql(row);
48685
+ const [authorized] = yield* filterAuthorizedExecutions([document2], principal);
48686
+ return authorized ?? null;
48687
+ }),
48667
48688
  executions: (_parent, args, context) => Effect32.gen(function* () {
48668
48689
  const executionOps = yield* ExecutionCollectionOps;
48669
48690
  const principal = yield* buildStepPrincipal(context);
@@ -48926,7 +48947,11 @@ var systemSchema = Effect32.gen(function* () {
48926
48947
  }
48927
48948
  return yield* Effect32.forEach(accessibleLists, (list) => Effect32.gen(function* () {
48928
48949
  const canCreate = list.hasCreate && (yield* auth.canCreateList(principal, new ListRef(normalizePath(list.node.path), rolePathsForList(list.roles))).pipe(Effect32.orElseSucceed(() => false)));
48950
+ const startProcesses = list.startProcess ? yield* filterAuthorizedProcessRows(context, [
48951
+ list.startProcess
48952
+ ]) : [];
48929
48953
  return {
48954
+ startProcess: startProcesses[0] ?? null,
48930
48955
  canCreate,
48931
48956
  id: normalizePath(list.node.path),
48932
48957
  path: normalizePath(list.node.path),
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  PortFileContentJson,
4
4
  decodePortFromFileContent
5
- } from "./chunk-fn7b5pxw.js";
5
+ } from "./chunk-yhzbn4vx.js";
6
6
 
7
7
  // src/server-utils.ts
8
8
  import { readFileSync, writeFileSync } from "fs";
@@ -14013,6 +14013,8 @@ var countLeafFields = (value) => {
14013
14013
  };
14014
14014
  var FormRuleSelf = Symbol.for("processfocus:internal-tag/process/form-rule-self");
14015
14015
  var formRuleStateKeys = new Set(["hidden", "disabled", "required", "label"]);
14016
+ class FormSubmissionError extends Data26.TaggedError("FormSubmissionError") {
14017
+ }
14016
14018
  class LookupFieldNotFoundError extends Data26.TaggedError("LookupFieldNotFoundError") {
14017
14019
  }
14018
14020
 
@@ -54717,18 +54719,18 @@ var makeClient = (url, authToken, concurrentTransactionsEnabled, options) => Eff
54717
54719
  return resultRows(normalizeResultSet(result));
54718
54720
  });
54719
54721
  }
54720
- run = Effect133.fn("TursoCloudConnection.run")(function* (sql, params = []) {
54721
- return yield* this.runWithTokenRefresh(Effect133.gen(this, function* () {
54722
+ run(sql, params = []) {
54723
+ return this.runWithTokenRefresh(Effect133.gen(this, function* () {
54722
54724
  yield* this.ensurePragmas();
54723
54725
  return yield* this.runDirect(sql, params);
54724
54726
  }));
54725
- });
54726
- runRaw = Effect133.fn("TursoCloudConnection.runRaw")(function* (sql, params = []) {
54727
- return yield* this.runWithTokenRefresh(Effect133.gen(this, function* () {
54727
+ }
54728
+ runRaw(sql, params = []) {
54729
+ return this.runWithTokenRefresh(Effect133.gen(this, function* () {
54728
54730
  yield* this.ensurePragmas();
54729
54731
  return yield* this.withStatementSdk((session) => session.execute(sql, Array.from(params)).then(normalizeResultSet));
54730
54732
  }));
54731
- });
54733
+ }
54732
54734
  runBatch = Effect133.fn("TursoCloudConnection.runBatch")(function* (input) {
54733
54735
  if (input.foreignKeys === "enforced") {
54734
54736
  yield* this.ensurePragmas();
@@ -54987,14 +54989,15 @@ var makeClient2 = (path, options) => Effect134.gen(function* () {
54987
54989
  return yield* this.runValuesDirect(sql, params);
54988
54990
  });
54989
54991
  }
54990
- run = Effect134.fn("TursoConnection.run")(function* (sql, params = []) {
54991
- yield* this.ensurePragmas();
54992
- return yield* this.runDirect(sql, params);
54993
- });
54994
- runRaw = Effect134.fn("TursoConnection.runRaw")(function* (sql, params = []) {
54995
- yield* this.ensurePragmas();
54996
- return yield* this.runDirect(sql, params);
54997
- });
54992
+ run(sql, params = []) {
54993
+ return Effect134.gen(this, function* () {
54994
+ yield* this.ensurePragmas();
54995
+ return yield* this.runDirect(sql, params);
54996
+ });
54997
+ }
54998
+ runRaw(sql, params = []) {
54999
+ return this.run(sql, params);
55000
+ }
54998
55001
  execute(sql, params, transformRows) {
54999
55002
  return transformRows ? Effect134.map(this.run(sql, params), transformRows) : this.run(sql, params);
55000
55003
  }
@@ -11,6 +11,7 @@ import {
11
11
  Search,
12
12
  X,
13
13
  } from "lucide-react"
14
+ import Link from "next/link"
14
15
  import { useRouter, useSearchParams } from "next/navigation"
15
16
  import {
16
17
  createContext,
@@ -297,6 +298,16 @@ export function ListControlsClient({
297
298
  <h1 className="text-2xl font-bold text-slate-900 dark:text-white">
298
299
  {currentList.name}
299
300
  </h1>
301
+ {currentList.startProcess ? (
302
+ <Button asChild size="sm">
303
+ <Link
304
+ href={`/processes/start/${currentList.startProcess.startStepPath.replace(/^\//, "")}`}
305
+ prefetch={false}
306
+ >
307
+ {currentList.startProcess.name}
308
+ </Link>
309
+ </Button>
310
+ ) : null}
300
311
  {currentList.canCreate ? (
301
312
  <ListCreateButton
302
313
  listPath={listPath}
@@ -26,7 +26,7 @@ type Documents = {
26
26
  "\n query ProcessStateForExecution($executionId: ID!) {\n processStateForExecution(executionId: $executionId)\n }\n": typeof types.ProcessStateForExecutionDocument,
27
27
  "\n mutation RestartExecution($executionId: ID!) {\n restartExecution(executionId: $executionId) {\n success\n restartedCount\n error\n }\n }\n": typeof types.RestartExecutionDocument,
28
28
  "\n mutation AbandonExecution($executionId: ID!, $reason: String) {\n abandonExecution(executionId: $executionId, reason: $reason) {\n success\n error\n }\n }\n": typeof types.AbandonExecutionDocument,
29
- "\n query AvailableLists {\n availableLists {\n id\n path\n name\n detailName\n canCreate\n purpose\n queryName\n outputColumns {\n field\n label\n description\n visibleInList\n sortable\n }\n itemQueryName\n updateMutationName\n updateInputTypeName\n deleteMutationName\n editableColumns {\n field\n label\n description\n }\n }\n }\n": typeof types.AvailableListsDocument,
29
+ "\n query AvailableLists {\n availableLists {\n id\n path\n name\n detailName\n canCreate\n startProcess {\n name\n startStepPath\n }\n purpose\n queryName\n outputColumns {\n field\n label\n description\n visibleInList\n sortable\n }\n itemQueryName\n updateMutationName\n updateInputTypeName\n deleteMutationName\n editableColumns {\n field\n label\n description\n }\n }\n }\n": typeof types.AvailableListsDocument,
30
30
  "\n query ListFormMetadata($listPath: String!) {\n listFormMetadata(listPath: $listPath) {\n listPath\n listName\n updateMutationName\n updateInputTypeName\n deleteMutationName\n formDefinition\n defaultValues\n jsonSchema\n }\n }\n": typeof types.ListFormMetadataDocument,
31
31
  "\n mutation ExportListCsv(\n $listPath: String!\n $filter: String\n $sort: ListSortInput\n ) {\n exportListCsv(listPath: $listPath, filter: $filter, sort: $sort) {\n downloadUrl\n }\n }\n ": typeof types.ExportListCsvDocument,
32
32
  "\n query ListCreateFormMetadata($listPath: String!) {\n listCreateFormMetadata(listPath: $listPath) {\n createMutationName\n createInputTypeName\n formDefinition\n defaultValues\n jsonSchema\n }\n }\n": typeof types.ListCreateFormMetadataDocument,
@@ -70,7 +70,7 @@ const documents: Documents = {
70
70
  "\n query ProcessStateForExecution($executionId: ID!) {\n processStateForExecution(executionId: $executionId)\n }\n": types.ProcessStateForExecutionDocument,
71
71
  "\n mutation RestartExecution($executionId: ID!) {\n restartExecution(executionId: $executionId) {\n success\n restartedCount\n error\n }\n }\n": types.RestartExecutionDocument,
72
72
  "\n mutation AbandonExecution($executionId: ID!, $reason: String) {\n abandonExecution(executionId: $executionId, reason: $reason) {\n success\n error\n }\n }\n": types.AbandonExecutionDocument,
73
- "\n query AvailableLists {\n availableLists {\n id\n path\n name\n detailName\n canCreate\n purpose\n queryName\n outputColumns {\n field\n label\n description\n visibleInList\n sortable\n }\n itemQueryName\n updateMutationName\n updateInputTypeName\n deleteMutationName\n editableColumns {\n field\n label\n description\n }\n }\n }\n": types.AvailableListsDocument,
73
+ "\n query AvailableLists {\n availableLists {\n id\n path\n name\n detailName\n canCreate\n startProcess {\n name\n startStepPath\n }\n purpose\n queryName\n outputColumns {\n field\n label\n description\n visibleInList\n sortable\n }\n itemQueryName\n updateMutationName\n updateInputTypeName\n deleteMutationName\n editableColumns {\n field\n label\n description\n }\n }\n }\n": types.AvailableListsDocument,
74
74
  "\n query ListFormMetadata($listPath: String!) {\n listFormMetadata(listPath: $listPath) {\n listPath\n listName\n updateMutationName\n updateInputTypeName\n deleteMutationName\n formDefinition\n defaultValues\n jsonSchema\n }\n }\n": types.ListFormMetadataDocument,
75
75
  "\n mutation ExportListCsv(\n $listPath: String!\n $filter: String\n $sort: ListSortInput\n ) {\n exportListCsv(listPath: $listPath, filter: $filter, sort: $sort) {\n downloadUrl\n }\n }\n ": types.ExportListCsvDocument,
76
76
  "\n query ListCreateFormMetadata($listPath: String!) {\n listCreateFormMetadata(listPath: $listPath) {\n createMutationName\n createInputTypeName\n formDefinition\n defaultValues\n jsonSchema\n }\n }\n": types.ListCreateFormMetadataDocument,
@@ -167,7 +167,7 @@ export function graphql(source: "\n mutation AbandonExecution($executionId: ID!
167
167
  /**
168
168
  * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
169
169
  */
170
- export function graphql(source: "\n query AvailableLists {\n availableLists {\n id\n path\n name\n detailName\n canCreate\n purpose\n queryName\n outputColumns {\n field\n label\n description\n visibleInList\n sortable\n }\n itemQueryName\n updateMutationName\n updateInputTypeName\n deleteMutationName\n editableColumns {\n field\n label\n description\n }\n }\n }\n"): (typeof documents)["\n query AvailableLists {\n availableLists {\n id\n path\n name\n detailName\n canCreate\n purpose\n queryName\n outputColumns {\n field\n label\n description\n visibleInList\n sortable\n }\n itemQueryName\n updateMutationName\n updateInputTypeName\n deleteMutationName\n editableColumns {\n field\n label\n description\n }\n }\n }\n"];
170
+ export function graphql(source: "\n query AvailableLists {\n availableLists {\n id\n path\n name\n detailName\n canCreate\n startProcess {\n name\n startStepPath\n }\n purpose\n queryName\n outputColumns {\n field\n label\n description\n visibleInList\n sortable\n }\n itemQueryName\n updateMutationName\n updateInputTypeName\n deleteMutationName\n editableColumns {\n field\n label\n description\n }\n }\n }\n"): (typeof documents)["\n query AvailableLists {\n availableLists {\n id\n path\n name\n detailName\n canCreate\n startProcess {\n name\n startStepPath\n }\n purpose\n queryName\n outputColumns {\n field\n label\n description\n visibleInList\n sortable\n }\n itemQueryName\n updateMutationName\n updateInputTypeName\n deleteMutationName\n editableColumns {\n field\n label\n description\n }\n }\n }\n"];
171
171
  /**
172
172
  * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
173
173
  */
@@ -148,7 +148,7 @@ export type AbandonExecutionMutation = { abandonExecution: { success: boolean, e
148
148
  export type AvailableListsQueryVariables = Exact<{ [key: string]: never; }>;
149
149
 
150
150
 
151
- export type AvailableListsQuery = { availableLists: Array<{ id: string, path: string, name: string, detailName: string | null, canCreate: boolean, purpose: string | null, queryName: string, itemQueryName: string | null, updateMutationName: string | null, updateInputTypeName: string | null, deleteMutationName: string | null, outputColumns: Array<{ field: string, label: string, description: string | null, visibleInList: boolean, sortable: boolean }>, editableColumns: Array<{ field: string, label: string, description: string | null }> }> };
151
+ export type AvailableListsQuery = { availableLists: Array<{ id: string, path: string, name: string, detailName: string | null, canCreate: boolean, purpose: string | null, queryName: string, itemQueryName: string | null, updateMutationName: string | null, updateInputTypeName: string | null, deleteMutationName: string | null, startProcess: { name: string, startStepPath: string } | null, outputColumns: Array<{ field: string, label: string, description: string | null, visibleInList: boolean, sortable: boolean }>, editableColumns: Array<{ field: string, label: string, description: string | null }> }> };
152
152
 
153
153
  export type ListFormMetadataQueryVariables = Exact<{
154
154
  listPath: string;
@@ -411,7 +411,7 @@ export const DashboardActivityDocument = {"kind":"Document","definitions":[{"kin
411
411
  export const ProcessStateForExecutionDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"ProcessStateForExecution"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"executionId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"ID"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"processStateForExecution"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"executionId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"executionId"}}}]}]}}]} as unknown as DocumentNode<ProcessStateForExecutionQuery, ProcessStateForExecutionQueryVariables>;
412
412
  export const RestartExecutionDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"RestartExecution"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"executionId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"ID"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"restartExecution"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"executionId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"executionId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"success"}},{"kind":"Field","name":{"kind":"Name","value":"restartedCount"}},{"kind":"Field","name":{"kind":"Name","value":"error"}}]}}]}}]} as unknown as DocumentNode<RestartExecutionMutation, RestartExecutionMutationVariables>;
413
413
  export const AbandonExecutionDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"AbandonExecution"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"executionId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"ID"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"reason"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"abandonExecution"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"executionId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"executionId"}}},{"kind":"Argument","name":{"kind":"Name","value":"reason"},"value":{"kind":"Variable","name":{"kind":"Name","value":"reason"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"success"}},{"kind":"Field","name":{"kind":"Name","value":"error"}}]}}]}}]} as unknown as DocumentNode<AbandonExecutionMutation, AbandonExecutionMutationVariables>;
414
- export const AvailableListsDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"AvailableLists"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"availableLists"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"path"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"detailName"}},{"kind":"Field","name":{"kind":"Name","value":"canCreate"}},{"kind":"Field","name":{"kind":"Name","value":"purpose"}},{"kind":"Field","name":{"kind":"Name","value":"queryName"}},{"kind":"Field","name":{"kind":"Name","value":"outputColumns"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"field"}},{"kind":"Field","name":{"kind":"Name","value":"label"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"visibleInList"}},{"kind":"Field","name":{"kind":"Name","value":"sortable"}}]}},{"kind":"Field","name":{"kind":"Name","value":"itemQueryName"}},{"kind":"Field","name":{"kind":"Name","value":"updateMutationName"}},{"kind":"Field","name":{"kind":"Name","value":"updateInputTypeName"}},{"kind":"Field","name":{"kind":"Name","value":"deleteMutationName"}},{"kind":"Field","name":{"kind":"Name","value":"editableColumns"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"field"}},{"kind":"Field","name":{"kind":"Name","value":"label"}},{"kind":"Field","name":{"kind":"Name","value":"description"}}]}}]}}]}}]} as unknown as DocumentNode<AvailableListsQuery, AvailableListsQueryVariables>;
414
+ export const AvailableListsDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"AvailableLists"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"availableLists"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"path"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"detailName"}},{"kind":"Field","name":{"kind":"Name","value":"canCreate"}},{"kind":"Field","name":{"kind":"Name","value":"startProcess"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"startStepPath"}}]}},{"kind":"Field","name":{"kind":"Name","value":"purpose"}},{"kind":"Field","name":{"kind":"Name","value":"queryName"}},{"kind":"Field","name":{"kind":"Name","value":"outputColumns"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"field"}},{"kind":"Field","name":{"kind":"Name","value":"label"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"visibleInList"}},{"kind":"Field","name":{"kind":"Name","value":"sortable"}}]}},{"kind":"Field","name":{"kind":"Name","value":"itemQueryName"}},{"kind":"Field","name":{"kind":"Name","value":"updateMutationName"}},{"kind":"Field","name":{"kind":"Name","value":"updateInputTypeName"}},{"kind":"Field","name":{"kind":"Name","value":"deleteMutationName"}},{"kind":"Field","name":{"kind":"Name","value":"editableColumns"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"field"}},{"kind":"Field","name":{"kind":"Name","value":"label"}},{"kind":"Field","name":{"kind":"Name","value":"description"}}]}}]}}]}}]} as unknown as DocumentNode<AvailableListsQuery, AvailableListsQueryVariables>;
415
415
  export const ListFormMetadataDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"ListFormMetadata"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"listPath"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"listFormMetadata"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"listPath"},"value":{"kind":"Variable","name":{"kind":"Name","value":"listPath"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"listPath"}},{"kind":"Field","name":{"kind":"Name","value":"listName"}},{"kind":"Field","name":{"kind":"Name","value":"updateMutationName"}},{"kind":"Field","name":{"kind":"Name","value":"updateInputTypeName"}},{"kind":"Field","name":{"kind":"Name","value":"deleteMutationName"}},{"kind":"Field","name":{"kind":"Name","value":"formDefinition"}},{"kind":"Field","name":{"kind":"Name","value":"defaultValues"}},{"kind":"Field","name":{"kind":"Name","value":"jsonSchema"}}]}}]}}]} as unknown as DocumentNode<ListFormMetadataQuery, ListFormMetadataQueryVariables>;
416
416
  export const ExportListCsvDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"ExportListCsv"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"listPath"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"filter"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"sort"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"ListSortInput"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"exportListCsv"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"listPath"},"value":{"kind":"Variable","name":{"kind":"Name","value":"listPath"}}},{"kind":"Argument","name":{"kind":"Name","value":"filter"},"value":{"kind":"Variable","name":{"kind":"Name","value":"filter"}}},{"kind":"Argument","name":{"kind":"Name","value":"sort"},"value":{"kind":"Variable","name":{"kind":"Name","value":"sort"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"downloadUrl"}}]}}]}}]} as unknown as DocumentNode<ExportListCsvMutation, ExportListCsvMutationVariables>;
417
417
  export const ListCreateFormMetadataDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"ListCreateFormMetadata"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"listPath"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"listCreateFormMetadata"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"listPath"},"value":{"kind":"Variable","name":{"kind":"Name","value":"listPath"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"createMutationName"}},{"kind":"Field","name":{"kind":"Name","value":"createInputTypeName"}},{"kind":"Field","name":{"kind":"Name","value":"formDefinition"}},{"kind":"Field","name":{"kind":"Name","value":"defaultValues"}},{"kind":"Field","name":{"kind":"Name","value":"jsonSchema"}}]}}]}}]} as unknown as DocumentNode<ListCreateFormMetadataQuery, ListCreateFormMetadataQueryVariables>;
@@ -44,6 +44,10 @@ export const availableListsQuery = graphql(`
44
44
  name
45
45
  detailName
46
46
  canCreate
47
+ startProcess {
48
+ name
49
+ startStepPath
50
+ }
47
51
  purpose
48
52
  queryName
49
53
  outputColumns {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "private": true,
3
3
  "type": "module",
4
- "version": "0.1.0-next.1",
4
+ "version": "0.1.0-next.2",
5
5
  "dependencies": {
6
6
  "@aws-sdk/client-acm": "^3.1131.0",
7
7
  "@aws-sdk/client-ssm": "^3.1131.0",
@@ -20,7 +20,7 @@
20
20
  "@opentelemetry/resources": "^2.11.0",
21
21
  "@opentelemetry/sdk-metrics": "^2.11.0",
22
22
  "@opentelemetry/sdk-trace-base": "^2.11.0",
23
- "@processfocus/runtime": "0.1.0-next.1",
23
+ "@processfocus/runtime": "0.1.0-next.2",
24
24
  "@radix-ui/react-checkbox": "^1.3.11",
25
25
  "@radix-ui/react-dialog": "^1.1.23",
26
26
  "@radix-ui/react-dropdown-menu": "^2.1.24",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "format": 1,
3
- "sha256": "12bc174e66aa8914a89b5a07f6cd192f71a39b7e4f3d9e7e7d1d88ffbfcfb17d",
3
+ "sha256": "0ced659a0b28dc39c2be07fd3d12ba900c4917806d80af30c3a49c4d1102b29b",
4
4
  "dependencies": {
5
5
  "@aws-sdk/client-acm": "^3.1131.0",
6
6
  "@aws-sdk/client-ssm": "^3.1131.0",
@@ -19,7 +19,7 @@
19
19
  "@opentelemetry/resources": "^2.11.0",
20
20
  "@opentelemetry/sdk-metrics": "^2.11.0",
21
21
  "@opentelemetry/sdk-trace-base": "^2.11.0",
22
- "@processfocus/runtime": "0.1.0-next.1",
22
+ "@processfocus/runtime": "0.1.0-next.2",
23
23
  "@radix-ui/react-checkbox": "^1.3.11",
24
24
  "@radix-ui/react-dialog": "^1.1.23",
25
25
  "@radix-ui/react-dropdown-menu": "^2.1.24",
@@ -29,7 +29,7 @@ import {
29
29
  LocalCedarConfigStatic,
30
30
  LocalCedarConfigHotReload,
31
31
  LocalCedarAuthorizationLive
32
- } from "./chunk-fn7b5pxw.js";
32
+ } from "./chunk-yhzbn4vx.js";
33
33
  import {
34
34
  HttpClient,
35
35
  post,
@@ -78,12 +78,12 @@ import {
78
78
  generateLocalDocumentStoreToken,
79
79
  LocalDocumentStoreServiceLive,
80
80
  makeServerPluginWebhookRouter
81
- } from "./chunk-cq9xscgb.js";
81
+ } from "./chunk-352j1ayk.js";
82
82
  import {
83
83
  serveOnExactPort,
84
84
  serveWithPortFallback,
85
85
  writePortFile
86
- } from "./chunk-6b6t8tyq.js";
86
+ } from "./chunk-6ntmymmx.js";
87
87
 
88
88
  // src/graphql-server/graphql-server.ts
89
89
  import * as Otel from "@effect/opentelemetry";
@@ -59,7 +59,7 @@ import {
59
59
  LocalCedarConfigStatic,
60
60
  LocalCedarConfigHotReload,
61
61
  LocalCedarAuthorizationLive
62
- } from "./chunk-fn7b5pxw.js";
62
+ } from "./chunk-yhzbn4vx.js";
63
63
  import {
64
64
  HttpClient,
65
65
  post,
@@ -94,7 +94,7 @@ import {
94
94
  TodoFromJobPublisher,
95
95
  todoEventHandler,
96
96
  buildTodoChangeEvent
97
- } from "./chunk-cq9xscgb.js";
97
+ } from "./chunk-352j1ayk.js";
98
98
 
99
99
  // src/job-worker/job-worker.ts
100
100
  import { existsSync as existsSync4 } from "fs";
@@ -34,11 +34,19 @@ input ListSortInput {
34
34
  direction: ListSortDirection!
35
35
  }
36
36
 
37
+ "A process this caller may start from a List."
38
+ type ListStartProcess {
39
+ name: String!
40
+ startStepPath: String!
41
+ }
42
+
37
43
  """
38
44
  Information about a list that the user can access.
39
45
  Used by the frontend sidebar to display available lists.
40
46
  """
41
47
  type ListInfo {
48
+ "Optional start button, omitted when the caller cannot start the process."
49
+ startProcess: ListStartProcess
42
50
  "Whether this caller may create records in this List."
43
51
  canCreate: Boolean!
44
52
  id: ID!
@@ -700,6 +708,12 @@ type Query {
700
708
  processPath: String
701
709
  status: String
702
710
  ): ExecutionListPage!
711
+ """
712
+ The Process Execution with this id, when the current provider user may view it.
713
+ A missing id and an id the caller may not view both return null.
714
+ This is a single-row read. It does not page or scan execution history.
715
+ """
716
+ execution(id: ID!): Execution
703
717
  # Current logged-in provider user
704
718
  currentProviderUser: ProviderUser!
705
719
  """
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@processfocus/runtime-local",
3
- "version": "0.1.0-next.1",
3
+ "version": "0.1.0-next.2",
4
4
  "license": "SEE LICENSE IN LICENSE.md",
5
5
  "repository": {
6
6
  "type": "git",
@@ -27,8 +27,8 @@
27
27
  "@opentelemetry/exporter-trace-otlp-http": "0.222.0",
28
28
  "@opentelemetry/sdk-metrics": "^2.11.0",
29
29
  "@opentelemetry/sdk-trace-base": "^2.11.0",
30
- "@processfocus/cli": "0.1.0-next.1",
31
- "@processfocus/runtime": "0.1.0-next.1",
30
+ "@processfocus/cli": "0.1.0-next.2",
31
+ "@processfocus/runtime": "0.1.0-next.2",
32
32
  "@tursodatabase/database": "0.7.2",
33
33
  "@tursodatabase/serverless": "1.4.0",
34
34
  "@tursodatabase/sync": "0.7.2",