Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
8 changes: 2 additions & 6 deletions .github/workflows/cortex-file-handler-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,6 @@ jobs:
- name: Setup GCS test environment
run: cp .env.test.gcs.ci .env.test.gcs

- name: Run GCS tests (includes Azure tests)
# test:gcs runs the complete AVA suite and owns emulator setup/cleanup.
- name: Run full test suite with storage emulators
run: npm run test:gcs

- name: Run tests
run: npm test
env:
NODE_ENV: test
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,6 @@ test-files/
**/tests/temp/*
**/src/files/*
test_output.log

# Locally packaged helper applications
helper-apps/*/dist/
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Cortex

See the [unreleased platform refresh and upgrade guide](docs/platform-refresh.md).

[![npm version](https://img.shields.io/npm/v/@aj-archipelago/cortex.svg)](https://www.npmjs.com/package/@aj-archipelago/cortex)
[![License: MIT](https://img.shields.io/badge/license-MIT-2f855a.svg)](LICENSE)
[![Node.js 20+](https://img.shields.io/badge/node-20%2B-2f855a.svg)](package.json)
Expand Down
44 changes: 34 additions & 10 deletions config.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,19 @@ var config = convict({
default: "oai-gpt4o",
env: "DEFAULT_MODEL_NAME",
},
cognitiveSearchIndexes: {
doc: "Logical search source names mapped to operator-owned Azure Search indexes.",
format: Object,
default: { wires: "idx-wires" },
},
cognitiveSearchFieldAliases: {
doc: "OData date-field aliases keyed by physical search index name.",
format: Object,
default: {
"idx-wires": { date_published: "date", date_modified: "date" },
indexcortex: { date_published: "date", date_modified: "updatedAt" },
},
},
modelRedirects: {
format: Object,
default: {
Expand All @@ -89,6 +102,18 @@ var config = convict({
default: "Jarvis",
env: "DEFAULT_ENTITY_NAME",
},
agentPermissionReview: {
enabled: { format: Boolean, default: false, env: "CORTEX_PERMISSION_REVIEW_ENABLED" },
model: { format: String, default: "oai-gpt56-luna", env: "CORTEX_PERMISSION_REVIEW_MODEL" },
policy: { format: String, default: "", env: "CORTEX_PERMISSION_REVIEW_POLICY" },
timeoutMs: { format: "nat", default: 8000, env: "CORTEX_PERMISSION_REVIEW_TIMEOUT_MS" },
maxReviews: { format: "nat", default: 32, env: "CORTEX_PERMISSION_REVIEW_MAX_REVIEWS" },
},
searchCacheEnabled: { format: Boolean, default: false, env: "CORTEX_SEARCH_CACHE_ENABLED" },
searchCacheRedisUrl: { format: String, default: "", env: "CORTEX_SEARCH_CACHE_REDIS_URL", sensitive: true },
searchCacheNamespace: { format: String, default: "", env: "CORTEX_SEARCH_CACHE_NAMESPACE" },
searchCacheTtlSeconds: { format: "nat", default: 300, env: "CORTEX_SEARCH_CACHE_TTL_SECONDS" },
searchCacheBraveStorageAllowed: { format: Boolean, default: false, env: "CORTEX_SEARCH_CACHE_BRAVE_STORAGE_ALLOWED" },
enableCache: {
format: Boolean,
default: true,
Expand Down Expand Up @@ -159,11 +184,10 @@ var config = convict({
default: null,
sensitive: true,
},
azureServicePrincipalCredentials: {
azureFoundryScope: {
format: String,
default: null,
env: "AZURE_SERVICE_PRINCIPAL_CREDENTIALS",
sensitive: true,
default: "https://ai.azure.com/.default",
env: "AZURE_FOUNDRY_SCOPE",
},
azureAuthTokenHelper: {
format: "*",
Expand Down Expand Up @@ -1342,12 +1366,12 @@ if (config.get("gcpServiceAccountKey")) {
config.set("gcpAuthTokenHelper", gcpAuthTokenHelper);
}

if (config.get("azureServicePrincipalCredentials")) {
const azureAuthTokenHelper = new AzureAuthTokenHelper(
config.getProperties(),
);
config.set("azureAuthTokenHelper", azureAuthTokenHelper);
}
// One Azure credential is shared by Foundry and ARM/ACI. App Service is pinned
// to managed identity; local development can resolve Azure CLI authentication.
const azureAuthTokenHelper = new AzureAuthTokenHelper(
config.getProperties(),
);
config.set("azureAuthTokenHelper", azureAuthTokenHelper);

// Load dynamic pathways from JSON file or cloud storage
const createDynamicPathwayManager = async (config, basePathway) => {
Expand Down
Loading
Loading