poly-weaver 0.15.3 → 1.1.0
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/agents/implementors/adapter.d.ts +2 -0
- package/dist/agents/implementors/adapter.d.ts.map +1 -1
- package/dist/agents/implementors/adapter.js +8 -4
- package/dist/agents/implementors/adapter.js.map +1 -1
- package/dist/agents/implementors/handler.d.ts.map +1 -1
- package/dist/agents/implementors/handler.js +40 -8
- package/dist/agents/implementors/handler.js.map +1 -1
- package/dist/agents/implementors/prompts.d.ts +5 -4
- package/dist/agents/implementors/prompts.d.ts.map +1 -1
- package/dist/agents/implementors/prompts.js +14 -13
- package/dist/agents/implementors/prompts.js.map +1 -1
- package/dist/agents/implementors/types.d.ts +6 -4
- package/dist/agents/implementors/types.d.ts.map +1 -1
- package/dist/agents/interviewers/adapter.d.ts.map +1 -1
- package/dist/agents/interviewers/adapter.js +2 -1
- package/dist/agents/interviewers/adapter.js.map +1 -1
- package/dist/agents/interviewers/completion-warning.d.ts +5 -0
- package/dist/agents/interviewers/completion-warning.d.ts.map +1 -0
- package/dist/agents/interviewers/completion-warning.js +20 -0
- package/dist/agents/interviewers/completion-warning.js.map +1 -0
- package/dist/agents/interviewers/handler.d.ts.map +1 -1
- package/dist/agents/interviewers/handler.js +8 -1
- package/dist/agents/interviewers/handler.js.map +1 -1
- package/dist/agents/interviewers/types.d.ts +2 -0
- package/dist/agents/interviewers/types.d.ts.map +1 -1
- package/dist/agents/plan-steering.d.ts +16 -0
- package/dist/agents/plan-steering.d.ts.map +1 -0
- package/dist/agents/plan-steering.js +102 -0
- package/dist/agents/plan-steering.js.map +1 -0
- package/dist/agents/planners/adapter.d.ts +3 -1
- package/dist/agents/planners/adapter.d.ts.map +1 -1
- package/dist/agents/planners/adapter.js +30 -18
- package/dist/agents/planners/adapter.js.map +1 -1
- package/dist/agents/planners/handler.d.ts.map +1 -1
- package/dist/agents/planners/handler.js +51 -57
- package/dist/agents/planners/handler.js.map +1 -1
- package/dist/agents/planners/prompts.d.ts +6 -5
- package/dist/agents/planners/prompts.d.ts.map +1 -1
- package/dist/agents/planners/prompts.js +32 -18
- package/dist/agents/planners/prompts.js.map +1 -1
- package/dist/agents/planners/types.d.ts +8 -12
- package/dist/agents/planners/types.d.ts.map +1 -1
- package/dist/agents/prompt-utils.d.ts +2 -0
- package/dist/agents/prompt-utils.d.ts.map +1 -1
- package/dist/agents/prompt-utils.js +5 -0
- package/dist/agents/prompt-utils.js.map +1 -1
- package/dist/agents/reviewers/adapter.d.ts.map +1 -1
- package/dist/agents/reviewers/adapter.js +7 -2
- package/dist/agents/reviewers/adapter.js.map +1 -1
- package/dist/agents/reviewers/handler.d.ts.map +1 -1
- package/dist/agents/reviewers/handler.js +45 -11
- package/dist/agents/reviewers/handler.js.map +1 -1
- package/dist/agents/reviewers/prompts.d.ts +4 -4
- package/dist/agents/reviewers/prompts.d.ts.map +1 -1
- package/dist/agents/reviewers/prompts.js +43 -23
- package/dist/agents/reviewers/prompts.js.map +1 -1
- package/dist/agents/reviewers/types.d.ts +9 -4
- package/dist/agents/reviewers/types.d.ts.map +1 -1
- package/dist/agents/reviewers/types.js.map +1 -1
- package/dist/agents/runner.d.ts +18 -1
- package/dist/agents/runner.d.ts.map +1 -1
- package/dist/agents/runner.js +147 -21
- package/dist/agents/runner.js.map +1 -1
- package/dist/agents/simplifiers/handler.d.ts.map +1 -1
- package/dist/agents/simplifiers/handler.js +7 -2
- package/dist/agents/simplifiers/handler.js.map +1 -1
- package/dist/auto-update/detect-agents.d.ts +1 -0
- package/dist/auto-update/detect-agents.d.ts.map +1 -1
- package/dist/auto-update/detect-agents.js +8 -7
- package/dist/auto-update/detect-agents.js.map +1 -1
- package/dist/cli.js +16 -4
- package/dist/cli.js.map +1 -1
- package/dist/crosscheck/coordinator.d.ts +5 -0
- package/dist/crosscheck/coordinator.d.ts.map +1 -1
- package/dist/crosscheck/coordinator.js +177 -91
- package/dist/crosscheck/coordinator.js.map +1 -1
- package/dist/crosscheck/live-agent-session.d.ts +7 -1
- package/dist/crosscheck/live-agent-session.d.ts.map +1 -1
- package/dist/crosscheck/live-agent-session.js +61 -7
- package/dist/crosscheck/live-agent-session.js.map +1 -1
- package/dist/crosscheck/state.d.ts +3 -0
- package/dist/crosscheck/state.d.ts.map +1 -1
- package/dist/crosscheck/state.js +17 -2
- package/dist/crosscheck/state.js.map +1 -1
- package/dist/dump/collector.d.ts.map +1 -1
- package/dist/dump/collector.js +3 -0
- package/dist/dump/collector.js.map +1 -1
- package/dist/dump/service.d.ts.map +1 -1
- package/dist/dump/service.js +3 -0
- package/dist/dump/service.js.map +1 -1
- package/dist/dump/types.d.ts +3 -0
- package/dist/dump/types.d.ts.map +1 -1
- package/dist/dump/types.js.map +1 -1
- package/dist/flow/artifacts.d.ts +8 -1
- package/dist/flow/artifacts.d.ts.map +1 -1
- package/dist/flow/artifacts.js +82 -0
- package/dist/flow/artifacts.js.map +1 -1
- package/dist/flow/built-in/default-factory.d.ts.map +1 -1
- package/dist/flow/built-in/default-factory.js +0 -2
- package/dist/flow/built-in/default-factory.js.map +1 -1
- package/dist/flow/executor.d.ts +1 -2
- package/dist/flow/executor.d.ts.map +1 -1
- package/dist/flow/executor.js +30 -29
- package/dist/flow/executor.js.map +1 -1
- package/dist/flow/non-default-feedback.d.ts +14 -0
- package/dist/flow/non-default-feedback.d.ts.map +1 -0
- package/dist/flow/non-default-feedback.js +45 -0
- package/dist/flow/non-default-feedback.js.map +1 -0
- package/dist/flow/types.d.ts +16 -5
- package/dist/flow/types.d.ts.map +1 -1
- package/dist/flow/types.js +1 -2
- package/dist/flow/types.js.map +1 -1
- package/dist/managed-spec.d.ts +2 -0
- package/dist/managed-spec.d.ts.map +1 -1
- package/dist/managed-spec.js +22 -0
- package/dist/managed-spec.js.map +1 -1
- package/dist/offscreen/agent-viewer.d.ts +4 -1
- package/dist/offscreen/agent-viewer.d.ts.map +1 -1
- package/dist/offscreen/agent-viewer.js +58 -2
- package/dist/offscreen/agent-viewer.js.map +1 -1
- package/dist/offscreen/controller.d.ts +13 -2
- package/dist/offscreen/controller.d.ts.map +1 -1
- package/dist/offscreen/controller.js +212 -91
- package/dist/offscreen/controller.js.map +1 -1
- package/dist/offscreen/fork-launch.d.ts +2 -2
- package/dist/offscreen/fork-launch.d.ts.map +1 -1
- package/dist/offscreen/fork-launch.js +2 -2
- package/dist/offscreen/fork-launch.js.map +1 -1
- package/dist/offscreen/fork.d.ts +16 -2
- package/dist/offscreen/fork.d.ts.map +1 -1
- package/dist/offscreen/fork.js +79 -40
- package/dist/offscreen/fork.js.map +1 -1
- package/dist/offscreen/inquiry-pane.d.ts +2 -1
- package/dist/offscreen/inquiry-pane.d.ts.map +1 -1
- package/dist/offscreen/inquiry-pane.js +8 -2
- package/dist/offscreen/inquiry-pane.js.map +1 -1
- package/dist/offscreen/panes.d.ts +1 -0
- package/dist/offscreen/panes.d.ts.map +1 -1
- package/dist/offscreen/registry.d.ts +2 -2
- package/dist/offscreen/registry.d.ts.map +1 -1
- package/dist/offscreen/registry.js +5 -1
- package/dist/offscreen/registry.js.map +1 -1
- package/dist/offscreen/resolve.d.ts +2 -0
- package/dist/offscreen/resolve.d.ts.map +1 -1
- package/dist/offscreen/resolve.js +5 -1
- package/dist/offscreen/resolve.js.map +1 -1
- package/dist/offscreen/session-turn-monitor.d.ts +3 -1
- package/dist/offscreen/session-turn-monitor.d.ts.map +1 -1
- package/dist/offscreen/session-turn-monitor.js +10 -2
- package/dist/offscreen/session-turn-monitor.js.map +1 -1
- package/dist/offscreen/split-inquiry.d.ts.map +1 -1
- package/dist/offscreen/split-inquiry.js +5 -0
- package/dist/offscreen/split-inquiry.js.map +1 -1
- package/dist/offscreen/starting-pane.d.ts +13 -0
- package/dist/offscreen/starting-pane.d.ts.map +1 -0
- package/dist/offscreen/starting-pane.js +24 -0
- package/dist/offscreen/starting-pane.js.map +1 -0
- package/dist/offscreen/surface.d.ts +1 -0
- package/dist/offscreen/surface.d.ts.map +1 -1
- package/dist/offscreen/surface.js +5 -3
- package/dist/offscreen/surface.js.map +1 -1
- package/dist/orchestrator.d.ts +1 -2
- package/dist/orchestrator.d.ts.map +1 -1
- package/dist/orchestrator.js +12 -11
- package/dist/orchestrator.js.map +1 -1
- package/dist/prompts.d.ts +0 -16
- package/dist/prompts.d.ts.map +1 -1
- package/dist/prompts.js +0 -35
- package/dist/prompts.js.map +1 -1
- package/dist/providers/base-completion.d.ts +12 -2
- package/dist/providers/base-completion.d.ts.map +1 -1
- package/dist/providers/base-completion.js +111 -2
- package/dist/providers/base-completion.js.map +1 -1
- package/dist/providers/claude/completion.d.ts +3 -1
- package/dist/providers/claude/completion.d.ts.map +1 -1
- package/dist/providers/claude/completion.js +40 -4
- package/dist/providers/claude/completion.js.map +1 -1
- package/dist/providers/claude/session.d.ts +1 -32
- package/dist/providers/claude/session.d.ts.map +1 -1
- package/dist/providers/claude/session.js +1 -138
- package/dist/providers/claude/session.js.map +1 -1
- package/dist/providers/claude/strategy.d.ts.map +1 -1
- package/dist/providers/claude/strategy.js +3 -1
- package/dist/providers/claude/strategy.js.map +1 -1
- package/dist/providers/codex/completion.d.ts +3 -1
- package/dist/providers/codex/completion.d.ts.map +1 -1
- package/dist/providers/codex/completion.js +36 -5
- package/dist/providers/codex/completion.js.map +1 -1
- package/dist/providers/codex/session.d.ts +1 -1
- package/dist/providers/codex/session.d.ts.map +1 -1
- package/dist/providers/codex/session.js +1 -1
- package/dist/providers/codex/session.js.map +1 -1
- package/dist/providers/codex/strategy.d.ts.map +1 -1
- package/dist/providers/codex/strategy.js +3 -1
- package/dist/providers/codex/strategy.js.map +1 -1
- package/dist/providers/completion-gate.d.ts +14 -0
- package/dist/providers/completion-gate.d.ts.map +1 -0
- package/dist/providers/completion-gate.js +36 -0
- package/dist/providers/completion-gate.js.map +1 -0
- package/dist/providers/copilot/completion.d.ts +32 -21
- package/dist/providers/copilot/completion.d.ts.map +1 -1
- package/dist/providers/copilot/completion.js +100 -165
- package/dist/providers/copilot/completion.js.map +1 -1
- package/dist/providers/copilot/environment.d.ts +2 -0
- package/dist/providers/copilot/environment.d.ts.map +1 -0
- package/dist/providers/copilot/environment.js +8 -0
- package/dist/providers/copilot/environment.js.map +1 -0
- package/dist/providers/copilot/fork-state.d.ts +7 -0
- package/dist/providers/copilot/fork-state.d.ts.map +1 -0
- package/dist/providers/copilot/fork-state.js +150 -0
- package/dist/providers/copilot/fork-state.js.map +1 -0
- package/dist/providers/copilot/observation.d.ts +274 -0
- package/dist/providers/copilot/observation.d.ts.map +1 -0
- package/dist/providers/copilot/observation.js +2075 -0
- package/dist/providers/copilot/observation.js.map +1 -0
- package/dist/providers/copilot/observer-extension/com.github.copilot/extensions/poly-weaver-observer/extension.d.mts +2 -0
- package/dist/providers/copilot/observer-extension/com.github.copilot/extensions/poly-weaver-observer/extension.d.mts.map +1 -0
- package/dist/providers/copilot/observer-extension/com.github.copilot/extensions/poly-weaver-observer/extension.mjs +426 -0
- package/dist/providers/copilot/observer-extension/com.github.copilot/extensions/poly-weaver-observer/extension.mjs.map +1 -0
- package/dist/providers/copilot/observer-extension/plugin.json +6 -0
- package/dist/providers/copilot/record-properties.d.ts +4 -0
- package/dist/providers/copilot/record-properties.d.ts.map +1 -0
- package/dist/providers/copilot/record-properties.js +14 -0
- package/dist/providers/copilot/record-properties.js.map +1 -0
- package/dist/providers/copilot/session.d.ts +3 -61
- package/dist/providers/copilot/session.d.ts.map +1 -1
- package/dist/providers/copilot/session.js +6 -321
- package/dist/providers/copilot/session.js.map +1 -1
- package/dist/providers/copilot/strategy.d.ts +3 -5
- package/dist/providers/copilot/strategy.d.ts.map +1 -1
- package/dist/providers/copilot/strategy.js +59 -66
- package/dist/providers/copilot/strategy.js.map +1 -1
- package/dist/providers/fork-cleanup.d.ts +4 -0
- package/dist/providers/fork-cleanup.d.ts.map +1 -0
- package/dist/providers/fork-cleanup.js +21 -0
- package/dist/providers/fork-cleanup.js.map +1 -0
- package/dist/providers/fork.d.ts +8 -3
- package/dist/providers/fork.d.ts.map +1 -1
- package/dist/providers/fork.js.map +1 -1
- package/dist/providers/invoke.d.ts.map +1 -1
- package/dist/providers/invoke.js +85 -34
- package/dist/providers/invoke.js.map +1 -1
- package/dist/providers/live.d.ts.map +1 -1
- package/dist/providers/live.js +43 -17
- package/dist/providers/live.js.map +1 -1
- package/dist/providers/observer-run.d.ts +4 -0
- package/dist/providers/observer-run.d.ts.map +1 -0
- package/dist/providers/observer-run.js +23 -0
- package/dist/providers/observer-run.js.map +1 -0
- package/dist/providers/session-launch.d.ts +3 -1
- package/dist/providers/session-launch.d.ts.map +1 -1
- package/dist/providers/session-launch.js +38 -19
- package/dist/providers/session-launch.js.map +1 -1
- package/dist/providers/types.d.ts +162 -15
- package/dist/providers/types.d.ts.map +1 -1
- package/dist/providers/types.js.map +1 -1
- package/dist/session/restore.d.ts +2 -1
- package/dist/session/restore.d.ts.map +1 -1
- package/dist/session/restore.js +26 -3
- package/dist/session/restore.js.map +1 -1
- package/dist/session/resume.d.ts.map +1 -1
- package/dist/session/resume.js +16 -2
- package/dist/session/resume.js.map +1 -1
- package/dist/session/session-store.d.ts.map +1 -1
- package/dist/session/session-store.js +9 -2
- package/dist/session/session-store.js.map +1 -1
- package/dist/terminal/host.d.ts +2 -0
- package/dist/terminal/host.d.ts.map +1 -1
- package/dist/terminal/host.js +19 -15
- package/dist/terminal/host.js.map +1 -1
- package/dist/terminal/layout.d.ts +7 -4
- package/dist/terminal/layout.d.ts.map +1 -1
- package/dist/terminal/layout.js +5 -3
- package/dist/terminal/layout.js.map +1 -1
- package/dist/terminal/output.d.ts +9 -2
- package/dist/terminal/output.d.ts.map +1 -1
- package/dist/terminal/output.js +13 -3
- package/dist/terminal/output.js.map +1 -1
- package/dist/terminal/paste-submit.d.ts.map +1 -1
- package/dist/terminal/paste-submit.js +43 -37
- package/dist/terminal/paste-submit.js.map +1 -1
- package/dist/user/curate-handler.d.ts +1 -5
- package/dist/user/curate-handler.d.ts.map +1 -1
- package/dist/user/curate-handler.js +32 -69
- package/dist/user/curate-handler.js.map +1 -1
- package/dist/user/handler.d.ts.map +1 -1
- package/dist/user/handler.js +18 -1
- package/dist/user/handler.js.map +1 -1
- package/dist/user/host-curate-prompt.d.ts.map +1 -1
- package/dist/user/host-curate-prompt.js +9 -6
- package/dist/user/host-curate-prompt.js.map +1 -1
- package/dist/user/host-prompt.d.ts.map +1 -1
- package/dist/user/host-prompt.js +14 -10
- package/dist/user/host-prompt.js.map +1 -1
- package/dist/user/prompt.d.ts +3 -0
- package/dist/user/prompt.d.ts.map +1 -1
- package/dist/user/prompt.js.map +1 -1
- package/dist/user/review-feedback.d.ts +43 -0
- package/dist/user/review-feedback.d.ts.map +1 -0
- package/dist/user/review-feedback.js +184 -0
- package/dist/user/review-feedback.js.map +1 -0
- package/dist/user/review-plan-pane.d.ts +5 -0
- package/dist/user/review-plan-pane.d.ts.map +1 -0
- package/dist/user/review-plan-pane.js +26 -0
- package/dist/user/review-plan-pane.js.map +1 -0
- package/package.json +4 -2
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { isRecord } from "../trust-utils.js";
|
|
2
|
+
export function recordProp(record, key) {
|
|
3
|
+
const value = record?.[key];
|
|
4
|
+
return isRecord(value) ? value : undefined;
|
|
5
|
+
}
|
|
6
|
+
export function stringProp(record, key) {
|
|
7
|
+
const value = record?.[key];
|
|
8
|
+
return typeof value === "string" && value.length > 0 ? value : undefined;
|
|
9
|
+
}
|
|
10
|
+
export function rawStringProp(record, key) {
|
|
11
|
+
const value = record?.[key];
|
|
12
|
+
return typeof value === "string" ? value : undefined;
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=record-properties.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"record-properties.js","sourceRoot":"","sources":["../../../src/providers/copilot/record-properties.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAE7C,MAAM,UAAU,UAAU,CACxB,MAA2C,EAC3C,GAAW;IAEX,MAAM,KAAK,GAAG,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC;IAC5B,OAAO,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC;AAC7C,CAAC;AAED,MAAM,UAAU,UAAU,CACxB,MAA2C,EAC3C,GAAW;IAEX,MAAM,KAAK,GAAG,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC;IAC5B,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC;AAC3E,CAAC;AAED,MAAM,UAAU,aAAa,CAC3B,MAA2C,EAC3C,GAAW;IAEX,MAAM,KAAK,GAAG,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC;IAC5B,OAAO,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC;AACvD,CAAC"}
|
|
@@ -1,68 +1,14 @@
|
|
|
1
1
|
import type { SessionHandler, SessionSnapshot } from "../types.js";
|
|
2
|
-
import { type SessionLine } from "../../session/reader.js";
|
|
3
|
-
import type { UserClarification } from "../../agents/planners/types.js";
|
|
4
|
-
import type { OrchestrationOutput } from "../../terminal/output.js";
|
|
5
2
|
/**
|
|
6
3
|
* Get the Copilot session-state directory.
|
|
7
4
|
* Copilot stores sessions at: ~/.copilot/session-state/
|
|
8
5
|
*/
|
|
9
6
|
export declare function getCopilotSessionDir(): string;
|
|
10
|
-
/**
|
|
11
|
-
* Verify a Copilot session belongs to the expected working directory.
|
|
12
|
-
* Reads the `session.start` event and checks `data.context.cwd`.
|
|
13
|
-
*
|
|
14
|
-
* Returns:
|
|
15
|
-
* - `true` — CWD matches
|
|
16
|
-
* - `false` — `session.start` found with a different CWD (definitive mismatch)
|
|
17
|
-
* - `null` — inconclusive (file missing, empty, or no `session.start` event yet)
|
|
18
|
-
*/
|
|
19
|
-
export declare function verifyCopilotSessionCwd(eventsFile: string, expectedCwd: string): Promise<boolean | null>;
|
|
20
|
-
/**
|
|
21
|
-
* Extract the last response text from Copilot session events.
|
|
22
|
-
*
|
|
23
|
-
* Finds the last completed turn (bounded by `assistant.turn_start` and
|
|
24
|
-
* `assistant.turn_end`) and collects `data.content` from all
|
|
25
|
-
* `assistant.message` events within that turn.
|
|
26
|
-
*/
|
|
27
|
-
export declare function extractCopilotResponse(lines: SessionLine[]): string;
|
|
28
|
-
/**
|
|
29
|
-
* Thrown when a tracked `ask_user` round in a Copilot session JSONL has a
|
|
30
|
-
* missing or malformed payload. Carries `noRetry = true` so
|
|
31
|
-
* `runPhaseWithRetries` skips re-parsing the same broken JSONL and the
|
|
32
|
-
* orchestrator's executor-level hook triggers a session dump before the
|
|
33
|
-
* error propagates and the CLI exits.
|
|
34
|
-
*/
|
|
35
|
-
export declare class CopilotQACaptureError extends Error {
|
|
36
|
-
readonly noRetry = true;
|
|
37
|
-
constructor(message: string);
|
|
38
|
-
}
|
|
39
|
-
/**
|
|
40
|
-
* Extract `ask_user` Q&A pairs from Copilot session lines.
|
|
41
|
-
*
|
|
42
|
-
* Each round is a `tool.execution_start` + `tool.execution_complete` pair
|
|
43
|
-
* matched by `data.toolCallId`. Single-question rounds use
|
|
44
|
-
* `data.arguments.question` and
|
|
45
|
-
* `data.toolTelemetry.restrictedProperties.answer`; multi-question form rounds
|
|
46
|
-
* use `data.arguments.message` and accepted `result.detailedContent`.
|
|
47
|
-
*
|
|
48
|
-
* Strict-throw contract (mirrors Claude's): malformed start- or
|
|
49
|
-
* completion-side payloads throw `CopilotQACaptureError` (with
|
|
50
|
-
* `noRetry: true`) so the orchestrator's executor-level hook can dump the
|
|
51
|
-
* broken JSONL alongside the failed step's artifacts. Narrow,
|
|
52
|
-
* well-formed cancellation/failure signals (`success: false`, a
|
|
53
|
-
* single-question non-`"answered"` outcome, or a multi-question form
|
|
54
|
-
* non-`"accept"` action) consume the round silently without emitting.
|
|
55
|
-
* Completion events for
|
|
56
|
-
* `toolCallId`s we did not track (e.g. `view`, `bash`) are ignored.
|
|
57
|
-
*/
|
|
58
|
-
export declare function extractCopilotClarifications(lines: SessionLine[]): UserClarification[];
|
|
59
7
|
/**
|
|
60
8
|
* Copilot session handler.
|
|
61
9
|
*
|
|
62
|
-
*
|
|
63
|
-
*
|
|
64
|
-
* rounds (paired `tool.execution_start` + `tool.execution_complete`
|
|
65
|
-
* events) — same strict throw-and-dump contract as Claude for malformed payloads.
|
|
10
|
+
* Predicts and resolves opaque resume anchors in Copilot's UUID-based session
|
|
11
|
+
* directory. Live session discovery and observation belong to the SDK observer.
|
|
66
12
|
*/
|
|
67
13
|
export declare class CopilotSessionHandler implements SessionHandler {
|
|
68
14
|
private readonly getSessionDir;
|
|
@@ -70,14 +16,10 @@ export declare class CopilotSessionHandler implements SessionHandler {
|
|
|
70
16
|
predictSessionFile(_workdir: string, sessionId: string): string;
|
|
71
17
|
locateSessionById(workdir: string, sessionId: string): Promise<string | undefined>;
|
|
72
18
|
snapshot(_workdir: string): Promise<SessionSnapshot>;
|
|
73
|
-
findSessionFile(
|
|
74
|
-
output?: OrchestrationOutput;
|
|
19
|
+
findSessionFile(_snapshot: SessionSnapshot, _workdir: string, _opts?: {
|
|
75
20
|
timeoutMs?: number;
|
|
76
21
|
signal?: AbortSignal;
|
|
77
22
|
}): Promise<string>;
|
|
78
23
|
extractSessionId(sessionFilePath: string): Promise<string>;
|
|
79
|
-
extractPlanFilePath(sessionFilePath: string, _lineOffset: number): Promise<string | undefined>;
|
|
80
|
-
extractClarifications(sessionFilePath: string, lineOffset: number): Promise<UserClarification[]>;
|
|
81
|
-
private readNewLines;
|
|
82
24
|
}
|
|
83
25
|
//# sourceMappingURL=session.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"session.d.ts","sourceRoot":"","sources":["../../../src/providers/copilot/session.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"session.d.ts","sourceRoot":"","sources":["../../../src/providers/copilot/session.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAEnE;;;GAGG;AACH,wBAAgB,oBAAoB,IAAI,MAAM,CAE7C;AAED;;;;;GAKG;AACH,qBAAa,qBAAsB,YAAW,cAAc;IAC9C,OAAO,CAAC,QAAQ,CAAC,aAAa;gBAAb,aAAa,GAAE,MAAM,MAA6B;IAE/E,kBAAkB,CAAC,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM;IAKzD,iBAAiB,CAAC,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC;IAKlF,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,CAAC;IAIpD,eAAe,CACnB,SAAS,EAAE,eAAe,EAC1B,QAAQ,EAAE,MAAM,EAChB,KAAK,CAAC,EAAE;QAAE,SAAS,CAAC,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,WAAW,CAAA;KAAE,GACnD,OAAO,CAAC,MAAM,CAAC;IAIZ,gBAAgB,CAAC,eAAe,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;CAIjE"}
|
|
@@ -1,267 +1,18 @@
|
|
|
1
1
|
import { join, dirname, basename } from "node:path";
|
|
2
2
|
import { homedir } from "node:os";
|
|
3
3
|
import { existsSync } from "node:fs";
|
|
4
|
-
import { access, readdir } from "node:fs/promises";
|
|
5
|
-
import { readSessionFile } from "../../session/reader.js";
|
|
6
|
-
import { normalizePath } from "../path-utils.js";
|
|
7
|
-
import { pollUntil, SESSION_FILE_WAIT_MS, throwIfAborted, } from "../../session/locator.js";
|
|
8
4
|
/**
|
|
9
5
|
* Get the Copilot session-state directory.
|
|
10
6
|
* Copilot stores sessions at: ~/.copilot/session-state/
|
|
11
7
|
*/
|
|
12
8
|
export function getCopilotSessionDir() {
|
|
13
|
-
return join(homedir(), ".copilot", "session-state");
|
|
14
|
-
}
|
|
15
|
-
/**
|
|
16
|
-
* Snapshot existing session UUID directories in ~/.copilot/session-state/.
|
|
17
|
-
*/
|
|
18
|
-
async function snapshotSessionDirs(dir) {
|
|
19
|
-
const dirs = new Set();
|
|
20
|
-
try {
|
|
21
|
-
const entries = await readdir(dir, { withFileTypes: true });
|
|
22
|
-
for (const entry of entries) {
|
|
23
|
-
if (entry.isDirectory()) {
|
|
24
|
-
dirs.add(entry.name);
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
catch {
|
|
29
|
-
// Directory might not exist yet
|
|
30
|
-
}
|
|
31
|
-
return dirs;
|
|
32
|
-
}
|
|
33
|
-
/**
|
|
34
|
-
* Verify a Copilot session belongs to the expected working directory.
|
|
35
|
-
* Reads the `session.start` event and checks `data.context.cwd`.
|
|
36
|
-
*
|
|
37
|
-
* Returns:
|
|
38
|
-
* - `true` — CWD matches
|
|
39
|
-
* - `false` — `session.start` found with a different CWD (definitive mismatch)
|
|
40
|
-
* - `null` — inconclusive (file missing, empty, or no `session.start` event yet)
|
|
41
|
-
*/
|
|
42
|
-
export async function verifyCopilotSessionCwd(eventsFile, expectedCwd) {
|
|
43
|
-
try {
|
|
44
|
-
const lines = await readSessionFile(eventsFile);
|
|
45
|
-
if (lines.length === 0)
|
|
46
|
-
return null;
|
|
47
|
-
for (const line of lines) {
|
|
48
|
-
if (line.type === "session.start") {
|
|
49
|
-
const data = line.data;
|
|
50
|
-
const cwd = data?.context?.cwd;
|
|
51
|
-
if (!cwd)
|
|
52
|
-
return false;
|
|
53
|
-
return normalizePath(cwd) === normalizePath(expectedCwd);
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
// File has content but no session.start yet — inconclusive
|
|
57
|
-
return null;
|
|
58
|
-
}
|
|
59
|
-
catch {
|
|
60
|
-
// File doesn't exist or can't be read yet — inconclusive
|
|
61
|
-
return null;
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
/**
|
|
65
|
-
* Extract the last response text from Copilot session events.
|
|
66
|
-
*
|
|
67
|
-
* Finds the last completed turn (bounded by `assistant.turn_start` and
|
|
68
|
-
* `assistant.turn_end`) and collects `data.content` from all
|
|
69
|
-
* `assistant.message` events within that turn.
|
|
70
|
-
*/
|
|
71
|
-
export function extractCopilotResponse(lines) {
|
|
72
|
-
// Find the last turn_end, then the matching turn_start before it
|
|
73
|
-
let lastTurnEnd = -1;
|
|
74
|
-
let lastTurnStart = -1;
|
|
75
|
-
for (let i = lines.length - 1; i >= 0; i--) {
|
|
76
|
-
if (lines[i].type === "assistant.turn_end" && lastTurnEnd === -1) {
|
|
77
|
-
lastTurnEnd = i;
|
|
78
|
-
}
|
|
79
|
-
else if (lines[i].type === "assistant.turn_start" && lastTurnEnd !== -1) {
|
|
80
|
-
lastTurnStart = i;
|
|
81
|
-
break;
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
// When turn_end is missing (e.g., exit tool short-circuit), fall back to
|
|
85
|
-
// collecting all messages after the last turn_start.
|
|
86
|
-
if (lastTurnStart === -1 && lastTurnEnd === -1) {
|
|
87
|
-
// No turn markers at all — find the last turn_start forward
|
|
88
|
-
for (let i = 0; i < lines.length; i++) {
|
|
89
|
-
if (lines[i].type === "assistant.turn_start")
|
|
90
|
-
lastTurnStart = i;
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
if (lastTurnStart === -1)
|
|
94
|
-
return "";
|
|
95
|
-
const endIdx = lastTurnEnd !== -1 ? lastTurnEnd : lines.length;
|
|
96
|
-
// Collect assistant.message content strictly within the turn boundaries
|
|
97
|
-
const parts = [];
|
|
98
|
-
for (let i = lastTurnStart + 1; i < endIdx; i++) {
|
|
99
|
-
const line = lines[i];
|
|
100
|
-
if (line.type === "assistant.message") {
|
|
101
|
-
const data = line.data;
|
|
102
|
-
if (data?.content) {
|
|
103
|
-
parts.push(data.content);
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
return parts.join("\n");
|
|
108
|
-
}
|
|
109
|
-
/**
|
|
110
|
-
* Thrown when a tracked `ask_user` round in a Copilot session JSONL has a
|
|
111
|
-
* missing or malformed payload. Carries `noRetry = true` so
|
|
112
|
-
* `runPhaseWithRetries` skips re-parsing the same broken JSONL and the
|
|
113
|
-
* orchestrator's executor-level hook triggers a session dump before the
|
|
114
|
-
* error propagates and the CLI exits.
|
|
115
|
-
*/
|
|
116
|
-
export class CopilotQACaptureError extends Error {
|
|
117
|
-
noRetry = true;
|
|
118
|
-
constructor(message) {
|
|
119
|
-
super(message);
|
|
120
|
-
this.name = "CopilotQACaptureError";
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
function isRecord(value) {
|
|
124
|
-
return value !== null && typeof value === "object" && !Array.isArray(value);
|
|
125
|
-
}
|
|
126
|
-
/**
|
|
127
|
-
* Extract `ask_user` Q&A pairs from Copilot session lines.
|
|
128
|
-
*
|
|
129
|
-
* Each round is a `tool.execution_start` + `tool.execution_complete` pair
|
|
130
|
-
* matched by `data.toolCallId`. Single-question rounds use
|
|
131
|
-
* `data.arguments.question` and
|
|
132
|
-
* `data.toolTelemetry.restrictedProperties.answer`; multi-question form rounds
|
|
133
|
-
* use `data.arguments.message` and accepted `result.detailedContent`.
|
|
134
|
-
*
|
|
135
|
-
* Strict-throw contract (mirrors Claude's): malformed start- or
|
|
136
|
-
* completion-side payloads throw `CopilotQACaptureError` (with
|
|
137
|
-
* `noRetry: true`) so the orchestrator's executor-level hook can dump the
|
|
138
|
-
* broken JSONL alongside the failed step's artifacts. Narrow,
|
|
139
|
-
* well-formed cancellation/failure signals (`success: false`, a
|
|
140
|
-
* single-question non-`"answered"` outcome, or a multi-question form
|
|
141
|
-
* non-`"accept"` action) consume the round silently without emitting.
|
|
142
|
-
* Completion events for
|
|
143
|
-
* `toolCallId`s we did not track (e.g. `view`, `bash`) are ignored.
|
|
144
|
-
*/
|
|
145
|
-
export function extractCopilotClarifications(lines) {
|
|
146
|
-
const clarifications = [];
|
|
147
|
-
// toolCallId → question text. Filters unrelated tool.execution_complete
|
|
148
|
-
// events so completion-side strictness only kicks in on ask_user rounds.
|
|
149
|
-
const questionMap = new Map();
|
|
150
|
-
const schemaCalls = new Set();
|
|
151
|
-
for (const line of lines) {
|
|
152
|
-
if (line.type === "tool.execution_start") {
|
|
153
|
-
const data = line.data;
|
|
154
|
-
if (!data || data.toolName !== "ask_user")
|
|
155
|
-
continue;
|
|
156
|
-
if (typeof data.toolCallId !== "string" || data.toolCallId.length === 0) {
|
|
157
|
-
throw new CopilotQACaptureError("tool.execution_start for ask_user has missing/non-string toolCallId");
|
|
158
|
-
}
|
|
159
|
-
const toolCallId = data.toolCallId;
|
|
160
|
-
const args = data.arguments;
|
|
161
|
-
const question = args?.question;
|
|
162
|
-
if (typeof question === "string" && question.length > 0) {
|
|
163
|
-
questionMap.set(toolCallId, question);
|
|
164
|
-
}
|
|
165
|
-
else if (typeof args?.message === "string" &&
|
|
166
|
-
args.message.length > 0 &&
|
|
167
|
-
isRecord(args.requestedSchema) &&
|
|
168
|
-
isRecord(args.requestedSchema.properties)) {
|
|
169
|
-
questionMap.set(toolCallId, args.message);
|
|
170
|
-
schemaCalls.add(toolCallId);
|
|
171
|
-
}
|
|
172
|
-
else {
|
|
173
|
-
throw new CopilotQACaptureError("tool.execution_start for ask_user does not match a supported payload schema: " +
|
|
174
|
-
"expected single-question arguments.question or multi-question " +
|
|
175
|
-
`arguments.message + arguments.requestedSchema.properties (toolCallId=${toolCallId})`);
|
|
176
|
-
}
|
|
177
|
-
continue;
|
|
178
|
-
}
|
|
179
|
-
if (line.type === "tool.execution_complete") {
|
|
180
|
-
const data = line.data;
|
|
181
|
-
if (!data || typeof data.toolCallId !== "string")
|
|
182
|
-
continue;
|
|
183
|
-
const question = questionMap.get(data.toolCallId);
|
|
184
|
-
if (!question)
|
|
185
|
-
continue;
|
|
186
|
-
const ctx = `toolCallId=${data.toolCallId} question="${question}"`;
|
|
187
|
-
// Step 1: success must be boolean.
|
|
188
|
-
if (typeof data.success !== "boolean") {
|
|
189
|
-
throw new CopilotQACaptureError(`tool.execution_complete success field is not a boolean (${ctx})`);
|
|
190
|
-
}
|
|
191
|
-
// Step 2: explicit failure — consume + skip, no throw.
|
|
192
|
-
if (data.success === false) {
|
|
193
|
-
questionMap.delete(data.toolCallId);
|
|
194
|
-
schemaCalls.delete(data.toolCallId);
|
|
195
|
-
continue;
|
|
196
|
-
}
|
|
197
|
-
// Step 3: toolTelemetry must be a non-array object.
|
|
198
|
-
if (!data.toolTelemetry ||
|
|
199
|
-
typeof data.toolTelemetry !== "object" ||
|
|
200
|
-
Array.isArray(data.toolTelemetry)) {
|
|
201
|
-
throw new CopilotQACaptureError(`tool.execution_complete success=true but toolTelemetry is not a non-array object (${ctx})`);
|
|
202
|
-
}
|
|
203
|
-
const telemetry = data.toolTelemetry;
|
|
204
|
-
// Step 4: toolTelemetry.properties must be a non-array object.
|
|
205
|
-
if (!telemetry.properties ||
|
|
206
|
-
typeof telemetry.properties !== "object" ||
|
|
207
|
-
Array.isArray(telemetry.properties)) {
|
|
208
|
-
throw new CopilotQACaptureError(`tool.execution_complete toolTelemetry.properties is not a non-array object (${ctx})`);
|
|
209
|
-
}
|
|
210
|
-
const properties = telemetry.properties;
|
|
211
|
-
if (schemaCalls.has(data.toolCallId)) {
|
|
212
|
-
const action = properties.elicitation_action;
|
|
213
|
-
if (typeof action !== "string" || action.length === 0) {
|
|
214
|
-
throw new CopilotQACaptureError("tool.execution_complete for multi-question ask_user has " +
|
|
215
|
-
"missing/non-string toolTelemetry.properties.elicitation_action " +
|
|
216
|
-
`needed to distinguish accepted and cancelled forms (${ctx})`);
|
|
217
|
-
}
|
|
218
|
-
if (action === "accept") {
|
|
219
|
-
const result = isRecord(data.result) ? data.result : undefined;
|
|
220
|
-
const content = result?.detailedContent;
|
|
221
|
-
if (typeof content !== "string" || content.length === 0) {
|
|
222
|
-
throw new CopilotQACaptureError("tool.execution_complete for accepted multi-question ask_user has " +
|
|
223
|
-
`missing/non-string result.detailedContent (${ctx})`);
|
|
224
|
-
}
|
|
225
|
-
clarifications.push({ question, answer: content });
|
|
226
|
-
}
|
|
227
|
-
questionMap.delete(data.toolCallId);
|
|
228
|
-
schemaCalls.delete(data.toolCallId);
|
|
229
|
-
continue;
|
|
230
|
-
}
|
|
231
|
-
// Step 5: outcome must be a non-empty string.
|
|
232
|
-
if (typeof properties.outcome !== "string" || properties.outcome.length === 0) {
|
|
233
|
-
throw new CopilotQACaptureError(`tool.execution_complete toolTelemetry.properties.outcome is not a non-empty string (${ctx})`);
|
|
234
|
-
}
|
|
235
|
-
// Step 6: explicit cancellation — consume + skip, no throw.
|
|
236
|
-
if (properties.outcome !== "answered") {
|
|
237
|
-
questionMap.delete(data.toolCallId);
|
|
238
|
-
continue;
|
|
239
|
-
}
|
|
240
|
-
// Step 7: restrictedProperties must be a non-array object.
|
|
241
|
-
if (!telemetry.restrictedProperties ||
|
|
242
|
-
typeof telemetry.restrictedProperties !== "object" ||
|
|
243
|
-
Array.isArray(telemetry.restrictedProperties)) {
|
|
244
|
-
throw new CopilotQACaptureError(`tool.execution_complete toolTelemetry.restrictedProperties is not a non-array object (${ctx})`);
|
|
245
|
-
}
|
|
246
|
-
const restricted = telemetry.restrictedProperties;
|
|
247
|
-
// Step 8: answer must be a non-empty string.
|
|
248
|
-
if (typeof restricted.answer !== "string" || restricted.answer.length === 0) {
|
|
249
|
-
throw new CopilotQACaptureError(`tool.execution_complete toolTelemetry.restrictedProperties.answer is not a non-empty string (${ctx})`);
|
|
250
|
-
}
|
|
251
|
-
// Step 9: emit.
|
|
252
|
-
clarifications.push({ question, answer: restricted.answer });
|
|
253
|
-
questionMap.delete(data.toolCallId);
|
|
254
|
-
}
|
|
255
|
-
}
|
|
256
|
-
return clarifications;
|
|
9
|
+
return join(process.env.COPILOT_HOME || join(homedir(), ".copilot"), "session-state");
|
|
257
10
|
}
|
|
258
11
|
/**
|
|
259
12
|
* Copilot session handler.
|
|
260
13
|
*
|
|
261
|
-
*
|
|
262
|
-
*
|
|
263
|
-
* rounds (paired `tool.execution_start` + `tool.execution_complete`
|
|
264
|
-
* events) — same strict throw-and-dump contract as Claude for malformed payloads.
|
|
14
|
+
* Predicts and resolves opaque resume anchors in Copilot's UUID-based session
|
|
15
|
+
* directory. Live session discovery and observation belong to the SDK observer.
|
|
265
16
|
*/
|
|
266
17
|
export class CopilotSessionHandler {
|
|
267
18
|
getSessionDir;
|
|
@@ -277,80 +28,14 @@ export class CopilotSessionHandler {
|
|
|
277
28
|
return existsSync(path) ? path : undefined;
|
|
278
29
|
}
|
|
279
30
|
async snapshot(_workdir) {
|
|
280
|
-
|
|
281
|
-
const dirs = await snapshotSessionDirs(dir);
|
|
282
|
-
// Store directory names as the "files" set — the snapshot type uses
|
|
283
|
-
// Set<string> generically, and we repurpose it for directory names.
|
|
284
|
-
return { skipped: false, dir, files: dirs };
|
|
31
|
+
throw new Error("Copilot JSONL session discovery is disabled; use the SDK live observer");
|
|
285
32
|
}
|
|
286
|
-
async findSessionFile(
|
|
287
|
-
|
|
288
|
-
throw new Error("Cannot find session file: snapshot was skipped");
|
|
289
|
-
}
|
|
290
|
-
const { dir, files: knownDirs } = snapshot;
|
|
291
|
-
const signal = opts?.signal;
|
|
292
|
-
return pollUntil(async () => {
|
|
293
|
-
let entries;
|
|
294
|
-
try {
|
|
295
|
-
const dirEntries = await readdir(dir, { withFileTypes: true });
|
|
296
|
-
entries = dirEntries
|
|
297
|
-
.filter((e) => e.isDirectory())
|
|
298
|
-
.map((e) => e.name);
|
|
299
|
-
}
|
|
300
|
-
catch {
|
|
301
|
-
entries = [];
|
|
302
|
-
}
|
|
303
|
-
for (const name of entries) {
|
|
304
|
-
throwIfAborted(signal);
|
|
305
|
-
if (knownDirs.has(name))
|
|
306
|
-
continue;
|
|
307
|
-
const eventsFile = join(dir, name, "events.jsonl");
|
|
308
|
-
const result = await verifyCopilotSessionCwd(eventsFile, workdir);
|
|
309
|
-
if (result === true)
|
|
310
|
-
return eventsFile;
|
|
311
|
-
if (result === false) {
|
|
312
|
-
// Definitive CWD mismatch — belongs to a different concurrent
|
|
313
|
-
// Copilot process. Skip permanently.
|
|
314
|
-
knownDirs.add(name);
|
|
315
|
-
}
|
|
316
|
-
// result === null → inconclusive (file missing/empty/no session.start
|
|
317
|
-
// yet). Don't add to knownDirs — retry on next poll.
|
|
318
|
-
}
|
|
319
|
-
return undefined;
|
|
320
|
-
}, {
|
|
321
|
-
timeoutMs: opts?.timeoutMs ?? SESSION_FILE_WAIT_MS,
|
|
322
|
-
pollMs: 500,
|
|
323
|
-
signal,
|
|
324
|
-
timeoutMessage: `Timed out waiting for new Copilot session directory in ${dir}`,
|
|
325
|
-
});
|
|
33
|
+
async findSessionFile(_snapshot, _workdir, _opts) {
|
|
34
|
+
throw new Error("Copilot JSONL session discovery is disabled; use the SDK live observer");
|
|
326
35
|
}
|
|
327
36
|
async extractSessionId(sessionFilePath) {
|
|
328
37
|
// Session ID is the UUID directory name (parent of events.jsonl)
|
|
329
38
|
return basename(dirname(sessionFilePath));
|
|
330
39
|
}
|
|
331
|
-
async extractPlanFilePath(sessionFilePath, _lineOffset) {
|
|
332
|
-
const planPath = join(dirname(sessionFilePath), "plan.md");
|
|
333
|
-
// Bounded retry: completion detector fires on exit_plan_mode, but plan.md
|
|
334
|
-
// may not be flushed to disk yet. Poll up to 5s at 250ms intervals.
|
|
335
|
-
const deadline = Date.now() + 5_000;
|
|
336
|
-
const pollMs = 250;
|
|
337
|
-
while (Date.now() < deadline) {
|
|
338
|
-
try {
|
|
339
|
-
await access(planPath);
|
|
340
|
-
return planPath;
|
|
341
|
-
}
|
|
342
|
-
catch {
|
|
343
|
-
await new Promise((r) => setTimeout(r, pollMs));
|
|
344
|
-
}
|
|
345
|
-
}
|
|
346
|
-
return undefined;
|
|
347
|
-
}
|
|
348
|
-
async extractClarifications(sessionFilePath, lineOffset) {
|
|
349
|
-
return extractCopilotClarifications(await this.readNewLines(sessionFilePath, lineOffset));
|
|
350
|
-
}
|
|
351
|
-
async readNewLines(sessionFilePath, lineOffset) {
|
|
352
|
-
const allLines = await readSessionFile(sessionFilePath);
|
|
353
|
-
return allLines.slice(lineOffset);
|
|
354
|
-
}
|
|
355
40
|
}
|
|
356
41
|
//# sourceMappingURL=session.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"session.js","sourceRoot":"","sources":["../../../src/providers/copilot/session.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AACpD,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAEnD,OAAO,EAAE,eAAe,EAAoB,MAAM,yBAAyB,CAAC;AAC5E,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EACL,SAAS,EACT,oBAAoB,EACpB,cAAc,GACf,MAAM,0BAA0B,CAAC;AAIlC;;;GAGG;AACH,MAAM,UAAU,oBAAoB;IAClC,OAAO,IAAI,CAAC,OAAO,EAAE,EAAE,UAAU,EAAE,eAAe,CAAC,CAAC;AACtD,CAAC;AAED;;GAEG;AACH,KAAK,UAAU,mBAAmB,CAAC,GAAW;IAC5C,MAAM,IAAI,GAAG,IAAI,GAAG,EAAU,CAAC;IAC/B,IAAI,CAAC;QACH,MAAM,OAAO,GAAG,MAAM,OAAO,CAAC,GAAG,EAAE,EAAE,aAAa,EAAE,IAAI,EAAE,CAAC,CAAC;QAC5D,KAAK,MAAM,KAAK,IAAI,OAAO,EAAE,CAAC;YAC5B,IAAI,KAAK,CAAC,WAAW,EAAE,EAAE,CAAC;gBACxB,IAAI,CAA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QAAQ,CAAC,OAAO,CAAC,eAAe,CAAC,CAAC,CAAC;IAC5C,CAAC;CACF"}
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import type { ForkHandler } from "../fork.js";
|
|
2
|
-
import type { CancelSequence, PlanModeConfig, ProviderStrategy, SessionHandler, BuildArgsOpts,
|
|
3
|
-
import type { CompletionDetectorOptions } from "../types.js";
|
|
4
|
-
import { CopilotCompletionDetector } from "./completion.js";
|
|
2
|
+
import type { CancelSequence, PlanModeConfig, ProviderStrategy, SessionHandler, BuildArgsOpts, OptionCatalog, SimplifierPromptOptions, SubagentOptionCatalog, LiveSessionHandler, ProviderObserverRun } from "../types.js";
|
|
5
3
|
import { CopilotComposerInspector } from "./composer.js";
|
|
6
4
|
export declare class CopilotStrategy implements ProviderStrategy {
|
|
7
5
|
readonly name = "copilot";
|
|
@@ -14,16 +12,16 @@ export declare class CopilotStrategy implements ProviderStrategy {
|
|
|
14
12
|
readonly live: LiveSessionHandler;
|
|
15
13
|
readonly fork: ForkHandler;
|
|
16
14
|
readonly composer: CopilotComposerInspector;
|
|
17
|
-
readonly forkSubmitFloor: ForkSubmitFloorPolicy;
|
|
18
15
|
readonly simplifierSubagentType = "explore";
|
|
19
16
|
version: string | undefined;
|
|
20
17
|
readonly planMode: PlanModeConfig;
|
|
21
18
|
readonly options: OptionCatalog;
|
|
22
19
|
readonly subagentOptions: SubagentOptionCatalog;
|
|
23
20
|
buildArgs(prompt: string, opts: BuildArgsOpts): Promise<string[]>;
|
|
21
|
+
createObserverRun(): Promise<ProviderObserverRun>;
|
|
24
22
|
ensureTrust(workdir: string): Promise<void>;
|
|
25
23
|
simplifierPrompt(opts: SimplifierPromptOptions): string;
|
|
26
|
-
createDetector(
|
|
24
|
+
createDetector(): never;
|
|
27
25
|
private copilotModels;
|
|
28
26
|
private copilotSubagentModels;
|
|
29
27
|
private copilotSupportsMaxEffort;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"strategy.d.ts","sourceRoot":"","sources":["../../../src/providers/copilot/strategy.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"strategy.d.ts","sourceRoot":"","sources":["../../../src/providers/copilot/strategy.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,WAAW,EAMZ,MAAM,YAAY,CAAC;AAEpB,OAAO,KAAK,EACV,cAAc,EACd,cAAc,EACd,gBAAgB,EAChB,cAAc,EACd,aAAa,EACb,aAAa,EACb,uBAAuB,EACvB,qBAAqB,EACrB,kBAAkB,EAElB,mBAAmB,EACpB,MAAM,aAAa,CAAC;AAYrB,OAAO,EAAE,wBAAwB,EAAE,MAAM,eAAe,CAAC;AAuDzD,qBAAa,eAAgB,YAAW,gBAAgB;IACtD,QAAQ,CAAC,IAAI,aAAa;IAC1B,QAAQ,CAAC,WAAW,wBAAwB;IAC5C,QAAQ,CAAC,OAAO,aAAa;IAC7B,QAAQ,CAAC,UAAU,YAAU;IAC7B,QAAQ,CAAC,cAAc,EAAE,cAAc,CAIrC;IACF,QAAQ,CAAC,sBAAsB,YAAY;IAC3C,QAAQ,CAAC,OAAO,EAAE,cAAc,CAA+B;IAC/D,QAAQ,CAAC,IAAI,EAAE,kBAAkB,CAAuC;IACxE,QAAQ,CAAC,IAAI,EAAE,WAAW,CAAgC;IAC1D,QAAQ,CAAC,QAAQ,2BAAkC;IACnD,QAAQ,CAAC,sBAAsB,aAAa;IAC5C,OAAO,EAAE,MAAM,GAAG,SAAS,CAAa;IACxC,QAAQ,CAAC,QAAQ,EAAE,cAAc,CAI/B;IACF,QAAQ,CAAC,OAAO,EAAE,aAAa,CAkC7B;IACF,QAAQ,CAAC,eAAe,EAAE,qBAAqB,CAM7C;IAEI,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,aAAa,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;IAoCvE,iBAAiB,IAAI,OAAO,CAAC,mBAAmB,CAAC;IAI3C,WAAW,CAAC,OAAO,EAAE,MAAM,G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