Skip to content

PersistentAI API Documentation / @persistent-ai/fireflow-vfs / server / AppWorkflows

Class: AppWorkflows

Defined in: packages/fireflow-vfs/src/workflows/app-workflows.ts:70

App workflows class for managing .ffapp packages in VFS.

Handles:

  • createAppPackage: Create new .ffapp/ folder with manifest, .keep, and nested .fflow/

Extends

  • ConfiguredInstance

Constructors

Constructor

new AppWorkflows(db, flowWorkflows, name?): AppWorkflows

Defined in: packages/fireflow-vfs/src/workflows/app-workflows.ts:71

Parameters

db

DB

flowWorkflows

FlowWorkflows

name?

string = 'AppWorkflows'

Returns

AppWorkflows

Overrides

ConfiguredInstance.constructor

Properties

name

readonly name: string

Defined in: node_modules/.pnpm/@[email protected][email protected][email protected][email protected]/node_modules/@dbos-inc/dbos-sdk/dist/src/decorators.d.ts:126

Inherited from

ConfiguredInstance.name

Methods

createAppPackage()

createAppPackage(workspaceId, branchName, path, name, description, authMode, userId): Promise<CreateAppPackageResult>

Defined in: packages/fireflow-vfs/src/workflows/app-workflows.ts:97

Create a new app package (.ffapp/ folder)

Creates the folder structure:

  • {path}/manifest.json - App metadata
  • {path}/.keep - Root marker for webhook detection
  • {path}/{name}.fflow/ - Nested flow package (via FlowWorkflows)

Parameters

workspaceId

string

Workspace ID

branchName

string

Branch name (typically 'main')

path

string

Path for the .ffapp folder (e.g., 'mini-apps/my-app.ffapp')

name

string

Human-readable app name

description

Optional app description

string | undefined

authMode

"authenticated"

Authentication mode

userId

string

User ID creating the app

Returns

Promise<CreateAppPackageResult>

Created app package details


initialize()

initialize(): Promise<void>

Defined in: node_modules/.pnpm/@[email protected][email protected][email protected][email protected]/node_modules/@dbos-inc/dbos-sdk/dist/src/decorators.d.ts:131

Override this method to perform async initialization between construction and DBOS.launch().

Returns

Promise<void>

Inherited from

ConfiguredInstance.initialize


updateManifest()

updateManifest(workspaceId, branchName, path, updates, userId): Promise<{ appId: string; auth: { allowedProviders?: string[]; mode: "authenticated"; telegram?: { botTokenSecret: string; }; }; description?: string; display?: { favicon?: string; maxWidth?: string; theme?: "auto" | "light" | "dark"; title?: string; }; execution?: { eventName?: string; renderEventKey?: string; renderTimeout?: number; sessionMode?: "per-request" | "persistent"; }; flowPath: string; icon?: string; meta?: { createdAt?: string; tags?: string[]; updatedAt?: string; }; name: string; type: "ffapp"; version: string; vfs?: { rules?: object[]; }; }>

Defined in: packages/fireflow-vfs/src/workflows/app-workflows.ts:287

Update an existing app's manifest.json safely.

Protects immutable fields (version, type, appId, flowPath, meta.createdAt) and only merges allowed editable fields.

Steps:

  1. Permission check
  2. Read current manifest from lakeFS
  3. Merge updates (protect immutable fields)
  4. Validate merged result
  5. Write to lakeFS
  6. Commit
  7. Emit event
  8. Update app registry

Parameters

workspaceId

string

branchName

string

path

string

updates
auth?

{ mode?: "authenticated"; telegram?: { botTokenSecret: string; }; }

auth.mode?

"authenticated"

auth.telegram?

{ botTokenSecret: string; }

auth.telegram.botTokenSecret

string

description?

string

display?

{ favicon?: string; maxWidth?: string; theme?: "auto" | "light" | "dark"; title?: string; }

display.favicon?

string

display.maxWidth?

string

display.theme?

"auto" | "light" | "dark"

display.title?

string

execution?

{ eventName?: string; renderEventKey?: string; renderTimeout?: number; }

execution.eventName?

string

execution.renderEventKey?

string

execution.renderTimeout?

number

name?

string

vfs?

{ rules?: object[]; }

vfs.rules?

object[]

userId

string

Returns

Promise<{ appId: string; auth: { allowedProviders?: string[]; mode: "authenticated"; telegram?: { botTokenSecret: string; }; }; description?: string; display?: { favicon?: string; maxWidth?: string; theme?: "auto" | "light" | "dark"; title?: string; }; execution?: { eventName?: string; renderEventKey?: string; renderTimeout?: number; sessionMode?: "per-request" | "persistent"; }; flowPath: string; icon?: string; meta?: { createdAt?: string; tags?: string[]; updatedAt?: string; }; name: string; type: "ffapp"; version: string; vfs?: { rules?: object[]; }; }>

The merged, validated manifest

Licensed under BUSL-1.1