spine-framework 0.3.128 → 0.3.129

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.
@@ -141,7 +141,7 @@ CREATE TABLE IF NOT EXISTS public.pipelines (
141
141
  );
142
142
  CREATE TABLE IF NOT EXISTS public.pipeline_executions (
143
143
  id uuid PRIMARY KEY DEFAULT gen_random_uuid(),
144
- pipeline_id uuid NOT NULL, account_id uuid,
144
+ pipeline_id uuid NOT NULL, app_id uuid, account_id uuid,
145
145
  status text DEFAULT 'pending', started_at timestamptz,
146
146
  completed_at timestamptz, error_message text,
147
147
  input_data jsonb DEFAULT '{}', output_data jsonb DEFAULT '{}',
@@ -602,6 +602,26 @@ CREATE INDEX IF NOT EXISTS idx_embeddings_model_doc ON public.embeddings(model_i
602
602
  CREATE INDEX IF NOT EXISTS idx_embeddings_active ON public.embeddings(account_id, document_id) WHERE approved_at IS NOT NULL AND revoked_at IS NULL;
603
603
  CREATE INDEX IF NOT EXISTS idx_embeddings_embedding_hnsw_idx ON public.embeddings USING hnsw (embedding vector_cosine_ops) WITH (m = 16, ef_construction = 64);
604
604
 
605
+ CREATE TABLE IF NOT EXISTS public.system_settings (
606
+ id uuid PRIMARY KEY DEFAULT gen_random_uuid(),
607
+ scope text NOT NULL DEFAULT 'global',
608
+ scope_id text,
609
+ key text NOT NULL,
610
+ value jsonb NOT NULL DEFAULT '{}',
611
+ created_at timestamptz DEFAULT now(),
612
+ updated_at timestamptz DEFAULT now()
613
+ );
614
+
615
+ CREATE UNIQUE INDEX IF NOT EXISTS idx_system_settings_scope
616
+ ON public.system_settings (key, scope, scope_id)
617
+ WHERE scope_id IS NOT NULL;
618
+
619
+ CREATE UNIQUE INDEX IF NOT EXISTS idx_system_settings_global
620
+ ON public.system_settings (key, scope)
621
+ WHERE scope_id IS NULL;
622
+
623
+ CREATE INDEX IF NOT EXISTS idx_system_settings_key ON public.system_settings (key);
624
+
605
625
  -- Enable Row Level Security on all tenant tables
606
626
 
607
627
  ALTER TABLE public.accounts ENABLE ROW LEVEL SECURITY;
@@ -636,6 +656,3 @@ ALTER TABLE public.alerts ENABLE ROW LEVEL SECURITY;
636
656
  ALTER TABLE public.item_progress ENABLE ROW LEVEL SECURITY;
637
657
  ALTER TABLE public.account_paths ENABLE ROW LEVEL SECURITY;
638
658
  ALTER TABLE public.system_settings ENABLE ROW LEVEL SECURITY;
639
- ALTER TABLE public.webhook_handlers ENABLE ROW LEVEL SECURITY;
640
- ALTER TABLE public.webhook_deliveries ENABLE ROW LEVEL SECURITY;
641
- ALTER TABLE public.api_key_usage_logs ENABLE ROW LEVEL SECURITY;
@@ -414,8 +414,6 @@ BEGIN
414
414
 
415
415
  END $$;
416
416
 
417
- END $$;
418
-
419
417
  CREATE OR REPLACE FUNCTION public.get_account_apps(
420
418
  account_id uuid,
421
419
  include_system boolean DEFAULT true,
@@ -403,7 +403,7 @@ INSERT INTO public.webhook_handlers (
403
403
  VALUES (
404
404
  NULL, NULL, 'portal-signals', 'custom/apps/portal/functions/custom_portal-signals',
405
405
  'Portal funnel signal adapter that transforms portal engagement payloads into funnel_signal records.',
406
- '["funnel.signal"]', true
406
+ '{"funnel.signal"}', true
407
407
  )
408
408
  ON CONFLICT (app_id, account_id, name) DO NOTHING;
409
409
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "spine-framework",
3
- "version": "0.3.128",
3
+ "version": "0.3.129",
4
4
  "description": "Multi-tenant, modular application platform for modern SaaS systems",
5
5
  "type": "module",
6
6
  "bin": {