create-safest-tools 0.2.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.
- package/LICENSE +201 -0
- package/README.md +71 -0
- package/bin/create-safest-tools.mjs +12 -0
- package/package.json +34 -0
- package/src/cli.mjs +128 -0
- package/src/config.mjs +151 -0
- package/src/scaffold.mjs +30 -0
- package/template/LICENSE +201 -0
- package/template/README.md +35 -0
- package/template/console/README.md +28 -0
- package/template/console/analytics/AnalyticsWorkspace.tsx +55 -0
- package/template/console/analytics/controller.ts +133 -0
- package/template/console/analytics/events.ts +33 -0
- package/template/console/analytics/store.ts +33 -0
- package/template/console/analytics/types.ts +38 -0
- package/template/console/appeals/AppealWorkspace.tsx +73 -0
- package/template/console/appeals/controller.ts +125 -0
- package/template/console/appeals/events.ts +33 -0
- package/template/console/appeals/store.ts +35 -0
- package/template/console/appeals/types.ts +37 -0
- package/template/console/assistant/AssistantWorkspace.tsx +133 -0
- package/template/console/assistant/types.ts +34 -0
- package/template/console/auth/AccountJourney.tsx +69 -0
- package/template/console/auth/InvitationAcceptance.tsx +145 -0
- package/template/console/auth/OAuthButtons.tsx +78 -0
- package/template/console/auth/OperatorLogin.tsx +110 -0
- package/template/console/auth/PasswordRecovery.tsx +132 -0
- package/template/console/auth/account-route.ts +15 -0
- package/template/console/auth/browser-navigation.ts +7 -0
- package/template/console/auth/events.ts +15 -0
- package/template/console/command/CommandCentre.tsx +119 -0
- package/template/console/command/controller.ts +267 -0
- package/template/console/command/events.ts +19 -0
- package/template/console/command/store.ts +36 -0
- package/template/console/command/types.ts +61 -0
- package/template/console/components/AnalystIdentity.tsx +25 -0
- package/template/console/components/PageHeader.tsx +27 -0
- package/template/console/configuration/ConfigurationDialog.tsx +200 -0
- package/template/console/configuration/ConfigurationWorkspace.tsx +66 -0
- package/template/console/configuration/FormBuilder.tsx +143 -0
- package/template/console/configuration/api.ts +40 -0
- package/template/console/configuration/events.ts +14 -0
- package/template/console/configuration/types.ts +79 -0
- package/template/console/lib/format.ts +49 -0
- package/template/console/lib/http.ts +96 -0
- package/template/console/main.tsx +225 -0
- package/template/console/operations/OperationsWorkspace.tsx +126 -0
- package/template/console/operations/controller.ts +237 -0
- package/template/console/operations/events.ts +37 -0
- package/template/console/operations/store.ts +32 -0
- package/template/console/operations/types.ts +107 -0
- package/template/console/people/PeopleWorkspace.tsx +81 -0
- package/template/console/people/types.ts +25 -0
- package/template/console/profile/ProfileWorkspace.tsx +136 -0
- package/template/console/profile/events.ts +9 -0
- package/template/console/profile/types.ts +6 -0
- package/template/console/quality/QualityWorkspace.tsx +87 -0
- package/template/console/quality/controller.ts +154 -0
- package/template/console/quality/events.ts +34 -0
- package/template/console/quality/store.ts +36 -0
- package/template/console/quality/types.ts +70 -0
- package/template/console/queues/QueueEditor.tsx +173 -0
- package/template/console/queues/QueueWorkspace.tsx +109 -0
- package/template/console/queues/controller.ts +194 -0
- package/template/console/queues/events.ts +34 -0
- package/template/console/queues/store.ts +37 -0
- package/template/console/queues/types.ts +102 -0
- package/template/console/registry/RegistryDialog.tsx +198 -0
- package/template/console/registry/RegistryWorkspace.tsx +108 -0
- package/template/console/registry/events.ts +14 -0
- package/template/console/registry/types.ts +52 -0
- package/template/console/reports/ReportDrawer.tsx +159 -0
- package/template/console/reports/ReportWorkspace.tsx +90 -0
- package/template/console/reports/controller.ts +517 -0
- package/template/console/reports/events.ts +42 -0
- package/template/console/reports/store.ts +39 -0
- package/template/console/reports/types.ts +230 -0
- package/template/console/settings/BrandEditor.tsx +126 -0
- package/template/console/settings/ChannelDialog.tsx +241 -0
- package/template/console/settings/SettingsWorkspace.tsx +155 -0
- package/template/console/settings/events.ts +19 -0
- package/template/console/settings/handoff.ts +22 -0
- package/template/console/settings/types.ts +93 -0
- package/template/console/shell/WorkspaceShell.tsx +160 -0
- package/template/console/shell/controller.ts +182 -0
- package/template/console/shell/events.ts +25 -0
- package/template/console/shell/navigation.ts +61 -0
- package/template/console/shell/store.ts +56 -0
- package/template/console/shell/types.ts +86 -0
- package/template/console/workflows/CreateWorkflowDialog.tsx +87 -0
- package/template/console/workflows/WorkflowCanvas.tsx +42 -0
- package/template/console/workflows/WorkflowDialogs.tsx +6 -0
- package/template/console/workflows/WorkflowStudio.tsx +331 -0
- package/template/console/workflows/WorkflowWorkspace.tsx +82 -0
- package/template/console/workflows/events.ts +17 -0
- package/template/console/workflows/graph.ts +156 -0
- package/template/console/workflows/templates.ts +70 -0
- package/template/console/workflows/types.ts +201 -0
- package/template/gitignore.template +18 -0
- package/template/migrations/0001_reports_foundation.sql +444 -0
- package/template/migrations/0002_human_report_loop.sql +65 -0
- package/template/migrations/0003_delivery_reliability.sql +18 -0
- package/template/migrations/0004_public_intake.sql +14 -0
- package/template/migrations/0005_operations_visibility.sql +24 -0
- package/template/migrations/0006_ai_governance.sql +198 -0
- package/template/migrations/0007_ai_release_gates.sql +6 -0
- package/template/migrations/0008_retention_analytics_exports.sql +52 -0
- package/template/migrations/0009_retention_derived_copies.sql +14 -0
- package/template/migrations/0010_ai_quality_controls.sql +26 -0
- package/template/migrations/0011_analyst_presence.sql +28 -0
- package/template/migrations/0012_queue_policies.sql +87 -0
- package/template/migrations/0013_routing_agents.sql +63 -0
- package/template/migrations/0014_webhook_enrichments.sql +122 -0
- package/template/migrations/0015_queue_owned_ai.sql +55 -0
- package/template/migrations/0016_operator_accounts.sql +67 -0
- package/template/migrations/0017_operator_profiles_and_recovery.sql +33 -0
- package/template/migrations/0018_platform_configuration.sql +382 -0
- package/template/migrations/0019_workflow_authoring_runtime.sql +372 -0
- package/template/migrations/0020_tasks_findings_assistant_budgets.sql +427 -0
- package/template/migrations/0021_abuse_evidence_operations.sql +324 -0
- package/template/migrations/0022_workflow_dispatch_operations.sql +42 -0
- package/template/migrations/0023_component_connection_execution.sql +75 -0
- package/template/migrations/0024_access_runtime_integrity.sql +72 -0
- package/template/migrations/0025_installation_timezone.sql +11 -0
- package/template/migrations/0026_ai_and_egress_execution_controls.sql +49 -0
- package/template/migrations/0027_prompt_and_ai_registry.sql +37 -0
- package/template/migrations/0028_step_attempt_ai_provenance.sql +13 -0
- package/template/migrations/0029_evidence_fetch_transport.sql +5 -0
- package/template/migrations/0030_evidence_dlq_incidents.sql +45 -0
- package/template/migrations/0031_shadow_quality_integrity.sql +7 -0
- package/template/migrations/0032_action_delivery_outbox.sql +55 -0
- package/template/migrations/0033_configuration_and_assistant_drafts.sql +43 -0
- package/template/migrations/0034_installation_integrations.sql +31 -0
- package/template/migrations/0035_workspace_governance.sql +21 -0
- package/template/migrations/0036_published_routing_baseline.sql +15 -0
- package/template/migrations/0037_builtin_phishing_specialist.sql +71 -0
- package/template/migrations/0038_remove_deprecated_enrichment_runtime.sql +228 -0
- package/template/migrations/0039_secure_reporting_channels.sql +45 -0
- package/template/migrations/0040_notification_only_reporting.sql +24 -0
- package/template/migrations/0041_better_auth_credentials.sql +17 -0
- package/template/package.json +47 -0
- package/template/public/_headers +27 -0
- package/template/public/app-icon-192.png +0 -0
- package/template/public/app-icon-512.png +0 -0
- package/template/public/brand-icon.svg +7 -0
- package/template/public/brand-tokens.css +80 -0
- package/template/public/console/auth-shell.js +19340 -0
- package/template/public/customer-brand.js +58 -0
- package/template/public/embed/embed.css +139 -0
- package/template/public/embed/embed.js +408 -0
- package/template/public/embed/index.html +91 -0
- package/template/public/favicon.svg +7 -0
- package/template/public/fonts/Manrope-Variable.ttf +0 -0
- package/template/public/fonts/Newsreader-Italic-Variable.ttf +0 -0
- package/template/public/fonts/Newsreader-Variable.ttf +0 -0
- package/template/public/index.html +123 -0
- package/template/public/logo-primary.svg +7 -0
- package/template/public/logo-reversed.svg +7 -0
- package/template/public/manifest.webmanifest +21 -0
- package/template/public/public-report.js +184 -0
- package/template/public/report/index.html +39 -0
- package/template/public/report/public-report.css +20 -0
- package/template/public/social-card.png +0 -0
- package/template/public/styles.css +1521 -0
- package/template/public/widget.css +80 -0
- package/template/public/widget.js +220 -0
- package/template/reports.config.example.json +38 -0
- package/template/reports.schema.json +89 -0
- package/template/scripts/reports-auth-onboarding.mjs +180 -0
- package/template/scripts/reports-backup.mjs +276 -0
- package/template/scripts/reports-cloudflare-preflight.mjs +152 -0
- package/template/scripts/reports-deploy.mjs +173 -0
- package/template/scripts/reports-plan.mjs +226 -0
- package/template/scripts/reports-restore.mjs +180 -0
- package/template/scripts/reports-secrets.mjs +73 -0
- package/template/scripts/reports-uninstall-plan.mjs +32 -0
- package/template/src/agent-executor.ts +330 -0
- package/template/src/ai-observability.ts +163 -0
- package/template/src/ai-registry-validation.ts +244 -0
- package/template/src/ai-registry.ts +292 -0
- package/template/src/api-cursor.ts +84 -0
- package/template/src/assistant.ts +554 -0
- package/template/src/audit.ts +39 -0
- package/template/src/backup-service.ts +269 -0
- package/template/src/budget-control.ts +127 -0
- package/template/src/component-executor.ts +845 -0
- package/template/src/configuration-registry.ts +550 -0
- package/template/src/connection-egress.ts +430 -0
- package/template/src/connection-oauth.ts +368 -0
- package/template/src/evidence-service.ts +335 -0
- package/template/src/human-tasks.ts +316 -0
- package/template/src/index.ts +4114 -0
- package/template/src/installation-admin.ts +301 -0
- package/template/src/intake-abuse.ts +156 -0
- package/template/src/platform-registry-validation.ts +367 -0
- package/template/src/platform-registry.ts +753 -0
- package/template/src/report-admin.ts +342 -0
- package/template/src/report-ai-quality.ts +390 -0
- package/template/src/report-ai-validation.ts +80 -0
- package/template/src/report-ai.ts +857 -0
- package/template/src/report-auth.ts +292 -0
- package/template/src/report-better-auth.ts +583 -0
- package/template/src/report-context-schema.ts +132 -0
- package/template/src/report-context.ts +126 -0
- package/template/src/report-crypto.ts +142 -0
- package/template/src/report-delivery.ts +579 -0
- package/template/src/report-form-validation.ts +51 -0
- package/template/src/report-governance.ts +510 -0
- package/template/src/report-http.ts +90 -0
- package/template/src/report-operations.ts +685 -0
- package/template/src/report-operator-accounts.ts +810 -0
- package/template/src/report-presence.ts +398 -0
- package/template/src/report-queue-validation.ts +309 -0
- package/template/src/report-queues.ts +478 -0
- package/template/src/report-repository.ts +972 -0
- package/template/src/report-router-agent.ts +328 -0
- package/template/src/report-router-validation.ts +81 -0
- package/template/src/report-routing.ts +178 -0
- package/template/src/report-turnstile.ts +142 -0
- package/template/src/report-types.ts +224 -0
- package/template/src/report-validation.ts +279 -0
- package/template/src/report-workflow-validation.ts +119 -0
- package/template/src/report-workflow.ts +886 -0
- package/template/src/shadow-quality.ts +278 -0
- package/template/src/workflow-actions.ts +782 -0
- package/template/src/workflow-compiler.ts +230 -0
- package/template/src/workflow-dynamic-runtime.ts +613 -0
- package/template/src/workflow-effects.ts +316 -0
- package/template/src/workflow-expressions.ts +191 -0
- package/template/src/workflow-platform-types.ts +121 -0
- package/template/src/workflow-platform-validation.ts +540 -0
- package/template/src/workflow-repository.ts +916 -0
- package/template/src/workflow-runs.ts +686 -0
- package/template/src/workflow-simulator.ts +211 -0
- package/template/src/workspace-branding.ts +128 -0
- package/template/src/workspace-governance.ts +279 -0
- package/template/tsconfig.console.json +23 -0
- package/template/tsconfig.json +22 -0
- package/template/vite.console.config.ts +20 -0
- package/template/worker-configuration.d.ts +65 -0
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import type { JsonObject, WorkflowGraph, WorkflowNodeKind, WorkflowPurpose } from "./types";
|
|
2
|
+
|
|
3
|
+
function node(id: string, kind: WorkflowNodeKind, name: string, x: number, y: number, config: JsonObject = {}, inputMapping: JsonObject = {}) {
|
|
4
|
+
return { id, kind, name, input_mapping: inputMapping, config, metadata: { x, y } };
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
function edge(id: string, from: string, fromPort: string, to: string, toPort = "input") {
|
|
8
|
+
return { id, from: { node_id: from, port: fromPort }, to: { node_id: to, port: toPort } };
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export type WorkflowTemplate = "human" | "phishing" | "blank";
|
|
12
|
+
|
|
13
|
+
export const workflowTemplateOptions: Array<{ value: WorkflowTemplate; name: string; detail: string }> = [
|
|
14
|
+
{ value: "human", name: "Human review", detail: "A clear review and decision path. Best for a first workflow." },
|
|
15
|
+
{ value: "phishing", name: "Phishing triage", detail: "Parallel evidence checks followed by required human review." },
|
|
16
|
+
{ value: "blank", name: "Blank", detail: "Only a start and end step. Build the path yourself." },
|
|
17
|
+
];
|
|
18
|
+
|
|
19
|
+
export function workflowTemplate(template: WorkflowTemplate, purpose: WorkflowPurpose): WorkflowGraph {
|
|
20
|
+
const base = {
|
|
21
|
+
schema_version: "1" as const,
|
|
22
|
+
purpose,
|
|
23
|
+
entry_node_id: "start",
|
|
24
|
+
input_schema: { type: "object" },
|
|
25
|
+
terminal_codes: ["resolved"],
|
|
26
|
+
default_policies: {},
|
|
27
|
+
};
|
|
28
|
+
if (template === "blank") return {
|
|
29
|
+
...base,
|
|
30
|
+
nodes: [node("start", "start", "Report accepted", 40, 220), node("end", "end", "Resolved", 520, 220, { terminal_code: "resolved" })],
|
|
31
|
+
edges: [edge("edge-start-end", "start", "success", "end")],
|
|
32
|
+
};
|
|
33
|
+
if (template === "phishing") return {
|
|
34
|
+
...base,
|
|
35
|
+
nodes: [
|
|
36
|
+
node("start", "start", "Report accepted", 30, 260),
|
|
37
|
+
node("url-check", "enrichment", "Phishing URL specialist", 270, 40, { component_version_id: "select-a-published-component-version" }, { url: "report.answers.url" }),
|
|
38
|
+
node("account-check", "enrichment", "Account history", 270, 260, { component_version_id: "select-a-published-component-version" }, { account: "report.target.reference" }),
|
|
39
|
+
node("related-check", "enrichment", "Related reports", 270, 480, { component_version_id: "select-a-published-component-version" }, { target: "report.target.reference" }),
|
|
40
|
+
node("join", "join", "Evidence ready", 520, 260, { required_ports: ["url", "account"], optional_ports: ["related"] }),
|
|
41
|
+
node("review", "human_task", "Human review", 760, 90, { queue_id: "select-a-queue", response_schema: { type: "object" } }),
|
|
42
|
+
node("decision", "decision", "Record decision", 760, 260, { policy_version_id: "select-a-policy-version" }, { decision_code: "reviewed", policy_code: "manual-review", rationale: "Recorded after review.", evidence_references: [], finding_ids: [] }),
|
|
43
|
+
node("end", "end", "Resolved", 1000, 260, { terminal_code: "resolved" }),
|
|
44
|
+
],
|
|
45
|
+
edges: [
|
|
46
|
+
edge("e1", "start", "success", "url-check"), edge("e2", "start", "success", "account-check"), edge("e3", "start", "success", "related-check"),
|
|
47
|
+
edge("e4", "url-check", "success", "join", "url"), edge("e5", "account-check", "success", "join", "account"), edge("e6", "related-check", "success", "join", "related"),
|
|
48
|
+
edge("e7", "join", "success", "review"), edge("e8", "review", "completed", "decision"), edge("e9", "review", "timeout", "decision"), edge("e10", "decision", "recorded", "end"), edge("e11", "decision", "error", "end"),
|
|
49
|
+
],
|
|
50
|
+
};
|
|
51
|
+
return {
|
|
52
|
+
...base,
|
|
53
|
+
nodes: [
|
|
54
|
+
node("start", "start", "Report accepted", 40, 220),
|
|
55
|
+
node("review", "human_task", "Human review", 280, 220, { queue_id: "general-review", response_schema: { type: "object" } }),
|
|
56
|
+
node("decision", "decision", "Record decision", 520, 220, { policy_version_id: "policy-v1" }, { decision_code: "reviewed", policy_code: "manual-review", rationale: "Recorded after the required human review step.", evidence_references: [], finding_ids: [] }),
|
|
57
|
+
node("end", "end", "Resolved", 760, 220, { terminal_code: "resolved" }),
|
|
58
|
+
],
|
|
59
|
+
edges: [edge("e1", "start", "success", "review"), edge("e2", "review", "completed", "decision"), edge("e3", "review", "timeout", "decision"), edge("e4", "decision", "recorded", "end"), edge("e5", "decision", "error", "end")],
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export const happyPathFixture = {
|
|
64
|
+
name: "Happy path",
|
|
65
|
+
input: {},
|
|
66
|
+
component_results: {},
|
|
67
|
+
human_responses: { review: { outcome: "reviewed" } },
|
|
68
|
+
expected: { status: "passed", terminal_code: "resolved" },
|
|
69
|
+
failure_injection: {},
|
|
70
|
+
};
|
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
export type JsonPrimitive = string | number | boolean | null;
|
|
2
|
+
export type JsonValue = JsonPrimitive | JsonValue[] | JsonObject;
|
|
3
|
+
export interface JsonObject { [key: string]: JsonValue }
|
|
4
|
+
|
|
5
|
+
export type WorkflowPurpose = "report" | "appeal" | "quality" | "operations";
|
|
6
|
+
export type WorkflowAuthorityMode = "off" | "shadow" | "assist" | "bounded_auto";
|
|
7
|
+
export type WorkflowNodeKind =
|
|
8
|
+
| "start"
|
|
9
|
+
| "enrichment"
|
|
10
|
+
| "parallel_group"
|
|
11
|
+
| "join"
|
|
12
|
+
| "condition"
|
|
13
|
+
| "ai_proposal"
|
|
14
|
+
| "human_task"
|
|
15
|
+
| "send_message"
|
|
16
|
+
| "wait_for_event"
|
|
17
|
+
| "delay"
|
|
18
|
+
| "delay_until"
|
|
19
|
+
| "decision"
|
|
20
|
+
| "action"
|
|
21
|
+
| "handoff"
|
|
22
|
+
| "start_linked_workflow"
|
|
23
|
+
| "end";
|
|
24
|
+
|
|
25
|
+
export interface WorkflowNode {
|
|
26
|
+
id: string;
|
|
27
|
+
kind: WorkflowNodeKind;
|
|
28
|
+
name: string;
|
|
29
|
+
description?: string;
|
|
30
|
+
input_mapping: JsonObject;
|
|
31
|
+
timeout_policy?: JsonObject;
|
|
32
|
+
retry_policy?: JsonObject;
|
|
33
|
+
error_port?: string;
|
|
34
|
+
config: JsonObject;
|
|
35
|
+
metadata?: { x?: number; y?: number; group_id?: string };
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export interface WorkflowEdge {
|
|
39
|
+
id: string;
|
|
40
|
+
from: { node_id: string; port: string };
|
|
41
|
+
to: { node_id: string; port: string };
|
|
42
|
+
label?: string;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export interface WorkflowGraph {
|
|
46
|
+
schema_version: "1";
|
|
47
|
+
purpose: WorkflowPurpose;
|
|
48
|
+
entry_node_id: string;
|
|
49
|
+
nodes: WorkflowNode[];
|
|
50
|
+
edges: WorkflowEdge[];
|
|
51
|
+
input_schema: JsonObject;
|
|
52
|
+
terminal_codes: string[];
|
|
53
|
+
default_policies: JsonObject;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export interface WorkflowValidationIssue {
|
|
57
|
+
code: string;
|
|
58
|
+
message: string;
|
|
59
|
+
path?: string;
|
|
60
|
+
nodeId?: string;
|
|
61
|
+
edgeId?: string;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export interface WorkflowValidation {
|
|
65
|
+
valid: boolean;
|
|
66
|
+
errors: WorkflowValidationIssue[];
|
|
67
|
+
warnings: WorkflowValidationIssue[];
|
|
68
|
+
estimatedMaximumSteps?: number;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export interface WorkflowDraftSummary {
|
|
72
|
+
id: string;
|
|
73
|
+
revision: number;
|
|
74
|
+
validationStatus: string;
|
|
75
|
+
validation: WorkflowValidation;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export interface WorkflowDraft extends WorkflowDraftSummary {
|
|
79
|
+
graphDigest: string;
|
|
80
|
+
graph: WorkflowGraph;
|
|
81
|
+
updatedAt: string;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export interface WorkflowVersionSummary {
|
|
85
|
+
id: string;
|
|
86
|
+
version: number;
|
|
87
|
+
authorityMode: WorkflowAuthorityMode;
|
|
88
|
+
publishedAt: string;
|
|
89
|
+
graphDigest?: string;
|
|
90
|
+
bundleDigest?: string;
|
|
91
|
+
retiredAt?: string | null;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
export interface WorkflowFixture {
|
|
95
|
+
id: string;
|
|
96
|
+
name: string;
|
|
97
|
+
input: JsonObject;
|
|
98
|
+
expected: JsonObject;
|
|
99
|
+
failureInjection: JsonObject;
|
|
100
|
+
updatedAt: string;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
export interface WorkflowSummary {
|
|
104
|
+
id: string;
|
|
105
|
+
key: string;
|
|
106
|
+
name: string;
|
|
107
|
+
description: string;
|
|
108
|
+
purpose: WorkflowPurpose;
|
|
109
|
+
status: string;
|
|
110
|
+
activeVersionId: string | null;
|
|
111
|
+
createdBy: string;
|
|
112
|
+
createdAt: string;
|
|
113
|
+
updatedAt: string;
|
|
114
|
+
draft: WorkflowDraftSummary | null;
|
|
115
|
+
activeVersion: WorkflowVersionSummary | null;
|
|
116
|
+
activePinCount: number;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
export interface WorkflowDetail extends Omit<WorkflowSummary, "draft"> {
|
|
120
|
+
draft: WorkflowDraft | null;
|
|
121
|
+
versions: WorkflowVersionSummary[];
|
|
122
|
+
fixtures: WorkflowFixture[];
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
export interface WorkflowListResponse {
|
|
126
|
+
workflows: WorkflowSummary[];
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
export interface WorkflowResponse {
|
|
130
|
+
workflow: WorkflowDetail;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
export interface WorkflowVersionResponse {
|
|
134
|
+
version: WorkflowVersionSummary & { graph: WorkflowGraph };
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
export interface WorkflowCreateResponse {
|
|
138
|
+
workflowId: string;
|
|
139
|
+
draftId: string;
|
|
140
|
+
revision: number;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
export interface WorkflowSaveResponse {
|
|
144
|
+
draftId: string;
|
|
145
|
+
revision: number;
|
|
146
|
+
graphDigest: string;
|
|
147
|
+
validation: WorkflowValidation;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
export interface WorkflowValidationResponse {
|
|
151
|
+
revision: number;
|
|
152
|
+
graphDigest: string;
|
|
153
|
+
validation: WorkflowValidation;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
export interface WorkflowTestStep {
|
|
157
|
+
nodeId?: string;
|
|
158
|
+
node_id?: string;
|
|
159
|
+
state?: string;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
export interface WorkflowTestResponse {
|
|
163
|
+
testRunId: string;
|
|
164
|
+
status: "passed" | "failed";
|
|
165
|
+
graphDigest: string;
|
|
166
|
+
result?: {
|
|
167
|
+
terminalCode?: string;
|
|
168
|
+
terminal_code?: string;
|
|
169
|
+
steps?: WorkflowTestStep[];
|
|
170
|
+
};
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
export interface WorkflowPublishResponse {
|
|
174
|
+
workflowId: string;
|
|
175
|
+
versionId: string;
|
|
176
|
+
version: number;
|
|
177
|
+
artifactId: string;
|
|
178
|
+
bundleDigest: string;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
export interface QueueListItem {
|
|
182
|
+
id: string;
|
|
183
|
+
name: string;
|
|
184
|
+
status: string;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
export interface QueueListResponse {
|
|
188
|
+
queues: QueueListItem[];
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
export interface WorkflowPinResponse {
|
|
192
|
+
pinId: string;
|
|
193
|
+
workflowVersionId: string;
|
|
194
|
+
mode: "primary" | "shadow";
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
export type StudioConsoleState =
|
|
198
|
+
| { kind: "message"; heading: string; detail: string }
|
|
199
|
+
| { kind: "validation"; heading: string; validation: WorkflowValidation }
|
|
200
|
+
| { kind: "test"; fixtureName: string; result: WorkflowTestResponse }
|
|
201
|
+
| { kind: "pin"; heading: string; detail: string };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
node_modules/
|
|
2
|
+
.wrangler/
|
|
3
|
+
coverage/
|
|
4
|
+
dist/
|
|
5
|
+
.dev.vars
|
|
6
|
+
.safest/secrets.env
|
|
7
|
+
backups/
|
|
8
|
+
exports/
|
|
9
|
+
*.log
|
|
10
|
+
.DS_Store
|
|
11
|
+
.env
|
|
12
|
+
.env.*
|
|
13
|
+
!.env.example
|
|
14
|
+
.safest/
|
|
15
|
+
dogfood-output/
|
|
16
|
+
test-zone/dogfood-output/
|
|
17
|
+
test-results/
|
|
18
|
+
playwright-report/
|