spine-framework-cortex 0.1.19 → 0.2.1
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/{functions/custom_cortex-handler.ts → api/cortex-handler.ts} +9 -9
- package/components/CliInstancesCard.tsx +144 -0
- package/components/CortexSidebar.tsx +27 -53
- package/hooks/useTypeRegistry.ts +74 -0
- package/index.tsx +13 -24
- package/manifest.json +1 -13
- package/package.json +11 -20
- package/pages/courses/CoursesPage.tsx +14 -4
- package/pages/crm/AccountDetailPage.tsx +149 -194
- package/pages/crm/ContactsPage.tsx +7 -7
- package/pages/intelligence/IntelligencePage.tsx +24 -31
- package/pages/kb/KBEditorPage.tsx +9 -2
- package/pages/operations/AuditFunnelPage.tsx +378 -0
- package/pages/operations/InstallFunnelPage.tsx +410 -0
- package/pages/operations/OperationsDashboard.tsx +275 -0
- package/pages/support/RedactionReview.tsx +11 -2
- package/seed/link-types.json +4 -42
- package/seed/package.json +27 -0
- package/seed/roles.json +1 -1
- package/seed/types.json +2711 -596
- package/CHANGELOG.md +0 -46
- package/LICENSE.md +0 -223
- package/README.md +0 -69
- package/functions/custom_anonymous-sessions.ts +0 -356
- package/functions/custom_case_analysis.ts +0 -507
- package/functions/custom_community-escalation.ts +0 -234
- package/functions/custom_cortex-chunks.ts +0 -52
- package/functions/custom_funnel-scoring.ts +0 -256
- package/functions/custom_funnel-signal.ts +0 -446
- package/functions/custom_funnel-timers.ts +0 -449
- package/functions/custom_kb-chunker-test.ts +0 -364
- package/functions/custom_kb-chunker.ts +0 -576
- package/functions/custom_kb-embeddings.ts +0 -481
- package/functions/custom_kb-ingestion.ts +0 -448
- package/functions/custom_support-triage.ts +0 -649
- package/functions/custom_tag_management.ts +0 -314
- package/functions/webhook-handlers.ts +0 -29
- package/lib/resolveTypeId.ts +0 -16
- package/pages/crm/ContactDetailPage.tsx +0 -184
- package/pages/ops/AuditFunnelPage.tsx +0 -191
- package/pages/ops/CommandCenterPage.tsx +0 -377
- package/pages/ops/InstallFunnelPage.tsx +0 -226
- package/seed/accounts.json +0 -9
- package/seed/integrations.json +0 -24
- package/seed/pipelines.json +0 -59
- package/seed/triggers.json +0 -125
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useState, useEffect, useCallback } from 'react'
|
|
2
|
-
import { resolveTypeId } from '../../lib/resolveTypeId'
|
|
3
2
|
import { useParams, useNavigate } from 'react-router-dom'
|
|
4
3
|
import { apiFetch } from '@core/lib/api'
|
|
4
|
+
import { getTypeIdAsync } from '../hooks/useTypeRegistry'
|
|
5
5
|
import { Button } from '@core/components/ui/button'
|
|
6
6
|
import { Badge } from '@core/components/ui/badge'
|
|
7
7
|
import { ScrollArea } from '@core/components/ui/scroll-area'
|
|
@@ -99,6 +99,7 @@ export default function RedactionReview() {
|
|
|
99
99
|
const [finalContent, setFinalContent] = useState('')
|
|
100
100
|
const [articleTitle, setArticleTitle] = useState('')
|
|
101
101
|
const [viewMode, setViewMode] = useState<'review' | 'final'>('review')
|
|
102
|
+
const [kbArticleTypeId, setKbArticleTypeId] = useState<string>('')
|
|
102
103
|
|
|
103
104
|
// Load ticket and trigger redaction analysis
|
|
104
105
|
useEffect(() => {
|
|
@@ -147,6 +148,11 @@ export default function RedactionReview() {
|
|
|
147
148
|
}
|
|
148
149
|
|
|
149
150
|
loadAndAnalyze()
|
|
151
|
+
|
|
152
|
+
// Load KB article type ID
|
|
153
|
+
getTypeIdAsync('kb_article').then(id => {
|
|
154
|
+
if (id) setKbArticleTypeId(id)
|
|
155
|
+
})
|
|
150
156
|
}, [id])
|
|
151
157
|
|
|
152
158
|
// Build content from ticket for analysis
|
|
@@ -234,10 +240,13 @@ export default function RedactionReview() {
|
|
|
234
240
|
// Publish KB article
|
|
235
241
|
const publishKB = async () => {
|
|
236
242
|
if (!id || !finalContent || !articleTitle) return
|
|
243
|
+
if (!kbArticleTypeId) {
|
|
244
|
+
console.error('KB article type not loaded')
|
|
245
|
+
return
|
|
246
|
+
}
|
|
237
247
|
|
|
238
248
|
setProcessing(true)
|
|
239
249
|
try {
|
|
240
|
-
const kbArticleTypeId = await resolveTypeId('kb_article')
|
|
241
250
|
// Create KB article
|
|
242
251
|
const kbRes = await apiFetch('/api/admin-data?action=create&entity=items', {
|
|
243
252
|
method: 'POST',
|
package/seed/link-types.json
CHANGED
|
@@ -1,52 +1,14 @@
|
|
|
1
1
|
[
|
|
2
2
|
{
|
|
3
|
-
"slug": "
|
|
4
|
-
"name": "
|
|
5
|
-
"description": "
|
|
6
|
-
"config": {
|
|
7
|
-
"source_type_slug": "account",
|
|
8
|
-
"target_type_slug": "item",
|
|
9
|
-
"relationship_type": "many-to-many",
|
|
10
|
-
"cardinality": "many-to-many"
|
|
11
|
-
},
|
|
12
|
-
"is_active": true
|
|
13
|
-
},
|
|
14
|
-
{
|
|
15
|
-
"slug": "account_signals",
|
|
16
|
-
"name": "Account Signals",
|
|
17
|
-
"description": "Links accounts to their funnel signals",
|
|
18
|
-
"config": {
|
|
19
|
-
"source_type_slug": "account",
|
|
20
|
-
"target_type_slug": "item",
|
|
21
|
-
"relationship_type": "many-to-many",
|
|
22
|
-
"cardinality": "many-to-many"
|
|
23
|
-
},
|
|
3
|
+
"slug": "tagged_with",
|
|
4
|
+
"name": "Tagged With",
|
|
5
|
+
"description": "Generic tag relationship between items",
|
|
24
6
|
"is_active": true
|
|
25
7
|
},
|
|
26
8
|
{
|
|
27
9
|
"slug": "analyzed_by",
|
|
28
10
|
"name": "Analyzed By",
|
|
29
|
-
"description": "
|
|
30
|
-
"config": {
|
|
31
|
-
"source_type_slug": "item",
|
|
32
|
-
"target_type_slug": "item",
|
|
33
|
-
"relationship_type": "many-to-many",
|
|
34
|
-
"forward_label": "analyzed by",
|
|
35
|
-
"reverse_label": "analysis of"
|
|
36
|
-
},
|
|
37
|
-
"is_active": true
|
|
38
|
-
},
|
|
39
|
-
{
|
|
40
|
-
"slug": "tagged_with",
|
|
41
|
-
"name": "Tagged With",
|
|
42
|
-
"description": "Entity tagged with a specific tag",
|
|
43
|
-
"config": {
|
|
44
|
-
"source_type_slug": "item",
|
|
45
|
-
"target_type_slug": "item",
|
|
46
|
-
"relationship_type": "many-to-many",
|
|
47
|
-
"forward_label": "tagged with",
|
|
48
|
-
"reverse_label": "applied to"
|
|
49
|
-
},
|
|
11
|
+
"description": "Item analyzed by another item (e.g., ticket analyzed by AI)",
|
|
50
12
|
"is_active": true
|
|
51
13
|
}
|
|
52
14
|
]
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "spine-framework-cortex",
|
|
3
|
+
"version": "0.2.1",
|
|
4
|
+
"private": false,
|
|
5
|
+
"description": "Cortex — AI-powered support, CRM, and knowledge base app for Spine Framework",
|
|
6
|
+
"keywords": ["spine-framework", "crm", "support", "knowledge-base", "community"],
|
|
7
|
+
"author": "Spine Team",
|
|
8
|
+
"license": "MIT",
|
|
9
|
+
"peerDependencies": {
|
|
10
|
+
"spine-framework": ">=0.1.0"
|
|
11
|
+
},
|
|
12
|
+
"files": [
|
|
13
|
+
"index.tsx",
|
|
14
|
+
"manifest.json",
|
|
15
|
+
"seed/",
|
|
16
|
+
"pages/",
|
|
17
|
+
"components/",
|
|
18
|
+
"api/",
|
|
19
|
+
"hooks/",
|
|
20
|
+
"README.md"
|
|
21
|
+
],
|
|
22
|
+
"spine": {
|
|
23
|
+
"app_slug": "cortex",
|
|
24
|
+
"entry_point": "./index.tsx",
|
|
25
|
+
"manifest": "./manifest.json"
|
|
26
|
+
}
|
|
27
|
+
}
|
package/seed/roles.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
{
|
|
3
3
|
"slug": "support",
|
|
4
4
|
"name": "Support",
|
|
5
|
-
"description": "Support agent with
|
|
5
|
+
"description": "Support agent with access to tickets, community moderation, and knowledge base management",
|
|
6
6
|
"permissions": ["*"],
|
|
7
7
|
"is_system": true,
|
|
8
8
|
"is_active": true,
|