orchestrator-client 5.12.0 → 5.12.3
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/dist/index.cjs +139 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +71 -1
- package/dist/index.d.ts +71 -1
- package/dist/index.js +139 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,3 +1,38 @@
|
|
|
1
|
+
/** A single profile/memory entry (decrypted content). */
|
|
2
|
+
interface ProfileEntry {
|
|
3
|
+
id: number;
|
|
4
|
+
docType: "profile" | "memory";
|
|
5
|
+
content: string;
|
|
6
|
+
createdAt: string;
|
|
7
|
+
updatedAt: string;
|
|
8
|
+
}
|
|
9
|
+
/** Result of `GET /profiles/{userId}/entries`. */
|
|
10
|
+
interface ProfileEntryListResult {
|
|
11
|
+
entries: ProfileEntry[];
|
|
12
|
+
total: number;
|
|
13
|
+
}
|
|
14
|
+
/** Payload for `POST /profiles/{userId}/entries`. */
|
|
15
|
+
interface ProfileEntryCreatePayload {
|
|
16
|
+
docType: "profile" | "memory";
|
|
17
|
+
content: string;
|
|
18
|
+
}
|
|
19
|
+
/** Per-entry length in a usage listing. */
|
|
20
|
+
interface ProfileUsageEntry {
|
|
21
|
+
id: number;
|
|
22
|
+
length: number;
|
|
23
|
+
}
|
|
24
|
+
/** Result of `GET /profiles/{userId}/usage`. */
|
|
25
|
+
interface ProfileUsageResult {
|
|
26
|
+
usedChars: number;
|
|
27
|
+
maxChars: number;
|
|
28
|
+
entries: ProfileUsageEntry[];
|
|
29
|
+
}
|
|
30
|
+
/** Result of `DELETE /profiles/{userId}/entries/{entryId}`. */
|
|
31
|
+
interface ProfileEntryDeleteResult {
|
|
32
|
+
deleted: boolean;
|
|
33
|
+
entryId: number;
|
|
34
|
+
}
|
|
35
|
+
|
|
1
36
|
interface Pagination$1 {
|
|
2
37
|
currentPage: number;
|
|
3
38
|
perPage: number;
|
|
@@ -29,10 +64,11 @@ interface TaskSummary {
|
|
|
29
64
|
approvalReason: string;
|
|
30
65
|
ticketId: string | null;
|
|
31
66
|
availableTools: string[] | null;
|
|
32
|
-
/** Resolved skill references (name + description snapshot) at creation. */
|
|
67
|
+
/** Resolved skill references (name + description + user_id snapshot) at creation; user_id is null for system skills. */
|
|
33
68
|
skills: {
|
|
34
69
|
name: string;
|
|
35
70
|
description: string;
|
|
71
|
+
user_id: string | null;
|
|
36
72
|
}[] | null;
|
|
37
73
|
insight: string | null;
|
|
38
74
|
insightLocalized: string | null;
|
|
@@ -352,6 +388,7 @@ interface SlotInfo {
|
|
|
352
388
|
taskId: string | null;
|
|
353
389
|
lastActivity: string | null;
|
|
354
390
|
idleSeconds: number | null;
|
|
391
|
+
discoveredAt?: string | null;
|
|
355
392
|
}
|
|
356
393
|
interface SlotsStatus {
|
|
357
394
|
enabled: boolean;
|
|
@@ -359,6 +396,7 @@ interface SlotsStatus {
|
|
|
359
396
|
availableSlots: number;
|
|
360
397
|
slotTools: string[];
|
|
361
398
|
acquireTimeoutSeconds: number;
|
|
399
|
+
poolSource: string;
|
|
362
400
|
slots: SlotInfo[];
|
|
363
401
|
}
|
|
364
402
|
interface ConfigurationStatus {
|
|
@@ -483,6 +521,8 @@ interface SkillMapping {
|
|
|
483
521
|
interface Skill {
|
|
484
522
|
id: number;
|
|
485
523
|
name: string;
|
|
524
|
+
/** Owner: null = system skill, set = personal skill. */
|
|
525
|
+
user_id: string | null;
|
|
486
526
|
description: string;
|
|
487
527
|
content: string;
|
|
488
528
|
createdAt: string;
|
|
@@ -789,6 +829,23 @@ declare class OrchestratorAsync {
|
|
|
789
829
|
deleted: boolean;
|
|
790
830
|
mappingId: number;
|
|
791
831
|
}>;
|
|
832
|
+
listPersonalSkills(userId: string): Promise<SkillsListResult>;
|
|
833
|
+
createPersonalSkill(userId: string, payload: SkillCreatePayload): Promise<Skill>;
|
|
834
|
+
updatePersonalSkill(userId: string, skillName: string, payload: SkillUpdatePayload): Promise<Skill>;
|
|
835
|
+
deletePersonalSkill(userId: string, skillName: string): Promise<{
|
|
836
|
+
deleted: boolean;
|
|
837
|
+
skillId: number;
|
|
838
|
+
}>;
|
|
839
|
+
listProfileUsers(params?: {
|
|
840
|
+
query?: string;
|
|
841
|
+
limit?: number;
|
|
842
|
+
offset?: number;
|
|
843
|
+
}): Promise<string[]>;
|
|
844
|
+
listProfileEntries(userId: string, docType?: "profile" | "memory"): Promise<ProfileEntryListResult>;
|
|
845
|
+
getProfileUsage(userId: string, docType?: "profile" | "memory"): Promise<ProfileUsageResult>;
|
|
846
|
+
createProfileEntry(userId: string, payload: ProfileEntryCreatePayload): Promise<ProfileEntry>;
|
|
847
|
+
replaceProfileEntry(userId: string, entryId: number, content: string): Promise<ProfileEntry>;
|
|
848
|
+
deleteProfileEntry(userId: string, entryId: number): Promise<ProfileEntryDeleteResult>;
|
|
792
849
|
getWorkflowStates(): Promise<WorkflowStates>;
|
|
793
850
|
updateTaskModels(taskId: string, models: {
|
|
794
851
|
agentModelId?: string;
|
|
@@ -934,6 +991,19 @@ declare class Orchestrator {
|
|
|
934
991
|
deleted: boolean;
|
|
935
992
|
mappingId: number;
|
|
936
993
|
};
|
|
994
|
+
listPersonalSkills(userId: string): SkillsListResult;
|
|
995
|
+
createPersonalSkill(userId: string, payload: Parameters<OrchestratorAsync["createPersonalSkill"]>[1]): Skill;
|
|
996
|
+
updatePersonalSkill(userId: string, skillName: string, payload: Parameters<OrchestratorAsync["updatePersonalSkill"]>[2]): Skill;
|
|
997
|
+
deletePersonalSkill(userId: string, skillName: string): {
|
|
998
|
+
deleted: boolean;
|
|
999
|
+
skillId: number;
|
|
1000
|
+
};
|
|
1001
|
+
listProfileUsers(params?: Parameters<OrchestratorAsync["listProfileUsers"]>[0]): string[];
|
|
1002
|
+
listProfileEntries(userId: string, docType?: "profile" | "memory"): ProfileEntryListResult;
|
|
1003
|
+
getProfileUsage(userId: string, docType?: "profile" | "memory"): ProfileUsageResult;
|
|
1004
|
+
createProfileEntry(userId: string, payload: Parameters<OrchestratorAsync["createProfileEntry"]>[1]): ProfileEntry;
|
|
1005
|
+
replaceProfileEntry(userId: string, entryId: number, content: string): ProfileEntry;
|
|
1006
|
+
deleteProfileEntry(userId: string, entryId: number): ProfileEntryDeleteResult;
|
|
937
1007
|
getWorkflowStates(): WorkflowStates;
|
|
938
1008
|
updateTaskModels(taskId: string, models: {
|
|
939
1009
|
agentModelId?: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,38 @@
|
|
|
1
|
+
/** A single profile/memory entry (decrypted content). */
|
|
2
|
+
interface ProfileEntry {
|
|
3
|
+
id: number;
|
|
4
|
+
docType: "profile" | "memory";
|
|
5
|
+
content: string;
|
|
6
|
+
createdAt: string;
|
|
7
|
+
updatedAt: string;
|
|
8
|
+
}
|
|
9
|
+
/** Result of `GET /profiles/{userId}/entries`. */
|
|
10
|
+
interface ProfileEntryListResult {
|
|
11
|
+
entries: ProfileEntry[];
|
|
12
|
+
total: number;
|
|
13
|
+
}
|
|
14
|
+
/** Payload for `POST /profiles/{userId}/entries`. */
|
|
15
|
+
interface ProfileEntryCreatePayload {
|
|
16
|
+
docType: "profile" | "memory";
|
|
17
|
+
content: string;
|
|
18
|
+
}
|
|
19
|
+
/** Per-entry length in a usage listing. */
|
|
20
|
+
interface ProfileUsageEntry {
|
|
21
|
+
id: number;
|
|
22
|
+
length: number;
|
|
23
|
+
}
|
|
24
|
+
/** Result of `GET /profiles/{userId}/usage`. */
|
|
25
|
+
interface ProfileUsageResult {
|
|
26
|
+
usedChars: number;
|
|
27
|
+
maxChars: number;
|
|
28
|
+
entries: ProfileUsageEntry[];
|
|
29
|
+
}
|
|
30
|
+
/** Result of `DELETE /profiles/{userId}/entries/{entryId}`. */
|
|
31
|
+
interface ProfileEntryDeleteResult {
|
|
32
|
+
deleted: boolean;
|
|
33
|
+
entryId: number;
|
|
34
|
+
}
|
|
35
|
+
|
|
1
36
|
interface Pagination$1 {
|
|
2
37
|
currentPage: number;
|
|
3
38
|
perPage: number;
|
|
@@ -29,10 +64,11 @@ interface TaskSummary {
|
|
|
29
64
|
approvalReason: string;
|
|
30
65
|
ticketId: string | null;
|
|
31
66
|
availableTools: string[] | null;
|
|
32
|
-
/** Resolved skill references (name + description snapshot) at creation. */
|
|
67
|
+
/** Resolved skill references (name + description + user_id snapshot) at creation; user_id is null for system skills. */
|
|
33
68
|
skills: {
|
|
34
69
|
name: string;
|
|
35
70
|
description: string;
|
|
71
|
+
user_id: string | null;
|
|
36
72
|
}[] | null;
|
|
37
73
|
insight: string | null;
|
|
38
74
|
insightLocalized: string | null;
|
|
@@ -352,6 +388,7 @@ interface SlotInfo {
|
|
|
352
388
|
taskId: string | null;
|
|
353
389
|
lastActivity: string | null;
|
|
354
390
|
idleSeconds: number | null;
|
|
391
|
+
discoveredAt?: string | null;
|
|
355
392
|
}
|
|
356
393
|
interface SlotsStatus {
|
|
357
394
|
enabled: boolean;
|
|
@@ -359,6 +396,7 @@ interface SlotsStatus {
|
|
|
359
396
|
availableSlots: number;
|
|
360
397
|
slotTools: string[];
|
|
361
398
|
acquireTimeoutSeconds: number;
|
|
399
|
+
poolSource: string;
|
|
362
400
|
slots: SlotInfo[];
|
|
363
401
|
}
|
|
364
402
|
interface ConfigurationStatus {
|
|
@@ -483,6 +521,8 @@ interface SkillMapping {
|
|
|
483
521
|
interface Skill {
|
|
484
522
|
id: number;
|
|
485
523
|
name: string;
|
|
524
|
+
/** Owner: null = system skill, set = personal skill. */
|
|
525
|
+
user_id: string | null;
|
|
486
526
|
description: string;
|
|
487
527
|
content: string;
|
|
488
528
|
createdAt: string;
|
|
@@ -789,6 +829,23 @@ declare class OrchestratorAsync {
|
|
|
789
829
|
deleted: boolean;
|
|
790
830
|
mappingId: number;
|
|
791
831
|
}>;
|
|
832
|
+
listPersonalSkills(userId: string): Promise<SkillsListResult>;
|
|
833
|
+
createPersonalSkill(userId: string, payload: SkillCreatePayload): Promise<Skill>;
|
|
834
|
+
updatePersonalSkill(userId: string, skillName: string, payload: SkillUpdatePayload): Promise<Skill>;
|
|
835
|
+
deletePersonalSkill(userId: string, skillName: string): Promise<{
|
|
836
|
+
deleted: boolean;
|
|
837
|
+
skillId: number;
|
|
838
|
+
}>;
|
|
839
|
+
listProfileUsers(params?: {
|
|
840
|
+
query?: string;
|
|
841
|
+
limit?: number;
|
|
842
|
+
offset?: number;
|
|
843
|
+
}): Promise<string[]>;
|
|
844
|
+
listProfileEntries(userId: string, docType?: "profile" | "memory"): Promise<ProfileEntryListResult>;
|
|
845
|
+
getProfileUsage(userId: string, docType?: "profile" | "memory"): Promise<ProfileUsageResult>;
|
|
846
|
+
createProfileEntry(userId: string, payload: ProfileEntryCreatePayload): Promise<ProfileEntry>;
|
|
847
|
+
replaceProfileEntry(userId: string, entryId: number, content: string): Promise<ProfileEntry>;
|
|
848
|
+
deleteProfileEntry(userId: string, entryId: number): Promise<ProfileEntryDeleteResult>;
|
|
792
849
|
getWorkflowStates(): Promise<WorkflowStates>;
|
|
793
850
|
updateTaskModels(taskId: string, models: {
|
|
794
851
|
agentModelId?: string;
|
|
@@ -934,6 +991,19 @@ declare class Orchestrator {
|
|
|
934
991
|
deleted: boolean;
|
|
935
992
|
mappingId: number;
|
|
936
993
|
};
|
|
994
|
+
listPersonalSkills(userId: string): SkillsListResult;
|
|
995
|
+
createPersonalSkill(userId: string, payload: Parameters<OrchestratorAsync["createPersonalSkill"]>[1]): Skill;
|
|
996
|
+
updatePersonalSkill(userId: string, skillName: string, payload: Parameters<OrchestratorAsync["updatePersonalSkill"]>[2]): Skill;
|
|
997
|
+
deletePersonalSkill(userId: string, skillName: string): {
|
|
998
|
+
deleted: boolean;
|
|
999
|
+
skillId: number;
|
|
1000
|
+
};
|
|
1001
|
+
listProfileUsers(params?: Parameters<OrchestratorAsync["listProfileUsers"]>[0]): string[];
|
|
1002
|
+
listProfileEntries(userId: string, docType?: "profile" | "memory"): ProfileEntryListResult;
|
|
1003
|
+
getProfileUsage(userId: string, docType?: "profile" | "memory"): ProfileUsageResult;
|
|
1004
|
+
createProfileEntry(userId: string, payload: Parameters<OrchestratorAsync["createProfileEntry"]>[1]): ProfileEntry;
|
|
1005
|
+
replaceProfileEntry(userId: string, entryId: number, content: string): ProfileEntry;
|
|
1006
|
+
deleteProfileEntry(userId: string, entryId: number): ProfileEntryDeleteResult;
|
|
937
1007
|
getWorkflowStates(): WorkflowStates;
|
|
938
1008
|
updateTaskModels(taskId: string, models: {
|
|
939
1009
|
agentModelId?: string;
|
package/dist/index.js
CHANGED
|
@@ -94,10 +94,20 @@ function buildSkillMapping(m) {
|
|
|
94
94
|
requiredTool: m.requiredTool ?? m.required_tool ?? null
|
|
95
95
|
};
|
|
96
96
|
}
|
|
97
|
+
function buildProfileEntry(e) {
|
|
98
|
+
return {
|
|
99
|
+
id: e.id ?? 0,
|
|
100
|
+
docType: e.docType ?? e.doc_type ?? "memory",
|
|
101
|
+
content: e.content ?? "",
|
|
102
|
+
createdAt: e.createdAt ?? e.created_at ?? "",
|
|
103
|
+
updatedAt: e.updatedAt ?? e.updated_at ?? ""
|
|
104
|
+
};
|
|
105
|
+
}
|
|
97
106
|
function buildSkill(s) {
|
|
98
107
|
return {
|
|
99
108
|
id: s.id ?? 0,
|
|
100
109
|
name: s.name ?? "",
|
|
110
|
+
user_id: s.userId ?? s.user_id ?? null,
|
|
101
111
|
description: s.description ?? "",
|
|
102
112
|
content: s.content ?? "",
|
|
103
113
|
createdAt: s.createdAt ?? s.created_at ?? "",
|
|
@@ -933,6 +943,105 @@ var OrchestratorAsync = class {
|
|
|
933
943
|
};
|
|
934
944
|
}
|
|
935
945
|
// ------------------------------------------------------------------
|
|
946
|
+
// Personal skills (#789) — per-user ownership
|
|
947
|
+
// ------------------------------------------------------------------
|
|
948
|
+
async listPersonalSkills(userId) {
|
|
949
|
+
const data = await this._get(
|
|
950
|
+
`/profiles/${userId}/skills`
|
|
951
|
+
);
|
|
952
|
+
const skills = (data.skills ?? []).map(
|
|
953
|
+
(s) => buildSkill(s)
|
|
954
|
+
);
|
|
955
|
+
return {
|
|
956
|
+
skills,
|
|
957
|
+
total: data.total ?? skills.length
|
|
958
|
+
};
|
|
959
|
+
}
|
|
960
|
+
async createPersonalSkill(userId, payload) {
|
|
961
|
+
const data = await this._post(
|
|
962
|
+
`/profiles/${userId}/skills`,
|
|
963
|
+
payload
|
|
964
|
+
);
|
|
965
|
+
return buildSkill(data);
|
|
966
|
+
}
|
|
967
|
+
async updatePersonalSkill(userId, skillName, payload) {
|
|
968
|
+
const data = await this._put(
|
|
969
|
+
`/profiles/${userId}/skills/${skillName}`,
|
|
970
|
+
payload
|
|
971
|
+
);
|
|
972
|
+
return buildSkill(data);
|
|
973
|
+
}
|
|
974
|
+
async deletePersonalSkill(userId, skillName) {
|
|
975
|
+
const data = await this._delete(
|
|
976
|
+
`/profiles/${userId}/skills/${skillName}`
|
|
977
|
+
);
|
|
978
|
+
return {
|
|
979
|
+
deleted: data.deleted ?? false,
|
|
980
|
+
skillId: data.skillId ?? data.skill_id ?? 0
|
|
981
|
+
};
|
|
982
|
+
}
|
|
983
|
+
// ------------------------------------------------------------------
|
|
984
|
+
// Profile/memory entries (#788)
|
|
985
|
+
// ------------------------------------------------------------------
|
|
986
|
+
async listProfileUsers(params) {
|
|
987
|
+
const data = await this._get("/profiles/users", {
|
|
988
|
+
query: params?.query,
|
|
989
|
+
limit: params?.limit,
|
|
990
|
+
offset: params?.offset
|
|
991
|
+
});
|
|
992
|
+
return data ?? [];
|
|
993
|
+
}
|
|
994
|
+
async listProfileEntries(userId, docType) {
|
|
995
|
+
const data = await this._get(
|
|
996
|
+
`/profiles/${userId}/entries`,
|
|
997
|
+
docType ? { doc_type: docType } : void 0
|
|
998
|
+
);
|
|
999
|
+
const entries = (data.entries ?? []).map(
|
|
1000
|
+
(e) => buildProfileEntry(e)
|
|
1001
|
+
);
|
|
1002
|
+
return {
|
|
1003
|
+
entries,
|
|
1004
|
+
total: data.total ?? entries.length
|
|
1005
|
+
};
|
|
1006
|
+
}
|
|
1007
|
+
async getProfileUsage(userId, docType = "profile") {
|
|
1008
|
+
const data = await this._get(`/profiles/${userId}/usage`, { doc_type: docType });
|
|
1009
|
+
return {
|
|
1010
|
+
usedChars: data.usedChars ?? 0,
|
|
1011
|
+
maxChars: data.maxChars ?? 0,
|
|
1012
|
+
entries: (data.entries ?? []).map(
|
|
1013
|
+
(e) => ({
|
|
1014
|
+
id: e.id ?? 0,
|
|
1015
|
+
length: e.length ?? 0
|
|
1016
|
+
})
|
|
1017
|
+
)
|
|
1018
|
+
};
|
|
1019
|
+
}
|
|
1020
|
+
async createProfileEntry(userId, payload) {
|
|
1021
|
+
const data = await this._post(
|
|
1022
|
+
`/profiles/${userId}/entries`,
|
|
1023
|
+
{ doc_type: payload.docType, content: payload.content }
|
|
1024
|
+
);
|
|
1025
|
+
return buildProfileEntry(data);
|
|
1026
|
+
}
|
|
1027
|
+
async replaceProfileEntry(userId, entryId, content) {
|
|
1028
|
+
const data = await this._request(
|
|
1029
|
+
"PATCH",
|
|
1030
|
+
`/profiles/${userId}/entries/${entryId}`,
|
|
1031
|
+
{ jsonBody: { content } }
|
|
1032
|
+
);
|
|
1033
|
+
return buildProfileEntry(data);
|
|
1034
|
+
}
|
|
1035
|
+
async deleteProfileEntry(userId, entryId) {
|
|
1036
|
+
const data = await this._delete(
|
|
1037
|
+
`/profiles/${userId}/entries/${entryId}`
|
|
1038
|
+
);
|
|
1039
|
+
return {
|
|
1040
|
+
deleted: data.deleted ?? false,
|
|
1041
|
+
entryId: data.entryId ?? data.entry_id ?? 0
|
|
1042
|
+
};
|
|
1043
|
+
}
|
|
1044
|
+
// ------------------------------------------------------------------
|
|
936
1045
|
// Debug / Admin
|
|
937
1046
|
// ------------------------------------------------------------------
|
|
938
1047
|
async getWorkflowStates() {
|
|
@@ -1557,6 +1666,36 @@ var Orchestrator = class {
|
|
|
1557
1666
|
deleteSkillMapping(skillId, mappingId) {
|
|
1558
1667
|
return runSync(this._async.deleteSkillMapping(skillId, mappingId));
|
|
1559
1668
|
}
|
|
1669
|
+
listPersonalSkills(userId) {
|
|
1670
|
+
return runSync(this._async.listPersonalSkills(userId));
|
|
1671
|
+
}
|
|
1672
|
+
createPersonalSkill(userId, payload) {
|
|
1673
|
+
return runSync(this._async.createPersonalSkill(userId, payload));
|
|
1674
|
+
}
|
|
1675
|
+
updatePersonalSkill(userId, skillName, payload) {
|
|
1676
|
+
return runSync(this._async.updatePersonalSkill(userId, skillName, payload));
|
|
1677
|
+
}
|
|
1678
|
+
deletePersonalSkill(userId, skillName) {
|
|
1679
|
+
return runSync(this._async.deletePersonalSkill(userId, skillName));
|
|
1680
|
+
}
|
|
1681
|
+
listProfileUsers(params) {
|
|
1682
|
+
return runSync(this._async.listProfileUsers(params));
|
|
1683
|
+
}
|
|
1684
|
+
listProfileEntries(userId, docType) {
|
|
1685
|
+
return runSync(this._async.listProfileEntries(userId, docType));
|
|
1686
|
+
}
|
|
1687
|
+
getProfileUsage(userId, docType = "profile") {
|
|
1688
|
+
return runSync(this._async.getProfileUsage(userId, docType));
|
|
1689
|
+
}
|
|
1690
|
+
createProfileEntry(userId, payload) {
|
|
1691
|
+
return runSync(this._async.createProfileEntry(userId, payload));
|
|
1692
|
+
}
|
|
1693
|
+
replaceProfileEntry(userId, entryId, content) {
|
|
1694
|
+
return runSync(this._async.replaceProfileEntry(userId, entryId, content));
|
|
1695
|
+
}
|
|
1696
|
+
deleteProfileEntry(userId, entryId) {
|
|
1697
|
+
return runSync(this._async.deleteProfileEntry(userId, entryId));
|
|
1698
|
+
}
|
|
1560
1699
|
// ------------------------------------------------------------------
|
|
1561
1700
|
// Debug / Admin
|
|
1562
1701
|
// ------------------------------------------------------------------
|