spine-framework 0.4.4 → 0.5.0-rc.4
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/.env.example +13 -3
- package/.framework/cli/commands/bootstrap.ts +392 -0
- package/.framework/cli/commands/dev.ts +91 -218
- package/.framework/cli/commands/doctor.ts +132 -26
- package/.framework/cli/commands/generate.ts +38 -298
- package/.framework/cli/commands/init.ts +20 -1
- package/.framework/cli/commands/migrate.ts +36 -30
- package/.framework/cli/commands/migrations.ts +16 -56
- package/.framework/cli/commands/upgrade.ts +35 -0
- package/.framework/cli/commands/validate-schema.ts +147 -0
- package/.framework/cli/context.ts +223 -110
- package/.framework/cli/index.ts +6 -0
- package/.framework/cli/lib/project-files.ts +241 -1
- package/.framework/functions/_shared/hash-api-key.ts +183 -79
- package/.framework/functions/_shared/logging.ts +562 -224
- package/.framework/functions/_shared/middleware.ts +47 -44
- package/.framework/functions/admin-data.ts +39 -28
- package/.framework/functions/ai-agents.ts +10 -6
- package/.framework/functions/api-keys.ts +301 -122
- package/.framework/functions/apps.ts +43 -26
- package/.framework/functions/cil-ingest.ts +48 -15
- package/.framework/functions/debug-auth.ts +14 -8
- package/.framework/functions/deliveries.ts +39 -12
- package/.framework/functions/embeddings.ts +145 -76
- package/.framework/functions/integration-outbound.ts +67 -27
- package/.framework/functions/integrations.ts +254 -127
- package/.framework/functions/logs.ts +273 -133
- package/.framework/functions/observability.ts +277 -147
- package/.framework/functions/pipeline-executions.ts +1 -1
- package/.framework/functions/pipelines.ts +14 -9
- package/.framework/functions/prompt-configs.ts +7 -4
- package/.framework/functions/roles.ts +8 -5
- package/.framework/functions/security.ts +30 -17
- package/.framework/functions/system-cron.ts +240 -127
- package/.framework/functions/tests.ts +7 -6
- package/.framework/functions/timers.ts +310 -107
- package/.framework/functions/triggers.ts +28 -13
- package/.framework/functions/types.ts +13 -10
- package/.framework/migrations/069_log_stats_window.sql +54 -0
- package/.framework/migrations/070_app_type_schema_rpcs.sql +166 -0
- package/.framework/migrations/071_timer_interval_keys.sql +96 -0
- package/.framework/migrations/072_slug_autofill.sql +77 -0
- package/.framework/migrations/073_seed_member_roles.sql +26 -0
- package/.framework/src/apps/admin/index.tsx +1141 -775
- package/.framework/src/components/ErrorBoundary.tsx +136 -0
- package/.framework/src/components/admin/AdminListPage.tsx +81 -73
- package/.framework/src/components/admin/AdminSidebar.tsx +88 -79
- package/.framework/src/components/admin/EntitySelect.tsx +181 -0
- package/.framework/src/components/admin/PageInstructions.tsx +86 -127
- package/.framework/src/components/app-shell/GenericDetailPage.tsx +37 -13
- package/.framework/src/components/app-shell/GenericListPage.tsx +28 -32
- package/.framework/src/components/layout/Sidebar.tsx +300 -177
- package/.framework/src/components/runtime/DataDetailPage.tsx +67 -35
- package/.framework/src/components/runtime/DataHeader.tsx +96 -48
- package/.framework/src/components/runtime/DataListPage.tsx +3 -26
- package/.framework/src/components/runtime/DataStats.tsx +10 -10
- package/.framework/src/components/runtime/DataTable.tsx +12 -10
- package/.framework/src/components/ui/sheet.tsx +24 -26
- package/.framework/src/components/ui/textarea.tsx +74 -48
- package/.framework/src/hooks/useEntityList.ts +12 -9
- package/.framework/src/hooks/useListSchema.ts +108 -58
- package/.framework/src/instructions/README.md +57 -0
- package/.framework/src/instructions/ai-agents.md +69 -0
- package/.framework/src/instructions/alerts.md +80 -0
- package/.framework/src/instructions/api-keys.md +87 -0
- package/.framework/src/instructions/apps.md +77 -0
- package/.framework/src/instructions/concepts/ai-and-prompts.md +150 -0
- package/.framework/src/instructions/concepts/apps-and-renderers.md +162 -0
- package/.framework/src/instructions/concepts/auth-and-api-keys.md +133 -0
- package/.framework/src/instructions/concepts/automation.md +186 -0
- package/.framework/src/instructions/concepts/concurrency-and-idempotency.md +125 -0
- package/.framework/src/instructions/concepts/core-vs-custom.md +124 -0
- package/.framework/src/instructions/concepts/design-schema.md +152 -0
- package/.framework/src/instructions/concepts/integrations-and-webhooks.md +127 -0
- package/.framework/src/instructions/concepts/observability.md +116 -0
- package/.framework/src/instructions/concepts/permissions.md +150 -0
- package/.framework/src/instructions/concepts/runtime-records.md +111 -0
- package/.framework/src/instructions/concepts/scope-and-accounts.md +112 -0
- package/.framework/src/instructions/concepts/spine-way.md +172 -0
- package/.framework/src/instructions/deliveries.md +59 -0
- package/.framework/src/instructions/guide/00-orientation.md +106 -0
- package/.framework/src/instructions/guide/01-install-and-first-run.md +253 -0
- package/.framework/src/instructions/guide/02-project-map.md +147 -0
- package/.framework/src/instructions/guide/03-domain-model.md +223 -0
- package/.framework/src/instructions/guide/04-first-app.md +227 -0
- package/.framework/src/instructions/guide/05-glossary.md +183 -0
- package/.framework/src/instructions/integrations.md +96 -0
- package/.framework/src/instructions/internal/cil-markers.md +83 -0
- package/.framework/src/instructions/invites.md +60 -0
- package/.framework/src/instructions/kb.md +80 -0
- package/.framework/src/instructions/logs.md +77 -0
- package/.framework/src/instructions/observability.md +61 -0
- package/.framework/src/instructions/operations/deployment.md +115 -0
- package/.framework/src/instructions/operations/migrations.md +125 -0
- package/.framework/src/instructions/operations/security-checklist.md +148 -0
- package/.framework/src/instructions/operations/troubleshooting.md +170 -0
- package/.framework/src/instructions/operations/upgrade.md +116 -0
- package/.framework/src/instructions/pipeline-executions.md +62 -0
- package/.framework/src/instructions/pipelines.md +78 -0
- package/.framework/src/instructions/prompts.md +95 -0
- package/.framework/src/instructions/reference/api/admin-data.md +162 -0
- package/.framework/src/instructions/reference/api/auth.md +113 -0
- package/.framework/src/instructions/reference/api/errors-and-envelopes.md +113 -0
- package/.framework/src/instructions/reference/app-manifest.md +150 -0
- package/.framework/src/instructions/reference/cli.md +124 -0
- package/.framework/src/instructions/reference/database.md +132 -0
- package/.framework/src/instructions/reference/design-schema.md +280 -0
- package/.framework/src/instructions/reference/env-vars.md +133 -0
- package/.framework/src/instructions/reference/functions/account-nodes.md +75 -0
- package/.framework/src/instructions/reference/functions/admin-data.md +195 -0
- package/.framework/src/instructions/reference/functions/admin-funnel.md +90 -0
- package/.framework/src/instructions/reference/functions/admin-install-funnel.md +107 -0
- package/.framework/src/instructions/reference/functions/admin-signals.md +102 -0
- package/.framework/src/instructions/reference/functions/ai-agents.md +148 -0
- package/.framework/src/instructions/reference/functions/ai-interactions.md +156 -0
- package/.framework/src/instructions/reference/functions/api-keys.md +130 -0
- package/.framework/src/instructions/reference/functions/apps.md +140 -0
- package/.framework/src/instructions/reference/functions/auth.md +99 -0
- package/.framework/src/instructions/reference/functions/debug-auth.md +91 -0
- package/.framework/src/instructions/reference/functions/deliveries.md +110 -0
- package/.framework/src/instructions/reference/functions/embeddings.md +166 -0
- package/.framework/src/instructions/reference/functions/eval-harness.md +149 -0
- package/.framework/src/instructions/reference/functions/index.md +103 -0
- package/.framework/src/instructions/reference/functions/integration-outbound.md +200 -0
- package/.framework/src/instructions/reference/functions/integration-routes.md +151 -0
- package/.framework/src/instructions/reference/functions/integrations.md +130 -0
- package/.framework/src/instructions/reference/functions/invites.md +182 -0
- package/.framework/src/instructions/reference/functions/item-progress.md +107 -0
- package/.framework/src/instructions/reference/functions/kb.md +166 -0
- package/.framework/src/instructions/reference/functions/logs.md +141 -0
- package/.framework/src/instructions/reference/functions/observability.md +105 -0
- package/.framework/src/instructions/reference/functions/pipeline-executions.md +132 -0
- package/.framework/src/instructions/reference/functions/pipeline-runner-background.md +121 -0
- package/.framework/src/instructions/reference/functions/pipelines.md +136 -0
- package/.framework/src/instructions/reference/functions/prompt-configs.md +121 -0
- package/.framework/src/instructions/reference/functions/roles.md +121 -0
- package/.framework/src/instructions/reference/functions/security.md +140 -0
- package/.framework/src/instructions/reference/functions/system-cron.md +136 -0
- package/.framework/src/instructions/reference/functions/system.md +106 -0
- package/.framework/src/instructions/reference/functions/tests.md +97 -0
- package/.framework/src/instructions/reference/functions/timers.md +117 -0
- package/.framework/src/instructions/reference/functions/trigger-scheduler.md +102 -0
- package/.framework/src/instructions/reference/functions/triggers.md +140 -0
- package/.framework/src/instructions/reference/functions/types.md +146 -0
- package/.framework/src/instructions/reference/seeds.md +126 -0
- package/.framework/src/instructions/reference/shared-modules.md +127 -0
- package/.framework/src/instructions/reference/spine-config.md +114 -0
- package/.framework/src/instructions/roles.md +80 -0
- package/.framework/src/instructions/runtime-detail.md +70 -0
- package/.framework/src/instructions/runtime-list.md +77 -0
- package/.framework/src/instructions/security.md +67 -0
- package/.framework/src/instructions/tasks/add-a-pipeline.md +110 -0
- package/.framework/src/instructions/tasks/add-a-role.md +96 -0
- package/.framework/src/instructions/tasks/add-a-timer.md +114 -0
- package/.framework/src/instructions/tasks/add-a-trigger.md +106 -0
- package/.framework/src/instructions/tasks/add-a-type.md +151 -0
- package/.framework/src/instructions/tasks/add-a-webhook.md +108 -0
- package/.framework/src/instructions/tasks/add-an-ai-agent.md +108 -0
- package/.framework/src/instructions/tasks/add-an-integration.md +124 -0
- package/.framework/src/instructions/tasks/build-a-custom-page.md +118 -0
- package/.framework/src/instructions/tasks/package-and-install-an-app.md +127 -0
- package/.framework/src/instructions/tasks/test-your-code.md +108 -0
- package/.framework/src/instructions/tasks/write-a-function.md +132 -0
- package/.framework/src/instructions/tasks/write-a-migration.md +110 -0
- package/.framework/src/instructions/testing.md +59 -0
- package/.framework/src/instructions/timers.md +82 -0
- package/.framework/src/instructions/triggers.md +69 -0
- package/.framework/src/instructions/types.md +93 -0
- package/.framework/src/pages/NotFoundPage.tsx +62 -31
- package/.framework/src/pages/admin/AIAgentDetailPage.tsx +117 -106
- package/.framework/src/pages/admin/AIAgentsPage.tsx +86 -48
- package/.framework/src/pages/admin/APIKeyDetailPage.tsx +153 -152
- package/.framework/src/pages/admin/APIKeysPage.tsx +91 -90
- package/.framework/src/pages/admin/AlertsConfigPage.tsx +29 -18
- package/.framework/src/pages/admin/AppDetailPage.tsx +6 -60
- package/.framework/src/pages/admin/AppsPage.tsx +104 -66
- package/.framework/src/pages/admin/DeliveriesPage.tsx +5 -5
- package/.framework/src/pages/admin/EmbeddingDetailPage.tsx +5 -23
- package/.framework/src/pages/admin/EmbeddingsPage.tsx +5 -26
- package/.framework/src/pages/admin/IntegrationDetailPage.tsx +7 -7
- package/.framework/src/pages/admin/IntegrationsPage.tsx +85 -43
- package/.framework/src/pages/admin/LogsPage.tsx +144 -76
- package/.framework/src/pages/admin/ObservabilityDashboard.tsx +223 -140
- package/.framework/src/pages/admin/PipelineDetailPage.tsx +134 -113
- package/.framework/src/pages/admin/PipelineExecutionsPage.tsx +108 -45
- package/.framework/src/pages/admin/PipelinesPage.tsx +160 -115
- package/.framework/src/pages/admin/PromptConfigDetailPage.tsx +96 -98
- package/.framework/src/pages/admin/PromptConfigsPage.tsx +101 -59
- package/.framework/src/pages/admin/RoleDetailPage.tsx +90 -79
- package/.framework/src/pages/admin/RolesPage.tsx +86 -43
- package/.framework/src/pages/admin/SecurityPage.tsx +1 -1
- package/.framework/src/pages/admin/TestingDashboard.tsx +16 -28
- package/.framework/src/pages/admin/TimerDetailPage.tsx +117 -100
- package/.framework/src/pages/admin/TimersPage.tsx +90 -62
- package/.framework/src/pages/admin/TriggerDetailPage.tsx +90 -83
- package/.framework/src/pages/admin/TriggersPage.tsx +124 -99
- package/.framework/src/pages/admin/TypeDetailPage.tsx +152 -138
- package/.framework/src/pages/admin/TypesPage.tsx +90 -48
- package/.framework/src/pages/admin/cil/CILAgentPage.tsx +17 -25
- package/.framework/src/pages/admin/cil/CILChunkDetailPage.tsx +17 -27
- package/.framework/src/pages/admin/cil/CILDashboardPage.tsx +72 -40
- package/.framework/src/pages/admin/cil/CILFileListPage.tsx +321 -129
- package/.framework/src/pages/admin/cil/CILFileSelectPage.tsx +18 -29
- package/.framework/src/pages/admin/cil/CILGraphPage.tsx +26 -38
- package/.framework/src/pages/admin/cil/CILIngestionPage.tsx +34 -46
- package/.framework/src/pages/admin/cil/CILProjectsPage.tsx +189 -103
- package/.framework/src/pages/admin/cil/CILSearchPage.tsx +246 -136
- package/.framework/src/pages/admin/cil/CILSuggestionsPage.tsx +11 -22
- package/.framework/src/pages/admin/cil/CILVersionsPage.tsx +9 -20
- package/.framework/src/pages/admin/cil/FlexiblePipelinePage.tsx +26 -38
- package/.framework/src/pages/admin/kb/KBAdminPage.tsx +7 -26
- package/.framework/templates/agent/AGENTS.md +150 -0
- package/.framework/templates/agent/skills/spine-add-ai-agent/SKILL.md +58 -0
- package/.framework/templates/agent/skills/spine-add-automation/SKILL.md +62 -0
- package/.framework/templates/agent/skills/spine-add-integration/SKILL.md +63 -0
- package/.framework/templates/agent/skills/spine-architect/SKILL.md +86 -0
- package/.framework/templates/agent/skills/spine-install-app/SKILL.md +72 -0
- package/.framework/templates/agent/skills/spine-migration/SKILL.md +75 -0
- package/.framework/templates/agent/skills/spine-new-app/SKILL.md +67 -0
- package/.framework/templates/agent/skills/spine-new-function/SKILL.md +65 -0
- package/.framework/templates/agent/skills/spine-new-type/SKILL.md +65 -0
- package/.framework/templates/agent/skills/spine-schema/SKILL.md +77 -0
- package/.framework/templates/agent/skills/spine-test/SKILL.md +67 -0
- package/.framework/templates/agent/skills/spine-troubleshoot/SKILL.md +74 -0
- package/.framework/templates/agent/skills/spine-upgrade/SKILL.md +69 -0
- package/.framework/templates/project.json +4 -1
- package/.framework/tests/unit/account-scoping-gates.test.ts +392 -0
- package/.framework/tests/unit/agent-files.test.ts +355 -0
- package/.framework/tests/unit/agent-runner.test.ts +479 -44
- package/.framework/tests/unit/api-keys-create-scope-gate.test.ts +160 -0
- package/.framework/tests/unit/api-keys-omit-secret-fields.test.ts +38 -0
- package/.framework/tests/unit/bootstrap.test.ts +242 -0
- package/.framework/tests/unit/cli-context-api-key.test.ts +114 -0
- package/.framework/tests/unit/debug-auth.test.ts +38 -0
- package/.framework/tests/unit/deliveries-account-scoping.test.ts +185 -0
- package/.framework/tests/unit/integration-outbound-credentials.test.ts +167 -0
- package/.framework/tests/unit/integrations-audit-redaction.test.ts +130 -0
- package/.framework/tests/unit/logging-app-id.test.ts +75 -0
- package/.framework/tests/unit/system-context-denial.test.ts +145 -0
- package/.framework/tests/unit/system-cron.test.ts +240 -0
- package/.framework/tests/unit/timers.test.ts +159 -0
- package/README.md +125 -166
- package/config/tsconfig.cli.json +2 -2
- package/package.json +15 -4
- package/templates/project/package-lock.json +2 -2
- package/.framework/docs/admin-routes.md +0 -76
- package/.framework/docs/api-docs-progress.md +0 -38
- package/.framework/docs/api-governance.md +0 -146
- package/.framework/docs/api-testing-results.md +0 -212
- package/.framework/docs/assembly-launch-guide.md +0 -138
- package/.framework/docs/audit-results.md +0 -590
- package/.framework/docs/db-api-inventory.md +0 -95
- package/.framework/docs/gap-remediation-backlog.md +0 -103
- package/.framework/docs/ui-adoption-verification.md +0 -111
- package/.framework/docs/ui-api-coverage.md +0 -84
- package/.framework/docs/v2-compatibility-audit.md +0 -228
- package/.framework/mcp/index.ts +0 -133
- package/.framework/mcp/load-env.ts +0 -60
- package/.framework/mcp/shared/app-manifest.ts +0 -275
- package/.framework/mcp/shared/db.ts +0 -477
- package/.framework/mcp/shared/kb.ts +0 -118
- package/.framework/mcp/tools/architect.ts +0 -431
- package/.framework/mcp/tools/cil/context.ts +0 -345
- package/.framework/mcp/tools/cil/graph.ts +0 -242
- package/.framework/mcp/tools/cil/ingest.ts +0 -1217
- package/.framework/mcp/tools/cil/pipeline-orchestrator.ts +0 -693
- package/.framework/mcp/tools/cil/pipeline.ts +0 -767
- package/.framework/mcp/tools/cil/project.ts +0 -791
- package/.framework/mcp/tools/cil/retrieval.ts +0 -336
- package/.framework/mcp/tools/cil/search-core.ts +0 -454
- package/.framework/mcp/tools/cil/search.ts +0 -97
- package/.framework/mcp/tools/cil/suggest.ts +0 -186
- package/.framework/mcp/tools/cil/validate.ts +0 -1369
- package/.framework/mcp/tools/kb/delete.ts +0 -139
- package/.framework/mcp/tools/kb/index.ts +0 -52
- package/.framework/mcp/tools/kb/ingest.ts +0 -84
- package/.framework/mcp/tools/kb/list-types.ts +0 -102
- package/.framework/mcp/tools/kb/publish.ts +0 -100
- package/.framework/mcp/tools/kb/reindex.ts +0 -86
- package/.framework/mcp/tools/kb/revoke.ts +0 -85
- package/.framework/mcp/tools/kb/search.ts +0 -101
- package/.framework/mcp/tools/kb/upsert.ts +0 -125
- package/.framework/mcp/tools/observability.ts +0 -510
|
@@ -1,12 +1,29 @@
|
|
|
1
|
-
// CIL[BEGIN stable_id="~/.framework/src/pages/admin/AppsPage.tsx:module_header:module_header"]
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
// CIL[BEGIN stable_id="~/.framework/src/pages/admin/AppsPage.tsx:module_header:module_header" type="module_header" identity="module_header" parent="~/.framework/src/pages/admin/AppsPage.tsx"]
|
|
2
|
+
/**
|
|
3
|
+
* @module AppsPage
|
|
4
|
+
* @audience both
|
|
5
|
+
* @layer shared-core
|
|
6
|
+
* @stability stable
|
|
7
|
+
*
|
|
8
|
+
* This module represents the AppsPage component in the admin section of the application, providing a user interface for managing applications. It integrates with various UI components and hooks to fetch and display application data in a structured format.
|
|
9
|
+
* INVARIANT: The user must have admin privileges to access this page.
|
|
10
|
+
*
|
|
11
|
+
* @seeAlso useApi (provides API interaction capabilities).
|
|
12
|
+
* @seeAlso apiFetch (handles API requests).
|
|
13
|
+
* @seeAlso AdminListPage (base component for admin list views).
|
|
14
|
+
* @seeAlso SortableTableHeader (for managing sortable table headers).
|
|
15
|
+
*
|
|
16
|
+
* @cil-generated
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
10
27
|
|
|
11
28
|
|
|
12
29
|
|
|
@@ -17,6 +34,7 @@ import { useApi } from '../../hooks/useApi'
|
|
|
17
34
|
import { apiFetch } from '../../lib/api'
|
|
18
35
|
import { formatDateTime } from '../../lib/utils'
|
|
19
36
|
import {
|
|
37
|
+
// CIL[END stable_id="~/.framework/src/pages/admin/AppsPage.tsx:module_header:module_header"]
|
|
20
38
|
Plus,
|
|
21
39
|
Box,
|
|
22
40
|
FileText,
|
|
@@ -39,21 +57,30 @@ import {
|
|
|
39
57
|
import { AdminListPage } from '../../components/admin/AdminListPage'
|
|
40
58
|
import { SortableTableHeader } from '../../components/admin/SortableTableHeader'
|
|
41
59
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
// CIL[BEGIN stable_id="~/.framework/src/pages/admin/AppsPage.tsx:App:interface" type="interface" identity="App" parent="~/.framework/src/pages/admin/AppsPage.tsx"]
|
|
77
|
+
/**
|
|
78
|
+
* The App interface defines the structure of an application object used within the admin module. It encapsulates essential properties related to an application, such as its identification, configuration, and status.
|
|
79
|
+
*
|
|
80
|
+
* @sideEffects none
|
|
81
|
+
* @stability internal
|
|
82
|
+
* @cil-generated
|
|
83
|
+
*/
|
|
57
84
|
interface App {
|
|
58
85
|
id: string
|
|
59
86
|
slug: string
|
|
@@ -64,30 +91,44 @@ interface App {
|
|
|
64
91
|
config: Record<string, any>
|
|
65
92
|
is_active: boolean
|
|
66
93
|
is_public: boolean
|
|
94
|
+
is_system?: boolean
|
|
95
|
+
source?: string
|
|
67
96
|
created_at: string
|
|
68
|
-
updated_at
|
|
69
|
-
created_by: string
|
|
70
|
-
account_id: string
|
|
71
|
-
account_name: string
|
|
72
|
-
item_count: number
|
|
73
|
-
user_count: number
|
|
97
|
+
updated_at?: string
|
|
74
98
|
}
|
|
75
|
-
// CIL[
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
99
|
+
// CIL[END stable_id="~/.framework/src/pages/admin/AppsPage.tsx:App:interface"]
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
// CIL[BEGIN stable_id="~/.framework/src/pages/admin/AppsPage.tsx:AppsPage:component" type="component" identity="AppsPage" parent="~/.framework/src/pages/admin/AppsPage.tsx"]
|
|
119
|
+
/**
|
|
120
|
+
* The AppsPage component displays a list of applications with filtering, sorting, and navigation capabilities. It fetches app data from an API and allows users to search and filter based on type and status.
|
|
121
|
+
*
|
|
122
|
+
* @macro User interface component for managing and displaying applications.
|
|
123
|
+
* @micro Utilizes a custom hook to fetch app data from an external API and manages local state for search and filters.
|
|
124
|
+
* @outputSpec JSX.Element — renders the application management interface.
|
|
125
|
+
* @throws Error — failed to fetch apps
|
|
126
|
+
* @sideEffects Fetches data from the external API endpoint '/api/apps?action=list'.
|
|
127
|
+
* @stability internal
|
|
128
|
+
* @calls useApi, apiFetch, navigate
|
|
129
|
+
* @errorHandling none
|
|
130
|
+
* @cil-generated
|
|
131
|
+
*/
|
|
91
132
|
export function AppsPage() {
|
|
92
133
|
const navigate = useNavigate()
|
|
93
134
|
const [searchTerm, setSearchTerm] = useState('')
|
|
@@ -108,9 +149,8 @@ export function AppsPage() {
|
|
|
108
149
|
|
|
109
150
|
const appTypes = [
|
|
110
151
|
{ value: 'all', label: 'All Types' },
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
{ value: 'marketplace', label: 'Marketplace' }
|
|
152
|
+
...Array.from(new Set((apps || []).map(a => a.app_type).filter(Boolean)))
|
|
153
|
+
.map(type => ({ value: type, label: type.charAt(0).toUpperCase() + type.slice(1) }))
|
|
114
154
|
]
|
|
115
155
|
|
|
116
156
|
const filteredApps = (apps || []).filter(app => {
|
|
@@ -227,14 +267,14 @@ export function AppsPage() {
|
|
|
227
267
|
iconColor: 'text-green-500'
|
|
228
268
|
},
|
|
229
269
|
{
|
|
230
|
-
title: '
|
|
231
|
-
value: (apps || []).
|
|
270
|
+
title: 'System Apps',
|
|
271
|
+
value: (apps || []).filter(a => a.is_system).length,
|
|
232
272
|
icon: FileText,
|
|
233
273
|
iconColor: 'text-purple-500'
|
|
234
274
|
},
|
|
235
275
|
{
|
|
236
|
-
title: '
|
|
237
|
-
value: (apps || []).
|
|
276
|
+
title: 'Custom Apps',
|
|
277
|
+
value: (apps || []).filter(a => a.app_type === 'custom').length,
|
|
238
278
|
icon: Calendar,
|
|
239
279
|
iconColor: 'text-orange-500'
|
|
240
280
|
}
|
|
@@ -320,8 +360,8 @@ export function AppsPage() {
|
|
|
320
360
|
onSort={handleSort}
|
|
321
361
|
/>
|
|
322
362
|
<SortableTableHeader
|
|
323
|
-
title="
|
|
324
|
-
sortKey="
|
|
363
|
+
title="Source"
|
|
364
|
+
sortKey="source"
|
|
325
365
|
currentSortKey={sortKey}
|
|
326
366
|
currentSortDirection={sortDirection}
|
|
327
367
|
onSort={handleSort}
|
|
@@ -377,10 +417,7 @@ export function AppsPage() {
|
|
|
377
417
|
</Badge>
|
|
378
418
|
</TableCell>
|
|
379
419
|
<TableCell className="text-muted-foreground">
|
|
380
|
-
|
|
381
|
-
<span>{app.item_count} items</span>
|
|
382
|
-
<span>{app.user_count} users</span>
|
|
383
|
-
</div>
|
|
420
|
+
{app.source || '—'}
|
|
384
421
|
</TableCell>
|
|
385
422
|
<TableCell className="text-muted-foreground">
|
|
386
423
|
{formatDateTime(app.created_at)}
|
|
@@ -390,16 +427,17 @@ export function AppsPage() {
|
|
|
390
427
|
</TableCell>
|
|
391
428
|
</TableRow>
|
|
392
429
|
))}
|
|
430
|
+
|
|
393
431
|
</TableBody>
|
|
394
432
|
</Table>
|
|
395
433
|
)}
|
|
396
434
|
</AdminListPage>
|
|
397
435
|
)
|
|
398
436
|
}
|
|
399
|
-
// CIL[
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
437
|
+
// CIL[END stable_id="~/.framework/src/pages/admin/AppsPage.tsx:AppsPage:component"]
|
|
438
|
+
|
|
439
|
+
|
|
440
|
+
|
|
441
|
+
|
|
442
|
+
|
|
443
|
+
|
|
@@ -16,6 +16,7 @@ import { apiFetch } from '../../lib/api'
|
|
|
16
16
|
import { AdminListPage } from '../../components/admin/AdminListPage'
|
|
17
17
|
import { SortableTableHeader } from '../../components/admin/SortableTableHeader'
|
|
18
18
|
import { useApi } from '../../hooks/useApi'
|
|
19
|
+
// CIL[END stable_id="~/.framework/src/pages/admin/DeliveriesPage.tsx:module_header:module_header"]
|
|
19
20
|
|
|
20
21
|
|
|
21
22
|
// CIL[DOC-VECTOR type="context" content="purpose='Admin deliveries list page module: defines the Delivery record shape and DeliveriesPage React component for viewing webhook delivery attempts.'; No verified external callers; imports: .framework/src/lib/utils.ts,.framework/src/lib/api.ts,.framework/src/components/admin/AdminListPage.tsx"]
|
|
@@ -24,8 +25,6 @@ import { useApi } from '../../hooks/useApi'
|
|
|
24
25
|
// CIL[DOC-VECTOR type="constraint" content="Standard runtime; no special invariants documented"]
|
|
25
26
|
// CIL[DOC-VECTOR type="implementation_pattern" content="" status="pending_human_input"]
|
|
26
27
|
// CIL[DOC-VECTOR type="user_journey" content="" status="pending_human_input"]
|
|
27
|
-
// CIL[END stable_id="~/.framework/src/pages/admin/DeliveriesPage.tsx:module_header:module_header"]
|
|
28
|
-
// CIL[BEGIN stable_id="~/.framework/src/pages/admin/DeliveriesPage.tsx:Delivery:interface" type="interface" identity="Delivery" parent="~/.framework/src/pages/admin/DeliveriesPage.tsx"]
|
|
29
28
|
// CIL[DOC-MACRO purpose="TypeScript contract for a webhook delivery attempt record."]
|
|
30
29
|
// CIL[DOC-RESPONSIBILITY responsibility="Define the fields and types for a Delivery entity consumed by the admin list page."]
|
|
31
30
|
// CIL[DOC-CONTEXT module="admin/deliveries" layer="model" related_files=".framework/src/components/admin/AdminListPage.tsx,.framework/src/components/admin/SortableTableHeader.tsx,.framework/src/hooks/useApi.ts,.framework/src/lib/api.ts,.framework/src/lib/utils.ts,.framework/src/pages/admin/DeliveriesPage.tsx"]
|
|
@@ -33,6 +32,7 @@ import { useApi } from '../../hooks/useApi'
|
|
|
33
32
|
// CIL[DOC-MICRO logic_summary="Enumerates delivery fields including direction, status, ids, retry metadata, timestamps, and optional API/handler details." notable_decisions="[]"]
|
|
34
33
|
// CIL[DOC-CONFIDENCE pass="second" score="0.90" flags="none"]
|
|
35
34
|
// CIL[DOC-STABILITY stability="stable"]
|
|
35
|
+
// CIL[BEGIN stable_id="~/.framework/src/pages/admin/DeliveriesPage.tsx:Delivery:interface" type="interface" identity="Delivery" parent="~/.framework/src/pages/admin/DeliveriesPage.tsx"]
|
|
36
36
|
interface Delivery {
|
|
37
37
|
id: string
|
|
38
38
|
direction: 'inbound' | 'outbound'
|
|
@@ -52,16 +52,15 @@ interface Delivery {
|
|
|
52
52
|
created_at: string
|
|
53
53
|
updated_at: string
|
|
54
54
|
}
|
|
55
|
+
// CIL[END stable_id="~/.framework/src/pages/admin/DeliveriesPage.tsx:Delivery:interface"]
|
|
55
56
|
// CIL[DOC-VECTOR type="context" content="purpose='TypeScript contract for a webhook delivery attempt record.'; No verified external callers; imports: .framework/src/lib/utils.ts,.framework/src/lib/api.ts,.framework/src/components/admin/AdminListPage.tsx"]
|
|
56
57
|
// CIL[DOC-VECTOR type="blast_radius" content="No direct caller data from CIL graph; local impact only"]
|
|
57
58
|
// CIL[DOC-VECTOR type="configuration" content="No environment or build configuration dependencies identified"]
|
|
58
59
|
// CIL[DOC-VECTOR type="constraint" content="Standard runtime; no special invariants documented"]
|
|
59
60
|
// CIL[DOC-VECTOR type="implementation_pattern" content="" status="pending_human_input"]
|
|
60
61
|
// CIL[DOC-VECTOR type="user_journey" content="" status="pending_human_input"]
|
|
61
|
-
// CIL[END stable_id="~/.framework/src/pages/admin/DeliveriesPage.tsx:Delivery:interface"]
|
|
62
62
|
|
|
63
63
|
|
|
64
|
-
// CIL[BEGIN stable_id="~/.framework/src/pages/admin/DeliveriesPage.tsx:DeliveriesPage:component" type="component" identity="DeliveriesPage" parent="~/.framework/src/pages/admin/DeliveriesPage.tsx"]
|
|
65
64
|
// CIL[DOC-MACRO purpose="Admin UI page that lists inbound and outbound webhook delivery attempts with filters and sorting."]
|
|
66
65
|
// CIL[DOC-RESPONSIBILITY responsibility="Fetch deliveries from /api/deliveries, filter by search/status/direction, sort by selected key, and render a sortable table inside AdminListPage."]
|
|
67
66
|
// CIL[DOC-CONTEXT module="admin/deliveries" layer="page" related_files=".framework/src/components/admin/AdminListPage.tsx,.framework/src/components/admin/SortableTableHeader.tsx,.framework/src/hooks/useApi.ts,.framework/src/lib/api.ts,.framework/src/lib/utils.ts,.framework/src/pages/admin/DeliveriesPage.tsx"]
|
|
@@ -69,6 +68,7 @@ interface Delivery {
|
|
|
69
68
|
// CIL[DOC-MICRO logic_summary="Uses useApi to load deliveries, applies local filter and sort state, computes stats cards, and passes configuration to AdminListPage. Table renders color-coded status badges and formatted dates." notable_decisions="[]"]
|
|
70
69
|
// CIL[DOC-CONFIDENCE pass="second" score="0.90" flags="none"]
|
|
71
70
|
// CIL[DOC-STABILITY stability="stable"]
|
|
71
|
+
// CIL[BEGIN stable_id="~/.framework/src/pages/admin/DeliveriesPage.tsx:DeliveriesPage:component" type="component" identity="DeliveriesPage" parent="~/.framework/src/pages/admin/DeliveriesPage.tsx"]
|
|
72
72
|
export function DeliveriesPage() {
|
|
73
73
|
const [searchTerm, setSearchTerm] = useState('')
|
|
74
74
|
const [selectedStatus, setSelectedStatus] = useState('all')
|
|
@@ -219,10 +219,10 @@ export function DeliveriesPage() {
|
|
|
219
219
|
</AdminListPage>
|
|
220
220
|
)
|
|
221
221
|
}
|
|
222
|
+
// CIL[END stable_id="~/.framework/src/pages/admin/DeliveriesPage.tsx:DeliveriesPage:component"]
|
|
222
223
|
// CIL[DOC-VECTOR type="context" content="purpose='Admin UI page that lists inbound and outbound webhook delivery attempts with filters and sorting.'; No verified external callers; imports: .framework/src/lib/utils.ts,.framework/src/lib/api.ts,.framework/src/components/admin/AdminListPage.tsx"]
|
|
223
224
|
// CIL[DOC-VECTOR type="blast_radius" content="No direct caller data from CIL graph; local impact only"]
|
|
224
225
|
// CIL[DOC-VECTOR type="configuration" content="No environment or build configuration dependencies identified"]
|
|
225
226
|
// CIL[DOC-VECTOR type="constraint" content="Standard runtime; no special invariants documented"]
|
|
226
227
|
// CIL[DOC-VECTOR type="implementation_pattern" content="" status="pending_human_input"]
|
|
227
228
|
// CIL[DOC-VECTOR type="user_journey" content="" status="pending_human_input"]
|
|
228
|
-
// CIL[END stable_id="~/.framework/src/pages/admin/DeliveriesPage.tsx:DeliveriesPage:component"]
|
|
@@ -19,7 +19,7 @@ import { Alert, AlertDescription, AlertTitle } from '../../components/ui/alert'
|
|
|
19
19
|
import { Collapsible, CollapsibleContent, CollapsibleTrigger } from '../../components/ui/collapsible'
|
|
20
20
|
import { ArrowLeft, AlertCircle, ChevronDown } from 'lucide-react'
|
|
21
21
|
import { formatDateTime } from '../../lib/utils'
|
|
22
|
-
|
|
22
|
+
// CIL[END stable_id="~/.framework/src/pages/admin/EmbeddingDetailPage.tsx:module_header:module_header"]
|
|
23
23
|
|
|
24
24
|
|
|
25
25
|
// CIL[DOC-VECTOR type="context" content="purpose='Admin page for viewing a single embedding record and its vector.'; No verified external callers; imports: .framework/src/hooks/useApi.ts,.framework/src/lib/api.ts,.framework/src/components/ui/button.tsx"]
|
|
@@ -28,8 +28,6 @@ import { PageInstructions } from '../../components/admin/PageInstructions'
|
|
|
28
28
|
// CIL[DOC-VECTOR type="constraint" content="Standard runtime; no special invariants documented"]
|
|
29
29
|
// CIL[DOC-VECTOR type="implementation_pattern" content="" status="pending_human_input"]
|
|
30
30
|
// CIL[DOC-VECTOR type="user_journey" content="" status="pending_human_input"]
|
|
31
|
-
// CIL[END stable_id="~/.framework/src/pages/admin/EmbeddingDetailPage.tsx:module_header:module_header"]
|
|
32
|
-
// CIL[BEGIN stable_id="~/.framework/src/pages/admin/EmbeddingDetailPage.tsx:EmbeddingRecord:interface" type="interface" identity="EmbeddingRecord" parent="~/.framework/src/pages/admin/EmbeddingDetailPage.tsx"]
|
|
33
31
|
// CIL[DOC-MACRO purpose="TypeScript interface describing a single embedding row."]
|
|
34
32
|
// CIL[DOC-RESPONSIBILITY responsibility="Defines the shape of public.embeddings records consumed by the detail page."]
|
|
35
33
|
// CIL[DOC-CONTEXT module="admin/kb/embeddings" layer="presentation" related_files=".framework/src/components/admin/PageInstructions.tsx,.framework/src/components/ui/alert.tsx,.framework/src/components/ui/button.tsx,.framework/src/components/ui/card.tsx,.framework/src/components/ui/collapsible.tsx,.framework/src/components/ui/skeleton.tsx,.framework/src/hooks/useApi.ts,.framework/src/lib/api.ts,.framework/src/lib/utils.ts,.framework/src/pages/admin/EmbeddingDetailPage.tsx"]
|
|
@@ -38,6 +36,7 @@ import { PageInstructions } from '../../components/admin/PageInstructions'
|
|
|
38
36
|
// CIL[DOC-CONFIDENCE pass="second" score="0.90" flags="none"]
|
|
39
37
|
// CIL[DOC-STABILITY stability="stable"]
|
|
40
38
|
|
|
39
|
+
// CIL[BEGIN stable_id="~/.framework/src/pages/admin/EmbeddingDetailPage.tsx:EmbeddingRecord:interface" type="interface" identity="EmbeddingRecord" parent="~/.framework/src/pages/admin/EmbeddingDetailPage.tsx"]
|
|
41
40
|
interface EmbeddingRecord {
|
|
42
41
|
id: string
|
|
43
42
|
account_id: string
|
|
@@ -53,16 +52,15 @@ interface EmbeddingRecord {
|
|
|
53
52
|
created_at: string
|
|
54
53
|
updated_at: string
|
|
55
54
|
}
|
|
55
|
+
// CIL[END stable_id="~/.framework/src/pages/admin/EmbeddingDetailPage.tsx:EmbeddingRecord:interface"]
|
|
56
56
|
// CIL[DOC-VECTOR type="context" content="purpose='TypeScript interface describing a single embedding row.'; No verified external callers; imports: .framework/src/hooks/useApi.ts,.framework/src/lib/api.ts,.framework/src/components/ui/button.tsx"]
|
|
57
57
|
// CIL[DOC-VECTOR type="blast_radius" content="No direct caller data from CIL graph; local impact only"]
|
|
58
58
|
// CIL[DOC-VECTOR type="configuration" content="No environment or build configuration dependencies identified"]
|
|
59
59
|
// CIL[DOC-VECTOR type="constraint" content="Standard runtime; no special invariants documented"]
|
|
60
60
|
// CIL[DOC-VECTOR type="implementation_pattern" content="" status="pending_human_input"]
|
|
61
61
|
// CIL[DOC-VECTOR type="user_journey" content="" status="pending_human_input"]
|
|
62
|
-
// CIL[END stable_id="~/.framework/src/pages/admin/EmbeddingDetailPage.tsx:EmbeddingRecord:interface"]
|
|
63
62
|
|
|
64
63
|
|
|
65
|
-
// CIL[BEGIN stable_id="~/.framework/src/pages/admin/EmbeddingDetailPage.tsx:EmbeddingDetailPage:component" type="component" identity="EmbeddingDetailPage" parent="~/.framework/src/pages/admin/EmbeddingDetailPage.tsx"]
|
|
66
64
|
// CIL[DOC-MACRO purpose="Render a read-only admin detail page for a single embedding record."]
|
|
67
65
|
// CIL[DOC-RESPONSIBILITY responsibility="Fetch embedding by id, display metadata, status, content, metadata JSON, and the stored vector, with loading, error, and missing-id states."]
|
|
68
66
|
// CIL[DOC-CONTEXT module="admin/kb/embeddings" layer="presentation" related_files=".framework/src/components/admin/PageInstructions.tsx,.framework/src/components/ui/alert.tsx,.framework/src/components/ui/button.tsx,.framework/src/components/ui/card.tsx,.framework/src/components/ui/collapsible.tsx,.framework/src/components/ui/skeleton.tsx,.framework/src/hooks/useApi.ts,.framework/src/lib/api.ts,.framework/src/lib/utils.ts,.framework/src/pages/admin/EmbeddingDetailPage.tsx"]
|
|
@@ -71,6 +69,7 @@ interface EmbeddingRecord {
|
|
|
71
69
|
// CIL[DOC-CONFIDENCE pass="second" score="0.90" flags="none"]
|
|
72
70
|
// CIL[DOC-STABILITY stability="stable"]
|
|
73
71
|
|
|
72
|
+
// CIL[BEGIN stable_id="~/.framework/src/pages/admin/EmbeddingDetailPage.tsx:EmbeddingDetailPage:component" type="component" identity="EmbeddingDetailPage" parent="~/.framework/src/pages/admin/EmbeddingDetailPage.tsx"]
|
|
74
73
|
export function EmbeddingDetailPage() {
|
|
75
74
|
const { id } = useParams<{ id: string }>()
|
|
76
75
|
const navigate = useNavigate()
|
|
@@ -174,23 +173,6 @@ export function EmbeddingDetailPage() {
|
|
|
174
173
|
Back
|
|
175
174
|
</Button>
|
|
176
175
|
</div>
|
|
177
|
-
|
|
178
|
-
<PageInstructions
|
|
179
|
-
title="Embedding record inspector"
|
|
180
|
-
description="Read-only view of a single public.embeddings row. It shows the model, document, chunk index, content, content hash, lifecycle timestamps, metadata JSON, and the stored 1536-dimensional embedding vector."
|
|
181
|
-
sections={[
|
|
182
|
-
{
|
|
183
|
-
title: 'Lifecycle',
|
|
184
|
-
content: 'approved_at marks when the chunk was accepted for use; revoked_at marks when it was removed. A record without approved_at is still pending.'
|
|
185
|
-
},
|
|
186
|
-
{
|
|
187
|
-
title: 'Vector',
|
|
188
|
-
content: 'The embedding array is hidden by default; expand the section to inspect all 1536 numeric values.'
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
]}
|
|
192
|
-
/>
|
|
193
|
-
|
|
194
176
|
<div className="grid grid-cols-1 md:grid-cols-2 gap-4">
|
|
195
177
|
<Card>
|
|
196
178
|
<CardHeader>
|
|
@@ -313,11 +295,11 @@ export function EmbeddingDetailPage() {
|
|
|
313
295
|
</div>
|
|
314
296
|
)
|
|
315
297
|
}
|
|
298
|
+
// CIL[END stable_id="~/.framework/src/pages/admin/EmbeddingDetailPage.tsx:EmbeddingDetailPage:component"]
|
|
316
299
|
// CIL[DOC-VECTOR type="context" content="purpose='Render a read-only admin detail page for a single embedding record.'; No verified external callers; imports: .framework/src/hooks/useApi.ts,.framework/src/lib/api.ts,.framework/src/components/ui/button.tsx"]
|
|
317
300
|
// CIL[DOC-VECTOR type="blast_radius" content="No direct caller data from CIL graph; local impact only"]
|
|
318
301
|
// CIL[DOC-VECTOR type="configuration" content="No environment or build configuration dependencies identified"]
|
|
319
302
|
// CIL[DOC-VECTOR type="constraint" content="Standard runtime; no special invariants documented"]
|
|
320
303
|
// CIL[DOC-VECTOR type="implementation_pattern" content="" status="pending_human_input"]
|
|
321
304
|
// CIL[DOC-VECTOR type="user_journey" content="" status="pending_human_input"]
|
|
322
|
-
// CIL[END stable_id="~/.framework/src/pages/admin/EmbeddingDetailPage.tsx:EmbeddingDetailPage:component"]
|
|
323
305
|
|
|
@@ -16,7 +16,7 @@ import { AdminListPage } from '../../components/admin/AdminListPage'
|
|
|
16
16
|
import { SortableTableHeader } from '../../components/admin/SortableTableHeader'
|
|
17
17
|
import { useApi } from '../../hooks/useApi'
|
|
18
18
|
import { apiFetch } from '../../lib/api'
|
|
19
|
-
|
|
19
|
+
// CIL[END stable_id="~/.framework/src/pages/admin/EmbeddingsPage.tsx:module_header:module_header"]
|
|
20
20
|
|
|
21
21
|
|
|
22
22
|
// CIL[DOC-VECTOR type="context" content="purpose='Admin page for inspecting public.embeddings records'; No verified external callers; imports: .framework/src/lib/utils.ts,.framework/src/components/admin/AdminListPage.tsx,.framework/src/components/admin/SortableTableHeader.tsx"]
|
|
@@ -25,8 +25,6 @@ import { PageInstructions } from '../../components/admin/PageInstructions'
|
|
|
25
25
|
// CIL[DOC-VECTOR type="constraint" content="Standard runtime; no special invariants documented"]
|
|
26
26
|
// CIL[DOC-VECTOR type="implementation_pattern" content="" status="pending_human_input"]
|
|
27
27
|
// CIL[DOC-VECTOR type="user_journey" content="" status="pending_human_input"]
|
|
28
|
-
// CIL[END stable_id="~/.framework/src/pages/admin/EmbeddingsPage.tsx:module_header:module_header"]
|
|
29
|
-
// CIL[BEGIN stable_id="~/.framework/src/pages/admin/EmbeddingsPage.tsx:EmbeddingRecord:interface" type="interface" identity="EmbeddingRecord" parent="~/.framework/src/pages/admin/EmbeddingsPage.tsx"]
|
|
30
28
|
// CIL[DOC-MACRO purpose="TypeScript type for a public.embeddings row"]
|
|
31
29
|
// CIL[DOC-RESPONSIBILITY responsibility="Define the typed shape of an embedding record"]
|
|
32
30
|
// CIL[DOC-CONTEXT module="admin" layer="types" related_files=".framework/src/components/admin/AdminListPage.tsx,.framework/src/components/admin/PageInstructions.tsx,.framework/src/components/admin/SortableTableHeader.tsx,.framework/src/hooks/useApi.ts,.framework/src/lib/api.ts,.framework/src/lib/utils.ts,.framework/src/pages/admin/EmbeddingsPage.tsx"]
|
|
@@ -34,6 +32,7 @@ import { PageInstructions } from '../../components/admin/PageInstructions'
|
|
|
34
32
|
// CIL[DOC-MICRO logic_summary="Structured contract describing an embedding vector row" notable_decisions="[]"]
|
|
35
33
|
// CIL[DOC-CONFIDENCE pass="second" score="0.90" flags="none"]
|
|
36
34
|
// CIL[DOC-STABILITY stability="stable"]
|
|
35
|
+
// CIL[BEGIN stable_id="~/.framework/src/pages/admin/EmbeddingsPage.tsx:EmbeddingRecord:interface" type="interface" identity="EmbeddingRecord" parent="~/.framework/src/pages/admin/EmbeddingsPage.tsx"]
|
|
37
36
|
interface EmbeddingRecord {
|
|
38
37
|
id: string
|
|
39
38
|
account_id: string
|
|
@@ -49,16 +48,15 @@ interface EmbeddingRecord {
|
|
|
49
48
|
created_at: string
|
|
50
49
|
updated_at: string
|
|
51
50
|
}
|
|
51
|
+
// CIL[END stable_id="~/.framework/src/pages/admin/EmbeddingsPage.tsx:EmbeddingRecord:interface"]
|
|
52
52
|
// CIL[DOC-VECTOR type="context" content="purpose='TypeScript type for a public.embeddings row'; No verified external callers; imports: .framework/src/lib/utils.ts,.framework/src/components/admin/AdminListPage.tsx,.framework/src/components/admin/SortableTableHeader.tsx"]
|
|
53
53
|
// CIL[DOC-VECTOR type="blast_radius" content="No direct caller data from CIL graph; local impact only"]
|
|
54
54
|
// CIL[DOC-VECTOR type="configuration" content="No environment or build configuration dependencies identified"]
|
|
55
55
|
// CIL[DOC-VECTOR type="constraint" content="Standard runtime; no special invariants documented"]
|
|
56
56
|
// CIL[DOC-VECTOR type="implementation_pattern" content="" status="pending_human_input"]
|
|
57
57
|
// CIL[DOC-VECTOR type="user_journey" content="" status="pending_human_input"]
|
|
58
|
-
// CIL[END stable_id="~/.framework/src/pages/admin/EmbeddingsPage.tsx:EmbeddingRecord:interface"]
|
|
59
58
|
|
|
60
59
|
|
|
61
|
-
// CIL[BEGIN stable_id="~/.framework/src/pages/admin/EmbeddingsPage.tsx:EmbeddingsPage:component" type="component" identity="EmbeddingsPage" parent="~/.framework/src/pages/admin/EmbeddingsPage.tsx"]
|
|
62
60
|
// CIL[DOC-MACRO purpose="Render the admin embeddings list page with search, sorting, and status indicators"]
|
|
63
61
|
// CIL[DOC-RESPONSIBILITY responsibility="Fetch and display public.embeddings records; handle search, sort, and navigation to the detail view"]
|
|
64
62
|
// CIL[DOC-CONTEXT module="admin" layer="component" related_files=".framework/src/components/admin/AdminListPage.tsx,.framework/src/components/admin/PageInstructions.tsx,.framework/src/components/admin/SortableTableHeader.tsx,.framework/src/hooks/useApi.ts,.framework/src/lib/api.ts,.framework/src/lib/utils.ts,.framework/src/pages/admin/EmbeddingsPage.tsx"]
|
|
@@ -66,6 +64,7 @@ interface EmbeddingRecord {
|
|
|
66
64
|
// CIL[DOC-MICRO logic_summary="Fetch records, filter by content/document/model, sort by selected key/direction, compute status badges, and render a table with PageInstructions" notable_decisions="['Searches content, document_id, and model_id via lowercase substring', 'Sort supports string and number fields', 'Status derived from revoked_at and approved_at', 'Row click navigates to the detail view']"]
|
|
67
65
|
// CIL[DOC-CONFIDENCE pass="second" score="0.90" flags="none"]
|
|
68
66
|
// CIL[DOC-STABILITY stability="stable"]
|
|
67
|
+
// CIL[BEGIN stable_id="~/.framework/src/pages/admin/EmbeddingsPage.tsx:EmbeddingsPage:component" type="component" identity="EmbeddingsPage" parent="~/.framework/src/pages/admin/EmbeddingsPage.tsx"]
|
|
69
68
|
export function EmbeddingsPage() {
|
|
70
69
|
const navigate = useNavigate()
|
|
71
70
|
const [searchTerm, setSearchTerm] = useState('')
|
|
@@ -149,7 +148,6 @@ export function EmbeddingsPage() {
|
|
|
149
148
|
<AdminListPage
|
|
150
149
|
title="Embeddings"
|
|
151
150
|
description="Inspect runtime vector records from the public.embeddings table"
|
|
152
|
-
noPageInstructions
|
|
153
151
|
statsCards={statsCards}
|
|
154
152
|
searchPlaceholder="Search by content, document, or model..."
|
|
155
153
|
searchValue={searchTerm}
|
|
@@ -160,25 +158,6 @@ export function EmbeddingsPage() {
|
|
|
160
158
|
emptyMessage="No embedding records found"
|
|
161
159
|
emptyIcon={AlertCircle}
|
|
162
160
|
>
|
|
163
|
-
<PageInstructions
|
|
164
|
-
title="About the embeddings table"
|
|
165
|
-
description="These are runtime vector records stored in public.embeddings. Each record is a chunk of content with its embedding, model, document, and lifecycle metadata. This page is read-only."
|
|
166
|
-
sections={[
|
|
167
|
-
{
|
|
168
|
-
title: 'Columns',
|
|
169
|
-
content: 'Model ID, Document ID, chunk index, truncated content, approval status, content hash, and creation time.'
|
|
170
|
-
},
|
|
171
|
-
{
|
|
172
|
-
title: 'Searching',
|
|
173
|
-
content: 'Use the search field to filter by content text, document_id, or model_id.'
|
|
174
|
-
},
|
|
175
|
-
{
|
|
176
|
-
title: 'Drilling down',
|
|
177
|
-
content: 'Click any row to view the full record, including the full content, metadata JSON, and embedding vector.'
|
|
178
|
-
}
|
|
179
|
-
]}
|
|
180
|
-
/>
|
|
181
|
-
|
|
182
161
|
{sortedRecords.length === 0 ? (
|
|
183
162
|
<div className="p-8 text-center">
|
|
184
163
|
<AlertCircle className="mx-auto h-12 w-12 text-slate-400" />
|
|
@@ -261,10 +240,10 @@ export function EmbeddingsPage() {
|
|
|
261
240
|
</AdminListPage>
|
|
262
241
|
)
|
|
263
242
|
}
|
|
243
|
+
// CIL[END stable_id="~/.framework/src/pages/admin/EmbeddingsPage.tsx:EmbeddingsPage:component"]
|
|
264
244
|
// CIL[DOC-VECTOR type="context" content="purpose='Render the admin embeddings list page with search, sorting, and status indicators'; No verified external callers; imports: .framework/src/lib/utils.ts,.framework/src/components/admin/AdminListPage.tsx,.framework/src/components/admin/SortableTableHeader.tsx"]
|
|
265
245
|
// CIL[DOC-VECTOR type="blast_radius" content="No direct caller data from CIL graph; local impact only"]
|
|
266
246
|
// CIL[DOC-VECTOR type="configuration" content="No environment or build configuration dependencies identified"]
|
|
267
247
|
// CIL[DOC-VECTOR type="constraint" content="Standard runtime; no special invariants documented"]
|
|
268
248
|
// CIL[DOC-VECTOR type="implementation_pattern" content="" status="pending_human_input"]
|
|
269
249
|
// CIL[DOC-VECTOR type="user_journey" content="" status="pending_human_input"]
|
|
270
|
-
// CIL[END stable_id="~/.framework/src/pages/admin/EmbeddingsPage.tsx:EmbeddingsPage:component"]
|
|
@@ -28,6 +28,7 @@ import { Modal } from '../../components/ui/Modal'
|
|
|
28
28
|
import { Badge } from '../../components/ui/badge'
|
|
29
29
|
import { Collapsible, CollapsibleContent, CollapsibleTrigger } from '../../components/ui/collapsible'
|
|
30
30
|
import { ArrowLeft, Pencil, Trash2, CheckCircle, XCircle, AlertTriangle, AlertCircle, ChevronDown } from 'lucide-react'
|
|
31
|
+
// CIL[END stable_id="~/.framework/src/pages/admin/IntegrationDetailPage.tsx:module_header:module_header"]
|
|
31
32
|
|
|
32
33
|
|
|
33
34
|
// CIL[DOC-VECTOR type="context" content="purpose='Admin integration detail page module. Provides a React page to view, create, edit, and delete third-party integrations.'; No verified external callers; imports: .framework/src/lib/api.ts,.framework/src/components/ui/button.tsx,.framework/src/components/ui/input.tsx"]
|
|
@@ -36,8 +37,6 @@ import { ArrowLeft, Pencil, Trash2, CheckCircle, XCircle, AlertTriangle, AlertCi
|
|
|
36
37
|
// CIL[DOC-VECTOR type="constraint" content="Standard runtime; no special invariants documented"]
|
|
37
38
|
// CIL[DOC-VECTOR type="implementation_pattern" content="" status="pending_human_input"]
|
|
38
39
|
// CIL[DOC-VECTOR type="user_journey" content="" status="pending_human_input"]
|
|
39
|
-
// CIL[END stable_id="~/.framework/src/pages/admin/IntegrationDetailPage.tsx:module_header:module_header"]
|
|
40
|
-
// CIL[BEGIN stable_id="~/.framework/src/pages/admin/IntegrationDetailPage.tsx:Integration:interface" type="interface" identity="Integration" parent="~/.framework/src/pages/admin/IntegrationDetailPage.tsx"]
|
|
41
40
|
// CIL[DOC-MACRO purpose="TypeScript interface describing an integration record and its fields."]
|
|
42
41
|
// CIL[DOC-RESPONSIBILITY responsibility="Define the shape of integration data used by the page."]
|
|
43
42
|
// CIL[DOC-CONTEXT module="admin" layer="types" related_files=".framework/src/components/ui/Modal.tsx,.framework/src/components/ui/alert.tsx,.framework/src/components/ui/badge.tsx,.framework/src/components/ui/button.tsx,.framework/src/components/ui/card.tsx,.framework/src/components/ui/checkbox.tsx,.framework/src/components/ui/collapsible.tsx,.framework/src/components/ui/input.tsx,.framework/src/components/ui/label.tsx,.framework/src/components/ui/select.tsx,.framework/src/components/ui/skeleton.tsx,.framework/src/components/ui/textarea.tsx,.framework/src/lib/api.ts,.framework/src/pages/admin/IntegrationDetailPage.tsx"]
|
|
@@ -46,6 +45,7 @@ import { ArrowLeft, Pencil, Trash2, CheckCircle, XCircle, AlertTriangle, AlertCi
|
|
|
46
45
|
// CIL[DOC-CONFIDENCE pass="second" score="0.90" flags="none"]
|
|
47
46
|
// CIL[DOC-STABILITY stability="stable"]
|
|
48
47
|
|
|
48
|
+
// CIL[BEGIN stable_id="~/.framework/src/pages/admin/IntegrationDetailPage.tsx:Integration:interface" type="interface" identity="Integration" parent="~/.framework/src/pages/admin/IntegrationDetailPage.tsx"]
|
|
49
49
|
interface Integration {
|
|
50
50
|
id: string
|
|
51
51
|
name: string
|
|
@@ -62,18 +62,17 @@ interface Integration {
|
|
|
62
62
|
updated_at: string
|
|
63
63
|
account_id: string | null
|
|
64
64
|
}
|
|
65
|
+
// CIL[END stable_id="~/.framework/src/pages/admin/IntegrationDetailPage.tsx:Integration:interface"]
|
|
65
66
|
// CIL[DOC-VECTOR type="context" content="purpose='TypeScript interface describing an integration record and its fields.'; No verified external callers; imports: .framework/src/lib/api.ts,.framework/src/components/ui/button.tsx,.framework/src/components/ui/input.tsx"]
|
|
66
67
|
// CIL[DOC-VECTOR type="blast_radius" content="No direct caller data from CIL graph; local impact only"]
|
|
67
68
|
// CIL[DOC-VECTOR type="configuration" content="No environment or build configuration dependencies identified"]
|
|
68
69
|
// CIL[DOC-VECTOR type="constraint" content="Standard runtime; no special invariants documented"]
|
|
69
70
|
// CIL[DOC-VECTOR type="implementation_pattern" content="" status="pending_human_input"]
|
|
70
71
|
// CIL[DOC-VECTOR type="user_journey" content="" status="pending_human_input"]
|
|
71
|
-
// CIL[END stable_id="~/.framework/src/pages/admin/IntegrationDetailPage.tsx:Integration:interface"]
|
|
72
72
|
|
|
73
73
|
|
|
74
74
|
|
|
75
75
|
|
|
76
|
-
// CIL[BEGIN stable_id="~/.framework/src/pages/admin/IntegrationDetailPage.tsx:integration_types:constant" type="constant" identity="INTEGRATION_TYPES" parent="~/.framework/src/pages/admin/IntegrationDetailPage.tsx"]
|
|
77
76
|
// CIL[DOC-MACRO purpose="Selectable options for integration types."]
|
|
78
77
|
// CIL[DOC-RESPONSIBILITY responsibility="Provide labels for the integration type select control."]
|
|
79
78
|
// CIL[DOC-CONTEXT module="admin" layer="constants" related_files=".framework/src/components/ui/Modal.tsx,.framework/src/components/ui/alert.tsx,.framework/src/components/ui/badge.tsx,.framework/src/components/ui/button.tsx,.framework/src/components/ui/card.tsx,.framework/src/components/ui/checkbox.tsx,.framework/src/components/ui/collapsible.tsx,.framework/src/components/ui/input.tsx,.framework/src/components/ui/label.tsx,.framework/src/components/ui/select.tsx,.framework/src/components/ui/skeleton.tsx,.framework/src/components/ui/textarea.tsx,.framework/src/lib/api.ts,.framework/src/pages/admin/IntegrationDetailPage.tsx"]
|
|
@@ -82,6 +81,7 @@ interface Integration {
|
|
|
82
81
|
// CIL[DOC-CONFIDENCE pass="second" score="0.90" flags="none"]
|
|
83
82
|
// CIL[DOC-STABILITY stability="stable"]
|
|
84
83
|
|
|
84
|
+
// CIL[BEGIN stable_id="~/.framework/src/pages/admin/IntegrationDetailPage.tsx:INTEGRATION_TYPES:constant" type="constant" identity="INTEGRATION_TYPES" parent="~/.framework/src/pages/admin/IntegrationDetailPage.tsx"]
|
|
85
85
|
const INTEGRATION_TYPES = [
|
|
86
86
|
{ value: 'webhook', label: 'Webhook' },
|
|
87
87
|
{ value: 'api', label: 'API' },
|
|
@@ -89,16 +89,15 @@ const INTEGRATION_TYPES = [
|
|
|
89
89
|
{ value: 'file', label: 'File' },
|
|
90
90
|
{ value: 'custom', label: 'Custom' }
|
|
91
91
|
]
|
|
92
|
+
// CIL[END stable_id="~/.framework/src/pages/admin/IntegrationDetailPage.tsx:INTEGRATION_TYPES:constant"]
|
|
92
93
|
// CIL[DOC-VECTOR type="context" content="purpose='Selectable options for integration types.'; No verified external callers; imports: .framework/src/lib/api.ts,.framework/src/components/ui/button.tsx,.framework/src/components/ui/input.tsx"]
|
|
93
94
|
// CIL[DOC-VECTOR type="blast_radius" content="No direct caller data from CIL graph; local impact only"]
|
|
94
95
|
// CIL[DOC-VECTOR type="configuration" content="No environment or build configuration dependencies identified"]
|
|
95
96
|
// CIL[DOC-VECTOR type="constraint" content="Standard runtime; no special invariants documented"]
|
|
96
97
|
// CIL[DOC-VECTOR type="implementation_pattern" content="" status="pending_human_input"]
|
|
97
98
|
// CIL[DOC-VECTOR type="user_journey" content="" status="pending_human_input"]
|
|
98
|
-
// CIL[END stable_id="~/.framework/src/pages/admin/IntegrationDetailPage.tsx:integration_types:constant"]
|
|
99
99
|
|
|
100
100
|
|
|
101
|
-
// CIL[BEGIN stable_id="~/.framework/src/pages/admin/IntegrationDetailPage.tsx:IntegrationDetailPage:component" type="component" identity="IntegrationDetailPage" parent="~/.framework/src/pages/admin/IntegrationDetailPage.tsx"]
|
|
102
101
|
// CIL[DOC-MACRO purpose="React component for creating, viewing, editing, and deleting integrations."]
|
|
103
102
|
// CIL[DOC-RESPONSIBILITY responsibility="Render the integration detail UI, manage form state, fetch and persist integration records, and handle deletion."]
|
|
104
103
|
// CIL[DOC-CONTEXT module="admin" layer="pages" related_files=".framework/src/components/ui/Modal.tsx,.framework/src/components/ui/alert.tsx,.framework/src/components/ui/badge.tsx,.framework/src/components/ui/button.tsx,.framework/src/components/ui/card.tsx,.framework/src/components/ui/checkbox.tsx,.framework/src/components/ui/collapsible.tsx,.framework/src/components/ui/input.tsx,.framework/src/components/ui/label.tsx,.framework/src/components/ui/select.tsx,.framework/src/components/ui/skeleton.tsx,.framework/src/components/ui/textarea.tsx,.framework/src/lib/api.ts,.framework/src/pages/admin/IntegrationDetailPage.tsx"]
|
|
@@ -107,6 +106,7 @@ const INTEGRATION_TYPES = [
|
|
|
107
106
|
// CIL[DOC-CONFIDENCE pass="second" score="0.90" flags="none"]
|
|
108
107
|
// CIL[DOC-STABILITY stability="stable"]
|
|
109
108
|
|
|
109
|
+
// CIL[BEGIN stable_id="~/.framework/src/pages/admin/IntegrationDetailPage.tsx:IntegrationDetailPage:component" type="component" identity="IntegrationDetailPage" parent="~/.framework/src/pages/admin/IntegrationDetailPage.tsx"]
|
|
110
110
|
export function IntegrationDetailPage() {
|
|
111
111
|
const { id } = useParams<{ id: string }>()
|
|
112
112
|
const navigate = useNavigate()
|
|
@@ -347,6 +347,7 @@ export function IntegrationDetailPage() {
|
|
|
347
347
|
</div>
|
|
348
348
|
)
|
|
349
349
|
}
|
|
350
|
+
// CIL[END stable_id="~/.framework/src/pages/admin/IntegrationDetailPage.tsx:IntegrationDetailPage:component"]
|
|
350
351
|
|
|
351
352
|
// CIL[DOC-VECTOR type="context" content="purpose='React component for creating, viewing, editing, and deleting integrations.'; No verified external callers; imports: .framework/src/lib/api.ts,.framework/src/components/ui/button.tsx,.framework/src/components/ui/input.tsx"]
|
|
352
353
|
// CIL[DOC-VECTOR type="blast_radius" content="No direct caller data from CIL graph; local impact only"]
|
|
@@ -354,4 +355,3 @@ export function IntegrationDetailPage() {
|
|
|
354
355
|
// CIL[DOC-VECTOR type="constraint" content="Standard runtime; no special invariants documented"]
|
|
355
356
|
// CIL[DOC-VECTOR type="implementation_pattern" content="" status="pending_human_input"]
|
|
356
357
|
// CIL[DOC-VECTOR type="user_journey" content="" status="pending_human_input"]
|
|
357
|
-
// CIL[END stable_id="~/.framework/src/pages/admin/IntegrationDetailPage.tsx:IntegrationDetailPage:component"]
|