@subcortex-ai/sdk 0.1.2 → 0.2.0
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/README.md +1 -1
- package/dist/index.cjs +315 -85
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +207 -1
- package/dist/index.d.ts +207 -1
- package/dist/index.js +309 -85
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -517,6 +517,8 @@ interface RegisterPersonInput {
|
|
|
517
517
|
details?: string;
|
|
518
518
|
/** Confidence level */
|
|
519
519
|
confidence?: ConfidenceLevel | number;
|
|
520
|
+
/** Session ID for experience binding */
|
|
521
|
+
sessionId?: string;
|
|
520
522
|
}
|
|
521
523
|
/** Result of person registration */
|
|
522
524
|
interface RegisterPersonResult {
|
|
@@ -1053,6 +1055,7 @@ interface ComposedInstructions {
|
|
|
1053
1055
|
modelProvider: string;
|
|
1054
1056
|
modelId: string;
|
|
1055
1057
|
temperature: number;
|
|
1058
|
+
maxTokens: number;
|
|
1056
1059
|
voiceId: string;
|
|
1057
1060
|
}
|
|
1058
1061
|
/**
|
|
@@ -1287,6 +1290,197 @@ declare class IntakeNamespace {
|
|
|
1287
1290
|
/** Get intake processing stats for an agent. */
|
|
1288
1291
|
stats(agentId: string): Promise<IntakeStats>;
|
|
1289
1292
|
}
|
|
1293
|
+
interface Experience {
|
|
1294
|
+
id: string;
|
|
1295
|
+
tenant_id: string;
|
|
1296
|
+
agent_id: string | null;
|
|
1297
|
+
session_id: string;
|
|
1298
|
+
start_time: string;
|
|
1299
|
+
end_time: string | null;
|
|
1300
|
+
assertion_ids: string[];
|
|
1301
|
+
relationship_ids: string[];
|
|
1302
|
+
summary: string | null;
|
|
1303
|
+
topic: string | null;
|
|
1304
|
+
emotional_arc: string | null;
|
|
1305
|
+
}
|
|
1306
|
+
declare class ExperiencesNamespace {
|
|
1307
|
+
private http;
|
|
1308
|
+
private tenantId;
|
|
1309
|
+
constructor(http: HttpTransport, tenantId: string);
|
|
1310
|
+
/** List experiences, optionally filtered by subject. */
|
|
1311
|
+
list(input?: {
|
|
1312
|
+
subject?: string;
|
|
1313
|
+
limit?: number;
|
|
1314
|
+
tenantId?: string;
|
|
1315
|
+
}): Promise<Experience[]>;
|
|
1316
|
+
/** Get a single experience by ID. */
|
|
1317
|
+
get(experienceId: string, options?: {
|
|
1318
|
+
tenantId?: string;
|
|
1319
|
+
}): Promise<Experience>;
|
|
1320
|
+
}
|
|
1321
|
+
interface RecallResult {
|
|
1322
|
+
assertion_id: string;
|
|
1323
|
+
score: number;
|
|
1324
|
+
subject: string;
|
|
1325
|
+
predicate: string;
|
|
1326
|
+
snippet: string;
|
|
1327
|
+
}
|
|
1328
|
+
interface RecallSearchInput {
|
|
1329
|
+
query: string;
|
|
1330
|
+
limit?: number;
|
|
1331
|
+
tenantId?: string;
|
|
1332
|
+
}
|
|
1333
|
+
interface RecallSearchResponse {
|
|
1334
|
+
results: RecallResult[];
|
|
1335
|
+
total_hits: number;
|
|
1336
|
+
}
|
|
1337
|
+
declare class RecallNamespace {
|
|
1338
|
+
private http;
|
|
1339
|
+
private tenantId;
|
|
1340
|
+
constructor(http: HttpTransport, tenantId: string);
|
|
1341
|
+
/** BM25 full-text search across assertions. */
|
|
1342
|
+
search(input: RecallSearchInput): Promise<RecallSearchResponse>;
|
|
1343
|
+
}
|
|
1344
|
+
interface GraphPath {
|
|
1345
|
+
subjects: string[];
|
|
1346
|
+
total_confidence: number;
|
|
1347
|
+
length: number;
|
|
1348
|
+
}
|
|
1349
|
+
interface FindPathsInput {
|
|
1350
|
+
from: string;
|
|
1351
|
+
to: string;
|
|
1352
|
+
maxDepth?: number;
|
|
1353
|
+
minConfidence?: number;
|
|
1354
|
+
/** "shortest" | "highest_confidence" | "all" */
|
|
1355
|
+
strategy?: string;
|
|
1356
|
+
tenantId?: string;
|
|
1357
|
+
}
|
|
1358
|
+
interface TraversalNode {
|
|
1359
|
+
subject: string;
|
|
1360
|
+
depth: number;
|
|
1361
|
+
path_confidence: number;
|
|
1362
|
+
}
|
|
1363
|
+
interface TraversalResult {
|
|
1364
|
+
nodes: TraversalNode[];
|
|
1365
|
+
edge_count: number;
|
|
1366
|
+
depth_reached: number;
|
|
1367
|
+
truncated: boolean;
|
|
1368
|
+
}
|
|
1369
|
+
interface TraverseInput {
|
|
1370
|
+
startSubject: string;
|
|
1371
|
+
maxDepth?: number;
|
|
1372
|
+
relationshipTypes?: string[];
|
|
1373
|
+
minConfidence?: number;
|
|
1374
|
+
maxNodes?: number;
|
|
1375
|
+
tenantId?: string;
|
|
1376
|
+
}
|
|
1377
|
+
declare class GraphNamespace {
|
|
1378
|
+
private http;
|
|
1379
|
+
private tenantId;
|
|
1380
|
+
constructor(http: HttpTransport, tenantId: string);
|
|
1381
|
+
/** Find paths between two subjects. */
|
|
1382
|
+
findPaths(input: FindPathsInput): Promise<GraphPath[]>;
|
|
1383
|
+
/** BFS traversal from a starting subject. */
|
|
1384
|
+
traverse(input: TraverseInput): Promise<TraversalResult>;
|
|
1385
|
+
}
|
|
1386
|
+
interface TemporalSnapshot {
|
|
1387
|
+
subject: string;
|
|
1388
|
+
point: string;
|
|
1389
|
+
assertions: Assertion[];
|
|
1390
|
+
}
|
|
1391
|
+
interface TemporalRange {
|
|
1392
|
+
subject: string;
|
|
1393
|
+
start: string;
|
|
1394
|
+
end: string;
|
|
1395
|
+
assertions: Assertion[];
|
|
1396
|
+
}
|
|
1397
|
+
declare class TemporalNamespace {
|
|
1398
|
+
private http;
|
|
1399
|
+
private tenantId;
|
|
1400
|
+
constructor(http: HttpTransport, tenantId: string);
|
|
1401
|
+
/** Get assertions valid at a specific point in time. */
|
|
1402
|
+
at(subject: string, point: Date | string, options?: {
|
|
1403
|
+
tenantId?: string;
|
|
1404
|
+
}): Promise<TemporalSnapshot>;
|
|
1405
|
+
/** Get assertions within a date range. */
|
|
1406
|
+
range(subject: string, start: Date | string, end: Date | string, options?: {
|
|
1407
|
+
tenantId?: string;
|
|
1408
|
+
}): Promise<TemporalRange>;
|
|
1409
|
+
}
|
|
1410
|
+
interface SearchResult {
|
|
1411
|
+
assertion_id: string;
|
|
1412
|
+
similarity: number;
|
|
1413
|
+
}
|
|
1414
|
+
interface SemanticSearchInput {
|
|
1415
|
+
embedding: number[];
|
|
1416
|
+
topK?: number;
|
|
1417
|
+
tenantId?: string;
|
|
1418
|
+
}
|
|
1419
|
+
declare class SearchNamespace {
|
|
1420
|
+
private http;
|
|
1421
|
+
private tenantId;
|
|
1422
|
+
constructor(http: HttpTransport, tenantId: string);
|
|
1423
|
+
/** Semantic nearest-neighbor search over assertion embeddings. */
|
|
1424
|
+
semantic(input: SemanticSearchInput): Promise<SearchResult[]>;
|
|
1425
|
+
}
|
|
1426
|
+
interface CreateEntityInput {
|
|
1427
|
+
/** Entity name (used as the subject identifier, e.g. "Project") */
|
|
1428
|
+
name: string;
|
|
1429
|
+
/** Human-readable description */
|
|
1430
|
+
description?: string;
|
|
1431
|
+
/** Entity type classification (e.g. "model", "workflow", "reference") */
|
|
1432
|
+
type?: string;
|
|
1433
|
+
/** Override default tenant */
|
|
1434
|
+
tenantId?: string;
|
|
1435
|
+
}
|
|
1436
|
+
interface AddPropertyInput {
|
|
1437
|
+
/** Entity name this property belongs to */
|
|
1438
|
+
entityName: string;
|
|
1439
|
+
/** Property name */
|
|
1440
|
+
name: string;
|
|
1441
|
+
/** Property field type (e.g. "string", "number", "date", "boolean", "reference") */
|
|
1442
|
+
fieldType: string;
|
|
1443
|
+
/** Whether this property is required */
|
|
1444
|
+
required?: boolean;
|
|
1445
|
+
/** Override default tenant */
|
|
1446
|
+
tenantId?: string;
|
|
1447
|
+
}
|
|
1448
|
+
interface EntityDescription {
|
|
1449
|
+
subject: string;
|
|
1450
|
+
name: string;
|
|
1451
|
+
type: string | null;
|
|
1452
|
+
description: string | null;
|
|
1453
|
+
properties: Array<{
|
|
1454
|
+
name: string;
|
|
1455
|
+
fieldType: string | null;
|
|
1456
|
+
required: boolean;
|
|
1457
|
+
}>;
|
|
1458
|
+
relationships: Array<{
|
|
1459
|
+
type: string;
|
|
1460
|
+
target: string;
|
|
1461
|
+
confidence: number;
|
|
1462
|
+
}>;
|
|
1463
|
+
}
|
|
1464
|
+
declare class EntitiesNamespace {
|
|
1465
|
+
private http;
|
|
1466
|
+
private tenantId;
|
|
1467
|
+
constructor(http: HttpTransport, tenantId: string);
|
|
1468
|
+
/** Create an entity with optional description and type. */
|
|
1469
|
+
create(input: CreateEntityInput): Promise<Assertion>;
|
|
1470
|
+
/** Add a property to an entity. */
|
|
1471
|
+
addProperty(input: AddPropertyInput): Promise<{
|
|
1472
|
+
assertion: Assertion;
|
|
1473
|
+
relationship: Relationship;
|
|
1474
|
+
}>;
|
|
1475
|
+
/** Describe an entity by reconstructing its properties and relationships from assertions. */
|
|
1476
|
+
describe(entityName: string, options?: {
|
|
1477
|
+
tenantId?: string;
|
|
1478
|
+
}): Promise<EntityDescription>;
|
|
1479
|
+
/** List all entities for a tenant (subjects with entity: prefix that have a type predicate). */
|
|
1480
|
+
list(options?: {
|
|
1481
|
+
tenantId?: string;
|
|
1482
|
+
}): Promise<Assertion[]>;
|
|
1483
|
+
}
|
|
1290
1484
|
declare class SubCortexClient {
|
|
1291
1485
|
/** Assertion operations (low-level knowledge primitives) */
|
|
1292
1486
|
readonly assertions: AssertionsNamespace;
|
|
@@ -1302,6 +1496,18 @@ declare class SubCortexClient {
|
|
|
1302
1496
|
readonly users: UsersNamespace;
|
|
1303
1497
|
/** Emotional signals — record, query, and resolve */
|
|
1304
1498
|
readonly signals: SignalsNamespace;
|
|
1499
|
+
/** Graph queries — pathfinding and traversal */
|
|
1500
|
+
readonly graph: GraphNamespace;
|
|
1501
|
+
/** Temporal queries — point-in-time snapshots and range queries */
|
|
1502
|
+
readonly temporal: TemporalNamespace;
|
|
1503
|
+
/** Semantic search over assertion embeddings */
|
|
1504
|
+
readonly search: SearchNamespace;
|
|
1505
|
+
/** BM25 full-text recall search */
|
|
1506
|
+
readonly recall: RecallNamespace;
|
|
1507
|
+
/** Episodic memory — experiences grouped by session */
|
|
1508
|
+
readonly experiences: ExperiencesNamespace;
|
|
1509
|
+
/** Entity schema management — create, describe, and manage data models */
|
|
1510
|
+
readonly entities: EntitiesNamespace;
|
|
1305
1511
|
private readonly http;
|
|
1306
1512
|
constructor(options: SubCortexClientOptions);
|
|
1307
1513
|
/** Check SubCortex server health. */
|
|
@@ -1450,4 +1656,4 @@ declare class SubCortexTimeoutError extends SubCortexNetworkError {
|
|
|
1450
1656
|
constructor(timeoutMs: number);
|
|
1451
1657
|
}
|
|
1452
1658
|
|
|
1453
|
-
export { type AgentCapability, type AgentConfig, type AgentInstructions, type AgentMemoryPolicy, type AgentModelConfig, type AgentPersonality, AgentsNamespace, type Assertion, AssertionsNamespace, type BatchResult, CONTEXT_SCHEMA_VERSION, type CandidateAssertion, type ComposedInstructions, ConfidenceLevel, type ConfidenceScore, ConfidenceScores, type ConflictItem, type ConnectedPerson, type ContextFormat, type ContextFormatOptions, type CreateAgentInput, type CreateAssertionInput, type CreateRelationshipInput, EntityPredicate, EntityRelationship, EventPredicate, type HealthResponse, type IdentifyUserInput, IdentityPredicate, IntakeNamespace, type IntakeResponseItem, type IntakeResult, type IntakeStats, type IntakeSubmission, MULTI_VALUE_PREDICATES, MemoryNamespace, MemoryPredicate, NEGATIVE_SIGNALS, OrgRelationship, POSITIVE_SIGNALS, type PaginatedResponse, Predicates, type Provenance, RELATIONSHIP_LABELS, REVERSE_RELATIONSHIPS, RapportPredicate, type RecordRapportInput, type RecordSignalInput, type RegisterPersonInput, type RegisterPersonResult, type Relationship, RelationshipTypes, RelationshipsNamespace, type ResolveSignalInput, type RetryConfig, SIGNAL_DECAY_CONFIG, SYSTEM_SIGNAL_TYPES, type SignalEntry, type SignalQueryOptions, type SignalSnapshot, type SignalType, SignalsNamespace, type StoreMemoryInput, SubCortexAuthenticationError, SubCortexAuthorizationError, SubCortexClient, type SubCortexClientOptions, SubCortexConflictError, SubCortexError, SubCortexNetworkError, SubCortexNotFoundError, SubCortexRateLimitError, SubCortexServerError, SubCortexTimeoutError, SubCortexValidationError, SubjectPrefix, type SupersedeAssertionInput, type SystemSignalType, type TemporalBounds, type Trajectory, type UpdateAgentInput, type UserIdentification, type UserMemory, UsersNamespace, WorkPredicate, confidenceToScore, formatContext, getDecayHalfLife, isValidSignalType, scoreToConfidence, subject, toContextXml };
|
|
1659
|
+
export { type AddPropertyInput, type AgentCapability, type AgentConfig, type AgentInstructions, type AgentMemoryPolicy, type AgentModelConfig, type AgentPersonality, AgentsNamespace, type Assertion, AssertionsNamespace, type BatchResult, CONTEXT_SCHEMA_VERSION, type CandidateAssertion, type ComposedInstructions, ConfidenceLevel, type ConfidenceScore, ConfidenceScores, type ConflictItem, type ConnectedPerson, type ContextFormat, type ContextFormatOptions, type CreateAgentInput, type CreateAssertionInput, type CreateEntityInput, type CreateRelationshipInput, EntitiesNamespace, type EntityDescription, EntityPredicate, EntityRelationship, EventPredicate, type Experience, ExperiencesNamespace, type FindPathsInput, GraphNamespace, type GraphPath, type HealthResponse, type IdentifyUserInput, IdentityPredicate, IntakeNamespace, type IntakeResponseItem, type IntakeResult, type IntakeStats, type IntakeSubmission, MULTI_VALUE_PREDICATES, MemoryNamespace, MemoryPredicate, NEGATIVE_SIGNALS, OrgRelationship, POSITIVE_SIGNALS, type PaginatedResponse, Predicates, type Provenance, RELATIONSHIP_LABELS, REVERSE_RELATIONSHIPS, RapportPredicate, RecallNamespace, type RecallResult, type RecallSearchInput, type RecallSearchResponse, type RecordRapportInput, type RecordSignalInput, type RegisterPersonInput, type RegisterPersonResult, type Relationship, RelationshipTypes, RelationshipsNamespace, type ResolveSignalInput, type RetryConfig, SIGNAL_DECAY_CONFIG, SYSTEM_SIGNAL_TYPES, SearchNamespace, type SearchResult, type SemanticSearchInput, type SignalEntry, type SignalQueryOptions, type SignalSnapshot, type SignalType, SignalsNamespace, type StoreMemoryInput, SubCortexAuthenticationError, SubCortexAuthorizationError, SubCortexClient, type SubCortexClientOptions, SubCortexConflictError, SubCortexError, SubCortexNetworkError, SubCortexNotFoundError, SubCortexRateLimitError, SubCortexServerError, SubCortexTimeoutError, SubCortexValidationError, SubjectPrefix, type SupersedeAssertionInput, type SystemSignalType, type TemporalBounds, TemporalNamespace, type TemporalRange, type TemporalSnapshot, type Trajectory, type TraversalNode, type TraversalResult, type TraverseInput, type UpdateAgentInput, type UserIdentification, type UserMemory, UsersNamespace, WorkPredicate, confidenceToScore, formatContext, getDecayHalfLife, isValidSignalType, scoreToConfidence, subject, toContextXml };
|
package/dist/index.d.ts
CHANGED
|
@@ -517,6 +517,8 @@ interface RegisterPersonInput {
|
|
|
517
517
|
details?: string;
|
|
518
518
|
/** Confidence level */
|
|
519
519
|
confidence?: ConfidenceLevel | number;
|
|
520
|
+
/** Session ID for experience binding */
|
|
521
|
+
sessionId?: string;
|
|
520
522
|
}
|
|
521
523
|
/** Result of person registration */
|
|
522
524
|
interface RegisterPersonResult {
|
|
@@ -1053,6 +1055,7 @@ interface ComposedInstructions {
|
|
|
1053
1055
|
modelProvider: string;
|
|
1054
1056
|
modelId: string;
|
|
1055
1057
|
temperature: number;
|
|
1058
|
+
maxTokens: number;
|
|
1056
1059
|
voiceId: string;
|
|
1057
1060
|
}
|
|
1058
1061
|
/**
|
|
@@ -1287,6 +1290,197 @@ declare class IntakeNamespace {
|
|
|
1287
1290
|
/** Get intake processing stats for an agent. */
|
|
1288
1291
|
stats(agentId: string): Promise<IntakeStats>;
|
|
1289
1292
|
}
|
|
1293
|
+
interface Experience {
|
|
1294
|
+
id: string;
|
|
1295
|
+
tenant_id: string;
|
|
1296
|
+
agent_id: string | null;
|
|
1297
|
+
session_id: string;
|
|
1298
|
+
start_time: string;
|
|
1299
|
+
end_time: string | null;
|
|
1300
|
+
assertion_ids: string[];
|
|
1301
|
+
relationship_ids: string[];
|
|
1302
|
+
summary: string | null;
|
|
1303
|
+
topic: string | null;
|
|
1304
|
+
emotional_arc: string | null;
|
|
1305
|
+
}
|
|
1306
|
+
declare class ExperiencesNamespace {
|
|
1307
|
+
private http;
|
|
1308
|
+
private tenantId;
|
|
1309
|
+
constructor(http: HttpTransport, tenantId: string);
|
|
1310
|
+
/** List experiences, optionally filtered by subject. */
|
|
1311
|
+
list(input?: {
|
|
1312
|
+
subject?: string;
|
|
1313
|
+
limit?: number;
|
|
1314
|
+
tenantId?: string;
|
|
1315
|
+
}): Promise<Experience[]>;
|
|
1316
|
+
/** Get a single experience by ID. */
|
|
1317
|
+
get(experienceId: string, options?: {
|
|
1318
|
+
tenantId?: string;
|
|
1319
|
+
}): Promise<Experience>;
|
|
1320
|
+
}
|
|
1321
|
+
interface RecallResult {
|
|
1322
|
+
assertion_id: string;
|
|
1323
|
+
score: number;
|
|
1324
|
+
subject: string;
|
|
1325
|
+
predicate: string;
|
|
1326
|
+
snippet: string;
|
|
1327
|
+
}
|
|
1328
|
+
interface RecallSearchInput {
|
|
1329
|
+
query: string;
|
|
1330
|
+
limit?: number;
|
|
1331
|
+
tenantId?: string;
|
|
1332
|
+
}
|
|
1333
|
+
interface RecallSearchResponse {
|
|
1334
|
+
results: RecallResult[];
|
|
1335
|
+
total_hits: number;
|
|
1336
|
+
}
|
|
1337
|
+
declare class RecallNamespace {
|
|
1338
|
+
private http;
|
|
1339
|
+
private tenantId;
|
|
1340
|
+
constructor(http: HttpTransport, tenantId: string);
|
|
1341
|
+
/** BM25 full-text search across assertions. */
|
|
1342
|
+
search(input: RecallSearchInput): Promise<RecallSearchResponse>;
|
|
1343
|
+
}
|
|
1344
|
+
interface GraphPath {
|
|
1345
|
+
subjects: string[];
|
|
1346
|
+
total_confidence: number;
|
|
1347
|
+
length: number;
|
|
1348
|
+
}
|
|
1349
|
+
interface FindPathsInput {
|
|
1350
|
+
from: string;
|
|
1351
|
+
to: string;
|
|
1352
|
+
maxDepth?: number;
|
|
1353
|
+
minConfidence?: number;
|
|
1354
|
+
/** "shortest" | "highest_confidence" | "all" */
|
|
1355
|
+
strategy?: string;
|
|
1356
|
+
tenantId?: string;
|
|
1357
|
+
}
|
|
1358
|
+
interface TraversalNode {
|
|
1359
|
+
subject: string;
|
|
1360
|
+
depth: number;
|
|
1361
|
+
path_confidence: number;
|
|
1362
|
+
}
|
|
1363
|
+
interface TraversalResult {
|
|
1364
|
+
nodes: TraversalNode[];
|
|
1365
|
+
edge_count: number;
|
|
1366
|
+
depth_reached: number;
|
|
1367
|
+
truncated: boolean;
|
|
1368
|
+
}
|
|
1369
|
+
interface TraverseInput {
|
|
1370
|
+
startSubject: string;
|
|
1371
|
+
maxDepth?: number;
|
|
1372
|
+
relationshipTypes?: string[];
|
|
1373
|
+
minConfidence?: number;
|
|
1374
|
+
maxNodes?: number;
|
|
1375
|
+
tenantId?: string;
|
|
1376
|
+
}
|
|
1377
|
+
declare class GraphNamespace {
|
|
1378
|
+
private http;
|
|
1379
|
+
private tenantId;
|
|
1380
|
+
constructor(http: HttpTransport, tenantId: string);
|
|
1381
|
+
/** Find paths between two subjects. */
|
|
1382
|
+
findPaths(input: FindPathsInput): Promise<GraphPath[]>;
|
|
1383
|
+
/** BFS traversal from a starting subject. */
|
|
1384
|
+
traverse(input: TraverseInput): Promise<TraversalResult>;
|
|
1385
|
+
}
|
|
1386
|
+
interface TemporalSnapshot {
|
|
1387
|
+
subject: string;
|
|
1388
|
+
point: string;
|
|
1389
|
+
assertions: Assertion[];
|
|
1390
|
+
}
|
|
1391
|
+
interface TemporalRange {
|
|
1392
|
+
subject: string;
|
|
1393
|
+
start: string;
|
|
1394
|
+
end: string;
|
|
1395
|
+
assertions: Assertion[];
|
|
1396
|
+
}
|
|
1397
|
+
declare class TemporalNamespace {
|
|
1398
|
+
private http;
|
|
1399
|
+
private tenantId;
|
|
1400
|
+
constructor(http: HttpTransport, tenantId: string);
|
|
1401
|
+
/** Get assertions valid at a specific point in time. */
|
|
1402
|
+
at(subject: string, point: Date | string, options?: {
|
|
1403
|
+
tenantId?: string;
|
|
1404
|
+
}): Promise<TemporalSnapshot>;
|
|
1405
|
+
/** Get assertions within a date range. */
|
|
1406
|
+
range(subject: string, start: Date | string, end: Date | string, options?: {
|
|
1407
|
+
tenantId?: string;
|
|
1408
|
+
}): Promise<TemporalRange>;
|
|
1409
|
+
}
|
|
1410
|
+
interface SearchResult {
|
|
1411
|
+
assertion_id: string;
|
|
1412
|
+
similarity: number;
|
|
1413
|
+
}
|
|
1414
|
+
interface SemanticSearchInput {
|
|
1415
|
+
embedding: number[];
|
|
1416
|
+
topK?: number;
|
|
1417
|
+
tenantId?: string;
|
|
1418
|
+
}
|
|
1419
|
+
declare class SearchNamespace {
|
|
1420
|
+
private http;
|
|
1421
|
+
private tenantId;
|
|
1422
|
+
constructor(http: HttpTransport, tenantId: string);
|
|
1423
|
+
/** Semantic nearest-neighbor search over assertion embeddings. */
|
|
1424
|
+
semantic(input: SemanticSearchInput): Promise<SearchResult[]>;
|
|
1425
|
+
}
|
|
1426
|
+
interface CreateEntityInput {
|
|
1427
|
+
/** Entity name (used as the subject identifier, e.g. "Project") */
|
|
1428
|
+
name: string;
|
|
1429
|
+
/** Human-readable description */
|
|
1430
|
+
description?: string;
|
|
1431
|
+
/** Entity type classification (e.g. "model", "workflow", "reference") */
|
|
1432
|
+
type?: string;
|
|
1433
|
+
/** Override default tenant */
|
|
1434
|
+
tenantId?: string;
|
|
1435
|
+
}
|
|
1436
|
+
interface AddPropertyInput {
|
|
1437
|
+
/** Entity name this property belongs to */
|
|
1438
|
+
entityName: string;
|
|
1439
|
+
/** Property name */
|
|
1440
|
+
name: string;
|
|
1441
|
+
/** Property field type (e.g. "string", "number", "date", "boolean", "reference") */
|
|
1442
|
+
fieldType: string;
|
|
1443
|
+
/** Whether this property is required */
|
|
1444
|
+
required?: boolean;
|
|
1445
|
+
/** Override default tenant */
|
|
1446
|
+
tenantId?: string;
|
|
1447
|
+
}
|
|
1448
|
+
interface EntityDescription {
|
|
1449
|
+
subject: string;
|
|
1450
|
+
name: string;
|
|
1451
|
+
type: string | null;
|
|
1452
|
+
description: string | null;
|
|
1453
|
+
properties: Array<{
|
|
1454
|
+
name: string;
|
|
1455
|
+
fieldType: string | null;
|
|
1456
|
+
required: boolean;
|
|
1457
|
+
}>;
|
|
1458
|
+
relationships: Array<{
|
|
1459
|
+
type: string;
|
|
1460
|
+
target: string;
|
|
1461
|
+
confidence: number;
|
|
1462
|
+
}>;
|
|
1463
|
+
}
|
|
1464
|
+
declare class EntitiesNamespace {
|
|
1465
|
+
private http;
|
|
1466
|
+
private tenantId;
|
|
1467
|
+
constructor(http: HttpTransport, tenantId: string);
|
|
1468
|
+
/** Create an entity with optional description and type. */
|
|
1469
|
+
create(input: CreateEntityInput): Promise<Assertion>;
|
|
1470
|
+
/** Add a property to an entity. */
|
|
1471
|
+
addProperty(input: AddPropertyInput): Promise<{
|
|
1472
|
+
assertion: Assertion;
|
|
1473
|
+
relationship: Relationship;
|
|
1474
|
+
}>;
|
|
1475
|
+
/** Describe an entity by reconstructing its properties and relationships from assertions. */
|
|
1476
|
+
describe(entityName: string, options?: {
|
|
1477
|
+
tenantId?: string;
|
|
1478
|
+
}): Promise<EntityDescription>;
|
|
1479
|
+
/** List all entities for a tenant (subjects with entity: prefix that have a type predicate). */
|
|
1480
|
+
list(options?: {
|
|
1481
|
+
tenantId?: string;
|
|
1482
|
+
}): Promise<Assertion[]>;
|
|
1483
|
+
}
|
|
1290
1484
|
declare class SubCortexClient {
|
|
1291
1485
|
/** Assertion operations (low-level knowledge primitives) */
|
|
1292
1486
|
readonly assertions: AssertionsNamespace;
|
|
@@ -1302,6 +1496,18 @@ declare class SubCortexClient {
|
|
|
1302
1496
|
readonly users: UsersNamespace;
|
|
1303
1497
|
/** Emotional signals — record, query, and resolve */
|
|
1304
1498
|
readonly signals: SignalsNamespace;
|
|
1499
|
+
/** Graph queries — pathfinding and traversal */
|
|
1500
|
+
readonly graph: GraphNamespace;
|
|
1501
|
+
/** Temporal queries — point-in-time snapshots and range queries */
|
|
1502
|
+
readonly temporal: TemporalNamespace;
|
|
1503
|
+
/** Semantic search over assertion embeddings */
|
|
1504
|
+
readonly search: SearchNamespace;
|
|
1505
|
+
/** BM25 full-text recall search */
|
|
1506
|
+
readonly recall: RecallNamespace;
|
|
1507
|
+
/** Episodic memory — experiences grouped by session */
|
|
1508
|
+
readonly experiences: ExperiencesNamespace;
|
|
1509
|
+
/** Entity schema management — create, describe, and manage data models */
|
|
1510
|
+
readonly entities: EntitiesNamespace;
|
|
1305
1511
|
private readonly http;
|
|
1306
1512
|
constructor(options: SubCortexClientOptions);
|
|
1307
1513
|
/** Check SubCortex server health. */
|
|
@@ -1450,4 +1656,4 @@ declare class SubCortexTimeoutError extends SubCortexNetworkError {
|
|
|
1450
1656
|
constructor(timeoutMs: number);
|
|
1451
1657
|
}
|
|
1452
1658
|
|
|
1453
|
-
export { type AgentCapability, type AgentConfig, type AgentInstructions, type AgentMemoryPolicy, type AgentModelConfig, type AgentPersonality, AgentsNamespace, type Assertion, AssertionsNamespace, type BatchResult, CONTEXT_SCHEMA_VERSION, type CandidateAssertion, type ComposedInstructions, ConfidenceLevel, type ConfidenceScore, ConfidenceScores, type ConflictItem, type ConnectedPerson, type ContextFormat, type ContextFormatOptions, type CreateAgentInput, type CreateAssertionInput, type CreateRelationshipInput, EntityPredicate, EntityRelationship, EventPredicate, type HealthResponse, type IdentifyUserInput, IdentityPredicate, IntakeNamespace, type IntakeResponseItem, type IntakeResult, type IntakeStats, type IntakeSubmission, MULTI_VALUE_PREDICATES, MemoryNamespace, MemoryPredicate, NEGATIVE_SIGNALS, OrgRelationship, POSITIVE_SIGNALS, type PaginatedResponse, Predicates, type Provenance, RELATIONSHIP_LABELS, REVERSE_RELATIONSHIPS, RapportPredicate, type RecordRapportInput, type RecordSignalInput, type RegisterPersonInput, type RegisterPersonResult, type Relationship, RelationshipTypes, RelationshipsNamespace, type ResolveSignalInput, type RetryConfig, SIGNAL_DECAY_CONFIG, SYSTEM_SIGNAL_TYPES, type SignalEntry, type SignalQueryOptions, type SignalSnapshot, type SignalType, SignalsNamespace, type StoreMemoryInput, SubCortexAuthenticationError, SubCortexAuthorizationError, SubCortexClient, type SubCortexClientOptions, SubCortexConflictError, SubCortexError, SubCortexNetworkError, SubCortexNotFoundError, SubCortexRateLimitError, SubCortexServerError, SubCortexTimeoutError, SubCortexValidationError, SubjectPrefix, type SupersedeAssertionInput, type SystemSignalType, type TemporalBounds, type Trajectory, type UpdateAgentInput, type UserIdentification, type UserMemory, UsersNamespace, WorkPredicate, confidenceToScore, formatContext, getDecayHalfLife, isValidSignalType, scoreToConfidence, subject, toContextXml };
|
|
1659
|
+
export { type AddPropertyInput, type AgentCapability, type AgentConfig, type AgentInstructions, type AgentMemoryPolicy, type AgentModelConfig, type AgentPersonality, AgentsNamespace, type Assertion, AssertionsNamespace, type BatchResult, CONTEXT_SCHEMA_VERSION, type CandidateAssertion, type ComposedInstructions, ConfidenceLevel, type ConfidenceScore, ConfidenceScores, type ConflictItem, type ConnectedPerson, type ContextFormat, type ContextFormatOptions, type CreateAgentInput, type CreateAssertionInput, type CreateEntityInput, type CreateRelationshipInput, EntitiesNamespace, type EntityDescription, EntityPredicate, EntityRelationship, EventPredicate, type Experience, ExperiencesNamespace, type FindPathsInput, GraphNamespace, type GraphPath, type HealthResponse, type IdentifyUserInput, IdentityPredicate, IntakeNamespace, type IntakeResponseItem, type IntakeResult, type IntakeStats, type IntakeSubmission, MULTI_VALUE_PREDICATES, MemoryNamespace, MemoryPredicate, NEGATIVE_SIGNALS, OrgRelationship, POSITIVE_SIGNALS, type PaginatedResponse, Predicates, type Provenance, RELATIONSHIP_LABELS, REVERSE_RELATIONSHIPS, RapportPredicate, RecallNamespace, type RecallResult, type RecallSearchInput, type RecallSearchResponse, type RecordRapportInput, type RecordSignalInput, type RegisterPersonInput, type RegisterPersonResult, type Relationship, RelationshipTypes, RelationshipsNamespace, type ResolveSignalInput, type RetryConfig, SIGNAL_DECAY_CONFIG, SYSTEM_SIGNAL_TYPES, SearchNamespace, type SearchResult, type SemanticSearchInput, type SignalEntry, type SignalQueryOptions, type SignalSnapshot, type SignalType, SignalsNamespace, type StoreMemoryInput, SubCortexAuthenticationError, SubCortexAuthorizationError, SubCortexClient, type SubCortexClientOptions, SubCortexConflictError, SubCortexError, SubCortexNetworkError, SubCortexNotFoundError, SubCortexRateLimitError, SubCortexServerError, SubCortexTimeoutError, SubCortexValidationError, SubjectPrefix, type SupersedeAssertionInput, type SystemSignalType, type TemporalBounds, TemporalNamespace, type TemporalRange, type TemporalSnapshot, type Trajectory, type TraversalNode, type TraversalResult, type TraverseInput, type UpdateAgentInput, type UserIdentification, type UserMemory, UsersNamespace, WorkPredicate, confidenceToScore, formatContext, getDecayHalfLife, isValidSignalType, scoreToConfidence, subject, toContextXml };
|