@cjhyy/code-shell-pet 0.8.11 → 0.8.12
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/capability.d.ts +9 -5
- package/dist/capability.js +24 -4
- package/dist/index.capability.d.ts +1 -1
- package/dist/index.capability.js +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/package.json +2 -2
package/dist/capability.d.ts
CHANGED
|
@@ -2,14 +2,18 @@
|
|
|
2
2
|
* The Pet domain packaged as a self-contained core extension module.
|
|
3
3
|
*
|
|
4
4
|
* Hosts opt in explicitly:
|
|
5
|
-
* - desktop injects `CODE_SHELL_CAPABILITY_MODULES=@cjhyy/code-shell-pet#
|
|
5
|
+
* - desktop injects `CODE_SHELL_CAPABILITY_MODULES=@cjhyy/code-shell-pet#createPetModule`
|
|
6
6
|
* into the stdio worker env (loaded by core's agent-server-stdio cli);
|
|
7
|
-
* - in-process hosts/tests
|
|
8
|
-
* to EngineConfig / AgentServer options.
|
|
7
|
+
* - in-process hosts/tests compile `createPetModule()` into their composition.
|
|
9
8
|
*
|
|
10
9
|
* Core itself is pet-free: behavior comes from the generic RunBehaviorProfile
|
|
11
10
|
* registry, protocol observation from ProtocolObserver, and the DelegateWork
|
|
12
11
|
* tool joins the composed tool catalog with full exposure metadata.
|
|
13
12
|
*/
|
|
14
|
-
import type {
|
|
15
|
-
|
|
13
|
+
import type { AgentModule } from "@cjhyy/code-shell-core/extension";
|
|
14
|
+
/**
|
|
15
|
+
* The Pet domain as a unified AgentModule. Wraps the legacy factory so the
|
|
16
|
+
* report-to-mimi sink closure keeps binding the observer to the tools of the
|
|
17
|
+
* SAME module instance.
|
|
18
|
+
*/
|
|
19
|
+
export declare function createPetModule(): AgentModule;
|
package/dist/capability.js
CHANGED
|
@@ -2,10 +2,9 @@
|
|
|
2
2
|
* The Pet domain packaged as a self-contained core extension module.
|
|
3
3
|
*
|
|
4
4
|
* Hosts opt in explicitly:
|
|
5
|
-
* - desktop injects `CODE_SHELL_CAPABILITY_MODULES=@cjhyy/code-shell-pet#
|
|
5
|
+
* - desktop injects `CODE_SHELL_CAPABILITY_MODULES=@cjhyy/code-shell-pet#createPetModule`
|
|
6
6
|
* into the stdio worker env (loaded by core's agent-server-stdio cli);
|
|
7
|
-
* - in-process hosts/tests
|
|
8
|
-
* to EngineConfig / AgentServer options.
|
|
7
|
+
* - in-process hosts/tests compile `createPetModule()` into their composition.
|
|
9
8
|
*
|
|
10
9
|
* Core itself is pet-free: behavior comes from the generic RunBehaviorProfile
|
|
11
10
|
* registry, protocol observation from ProtocolObserver, and the DelegateWork
|
|
@@ -25,7 +24,28 @@ import { createPetProjectionObserver, PET_HIDDEN_SESSION_KINDS } from "./project
|
|
|
25
24
|
import { PET_REPORT_TO_MIMI_METHOD } from "./protocol.js";
|
|
26
25
|
import { requestMimiDeliveryAvailability, requestMimiDeliveryTool, requestMimiDeliveryToolDef, reportToMimiAvailability, reportToMimiTool, reportToMimiToolDef, } from "./report-to-mimi.js";
|
|
27
26
|
import { validatePetRunParams } from "./run-params.js";
|
|
28
|
-
|
|
27
|
+
/**
|
|
28
|
+
* The Pet domain as a unified AgentModule. Wraps the legacy factory so the
|
|
29
|
+
* report-to-mimi sink closure keeps binding the observer to the tools of the
|
|
30
|
+
* SAME module instance.
|
|
31
|
+
*/
|
|
32
|
+
export function createPetModule() {
|
|
33
|
+
const legacy = buildPetParts();
|
|
34
|
+
return {
|
|
35
|
+
id: legacy.id,
|
|
36
|
+
engine: {
|
|
37
|
+
tools: (legacy.catalogTools ?? []).map((tool) => ({ kind: "preset-tags", tool })),
|
|
38
|
+
behaviorProfiles: legacy.behaviorProfiles,
|
|
39
|
+
},
|
|
40
|
+
protocol: {
|
|
41
|
+
queries: legacy.queries,
|
|
42
|
+
createObserver: legacy.createProtocolObserver,
|
|
43
|
+
validateRunParams: legacy.validateRunParams,
|
|
44
|
+
hiddenSessionKinds: legacy.hiddenSessionKinds,
|
|
45
|
+
},
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
function buildPetParts() {
|
|
29
49
|
let reportToMimi;
|
|
30
50
|
const createProtocolObserver = (host) => {
|
|
31
51
|
reportToMimi = (event) => host.notify(PET_REPORT_TO_MIMI_METHOD, event);
|
package/dist/index.capability.js
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -26,7 +26,7 @@ export { MANAGE_SESSIONS_TOOL_NAME, manageSessionsToolDef, manageSessionsTool, m
|
|
|
26
26
|
export { FOLLOW_UPS_TOOL_NAME, MANAGE_FOLLOW_UP_TOOL_NAME, followUpsToolDef, followUpsTool, followUpsAvailability, manageFollowUpToolDef, manageFollowUpTool, manageFollowUpAvailability, type PetFollowUpItem, } from "./follow-ups.js";
|
|
27
27
|
export { SEND_MESSAGE_TOOL_NAME, sendMessageToolDef, sendMessageTool, sendMessageAvailability, rewriteSendMessageDef, type PetOutboundTargetOption, } from "./outbound-message.js";
|
|
28
28
|
export { PET_HOST_ACTION_KINDS, isPetHostActionKind, isPetHostActionRequest, CONTROL_LONG_TASK_TOOL_NAME, GATEWAY_REPLY_TOOL_NAME, MEMORY_TOOL_NAME, controlLongTaskToolDef, controlLongTaskTool, controlLongTaskAvailability, memoryToolDef, memoryTool, memoryAvailability, gatewayReplyToolDef, gatewayReplyTool, gatewayReplyAvailability, rewriteGatewayReplyDef, type PetGatewayReplyAttachmentKind, type PetGatewayReplyCapability, type PetHostActionKind, type PetHostActionRequest, type PetHostActionDecision, } from "./host-actions.js";
|
|
29
|
-
export {
|
|
29
|
+
export { createPetModule } from "./capability.js";
|
|
30
30
|
export * from "./topic-segment.js";
|
|
31
31
|
export * from "./segment-closure.js";
|
|
32
32
|
export * from "./long-task.js";
|
package/dist/index.js
CHANGED
|
@@ -26,7 +26,7 @@ export { MANAGE_SESSIONS_TOOL_NAME, manageSessionsToolDef, manageSessionsTool, m
|
|
|
26
26
|
export { FOLLOW_UPS_TOOL_NAME, MANAGE_FOLLOW_UP_TOOL_NAME, followUpsToolDef, followUpsTool, followUpsAvailability, manageFollowUpToolDef, manageFollowUpTool, manageFollowUpAvailability, } from "./follow-ups.js";
|
|
27
27
|
export { SEND_MESSAGE_TOOL_NAME, sendMessageToolDef, sendMessageTool, sendMessageAvailability, rewriteSendMessageDef, } from "./outbound-message.js";
|
|
28
28
|
export { PET_HOST_ACTION_KINDS, isPetHostActionKind, isPetHostActionRequest, CONTROL_LONG_TASK_TOOL_NAME, GATEWAY_REPLY_TOOL_NAME, MEMORY_TOOL_NAME, controlLongTaskToolDef, controlLongTaskTool, controlLongTaskAvailability, memoryToolDef, memoryTool, memoryAvailability, gatewayReplyToolDef, gatewayReplyTool, gatewayReplyAvailability, rewriteGatewayReplyDef, } from "./host-actions.js";
|
|
29
|
-
export {
|
|
29
|
+
export { createPetModule } from "./capability.js";
|
|
30
30
|
export * from "./topic-segment.js";
|
|
31
31
|
export * from "./segment-closure.js";
|
|
32
32
|
export * from "./long-task.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cjhyy/code-shell-pet",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.12",
|
|
4
4
|
"description": "Pet (top-level personal assistant) capability for CodeShell — projection state machine, DelegateWork contract, Mimi behavior profile.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"clean": "node -e \"require('node:fs').rmSync('dist',{recursive:true,force:true})\""
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@cjhyy/code-shell-core": "0.8.
|
|
39
|
+
"@cjhyy/code-shell-core": "0.8.12"
|
|
40
40
|
},
|
|
41
41
|
"engines": {
|
|
42
42
|
"node": ">=20.10"
|