qlogicagent 2.16.6 → 2.16.8
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/agent.js +16 -16
- package/dist/cli.js +412 -413
- package/dist/default-project-knowledge/INSTRUCTIONS.md +7 -0
- package/dist/default-project-knowledge/rules/project-workflow.md +6 -0
- package/dist/index.js +411 -412
- package/dist/protocol.js +1 -1
- package/dist/types/cli/agent-runtime-bootstrap.d.ts +1 -0
- package/dist/types/cli/base-tool-bootstrap.d.ts +3 -0
- package/dist/types/cli/handlers/community-handler.d.ts +2 -28
- package/dist/types/cli/handlers/files-handler.d.ts +6 -0
- package/dist/types/cli/handlers/message-feedback-handler.d.ts +31 -0
- package/dist/types/cli/handlers/pet-handler.d.ts +1 -0
- package/dist/types/cli/handlers/project-handler.d.ts +1 -0
- package/dist/types/cli/handlers/turn-baseline-handler.d.ts +8 -0
- package/dist/types/cli/handlers/turn-handler.d.ts +5 -0
- package/dist/types/cli/handlers/workflow-handler.d.ts +0 -11
- package/dist/types/cli/handlers/working-materials-handler.d.ts +9 -0
- package/dist/types/cli/idle-dream-coordinator.d.ts +6 -0
- package/dist/types/cli/mcp-bootstrap.d.ts +1 -0
- package/dist/types/cli/memory-coordinator.d.ts +1 -0
- package/dist/types/cli/project-template-seeder.d.ts +2 -2
- package/dist/types/cli/rpc-registry.d.ts +6 -0
- package/dist/types/cli/runtime-hook-bootstrap.d.ts +1 -0
- package/dist/types/cli/stdio-agent-session-bootstrap.d.ts +1 -0
- package/dist/types/cli/stdio-rpc-handler-hosts.d.ts +1 -0
- package/dist/types/cli/stdio-runtime-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 +2 -0
- package/dist/types/cli/tool-bootstrap.d.ts +2 -0
- package/dist/types/cli/turn-skill-autopersist.d.ts +0 -25
- package/dist/types/protocol/methods.d.ts +24 -201
- package/dist/types/protocol/wire/agent-events.d.ts +2 -2
- package/dist/types/protocol/wire/agent-methods.d.ts +10 -205
- package/dist/types/protocol/wire/gateway-rpc.d.ts +160 -0
- package/dist/types/protocol/wire/notification-payloads.d.ts +34 -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-distillation-worker.d.ts +20 -0
- package/dist/types/runtime/infra/feedback-distillation.d.ts +30 -0
- package/dist/types/runtime/infra/feedback-event-store.d.ts +179 -0
- package/dist/types/runtime/infra/feedback-outbox.d.ts +26 -0
- package/dist/types/runtime/infra/feedback-redaction.d.ts +71 -0
- package/dist/types/runtime/infra/feedback-upload-client.d.ts +40 -0
- package/dist/types/runtime/infra/feedback-upload-worker.d.ts +11 -0
- package/dist/types/runtime/infra/project-data-paths.d.ts +5 -5
- package/dist/types/runtime/infra/turn-baseline-store.d.ts +102 -0
- package/dist/types/runtime/infra/turn-telemetry-store.d.ts +59 -0
- package/dist/types/runtime/infra/working-materials-store.d.ts +35 -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/memory-provider.d.ts +6 -0
- package/dist/types/runtime/ports/path-service.d.ts +1 -1
- package/dist/types/runtime/ports/tool-contracts.d.ts +2 -0
- package/dist/types/runtime/prompt/fresh-workspace-evidence.d.ts +14 -0
- package/dist/types/runtime/prompt/instruction-loader.d.ts +7 -7
- package/dist/types/skills/mcp/mcp-manager.d.ts +11 -0
- package/dist/types/skills/memory/local-memory-provider.d.ts +3 -3
- package/dist/types/skills/memory/local-store-records.d.ts +18 -1
- package/dist/types/skills/memory/local-store.d.ts +8 -195
- package/dist/types/skills/memory/memory-consolidation.d.ts +14 -0
- package/dist/types/skills/memory/sqlite-memory-schema.d.ts +1 -1
- package/dist/types/skills/plugins/plugin-marketplace.d.ts +1 -1
- 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
|
@@ -408,13 +408,71 @@ export interface GatewayRpcMethodMap {
|
|
|
408
408
|
newPath?: string;
|
|
409
409
|
};
|
|
410
410
|
};
|
|
411
|
+
"files.move": {
|
|
412
|
+
params: {
|
|
413
|
+
projectId: string;
|
|
414
|
+
sourcePath: string;
|
|
415
|
+
targetDir: string;
|
|
416
|
+
conflictStrategy?: "error" | "keepBoth" | "replace" | "skip";
|
|
417
|
+
};
|
|
418
|
+
result: {
|
|
419
|
+
ok: boolean;
|
|
420
|
+
newPath?: string;
|
|
421
|
+
operationId?: string;
|
|
422
|
+
movedFrom?: string;
|
|
423
|
+
movedTo?: string;
|
|
424
|
+
skipped?: string[];
|
|
425
|
+
};
|
|
426
|
+
};
|
|
427
|
+
"files.copy": {
|
|
428
|
+
params: {
|
|
429
|
+
projectId: string;
|
|
430
|
+
sourcePath: string;
|
|
431
|
+
targetDir: string;
|
|
432
|
+
conflictStrategy?: "error" | "keepBoth" | "replace" | "skip";
|
|
433
|
+
};
|
|
434
|
+
result: {
|
|
435
|
+
ok: boolean;
|
|
436
|
+
newPath?: string;
|
|
437
|
+
operationId?: string;
|
|
438
|
+
createdPaths?: string[];
|
|
439
|
+
skipped?: string[];
|
|
440
|
+
};
|
|
441
|
+
};
|
|
442
|
+
"files.undoOperation": {
|
|
443
|
+
params: {
|
|
444
|
+
projectId: string;
|
|
445
|
+
operationId: string;
|
|
446
|
+
};
|
|
447
|
+
result: {
|
|
448
|
+
ok: boolean;
|
|
449
|
+
};
|
|
450
|
+
};
|
|
411
451
|
"files.delete": {
|
|
412
452
|
params: {
|
|
413
453
|
projectId: string;
|
|
414
454
|
path: string;
|
|
455
|
+
mode?: "trash" | "permanent";
|
|
415
456
|
};
|
|
416
457
|
result: {
|
|
417
458
|
ok: boolean;
|
|
459
|
+
operationId?: string;
|
|
460
|
+
trashed?: boolean;
|
|
461
|
+
};
|
|
462
|
+
};
|
|
463
|
+
"files.search": {
|
|
464
|
+
params: {
|
|
465
|
+
projectId: string;
|
|
466
|
+
query: string;
|
|
467
|
+
limit?: number;
|
|
468
|
+
};
|
|
469
|
+
result: {
|
|
470
|
+
matches: Array<{
|
|
471
|
+
name: string;
|
|
472
|
+
path: string;
|
|
473
|
+
type: "file" | "directory";
|
|
474
|
+
}>;
|
|
475
|
+
truncated: boolean;
|
|
418
476
|
};
|
|
419
477
|
};
|
|
420
478
|
"files.gitStatus": {
|
|
@@ -428,6 +486,108 @@ export interface GatewayRpcMethodMap {
|
|
|
428
486
|
}>;
|
|
429
487
|
};
|
|
430
488
|
};
|
|
489
|
+
"turnBaseline.getSummary": {
|
|
490
|
+
params: {
|
|
491
|
+
projectId: string;
|
|
492
|
+
turnId: string;
|
|
493
|
+
};
|
|
494
|
+
result: {
|
|
495
|
+
summary: unknown | null;
|
|
496
|
+
};
|
|
497
|
+
};
|
|
498
|
+
"turnBaseline.getFileDiff": {
|
|
499
|
+
params: {
|
|
500
|
+
projectId: string;
|
|
501
|
+
turnId: string;
|
|
502
|
+
path: string;
|
|
503
|
+
};
|
|
504
|
+
result: {
|
|
505
|
+
path: string;
|
|
506
|
+
previousPath?: string;
|
|
507
|
+
status: string;
|
|
508
|
+
original: string;
|
|
509
|
+
modified: string;
|
|
510
|
+
language?: string;
|
|
511
|
+
additions?: number;
|
|
512
|
+
deletions?: number;
|
|
513
|
+
};
|
|
514
|
+
};
|
|
515
|
+
"turnBaseline.listRecent": {
|
|
516
|
+
params: {
|
|
517
|
+
projectId: string;
|
|
518
|
+
sessionId?: string;
|
|
519
|
+
limit?: number;
|
|
520
|
+
};
|
|
521
|
+
result: {
|
|
522
|
+
summaries: unknown[];
|
|
523
|
+
};
|
|
524
|
+
};
|
|
525
|
+
"turnBaseline.getFileBaseline": {
|
|
526
|
+
params: {
|
|
527
|
+
projectId: string;
|
|
528
|
+
turnId: string;
|
|
529
|
+
path: string;
|
|
530
|
+
};
|
|
531
|
+
result: {
|
|
532
|
+
path: string;
|
|
533
|
+
content: string | null;
|
|
534
|
+
snapshot: unknown | null;
|
|
535
|
+
};
|
|
536
|
+
};
|
|
537
|
+
"workingMaterials.get": {
|
|
538
|
+
params: {
|
|
539
|
+
projectId: string;
|
|
540
|
+
sessionId: string;
|
|
541
|
+
};
|
|
542
|
+
result: {
|
|
543
|
+
items: unknown[];
|
|
544
|
+
missing: unknown[];
|
|
545
|
+
};
|
|
546
|
+
};
|
|
547
|
+
"workingMaterials.replace": {
|
|
548
|
+
params: {
|
|
549
|
+
projectId: string;
|
|
550
|
+
sessionId: string;
|
|
551
|
+
items: unknown[];
|
|
552
|
+
};
|
|
553
|
+
result: {
|
|
554
|
+
ok: boolean;
|
|
555
|
+
items: unknown[];
|
|
556
|
+
};
|
|
557
|
+
};
|
|
558
|
+
"workingMaterials.upsert": {
|
|
559
|
+
params: {
|
|
560
|
+
projectId: string;
|
|
561
|
+
sessionId: string;
|
|
562
|
+
item: unknown;
|
|
563
|
+
};
|
|
564
|
+
result: {
|
|
565
|
+
ok: boolean;
|
|
566
|
+
items: unknown[];
|
|
567
|
+
};
|
|
568
|
+
};
|
|
569
|
+
"workingMaterials.remove": {
|
|
570
|
+
params: {
|
|
571
|
+
projectId: string;
|
|
572
|
+
sessionId: string;
|
|
573
|
+
id: string;
|
|
574
|
+
};
|
|
575
|
+
result: {
|
|
576
|
+
ok: boolean;
|
|
577
|
+
items: unknown[];
|
|
578
|
+
};
|
|
579
|
+
};
|
|
580
|
+
"workingMaterials.reorder": {
|
|
581
|
+
params: {
|
|
582
|
+
projectId: string;
|
|
583
|
+
sessionId: string;
|
|
584
|
+
ids: string[];
|
|
585
|
+
};
|
|
586
|
+
result: {
|
|
587
|
+
ok: boolean;
|
|
588
|
+
items: unknown[];
|
|
589
|
+
};
|
|
590
|
+
};
|
|
431
591
|
"skills.list": {
|
|
432
592
|
params: {
|
|
433
593
|
projectId?: string;
|
|
@@ -81,6 +81,32 @@ export interface TurnRecoveryNotification {
|
|
|
81
81
|
detail?: string;
|
|
82
82
|
item?: NotificationThreadItem;
|
|
83
83
|
}
|
|
84
|
+
export type TurnFileChangeStatus = "added" | "modified" | "deleted" | "renamed" | "moved" | "copied" | "unchanged";
|
|
85
|
+
export interface TurnFileChangeRecord {
|
|
86
|
+
path: string;
|
|
87
|
+
previousPath?: string;
|
|
88
|
+
status: TurnFileChangeStatus;
|
|
89
|
+
additions?: number;
|
|
90
|
+
deletions?: number;
|
|
91
|
+
}
|
|
92
|
+
export interface TurnFileChangeSummaryWire {
|
|
93
|
+
turnId: string;
|
|
94
|
+
sessionId: string;
|
|
95
|
+
projectId: string;
|
|
96
|
+
state: "running" | "completed" | "failed" | "cancelled";
|
|
97
|
+
startedAt: string;
|
|
98
|
+
completedAt?: string;
|
|
99
|
+
filesChanged: number;
|
|
100
|
+
files: TurnFileChangeRecord[];
|
|
101
|
+
truncated?: boolean;
|
|
102
|
+
}
|
|
103
|
+
export interface TurnFileChangesNotification {
|
|
104
|
+
sessionId: string;
|
|
105
|
+
turnId: string;
|
|
106
|
+
projectId: string;
|
|
107
|
+
state: "completed" | "failed" | "cancelled";
|
|
108
|
+
summary: TurnFileChangeSummaryWire;
|
|
109
|
+
}
|
|
84
110
|
/** Tool invocation started. */
|
|
85
111
|
export interface TurnToolCallNotification {
|
|
86
112
|
turnId: string;
|
|
@@ -423,6 +449,12 @@ export interface MemoryUpdatedNotification {
|
|
|
423
449
|
entryCount?: number;
|
|
424
450
|
summary?: string;
|
|
425
451
|
}
|
|
452
|
+
/** Project knowledge base instruction file changed. */
|
|
453
|
+
export interface InstructionsUpdatedNotification {
|
|
454
|
+
projectId?: string;
|
|
455
|
+
action: "write" | "delete";
|
|
456
|
+
filename: string;
|
|
457
|
+
}
|
|
426
458
|
/** Skills list changed (activated/deactivated/learned/deleted). */
|
|
427
459
|
export interface SkillsUpdatedNotification {
|
|
428
460
|
action: "activate" | "deactivate" | "delete" | "learn" | "promote";
|
|
@@ -948,6 +980,7 @@ export interface NotificationMethodMap {
|
|
|
948
980
|
"turn.end": TurnEndNotification;
|
|
949
981
|
"turn.error": TurnErrorNotification;
|
|
950
982
|
"turn.recovery": TurnRecoveryNotification;
|
|
983
|
+
"turn.file_changes": TurnFileChangesNotification;
|
|
951
984
|
"turn.tool_call": TurnToolCallNotification;
|
|
952
985
|
"turn.tool_result": TurnToolResultNotification;
|
|
953
986
|
"turn.tool_blocked": TurnToolBlockedNotification;
|
|
@@ -981,6 +1014,7 @@ export interface NotificationMethodMap {
|
|
|
981
1014
|
"turn.skill_acquisition_needed": TurnSkillAcquisitionNeededNotification;
|
|
982
1015
|
"turn.ask_user": TurnAskUserNotification;
|
|
983
1016
|
"memory.updated": MemoryUpdatedNotification;
|
|
1017
|
+
"instructions.updated": InstructionsUpdatedNotification;
|
|
984
1018
|
"memory.decay.completed": MemoryDecayCompletedNotification;
|
|
985
1019
|
"skills.updated": SkillsUpdatedNotification;
|
|
986
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;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Feedback distillation worker (design §11; mini-design 2026-06-28 v2) — the idle-triggered sweep
|
|
3
|
+
* that turns a project's accumulated feedback into memory proposals. Scheduling mirrors the upload
|
|
4
|
+
* worker + dream: a pure work unit, callers serialize per project (§9.1 rule 9). It is append-only
|
|
5
|
+
* into the SHARED memory pipeline (proposeExtracted, source="feedback") — it never promotes; dream /
|
|
6
|
+
* consolidator own merge + promote (§11.2). The store-level idempotency key (§10) makes the sweep
|
|
7
|
+
* safe to re-run: a retried sweep, or a worker restart mid-sweep, never duplicates a proposal.
|
|
8
|
+
*/
|
|
9
|
+
import type { MemoryDreamProvider } from "../ports/memory-provider.js";
|
|
10
|
+
export interface FeedbackDistillationResult {
|
|
11
|
+
candidates: number;
|
|
12
|
+
proposed: number;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* One distillation sweep for a project: cluster active feedback into candidates, append each as a
|
|
16
|
+
* memory proposal. Fail-soft per candidate — one rejected proposal never aborts the rest of the
|
|
17
|
+
* sweep. Returns counts for logging. The memory provider must expose proposeExtracted (the dream
|
|
18
|
+
* provider does); if it doesn't, the sweep is a no-op.
|
|
19
|
+
*/
|
|
20
|
+
export declare function runFeedbackDistillationSweep(projectId: string, sink: Pick<MemoryDreamProvider, "proposeExtracted">, userId: string): Promise<FeedbackDistillationResult>;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { FeedbackEvent } from "./feedback-event-store.js";
|
|
2
|
+
/** Minimum corroborating active events before a cluster becomes a proposal (mini-design §3.4). */
|
|
3
|
+
export declare const MIN_EVIDENCE = 2;
|
|
4
|
+
export interface FeedbackDistillationCandidate {
|
|
5
|
+
clusterKey: string;
|
|
6
|
+
/** Template preference sentence (dream LLM refines later — mini-design §9.3). */
|
|
7
|
+
text: string;
|
|
8
|
+
category: string;
|
|
9
|
+
importance: number;
|
|
10
|
+
confidence: number;
|
|
11
|
+
/** Audit trail + crash-safe idempotency, consumed by the extended proposeExtracted (§10). */
|
|
12
|
+
evidence: {
|
|
13
|
+
kind: "feedback";
|
|
14
|
+
refs: string[];
|
|
15
|
+
idempotencyKey: string;
|
|
16
|
+
};
|
|
17
|
+
/** Cluster diagnostics — not persisted as-is; surfaced for tests + logging. */
|
|
18
|
+
stats: {
|
|
19
|
+
evidence: number;
|
|
20
|
+
crossSession: boolean;
|
|
21
|
+
feedbackIds: string[];
|
|
22
|
+
turnIds: string[];
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Cluster a project's feedback events into proposal candidates. Only active events count
|
|
27
|
+
* (retracted / replaced are filtered — §11.1). Clusters below MIN_EVIDENCE are dropped. Output is
|
|
28
|
+
* sorted by clusterKey for deterministic ordering across runs.
|
|
29
|
+
*/
|
|
30
|
+
export declare function distillFeedback(events: FeedbackEvent[]): FeedbackDistillationCandidate[];
|