qlogicagent 2.16.7 → 2.16.9
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/cli.js +403 -397
- package/dist/default-project-knowledge/INSTRUCTIONS.md +7 -0
- package/dist/default-project-knowledge/rules/project-workflow.md +6 -0
- package/dist/index.js +405 -399
- package/dist/types/cli/agent-runtime-bootstrap.d.ts +1 -0
- package/dist/types/cli/base-tool-bootstrap.d.ts +2 -0
- package/dist/types/cli/handlers/community-handler.d.ts +2 -28
- package/dist/types/cli/handlers/files-handler.d.ts +1 -0
- package/dist/types/cli/handlers/message-feedback-handler.d.ts +2 -0
- package/dist/types/cli/handlers/pet-handler.d.ts +1 -0
- package/dist/types/cli/handlers/workflow-handler.d.ts +0 -11
- package/dist/types/cli/memory-coordinator.d.ts +1 -0
- package/dist/types/cli/pet-runtime.d.ts +5 -0
- package/dist/types/cli/project-template-seeder.d.ts +2 -2
- package/dist/types/cli/runtime-hook-bootstrap.d.ts +1 -0
- package/dist/types/cli/skills-query-service.d.ts +6 -1
- package/dist/types/cli/stdio-agent-session-bootstrap.d.ts +1 -0
- package/dist/types/cli/tool-bootstrap-community-registration.d.ts +0 -6
- package/dist/types/cli/tool-bootstrap-core-registration.d.ts +1 -0
- package/dist/types/cli/tool-bootstrap.d.ts +1 -0
- package/dist/types/cli/turn-skill-autopersist.d.ts +0 -25
- package/dist/types/protocol/methods.d.ts +0 -201
- package/dist/types/protocol/wire/agent-methods.d.ts +10 -205
- package/dist/types/protocol/wire/notification-payloads.d.ts +7 -0
- package/dist/types/runtime/community/community-consent-client.d.ts +9 -186
- package/dist/types/runtime/community/community-discovery-coordinator.d.ts +1 -1
- package/dist/types/runtime/infra/default-path-service.d.ts +1 -1
- package/dist/types/runtime/infra/feedback-event-store.d.ts +19 -0
- package/dist/types/runtime/infra/feedback-upload-client.d.ts +1 -0
- package/dist/types/runtime/infra/project-data-paths.d.ts +5 -5
- package/dist/types/runtime/infra/skill-resolver.d.ts +4 -0
- package/dist/types/runtime/pet/daily-journey-summarizer.d.ts +25 -0
- package/dist/types/runtime/pet/index.d.ts +2 -1
- package/dist/types/runtime/pet/journey-catchup.d.ts +14 -0
- package/dist/types/runtime/pet/journey-day-aggregator.d.ts +27 -0
- package/dist/types/runtime/pet/journey-narrative-prompt.d.ts +8 -0
- package/dist/types/runtime/pet/pet-profile-service.d.ts +14 -1
- package/dist/types/runtime/ports/path-service.d.ts +1 -1
- package/dist/types/runtime/ports/tool-contracts.d.ts +1 -0
- package/dist/types/runtime/prompt/instruction-loader.d.ts +7 -7
- package/dist/types/skills/plugins/plugin-marketplace.d.ts +1 -1
- package/dist/types/skills/skill-system/skill-validation.d.ts +10 -0
- package/dist/types/skills/tools/community-seek-tool.d.ts +0 -33
- package/dist/types/skills/tools/instructions-tool.d.ts +2 -2
- package/dist/types/skills/tools/skill-tool.d.ts +1 -1
- package/dist/vendor/hatch-pet/LICENSE.txt +201 -201
- package/dist/vendor/hatch-pet/NOTICE.md +25 -25
- package/dist/vendor/hatch-pet/references/animation-rows.md +29 -29
- package/dist/vendor/hatch-pet/references/codex-pet-contract.md +35 -35
- package/dist/vendor/hatch-pet/references/qa-rubric.md +66 -66
- package/dist/vendor/hatch-pet/scripts/compose_atlas.py +169 -169
- package/dist/vendor/hatch-pet/scripts/derive_running_left_from_running_right.py +150 -150
- package/dist/vendor/hatch-pet/scripts/extract_strip_frames.py +408 -408
- package/dist/vendor/hatch-pet/scripts/inspect_frames.py +256 -256
- package/dist/vendor/hatch-pet/scripts/make_contact_sheet.py +96 -96
- package/dist/vendor/hatch-pet/scripts/prepare_pet_run.py +834 -834
- package/dist/vendor/hatch-pet/scripts/render_animation_previews.py +78 -78
- package/dist/vendor/hatch-pet/scripts/validate_atlas.py +157 -157
- package/package.json +1 -1
- package/dist/types/runtime/community/activity-event-emitter.d.ts +0 -31
- package/dist/types/runtime/community/activity-event.d.ts +0 -62
- package/dist/types/runtime/community/community-desensitization-red-team-cli.d.ts +0 -7
- package/dist/types/runtime/community/community-desensitization.d.ts +0 -29
- package/dist/types/runtime/community/community-pet-publisher.d.ts +0 -27
- package/dist/types/runtime/community/community-signal-reporter.d.ts +0 -19
- package/dist/types/runtime/community/community-telemetry-metadata.d.ts +0 -4
- package/dist/types/runtime/community/community-telemetry-recorder.d.ts +0 -6
- package/dist/types/runtime/community/community-telemetry-types.d.ts +0 -1
- package/dist/types/runtime/community/pet-activity-sink.d.ts +0 -36
- package/dist/types/runtime/community/pet-key.d.ts +0 -7
- package/dist/types/runtime/community/roaming-gate.d.ts +0 -19
- package/dist/types/runtime/community/social-emission.d.ts +0 -16
|
@@ -832,35 +832,6 @@ export interface AgentRpcMethodMap extends GatewayRpcMethodMap {
|
|
|
832
832
|
value: unknown;
|
|
833
833
|
};
|
|
834
834
|
};
|
|
835
|
-
"community.getConsent": {
|
|
836
|
-
params: undefined;
|
|
837
|
-
result: {
|
|
838
|
-
ok: boolean;
|
|
839
|
-
remoteAvailable: boolean;
|
|
840
|
-
consent: {
|
|
841
|
-
enabled: boolean;
|
|
842
|
-
methodSharingEnabled: boolean;
|
|
843
|
-
signalsEnabled: boolean;
|
|
844
|
-
encounterEnabled: boolean;
|
|
845
|
-
remoteSynced: boolean;
|
|
846
|
-
};
|
|
847
|
-
error?: string;
|
|
848
|
-
};
|
|
849
|
-
};
|
|
850
|
-
"community.setConsent": {
|
|
851
|
-
params: {
|
|
852
|
-
enabled: boolean;
|
|
853
|
-
methodSharingEnabled?: boolean;
|
|
854
|
-
signalsEnabled?: boolean;
|
|
855
|
-
encounterEnabled?: boolean;
|
|
856
|
-
};
|
|
857
|
-
result: {
|
|
858
|
-
ok: boolean;
|
|
859
|
-
remoteAvailable: boolean;
|
|
860
|
-
consent: Record<string, unknown>;
|
|
861
|
-
warning?: string;
|
|
862
|
-
};
|
|
863
|
-
};
|
|
864
835
|
"community.matchRegistry": {
|
|
865
836
|
params: {
|
|
866
837
|
intent: string;
|
|
@@ -872,59 +843,6 @@ export interface AgentRpcMethodMap extends GatewayRpcMethodMap {
|
|
|
872
843
|
matches: Array<Record<string, unknown>>;
|
|
873
844
|
};
|
|
874
845
|
};
|
|
875
|
-
"community.listShared": {
|
|
876
|
-
params: undefined;
|
|
877
|
-
result: {
|
|
878
|
-
ok: boolean;
|
|
879
|
-
resources: Array<Record<string, unknown>>;
|
|
880
|
-
};
|
|
881
|
-
};
|
|
882
|
-
"community.withdrawShared": {
|
|
883
|
-
params: {
|
|
884
|
-
resourceId: string;
|
|
885
|
-
reason?: string;
|
|
886
|
-
};
|
|
887
|
-
result: {
|
|
888
|
-
ok: boolean;
|
|
889
|
-
resource: Record<string, unknown>;
|
|
890
|
-
};
|
|
891
|
-
};
|
|
892
|
-
"community.withdrawAllShared": {
|
|
893
|
-
params: {
|
|
894
|
-
reason?: string;
|
|
895
|
-
};
|
|
896
|
-
result: {
|
|
897
|
-
ok: boolean;
|
|
898
|
-
resources: Array<Record<string, unknown>>;
|
|
899
|
-
};
|
|
900
|
-
};
|
|
901
|
-
"community.listNotices": {
|
|
902
|
-
params: {
|
|
903
|
-
includeRead?: boolean;
|
|
904
|
-
};
|
|
905
|
-
result: {
|
|
906
|
-
ok: boolean;
|
|
907
|
-
notices: Array<Record<string, unknown>>;
|
|
908
|
-
};
|
|
909
|
-
};
|
|
910
|
-
"community.markNoticeRead": {
|
|
911
|
-
params: {
|
|
912
|
-
noticeId: number;
|
|
913
|
-
};
|
|
914
|
-
result: {
|
|
915
|
-
ok: boolean;
|
|
916
|
-
notice: Record<string, unknown>;
|
|
917
|
-
};
|
|
918
|
-
};
|
|
919
|
-
"community.listPublishAudit": {
|
|
920
|
-
params: {
|
|
921
|
-
limit?: number;
|
|
922
|
-
};
|
|
923
|
-
result: {
|
|
924
|
-
ok: boolean;
|
|
925
|
-
entries: Array<Record<string, unknown>>;
|
|
926
|
-
};
|
|
927
|
-
};
|
|
928
846
|
"community.resolveInstall": {
|
|
929
847
|
params: {
|
|
930
848
|
resourceId: string;
|
|
@@ -946,53 +864,6 @@ export interface AgentRpcMethodMap extends GatewayRpcMethodMap {
|
|
|
946
864
|
versions: unknown;
|
|
947
865
|
};
|
|
948
866
|
};
|
|
949
|
-
"community.getRatingSummary": {
|
|
950
|
-
params: {
|
|
951
|
-
resourceId: string;
|
|
952
|
-
};
|
|
953
|
-
result: {
|
|
954
|
-
ok: true;
|
|
955
|
-
summary: unknown;
|
|
956
|
-
};
|
|
957
|
-
};
|
|
958
|
-
"community.rateResource": {
|
|
959
|
-
params: {
|
|
960
|
-
resourceId: string;
|
|
961
|
-
stars: number;
|
|
962
|
-
};
|
|
963
|
-
result: {
|
|
964
|
-
ok: true;
|
|
965
|
-
summary: unknown;
|
|
966
|
-
};
|
|
967
|
-
};
|
|
968
|
-
"community.reportResource": {
|
|
969
|
-
params: {
|
|
970
|
-
resourceId: string;
|
|
971
|
-
reason?: string;
|
|
972
|
-
};
|
|
973
|
-
result: {
|
|
974
|
-
ok: true;
|
|
975
|
-
};
|
|
976
|
-
};
|
|
977
|
-
"community.listComments": {
|
|
978
|
-
params: {
|
|
979
|
-
resourceId: string;
|
|
980
|
-
};
|
|
981
|
-
result: {
|
|
982
|
-
ok: true;
|
|
983
|
-
comments: unknown;
|
|
984
|
-
};
|
|
985
|
-
};
|
|
986
|
-
"community.postComment": {
|
|
987
|
-
params: {
|
|
988
|
-
resourceId: string;
|
|
989
|
-
body: string;
|
|
990
|
-
};
|
|
991
|
-
result: {
|
|
992
|
-
ok: true;
|
|
993
|
-
comment: unknown;
|
|
994
|
-
};
|
|
995
|
-
};
|
|
996
867
|
"community.installResource": {
|
|
997
868
|
params: {
|
|
998
869
|
resourceId: string;
|
|
@@ -1003,7 +874,6 @@ export interface AgentRpcMethodMap extends GatewayRpcMethodMap {
|
|
|
1003
874
|
ok: boolean;
|
|
1004
875
|
installed?: Record<string, unknown>;
|
|
1005
876
|
preview?: Record<string, unknown>;
|
|
1006
|
-
signalWarning?: string;
|
|
1007
877
|
};
|
|
1008
878
|
};
|
|
1009
879
|
"community.runtimeStatus": {
|
|
@@ -1026,65 +896,6 @@ export interface AgentRpcMethodMap extends GatewayRpcMethodMap {
|
|
|
1026
896
|
binPath?: string;
|
|
1027
897
|
};
|
|
1028
898
|
};
|
|
1029
|
-
"community.publishSkill": {
|
|
1030
|
-
params: {
|
|
1031
|
-
id: string;
|
|
1032
|
-
title: string;
|
|
1033
|
-
summary: string;
|
|
1034
|
-
visibility?: "public" | "private";
|
|
1035
|
-
tags?: string[];
|
|
1036
|
-
manifest: Record<string, unknown>;
|
|
1037
|
-
version?: string;
|
|
1038
|
-
packageGzipBase64?: string;
|
|
1039
|
-
};
|
|
1040
|
-
result: {
|
|
1041
|
-
ok: boolean;
|
|
1042
|
-
resource: Record<string, unknown>;
|
|
1043
|
-
version?: Record<string, unknown>;
|
|
1044
|
-
};
|
|
1045
|
-
};
|
|
1046
|
-
"community.publishPet": {
|
|
1047
|
-
params: {
|
|
1048
|
-
id: string;
|
|
1049
|
-
name: string;
|
|
1050
|
-
summary: string;
|
|
1051
|
-
persona: string;
|
|
1052
|
-
visibility?: "public" | "private";
|
|
1053
|
-
tags?: string[];
|
|
1054
|
-
traits?: string[];
|
|
1055
|
-
assets?: Array<{
|
|
1056
|
-
kind: string;
|
|
1057
|
-
path: string;
|
|
1058
|
-
}>;
|
|
1059
|
-
};
|
|
1060
|
-
result: {
|
|
1061
|
-
ok: boolean;
|
|
1062
|
-
resource: Record<string, unknown>;
|
|
1063
|
-
version?: Record<string, unknown>;
|
|
1064
|
-
};
|
|
1065
|
-
};
|
|
1066
|
-
"community.recordSignal": {
|
|
1067
|
-
params: {
|
|
1068
|
-
resourceId: string;
|
|
1069
|
-
event: string;
|
|
1070
|
-
attribution?: string;
|
|
1071
|
-
metadata?: Record<string, unknown>;
|
|
1072
|
-
};
|
|
1073
|
-
result: {
|
|
1074
|
-
ok: boolean;
|
|
1075
|
-
accepted: true;
|
|
1076
|
-
};
|
|
1077
|
-
};
|
|
1078
|
-
"community.recordTelemetry": {
|
|
1079
|
-
params: {
|
|
1080
|
-
event: string;
|
|
1081
|
-
metadata?: Record<string, unknown>;
|
|
1082
|
-
};
|
|
1083
|
-
result: {
|
|
1084
|
-
ok: boolean;
|
|
1085
|
-
accepted: true;
|
|
1086
|
-
};
|
|
1087
|
-
};
|
|
1088
899
|
"agent.health": GatewayRpcMethodMap["agent.health"];
|
|
1089
900
|
"agent.metrics": GatewayRpcMethodMap["agent.metrics"];
|
|
1090
901
|
"agent.cancel": GatewayRpcMethodMap["agent.cancel"];
|
|
@@ -1475,22 +1286,6 @@ export interface AgentRpcMethodMap extends GatewayRpcMethodMap {
|
|
|
1475
1286
|
};
|
|
1476
1287
|
result: Record<string, unknown>;
|
|
1477
1288
|
};
|
|
1478
|
-
"workflow.publishHub": {
|
|
1479
|
-
params: {
|
|
1480
|
-
id: string;
|
|
1481
|
-
slug: string;
|
|
1482
|
-
summary: string;
|
|
1483
|
-
description?: string;
|
|
1484
|
-
tags?: string[];
|
|
1485
|
-
visibility?: "private" | "public";
|
|
1486
|
-
category?: string;
|
|
1487
|
-
version?: string;
|
|
1488
|
-
projectId?: string;
|
|
1489
|
-
};
|
|
1490
|
-
result: {
|
|
1491
|
-
ok: true;
|
|
1492
|
-
} & Record<string, unknown>;
|
|
1493
|
-
};
|
|
1494
1289
|
"workflow.audit": {
|
|
1495
1290
|
params: {
|
|
1496
1291
|
id?: string;
|
|
@@ -1802,6 +1597,16 @@ export interface AgentRpcMethodMap extends GatewayRpcMethodMap {
|
|
|
1802
1597
|
snapshot: unknown | null;
|
|
1803
1598
|
};
|
|
1804
1599
|
};
|
|
1600
|
+
"pet.journey.catchUp": {
|
|
1601
|
+
params: {
|
|
1602
|
+
maxDays?: number;
|
|
1603
|
+
};
|
|
1604
|
+
result: {
|
|
1605
|
+
ok: true;
|
|
1606
|
+
dates: string[];
|
|
1607
|
+
latest: unknown | null;
|
|
1608
|
+
};
|
|
1609
|
+
};
|
|
1805
1610
|
"pet.custom.delete": {
|
|
1806
1611
|
params: {
|
|
1807
1612
|
id: string;
|
|
@@ -449,6 +449,12 @@ export interface MemoryUpdatedNotification {
|
|
|
449
449
|
entryCount?: number;
|
|
450
450
|
summary?: string;
|
|
451
451
|
}
|
|
452
|
+
/** Project knowledge base instruction file changed. */
|
|
453
|
+
export interface InstructionsUpdatedNotification {
|
|
454
|
+
projectId?: string;
|
|
455
|
+
action: "write" | "delete";
|
|
456
|
+
filename: string;
|
|
457
|
+
}
|
|
452
458
|
/** Skills list changed (activated/deactivated/learned/deleted). */
|
|
453
459
|
export interface SkillsUpdatedNotification {
|
|
454
460
|
action: "activate" | "deactivate" | "delete" | "learn" | "promote";
|
|
@@ -1008,6 +1014,7 @@ export interface NotificationMethodMap {
|
|
|
1008
1014
|
"turn.skill_acquisition_needed": TurnSkillAcquisitionNeededNotification;
|
|
1009
1015
|
"turn.ask_user": TurnAskUserNotification;
|
|
1010
1016
|
"memory.updated": MemoryUpdatedNotification;
|
|
1017
|
+
"instructions.updated": InstructionsUpdatedNotification;
|
|
1011
1018
|
"memory.decay.completed": MemoryDecayCompletedNotification;
|
|
1012
1019
|
"skills.updated": SkillsUpdatedNotification;
|
|
1013
1020
|
"session.info": SessionInfoNotification;
|
|
@@ -1,63 +1,4 @@
|
|
|
1
1
|
import type { ConfigPort } from "../ports/index.js";
|
|
2
|
-
import type { ActivityEvent } from "./activity-event.js";
|
|
3
|
-
import type { CommunityTelemetryEvent } from "./community-telemetry-types.js";
|
|
4
|
-
export interface CommunityConsentView {
|
|
5
|
-
enabled: boolean;
|
|
6
|
-
methodSharingEnabled: boolean;
|
|
7
|
-
signalsEnabled: boolean;
|
|
8
|
-
encounterEnabled: boolean;
|
|
9
|
-
remoteSynced: boolean;
|
|
10
|
-
}
|
|
11
|
-
export interface SetCommunityConsentInput {
|
|
12
|
-
enabled: boolean;
|
|
13
|
-
methodSharingEnabled?: boolean;
|
|
14
|
-
signalsEnabled?: boolean;
|
|
15
|
-
encounterEnabled?: boolean;
|
|
16
|
-
}
|
|
17
|
-
export interface CommunityConsentClient {
|
|
18
|
-
getConsent(): Promise<CommunityConsentView>;
|
|
19
|
-
setConsent(input: SetCommunityConsentInput): Promise<CommunityConsentView>;
|
|
20
|
-
matchRegistry(input: CommunityRegistryMatchInput): Promise<CommunityRegistryMatchResult[]>;
|
|
21
|
-
publishSkill(input: CommunityPublishSkillInput): Promise<CommunityPublishSkillResult>;
|
|
22
|
-
publishPet(input: CommunityPublishSkillInput): Promise<CommunityPublishSkillResult>;
|
|
23
|
-
/** Publish a workflow resource (IT-5): manifest + sanitized-bundle gzip payload. */
|
|
24
|
-
publishWorkflow(input: CommunityPublishSkillInput): Promise<CommunityPublishSkillResult>;
|
|
25
|
-
recordSignal(input: CommunityRecordSignalInput): Promise<CommunityRecordSignalResult>;
|
|
26
|
-
recordTelemetry(input: CommunityRecordTelemetryInput): Promise<CommunityRecordTelemetryResult>;
|
|
27
|
-
resolveInstall(resourceId: string, version?: string): Promise<CommunityInstallResolution>;
|
|
28
|
-
/** List a resource's published versions for the version/rollback menu (WS-B3). The
|
|
29
|
-
* default client always implements it; optional so lightweight mocks may omit it. */
|
|
30
|
-
listResourceVersions?(resourceId: string): Promise<CommunityResourceVersion[]>;
|
|
31
|
-
/** Rate a resource 1–5 (WS-B4); returns the new summary. Optional for mocks. */
|
|
32
|
-
rateResource?(resourceId: string, stars: number): Promise<CommunityRatingSummary>;
|
|
33
|
-
/** Current rating average + count (WS-B4). Optional for mocks. */
|
|
34
|
-
getRatingSummary?(resourceId: string): Promise<CommunityRatingSummary>;
|
|
35
|
-
/** Report a resource for abuse (WS-B4). Optional for mocks. */
|
|
36
|
-
reportResource?(resourceId: string, reason?: string): Promise<void>;
|
|
37
|
-
/** List community comments for a resource (WS-B4). Optional for mocks. */
|
|
38
|
-
listComments?(resourceId: string): Promise<CommunityComment[]>;
|
|
39
|
-
/** Post a community comment (WS-B4); new accounts are folded by the Hub. Optional for mocks. */
|
|
40
|
-
postComment?(resourceId: string, body: string): Promise<CommunityCommentPosted>;
|
|
41
|
-
/** Cut2: emit one ActivityEvent to community-service (social channel, non-authoritative). Optional for mocks. */
|
|
42
|
-
emitActivity?(event: ActivityEvent): Promise<void>;
|
|
43
|
-
/** Cut4: author an agent review for a resource (social channel). Optional for mocks. */
|
|
44
|
-
recordCommunityReview?(input: CommunityReviewInput): Promise<void>;
|
|
45
|
-
/** Cut4: semantic-search peer agent experiences (bge-m3 over community_review) → community_seek answer family. Optional for mocks. */
|
|
46
|
-
findReviewAnswers?(query: string, topK?: number): Promise<CommunityReviewAnswer[]>;
|
|
47
|
-
/** Cut4: post a help request to the community (social channel). Optional for mocks. */
|
|
48
|
-
recordCommunityAsk?(input: CommunityAskInput): Promise<void>;
|
|
49
|
-
/** Cut4: answer a peer's help request (social channel). Optional for mocks. */
|
|
50
|
-
recordCommunityAnswer?(input: CommunityAnswerInput): Promise<void>;
|
|
51
|
-
/** Cut5: record a pet-to-pet interaction (gated by roaming/gateSocialEvent first). Optional for mocks. */
|
|
52
|
-
recordCommunityInteraction?(input: CommunityInteractionInput): Promise<void>;
|
|
53
|
-
/** Resolve a vetted runtime binary (e.g. officecli) for this platform → Hub-signed download. */
|
|
54
|
-
resolveRuntime(id: string, platform: string): Promise<CommunityRuntimeResolution>;
|
|
55
|
-
listSharedResources(): Promise<CommunitySharedResource[]>;
|
|
56
|
-
withdrawSharedResource(resourceId: string, reason?: string): Promise<CommunitySharedResource>;
|
|
57
|
-
withdrawSharedResources(reason?: string): Promise<CommunitySharedResource[]>;
|
|
58
|
-
listNotices(input?: CommunityListNoticesInput): Promise<CommunityNotice[]>;
|
|
59
|
-
markNoticeRead(noticeId: number): Promise<CommunityNotice>;
|
|
60
|
-
}
|
|
61
2
|
export interface CommunityRuntimeResolution {
|
|
62
3
|
id: string;
|
|
63
4
|
version: string;
|
|
@@ -66,21 +7,6 @@ export interface CommunityRuntimeResolution {
|
|
|
66
7
|
checksum: string;
|
|
67
8
|
sizeBytes: number;
|
|
68
9
|
}
|
|
69
|
-
export interface CommunitySharedResource {
|
|
70
|
-
id: string;
|
|
71
|
-
type: string;
|
|
72
|
-
title: string;
|
|
73
|
-
summary: string;
|
|
74
|
-
visibility: string;
|
|
75
|
-
latestVersion: string | null;
|
|
76
|
-
withdrawn: boolean;
|
|
77
|
-
withdrawnAt: string | null;
|
|
78
|
-
}
|
|
79
|
-
export interface CommunityPublishedVersion {
|
|
80
|
-
version: string;
|
|
81
|
-
checksum: string;
|
|
82
|
-
sizeBytes: number;
|
|
83
|
-
}
|
|
84
10
|
export interface CommunityRegistryMatchInput {
|
|
85
11
|
intent: string;
|
|
86
12
|
topK?: number;
|
|
@@ -101,102 +27,6 @@ export interface CommunityRegistryMatchResult {
|
|
|
101
27
|
latestVersion: string | null;
|
|
102
28
|
canonical: true;
|
|
103
29
|
}
|
|
104
|
-
export interface CommunityPublishSkillInput {
|
|
105
|
-
id: string;
|
|
106
|
-
title: string;
|
|
107
|
-
summary: string;
|
|
108
|
-
visibility?: "public" | "private";
|
|
109
|
-
/** Hub official category key (RESOURCE_CATEGORIES; hub rejects unknown keys). */
|
|
110
|
-
category?: string;
|
|
111
|
-
tags?: string[];
|
|
112
|
-
manifest: Record<string, unknown>;
|
|
113
|
-
version?: string;
|
|
114
|
-
packageGzipBase64?: string;
|
|
115
|
-
}
|
|
116
|
-
export interface CommunityPublishSkillResult {
|
|
117
|
-
resource: CommunitySharedResource;
|
|
118
|
-
version?: CommunityPublishedVersion;
|
|
119
|
-
}
|
|
120
|
-
export type CommunitySignalEvent = "installed" | "success" | "fail" | "neutral" | "kept" | "uninstalled" | "endorse" | "error";
|
|
121
|
-
export interface CommunityRecordSignalInput {
|
|
122
|
-
resourceId: string;
|
|
123
|
-
event: CommunitySignalEvent;
|
|
124
|
-
attribution?: string;
|
|
125
|
-
metadata?: Record<string, unknown>;
|
|
126
|
-
}
|
|
127
|
-
export interface CommunityRecordSignalResult {
|
|
128
|
-
accepted: true;
|
|
129
|
-
}
|
|
130
|
-
/** Cut4:agent 撰写的评价(经历 + 结果 + 场景)。experience 须已过 soul.ts 脱敏(R24)。 */
|
|
131
|
-
export interface CommunityReviewInput {
|
|
132
|
-
id: string;
|
|
133
|
-
resourceId: string;
|
|
134
|
-
/** 不可逆 petKey(derivePetKey)。 */
|
|
135
|
-
actorPetId: string;
|
|
136
|
-
experience: string;
|
|
137
|
-
outcome: "success" | "fail" | "neutral";
|
|
138
|
-
contextCategory?: string;
|
|
139
|
-
ts: number;
|
|
140
|
-
}
|
|
141
|
-
/** Cut4 经验答案(community_seek 答案族源):hub /reviews/search 的 bge-m3 语义检索结果。 */
|
|
142
|
-
export interface CommunityReviewAnswer {
|
|
143
|
-
id: string;
|
|
144
|
-
resourceId: string;
|
|
145
|
-
actorPetId: string;
|
|
146
|
-
experience: string;
|
|
147
|
-
outcome: "success" | "fail" | "neutral";
|
|
148
|
-
contextCategory: string | null;
|
|
149
|
-
ts: number;
|
|
150
|
-
}
|
|
151
|
-
/** Cut4 求助频道:agent 发求助帖。question 须已脱敏(R24)。 */
|
|
152
|
-
export interface CommunityAskInput {
|
|
153
|
-
id: string;
|
|
154
|
-
askerPetId: string;
|
|
155
|
-
question: string;
|
|
156
|
-
contextCategory?: string;
|
|
157
|
-
ts: number;
|
|
158
|
-
}
|
|
159
|
-
/** Cut4 求助频道:对端 agent 应答。answer 须已脱敏(R24)。 */
|
|
160
|
-
export interface CommunityAnswerInput {
|
|
161
|
-
id: string;
|
|
162
|
-
askId: string;
|
|
163
|
-
answererPetId: string;
|
|
164
|
-
answer: string;
|
|
165
|
-
ts: number;
|
|
166
|
-
}
|
|
167
|
-
/** Cut5 宠物互动:greet/share/mention。须已过 gateSocialEvent 游历门控放行。 */
|
|
168
|
-
export interface CommunityInteractionInput {
|
|
169
|
-
id: string;
|
|
170
|
-
kind: "greet" | "share" | "mention";
|
|
171
|
-
actorPetId: string;
|
|
172
|
-
peerPetId: string;
|
|
173
|
-
payload?: Record<string, unknown>;
|
|
174
|
-
ts: number;
|
|
175
|
-
}
|
|
176
|
-
export interface CommunityRecordTelemetryInput {
|
|
177
|
-
event: CommunityTelemetryEvent;
|
|
178
|
-
metadata?: Record<string, unknown>;
|
|
179
|
-
}
|
|
180
|
-
export interface CommunityRecordTelemetryResult {
|
|
181
|
-
accepted: true;
|
|
182
|
-
}
|
|
183
|
-
/** Notice event set, mirrors the Hub's opened CHECK (cross-cutting ④). */
|
|
184
|
-
export type CommunityNoticeEvent = "withdrawn" | "version-available" | "deprecated" | "version-yanked" | "frozen";
|
|
185
|
-
export interface CommunityNotice {
|
|
186
|
-
id: number;
|
|
187
|
-
resourceId: string;
|
|
188
|
-
resourceType: string;
|
|
189
|
-
title: string;
|
|
190
|
-
event: CommunityNoticeEvent;
|
|
191
|
-
version: string | null;
|
|
192
|
-
reason: string | null;
|
|
193
|
-
read: boolean;
|
|
194
|
-
createdAt: string;
|
|
195
|
-
readAt: string | null;
|
|
196
|
-
}
|
|
197
|
-
export interface CommunityListNoticesInput {
|
|
198
|
-
includeRead?: boolean;
|
|
199
|
-
}
|
|
200
30
|
export type CommunityInstallRiskTier = "R0" | "R1" | "R2" | "R3";
|
|
201
31
|
export type CommunityInstallSourceTier = "official" | "community";
|
|
202
32
|
export type CommunityInstallTrustStage = "quarantine" | "trial" | "trusted";
|
|
@@ -229,21 +59,6 @@ export interface CommunityResourceVersion {
|
|
|
229
59
|
sizeBytes: number;
|
|
230
60
|
yanked: boolean;
|
|
231
61
|
}
|
|
232
|
-
export interface CommunityRatingSummary {
|
|
233
|
-
average: number;
|
|
234
|
-
count: number;
|
|
235
|
-
}
|
|
236
|
-
export interface CommunityComment {
|
|
237
|
-
id: number;
|
|
238
|
-
body: string;
|
|
239
|
-
folded: boolean;
|
|
240
|
-
createdAt: string;
|
|
241
|
-
}
|
|
242
|
-
export interface CommunityCommentPosted {
|
|
243
|
-
id: number;
|
|
244
|
-
folded: boolean;
|
|
245
|
-
createdAt: string;
|
|
246
|
-
}
|
|
247
62
|
export interface CommunityConsentClientOptions {
|
|
248
63
|
baseUrl: string;
|
|
249
64
|
token: string;
|
|
@@ -255,6 +70,14 @@ export interface CommunityConsentClientOptions {
|
|
|
255
70
|
*/
|
|
256
71
|
clientVersion?: string;
|
|
257
72
|
}
|
|
73
|
+
export interface CommunityConsentClient {
|
|
74
|
+
matchRegistry(input: CommunityRegistryMatchInput): Promise<CommunityRegistryMatchResult[]>;
|
|
75
|
+
resolveInstall(resourceId: string, version?: string): Promise<CommunityInstallResolution>;
|
|
76
|
+
/** List a resource's published versions for the version/rollback menu (WS-B3). The
|
|
77
|
+
* default client always implements it; optional so lightweight mocks may omit it. */
|
|
78
|
+
listResourceVersions?(resourceId: string): Promise<CommunityResourceVersion[]>;
|
|
79
|
+
/** Resolve a vetted runtime binary (e.g. officecli) for this platform → Hub-signed download. */
|
|
80
|
+
resolveRuntime(id: string, platform: string): Promise<CommunityRuntimeResolution>;
|
|
81
|
+
}
|
|
258
82
|
export declare function createCommunityConsentClient(options: CommunityConsentClientOptions): CommunityConsentClient;
|
|
259
83
|
export declare function createDefaultCommunityConsentClient(configPort?: ConfigPort): CommunityConsentClient | null;
|
|
260
|
-
export declare function normalizeCommunityConsent(value: unknown, remoteSynced: boolean): CommunityConsentView;
|
|
@@ -12,7 +12,7 @@ export interface CommunityDiscoveryResult {
|
|
|
12
12
|
error?: string;
|
|
13
13
|
}
|
|
14
14
|
export interface CommunityDiscoveryCoordinatorOptions {
|
|
15
|
-
client: Pick<CommunityConsentClient, "
|
|
15
|
+
client: Pick<CommunityConsentClient, "matchRegistry"> | null;
|
|
16
16
|
cache?: CommunityDiscoveryCache;
|
|
17
17
|
localIndex?: LocalCommunityResourceIndex;
|
|
18
18
|
topK?: number;
|
|
@@ -28,6 +28,6 @@ export declare class DefaultPathService implements PathService {
|
|
|
28
28
|
getProjectInstructionsPath(projectRoot?: string): string;
|
|
29
29
|
getProjectPluginsDir(projectRoot?: string): string;
|
|
30
30
|
getProjectRulesDir(projectRoot?: string): string;
|
|
31
|
-
|
|
31
|
+
getProjectSessionDataRoot(projectIdOrWorkspaceDir?: string): string;
|
|
32
32
|
}
|
|
33
33
|
export declare function getDefaultPathService(): PathService;
|
|
@@ -99,6 +99,18 @@ export interface FeedbackStateEntry {
|
|
|
99
99
|
state: FeedbackState;
|
|
100
100
|
updatedAt: string;
|
|
101
101
|
}
|
|
102
|
+
export interface FeedbackSummary {
|
|
103
|
+
total: number;
|
|
104
|
+
active: number;
|
|
105
|
+
retracted: number;
|
|
106
|
+
replaced: number;
|
|
107
|
+
upCount: number;
|
|
108
|
+
downCount: number;
|
|
109
|
+
byReason: Record<string, number>;
|
|
110
|
+
byModel: Record<string, number>;
|
|
111
|
+
byAgentMode: Record<string, number>;
|
|
112
|
+
telemetryStatusCounts: Record<TelemetryStatus, number>;
|
|
113
|
+
}
|
|
102
114
|
export declare function hashMessageContent(content: string): string;
|
|
103
115
|
/**
|
|
104
116
|
* Create / switch / re-activate the feedback for a turn. Returns the stable feedbackId and the
|
|
@@ -134,6 +146,13 @@ export declare function getFeedbackState(input: {
|
|
|
134
146
|
}): Promise<{
|
|
135
147
|
states: FeedbackStateEntry[];
|
|
136
148
|
}>;
|
|
149
|
+
/** Local single-instance aggregate used by messageFeedback.summary. Raw message text is not returned. */
|
|
150
|
+
export declare function summarizeFeedback(input: {
|
|
151
|
+
projectId: string;
|
|
152
|
+
sessionId?: string;
|
|
153
|
+
since?: string;
|
|
154
|
+
until?: string;
|
|
155
|
+
}): Promise<FeedbackSummary>;
|
|
137
156
|
/**
|
|
138
157
|
* Events eligible for cloud upload that have not yet been assigned to a batch (design §10). The
|
|
139
158
|
* worker redacts + ships these; once assigned a batchId (delivered or queued for retry) they are
|
|
@@ -12,11 +12,11 @@
|
|
|
12
12
|
* central-registry dependency for the storage key. Deleting a project = `rm` projectData/<id>/.
|
|
13
13
|
*/
|
|
14
14
|
export { getProjectDataDirById, getProjectDataRoot } from "./agent-paths.js";
|
|
15
|
-
/** `~/.qlogicagent/profiles/<owner>/projectData/<projectId>/`
|
|
16
|
-
export declare function getProjectDataDir(
|
|
15
|
+
/** `~/.qlogicagent/profiles/<owner>/projectData/<projectId>/` for a projectId or workspaceDir. */
|
|
16
|
+
export declare function getProjectDataDir(projectIdOrWorkspaceDir: string): string;
|
|
17
17
|
/** `projectData/<id>/sessions/` */
|
|
18
|
-
export declare function getProjectDataSessionsRoot(
|
|
18
|
+
export declare function getProjectDataSessionsRoot(projectIdOrWorkspaceDir: string): string;
|
|
19
19
|
/** `projectData/<id>/checkpoints/` or `.../checkpoints/<sessionId>` */
|
|
20
|
-
export declare function getProjectDataCheckpointsDir(
|
|
20
|
+
export declare function getProjectDataCheckpointsDir(projectIdOrWorkspaceDir: string, sessionId?: string): string;
|
|
21
21
|
/** `projectData/<id>/uploads/` or `.../uploads/<sessionId>` */
|
|
22
|
-
export declare function getProjectDataUploadsDir(
|
|
22
|
+
export declare function getProjectDataUploadsDir(projectIdOrWorkspaceDir: string, sessionId?: string): string;
|
|
@@ -26,6 +26,10 @@ export interface ResolvedSkill {
|
|
|
26
26
|
systemGenerated: boolean;
|
|
27
27
|
description?: string;
|
|
28
28
|
version?: string;
|
|
29
|
+
/** Frontmatter classification (Hub category vocabulary: efficiency/dev/writing/…) — drives the card palette. */
|
|
30
|
+
category?: string;
|
|
31
|
+
/** Frontmatter author — agent-authored skills carry "用户". */
|
|
32
|
+
author?: string;
|
|
29
33
|
requiredTools?: string[];
|
|
30
34
|
environments?: string[];
|
|
31
35
|
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Daily journey summarizer — orchestrates the day's local-work summary:
|
|
3
|
+
* aggregate → deterministic stats → pet-voice prompt → LLM narrative → JourneySnapshot.
|
|
4
|
+
*
|
|
5
|
+
* IO (aggregation, soul, LLM) is injected so this stays unit-testable. The LLM call
|
|
6
|
+
* signature is declared locally (not imported from cli/pet-runtime) to keep the
|
|
7
|
+
* runtime layer free of a cli dependency; the caller passes petRuntime.createSmallLLMCall().
|
|
8
|
+
* If the LLM is unavailable or fails, a deterministic templated narrative is used so the
|
|
9
|
+
* journey always renders.
|
|
10
|
+
*/
|
|
11
|
+
import type { PetSoul } from "./pet-types.js";
|
|
12
|
+
import type { DayDigest } from "./journey-day-aggregator.js";
|
|
13
|
+
import type { JourneySnapshot } from "./pet-profile-service.js";
|
|
14
|
+
export type JourneyLlmCall = (prompt: string, maxTokens: number) => Promise<string | null>;
|
|
15
|
+
export interface SummarizeDayOptions {
|
|
16
|
+
date: string;
|
|
17
|
+
petName: string;
|
|
18
|
+
aggregate: () => Promise<DayDigest>;
|
|
19
|
+
resolveSoul: () => PetSoul | null;
|
|
20
|
+
llmCall: JourneyLlmCall | undefined;
|
|
21
|
+
generator?: "auto" | "manual";
|
|
22
|
+
/** Injectable clock (ISO) for deterministic tests. */
|
|
23
|
+
now?: () => string;
|
|
24
|
+
}
|
|
25
|
+
export declare function summarizeDay(opts: SummarizeDayOptions): Promise<JourneySnapshot | null>;
|
|
@@ -12,7 +12,8 @@ export type { PetdexAnimationId, PetdexValidationReport } from "@xiaozhiclaw/pet
|
|
|
12
12
|
export type { ReactionPool, LLMReactionContext, ReactionStyle } from "@xiaozhiclaw/pet-core";
|
|
13
13
|
export { PetSoulService } from "./pet-soul-service.js";
|
|
14
14
|
export { petReactionEngine } from "./pet-reaction-engine.js";
|
|
15
|
-
export { PetProfileService, type PetProfile, type PetPreferences, type PetdexPetAsset, type PetdexPetAssetSummary, type JourneySnapshot } from "./pet-profile-service.js";
|
|
15
|
+
export { PetProfileService, type PetProfile, type PetPreferences, type PetdexPetAsset, type PetdexPetAssetSummary, type JourneySnapshot, type JourneyStats } from "./pet-profile-service.js";
|
|
16
|
+
export { catchUpJourney, readTurnTelemetryDir, type CatchUpJourneyOptions } from "./journey-catchup.js";
|
|
16
17
|
export { createPetdexAssetFromSpritesheet, listBuiltinPetdexAssetIds, listBuiltinPetdexAssets, writePetdexAssetPackage } from "./petdex-asset.js";
|
|
17
18
|
export { forgePetdexAsset, forgePetdexAssetPackage, readGeneratedPetdexImage } from "./petdex-forge-service.js";
|
|
18
19
|
export { loadPetFile, validatePetManifest, type PetManifest, type PetFileBundle } from "./pet-file-loader.js";
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { TurnTelemetrySnapshot } from "../infra/turn-telemetry-store.js";
|
|
2
|
+
import { type JourneyLlmCall } from "./daily-journey-summarizer.js";
|
|
3
|
+
/** All persisted turn-telemetry records for one project (best-effort; missing/corrupt → skip). */
|
|
4
|
+
export declare function readTurnTelemetryDir(projectId: string): TurnTelemetrySnapshot[];
|
|
5
|
+
export interface CatchUpJourneyOptions {
|
|
6
|
+
/** Look-back window of completed days (default 7, capped at retention). */
|
|
7
|
+
maxDays?: number;
|
|
8
|
+
generator?: "auto" | "manual";
|
|
9
|
+
llmCall: JourneyLlmCall | undefined;
|
|
10
|
+
listProjectIds: () => string[];
|
|
11
|
+
log?: (message: string) => void;
|
|
12
|
+
}
|
|
13
|
+
/** Backfill missing completed-day journey snapshots. Returns the dates generated this run. */
|
|
14
|
+
export declare function catchUpJourney(ownerUserId: string, opts: CatchUpJourneyOptions): Promise<string[]>;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Journey day aggregator — collapses a day's turn telemetry (across all of an owner's
|
|
3
|
+
* projects) into a deterministic DayDigest. IO is injected (project list + per-project
|
|
4
|
+
* telemetry reader) so this stays pure and unit-testable; the caller wires the real
|
|
5
|
+
* project store + filesystem reader.
|
|
6
|
+
*
|
|
7
|
+
* Stats are computed here deterministically (never by an LLM) so the journey never
|
|
8
|
+
* shows invented numbers — the LLM only writes the narrative prose from these facts.
|
|
9
|
+
*/
|
|
10
|
+
import type { TurnTelemetrySnapshot } from "../infra/turn-telemetry-store.js";
|
|
11
|
+
export interface DayDigest {
|
|
12
|
+
date: string;
|
|
13
|
+
turns: number;
|
|
14
|
+
filesChanged: number;
|
|
15
|
+
toolsUsed: string[];
|
|
16
|
+
projects: string[];
|
|
17
|
+
models: string[];
|
|
18
|
+
modes: Record<string, number>;
|
|
19
|
+
topChangedPaths: string[];
|
|
20
|
+
}
|
|
21
|
+
export interface JourneyDayDeps {
|
|
22
|
+
/** All registered project ids for the owner. */
|
|
23
|
+
listProjectIds(): string[];
|
|
24
|
+
/** All persisted turn-telemetry records for one project (any date). */
|
|
25
|
+
readProjectTurns(projectId: string): Promise<TurnTelemetrySnapshot[]>;
|
|
26
|
+
}
|
|
27
|
+
export declare function aggregateOwnerDay(date: string, deps: JourneyDayDeps): Promise<DayDigest>;
|