@opengeni/db 1.0.1 → 3.1.0-canary.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/dist/attached-browser-devices.d.ts +7 -0
- package/dist/automations.d.ts +154 -0
- package/dist/canonical-human-identities.js +3 -3
- package/dist/capability-integrations.d.ts +13 -0
- package/dist/child-lifecycle-notices.d.ts +68 -0
- package/dist/{chunk-LTG3S6ZY.js → chunk-EULAN2NP.js} +2 -2
- package/dist/{chunk-CUPM3FGB.js → chunk-NJVZPWXY.js} +3 -3
- package/dist/{chunk-4SR4HKKA.js → chunk-NMUBV7Z5.js} +19 -11
- package/dist/chunk-NMUBV7Z5.js.map +1 -0
- package/dist/chunk-OF5OBB76.js +4457 -0
- package/dist/chunk-OF5OBB76.js.map +1 -0
- package/dist/{chunk-6ZYKCRFO.js → chunk-PR2WMLOQ.js} +7580 -4417
- package/dist/chunk-PR2WMLOQ.js.map +1 -0
- package/dist/{chunk-ZWREYEWA.js → chunk-SCPUJS53.js} +41 -4
- package/dist/chunk-SCPUJS53.js.map +1 -0
- package/dist/{chunk-SK7YYHBI.js → chunk-SIBYBA2D.js} +46 -1
- package/dist/chunk-SIBYBA2D.js.map +1 -0
- package/dist/chunk-TIKF3KTI.js +383 -0
- package/dist/chunk-TIKF3KTI.js.map +1 -0
- package/dist/chunk-ZZ5LJEFX.js +516 -0
- package/dist/chunk-ZZ5LJEFX.js.map +1 -0
- package/dist/codemode-operations.d.ts +1 -6
- package/dist/company-brain-context-selection-schema.d.ts +705 -0
- package/dist/company-brain-context-selection.d.ts +94 -0
- package/dist/company-brain-governed-writes.d.ts +24 -0
- package/dist/company-brain.d.ts +55 -0
- package/dist/company-profile-agent-admin.d.ts +15 -0
- package/dist/company-profile-schema.d.ts +619 -2
- package/dist/company-profile.d.ts +9 -4
- package/dist/connection-authority.d.ts +95 -0
- package/dist/connection-scopes.d.ts +8 -0
- package/dist/connection-tenancy-backfill.d.ts +41 -0
- package/dist/connection-token-resolver.d.ts +30 -1
- package/dist/database.d.ts +19 -0
- package/dist/editable-artifact-durable-export.js +2 -2
- package/dist/editable-artifacts.d.ts +2 -2
- package/dist/editable-artifacts.js +3 -3
- package/dist/governed-learning-activation-schema.d.ts +984 -0
- package/dist/governed-learning-activation.d.ts +98 -0
- package/dist/governed-learning-evaluator-schema.d.ts +633 -0
- package/dist/governed-learning-evaluator.d.ts +28 -0
- package/dist/index.d.ts +1595 -81
- package/dist/index.js +21571 -8126
- package/dist/index.js.map +1 -1
- package/dist/insights.d.ts +18 -0
- package/dist/integration-bindings.d.ts +1 -0
- package/dist/integration-facets.d.ts +30 -0
- package/dist/interaction-placement-loss.d.ts +22 -0
- package/dist/managed-human-provisioning.d.ts +25 -0
- package/dist/memory-domain.d.ts +3 -3
- package/dist/migrate.d.ts +11 -1
- package/dist/migrate.js +1 -1
- package/dist/new-session-drafts.d.ts +43 -5
- package/dist/organization-membership-backfill.d.ts +174 -0
- package/dist/organization-membership-lifecycle.d.ts +162 -0
- package/dist/pr-review.d.ts +107 -0
- package/dist/preference-registry-schema.d.ts +2 -0
- package/dist/preference-registry.d.ts +2 -0
- package/dist/provision-roles.js +1 -1
- package/dist/runtime-posture.d.ts +22 -8
- package/dist/schema.d.ts +24914 -13703
- package/dist/schema.js +99 -1
- package/dist/scoped-knowledge-schema.d.ts +52 -1
- package/dist/session-background-commands.d.ts +125 -0
- package/dist/session-background-commands.js +34 -0
- package/dist/session-background-commands.js.map +1 -0
- package/dist/session-control.d.ts +156 -3
- package/dist/session-goal-pacing.d.ts +68 -0
- package/dist/session-queue-commands.d.ts +41 -4
- package/dist/session-realtime-ledger.d.ts +2 -0
- package/dist/session-tenancy.d.ts +71 -1
- package/dist/session-tenancy.js +25 -3
- package/dist/session-tool-call-settlement.d.ts +9 -4
- package/dist/slack-routing-personal-workspace.d.ts +23 -0
- package/dist/slack-routing.d.ts +153 -0
- package/dist/slack-task-policy-schema.d.ts +34 -0
- package/dist/slack-task-policy.d.ts +8 -0
- package/dist/slack-user-link-access.d.ts +1 -0
- package/dist/task-notes-schema.d.ts +594 -0
- package/dist/task-notes.d.ts +39 -0
- package/dist/turn-initiator.d.ts +2 -0
- package/dist/user-resource-authority.d.ts +109 -0
- package/dist/video-generation.js +3 -3
- package/dist/workspace-authority.d.ts +81 -0
- package/dist/workspace-instruction-policies-schema.d.ts +279 -0
- package/dist/workspace-instruction-policies.d.ts +62 -0
- package/dist/workspace-learning-policy.d.ts +1 -0
- package/dist/workspace-membership-permissions.d.ts +2 -0
- package/drizzle/0240_enrollment_connection_authority.sql +39 -0
- package/drizzle/0241_atomic_personal_resource_delegation.sql +1000 -0
- package/drizzle/0241_enrollment_agent_runtime.sql +70 -0
- package/drizzle/0244_slack_app_home_refresh_queue.sql +120 -0
- package/drizzle/0245_model_context_contribution_facts.sql +88 -0
- package/drizzle/0246_integration_personal_instance_authority.sql +70 -0
- package/drizzle/0247_terraform_stacks_provenance_repair.sql +428 -0
- package/drizzle/0248_terraform_stacks_component_resolution_fence.sql +83 -0
- package/drizzle/0249_personal_resource_delegation_authority_correction.sql +662 -0
- package/drizzle/0250_direct_retained_process_owner_liveness.sql +199 -0
- package/drizzle/0251_connected_machine_operation_policy.sql +45 -0
- package/drizzle/0252_scheduled_personal_resource_delegation.sql +1867 -0
- package/drizzle/0253_common_user_resource_authority_lifecycle.sql +1555 -0
- package/drizzle/0254_scoped_variable_set_authority.sql +1255 -0
- package/drizzle/0255_company_brain_governed_write_proposals.sql +524 -0
- package/drizzle/0256_connection_authority_delegation.sql +703 -0
- package/drizzle/0257_goal_revision_decisions_and_root_constraints.sql +436 -0
- package/drizzle/0258_three_scope_document_knowledge_authority.sql +1273 -0
- package/drizzle/0259_company_brain_context_selection_receipts.sql +869 -0
- package/drizzle/0260_task_note_knowledge_promotion.sql +820 -0
- package/drizzle/0261_preference_knowledge_proposal_actor_binding.sql +471 -0
- package/drizzle/0262_scoped_connected_machines_and_rigs.sql +1700 -0
- package/drizzle/0263_organization_membership_lifecycle.sql +3284 -0
- package/drizzle/0264_connection_authority_runtime_activation.sql +1084 -0
- package/drizzle/0266_company_brain_context_receipt_inspection.sql +156 -0
- package/drizzle/0268_governed_learning_decision_receipts.sql +825 -0
- package/drizzle/0269_governed_learning_activation_controller.sql +1874 -0
- package/drizzle/0270_governed_learning_history_inspection.sql +170 -0
- package/drizzle/0271_company_brain_retrieval_only_default.sql +524 -0
- package/drizzle/0272_human_confirmed_learning_activation.sql +591 -0
- package/drizzle/0273_scheduled_variable_set_materialization.sql +268 -0
- package/drizzle/0274_human_confirmed_knowledge_review.sql +310 -0
- package/drizzle/0275_scheduled_connection_authority.sql +5527 -0
- package/drizzle/0276_onboarding_proposal_initiating_human_guc.sql +198 -0
- package/drizzle/0277_workspace_writer_authority_attribution.sql +393 -0
- package/drizzle/0278_workspace_membership_removal_fencing.sql +1174 -0
- package/drizzle/0279_workspace_connection_use_lane.sql +343 -0
- package/drizzle/0280_connection_and_variable_set_audit_attribution.sql +773 -0
- package/drizzle/0281_viewer_holder_authority_claims.sql +52 -0
- package/drizzle/0282_variable_set_session_attach_attribution.sql +178 -0
- package/drizzle/0283_editable_spreadsheet_authored_state.sql +82 -0
- package/drizzle/0284_truthful_human_confirmed_review_reason.sql +930 -0
- package/drizzle/0285_organization_tenancy_inventory.sql +329 -0
- package/drizzle/0286_widen_task_note_expiry_ceiling.sql +391 -0
- package/drizzle/0287_open_suffix_pending_tool_calls.sql +18 -0
- package/drizzle/0288_attached_browser_reenrollment.sql +64 -0
- package/drizzle/0289_session_composer_policy_authority.sql +597 -0
- package/drizzle/0290_organization_membership_backfill.sql +268 -0
- package/drizzle/0291_resource_authority_classification_assertion.sql +371 -0
- package/drizzle/0292_truthful_tenancy_inventory_counters.sql +291 -0
- package/drizzle/0293_confirm_time_rule_rebaseline.sql +615 -0
- package/drizzle/0294_preference_activation_authority.sql +237 -0
- package/drizzle/0295_retire_legacy_standing_memory_mode.sql +476 -0
- package/drizzle/0296_force_rls_backfill_noop_repair.sql +215 -0
- package/drizzle/0297_session_ownership_classification_and_backfill.sql +752 -0
- package/drizzle/0298_organization_tenancy_parity.sql +609 -0
- package/drizzle/0299_organization_membership_lock_order.sql +291 -0
- package/drizzle/0300_tenancy_backfill_ledger.sql +459 -0
- package/drizzle/0301_session_snapshot_and_pin_visibility.sql +181 -0
- package/drizzle/0302_personal_workspace_session_ownership.sql +303 -0
- package/drizzle/0303_session_tenancy_product_activation.sql +919 -0
- package/drizzle/0304_personal_workspace_private_session_reads.sql +97 -0
- package/drizzle/0305_personal_resource_grant_management.sql +584 -0
- package/drizzle/0306_atomic_personal_resource_attachments.sql +1374 -0
- package/drizzle/0307_session_attention_state.sql +51 -0
- package/drizzle/0308_session_archives.sql +35 -0
- package/drizzle/0309_channel_project_pins.sql +6 -0
- package/drizzle/0310_channel_project_order.sql +27 -0
- package/drizzle/0311_company_scope_and_private_session_create.sql +656 -0
- package/drizzle/0312_quiescent_session_tree_deletion.sql +39 -0
- package/drizzle/0313_private_child_session_authority.sql +365 -0
- package/drizzle/0314_unregistered_organization_invitations.sql +606 -0
- package/drizzle/0315_personal_github_repository_selection.sql +624 -0
- package/drizzle/0316_human_confirmed_activation_resumed_generation.sql +869 -0
- package/drizzle/0317_session_goal_continuation_hold.sql +64 -0
- package/drizzle/0318_session_turn_startup_milestones.sql +115 -0
- package/drizzle/0319_event_triggered_automations.sql +254 -0
- package/drizzle/0320_pr_review_pack.sql +113 -0
- package/drizzle/0321_slack_bot_environment_display_name.sql +15 -0
- package/drizzle/0322_session_turns_unclaimed_prompt_trigger_index.sql +5 -0
- package/drizzle/0323_organization_private_session_enablement.sql +489 -0
- package/drizzle/0324_human_confirmed_company_profile_agent_admin.sql +856 -0
- package/drizzle/0325_child_lifecycle_notices.sql +44 -0
- package/drizzle/0326_interaction_operation_error_codes.sql +62 -0
- package/drizzle/0327_slack_first_task_hint.sql +29 -0
- package/drizzle/0328_session_background_commands.sql +590 -0
- package/drizzle/0329_slack_orchestration_delivery_events.sql +91 -0
- package/drizzle/0330_api_key_descriptions.sql +20 -0
- package/drizzle/0331_managed_organization_creation.sql +163 -0
- package/drizzle/0332_organization_shared_workspace_control_plane.sql +539 -0
- package/drizzle/0333_session_turn_prompt_routing.sql +45 -0
- package/drizzle/0334_connected_machine_workspace_root.sql +99 -0
- package/drizzle/0335_slack_workspace_routing.sql +460 -0
- package/drizzle/0336_atomic_session_fork_visibility.sql +667 -0
- package/drizzle/0337_slack_routed_action_handles.sql +189 -0
- package/drizzle/0338_atomic_connected_machine_attachments.sql +410 -0
- package/drizzle/0339_document_authority_reclassification.sql +1153 -0
- package/drizzle/0340_tenancy_backfill_activation_evidence.sql +1347 -0
- package/drizzle/0341_slack_routing_probe_organization_fence.sql +109 -0
- package/package.json +10 -6
- package/src/attached-browser-devices.ts +233 -5
- package/src/automations.ts +911 -0
- package/src/browser-sessions.ts +10 -0
- package/src/capability-integrations.ts +175 -1
- package/src/child-lifecycle-notices.ts +241 -0
- package/src/codemode-operations.ts +1 -35
- package/src/company-brain-context-selection-schema.ts +100 -0
- package/src/company-brain-context-selection.ts +359 -0
- package/src/company-brain-governed-writes.ts +1170 -0
- package/src/company-brain.ts +309 -0
- package/src/company-profile-agent-admin.ts +225 -0
- package/src/company-profile-schema.ts +121 -1
- package/src/company-profile.ts +21 -0
- package/src/computer-sessions.ts +10 -1
- package/src/connection-authority.ts +290 -0
- package/src/connection-scopes.ts +20 -0
- package/src/connection-tenancy-backfill.ts +81 -0
- package/src/connection-token-resolver.ts +263 -31
- package/src/database.ts +75 -2
- package/src/editable-artifacts-schema.ts +10 -5
- package/src/editable-artifacts.ts +21 -11
- package/src/governed-learning-activation-schema.ts +121 -0
- package/src/governed-learning-activation.ts +588 -0
- package/src/governed-learning-evaluator-schema.ts +72 -0
- package/src/governed-learning-evaluator.ts +217 -0
- package/src/index.ts +11651 -1548
- package/src/insights.ts +107 -0
- package/src/integration-bindings.ts +88 -6
- package/src/integration-facets.ts +287 -84
- package/src/interaction-placement-loss.ts +234 -0
- package/src/managed-human-provisioning.ts +116 -0
- package/src/memory-domain.ts +27 -32
- package/src/migrate.ts +77 -1
- package/src/new-session-drafts.ts +229 -35
- package/src/organization-membership-backfill.ts +735 -0
- package/src/organization-membership-lifecycle.ts +985 -0
- package/src/pr-review.ts +890 -0
- package/src/preference-registry.ts +31 -1
- package/src/provision-roles.ts +877 -6
- package/src/runtime-posture-cli.ts +2 -0
- package/src/runtime-posture.ts +1291 -76
- package/src/schema.ts +3303 -428
- package/src/scoped-knowledge-schema.ts +16 -8
- package/src/scoped-knowledge.ts +1 -1
- package/src/session-background-commands.ts +759 -0
- package/src/session-control.ts +640 -74
- package/src/session-goal-pacing.ts +126 -0
- package/src/session-queue-commands.ts +437 -84
- package/src/session-realtime-context.ts +3 -3
- package/src/session-realtime-ledger.ts +22 -11
- package/src/session-realtime-mirror.ts +1 -1
- package/src/session-tenancy.ts +403 -49
- package/src/session-tool-call-settlement.ts +38 -29
- package/src/slack-routing-personal-workspace.ts +67 -0
- package/src/slack-routing.ts +469 -0
- package/src/slack-task-policy-schema.ts +5 -0
- package/src/slack-task-policy.ts +18 -0
- package/src/slack-user-link-access.ts +17 -1
- package/src/task-notes-schema.ts +74 -0
- package/src/task-notes.ts +124 -2
- package/src/turn-initiator.ts +8 -0
- package/src/user-resource-authority.ts +377 -0
- package/src/workspace-authority.ts +160 -0
- package/src/workspace-instruction-policies-schema.ts +53 -1
- package/src/workspace-instruction-policies.ts +528 -77
- package/src/workspace-learning-policy.ts +21 -5
- package/src/workspace-membership-permissions.ts +9 -0
- package/dist/chunk-4SR4HKKA.js.map +0 -1
- package/dist/chunk-6ZYKCRFO.js.map +0 -1
- package/dist/chunk-NXAFLCQX.js +0 -2468
- package/dist/chunk-NXAFLCQX.js.map +0 -1
- package/dist/chunk-SK7YYHBI.js.map +0 -1
- package/dist/chunk-WD5ROSLL.js +0 -117
- package/dist/chunk-WD5ROSLL.js.map +0 -1
- package/dist/chunk-ZWREYEWA.js.map +0 -1
- /package/dist/{chunk-LTG3S6ZY.js.map → chunk-EULAN2NP.js.map} +0 -0
- /package/dist/{chunk-CUPM3FGB.js.map → chunk-NJVZPWXY.js.map} +0 -0
|
@@ -20,6 +20,13 @@ export declare function reconcileAttachedBrowserInventory(db: Database, input: {
|
|
|
20
20
|
enrollmentId: string;
|
|
21
21
|
snapshot: AttachedBrowserInventorySnapshotValue;
|
|
22
22
|
}): Promise<ReconcileAttachedBrowserInventoryResult>;
|
|
23
|
+
/** Lock the device row first (same order as inventory) and prove the live
|
|
24
|
+
* physical generation still matches this controller placement. */
|
|
25
|
+
export declare function attachedDeviceGenerationMatches(tx: Database, input: {
|
|
26
|
+
workspaceId: string;
|
|
27
|
+
deviceId: string;
|
|
28
|
+
placementInstanceId: string;
|
|
29
|
+
}): Promise<boolean>;
|
|
23
30
|
/** Immediately mark every live Chrome profile on a cleanly disconnected agent
|
|
24
31
|
* offline. Historical endpoint rows remain discoverable and reconnect in place. */
|
|
25
32
|
export declare function disconnectAttachedBrowserDevices(db: Database, input: {
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
import { AutomationAcceptedExecution, AutomationNormalizedEvent, type AutomationRun, type AutomationSource, type AutomationTrigger, type CreateAutomationSourceRequest, type CreateAutomationTriggerRequest, type UpdateAutomationSourceRequest, type UpdateAutomationTriggerRequest } from "@opengeni/contracts";
|
|
2
|
+
import type { Database } from "./database.js";
|
|
3
|
+
export declare class AutomationDeliveryConflictError extends Error {
|
|
4
|
+
readonly name = "AutomationDeliveryConflictError";
|
|
5
|
+
constructor();
|
|
6
|
+
}
|
|
7
|
+
export declare class AutomationRevisionConflictError extends Error {
|
|
8
|
+
readonly name = "AutomationRevisionConflictError";
|
|
9
|
+
constructor();
|
|
10
|
+
}
|
|
11
|
+
export declare class AutomationAuthorityRevokedError extends Error {
|
|
12
|
+
readonly name = "AutomationAuthorityRevokedError";
|
|
13
|
+
constructor(message?: string);
|
|
14
|
+
}
|
|
15
|
+
export type AutomationSourceSecret = AutomationSource & {
|
|
16
|
+
webhookSecretEncrypted: string;
|
|
17
|
+
};
|
|
18
|
+
export type AutomationTriggerWithRevision = AutomationTrigger & {
|
|
19
|
+
sourceStatus: "active" | "disabled";
|
|
20
|
+
sourceVersion: number;
|
|
21
|
+
sourceConfiguration: Record<string, unknown>;
|
|
22
|
+
};
|
|
23
|
+
export type AutomationStoredEvent = {
|
|
24
|
+
id: string;
|
|
25
|
+
accountId: string;
|
|
26
|
+
workspaceId: string;
|
|
27
|
+
sourceId: string;
|
|
28
|
+
sourceVersion: number;
|
|
29
|
+
sourceConfiguration: Record<string, unknown>;
|
|
30
|
+
matchedTriggerRevisions: Array<{
|
|
31
|
+
triggerId: string;
|
|
32
|
+
revision: number;
|
|
33
|
+
}>;
|
|
34
|
+
deliveryKey: string;
|
|
35
|
+
requestDigest: string;
|
|
36
|
+
normalizedEvent: AutomationNormalizedEvent;
|
|
37
|
+
status: "accepted" | "ignored" | "failed";
|
|
38
|
+
ignoredReason: string | null;
|
|
39
|
+
errorCode: string | null;
|
|
40
|
+
createdAt: string;
|
|
41
|
+
updatedAt: string;
|
|
42
|
+
};
|
|
43
|
+
export type AutomationRunExecution = AutomationRun & {
|
|
44
|
+
acceptedExecution: AutomationAcceptedExecution;
|
|
45
|
+
};
|
|
46
|
+
export declare function createAutomationSource(db: Database, input: {
|
|
47
|
+
accountId: string;
|
|
48
|
+
workspaceId: string;
|
|
49
|
+
createdBySubjectId: string;
|
|
50
|
+
request: CreateAutomationSourceRequest;
|
|
51
|
+
webhookSecretEncrypted: string;
|
|
52
|
+
packInstallationId?: string | null;
|
|
53
|
+
packConnectorId?: string | null;
|
|
54
|
+
}): Promise<AutomationSource>;
|
|
55
|
+
export declare function resolveAutomationWebhookEndpoint(db: Database, endpointId: string): Promise<{
|
|
56
|
+
accountId: string;
|
|
57
|
+
workspaceId: string;
|
|
58
|
+
sourceId: string;
|
|
59
|
+
} | null>;
|
|
60
|
+
export declare function getAutomationSourceSecret(db: Database, input: {
|
|
61
|
+
accountId: string;
|
|
62
|
+
workspaceId: string;
|
|
63
|
+
sourceId: string;
|
|
64
|
+
}): Promise<AutomationSourceSecret | null>;
|
|
65
|
+
export declare function listAutomationSources(db: Database, workspaceId: string): Promise<AutomationSource[]>;
|
|
66
|
+
export declare function updateAutomationSource(db: Database, input: {
|
|
67
|
+
workspaceId: string;
|
|
68
|
+
sourceId: string;
|
|
69
|
+
request: UpdateAutomationSourceRequest;
|
|
70
|
+
webhookSecretEncrypted?: string;
|
|
71
|
+
}): Promise<AutomationSource | null>;
|
|
72
|
+
export declare function createAutomationTrigger(db: Database, input: {
|
|
73
|
+
accountId: string;
|
|
74
|
+
workspaceId: string;
|
|
75
|
+
createdBySubjectId: string;
|
|
76
|
+
request: CreateAutomationTriggerRequest;
|
|
77
|
+
adapterId: string;
|
|
78
|
+
}): Promise<AutomationTrigger>;
|
|
79
|
+
export declare function listAutomationTriggers(db: Database, workspaceId: string): Promise<AutomationTrigger[]>;
|
|
80
|
+
export declare function listActiveAutomationTriggersForSource(db: Database, input: {
|
|
81
|
+
accountId: string;
|
|
82
|
+
workspaceId: string;
|
|
83
|
+
sourceId: string;
|
|
84
|
+
}): Promise<AutomationTriggerWithRevision[]>;
|
|
85
|
+
export declare function getAutomationTriggerRevisions(db: Database, input: {
|
|
86
|
+
workspaceId: string;
|
|
87
|
+
refs: Array<{
|
|
88
|
+
triggerId: string;
|
|
89
|
+
revision: number;
|
|
90
|
+
}>;
|
|
91
|
+
}): Promise<AutomationTrigger[]>;
|
|
92
|
+
export declare function updateAutomationTrigger(db: Database, input: {
|
|
93
|
+
workspaceId: string;
|
|
94
|
+
triggerId: string;
|
|
95
|
+
subjectId: string;
|
|
96
|
+
request: UpdateAutomationTriggerRequest;
|
|
97
|
+
}): Promise<AutomationTrigger | null>;
|
|
98
|
+
export declare function recordAutomationEvent(db: Database, input: {
|
|
99
|
+
accountId: string;
|
|
100
|
+
workspaceId: string;
|
|
101
|
+
sourceId: string;
|
|
102
|
+
sourceVersion: number;
|
|
103
|
+
sourceConfiguration: Record<string, unknown>;
|
|
104
|
+
matchedTriggerRevisions: Array<{
|
|
105
|
+
triggerId: string;
|
|
106
|
+
revision: number;
|
|
107
|
+
}>;
|
|
108
|
+
deliveryKey: string;
|
|
109
|
+
requestDigest: string;
|
|
110
|
+
normalizedEvent: AutomationNormalizedEvent;
|
|
111
|
+
ignoredReason?: string | null;
|
|
112
|
+
}): Promise<{
|
|
113
|
+
event: AutomationStoredEvent;
|
|
114
|
+
duplicate: boolean;
|
|
115
|
+
}>;
|
|
116
|
+
export declare function createAutomationRun(db: Database, input: {
|
|
117
|
+
accountId: string;
|
|
118
|
+
workspaceId: string;
|
|
119
|
+
sourceId: string;
|
|
120
|
+
triggerId: string;
|
|
121
|
+
triggerRevision: number;
|
|
122
|
+
eventId: string;
|
|
123
|
+
occurrenceKey: string;
|
|
124
|
+
acceptedExecution: AutomationAcceptedExecution;
|
|
125
|
+
}): Promise<{
|
|
126
|
+
run: AutomationRunExecution;
|
|
127
|
+
duplicate: boolean;
|
|
128
|
+
}>;
|
|
129
|
+
export declare function listAutomationRuns(db: Database, workspaceId: string, limit?: number): Promise<AutomationRun[]>;
|
|
130
|
+
export declare function getAutomationRunExecution(db: Database, input: {
|
|
131
|
+
accountId: string;
|
|
132
|
+
workspaceId: string;
|
|
133
|
+
runId: string;
|
|
134
|
+
}): Promise<AutomationRunExecution | null>;
|
|
135
|
+
export declare function claimAutomationRun(db: Database, input: {
|
|
136
|
+
accountId: string;
|
|
137
|
+
workspaceId: string;
|
|
138
|
+
runId: string;
|
|
139
|
+
}): Promise<AutomationRunExecution | null>;
|
|
140
|
+
export declare function assertAutomationRunAuthorityInTransaction(db: Database, input: {
|
|
141
|
+
workspaceId: string;
|
|
142
|
+
runId: string;
|
|
143
|
+
triggerId: string;
|
|
144
|
+
triggerRevision: number;
|
|
145
|
+
sourceId: string;
|
|
146
|
+
sourceVersion: number;
|
|
147
|
+
sessionId: string;
|
|
148
|
+
}): Promise<void>;
|
|
149
|
+
export declare function settleAutomationRun(db: Database, input: {
|
|
150
|
+
workspaceId: string;
|
|
151
|
+
runId: string;
|
|
152
|
+
status: "skipped" | "failed";
|
|
153
|
+
errorCode: string;
|
|
154
|
+
}): Promise<void>;
|
|
@@ -9,9 +9,9 @@ import {
|
|
|
9
9
|
getCanonicalHumanIdentityProjection,
|
|
10
10
|
synchronizeCanonicalHumanLoginBindings,
|
|
11
11
|
validateCanonicalHumanSession
|
|
12
|
-
} from "./chunk-
|
|
13
|
-
import "./chunk-
|
|
14
|
-
import "./chunk-
|
|
12
|
+
} from "./chunk-EULAN2NP.js";
|
|
13
|
+
import "./chunk-SCPUJS53.js";
|
|
14
|
+
import "./chunk-PR2WMLOQ.js";
|
|
15
15
|
import "./chunk-PZ5AY32C.js";
|
|
16
16
|
export {
|
|
17
17
|
CanonicalHumanIdentityAuthorityError,
|
|
@@ -174,6 +174,19 @@ export declare class ApiIntegrationInstallationVersionConflictError extends Erro
|
|
|
174
174
|
}
|
|
175
175
|
export declare function installApiIntegration(db: Database, input: InstallApiIntegrationInput): Promise<InstalledApiIntegration>;
|
|
176
176
|
export declare function listInstalledApiIntegrations(db: Database, workspaceId: string, subjectId?: string): Promise<ApiIntegrationRuntime[]>;
|
|
177
|
+
/**
|
|
178
|
+
* Exact runnable API-integration server ids for a scheduled service run.
|
|
179
|
+
* Only runtime ids and the minimum delegation-matching metadata are selected;
|
|
180
|
+
* no integration definition, credential, token, endpoint, or tool schema is
|
|
181
|
+
* materialized before incident admission.
|
|
182
|
+
*/
|
|
183
|
+
export declare function listInstalledApiIntegrationServerIdsForDelegations(db: Database, workspaceId: string, delegations: readonly {
|
|
184
|
+
serverId: string;
|
|
185
|
+
connectionId: string;
|
|
186
|
+
providerDomain: string;
|
|
187
|
+
ownerSubjectId: string;
|
|
188
|
+
kind?: string | undefined;
|
|
189
|
+
}[]): Promise<string[]>;
|
|
177
190
|
/**
|
|
178
191
|
* Read installed API Integrations from a transaction that already carries the
|
|
179
192
|
* workspace RLS context. This is intentionally separate from the public
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { type ChildPausedPayload, type ChildProgressPayload, type ChildRequiresActionPayload, type ChildRequiresActionResolvedPayload, type ChildWaitingCapacityPayload, type HumanInputQuestion } from "@opengeni/contracts";
|
|
2
|
+
export declare function configureChildLifecycleNotices(input: {
|
|
3
|
+
enabled: boolean;
|
|
4
|
+
}): void;
|
|
5
|
+
export declare function childLifecycleNoticesEnabled(): boolean;
|
|
6
|
+
/** Bounded UTF-8 prefix with an explicit marker; never splits a code point. */
|
|
7
|
+
export declare function boundedChildNoticeText(value: string, maxBytes: number): {
|
|
8
|
+
text: string;
|
|
9
|
+
truncated: boolean;
|
|
10
|
+
};
|
|
11
|
+
export declare const CHILD_LIFECYCLE_DEDUPE_PREFIX: {
|
|
12
|
+
readonly requiresAction: "child-requires-action";
|
|
13
|
+
readonly requiresActionResolved: "child-requires-action-resolved";
|
|
14
|
+
readonly paused: "child-paused";
|
|
15
|
+
readonly waitingCapacity: "child-waiting-capacity";
|
|
16
|
+
readonly progress: "child-progress";
|
|
17
|
+
};
|
|
18
|
+
export declare function childRequiresActionDedupeKey(input: {
|
|
19
|
+
childSessionId: string;
|
|
20
|
+
turnId: string;
|
|
21
|
+
turnGeneration: number;
|
|
22
|
+
}): string;
|
|
23
|
+
export declare function childRequiresActionResolvedDedupeKey(input: {
|
|
24
|
+
childSessionId: string;
|
|
25
|
+
turnId: string;
|
|
26
|
+
turnGeneration: number;
|
|
27
|
+
requestId: string | null;
|
|
28
|
+
approvalId: string | null;
|
|
29
|
+
}): string;
|
|
30
|
+
export declare function childPausedDedupeKey(input: {
|
|
31
|
+
childSessionId: string;
|
|
32
|
+
receiptId: string;
|
|
33
|
+
}): string;
|
|
34
|
+
export declare function childWaitingCapacityDedupeKey(input: {
|
|
35
|
+
childSessionId: string;
|
|
36
|
+
waiterId: string;
|
|
37
|
+
}): string;
|
|
38
|
+
export declare function childProgressDedupeKey(input: {
|
|
39
|
+
childSessionId: string;
|
|
40
|
+
receiptId: string;
|
|
41
|
+
}): string;
|
|
42
|
+
/**
|
|
43
|
+
* Build the bounded child_requires_action payload from the child's frozen
|
|
44
|
+
* human-input requests and pending approvals. Only typed, content-free facts
|
|
45
|
+
* plus one bounded first-question preview per request cross to the parent:
|
|
46
|
+
* never subject ids, credentials, or raw tool arguments. The whole payload
|
|
47
|
+
* stays within CHILD_REQUIRES_ACTION_PAYLOAD_MAX_BYTES by dropping trailing
|
|
48
|
+
* requests and recording `truncated`.
|
|
49
|
+
*/
|
|
50
|
+
export declare function buildChildRequiresActionPayload(input: {
|
|
51
|
+
childSessionId: string;
|
|
52
|
+
childTurnId: string;
|
|
53
|
+
childTurnGeneration: number;
|
|
54
|
+
humanInputRequests: ReadonlyArray<{
|
|
55
|
+
id: string;
|
|
56
|
+
questions: readonly HumanInputQuestion[];
|
|
57
|
+
allowSkip: boolean;
|
|
58
|
+
expiresAt?: Date | null;
|
|
59
|
+
}>;
|
|
60
|
+
pendingApprovals: readonly unknown[];
|
|
61
|
+
}): ChildRequiresActionPayload;
|
|
62
|
+
export declare function childRequiresActionSummary(childSessionId: string, payload: ChildRequiresActionPayload): string;
|
|
63
|
+
export declare function childRequiresActionResolvedSummary(childSessionId: string, payload: ChildRequiresActionResolvedPayload): string;
|
|
64
|
+
export declare function childPausedSummary(childSessionId: string, payload: ChildPausedPayload): string;
|
|
65
|
+
export declare function childWaitingCapacitySummary(childSessionId: string, payload: ChildWaitingCapacityPayload): string;
|
|
66
|
+
export declare function childProgressSummary(childSessionId: string, payload: ChildProgressPayload): string;
|
|
67
|
+
export declare function boundedChildPausedReason(reason: string | null | undefined): string | null;
|
|
68
|
+
export declare function boundedChildProgressNote(note: string): string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
nestedPostgresSqlState,
|
|
3
3
|
rawRows
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-SCPUJS53.js";
|
|
5
5
|
|
|
6
6
|
// src/canonical-human-identities.ts
|
|
7
7
|
import { createHash } from "crypto";
|
|
@@ -256,4 +256,4 @@ export {
|
|
|
256
256
|
getCanonicalHumanIdentityProjection,
|
|
257
257
|
applyCanonicalHumanIdentityOperation
|
|
258
258
|
};
|
|
259
|
-
//# sourceMappingURL=chunk-
|
|
259
|
+
//# sourceMappingURL=chunk-EULAN2NP.js.map
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
rawRows,
|
|
3
3
|
withRlsContext,
|
|
4
4
|
withWorkspaceRls
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-SCPUJS53.js";
|
|
6
6
|
import {
|
|
7
7
|
connections,
|
|
8
8
|
creditLedgerEntries,
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
workspaceVideoGenerationPolicies,
|
|
15
15
|
workspaceVideoGenerationQuotas,
|
|
16
16
|
workspaces
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-PR2WMLOQ.js";
|
|
18
18
|
|
|
19
19
|
// src/video-generation.ts
|
|
20
20
|
import {
|
|
@@ -992,4 +992,4 @@ export {
|
|
|
992
992
|
mediaGenerationResultForStoredOperation,
|
|
993
993
|
getVideoGenerationOperationSummary
|
|
994
994
|
};
|
|
995
|
-
//# sourceMappingURL=chunk-
|
|
995
|
+
//# sourceMappingURL=chunk-NJVZPWXY.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
rawRows,
|
|
3
3
|
withRlsContext
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-SCPUJS53.js";
|
|
5
5
|
|
|
6
6
|
// src/editable-artifacts.ts
|
|
7
7
|
import { createHash } from "crypto";
|
|
@@ -17,9 +17,11 @@ import {
|
|
|
17
17
|
decodeEditableArtifactSerializedCommit
|
|
18
18
|
} from "@opengeni/contracts/editable-artifact-serialized-commit";
|
|
19
19
|
import {
|
|
20
|
+
EDITABLE_ARTIFACT_INTENT_PROTOCOL_VERSION,
|
|
20
21
|
EDITABLE_ARTIFACT_KERNEL_VERSION_MAX_BYTES,
|
|
21
22
|
EDITABLE_ARTIFACT_PRODUCT_MAX_SNAPSHOT_BYTES
|
|
22
23
|
} from "@opengeni/contracts/editable-artifacts";
|
|
24
|
+
import { EDITABLE_ARTIFACT_LIVE_WIRE_VERSION } from "@opengeni/contracts/editable-artifact-versions";
|
|
23
25
|
import { sql } from "drizzle-orm";
|
|
24
26
|
var EditableArtifactPersistenceError = class extends Error {
|
|
25
27
|
constructor(code, message, options) {
|
|
@@ -886,7 +888,6 @@ var PostgresEditableArtifactLiveReadStore = class {
|
|
|
886
888
|
async readBootstrap(input) {
|
|
887
889
|
const scope = validateScope(input.scope);
|
|
888
890
|
const artifactId = validateStableId(input.artifactId, "artifact id");
|
|
889
|
-
validateInteger(input.protocolVersion, "live protocol version", 1);
|
|
890
891
|
const resume = validateLiveResume(input.resume);
|
|
891
892
|
const authority = await withRlsContext(
|
|
892
893
|
this.db,
|
|
@@ -1076,7 +1077,8 @@ var PostgresEditableArtifactLiveReadStore = class {
|
|
|
1076
1077
|
...common,
|
|
1077
1078
|
modality: snapshot.modality,
|
|
1078
1079
|
causalFrontier: snapshot.coveredCausalFrontier,
|
|
1079
|
-
operationProtocolVersion: snapshot.operationProtocolVersion
|
|
1080
|
+
operationProtocolVersion: snapshot.operationProtocolVersion,
|
|
1081
|
+
snapshotVersion: snapshot.crdtStateVersion
|
|
1080
1082
|
}) : Object.freeze({
|
|
1081
1083
|
...common,
|
|
1082
1084
|
modality: snapshot.modality,
|
|
@@ -1670,7 +1672,7 @@ async function loadSnapshotMetadata(db, scope, artifactId, snapshotId) {
|
|
|
1670
1672
|
}
|
|
1671
1673
|
function validateLiveResume(input) {
|
|
1672
1674
|
if (!isPlainRecord(input)) throw new TypeError("Editable artifact live resume is invalid");
|
|
1673
|
-
const modality = input.modality
|
|
1675
|
+
const modality = input.modality;
|
|
1674
1676
|
if (modality !== "spreadsheet" && modality !== "document" && modality !== "presentation") {
|
|
1675
1677
|
throw new TypeError("Editable artifact live resume modality is invalid");
|
|
1676
1678
|
}
|
|
@@ -2109,7 +2111,7 @@ function committedTransactionFromRow(row, durableModality) {
|
|
|
2109
2111
|
} catch (error) {
|
|
2110
2112
|
throw new EditableArtifactPersistenceError(
|
|
2111
2113
|
"corrupt_history",
|
|
2112
|
-
"Stored canonical committed transaction is not a valid
|
|
2114
|
+
"Stored canonical committed transaction is not a valid OGACO002 envelope",
|
|
2113
2115
|
{ cause: error }
|
|
2114
2116
|
);
|
|
2115
2117
|
}
|
|
@@ -2641,12 +2643,12 @@ function validateCommittedTransactionProjection(transaction, receipt, operations
|
|
|
2641
2643
|
try {
|
|
2642
2644
|
summary2 = decodeCommittedTransactionSummary(transaction.committedTransactionBytes);
|
|
2643
2645
|
} catch (error) {
|
|
2644
|
-
throw new TypeError("Canonical committed transaction is not a valid
|
|
2646
|
+
throw new TypeError("Canonical committed transaction is not a valid OGACO002 envelope", {
|
|
2645
2647
|
cause: error
|
|
2646
2648
|
});
|
|
2647
2649
|
}
|
|
2648
2650
|
if (summary2.transactionId !== transaction.serverTransactionId || summary2.dot.replicaId !== transaction.dot.replicaId || summary2.dot.counter !== transaction.dot.counter || summary2.priorStateHash !== transaction.priorStateHash || summary2.stateHash !== transaction.stateHash || summary2.operationProtocolVersion !== transaction.operationProtocolVersion || !sameStringArray(summary2.operationIds, operationIds) || !sameFrontier(summary2.resolvedCausalBase, resolvedCausalBase) || !sameFrontier(summary2.resultingCausalFrontier, resultingCausalFrontier)) {
|
|
2649
|
-
throw new TypeError("Canonical
|
|
2651
|
+
throw new TypeError("Canonical OGACO002 bytes disagree with their durable projection");
|
|
2650
2652
|
}
|
|
2651
2653
|
return;
|
|
2652
2654
|
}
|
|
@@ -3012,6 +3014,10 @@ function validateLiveTicketRecord(input) {
|
|
|
3012
3014
|
throw new TypeError("Live ticket lifetime must be 1-60 seconds");
|
|
3013
3015
|
}
|
|
3014
3016
|
const modality = validateLiveTicketModality(input.modality);
|
|
3017
|
+
const protocolVersion = validateInteger(input.protocolVersion, "live protocol version", 1);
|
|
3018
|
+
if (protocolVersion !== EDITABLE_ARTIFACT_LIVE_WIRE_VERSION) {
|
|
3019
|
+
throw new TypeError("Live ticket protocol version is unsupported");
|
|
3020
|
+
}
|
|
3015
3021
|
return Object.freeze({
|
|
3016
3022
|
tokenDigest: validateHash(input.tokenDigest, "live ticket digest"),
|
|
3017
3023
|
scope: validateScope(input.scope),
|
|
@@ -3019,7 +3025,7 @@ function validateLiveTicketRecord(input) {
|
|
|
3019
3025
|
modality,
|
|
3020
3026
|
actor: validateLiveTicketActor(input.actor),
|
|
3021
3027
|
allowEdit: validateBoolean(input.allowEdit, "live ticket allowEdit"),
|
|
3022
|
-
protocolVersion
|
|
3028
|
+
protocolVersion,
|
|
3023
3029
|
issuedAt,
|
|
3024
3030
|
expiresAt
|
|
3025
3031
|
});
|
|
@@ -3241,8 +3247,10 @@ function validateCanonicalIntentBytes(value, requestHashInput) {
|
|
|
3241
3247
|
return bytes;
|
|
3242
3248
|
}
|
|
3243
3249
|
function validateIntentProtocolVersion(value) {
|
|
3244
|
-
if (value !==
|
|
3245
|
-
|
|
3250
|
+
if (value !== EDITABLE_ARTIFACT_INTENT_PROTOCOL_VERSION) {
|
|
3251
|
+
throw new TypeError("Intent protocol version is unsupported for current OGATX001");
|
|
3252
|
+
}
|
|
3253
|
+
return EDITABLE_ARTIFACT_INTENT_PROTOCOL_VERSION;
|
|
3246
3254
|
}
|
|
3247
3255
|
function validateClientTransactionId(value) {
|
|
3248
3256
|
if (typeof value !== "string" || value.length < 1 || value.length > 200 || !/^[A-Za-z0-9._:-]+$/.test(value)) {
|
|
@@ -3532,4 +3540,4 @@ export {
|
|
|
3532
3540
|
PostgresEditableArtifactStore,
|
|
3533
3541
|
PostgresEditableArtifactLiveReadStore
|
|
3534
3542
|
};
|
|
3535
|
-
//# sourceMappingURL=chunk-
|
|
3543
|
+
//# sourceMappingURL=chunk-NMUBV7Z5.js.map
|