flavor-code 1.2.10 → 1.2.11

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.
@@ -22,9 +22,20 @@ export interface SessionApprovalRequest {
22
22
  export type SessionOutput = AgentEvent | {
23
23
  type: "notice";
24
24
  message: string;
25
- } | {
25
+ } | ({
26
+ type: "pal-task";
27
+ status: "received";
28
+ } & PalTaskDelivery) | ({
29
+ type: "cowork-event";
30
+ } & PalCoWorkDelivery) | {
26
31
  type: "queued-prompt";
27
32
  prompt: string;
33
+ } | {
34
+ type: "queued-remote-prompt";
35
+ prompt: string;
36
+ senderId: string;
37
+ senderAlias: string;
38
+ context?: "CO-WORK PLANNING" | "CO-WORK EXECUTION";
28
39
  } | {
29
40
  type: "write-start";
30
41
  id: string;
@@ -52,6 +63,37 @@ export type SessionOutput = AgentEvent | {
52
63
  } | {
53
64
  type: "exit";
54
65
  };
66
+ export interface PalTaskDelivery {
67
+ readonly senderId: string;
68
+ readonly senderAlias: string;
69
+ readonly messageId: string;
70
+ readonly taskId: string;
71
+ readonly goal: string;
72
+ }
73
+ interface PalCoWorkDeliveryBase {
74
+ readonly senderId: string;
75
+ readonly senderAlias: string;
76
+ readonly localId?: string;
77
+ readonly coWorkId: string;
78
+ readonly epoch: number;
79
+ readonly snapshot: unknown;
80
+ }
81
+ export type PalCoWorkDelivery = PalCoWorkDeliveryBase & ({
82
+ readonly action: "START";
83
+ readonly planHash: string;
84
+ } | {
85
+ readonly action: "PROPOSE" | "PLAN" | "END" | "FAIL" | "CANCEL";
86
+ readonly planHash: string | null;
87
+ });
88
+ export interface PalSessionServices {
89
+ list(verbose: boolean): Promise<unknown>;
90
+ rename(alias: string): Promise<unknown>;
91
+ info(target: string): Promise<unknown>;
92
+ sendTask(target: string, goal: string): Promise<unknown>;
93
+ startCoWork(target: string, goal: string): Promise<unknown>;
94
+ coWorkStatus(coWorkId?: string): Promise<unknown>;
95
+ cancelCoWork(coWorkId: string, reason?: string): Promise<unknown>;
96
+ }
55
97
  export interface SessionServices {
56
98
  hooks: HookBus;
57
99
  workspace: string;
@@ -105,6 +147,7 @@ export interface SessionServices {
105
147
  output(event: SessionOutput): void;
106
148
  questions: QuestionBridge;
107
149
  login(): Promise<string>;
150
+ pals?: PalSessionServices;
108
151
  }
109
152
  export interface MultimodalSessionInput {
110
153
  text: string;
@@ -119,9 +162,12 @@ export declare class FlavorSession {
119
162
  whenIdle(): Promise<void>;
120
163
  steer(input: string): void;
121
164
  followUp(input: string): void;
165
+ receivePalTask(input: PalTaskDelivery): void;
166
+ receivePalCoWorkEvent(input: PalCoWorkDelivery): Promise<void>;
122
167
  start(): Promise<void>;
123
168
  submit(input: string): Promise<void>;
124
169
  submit(input: MultimodalSessionInput): Promise<void>;
125
170
  interrupt(): "cancelled" | "exit";
126
171
  close(): Promise<void>;
127
172
  }
173
+ export {};
@@ -13,6 +13,12 @@ export interface TranscriptTurn {
13
13
  blocks: TranscriptBlock[];
14
14
  taskSnapshot?: TaskSnapshot;
15
15
  suppressedTaskIds?: string[];
16
+ source?: {
17
+ kind: "pal";
18
+ alias: string;
19
+ instanceId: string;
20
+ context?: "CO-WORK PLANNING" | "CO-WORK EXECUTION";
21
+ };
16
22
  }
17
23
  export interface TranscriptHistoryMessage {
18
24
  readonly role: "user" | "assistant" | "tool";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "flavor-code",
3
- "version": "1.2.10",
3
+ "version": "1.2.11",
4
4
  "author": "YachuanWzh",
5
5
  "type": "module",
6
6
  "publishConfig": {