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,20 +1,38 @@
|
|
|
1
1
|
// CIL[BEGIN stable_id="~/.framework/src/pages/admin/TypesPage.tsx:module_header:module_header" type="module_header" identity="module_header" parent="~/.framework/src/pages/admin/TypesPage.tsx"]
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
2
|
+
/**
|
|
3
|
+
* @module TypesPage
|
|
4
|
+
* @audience both
|
|
5
|
+
* @layer shared-core
|
|
6
|
+
* @stability stable
|
|
7
|
+
*
|
|
8
|
+
* This module represents the TypesPage component within the admin section of the application, providing a user interface for managing various types. It integrates with the API to fetch data and utilizes several UI components for rendering. INVARIANT: The component must always be rendered within a valid routing context to function correctly.
|
|
9
|
+
*
|
|
10
|
+
* @seeAlso useApi (provides API interaction functionality).
|
|
11
|
+
* @seeAlso LoadingSpinner (used for loading states).
|
|
12
|
+
* @seeAlso AdminListPage (displays a list of admin items).
|
|
13
|
+
* @seeAlso SortableTableHeader (enables sorting functionality in tables).
|
|
14
|
+
*
|
|
15
|
+
* @cil-generated
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
10
26
|
|
|
11
27
|
|
|
12
28
|
|
|
13
29
|
|
|
14
30
|
import React, { useState } from 'react'
|
|
31
|
+
import { useNavigate } from 'react-router-dom'
|
|
15
32
|
import { useApi } from '../../hooks/useApi'
|
|
16
33
|
import { apiFetch } from '../../lib/api'
|
|
17
34
|
import {
|
|
35
|
+
// CIL[END stable_id="~/.framework/src/pages/admin/TypesPage.tsx:module_header:module_header"]
|
|
18
36
|
Plus,
|
|
19
37
|
Box,
|
|
20
38
|
FileText,
|
|
@@ -28,21 +46,29 @@ import { AdminListPage } from '../../components/admin/AdminListPage'
|
|
|
28
46
|
import { SortableTableHeader } from '../../components/admin/SortableTableHeader'
|
|
29
47
|
import { formatDateTime } from '../../lib/utils'
|
|
30
48
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
|
|
38
64
|
// CIL[BEGIN stable_id="~/.framework/src/pages/admin/TypesPage.tsx:Type:interface" type="interface" identity="Type" parent="~/.framework/src/pages/admin/TypesPage.tsx"]
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
65
|
+
/**
|
|
66
|
+
* The Type interface defines the structure for a type object used in the admin panel, encapsulating various attributes related to types. It serves to standardize the representation of types within the application.
|
|
67
|
+
*
|
|
68
|
+
* @sideEffects none
|
|
69
|
+
* @stability internal
|
|
70
|
+
* @cil-generated
|
|
71
|
+
*/
|
|
46
72
|
interface Type {
|
|
47
73
|
id: string
|
|
48
74
|
name: string
|
|
@@ -51,7 +77,7 @@ interface Type {
|
|
|
51
77
|
description?: string
|
|
52
78
|
icon?: string
|
|
53
79
|
color?: string
|
|
54
|
-
|
|
80
|
+
design_schema?: {
|
|
55
81
|
fields: Record<string, {
|
|
56
82
|
type: string
|
|
57
83
|
label?: string
|
|
@@ -66,23 +92,39 @@ interface Type {
|
|
|
66
92
|
app_id?: string | null
|
|
67
93
|
app?: any
|
|
68
94
|
}
|
|
69
|
-
// CIL[DOC-VECTOR type="context" content="purpose='Describe the shape of a Type record for the admin Types list.'; No verified external callers; imports: .framework/src/hooks/useApi.ts,.framework/src/lib/api.ts,.framework/src/components/ui/LoadingSpinner.tsx"]
|
|
70
|
-
// CIL[DOC-VECTOR type="blast_radius" content="No direct caller data from CIL graph; local impact only"]
|
|
71
|
-
// CIL[DOC-VECTOR type="configuration" content="No environment or build configuration dependencies identified"]
|
|
72
|
-
// CIL[DOC-VECTOR type="constraint" content="Standard runtime; no special invariants documented"]
|
|
73
|
-
// CIL[DOC-VECTOR type="implementation_pattern" content="" status="pending_human_input"]
|
|
74
|
-
// CIL[DOC-VECTOR type="user_journey" content="" status="pending_human_input"]
|
|
75
95
|
// CIL[END stable_id="~/.framework/src/pages/admin/TypesPage.tsx:Type:interface"]
|
|
76
96
|
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
|
|
77
112
|
// CIL[BEGIN stable_id="~/.framework/src/pages/admin/TypesPage.tsx:TypesPage:component" type="component" identity="TypesPage" parent="~/.framework/src/pages/admin/TypesPage.tsx"]
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
113
|
+
/**
|
|
114
|
+
* The TypesPage component manages the display and filtering of various types in an admin interface. It allows users to search, sort, and categorize types based on specific criteria.
|
|
115
|
+
*
|
|
116
|
+
* @macro Admin interface component for managing and displaying types.
|
|
117
|
+
* @micro Utilizes state management and API calls to fetch and filter types based on user input.
|
|
118
|
+
* @outputSpec JSX.Element
|
|
119
|
+
* @throws Error — if the API response is not ok
|
|
120
|
+
* @sideEffects API call to '/api/types?action=list&limit=500'
|
|
121
|
+
* @stability internal
|
|
122
|
+
* @calls useApi, apiFetch, useNavigate
|
|
123
|
+
* @errorHandling throws an error if the API response is not ok
|
|
124
|
+
* @cil-generated
|
|
125
|
+
*/
|
|
85
126
|
export function TypesPage() {
|
|
127
|
+
const navigate = useNavigate()
|
|
86
128
|
const [searchTerm, setSearchTerm] = useState('')
|
|
87
129
|
const [selectedCategory, setSelectedCategory] = useState('all')
|
|
88
130
|
const [sortKey, setSortKey] = useState('name')
|
|
@@ -90,7 +132,7 @@ export function TypesPage() {
|
|
|
90
132
|
|
|
91
133
|
const { data: types, loading, error, refetch } = useApi<Type[]>(
|
|
92
134
|
async ({ signal }: { signal?: AbortSignal }) => {
|
|
93
|
-
const response = await apiFetch('/api/types?action=list', { signal })
|
|
135
|
+
const response = await apiFetch('/api/types?action=list&limit=500&active=all', { signal })
|
|
94
136
|
if (!response.ok) throw new Error('Failed to fetch types')
|
|
95
137
|
const result = await response.json()
|
|
96
138
|
return result.data || []
|
|
@@ -144,7 +186,7 @@ export function TypesPage() {
|
|
|
144
186
|
}
|
|
145
187
|
|
|
146
188
|
const handleRowClick = (type: Type) => {
|
|
147
|
-
|
|
189
|
+
navigate(`/spine-framework/admin/configs/types/${type.id}`)
|
|
148
190
|
}
|
|
149
191
|
|
|
150
192
|
const sortedTypes = [...(filteredTypes || [])].sort((a, b) => {
|
|
@@ -185,7 +227,7 @@ export function TypesPage() {
|
|
|
185
227
|
},
|
|
186
228
|
{
|
|
187
229
|
title: 'Total Fields',
|
|
188
|
-
value: (types || []).reduce((sum, t) => sum + Object.keys(t.
|
|
230
|
+
value: (types || []).reduce((sum, t) => sum + Object.keys(t.design_schema?.fields || {}).length, 0),
|
|
189
231
|
icon: FileText,
|
|
190
232
|
iconColor: 'text-purple-600',
|
|
191
233
|
}
|
|
@@ -286,7 +328,7 @@ export function TypesPage() {
|
|
|
286
328
|
<div className="text-sm text-muted-foreground">
|
|
287
329
|
{type.description || type.slug}
|
|
288
330
|
<span className="mx-1.5 text-muted-foreground">·</span>
|
|
289
|
-
{Object.keys(type.
|
|
331
|
+
{Object.keys(type.design_schema?.fields || {}).length} fields
|
|
290
332
|
</div>
|
|
291
333
|
</div>
|
|
292
334
|
</td>
|
|
@@ -301,7 +343,7 @@ export function TypesPage() {
|
|
|
301
343
|
</span>
|
|
302
344
|
</td>
|
|
303
345
|
<td className="px-6 py-4 whitespace-nowrap text-sm text-muted-foreground">
|
|
304
|
-
{Object.keys(type.
|
|
346
|
+
{Object.keys(type.design_schema?.fields || {}).length}
|
|
305
347
|
</td>
|
|
306
348
|
<td className="px-6 py-4 whitespace-nowrap text-sm text-muted-foreground">
|
|
307
349
|
{formatDateTime(type.created_at)}
|
|
@@ -317,10 +359,10 @@ export function TypesPage() {
|
|
|
317
359
|
</AdminListPage>
|
|
318
360
|
)
|
|
319
361
|
}
|
|
320
|
-
// CIL[
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
362
|
+
// CIL[END stable_id="~/.framework/src/pages/admin/TypesPage.tsx:TypesPage:component"]
|
|
363
|
+
|
|
364
|
+
|
|
365
|
+
|
|
366
|
+
|
|
367
|
+
|
|
368
|
+
|
|
@@ -16,6 +16,7 @@ import { Textarea } from '@core/components/ui/textarea'
|
|
|
16
16
|
import { Badge } from '@core/components/ui/badge'
|
|
17
17
|
import { Skeleton } from '@core/components/ui/skeleton'
|
|
18
18
|
import {
|
|
19
|
+
// CIL[END stable_id="~/.framework/src/pages/admin/cil/CILAgentPage.tsx:module_header:module_header"]
|
|
19
20
|
Bot,
|
|
20
21
|
User,
|
|
21
22
|
ChevronRight,
|
|
@@ -31,7 +32,6 @@ import {
|
|
|
31
32
|
|
|
32
33
|
|
|
33
34
|
|
|
34
|
-
import { PageInstructions } from '../../../components/admin/PageInstructions'
|
|
35
35
|
|
|
36
36
|
// CIL[DOC-VECTOR type="context" content="purpose='Chat interface for the CIL agent that answers natural-language questions about indexed code'; No verified external callers; imports: .framework/src/lib/api.ts,.framework/src/components/ui/button.tsx,.framework/src/components/ui/textarea.tsx"]
|
|
37
37
|
// CIL[DOC-VECTOR type="blast_radius" content="No direct caller data from CIL graph; local impact only"]
|
|
@@ -39,8 +39,6 @@ import { PageInstructions } from '../../../components/admin/PageInstructions'
|
|
|
39
39
|
// CIL[DOC-VECTOR type="constraint" content="Standard runtime; no special invariants documented"]
|
|
40
40
|
// CIL[DOC-VECTOR type="implementation_pattern" content="" status="pending_human_input"]
|
|
41
41
|
// CIL[DOC-VECTOR type="user_journey" content="" status="pending_human_input"]
|
|
42
|
-
// CIL[END stable_id="~/.framework/src/pages/admin/cil/CILAgentPage.tsx:module_header:module_header"]
|
|
43
|
-
// CIL[BEGIN stable_id="~/.framework/src/pages/admin/cil/CILAgentPage.tsx:Message:interface" type="interface" identity="Message" parent="~/.framework/src/pages/admin/cil/CILAgentPage.tsx"]
|
|
44
42
|
// CIL[DOC-MACRO purpose="Message shape for CIL agent chat exchanges"]
|
|
45
43
|
// CIL[DOC-RESPONSIBILITY responsibility="Describe the fields for a chat message including role, content, optional sources and tool calls"]
|
|
46
44
|
// CIL[DOC-CONTEXT module=".framework/src/pages/admin/cil" layer="admin-ui" related_files=".framework/src/components/admin/PageInstructions.tsx,.framework/src/components/ui/badge.tsx,.framework/src/components/ui/button.tsx,.framework/src/components/ui/skeleton.tsx,.framework/src/components/ui/textarea.tsx,.framework/src/lib/api.ts,.framework/src/pages/admin/cil/CILAgentPage.tsx"]
|
|
@@ -49,6 +47,7 @@ import { PageInstructions } from '../../../components/admin/PageInstructions'
|
|
|
49
47
|
// CIL[DOC-CONFIDENCE pass="second" score="0.90" flags="none"]
|
|
50
48
|
// CIL[DOC-STABILITY stability="stable"]
|
|
51
49
|
|
|
50
|
+
// CIL[BEGIN stable_id="~/.framework/src/pages/admin/cil/CILAgentPage.tsx:Message:interface" type="interface" identity="Message" parent="~/.framework/src/pages/admin/cil/CILAgentPage.tsx"]
|
|
52
51
|
interface Message {
|
|
53
52
|
id: string
|
|
54
53
|
role: 'user' | 'assistant' | 'system'
|
|
@@ -59,19 +58,18 @@ interface Message {
|
|
|
59
58
|
tool_calls_made?: string[]
|
|
60
59
|
loading?: boolean
|
|
61
60
|
}
|
|
61
|
+
// CIL[END stable_id="~/.framework/src/pages/admin/cil/CILAgentPage.tsx:Message:interface"]
|
|
62
62
|
// CIL[DOC-VECTOR type="context" content="purpose='Message shape for CIL agent chat exchanges'; No verified external callers; imports: .framework/src/lib/api.ts,.framework/src/components/ui/button.tsx,.framework/src/components/ui/textarea.tsx"]
|
|
63
63
|
// CIL[DOC-VECTOR type="blast_radius" content="No direct caller data from CIL graph; local impact only"]
|
|
64
64
|
// CIL[DOC-VECTOR type="configuration" content="No environment or build configuration dependencies identified"]
|
|
65
65
|
// CIL[DOC-VECTOR type="constraint" content="Standard runtime; no special invariants documented"]
|
|
66
66
|
// CIL[DOC-VECTOR type="implementation_pattern" content="" status="pending_human_input"]
|
|
67
67
|
// CIL[DOC-VECTOR type="user_journey" content="" status="pending_human_input"]
|
|
68
|
-
// CIL[END stable_id="~/.framework/src/pages/admin/cil/CILAgentPage.tsx:Message:interface"]
|
|
69
68
|
|
|
70
69
|
|
|
71
70
|
|
|
72
71
|
|
|
73
72
|
|
|
74
|
-
// CIL[BEGIN stable_id="~/.framework/src/pages/admin/cil/CILAgentPage.tsx:renderMarkdown:function" type="function" identity="renderMarkdown" parent="~/.framework/src/pages/admin/cil/CILAgentPage.tsx"]
|
|
75
73
|
// CIL[DOC-MACRO purpose="Convert assistant answer text with markdown-like code and emphasis markers into React nodes"]
|
|
76
74
|
// CIL[DOC-RESPONSIBILITY responsibility="Render inline code, bold text, code blocks, and line breaks safely for assistant messages"]
|
|
77
75
|
// CIL[DOC-CONTEXT module=".framework/src/pages/admin/cil" layer="admin-ui" related_files=".framework/src/components/admin/PageInstructions.tsx,.framework/src/components/ui/badge.tsx,.framework/src/components/ui/button.tsx,.framework/src/components/ui/skeleton.tsx,.framework/src/components/ui/textarea.tsx,.framework/src/lib/api.ts,.framework/src/pages/admin/cil/CILAgentPage.tsx"]
|
|
@@ -80,6 +78,7 @@ interface Message {
|
|
|
80
78
|
// CIL[DOC-CONFIDENCE pass="second" score="0.90" flags="none"]
|
|
81
79
|
// CIL[DOC-STABILITY stability="stable"]
|
|
82
80
|
|
|
81
|
+
// CIL[BEGIN stable_id="~/.framework/src/pages/admin/cil/CILAgentPage.tsx:renderMarkdown:function" type="function" identity="renderMarkdown" parent="~/.framework/src/pages/admin/cil/CILAgentPage.tsx"]
|
|
83
82
|
function renderMarkdown(text: string): React.ReactNode[] {
|
|
84
83
|
const parts: React.ReactNode[] = []
|
|
85
84
|
let key = 0
|
|
@@ -119,6 +118,7 @@ function renderMarkdown(text: string): React.ReactNode[] {
|
|
|
119
118
|
}
|
|
120
119
|
return parts
|
|
121
120
|
}
|
|
121
|
+
// CIL[END stable_id="~/.framework/src/pages/admin/cil/CILAgentPage.tsx:renderMarkdown:function"]
|
|
122
122
|
|
|
123
123
|
// CIL[DOC-VECTOR type="context" content="purpose='Convert assistant answer text with markdown-like code and emphasis markers into React nodes'; No verified external callers; imports: .framework/src/lib/api.ts,.framework/src/components/ui/button.tsx,.framework/src/components/ui/textarea.tsx"]
|
|
124
124
|
// CIL[DOC-VECTOR type="blast_radius" content="No direct caller data from CIL graph; local impact only"]
|
|
@@ -126,12 +126,10 @@ function renderMarkdown(text: string): React.ReactNode[] {
|
|
|
126
126
|
// CIL[DOC-VECTOR type="constraint" content="Standard runtime; no special invariants documented"]
|
|
127
127
|
// CIL[DOC-VECTOR type="implementation_pattern" content="" status="pending_human_input"]
|
|
128
128
|
// CIL[DOC-VECTOR type="user_journey" content="" status="pending_human_input"]
|
|
129
|
-
// CIL[END stable_id="~/.framework/src/pages/admin/cil/CILAgentPage.tsx:renderMarkdown:function"]
|
|
130
129
|
|
|
131
130
|
|
|
132
131
|
|
|
133
132
|
|
|
134
|
-
// CIL[BEGIN stable_id="~/.framework/src/pages/admin/cil/CILAgentPage.tsx:MessageBubble:component" type="component" identity="MessageBubble" parent="~/.framework/src/pages/admin/cil/CILAgentPage.tsx"]
|
|
135
133
|
// CIL[DOC-MACRO purpose="Display a single chat message with avatar, markdown body, and optional tool and source chips"]
|
|
136
134
|
// CIL[DOC-RESPONSIBILITY responsibility="Render user or assistant message and link source chunks to the chunk detail page"]
|
|
137
135
|
// CIL[DOC-CONTEXT module=".framework/src/pages/admin/cil" layer="admin-ui" related_files=".framework/src/components/admin/PageInstructions.tsx,.framework/src/components/ui/badge.tsx,.framework/src/components/ui/button.tsx,.framework/src/components/ui/skeleton.tsx,.framework/src/components/ui/textarea.tsx,.framework/src/lib/api.ts,.framework/src/pages/admin/cil/CILAgentPage.tsx"]
|
|
@@ -140,6 +138,7 @@ function renderMarkdown(text: string): React.ReactNode[] {
|
|
|
140
138
|
// CIL[DOC-CONFIDENCE pass="second" score="0.90" flags="none"]
|
|
141
139
|
// CIL[DOC-STABILITY stability="stable"]
|
|
142
140
|
|
|
141
|
+
// CIL[BEGIN stable_id="~/.framework/src/pages/admin/cil/CILAgentPage.tsx:MessageBubble:component" type="component" identity="MessageBubble" parent="~/.framework/src/pages/admin/cil/CILAgentPage.tsx"]
|
|
143
142
|
function MessageBubble({ message, projectId, appPath }: {
|
|
144
143
|
message: Message
|
|
145
144
|
projectId: string
|
|
@@ -249,6 +248,7 @@ function MessageBubble({ message, projectId, appPath }: {
|
|
|
249
248
|
</div>
|
|
250
249
|
)
|
|
251
250
|
}
|
|
251
|
+
// CIL[END stable_id="~/.framework/src/pages/admin/cil/CILAgentPage.tsx:MessageBubble:component"]
|
|
252
252
|
|
|
253
253
|
// CIL[DOC-VECTOR type="context" content="purpose='Display a single chat message with avatar, markdown body, and optional tool and source chips'; No verified external callers; imports: .framework/src/lib/api.ts,.framework/src/components/ui/button.tsx,.framework/src/components/ui/textarea.tsx"]
|
|
254
254
|
// CIL[DOC-VECTOR type="blast_radius" content="No direct caller data from CIL graph; local impact only"]
|
|
@@ -256,11 +256,9 @@ function MessageBubble({ message, projectId, appPath }: {
|
|
|
256
256
|
// CIL[DOC-VECTOR type="constraint" content="Standard runtime; no special invariants documented"]
|
|
257
257
|
// CIL[DOC-VECTOR type="implementation_pattern" content="" status="pending_human_input"]
|
|
258
258
|
// CIL[DOC-VECTOR type="user_journey" content="" status="pending_human_input"]
|
|
259
|
-
// CIL[END stable_id="~/.framework/src/pages/admin/cil/CILAgentPage.tsx:MessageBubble:component"]
|
|
260
259
|
|
|
261
260
|
|
|
262
261
|
|
|
263
|
-
// CIL[BEGIN stable_id="~/.framework/src/pages/admin/cil/CILAgentPage.tsx:SUGGESTIONS:constant" type="constant" identity="SUGGESTIONS" parent="~/.framework/src/pages/admin/cil/CILAgentPage.tsx"]
|
|
264
262
|
// CIL[DOC-MACRO purpose="Preset example prompts for the CIL agent chat"]
|
|
265
263
|
// CIL[DOC-RESPONSIBILITY responsibility="Provide ready-made questions users can click to start a conversation"]
|
|
266
264
|
// CIL[DOC-CONTEXT module=".framework/src/pages/admin/cil" layer="admin-ui" related_files=".framework/src/components/admin/PageInstructions.tsx,.framework/src/components/ui/badge.tsx,.framework/src/components/ui/button.tsx,.framework/src/components/ui/skeleton.tsx,.framework/src/components/ui/textarea.tsx,.framework/src/lib/api.ts,.framework/src/pages/admin/cil/CILAgentPage.tsx"]
|
|
@@ -269,6 +267,7 @@ function MessageBubble({ message, projectId, appPath }: {
|
|
|
269
267
|
// CIL[DOC-CONFIDENCE pass="second" score="0.90" flags="none"]
|
|
270
268
|
// CIL[DOC-STABILITY stability="stable"]
|
|
271
269
|
|
|
270
|
+
// CIL[BEGIN stable_id="~/.framework/src/pages/admin/cil/CILAgentPage.tsx:SUGGESTIONS:constant" type="constant" identity="SUGGESTIONS" parent="~/.framework/src/pages/admin/cil/CILAgentPage.tsx"]
|
|
272
271
|
const SUGGESTIONS = [
|
|
273
272
|
'What does the authentication middleware do?',
|
|
274
273
|
'Which functions write to the embeddings table?',
|
|
@@ -277,6 +276,7 @@ const SUGGESTIONS = [
|
|
|
277
276
|
'Which chunks have no callers (potential dead code)?',
|
|
278
277
|
'Show me undocumented chunks in this project',
|
|
279
278
|
]
|
|
279
|
+
// CIL[END stable_id="~/.framework/src/pages/admin/cil/CILAgentPage.tsx:SUGGESTIONS:constant"]
|
|
280
280
|
|
|
281
281
|
// CIL[DOC-VECTOR type="context" content="purpose='Preset example prompts for the CIL agent chat'; No verified external callers; imports: .framework/src/lib/api.ts,.framework/src/components/ui/button.tsx,.framework/src/components/ui/textarea.tsx"]
|
|
282
282
|
// CIL[DOC-VECTOR type="blast_radius" content="No direct caller data from CIL graph; local impact only"]
|
|
@@ -284,9 +284,7 @@ const SUGGESTIONS = [
|
|
|
284
284
|
// CIL[DOC-VECTOR type="constraint" content="Standard runtime; no special invariants documented"]
|
|
285
285
|
// CIL[DOC-VECTOR type="implementation_pattern" content="" status="pending_human_input"]
|
|
286
286
|
// CIL[DOC-VECTOR type="user_journey" content="" status="pending_human_input"]
|
|
287
|
-
// CIL[END stable_id="~/.framework/src/pages/admin/cil/CILAgentPage.tsx:SUGGESTIONS:constant"]
|
|
288
287
|
|
|
289
|
-
// CIL[BEGIN stable_id="~/.framework/src/pages/admin/cil/CILAgentPage.tsx:mapRecordToMessage:function" type="function" identity="mapRecordToMessage" parent="~/.framework/src/pages/admin/cil/CILAgentPage.tsx"]
|
|
290
288
|
// CIL[DOC-MACRO purpose="Map a persisted thread message record into the chat display Message shape"]
|
|
291
289
|
// CIL[DOC-RESPONSIBILITY responsibility="Translate message_type, tool, and retrieved_sources fields from a messages row into a renderable Message"]
|
|
292
290
|
// CIL[DOC-CONTEXT module=".framework/src/pages/admin/cil" layer="admin-ui" related_files=".framework/src/pages/admin/cil/CILAgentPage.tsx"]
|
|
@@ -294,6 +292,7 @@ const SUGGESTIONS = [
|
|
|
294
292
|
// CIL[DOC-MICRO logic_summary="Derives role from message_type, sources from retrieved_sources, and surfaces tool name for tool_call/tool_result rows." notable_decisions="[]"]
|
|
295
293
|
// CIL[DOC-CONFIDENCE pass="second" score="0.90" flags="none"]
|
|
296
294
|
// CIL[DOC-STABILITY stability="stable"]
|
|
295
|
+
// CIL[BEGIN stable_id="~/.framework/src/pages/admin/cil/CILAgentPage.tsx:mapRecordToMessage:function" type="function" identity="mapRecordToMessage" parent="~/.framework/src/pages/admin/cil/CILAgentPage.tsx"]
|
|
297
296
|
function mapRecordToMessage(rec: any): Message {
|
|
298
297
|
const mt = rec?.data?.message_type || 'agent'
|
|
299
298
|
const role: Message['role'] = mt === 'human' ? 'user' : (mt === 'system' ? 'system' : 'assistant')
|
|
@@ -312,16 +311,19 @@ function mapRecordToMessage(rec: any): Message {
|
|
|
312
311
|
sources,
|
|
313
312
|
}
|
|
314
313
|
}
|
|
314
|
+
// CIL[END stable_id="~/.framework/src/pages/admin/cil/CILAgentPage.tsx:mapRecordToMessage:function"]
|
|
315
315
|
// CIL[DOC-VECTOR type="context" content="purpose='Map a persisted thread message record into the chat display Message shape'; imports: none"]
|
|
316
316
|
// CIL[DOC-VECTOR type="blast_radius" content="Local impact only; used by CILAgentPage.loadMessages"]
|
|
317
317
|
// CIL[DOC-VECTOR type="configuration" content="No environment or build configuration dependencies identified"]
|
|
318
318
|
// CIL[DOC-VECTOR type="constraint" content="Standard runtime; no special invariants documented"]
|
|
319
|
-
// CIL[END stable_id="~/.framework/src/pages/admin/cil/CILAgentPage.tsx:mapRecordToMessage:function"]
|
|
320
319
|
|
|
320
|
+
// CIL[BEGIN stable_id="~/.framework/src/pages/admin/cil/CILAgentPage.tsx:TERMINAL_STATUSES:constant" type="constant" identity="TERMINAL_STATUSES" parent="~/.framework/src/pages/admin/cil/CILAgentPage.tsx"]
|
|
321
321
|
const TERMINAL_STATUSES = ['complete', 'awaiting_input', 'failed']
|
|
322
|
+
// CIL[END stable_id="~/.framework/src/pages/admin/cil/CILAgentPage.tsx:TERMINAL_STATUSES:constant"]
|
|
323
|
+
// CIL[BEGIN stable_id="~/.framework/src/pages/admin/cil/CILAgentPage.tsx:MAX_STEPS:constant" type="constant" identity="MAX_STEPS" parent="~/.framework/src/pages/admin/cil/CILAgentPage.tsx"]
|
|
322
324
|
const MAX_STEPS = 20
|
|
325
|
+
// CIL[END stable_id="~/.framework/src/pages/admin/cil/CILAgentPage.tsx:MAX_STEPS:constant"]
|
|
323
326
|
|
|
324
|
-
// CIL[BEGIN stable_id="~/.framework/src/pages/admin/cil/CILAgentPage.tsx:CILAgentPage:component" type="component" identity="CILAgentPage" parent="~/.framework/src/pages/admin/cil/CILAgentPage.tsx"]
|
|
325
327
|
// CIL[DOC-MACRO purpose="Main admin page for the CIL agent chat"]
|
|
326
328
|
// CIL[DOC-RESPONSIBILITY responsibility="Manage chat state, call the CIL agent API, render messages, suggestions, and input"]
|
|
327
329
|
// CIL[DOC-CONTEXT module=".framework/src/pages/admin/cil" layer="admin-ui" related_files=".framework/src/components/admin/PageInstructions.tsx,.framework/src/components/ui/badge.tsx,.framework/src/components/ui/button.tsx,.framework/src/components/ui/skeleton.tsx,.framework/src/components/ui/textarea.tsx,.framework/src/lib/api.ts,.framework/src/pages/admin/cil/CILAgentPage.tsx"]
|
|
@@ -329,6 +331,7 @@ const MAX_STEPS = 20
|
|
|
329
331
|
// CIL[DOC-MICRO logic_summary="Fetches project title, scrolls to new messages, sends question to API, and renders conversation with suggestions." notable_decisions="[]"]
|
|
330
332
|
// CIL[DOC-CONFIDENCE pass="second" score="0.90" flags="none"]
|
|
331
333
|
// CIL[DOC-STABILITY stability="stable"]
|
|
334
|
+
// CIL[BEGIN stable_id="~/.framework/src/pages/admin/cil/CILAgentPage.tsx:CILAgentPage:component" type="component" identity="CILAgentPage" parent="~/.framework/src/pages/admin/cil/CILAgentPage.tsx"]
|
|
332
335
|
export default function CILAgentPage() {
|
|
333
336
|
const { id: projectId } = useParams<{ id: string }>()
|
|
334
337
|
const appPath = (path: string) => '/spine-framework/admin' + (path.startsWith('/') ? path : '/' + path)
|
|
@@ -497,17 +500,6 @@ export default function CILAgentPage() {
|
|
|
497
500
|
)}
|
|
498
501
|
</div>
|
|
499
502
|
</div>
|
|
500
|
-
|
|
501
|
-
<PageInstructions
|
|
502
|
-
description="Ask the CIL agent questions about the indexed codebase."
|
|
503
|
-
sections={[
|
|
504
|
-
{ title: 'What this page is for', content: 'Use this chat to ask natural-language questions about the indexed codebase. The agent searches chunk contracts and the call graph to answer accurately.' },
|
|
505
|
-
{ title: 'How to use this page', content: 'Type a question in the input and press Enter or click send. Select a suggested prompt to start quickly. The agent returns citations from chunks and may call tools.' },
|
|
506
|
-
{ title: 'How to interpret results', content: 'Assistant messages include source chunk references. Click a reference to open the chunk detail. No project ID means the search spans all indexed chunks.' },
|
|
507
|
-
{ title: 'Important notes', content: 'The agent only knows what has been ingested and embedded. Run the CIL ingestion pipeline first for fresh or missing code.' },
|
|
508
|
-
]}
|
|
509
|
-
/>
|
|
510
|
-
|
|
511
503
|
{}
|
|
512
504
|
<div className="flex-1 overflow-y-auto px-4 py-4 space-y-4">
|
|
513
505
|
{isEmpty && (
|
|
@@ -585,6 +577,7 @@ export default function CILAgentPage() {
|
|
|
585
577
|
</div>
|
|
586
578
|
)
|
|
587
579
|
}
|
|
580
|
+
// CIL[END stable_id="~/.framework/src/pages/admin/cil/CILAgentPage.tsx:CILAgentPage:component"]
|
|
588
581
|
|
|
589
582
|
// CIL[DOC-VECTOR type="context" content="purpose='Main admin page for the CIL agent chat'; No verified external callers; imports: .framework/src/lib/api.ts,.framework/src/components/ui/button.tsx,.framework/src/components/ui/textarea.tsx"]
|
|
590
583
|
// CIL[DOC-VECTOR type="blast_radius" content="No direct caller data from CIL graph; local impact only"]
|
|
@@ -592,4 +585,3 @@ export default function CILAgentPage() {
|
|
|
592
585
|
// CIL[DOC-VECTOR type="constraint" content="Standard runtime; no special invariants documented"]
|
|
593
586
|
// CIL[DOC-VECTOR type="implementation_pattern" content="" status="pending_human_input"]
|
|
594
587
|
// CIL[DOC-VECTOR type="user_journey" content="" status="pending_human_input"]
|
|
595
|
-
// CIL[END stable_id="~/.framework/src/pages/admin/cil/CILAgentPage.tsx:CILAgentPage:component"]
|