@bpmsoftwaresolutions/ai-engine-client 1.1.103 → 1.1.105
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/package.json +1 -1
- package/src/client.js +4 -20
- package/src/domains/surface-groups.js +35 -0
- package/src/index.js +7 -1
- package/src/utils/task-binding.js +61 -2
package/package.json
CHANGED
package/src/client.js
CHANGED
|
@@ -11,16 +11,11 @@ import { createImplementationTasksDomain } from './domains/implementation-tasks.
|
|
|
11
11
|
import { createCurrentProjectDomain } from './domains/operator/current-project.js';
|
|
12
12
|
import { createGatewayDomain } from './domains/gateway.js';
|
|
13
13
|
import { createHealthDomain } from './domains/health.js';
|
|
14
|
-
import { createLogaDomain } from './domains/loga.js';
|
|
15
14
|
import { createNotesLabDomain } from './domains/notes-lab.js';
|
|
16
15
|
import { createCommunicationTicketsDomain } from './domains/communication-tickets.js';
|
|
17
16
|
import { createPortfolioDomain } from './domains/portfolio.js';
|
|
18
|
-
import { createProjectReportsDomain } from './domains/project-reports.js';
|
|
19
|
-
import { createProjectResumeDomain } from './domains/project-resume.js';
|
|
20
17
|
import { createGovernedImplementationDomain } from './domains/governed-implementation.js';
|
|
21
|
-
import { createProjectionsDomain } from './domains/projections.js';
|
|
22
18
|
import { createReportsDomain } from './domains/reports.js';
|
|
23
|
-
import { createRoadmapReportsDomain } from './domains/roadmap-reports.js';
|
|
24
19
|
import { createPerformanceDomain } from './domains/performance.js';
|
|
25
20
|
import { createImplementationArtifactsDomain } from './domains/implementation-artifacts.js';
|
|
26
21
|
import { createImplementationChecksDomain } from './domains/implementation-checks.js';
|
|
@@ -29,15 +24,10 @@ import { createImplementationGatesDomain } from './domains/implementation-gates.
|
|
|
29
24
|
import { createImplementationPacketsDomain } from './domains/implementation-packets.js';
|
|
30
25
|
import { createImplementationItemsDomain } from './domains/implementation-items.js';
|
|
31
26
|
import { createRepoDomain } from './domains/repo.js';
|
|
32
|
-
import { createProjectCharteringDomain } from './domains/project-chartering.js';
|
|
33
|
-
import { createProjectsDomain } from './domains/projects.js';
|
|
34
27
|
import { createRefactoringTransfersDomain } from './domains/refactoring-transfers.js';
|
|
35
28
|
import { createOperatorStatusDomain } from './domains/operator-status.js';
|
|
36
|
-
import { createRoadmapsDomain } from './domains/roadmaps.js';
|
|
37
29
|
import { createScriptDiscoveryDomain } from './domains/script-discovery.js';
|
|
38
30
|
import { createScriptsDomain } from './domains/scripts.js';
|
|
39
|
-
import { createRetrievalManagementDomain } from './domains/retrieval-management.js';
|
|
40
|
-
import { createRetrievalWrapperDomain } from './domains/retrieval-wrapper.js';
|
|
41
31
|
import { createSelfLearningDomain } from './domains/self-learning.js';
|
|
42
32
|
import { createSelfOptimizationDomain } from './domains/self-optimization.js';
|
|
43
33
|
import { createSkillGovernanceDomain } from './domains/skill-governance.js';
|
|
@@ -69,6 +59,7 @@ import { createToolRegistryDomain } from './domains/tool-registry.js';
|
|
|
69
59
|
import { createWorkflowCompositionDomain } from './domains/workflow-composition.js';
|
|
70
60
|
import { createWorkflowsDomain } from './domains/workflows.js';
|
|
71
61
|
import { createWarehouseDomain } from './domains/warehouse.js';
|
|
62
|
+
import { createLogaProjectionSurface, createProjectRoadmapSurface, createRetrievalSurface } from './domains/surface-groups.js';
|
|
72
63
|
import { installClientCompatibilityDelegates } from './compat/aliases.js';
|
|
73
64
|
import { buildHeaders, requestBinary, requestJson, requestLogaProjection, requestText, resolveAccessToken } from './transport/index.js';
|
|
74
65
|
import { cleanText, isPlainObject, trimTrailingSlash } from './utils/text.js';
|
|
@@ -97,10 +88,7 @@ export class AIEngineClient {
|
|
|
97
88
|
currentProject: createCurrentProjectDomain(this),
|
|
98
89
|
};
|
|
99
90
|
this.database = createDatabaseDomain(this);
|
|
100
|
-
this
|
|
101
|
-
this.projectChartering = createProjectCharteringDomain(this);
|
|
102
|
-
this.projectReports = createProjectReportsDomain(this);
|
|
103
|
-
this.projectResume = createProjectResumeDomain(this);
|
|
91
|
+
Object.assign(this, createProjectRoadmapSurface(this));
|
|
104
92
|
this.claims = createClaimsDomain(this);
|
|
105
93
|
this.sessionGovernance = createSessionGovernanceDomain(this);
|
|
106
94
|
this.executionEligibility = createExecutionEligibilityDomain(this);
|
|
@@ -113,8 +101,6 @@ export class AIEngineClient {
|
|
|
113
101
|
this.charters = createChartersDomain(this);
|
|
114
102
|
this.workStart = createWorkStartDomain(this);
|
|
115
103
|
this.governedImplementation = createGovernedImplementationDomain(this);
|
|
116
|
-
this.roadmaps = createRoadmapsDomain(this);
|
|
117
|
-
this.roadmapReports = createRoadmapReportsDomain(this);
|
|
118
104
|
this.implementationPackets = createImplementationPacketsDomain(this);
|
|
119
105
|
this.implementationItems = createImplementationItemsDomain(this);
|
|
120
106
|
this.implementationArtifacts = createImplementationArtifactsDomain(this);
|
|
@@ -129,9 +115,8 @@ export class AIEngineClient {
|
|
|
129
115
|
this.designIntelligence = createDesignIntelligenceDomain(this);
|
|
130
116
|
this.executionTelemetry = createExecutionTelemetryDomain(this);
|
|
131
117
|
this.performance = createPerformanceDomain(this);
|
|
132
|
-
this.retrievalWrapper = createRetrievalWrapperDomain(this);
|
|
133
118
|
this.repo = createRepoDomain(this);
|
|
134
|
-
this
|
|
119
|
+
Object.assign(this, createRetrievalSurface(this));
|
|
135
120
|
this.workflows = createWorkflowsDomain(this);
|
|
136
121
|
this.capabilities = createCapabilitiesDomain(this);
|
|
137
122
|
this.benchmarks = createBenchmarksDomain(this);
|
|
@@ -141,10 +126,9 @@ export class AIEngineClient {
|
|
|
141
126
|
this.searchContacts = createSearchContactsDomain(this);
|
|
142
127
|
this.notesLab = createNotesLabDomain(this);
|
|
143
128
|
this.portfolio = createPortfolioDomain(this);
|
|
144
|
-
this.loga = createLogaDomain(this);
|
|
145
129
|
this.scripts = createScriptsDomain(this);
|
|
146
130
|
this.reports = createReportsDomain(this);
|
|
147
|
-
this
|
|
131
|
+
Object.assign(this, createLogaProjectionSurface(this));
|
|
148
132
|
this.workflowComposition = createWorkflowCompositionDomain(this);
|
|
149
133
|
this.workflowComposition.searchCodeByIntent = (request) => this.searchCodeByIntent(request);
|
|
150
134
|
this.warehouse = createWarehouseDomain(this);
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { createLogaDomain } from './loga.js';
|
|
2
|
+
import { createProjectCharteringDomain } from './project-chartering.js';
|
|
3
|
+
import { createProjectReportsDomain } from './project-reports.js';
|
|
4
|
+
import { createProjectResumeDomain } from './project-resume.js';
|
|
5
|
+
import { createProjectsDomain } from './projects.js';
|
|
6
|
+
import { createProjectionsDomain } from './projections.js';
|
|
7
|
+
import { createRoadmapReportsDomain } from './roadmap-reports.js';
|
|
8
|
+
import { createRoadmapsDomain } from './roadmaps.js';
|
|
9
|
+
import { createRetrievalManagementDomain } from './retrieval-management.js';
|
|
10
|
+
import { createRetrievalWrapperDomain } from './retrieval-wrapper.js';
|
|
11
|
+
|
|
12
|
+
export function createProjectRoadmapSurface(client) {
|
|
13
|
+
return {
|
|
14
|
+
projects: createProjectsDomain(client),
|
|
15
|
+
projectChartering: createProjectCharteringDomain(client),
|
|
16
|
+
projectReports: createProjectReportsDomain(client),
|
|
17
|
+
projectResume: createProjectResumeDomain(client),
|
|
18
|
+
roadmaps: createRoadmapsDomain(client),
|
|
19
|
+
roadmapReports: createRoadmapReportsDomain(client),
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export function createLogaProjectionSurface(client) {
|
|
24
|
+
return {
|
|
25
|
+
loga: createLogaDomain(client),
|
|
26
|
+
projections: createProjectionsDomain(client),
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export function createRetrievalSurface(client) {
|
|
31
|
+
return {
|
|
32
|
+
retrievalWrapper: createRetrievalWrapperDomain(client),
|
|
33
|
+
retrievalManagement: createRetrievalManagementDomain(client),
|
|
34
|
+
};
|
|
35
|
+
}
|
package/src/index.js
CHANGED
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
export { AIEngineClient, createAIEngineClient } from './client.js';
|
|
2
|
-
export const AI_ENGINE_CLIENT_VERSION = '1.1.
|
|
2
|
+
export const AI_ENGINE_CLIENT_VERSION = '1.1.105';
|
|
3
3
|
export { GOVERNED_MUTATION_REQUIRED_CAPABILITIES, AI_ENGINE_CLIENT_CAPABILITIES, TASK_BOUND_SUBSTRATE_EXECUTION_POLICY } from './constants/governance.js';
|
|
4
|
+
export {
|
|
5
|
+
TASK_ACTION_VERB_REGISTRY,
|
|
6
|
+
acceptedLegacyTaskActions,
|
|
7
|
+
listTaskActionVerbInventory,
|
|
8
|
+
normalizeTaskActionVerb,
|
|
9
|
+
} from './utils/task-binding.js';
|
|
4
10
|
export { LOGA_CONTRACT, LOGA_INTERACTION_CONTRACT, LOGA_NAVIGATION_CONTRACT, LOGA_PROJECTION_WORKFLOW } from './constants/loga.js';
|
|
5
11
|
export {
|
|
6
12
|
AGENT_COMMUNICATION_CONTRACT_VERSION,
|
|
@@ -1,13 +1,72 @@
|
|
|
1
1
|
import { TASK_BOUND_SUBSTRATE_EXECUTION_POLICY } from '../constants/governance.js';
|
|
2
2
|
import { cleanList, cleanText, isPlainObject } from './text.js';
|
|
3
3
|
|
|
4
|
+
export const TASK_ACTION_VERB_REGISTRY = {
|
|
5
|
+
add_implementation_item_activity: {
|
|
6
|
+
surface: 'implementation_item_activity',
|
|
7
|
+
acceptedLegacyVerbs: ['record_implementation_item_activity'],
|
|
8
|
+
},
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
function buildTaskActionAliasIndex(registry) {
|
|
12
|
+
const aliasToCanonical = new Map();
|
|
13
|
+
const ambiguousAliases = new Set();
|
|
14
|
+
for (const [canonicalAction, entry] of Object.entries(registry)) {
|
|
15
|
+
for (const alias of cleanList(entry.acceptedLegacyVerbs)) {
|
|
16
|
+
const existing = aliasToCanonical.get(alias);
|
|
17
|
+
if (existing && existing !== canonicalAction) {
|
|
18
|
+
ambiguousAliases.add(alias);
|
|
19
|
+
continue;
|
|
20
|
+
}
|
|
21
|
+
aliasToCanonical.set(alias, canonicalAction);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
return { aliasToCanonical, ambiguousAliases };
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
const TASK_ACTION_ALIAS_INDEX = buildTaskActionAliasIndex(TASK_ACTION_VERB_REGISTRY);
|
|
28
|
+
|
|
29
|
+
export function listTaskActionVerbInventory() {
|
|
30
|
+
return Object.entries(TASK_ACTION_VERB_REGISTRY)
|
|
31
|
+
.sort(([left], [right]) => left.localeCompare(right))
|
|
32
|
+
.map(([canonicalAction, entry]) => ({
|
|
33
|
+
canonicalAction,
|
|
34
|
+
surface: cleanText(entry.surface),
|
|
35
|
+
acceptedLegacyVerbs: cleanList(entry.acceptedLegacyVerbs),
|
|
36
|
+
}));
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export function acceptedLegacyTaskActions(value = null) {
|
|
40
|
+
const canonicalActions = Array.isArray(value)
|
|
41
|
+
? cleanList(value).map((action) => normalizeTaskActionVerb(action)).filter(Boolean)
|
|
42
|
+
: Object.keys(TASK_ACTION_VERB_REGISTRY);
|
|
43
|
+
const canonicalSet = new Set(canonicalActions);
|
|
44
|
+
const legacyActions = [];
|
|
45
|
+
for (const [canonicalAction, entry] of Object.entries(TASK_ACTION_VERB_REGISTRY)) {
|
|
46
|
+
if (!canonicalSet.has(canonicalAction)) continue;
|
|
47
|
+
for (const alias of cleanList(entry.acceptedLegacyVerbs)) {
|
|
48
|
+
if (!legacyActions.includes(alias)) legacyActions.push(alias);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
return legacyActions;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export function normalizeTaskActionVerb(value) {
|
|
55
|
+
const text = cleanText(value);
|
|
56
|
+
if (!text) return null;
|
|
57
|
+
if (TASK_ACTION_ALIAS_INDEX.ambiguousAliases.has(text)) {
|
|
58
|
+
throw new Error(`Ambiguous task action alias "${text}"; promote or disambiguate the canonical verb registry.`);
|
|
59
|
+
}
|
|
60
|
+
return TASK_ACTION_ALIAS_INDEX.aliasToCanonical.get(text) || text;
|
|
61
|
+
}
|
|
62
|
+
|
|
4
63
|
export function normalizeTaskBindingPolicy(taskBinding, { expectedAction = null } = {}) {
|
|
5
64
|
if (!isPlainObject(taskBinding)) return taskBinding;
|
|
6
65
|
const taskId = cleanText(taskBinding.task_id || taskBinding.implementation_item_task_id);
|
|
7
66
|
const roadmapItemId = cleanText(taskBinding.roadmap_item_id || taskBinding.implementation_item_id);
|
|
8
67
|
const taskStatus = cleanText(taskBinding.task_status || taskBinding.status);
|
|
9
|
-
const allowedActions = cleanList(taskBinding.allowed_actions);
|
|
10
|
-
const substrateAction =
|
|
68
|
+
const allowedActions = cleanList(taskBinding.allowed_actions).map((action) => normalizeTaskActionVerb(action)).filter(Boolean);
|
|
69
|
+
const substrateAction = normalizeTaskActionVerb(taskBinding.substrate_action) || normalizeTaskActionVerb(expectedAction);
|
|
11
70
|
return {
|
|
12
71
|
...taskBinding,
|
|
13
72
|
...(taskId ? { task_id: taskId } : {}),
|