@sprucelabs/mercury-core-events 27.4.1 → 27.4.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/build/.spruce/events/events.contract.d.ts +10 -0
- package/build/.spruce/events/events.contract.js +2 -0
- package/build/.spruce/events/mercury/getAgent.v2020_12_25.contract.d.ts +12 -0
- package/build/.spruce/events/mercury/getAgent.v2020_12_25.contract.js +19 -0
- package/build/.spruce/permissions/permissions.types.d.ts +2 -1
- package/build/.spruce/schemas/mercury/v2020_12_25/getAgentEmitTarget.schema.d.ts +3 -0
- package/build/.spruce/schemas/mercury/v2020_12_25/getAgentEmitTarget.schema.js +19 -0
- package/build/.spruce/schemas/mercury/v2020_12_25/getAgentEmitTargetAndPayload.schema.d.ts +3 -0
- package/build/.spruce/schemas/mercury/v2020_12_25/getAgentEmitTargetAndPayload.schema.js +29 -0
- package/build/.spruce/schemas/mercury/v2020_12_25/getAgentResponsePayload.schema.d.ts +3 -0
- package/build/.spruce/schemas/mercury/v2020_12_25/getAgentResponsePayload.schema.js +22 -0
- package/build/.spruce/schemas/mercury/v2020_12_25/registerAgent.schema.js +2 -6
- package/build/.spruce/schemas/mercury/v2020_12_25/registerAgentResponsePayload.schema.js +1 -1
- package/build/.spruce/schemas/mercury/v2020_12_25/sendMessageMessagePayload.schema.js +5 -0
- package/build/.spruce/schemas/schemas.types.d.ts +332 -291
- package/build/.spruce/schemas/spruce/v2020_07_22/agent.schema.d.ts +1 -0
- package/build/.spruce/schemas/spruce/v2020_07_22/agent.schema.js +5 -0
- package/build/.spruce/schemas/spruce/v2020_07_22/agentSource.schema.d.ts +1 -0
- package/build/.spruce/schemas/spruce/v2020_07_22/agentSource.schema.js +5 -0
- package/build/esm/.spruce/events/events.contract.d.ts +10 -0
- package/build/esm/.spruce/events/events.contract.js +2 -0
- package/build/esm/.spruce/events/mercury/getAgent.v2020_12_25.contract.d.ts +12 -0
- package/build/esm/.spruce/events/mercury/getAgent.v2020_12_25.contract.js +14 -0
- package/build/esm/.spruce/permissions/permissions.types.d.ts +2 -1
- package/build/esm/.spruce/schemas/mercury/v2020_12_25/getAgentEmitTarget.schema.d.ts +3 -0
- package/build/esm/.spruce/schemas/mercury/v2020_12_25/getAgentEmitTarget.schema.js +17 -0
- package/build/esm/.spruce/schemas/mercury/v2020_12_25/getAgentEmitTargetAndPayload.schema.d.ts +3 -0
- package/build/esm/.spruce/schemas/mercury/v2020_12_25/getAgentEmitTargetAndPayload.schema.js +24 -0
- package/build/esm/.spruce/schemas/mercury/v2020_12_25/getAgentResponsePayload.schema.d.ts +3 -0
- package/build/esm/.spruce/schemas/mercury/v2020_12_25/getAgentResponsePayload.schema.js +17 -0
- package/build/esm/.spruce/schemas/mercury/v2020_12_25/registerAgent.schema.js +2 -6
- package/build/esm/.spruce/schemas/mercury/v2020_12_25/registerAgentResponsePayload.schema.js +2 -2
- package/build/esm/.spruce/schemas/mercury/v2020_12_25/sendMessageMessagePayload.schema.js +5 -0
- package/build/esm/.spruce/schemas/schemas.types.d.ts +332 -291
- package/build/esm/.spruce/schemas/spruce/v2020_07_22/agent.schema.d.ts +1 -0
- package/build/esm/.spruce/schemas/spruce/v2020_07_22/agent.schema.js +1 -0
- package/package.json +4 -4
- package/build/.spruce/schemas/mercury/v2020_12_25/agent.schema.d.ts +0 -3
- package/build/.spruce/schemas/mercury/v2020_12_25/agent.schema.js +0 -31
- package/build/esm/.spruce/schemas/mercury/v2020_12_25/agent.schema.d.ts +0 -3
- package/build/esm/.spruce/schemas/mercury/v2020_12_25/agent.schema.js +0 -29
@@ -19,6 +19,7 @@ import { DidUpdateAuthorizerStatusEventContract as MercuryDidUpdateAuthorizerSta
|
|
19
19
|
import { DidUpdateFeedEventContract as MercuryDidUpdateFeedEventContract_v2020_12_25 } from './mercury/didUpdateFeed.v2020_12_25.contract';
|
20
20
|
import { DidUpdatePersonEventContract as MercuryDidUpdatePersonEventContract_v2020_12_25 } from './mercury/didUpdatePerson.v2020_12_25.contract';
|
21
21
|
import { DoesHonorPermissionContractEventContract as MercuryDoesHonorPermissionContractEventContract_v2020_12_25 } from './mercury/doesHonorPermissionContract.v2020_12_25.contract';
|
22
|
+
import { GetAgentEventContract as MercuryGetAgentEventContract_v2020_12_25 } from './mercury/getAgent.v2020_12_25.contract';
|
22
23
|
import { GetAnonymousPersonEventContract as MercuryGetAnonymousPersonEventContract_v2020_12_25 } from './mercury/getAnonymousPerson.v2020_12_25.contract';
|
23
24
|
import { GetConversationTopicsEventContract as MercuryGetConversationTopicsEventContract_v2020_12_25 } from './mercury/getConversationTopics.v2020_12_25.contract';
|
24
25
|
import { GetEventContractsEventContract as MercuryGetEventContractsEventContract_v2020_12_25 } from './mercury/getEventContracts.v2020_12_25.contract';
|
@@ -303,6 +304,14 @@ declare const _default: ({
|
|
303
304
|
responsePayloadSchema: import("@sprucelabs/mercury-types").SpruceSchemas.Mercury.v2020_12_25.DoesHonorPermissionContractRespondPayloadSchema;
|
304
305
|
};
|
305
306
|
};
|
307
|
+
} | {
|
308
|
+
eventSignatures: {
|
309
|
+
'get-agent::v2020_12_25': {
|
310
|
+
description: string;
|
311
|
+
emitPayloadSchema: import("@sprucelabs/mercury-types").SpruceSchemas.Mercury.v2020_12_25.GetAgentEmitTargetAndPayloadSchema;
|
312
|
+
responsePayloadSchema: import("@sprucelabs/mercury-types").SpruceSchemas.Mercury.v2020_12_25.GetAgentResponsePayloadSchema;
|
313
|
+
};
|
314
|
+
};
|
306
315
|
} | {
|
307
316
|
eventSignatures: {
|
308
317
|
'get-anonymous-person::v2020_12_25': {
|
@@ -820,6 +829,7 @@ declare module '@sprucelabs/mercury-types/build/types/mercury.types' {
|
|
820
829
|
'did-update-feed::v2020_12_25': MercuryDidUpdateFeedEventContract_v2020_12_25['eventSignatures']['did-update-feed::v2020_12_25'];
|
821
830
|
'did-update-person::v2020_12_25': MercuryDidUpdatePersonEventContract_v2020_12_25['eventSignatures']['did-update-person::v2020_12_25'];
|
822
831
|
'does-honor-permission-contract::v2020_12_25': MercuryDoesHonorPermissionContractEventContract_v2020_12_25['eventSignatures']['does-honor-permission-contract::v2020_12_25'];
|
832
|
+
'get-agent::v2020_12_25': MercuryGetAgentEventContract_v2020_12_25['eventSignatures']['get-agent::v2020_12_25'];
|
823
833
|
'get-anonymous-person::v2020_12_25': MercuryGetAnonymousPersonEventContract_v2020_12_25['eventSignatures']['get-anonymous-person::v2020_12_25'];
|
824
834
|
'get-conversation-topics::v2020_12_25': MercuryGetConversationTopicsEventContract_v2020_12_25['eventSignatures']['get-conversation-topics::v2020_12_25'];
|
825
835
|
'get-event-contracts::v2020_12_25': MercuryGetEventContractsEventContract_v2020_12_25['eventSignatures']['get-event-contracts::v2020_12_25'];
|
@@ -24,6 +24,7 @@ const didUpdateAuthorizerStatus_v2020_12_25_contract_1 = __importDefault(require
|
|
24
24
|
const didUpdateFeed_v2020_12_25_contract_1 = __importDefault(require("./mercury/didUpdateFeed.v2020_12_25.contract"));
|
25
25
|
const didUpdatePerson_v2020_12_25_contract_1 = __importDefault(require("./mercury/didUpdatePerson.v2020_12_25.contract"));
|
26
26
|
const doesHonorPermissionContract_v2020_12_25_contract_1 = __importDefault(require("./mercury/doesHonorPermissionContract.v2020_12_25.contract"));
|
27
|
+
const getAgent_v2020_12_25_contract_1 = __importDefault(require("./mercury/getAgent.v2020_12_25.contract"));
|
27
28
|
const getAnonymousPerson_v2020_12_25_contract_1 = __importDefault(require("./mercury/getAnonymousPerson.v2020_12_25.contract"));
|
28
29
|
const getConversationTopics_v2020_12_25_contract_1 = __importDefault(require("./mercury/getConversationTopics.v2020_12_25.contract"));
|
29
30
|
const getEventContracts_v2020_12_25_contract_1 = __importDefault(require("./mercury/getEventContracts.v2020_12_25.contract"));
|
@@ -103,6 +104,7 @@ exports.default = [
|
|
103
104
|
didUpdateFeed_v2020_12_25_contract_1.default,
|
104
105
|
didUpdatePerson_v2020_12_25_contract_1.default,
|
105
106
|
doesHonorPermissionContract_v2020_12_25_contract_1.default,
|
107
|
+
getAgent_v2020_12_25_contract_1.default,
|
106
108
|
getAnonymousPerson_v2020_12_25_contract_1.default,
|
107
109
|
getConversationTopics_v2020_12_25_contract_1.default,
|
108
110
|
getEventContracts_v2020_12_25_contract_1.default,
|
@@ -0,0 +1,12 @@
|
|
1
|
+
import './../../permissions/permissions.types';
|
2
|
+
declare const getAgentEventContract: {
|
3
|
+
eventSignatures: {
|
4
|
+
'get-agent::v2020_12_25': {
|
5
|
+
description: string;
|
6
|
+
emitPayloadSchema: import("@sprucelabs/mercury-types").SpruceSchemas.Mercury.v2020_12_25.GetAgentEmitTargetAndPayloadSchema;
|
7
|
+
responsePayloadSchema: import("@sprucelabs/mercury-types").SpruceSchemas.Mercury.v2020_12_25.GetAgentResponsePayloadSchema;
|
8
|
+
};
|
9
|
+
};
|
10
|
+
};
|
11
|
+
export default getAgentEventContract;
|
12
|
+
export type GetAgentEventContract = typeof getAgentEventContract;
|
@@ -0,0 +1,19 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
4
|
+
};
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
6
|
+
require("./../../permissions/permissions.types");
|
7
|
+
const getAgentEmitTargetAndPayload_schema_1 = __importDefault(require("./../../schemas/mercury/v2020_12_25/getAgentEmitTargetAndPayload.schema"));
|
8
|
+
const getAgentResponsePayload_schema_1 = __importDefault(require("./../../schemas/mercury/v2020_12_25/getAgentResponsePayload.schema"));
|
9
|
+
const mercury_types_1 = require("@sprucelabs/mercury-types");
|
10
|
+
const getAgentEventContract = (0, mercury_types_1.buildEventContract)({
|
11
|
+
eventSignatures: {
|
12
|
+
'get-agent::v2020_12_25': {
|
13
|
+
description: `Register a new ai agent. You can name it, give it a role, etc.`,
|
14
|
+
emitPayloadSchema: getAgentEmitTargetAndPayload_schema_1.default,
|
15
|
+
responsePayloadSchema: getAgentResponsePayload_schema_1.default,
|
16
|
+
}
|
17
|
+
}
|
18
|
+
});
|
19
|
+
exports.default = getAgentEventContract;
|
@@ -2,7 +2,8 @@ import '@sprucelabs/mercury-types';
|
|
2
2
|
declare module '@sprucelabs/mercury-types/build/types/mercury.types' {
|
3
3
|
interface PermissionContractMap {
|
4
4
|
'agent-contract': [
|
5
|
-
'can-register-platform-agent'
|
5
|
+
'can-register-platform-agent',
|
6
|
+
'can-get-platform-agent'
|
6
7
|
];
|
7
8
|
'authorizer-contract': [
|
8
9
|
'can-update-others-authorizer-status'
|
@@ -0,0 +1,19 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
const schema_1 = require("@sprucelabs/schema");
|
4
|
+
const getAgentEmitTargetSchema = {
|
5
|
+
id: 'getAgentEmitTarget',
|
6
|
+
version: 'v2020_12_25',
|
7
|
+
namespace: 'Mercury',
|
8
|
+
name: '',
|
9
|
+
fields: {
|
10
|
+
/** . Coming soon... right now only platform agents are supported. */
|
11
|
+
'organizationId': {
|
12
|
+
type: 'id',
|
13
|
+
hint: 'Coming soon... right now only platform agents are supported.',
|
14
|
+
options: undefined
|
15
|
+
},
|
16
|
+
}
|
17
|
+
};
|
18
|
+
schema_1.SchemaRegistry.getInstance().trackSchema(getAgentEmitTargetSchema);
|
19
|
+
exports.default = getAgentEmitTargetSchema;
|
@@ -0,0 +1,29 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
4
|
+
};
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
6
|
+
const schema_1 = require("@sprucelabs/schema");
|
7
|
+
const eventSource_schema_1 = __importDefault(require("./../../spruceEventUtils/v2021_09_13/eventSource.schema"));
|
8
|
+
const getAgentEmitTarget_schema_1 = __importDefault(require("./getAgentEmitTarget.schema"));
|
9
|
+
const getAgentEmitTargetAndPayloadSchema = {
|
10
|
+
id: 'getAgentEmitTargetAndPayload',
|
11
|
+
version: 'v2020_12_25',
|
12
|
+
namespace: 'Mercury',
|
13
|
+
name: '',
|
14
|
+
fields: {
|
15
|
+
/** Source. */
|
16
|
+
'source': {
|
17
|
+
label: 'Source',
|
18
|
+
type: 'schema',
|
19
|
+
options: { schema: eventSource_schema_1.default, }
|
20
|
+
},
|
21
|
+
/** . */
|
22
|
+
'target': {
|
23
|
+
type: 'schema',
|
24
|
+
options: { schema: getAgentEmitTarget_schema_1.default, }
|
25
|
+
},
|
26
|
+
}
|
27
|
+
};
|
28
|
+
schema_1.SchemaRegistry.getInstance().trackSchema(getAgentEmitTargetAndPayloadSchema);
|
29
|
+
exports.default = getAgentEmitTargetAndPayloadSchema;
|
@@ -0,0 +1,22 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
4
|
+
};
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
6
|
+
const schema_1 = require("@sprucelabs/schema");
|
7
|
+
const agent_schema_1 = __importDefault(require("./../../spruce/v2020_07_22/agent.schema"));
|
8
|
+
const getAgentResponsePayloadSchema = {
|
9
|
+
id: 'getAgentResponsePayload',
|
10
|
+
version: 'v2020_12_25',
|
11
|
+
namespace: 'Mercury',
|
12
|
+
name: '',
|
13
|
+
fields: {
|
14
|
+
/** . */
|
15
|
+
'agent': {
|
16
|
+
type: 'schema',
|
17
|
+
options: { schema: agent_schema_1.default, }
|
18
|
+
},
|
19
|
+
}
|
20
|
+
};
|
21
|
+
schema_1.SchemaRegistry.getInstance().trackSchema(getAgentResponsePayloadSchema);
|
22
|
+
exports.default = getAgentResponsePayloadSchema;
|
@@ -7,20 +7,16 @@ const registerAgentSchema = {
|
|
7
7
|
namespace: 'Mercury',
|
8
8
|
name: '',
|
9
9
|
fields: {
|
10
|
-
/**
|
10
|
+
/** . */
|
11
11
|
'name': {
|
12
|
-
label: 'Name',
|
13
12
|
type: 'text',
|
14
13
|
isRequired: true,
|
15
|
-
hint: 'What is the name of your new AI Agent?',
|
16
14
|
options: undefined
|
17
15
|
},
|
18
|
-
/**
|
16
|
+
/** . */
|
19
17
|
'systemPrompt': {
|
20
|
-
label: 'System Prompt',
|
21
18
|
type: 'text',
|
22
19
|
isRequired: true,
|
23
|
-
hint: 'How should your AI Agent behave? This is injected into every conversation to guide its responses.',
|
24
20
|
options: undefined
|
25
21
|
},
|
26
22
|
}
|
@@ -4,7 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
4
4
|
};
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
6
6
|
const schema_1 = require("@sprucelabs/schema");
|
7
|
-
const agent_schema_1 = __importDefault(require("
|
7
|
+
const agent_schema_1 = __importDefault(require("./../../spruce/v2020_07_22/agent.schema"));
|
8
8
|
const registerAgentResponsePayloadSchema = {
|
9
9
|
id: 'registerAgentResponsePayload',
|
10
10
|
version: 'v2020_12_25',
|
@@ -31,6 +31,11 @@ const sendMessageMessagePayloadSchema = {
|
|
31
31
|
options: { choices: [{ "value": "auth", "label": "Auth" }, { "value": "transactional", "label": "transactional" }, { "value": "promotional", "label": "Promotional" }, { "value": "incoming", "label": "incoming" }], }
|
32
32
|
},
|
33
33
|
/** . */
|
34
|
+
'subject': {
|
35
|
+
type: 'text',
|
36
|
+
options: undefined
|
37
|
+
},
|
38
|
+
/** . */
|
34
39
|
'body': {
|
35
40
|
type: 'text',
|
36
41
|
isRequired: true,
|