@sema-agent/core
Version:
Stateless, task-oriented AI agent core
177 lines (176 loc) • 4.68 kB
JavaScript
export const HANDED_SESSION_VIEW = {
getMetadata: "read",
getLeafId: "read",
setLeafId: "write",
createEntryId: "read",
appendEntry: "write",
getEntry: "read",
findEntries: "read",
getLabel: "read",
getPathToRoot: "read",
getEntries: "read",
getFloorId: "read",
getReplayLoss: "read",
getEpochAnchor: "absent",
getResidence: "read",
getChildren: "absent",
isViewOf: "view",
};
const SESSION_STORE_VERBS = {
durability: "read",
fence: "read",
durableFence: "read",
transcriptDirectory: "read",
placements: "read",
acquire: "write",
touch: "write",
release: "write",
forget: "read",
pin: "read",
unpin: "read",
noteTaskRun: "read",
list: "read",
listPlaced: "read",
fork: "write",
headOf: "read",
readRow: "read",
register: "write",
recordOwner: "write",
logTransfer: { listEntryIds: "read", exportStream: "read", beginReplace: "write" },
delete: "write",
deleteUnreadable: "write",
size: "read",
dispose: "read",
};
const CHECKPOINT_STORE_VERBS = {
retention: "read",
durability: "read",
fidelity: "read",
fence: "read",
put: "write",
get: "read",
resolve: "write",
reopen: "write",
recordExecutionOutcome: "write",
setPendingSteer: "write",
expire: "write",
claimTerminal: "write",
reap: "write",
listByScope: "read",
listScopes: "read",
listOverdue: "read",
listBySession: "read",
deleteSessionCheckpoints: "write",
deleteUnreadableSessionCheckpoints: "write",
rekeyIdentity: "write",
};
const TOOL_RESULT_STORE_VERBS = {
retention: "read",
put: "write",
get: "read",
ownerOf: "read",
deleteBySession: "write",
reap: "write",
deleteUnattributable: "write",
listBySession: "read",
putBytes: "write",
bytesOf: "read",
rekeyIdentity: "write",
};
const SESSION_POLICY_STORE_VERBS = {
getRules: "read",
putRules: "write",
listBySession: "read",
deleteBySession: "write",
rekeyPrincipal: "write",
};
const WORKFLOW_JOURNAL_STORE_VERBS = {
load: "read",
append: "write",
locator: "read",
deleteRun: "write",
recordLaunch: "write",
loadLaunch: "read",
resumeClaim: "write",
releaseResumeClaim: "write",
stopResumeClaim: "write",
};
const USAGE_WINDOW_STORE_VERBS = {
charge: "write",
read: "read",
};
const BACKGROUND_AGENT_STORE_VERBS = {
put: "write",
get: "read",
update: "write",
updateIf: "write",
listBySession: "read",
listByScope: "read",
listByRoot: "read",
delete: "write",
settleErasure: "write",
deleteBySession: "write",
listScopes: "read",
reap: "write",
rekeyScope: "write",
};
const MAILBOX_STORE_VERBS = {
crossProcessSafe: "read",
identity: "read",
append: "write",
replayOf: "read",
claimLease: "write",
ack: "write",
moveDecision: "write",
releaseLease: "write",
peekCount: "read",
drop: "write",
reap: "write",
retireRecipient: "write",
listRetiredRecipients: "read",
};
const ROSTER_STORE_VERBS = {
record: "write",
resolve: "read",
list: "read",
releaseAgent: "write",
};
const FILE_HISTORY_STORE_VERBS = {
trackEdit: "write",
annulTrack: "write",
snapshot: "write",
restore: "write",
canRestore: "read",
readBoundaries: "read",
reap: "write",
deleteBySession: "write",
deleteUnreadableSessionHistory: "write",
adoptScope: "write",
exportHistory: "read",
importHistory: "write",
blobExchange: { put: "write", get: "read", has: "read" },
};
export const FILE_BACKEND_EXTRA_VERB_TABLES = {
sessionStore: { retention: "read", sweep: "read" },
checkpointStore: { close: "read", compactNow: "write", size: "read", testInjectFault: "read" },
toolResultStore: {},
sessionPolicyStore: {},
workflowJournalStore: { dispose: "read" },
usageWindowStore: {},
backgroundAgentStore: { close: "read", compactNow: "write", size: "read" },
mailboxStore: { close: "read" },
rosterStore: {},
fileHistoryStore: {},
};
export const FILE_BACKEND_VERB_TABLES = {
sessionStore: SESSION_STORE_VERBS,
checkpointStore: CHECKPOINT_STORE_VERBS,
toolResultStore: TOOL_RESULT_STORE_VERBS,
sessionPolicyStore: SESSION_POLICY_STORE_VERBS,
workflowJournalStore: WORKFLOW_JOURNAL_STORE_VERBS,
usageWindowStore: USAGE_WINDOW_STORE_VERBS,
backgroundAgentStore: BACKGROUND_AGENT_STORE_VERBS,
mailboxStore: MAILBOX_STORE_VERBS,
rosterStore: ROSTER_STORE_VERBS,
fileHistoryStore: FILE_HISTORY_STORE_VERBS,
};