@sprucelabs/mercury-core-events 27.2.4 → 27.3.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/build/.spruce/events/events.contract.d.ts +10 -2
- package/build/.spruce/events/events.contract.js +2 -0
- package/build/.spruce/events/mercury/listLocations.v2020_12_25.contract.js +1 -1
- package/build/.spruce/events/mercury/listOrganizations.v2020_12_25.contract.js +1 -1
- package/build/.spruce/events/mercury/registerAgent.v2020_12_25.contract.d.ts +12 -0
- package/build/.spruce/events/mercury/registerAgent.v2020_12_25.contract.js +19 -0
- package/build/.spruce/events/mercury/updateLocation.v2020_12_25.contract.d.ts +0 -1
- package/build/.spruce/events/mercury/updateLocation.v2020_12_25.contract.js +0 -1
- package/build/.spruce/events/mercury/updateOrganization.v2020_12_25.contract.d.ts +0 -1
- package/build/.spruce/events/mercury/updateOrganization.v2020_12_25.contract.js +0 -1
- package/build/.spruce/permissions/permissions.types.d.ts +3 -0
- package/build/.spruce/schemas/mercury/v2020_12_25/agent.schema.d.ts +3 -0
- package/build/.spruce/schemas/mercury/v2020_12_25/agent.schema.js +31 -0
- package/build/.spruce/schemas/mercury/v2020_12_25/registerAgent.schema.d.ts +3 -0
- package/build/.spruce/schemas/mercury/v2020_12_25/registerAgent.schema.js +29 -0
- package/build/.spruce/schemas/mercury/v2020_12_25/registerAgentEmitPayload.schema.d.ts +3 -0
- package/build/.spruce/schemas/mercury/v2020_12_25/registerAgentEmitPayload.schema.js +23 -0
- package/build/.spruce/schemas/mercury/v2020_12_25/registerAgentEmitTarget.schema.d.ts +3 -0
- package/build/.spruce/schemas/mercury/v2020_12_25/registerAgentEmitTarget.schema.js +19 -0
- package/build/.spruce/schemas/mercury/v2020_12_25/registerAgentEmitTargetAndPayload.schema.d.ts +3 -0
- package/build/.spruce/schemas/mercury/v2020_12_25/registerAgentEmitTargetAndPayload.schema.js +36 -0
- package/build/.spruce/schemas/mercury/v2020_12_25/registerAgentResponsePayload.schema.d.ts +3 -0
- package/build/.spruce/schemas/mercury/v2020_12_25/registerAgentResponsePayload.schema.js +23 -0
- package/build/.spruce/schemas/mercury/v2020_12_25/sendMessageMessagePayload.schema.js +6 -0
- package/build/.spruce/schemas/schemas.types.d.ts +437 -251
- package/build/esm/.spruce/events/events.contract.d.ts +10 -2
- package/build/esm/.spruce/events/events.contract.js +2 -0
- package/build/esm/.spruce/events/mercury/listLocations.v2020_12_25.contract.js +1 -1
- package/build/esm/.spruce/events/mercury/listOrganizations.v2020_12_25.contract.js +1 -1
- package/build/esm/.spruce/events/mercury/registerAgent.v2020_12_25.contract.d.ts +12 -0
- package/build/esm/.spruce/events/mercury/registerAgent.v2020_12_25.contract.js +14 -0
- package/build/esm/.spruce/events/mercury/updateLocation.v2020_12_25.contract.d.ts +0 -1
- package/build/esm/.spruce/events/mercury/updateLocation.v2020_12_25.contract.js +0 -1
- package/build/esm/.spruce/events/mercury/updateOrganization.v2020_12_25.contract.d.ts +0 -1
- package/build/esm/.spruce/events/mercury/updateOrganization.v2020_12_25.contract.js +0 -1
- package/build/esm/.spruce/permissions/permissions.types.d.ts +3 -0
- package/build/esm/.spruce/schemas/mercury/v2020_12_25/agent.schema.d.ts +3 -0
- package/build/esm/.spruce/schemas/mercury/v2020_12_25/agent.schema.js +29 -0
- package/build/esm/.spruce/schemas/mercury/v2020_12_25/registerAgent.schema.d.ts +3 -0
- package/build/esm/.spruce/schemas/mercury/v2020_12_25/registerAgent.schema.js +27 -0
- package/build/esm/.spruce/schemas/mercury/v2020_12_25/registerAgentEmitPayload.schema.d.ts +3 -0
- package/build/esm/.spruce/schemas/mercury/v2020_12_25/registerAgentEmitPayload.schema.js +18 -0
- package/build/esm/.spruce/schemas/mercury/v2020_12_25/registerAgentEmitTarget.schema.d.ts +3 -0
- package/build/esm/.spruce/schemas/mercury/v2020_12_25/registerAgentEmitTarget.schema.js +17 -0
- package/build/esm/.spruce/schemas/mercury/v2020_12_25/registerAgentEmitTargetAndPayload.schema.d.ts +3 -0
- package/build/esm/.spruce/schemas/mercury/v2020_12_25/registerAgentEmitTargetAndPayload.schema.js +31 -0
- package/build/esm/.spruce/schemas/mercury/v2020_12_25/registerAgentResponsePayload.schema.d.ts +3 -0
- package/build/esm/.spruce/schemas/mercury/v2020_12_25/registerAgentResponsePayload.schema.js +18 -0
- package/build/esm/.spruce/schemas/mercury/v2020_12_25/sendMessageMessagePayload.schema.js +6 -0
- package/build/esm/.spruce/schemas/schemas.types.d.ts +437 -251
- package/package.json +7 -7
|
@@ -44,6 +44,7 @@ import { ListSkillsEventContract as MercuryListSkillsEventContract_v2020_12_25 }
|
|
|
44
44
|
import { LoginEventContract as MercuryLoginEventContract_v2020_12_25 } from './mercury/login.v2020_12_25.contract';
|
|
45
45
|
import { LogoutEventContract as MercuryLogoutEventContract_v2020_12_25 } from './mercury/logout.v2020_12_25.contract';
|
|
46
46
|
import { PublishSkillEventContract as MercuryPublishSkillEventContract_v2020_12_25 } from './mercury/publishSkill.v2020_12_25.contract';
|
|
47
|
+
import { RegisterAgentEventContract as MercuryRegisterAgentEventContract_v2020_12_25 } from './mercury/registerAgent.v2020_12_25.contract';
|
|
47
48
|
import { RegisterConversationTopicsEventContract as MercuryRegisterConversationTopicsEventContract_v2020_12_25 } from './mercury/registerConversationTopics.v2020_12_25.contract';
|
|
48
49
|
import { RegisterDeviceEventContract as MercuryRegisterDeviceEventContract_v2020_12_25 } from './mercury/registerDevice.v2020_12_25.contract';
|
|
49
50
|
import { RegisterEventsEventContract as MercuryRegisterEventsEventContract_v2020_12_25 } from './mercury/registerEvents.v2020_12_25.contract';
|
|
@@ -505,6 +506,14 @@ declare const _default: ({
|
|
|
505
506
|
responsePayloadSchema: import("@sprucelabs/mercury-types").SpruceSchemas.Mercury.v2020_12_25.PublishSkillResponsePayloadSchema;
|
|
506
507
|
};
|
|
507
508
|
};
|
|
509
|
+
} | {
|
|
510
|
+
eventSignatures: {
|
|
511
|
+
'register-agent::v2020_12_25': {
|
|
512
|
+
description: string;
|
|
513
|
+
emitPayloadSchema: import("@sprucelabs/mercury-types").SpruceSchemas.Mercury.v2020_12_25.RegisterAgentEmitTargetAndPayloadSchema;
|
|
514
|
+
responsePayloadSchema: import("@sprucelabs/mercury-types").SpruceSchemas.Mercury.v2020_12_25.RegisterAgentResponsePayloadSchema;
|
|
515
|
+
};
|
|
516
|
+
};
|
|
508
517
|
} | {
|
|
509
518
|
eventSignatures: {
|
|
510
519
|
'register-conversation-topics::v2020_12_25': {
|
|
@@ -732,7 +741,6 @@ declare const _default: ({
|
|
|
732
741
|
eventSignatures: {
|
|
733
742
|
'update-location::v2020_12_25': {
|
|
734
743
|
description: string;
|
|
735
|
-
aiInstructions: string;
|
|
736
744
|
emitPayloadSchema: import("@sprucelabs/mercury-types").SpruceSchemas.Mercury.v2020_12_25.UpdateLocationEmitTargetAndPayloadSchema;
|
|
737
745
|
responsePayloadSchema: import("@sprucelabs/mercury-types").SpruceSchemas.Mercury.v2020_12_25.UpdateLocationResponsePayloadSchema;
|
|
738
746
|
};
|
|
@@ -741,7 +749,6 @@ declare const _default: ({
|
|
|
741
749
|
eventSignatures: {
|
|
742
750
|
'update-organization::v2020_12_25': {
|
|
743
751
|
description: string;
|
|
744
|
-
aiInstructions: string;
|
|
745
752
|
emitPayloadSchema: import("@sprucelabs/mercury-types").SpruceSchemas.Mercury.v2020_12_25.UpdateOrganizationEmitTargetAndPayloadSchema;
|
|
746
753
|
responsePayloadSchema: import("@sprucelabs/mercury-types").SpruceSchemas.Mercury.v2020_12_25.UpdateOrgResponsePayloadSchema;
|
|
747
754
|
};
|
|
@@ -838,6 +845,7 @@ declare module '@sprucelabs/mercury-types/build/types/mercury.types' {
|
|
|
838
845
|
'login::v2020_12_25': MercuryLoginEventContract_v2020_12_25['eventSignatures']['login::v2020_12_25'];
|
|
839
846
|
'logout::v2020_12_25': MercuryLogoutEventContract_v2020_12_25['eventSignatures']['logout::v2020_12_25'];
|
|
840
847
|
'publish-skill::v2020_12_25': MercuryPublishSkillEventContract_v2020_12_25['eventSignatures']['publish-skill::v2020_12_25'];
|
|
848
|
+
'register-agent::v2020_12_25': MercuryRegisterAgentEventContract_v2020_12_25['eventSignatures']['register-agent::v2020_12_25'];
|
|
841
849
|
'register-conversation-topics::v2020_12_25': MercuryRegisterConversationTopicsEventContract_v2020_12_25['eventSignatures']['register-conversation-topics::v2020_12_25'];
|
|
842
850
|
'register-device::v2020_12_25': MercuryRegisterDeviceEventContract_v2020_12_25['eventSignatures']['register-device::v2020_12_25'];
|
|
843
851
|
'register-events::v2020_12_25': MercuryRegisterEventsEventContract_v2020_12_25['eventSignatures']['register-events::v2020_12_25'];
|
|
@@ -44,6 +44,7 @@ import mercuryListSkillsEventContract_v2020_12_25 from './mercury/listSkills.v20
|
|
|
44
44
|
import mercuryLoginEventContract_v2020_12_25 from './mercury/login.v2020_12_25.contract.js';
|
|
45
45
|
import mercuryLogoutEventContract_v2020_12_25 from './mercury/logout.v2020_12_25.contract.js';
|
|
46
46
|
import mercuryPublishSkillEventContract_v2020_12_25 from './mercury/publishSkill.v2020_12_25.contract.js';
|
|
47
|
+
import mercuryRegisterAgentEventContract_v2020_12_25 from './mercury/registerAgent.v2020_12_25.contract.js';
|
|
47
48
|
import mercuryRegisterConversationTopicsEventContract_v2020_12_25 from './mercury/registerConversationTopics.v2020_12_25.contract.js';
|
|
48
49
|
import mercuryRegisterDeviceEventContract_v2020_12_25 from './mercury/registerDevice.v2020_12_25.contract.js';
|
|
49
50
|
import mercuryRegisterEventsEventContract_v2020_12_25 from './mercury/registerEvents.v2020_12_25.contract.js';
|
|
@@ -122,6 +123,7 @@ export default [
|
|
|
122
123
|
mercuryLoginEventContract_v2020_12_25,
|
|
123
124
|
mercuryLogoutEventContract_v2020_12_25,
|
|
124
125
|
mercuryPublishSkillEventContract_v2020_12_25,
|
|
126
|
+
mercuryRegisterAgentEventContract_v2020_12_25,
|
|
125
127
|
mercuryRegisterConversationTopicsEventContract_v2020_12_25,
|
|
126
128
|
mercuryRegisterDeviceEventContract_v2020_12_25,
|
|
127
129
|
mercuryRegisterEventsEventContract_v2020_12_25,
|
|
@@ -6,7 +6,7 @@ const listLocationsEventContract = buildEventContract({
|
|
|
6
6
|
eventSignatures: {
|
|
7
7
|
'list-locations::v2020_12_25': {
|
|
8
8
|
description: `Look through all locations.`,
|
|
9
|
-
aiInstructions: `Lists all locations. It can be useful to ask if the user if they want to filter by organization and if so, have them select one first (list-organizations event).`,
|
|
9
|
+
aiInstructions: `Lists all locations. It can be useful to ask if the user if they want to filter by organization and if so, have them select one first (list-organizations event). If only 1 location comes back, you can autoselect it.`,
|
|
10
10
|
emitPayloadSchema: listLocationsEmitTargetAndPayloadSchema,
|
|
11
11
|
responsePayloadSchema: listLocationsResponsePayloadSchema,
|
|
12
12
|
}
|
|
@@ -6,7 +6,7 @@ const listOrganizationsEventContract = buildEventContract({
|
|
|
6
6
|
eventSignatures: {
|
|
7
7
|
'list-organizations::v2020_12_25': {
|
|
8
8
|
description: `Look through all organizations.`,
|
|
9
|
-
aiInstructions: `Lists all organizations. You can ignore the target for this event as the payload is where all the useful filters are for our use cases.`,
|
|
9
|
+
aiInstructions: `Lists all organizations. You can ignore the target for this event as the payload is where all the useful filters are for our use cases. If another event requires an organizationId, you can use this event to have the user select one first. If there is only one organization, just auto-select it.`,
|
|
10
10
|
emitPayloadSchema: listOrganizationsEmitTargetAndPayloadSchema,
|
|
11
11
|
responsePayloadSchema: listOrgsResponsePayloadSchema,
|
|
12
12
|
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import './../../permissions/permissions.types';
|
|
2
|
+
declare const registerAgentEventContract: {
|
|
3
|
+
eventSignatures: {
|
|
4
|
+
'register-agent::v2020_12_25': {
|
|
5
|
+
description: string;
|
|
6
|
+
emitPayloadSchema: import("@sprucelabs/mercury-types").SpruceSchemas.Mercury.v2020_12_25.RegisterAgentEmitTargetAndPayloadSchema;
|
|
7
|
+
responsePayloadSchema: import("@sprucelabs/mercury-types").SpruceSchemas.Mercury.v2020_12_25.RegisterAgentResponsePayloadSchema;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
export default registerAgentEventContract;
|
|
12
|
+
export type RegisterAgentEventContract = typeof registerAgentEventContract;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import './../../permissions/permissions.types';
|
|
2
|
+
import registerAgentEmitTargetAndPayloadSchema from './../../schemas/mercury/v2020_12_25/registerAgentEmitTargetAndPayload.schema.js';
|
|
3
|
+
import registerAgentResponsePayloadSchema from './../../schemas/mercury/v2020_12_25/registerAgentResponsePayload.schema.js';
|
|
4
|
+
import { buildEventContract } from '@sprucelabs/mercury-types';
|
|
5
|
+
const registerAgentEventContract = buildEventContract({
|
|
6
|
+
eventSignatures: {
|
|
7
|
+
'register-agent::v2020_12_25': {
|
|
8
|
+
description: `Register a new ai agent. You can name it, give it a role, etc.`,
|
|
9
|
+
emitPayloadSchema: registerAgentEmitTargetAndPayloadSchema,
|
|
10
|
+
responsePayloadSchema: registerAgentResponsePayloadSchema,
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
});
|
|
14
|
+
export default registerAgentEventContract;
|
|
@@ -3,7 +3,6 @@ declare const updateLocationEventContract: {
|
|
|
3
3
|
eventSignatures: {
|
|
4
4
|
'update-location::v2020_12_25': {
|
|
5
5
|
description: string;
|
|
6
|
-
aiInstructions: string;
|
|
7
6
|
emitPayloadSchema: import("@sprucelabs/mercury-types").SpruceSchemas.Mercury.v2020_12_25.UpdateLocationEmitTargetAndPayloadSchema;
|
|
8
7
|
responsePayloadSchema: import("@sprucelabs/mercury-types").SpruceSchemas.Mercury.v2020_12_25.UpdateLocationResponsePayloadSchema;
|
|
9
8
|
};
|
|
@@ -6,7 +6,6 @@ const updateLocationEventContract = buildEventContract({
|
|
|
6
6
|
eventSignatures: {
|
|
7
7
|
'update-location::v2020_12_25': {
|
|
8
8
|
description: `Update a new location at your organization.`,
|
|
9
|
-
aiInstructions: `This will allow someone to update any location where they work (if they have permissions). Since you need a location id, you will have to start with the list-locations event.`,
|
|
10
9
|
emitPayloadSchema: updateLocationEmitTargetAndPayloadSchema,
|
|
11
10
|
responsePayloadSchema: updateLocationResponsePayloadSchema,
|
|
12
11
|
}
|
|
@@ -3,7 +3,6 @@ declare const updateOrganizationEventContract: {
|
|
|
3
3
|
eventSignatures: {
|
|
4
4
|
'update-organization::v2020_12_25': {
|
|
5
5
|
description: string;
|
|
6
|
-
aiInstructions: string;
|
|
7
6
|
emitPayloadSchema: import("@sprucelabs/mercury-types").SpruceSchemas.Mercury.v2020_12_25.UpdateOrganizationEmitTargetAndPayloadSchema;
|
|
8
7
|
responsePayloadSchema: import("@sprucelabs/mercury-types").SpruceSchemas.Mercury.v2020_12_25.UpdateOrgResponsePayloadSchema;
|
|
9
8
|
};
|
|
@@ -6,7 +6,6 @@ const updateOrganizationEventContract = buildEventContract({
|
|
|
6
6
|
eventSignatures: {
|
|
7
7
|
'update-organization::v2020_12_25': {
|
|
8
8
|
description: `Update your organization.`,
|
|
9
|
-
aiInstructions: `This will allow someone to update any organization where they work (if they have permissions). Since you need an organization's id, you will have to start with the list-organizations event.`,
|
|
10
9
|
emitPayloadSchema: updateOrganizationEmitTargetAndPayloadSchema,
|
|
11
10
|
responsePayloadSchema: updateOrgResponsePayloadSchema,
|
|
12
11
|
}
|
|
@@ -74,6 +74,9 @@ declare module '@sprucelabs/mercury-types/build/types/mercury.types' {
|
|
|
74
74
|
'can-check-if-skill-is-installed',
|
|
75
75
|
'can-publish-own-skills'
|
|
76
76
|
];
|
|
77
|
+
'agent-contract': [
|
|
78
|
+
'can-register-platform-agent'
|
|
79
|
+
];
|
|
77
80
|
}
|
|
78
81
|
}
|
|
79
82
|
export interface PermissionContractMap {
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { SchemaRegistry } from '@sprucelabs/schema';
|
|
2
|
+
const agentSchema = {
|
|
3
|
+
id: 'agent',
|
|
4
|
+
version: 'v2020_12_25',
|
|
5
|
+
namespace: 'Mercury',
|
|
6
|
+
name: '',
|
|
7
|
+
fields: {
|
|
8
|
+
/** . */
|
|
9
|
+
'id': {
|
|
10
|
+
type: 'id',
|
|
11
|
+
isRequired: true,
|
|
12
|
+
options: undefined
|
|
13
|
+
},
|
|
14
|
+
/** . */
|
|
15
|
+
'name': {
|
|
16
|
+
type: 'text',
|
|
17
|
+
isRequired: true,
|
|
18
|
+
options: undefined
|
|
19
|
+
},
|
|
20
|
+
/** . */
|
|
21
|
+
'systemPrompt': {
|
|
22
|
+
type: 'text',
|
|
23
|
+
isRequired: true,
|
|
24
|
+
options: undefined
|
|
25
|
+
},
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
SchemaRegistry.getInstance().trackSchema(agentSchema);
|
|
29
|
+
export default agentSchema;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { SchemaRegistry } from '@sprucelabs/schema';
|
|
2
|
+
const registerAgentSchema = {
|
|
3
|
+
id: 'registerAgent',
|
|
4
|
+
version: 'v2020_12_25',
|
|
5
|
+
namespace: 'Mercury',
|
|
6
|
+
name: '',
|
|
7
|
+
fields: {
|
|
8
|
+
/** Name. What is the name of your new AI Agent? */
|
|
9
|
+
'name': {
|
|
10
|
+
label: 'Name',
|
|
11
|
+
type: 'text',
|
|
12
|
+
isRequired: true,
|
|
13
|
+
hint: 'What is the name of your new AI Agent?',
|
|
14
|
+
options: undefined
|
|
15
|
+
},
|
|
16
|
+
/** System Prompt. How should your AI Agent behave? This is injected into every conversation to guide its responses. */
|
|
17
|
+
'systemPrompt': {
|
|
18
|
+
label: 'System Prompt',
|
|
19
|
+
type: 'text',
|
|
20
|
+
isRequired: true,
|
|
21
|
+
hint: 'How should your AI Agent behave? This is injected into every conversation to guide its responses.',
|
|
22
|
+
options: undefined
|
|
23
|
+
},
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
SchemaRegistry.getInstance().trackSchema(registerAgentSchema);
|
|
27
|
+
export default registerAgentSchema;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { SchemaRegistry } from '@sprucelabs/schema';
|
|
2
|
+
import registerAgentSchema_v2020_12_25 from './registerAgent.schema.js';
|
|
3
|
+
const registerAgentEmitPayloadSchema = {
|
|
4
|
+
id: 'registerAgentEmitPayload',
|
|
5
|
+
version: 'v2020_12_25',
|
|
6
|
+
namespace: 'Mercury',
|
|
7
|
+
name: '',
|
|
8
|
+
fields: {
|
|
9
|
+
/** . */
|
|
10
|
+
'agent': {
|
|
11
|
+
type: 'schema',
|
|
12
|
+
isRequired: true,
|
|
13
|
+
options: { schema: registerAgentSchema_v2020_12_25, }
|
|
14
|
+
},
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
SchemaRegistry.getInstance().trackSchema(registerAgentEmitPayloadSchema);
|
|
18
|
+
export default registerAgentEmitPayloadSchema;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { SchemaRegistry } from '@sprucelabs/schema';
|
|
2
|
+
const registerAgentEmitTargetSchema = {
|
|
3
|
+
id: 'registerAgentEmitTarget',
|
|
4
|
+
version: 'v2020_12_25',
|
|
5
|
+
namespace: 'Mercury',
|
|
6
|
+
name: '',
|
|
7
|
+
fields: {
|
|
8
|
+
/** . Coming soon... right now only platform agents are supported. */
|
|
9
|
+
'organizationId': {
|
|
10
|
+
type: 'id',
|
|
11
|
+
hint: 'Coming soon... right now only platform agents are supported.',
|
|
12
|
+
options: undefined
|
|
13
|
+
},
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
SchemaRegistry.getInstance().trackSchema(registerAgentEmitTargetSchema);
|
|
17
|
+
export default registerAgentEmitTargetSchema;
|
package/build/esm/.spruce/schemas/mercury/v2020_12_25/registerAgentEmitTargetAndPayload.schema.js
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { SchemaRegistry } from '@sprucelabs/schema';
|
|
2
|
+
import eventSourceSchema_v2021_09_13 from './../../spruceEventUtils/v2021_09_13/eventSource.schema.js';
|
|
3
|
+
import registerAgentEmitTargetSchema_v2020_12_25 from './registerAgentEmitTarget.schema.js';
|
|
4
|
+
import registerAgentEmitPayloadSchema_v2020_12_25 from './registerAgentEmitPayload.schema.js';
|
|
5
|
+
const registerAgentEmitTargetAndPayloadSchema = {
|
|
6
|
+
id: 'registerAgentEmitTargetAndPayload',
|
|
7
|
+
version: 'v2020_12_25',
|
|
8
|
+
namespace: 'Mercury',
|
|
9
|
+
name: '',
|
|
10
|
+
fields: {
|
|
11
|
+
/** Source. */
|
|
12
|
+
'source': {
|
|
13
|
+
label: 'Source',
|
|
14
|
+
type: 'schema',
|
|
15
|
+
options: { schema: eventSourceSchema_v2021_09_13, }
|
|
16
|
+
},
|
|
17
|
+
/** . */
|
|
18
|
+
'target': {
|
|
19
|
+
type: 'schema',
|
|
20
|
+
options: { schema: registerAgentEmitTargetSchema_v2020_12_25, }
|
|
21
|
+
},
|
|
22
|
+
/** . */
|
|
23
|
+
'payload': {
|
|
24
|
+
type: 'schema',
|
|
25
|
+
isRequired: true,
|
|
26
|
+
options: { schema: registerAgentEmitPayloadSchema_v2020_12_25, }
|
|
27
|
+
},
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
SchemaRegistry.getInstance().trackSchema(registerAgentEmitTargetAndPayloadSchema);
|
|
31
|
+
export default registerAgentEmitTargetAndPayloadSchema;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { SchemaRegistry } from '@sprucelabs/schema';
|
|
2
|
+
import agentSchema_v2020_12_25 from './agent.schema.js';
|
|
3
|
+
const registerAgentResponsePayloadSchema = {
|
|
4
|
+
id: 'registerAgentResponsePayload',
|
|
5
|
+
version: 'v2020_12_25',
|
|
6
|
+
namespace: 'Mercury',
|
|
7
|
+
name: '',
|
|
8
|
+
fields: {
|
|
9
|
+
/** . */
|
|
10
|
+
'agent': {
|
|
11
|
+
type: 'schema',
|
|
12
|
+
isRequired: true,
|
|
13
|
+
options: { schema: agentSchema_v2020_12_25, }
|
|
14
|
+
},
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
SchemaRegistry.getInstance().trackSchema(registerAgentResponsePayloadSchema);
|
|
18
|
+
export default registerAgentResponsePayloadSchema;
|
|
@@ -13,6 +13,12 @@ const sendMessageMessagePayloadSchema = {
|
|
|
13
13
|
hint: 'An arbitrary id that can be used to track this message when being sent and not yet assigned an Id.',
|
|
14
14
|
options: undefined
|
|
15
15
|
},
|
|
16
|
+
/** . If this message is a reply to another message, this is the id of that original message. */
|
|
17
|
+
'inReplyToMessageId': {
|
|
18
|
+
type: 'id',
|
|
19
|
+
hint: 'If this message is a reply to another message, this is the id of that original message.',
|
|
20
|
+
options: undefined
|
|
21
|
+
},
|
|
16
22
|
/** . */
|
|
17
23
|
'classification': {
|
|
18
24
|
type: 'select',
|