spine-framework-cortex 0.2.21 → 0.2.23

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.
@@ -0,0 +1,98 @@
1
+ [
2
+ {
3
+ "name": "Support Triage Agent",
4
+ "description": "First-contact AI for inbound support tickets. Searches KB, reasons over prior cases, responds with confidence scoring. Hands off to Solution AI or human when confidence is low.",
5
+ "agent_type": "support",
6
+ "model_config": {
7
+ "model": "gpt-4o",
8
+ "temperature": 0.4,
9
+ "max_tokens": 1024
10
+ },
11
+ "system_prompt": "You are a helpful and empathetic support agent for a software platform. Your goal is to resolve customer issues accurately and efficiently on the first response.\n\nGuidelines:\n- Be concise and clear. Customers want answers, not essays.\n- If you find a relevant KB article or prior case, reference it.\n- If you are not confident (below 0.75), say so honestly and let the customer know a human will follow up.\n- Never fabricate feature behaviour or make promises about the product.\n- Tone: professional but warm. Match the customer's level of formality.",
12
+ "tools": [],
13
+ "capabilities": ["rag_search", "confidence_scoring", "escalation"],
14
+ "constraints": {
15
+ "max_context_tokens": 8000,
16
+ "never_reveal": ["internal_notes", "agent_ids", "prompt_config_ids"]
17
+ },
18
+ "metadata": {
19
+ "default_prompt_config_slug": "support_triage",
20
+ "owned_by": "cortex"
21
+ },
22
+ "ownership": "platform",
23
+ "is_system": true,
24
+ "is_active": true
25
+ },
26
+ {
27
+ "name": "Solution AI Agent",
28
+ "description": "Internal AI collaborator for support agents working a case. Searches KB, queries prior resolved cases, suggests diagnostic steps and response drafts. Never visible to customers.",
29
+ "agent_type": "support",
30
+ "model_config": {
31
+ "model": "gpt-4o",
32
+ "temperature": 0.5,
33
+ "max_tokens": 2048
34
+ },
35
+ "system_prompt": "You are an expert technical support advisor assisting a human support agent working a customer case. Your audience is the support agent, not the customer.\n\nYou can:\n- Search the knowledge base and surface relevant articles\n- Recall similar resolved cases and how they were fixed\n- Suggest diagnostic steps based on the symptoms described\n- Draft a proposed customer-facing response for the agent to review\n- Flag automation potential if this issue could be auto-resolved in future\n\nBe direct and practical. The agent needs actionable guidance, not hedged generalities.\nFormat your output clearly: use headers if helpful, bullet points for steps.",
36
+ "tools": [],
37
+ "capabilities": ["rag_search", "case_history_search", "response_drafting"],
38
+ "constraints": {
39
+ "visibility": "internal_only",
40
+ "max_context_tokens": 12000
41
+ },
42
+ "metadata": {
43
+ "default_prompt_config_slug": "solution_ai",
44
+ "owned_by": "cortex"
45
+ },
46
+ "ownership": "platform",
47
+ "is_system": true,
48
+ "is_active": true
49
+ },
50
+ {
51
+ "name": "Case Resolution Analysis Agent",
52
+ "description": "Post-resolution analyst. Given a closed ticket and its full conversation (including internal AI collaboration thread), produces a structured postmortem: root cause, diagnostic path, solution, automation potential, and KB candidacy flag.",
53
+ "agent_type": "analysis",
54
+ "model_config": {
55
+ "model": "gpt-4o",
56
+ "temperature": 0.2,
57
+ "max_tokens": 2048
58
+ },
59
+ "system_prompt": "You are a case analysis specialist. When given a resolved support ticket — including the customer conversation, the internal support-agent collaboration thread, and any escalation notes — you produce a structured postmortem.\n\nYour output must be a JSON object with these exact fields:\n- reported_issue: what the customer described (their words)\n- true_problem: the actual root cause (may differ significantly from how it was reported)\n- diagnostic_steps: ordered array of steps taken to identify the root cause\n- solution_steps: ordered array of steps taken to resolve it\n- final_solution: one-sentence concise answer\n- customer_temperature: 'positive' | 'neutral' | 'frustrated' | 'escalated'\n- time_to_resolution: estimated minutes from first message to resolution\n- escalation_required: boolean\n- back_and_forth_count: integer — number of customer messages\n- sentiment_progression: array of sentiment labels across the conversation\n- automation_potential: 'high' | 'medium' | 'low' — could this be auto-resolved next time?\n- kb_candidate: boolean — would a KB article have prevented this ticket?\n- suggested_tags: array of tag objects { slug, name, purpose, category, applicable_to }\n- confidence_score: 0.0-1.0\n- analysis_summary: 2-3 sentence plain English summary for the ticket record",
60
+ "tools": [],
61
+ "capabilities": ["structured_output", "sentiment_analysis", "case_classification"],
62
+ "constraints": {
63
+ "output_format": "json",
64
+ "max_context_tokens": 16000
65
+ },
66
+ "metadata": {
67
+ "default_prompt_config_slug": "case_analysis_prompt",
68
+ "owned_by": "cortex"
69
+ },
70
+ "ownership": "platform",
71
+ "is_system": true,
72
+ "is_active": true
73
+ },
74
+ {
75
+ "name": "KB Redaction Agent",
76
+ "description": "Prepares resolved cases for publication as KB articles. Identifies PII, account-specific details, internal references, and confidential data. Produces redaction suggestions and a generalised, customer-facing rewrite.",
77
+ "agent_type": "content",
78
+ "model_config": {
79
+ "model": "gpt-4o",
80
+ "temperature": 0.1,
81
+ "max_tokens": 3000
82
+ },
83
+ "system_prompt": "You are a knowledge base editorial agent. You receive the raw text of a resolved support case and must prepare it for public publication as a KB article.\n\nYour tasks:\n1. IDENTIFY all text that should be redacted before publishing. Categories:\n - pii: names, emails, phone numbers, addresses, usernames\n - account_specific: account names, account IDs, organisation-specific data\n - confidential: internal pricing, unreleased features, internal process details\n - internal_reference: ticket IDs, internal tool names, employee names\n\n2. GENERALISE the solution: rewrite the content to be universally applicable, removing all account-specific context while preserving the diagnostic and solution logic.\n\nOutput must be a JSON object:\n{\n \"original_content\": \"<the input text unchanged>\",\n \"redacted_content\": \"<fully redacted and generalised version>\",\n \"suggestions\": [\n {\n \"id\": \"<uuid>\",\n \"start_index\": <int>,\n \"end_index\": <int>,\n \"original_text\": \"<exact text to redact>\",\n \"redacted_text\": \"<replacement text, e.g. [Account Name]>\",\n \"sensitivity_level\": \"high|medium|low\",\n \"reasoning\": \"<one sentence why>\",\n \"category\": \"pii|confidential|account_specific|internal_reference\"\n }\n ],\n \"confidence_score\": 0.0-1.0,\n \"processing_metadata\": { \"model_used\": \"<model>\", \"temperature\": 0.1, \"tokens_consumed\": <int> }\n}",
84
+ "tools": [],
85
+ "capabilities": ["structured_output", "redaction", "content_generalisation"],
86
+ "constraints": {
87
+ "output_format": "json",
88
+ "max_context_tokens": 12000
89
+ },
90
+ "metadata": {
91
+ "default_prompt_config_slug": "kb_generator",
92
+ "owned_by": "cortex"
93
+ },
94
+ "ownership": "platform",
95
+ "is_system": true,
96
+ "is_active": true
97
+ }
98
+ ]
@@ -0,0 +1,29 @@
1
+ [
2
+ {
3
+ "name": "support_escalation",
4
+ "description": "Fired by agent-runner when triage confidence falls below threshold. Marks the thread as pending human review and notifies the support team.",
5
+ "trigger_type": "event",
6
+ "config": {
7
+ "event": "agent.inference.low_confidence",
8
+ "scope": "account"
9
+ },
10
+ "stages": [
11
+ {
12
+ "stage_type": "send_notification",
13
+ "config": {
14
+ "message": "A support ticket has been escalated to human review — confidence too low for AI response.",
15
+ "entity_type": "threads",
16
+ "entity_id_field": "thread_id",
17
+ "recipients": ["role:support_admin", "role:support"]
18
+ },
19
+ "continue_on_error": true
20
+ }
21
+ ],
22
+ "metadata": {
23
+ "note": "Thread escalation_status is already set to 'pending' by agent-runner before this pipeline fires. Ticket status is updated by the calling function (custom_support-triage) from agentMsg.data.escalated."
24
+ },
25
+ "ownership": "platform",
26
+ "is_system": true,
27
+ "is_active": true
28
+ }
29
+ ]
@@ -0,0 +1,84 @@
1
+ [
2
+ {
3
+ "name": "Support Triage",
4
+ "slug": "support_triage",
5
+ "context_template": "A customer has submitted the following support request:\n\n{{user_message}}\n\nReview the knowledge base articles and prior case history provided in your context. Respond helpfully and accurately. If you are not confident in your answer (below 0.75), set escalate=true.",
6
+ "is_multi_turn": true,
7
+ "max_history_messages": 20,
8
+ "confidence_threshold": 0.75,
9
+ "escalation_action": "pipeline",
10
+ "escalation_target": "support_escalation",
11
+ "output_mode": "json",
12
+ "knowledge_sources": [],
13
+ "available_tools": [],
14
+ "metadata": {
15
+ "knowledge_scope": ["kb_article", "resolved_case"],
16
+ "note": "knowledge_sources is resolved at runtime to the requesting account's KB + platform KB. Empty array = full scope search."
17
+ },
18
+ "ownership": "platform",
19
+ "is_system": true,
20
+ "is_active": true
21
+ },
22
+ {
23
+ "name": "Solution AI",
24
+ "slug": "solution_ai",
25
+ "context_template": "A support agent is working on the following case and needs your assistance:\n\nTicket: {{ticket_title}}\nCustomer issue: {{ticket_description}}\n\nConversation so far:\n{{conversation_history}}\n\nAgent question: {{user_message}}\n\nProvide practical, actionable guidance. If you can draft a suggested customer-facing response, include it under 'Suggested Response:'.",
26
+ "is_multi_turn": true,
27
+ "max_history_messages": 30,
28
+ "confidence_threshold": 0.0,
29
+ "escalation_action": null,
30
+ "escalation_target": null,
31
+ "output_mode": "text",
32
+ "knowledge_sources": [],
33
+ "available_tools": [],
34
+ "metadata": {
35
+ "visibility": "internal",
36
+ "knowledge_scope": ["kb_article", "resolved_case"],
37
+ "note": "No escalation — this agent assists human agents. confidence_threshold=0 disables auto-escalation."
38
+ },
39
+ "ownership": "platform",
40
+ "is_system": true,
41
+ "is_active": true
42
+ },
43
+ {
44
+ "name": "Case Analysis Prompt",
45
+ "slug": "case_analysis_prompt",
46
+ "context_template": "Analyze this resolved support ticket:\n\nTicket: {{ticket_title}}\nDescription: {{ticket_description}}\nCreated: {{created_at}}\nResolved: {{resolved_at}}\nStatus: {{status}}\nPriority: {{priority}}\n\nCustomer Conversation:\n{{conversation_history}}\n\nInternal Support Thread:\n{{internal_thread}}\n\nProduce a complete structured postmortem in the JSON format specified in your system prompt.",
47
+ "is_multi_turn": false,
48
+ "max_history_messages": 0,
49
+ "confidence_threshold": 0.0,
50
+ "escalation_action": null,
51
+ "escalation_target": null,
52
+ "output_mode": "json",
53
+ "knowledge_sources": [],
54
+ "available_tools": [],
55
+ "metadata": {
56
+ "requires_resolved_ticket": true,
57
+ "includes_internal_thread": true
58
+ },
59
+ "ownership": "platform",
60
+ "is_system": true,
61
+ "is_active": true
62
+ },
63
+ {
64
+ "name": "KB Generator",
65
+ "slug": "kb_generator",
66
+ "context_template": "Prepare the following resolved case content for KB publication:\n\n{{content}}\n\nIdentify all redactable text and produce a generalised, customer-facing version suitable for publishing as a public knowledge base article.",
67
+ "is_multi_turn": false,
68
+ "max_history_messages": 0,
69
+ "confidence_threshold": 0.0,
70
+ "escalation_action": null,
71
+ "escalation_target": null,
72
+ "output_mode": "json",
73
+ "requires_review": true,
74
+ "knowledge_sources": [],
75
+ "available_tools": [],
76
+ "metadata": {
77
+ "redaction_categories": ["pii", "confidential", "account_specific", "internal_reference"],
78
+ "auto_accept_sensitivity": ["high"]
79
+ },
80
+ "ownership": "platform",
81
+ "is_system": true,
82
+ "is_active": true
83
+ }
84
+ ]
package/LICENSE.md DELETED
@@ -1,193 +0,0 @@
1
- Spine Framework Internal Use License 1.0.0
2
- Source-available. Free for internal use. Commercial rights reserved.
3
-
4
- This license is based on the structure and intent of the PolyForm Internal Use License 1.0.0, but it has been modified for Spine Framework. This is not the unmodified PolyForm Internal Use License.
5
-
6
- Required Notice
7
- Required Notice: Copyright © 2026 Dahl Ventures Inc. All rights reserved.
8
-
9
- 1. Acceptance
10
- In order to receive any license under these terms, you must agree to these terms as both strict obligations and conditions to all licenses granted to you.
11
-
12
- If you do not agree to these terms, you do not have permission to use, copy, modify, run, install, access, or create works based on Spine Framework.
13
-
14
- 2. Definitions
15
- Software means Spine Framework, including its source code, object code, packages, modules, templates, schemas, migrations, configuration files, documentation, examples, command-line tools, SDKs, application packs, and related materials provided by the licensor.
16
-
17
- Licensor means the legal owner of Spine Framework.
18
-
19
- You means the individual or legal entity receiving the Software.
20
-
21
- Your Company means the legal entity on whose behalf you use the Software, including that entity's employees and authorized contractors.
22
-
23
- Internal Business Use means use of the Software solely inside Your Company for Your Company's own internal business operations, internal workflows, internal applications, internal data, internal users, and internal customers or accounts.
24
-
25
- Third Party means any person or legal entity other than You or Your Company.
26
-
27
- Commercial License means a separate written agreement signed by the Licensor that grants rights beyond this license.
28
-
29
- 3. Copyright License
30
- The Licensor grants You a copyright license to do everything with the Software that would otherwise infringe the Licensor's copyright, but only for Internal Business Use and only as permitted by these terms.
31
-
32
- You may install, run, access, evaluate, test, configure, and use the Software for Internal Business Use.
33
-
34
- You may copy the Software only as reasonably necessary for Internal Business Use, including backup, deployment, development, testing, staging, disaster recovery, and internal security review.
35
-
36
- You may not distribute the Software except as expressly allowed in these terms.
37
-
38
- 4. Changes and New Works
39
- The Licensor grants You a copyright license to modify the Software and create new works based on the Software, but only for Internal Business Use.
40
-
41
- You may create internal applications, extensions, workflows, integrations, automations, schemas, roles, agents, triggers, pipelines, dashboards, reports, and other internal business systems using the Software.
42
-
43
- You may not distribute, sell, sublicense, transfer, lease, rent, host for others, white-label, resell, or commercially exploit any modified version, derivative work, extension, application pack, template, or implementation of the Software except under a Commercial License.
44
-
45
- 5. Internal Contractors
46
- Your Company may allow employees and contractors to access and use the Software solely on behalf of Your Company and solely for Your Company's Internal Business Use.
47
-
48
- Contractors do not receive any independent right to use the Software for themselves, their other clients, their own products, or any Third Party.
49
-
50
- Your Company is responsible for all use of the Software by its employees, contractors, agents, and representatives.
51
-
52
- 6. Your Data and Application-Specific Work
53
- As between You and the Licensor, You own Your Company's data, records, content, prompts, business logic, customer records, internal workflows, and application-specific code that You independently create using the Software.
54
-
55
- These terms do not give the Licensor ownership of Your Company's data or independently created application-specific business content.
56
-
57
- However, ownership of Your Company's data or application-specific work does not give You the right to distribute, resell, white-label, host, or commercially exploit the Software or any portion of the Software except as allowed by these terms or a Commercial License.
58
-
59
- 7. Prohibited Uses
60
- You may not do any of the following without a Commercial License:
61
-
62
- Sell, resell, sublicense, rent, lease, lend, transfer, assign, publish, or distribute the Software.
63
- Offer the Software, or any modified version of the Software, to Third Parties as software, infrastructure, a framework, a platform, a service, or a hosted product.
64
- Offer the Software as SaaS, PaaS, IaaS, framework-as-a-service, backend-as-a-service, workflow-as-a-service, automation-as-a-service, AI-agent platform, managed service, support service, or similar commercial service.
65
- White-label, private-label, rebrand, or remove Spine Framework identity from the Software in order to provide it to Third Parties.
66
- Embed, bundle, package, or include the Software in any product, service, appliance, marketplace offering, application pack, starter kit, template library, SDK, CLI, distribution, or managed implementation made available to Third Parties.
67
- Use the Software to operate, power, support, or provide a product or service for Third Parties where those Third Parties receive access to the Software or to functionality substantially provided by the Software.
68
- Use the Software to build, operate, or improve a competing framework, platform, marketplace, application generator, agentic software infrastructure product, or commercial development infrastructure product.
69
- Provide implementation, consulting, hosting, support, customization, training, migration, or managed services for the Software to Third Parties as a paid or commercial offering, except as expressly authorized by the Licensor.
70
- Remove, alter, obscure, or bypass copyright notices, license notices, attribution, trademarks, branding, license keys, license checks, usage limits, or technical protection measures included in the Software.
71
- Use the Software in violation of law, regulation, third-party rights, or these terms.
72
- 8. Examples of Permitted Use
73
- The following are permitted under this license, provided they are solely for Internal Business Use:
74
-
75
- A company installs Spine Framework to build its own internal CRM.
76
- A company uses Spine Framework to operate an internal customer support portal for its own support team and its own customers.
77
- A company modifies Spine Framework for its internal workflows, roles, permissions, automations, pipelines, and integrations.
78
- A company lets its employees and authorized contractors configure, maintain, and support its internal Spine Framework installation.
79
- A company creates internal dashboards, agents, knowledge bases, audit trails, and operational tools on top of Spine Framework.
80
- 9. Examples Requiring a Commercial License
81
- The following are not permitted under this license and require a Commercial License:
82
-
83
- Selling Spine Framework or a modified version of Spine Framework.
84
- Offering Spine Framework as a hosted SaaS product.
85
- Offering a white-labeled application built on Spine Framework to customers.
86
- Packaging Spine Framework into a commercial starter kit, template, marketplace app, agency offering, or developer platform.
87
- Running Spine Framework for multiple clients as a managed service provider, agency, consultant, systems integrator, or outsourcing firm.
88
- Embedding Spine Framework into a product sold to customers.
89
- Forking Spine Framework to launch a competing framework, backend, app platform, AI-agent platform, or development infrastructure product.
90
- Publishing modified Spine Framework source code to a public repository.
91
- Giving a customer, client, partner, reseller, or affiliate a copy of Spine Framework.
92
- 10. Distribution
93
- You may not distribute the Software, modified versions of the Software, or works based on the Software to any Third Party except as expressly permitted by these terms or a Commercial License.
94
-
95
- You may share copies of the Software with employees and contractors of Your Company only as necessary for Internal Business Use and only if they are bound by obligations consistent with these terms.
96
-
97
- Any copy of the Software must include this license and all Required Notices.
98
-
99
- 11. Trademarks
100
- This license does not grant You any right to use the Licensor's names, trademarks, service marks, logos, product names, domain names, or branding except as necessary to identify the Software for Internal Business Use.
101
-
102
- You may not use Spine Framework branding in a way that suggests sponsorship, endorsement, partnership, certification, resale authorization, or commercial authorization without written permission from the Licensor.
103
-
104
- 12. Patent License
105
- The Licensor grants You a patent license for the Software that covers patent claims the Licensor can license, or later becomes able to license, that You would infringe by using the Software as permitted by these terms.
106
-
107
- 13. Patent Defense
108
- If You make any written claim that the Software infringes or contributes to infringement of any patent, Your patent license for the Software ends immediately.
109
-
110
- If Your Company makes such a claim, Your Company's patent license ends immediately.
111
-
112
- 14. Fair Use and Other Legal Rights
113
- You may have fair use, fair dealing, or other rights under applicable law. These terms do not limit rights that the law does not allow these terms to limit.
114
-
115
- 15. No Other Rights
116
- These terms do not allow You to sublicense, transfer, assign, or delegate any license granted under these terms except as expressly allowed here.
117
-
118
- These terms do not prevent the Licensor from granting licenses to anyone else.
119
-
120
- These terms do not imply any license other than the licenses expressly granted here.
121
-
122
- All rights not expressly granted are reserved by the Licensor.
123
-
124
- 16. Violations and Cure
125
- The first time You are notified in writing that You have violated these terms, or done anything with the Software not covered by these terms, Your licenses can continue if You:
126
-
127
- come into full compliance with these terms;
128
- take practical steps to correct past violations; and
129
- complete both within 32 days of receiving written notice.
130
- If You do not satisfy those requirements, all licenses granted to You under these terms end immediately.
131
-
132
- For any later violation, all licenses granted to You under these terms end immediately without any cure period.
133
-
134
- 17. Termination
135
- When Your licenses end, You must stop all use of the Software and destroy all copies of the Software in Your possession or control, except copies you are legally required to retain for archival, compliance, or legal purposes.
136
-
137
- Sections concerning ownership, prohibited uses, trademarks, patent defense, no other rights, violations, termination, no warranty, limitation of liability, and general terms survive termination.
138
-
139
- 18. No Warranty
140
- As far as the law allows, the Software is provided as is and as available, without any warranty or condition, express or implied.
141
-
142
- The Licensor disclaims all warranties and conditions, including warranties of merchantability, fitness for a particular purpose, title, non-infringement, availability, accuracy, security, and quiet enjoyment.
143
-
144
- 19. Limitation of Liability
145
- As far as the law allows, the Licensor will not be liable to You for any indirect, incidental, special, consequential, exemplary, punitive, or other damages arising out of these terms or the Software.
146
-
147
- As far as the law allows, the Licensor will not be liable for lost profits, lost revenue, lost savings, lost data, business interruption, security incidents, procurement of substitute services, or loss of goodwill.
148
-
149
- The Licensor's total liability arising out of these terms or the Software will not exceed the amount You paid the Licensor for the Software during the 12 months before the event giving rise to liability, or USD $100 if You paid nothing.
150
-
151
- 20. Commercial Licensing
152
- Rights not granted under this license may be available under a separate Commercial License from the Licensor.
153
-
154
- A Commercial License is required for resale, redistribution, SaaS, managed services, white-label use, OEM use, marketplace distribution, partner use, commercial hosting, commercial support offerings, or any use outside Internal Business Use.
155
-
156
- To request commercial rights, contact:
157
-
158
- spine-framework.com
159
- webmaster@spine-framework.com
160
- 21. License Updates
161
- The Licensor may publish updated versions of this license from time to time.
162
-
163
- Each release, package, download, or copy of the Software is governed by the license terms included with that release, package, download, or copy, unless You and the Licensor have signed a separate written agreement.
164
-
165
- Updated license terms apply only to future releases, downloads, packages, updates, upgrades, patches, hosted access, or other versions of the Software made available after the updated terms are published.
166
-
167
- The Licensor may require acceptance of updated license terms as a condition of receiving or using future releases, updates, hosted services, commercial features, support, documentation, marketplace access, license keys, portals, application packs, or other Spine Framework services.
168
-
169
- Nothing in this section gives You rights to continue using future versions of the Software under earlier license terms.
170
-
171
- 22. General Terms
172
- If any part of these terms is held unenforceable, the rest remains in effect as far as the law allows.
173
-
174
- Failure by the Licensor to enforce any term is not a waiver.
175
-
176
- Any waiver must be in writing and signed by the Licensor.
177
-
178
- These terms are the entire license terms for the Software unless You and the Licensor have signed a separate written agreement.
179
-
180
- 23. Plain-English Summary
181
- This summary is not part of the legal license.
182
-
183
- You may use Spine Framework inside your own company for your own internal business operations.
184
-
185
- You may modify Spine Framework for your own internal use.
186
-
187
- You may let your employees and contractors work on your internal Spine Framework installation.
188
-
189
- You may not sell it, redistribute it, white-label it, host it for others, offer it as SaaS, package it into another product, use it as a managed service offering, or use it to build a competing framework without a separate commercial license.
190
-
191
- Future versions, updates, services, support, portals, packs, license keys, and commercial features may require acceptance of updated terms.
192
-
193
- Spine Framework is source-available. It is not open source.
package/README.md DELETED
@@ -1,46 +0,0 @@
1
- # Spine Framework Cortex
2
-
3
- Cortex is an internal operations app for [Spine Framework](https://spine-framework.com). It provides a unified workspace for CRM, Support, Community, and Knowledge Base management.
4
-
5
- ## Features
6
-
7
- - **CRM** — Accounts, contacts, deals, health tracking, activity feed
8
- - **Support** — Ticket management and triage
9
- - **Community** — Community moderation and engagement
10
- - **Knowledge Base** — Article management, editor, and AI ingestion
11
- - **Courses** — Course catalog and management
12
- - **Intelligence** — AI-powered analytics and insights
13
- - **Operations** — Audit funnels, install funnels, operational dashboards
14
-
15
- ## Requirements
16
-
17
- - [Spine Framework](https://www.npmjs.com/package/spine-framework) `>=0.1.0`
18
-
19
- ## Installation
20
-
21
- ```bash
22
- npx spine-framework install-app spine-framework-cortex
23
- ```
24
-
25
- This will:
26
- 1. Copy app files to `custom/apps/cortex/`
27
- 2. Run any pending migrations
28
- 3. Seed roles, types, and link-types into the database
29
- 4. Register the app in `spine.config.json`
30
-
31
- ## Configuration
32
-
33
- After installation, edit `custom/apps/cortex/manifest.json` to configure:
34
-
35
- - `route_prefix` — where the app is served (default: `/cortex`)
36
- - `registration` — self-registration behaviour and account assignment
37
-
38
- To apply manifest changes to the database without reinstalling:
39
-
40
- ```bash
41
- npx spine-framework update-db-app cortex
42
- ```
43
-
44
- ## License
45
-
46
- See [LICENSE.md](./LICENSE.md)
@@ -1,35 +0,0 @@
1
- /**
2
- * Cortex Webhook Handler
3
- *
4
- * Convention: custom_*.ts files are assembled into /functions/
5
- * and loaded by integration-routes via: import('./custom_cortex-handler')
6
- *
7
- * Receives: (sanitizedData, context, event)
8
- * Returns: plain text or object
9
- */
10
- export default async function cortexHandler(
11
- data: Record<string, any>,
12
- ctx: {
13
- integrationId: string
14
- accountId: string
15
- slug: string
16
- principal: { id: string; type: string; accountId: string }
17
- requestId: string
18
- headers: Record<string, string>
19
- },
20
- event: {
21
- httpMethod: string
22
- headers: Record<string, string>
23
- body: any
24
- path: string
25
- queryStringParameters: Record<string, string>
26
- }
27
- ): Promise<string> {
28
- console.log(`[${ctx.requestId}] Cortex handler received:`, {
29
- testText: data['test-text'],
30
- integrationId: ctx.integrationId,
31
- accountId: ctx.accountId
32
- })
33
-
34
- return data['test-text']
35
- }