@vertesia/appgen-docs 1.5.0-dev.20260806.125520Z → 1.5.0-dev.20260826.064249Z

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,47 @@
1
+ # Installed Capability Runtime Execution
2
+
3
+ Use the root `VertesiaClient` for app-owned interaction execution. For an immutable candidate, call `client.withAppVersion(versionId)` once before any Studio or Store request.
4
+
5
+ ## Interactions
6
+
7
+ `executeByName` accepts the portable app interaction ref and an `InteractionExecutionPayload`. Put prompt inputs under `data`; the returned result is already enhanced with typed accessors.
8
+
9
+ ```ts
10
+ interface StatusBriefingInput {
11
+ project_id: string;
12
+ tasks: Array<{ id: string; title: string; status: string }>;
13
+ }
14
+
15
+ interface StatusBriefingResult {
16
+ summary: string;
17
+ evidence: Array<{ id: string; title: string; status: string }>;
18
+ }
19
+
20
+ const execution = await client.interactions.executeByName<StatusBriefingResult, StatusBriefingInput>(
21
+ `app:${APP_NAME}:main:project-status-briefing`,
22
+ { data: input },
23
+ );
24
+ const briefing = execution.result.object();
25
+ ```
26
+
27
+ Use `execution.result.text()` for text output and `execution.result.objects()` for multiple JSON results. Validate the parsed object against the exact durable input snapshot before displaying or persisting it. Do not reimplement `/api/v1/execute` with raw `fetch`.
28
+
29
+ ## Processes and activities
30
+
31
+ Installed app activities are internal process nodes. The root SDK has no `client.activities` execution API, so exercise an activity through a packaged process that references it. Start processes through the Store agent API; `client.processes` manages definitions and has no `executeByName` method.
32
+
33
+ ```ts
34
+ const run = await client.agents.start({
35
+ process_id: `app:${APP_NAME}:milestone-transition`,
36
+ run_type: 'programmatic',
37
+ data: { milestone_id, target_status: 'complete' },
38
+ });
39
+ await client.agents.streamMessages(run.id);
40
+ const terminal = await client.agents.retrieveProcess(run.id);
41
+ const { context } = await client.agents.getContext(run.id);
42
+ if (terminal.status !== 'completed') {
43
+ throw new Error(String(context.error ?? terminal.status));
44
+ }
45
+ ```
46
+
47
+ A package summary containing an activity proves registration only, not runtime execution. Unit-test the exact interaction and process call shapes with focused SDK mocks before constructing an immutable candidate. Never invent `client.activities.executeByName` or `client.processes.executeByName`.
@@ -20,6 +20,7 @@ When creating or searching Store objects, pass the app type code string:
20
20
 
21
21
  ```ts
22
22
  await client.objects.create({
23
+ name: 'Supplier review',
23
24
  type: CASE_TYPE,
24
25
  properties: {
25
26
  title: 'Supplier review',
@@ -4,6 +4,8 @@ Use the Vertesia client from `useUserSession()` in browser code and the injected
4
4
 
5
5
  App-owned types are referenced by their **in-code string** `app:<app-name>:<local>`, never a resolved ObjectId — pass the string straight to `search`/`create` and derive it from a single `APP_NAME` constant (= package.json name = VITE_APP_NAME = manifest name) so the app stays portable. See `package-types.md` for the rule.
6
6
 
7
+ Every `objects.create` payload requires a top-level `name`. A title inside `properties` does not satisfy this Store contract. Use a stable human-readable value, normally the record title, and keep it in sync when the product renames the record.
8
+
7
9
  ## Search
8
10
 
9
11
  ```ts
@@ -63,6 +65,7 @@ async function seedCase(client: VertesiaClient, record: { external_id: string; t
63
65
  }
64
66
 
65
67
  return client.objects.create({
68
+ name: record.title,
66
69
  type: CASE_TYPE,
67
70
  properties: { ...record, seed_marker: SEED_MARKER },
68
71
  });
@@ -75,6 +78,7 @@ For document, review, and intake apps, attach realistic source content to repres
75
78
 
76
79
  ```ts
77
80
  await client.objects.create({
81
+ name: 'Screening evidence',
78
82
  type: `app:${APP_NAME}:evidence`,
79
83
  properties: {
80
84
  title: 'Screening evidence',
@@ -418,6 +418,11 @@ Registered hooks are exposed as authenticated POST endpoints at `/api/hooks/inst
418
418
  app package advertises their endpoint paths under `hooks` for inspection. Studio invokes the conventional endpoints
419
419
  directly and treats a 404 as an absent optional hook.
420
420
 
421
+ Building an immutable version advertises these definitions but does not execute them. Studio runs the promoted
422
+ version's install hook during promotion reconciliation and runs the previous promoted version's uninstall hook when
423
+ it is replaced or removed. For an unpromoted candidate, validate source registration and package output only; do not
424
+ invoke lifecycle endpoints manually or fail candidate QA because their side effects are absent.
425
+
421
426
  In an appgen capability manifest, declare lifecycle hooks with type `hook` and ids such as
422
427
  `app:<app-name>:install` and `app:<app-name>:uninstall`.
423
428
 
@@ -476,7 +481,8 @@ Represent it in an appgen capability manifest as a `hook` artifact such as
476
481
  ## Application event subscriptions
477
482
 
478
483
  Subscriptions are declarative package contributions that route matching platform events to an event hook in the same
479
- app. They do not contain a deployment URL or project scope. Studio derives both when it installs the app.
484
+ app. They do not contain a deployment URL or project scope. Studio derives both from the version selected during
485
+ promotion.
480
486
 
481
487
  ```typescript
482
488
  // src/modules/app/resources/subscriptions/index.ts
@@ -505,6 +511,11 @@ the same event hook with different filters. Inspect the result with `GET /api/pa
505
511
  Represent each definition in an appgen capability manifest as a `subscription` artifact such as
506
512
  `app:<app-name>:content-updated`.
507
513
 
514
+ An unpromoted candidate exposes these package definitions but does not create protected Event Bus subscriptions, and
515
+ matching events are not delivered to that candidate's hook. Candidate validation is therefore limited to source and
516
+ package-summary wiring. Use Event Bus subscription and delivery evidence only after the version has been explicitly
517
+ promoted.
518
+
508
519
  ---
509
520
 
510
521
  ## Collection registration & icons
@@ -55,6 +55,7 @@ export * from './LanguageSwitcher';
55
55
  export * from './label';
56
56
  export * from './MessageBox';
57
57
  export * from './modal';
58
+ export * from './overflowTabs';
58
59
  export * from './Panel';
59
60
  export * from './popover';
60
61
  export * from './radioGroup';
@@ -1010,13 +1011,20 @@ interface GenericPageNavHeaderProps {
1010
1011
  children?: ReactNode;
1011
1012
  className?: string;
1012
1013
  useDynamicBreadcrumbs?: boolean;
1014
+ /**
1015
+ * Parent page linked from the breadcrumbs when there is no history chain to walk (the user
1016
+ * landed on this URL directly). Give it as an absolute app path, including the module mount.
1017
+ */
1018
+ parentPath?: string;
1019
+ /** Label for {@link parentPath}; defaults to its last segment, title-cased. */
1020
+ parentLabel?: string;
1013
1021
  }
1014
1022
  interface BreadcrumbElementProps {
1015
1023
  href?: string;
1016
1024
  clearBreadcrumbs?: boolean;
1017
1025
  children?: ReactNode;
1018
1026
  }
1019
- export declare function GenericPageNavHeader({ className, children, title, description, actions, breadcrumbs, useDynamicBreadcrumbs, }: GenericPageNavHeaderProps): JSX.Element;
1027
+ export declare function GenericPageNavHeader({ className, children, title, description, actions, breadcrumbs, useDynamicBreadcrumbs, parentPath, parentLabel, }: GenericPageNavHeaderProps): JSX.Element;
1020
1028
  export {};
1021
1029
 
1022
1030
  // -----------------------------------------------------------------------------
@@ -1068,6 +1076,12 @@ export interface ModernAgentConversationProps {
1068
1076
  onShowDetails?: () => void;
1069
1077
  /** Whether workflow control actions such as cancel should be shown. */
1070
1078
  allowWorkflowControl?: boolean;
1079
+ /**
1080
+ * Workstream selected on mount instead of "all" — use it to open the conversation on one
1081
+ * sub-agent (a process agent node's workstream is its node id). Initial value only; the user's
1082
+ * later tab choices win.
1083
+ */
1084
+ initialWorkstream?: string;
1071
1085
  /** Called when files are dropped/pasted/selected */
1072
1086
  onFilesSelected?: (files: File[]) => void;
1073
1087
  /** Currently uploaded files to display */