@codemieai/code 0.10.1 → 0.12.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/core/AgentCLI.d.ts.map +1 -1
- package/dist/agents/core/AgentCLI.js +11 -3
- package/dist/agents/core/AgentCLI.js.map +1 -1
- package/dist/agents/core/BaseAgentAdapter.d.ts +3 -1
- package/dist/agents/core/BaseAgentAdapter.d.ts.map +1 -1
- package/dist/agents/core/BaseAgentAdapter.js +34 -2
- package/dist/agents/core/BaseAgentAdapter.js.map +1 -1
- package/dist/agents/core/config-redaction.d.ts +7 -0
- package/dist/agents/core/config-redaction.d.ts.map +1 -0
- package/dist/agents/core/config-redaction.js +20 -0
- package/dist/agents/core/config-redaction.js.map +1 -0
- package/dist/agents/core/print-config.d.ts +8 -0
- package/dist/agents/core/print-config.d.ts.map +1 -0
- package/dist/agents/core/print-config.js +17 -0
- package/dist/agents/core/print-config.js.map +1 -0
- package/dist/agents/core/session/BaseSessionAdapter.d.ts +24 -1
- package/dist/agents/core/session/BaseSessionAdapter.d.ts.map +1 -1
- package/dist/agents/core/types.d.ts +44 -4
- package/dist/agents/core/types.d.ts.map +1 -1
- package/dist/agents/plugins/claude/claude.plugin.d.ts.map +1 -1
- package/dist/agents/plugins/claude/claude.plugin.js +73 -0
- package/dist/agents/plugins/claude/claude.plugin.js.map +1 -1
- package/dist/agents/plugins/claude/session/processors/claude.conversations-processor.d.ts.map +1 -1
- package/dist/agents/plugins/claude/session/processors/claude.conversations-processor.js +115 -32
- package/dist/agents/plugins/claude/session/processors/claude.conversations-processor.js.map +1 -1
- package/dist/agents/plugins/claude/settings-conflict.d.ts +8 -0
- package/dist/agents/plugins/claude/settings-conflict.d.ts.map +1 -0
- package/dist/agents/plugins/claude/settings-conflict.js +35 -0
- package/dist/agents/plugins/claude/settings-conflict.js.map +1 -0
- package/dist/agents/plugins/codemie-code-hooks/shell-hooks-source.d.ts +14 -2
- package/dist/agents/plugins/codemie-code-hooks/shell-hooks-source.d.ts.map +1 -1
- package/dist/agents/plugins/codemie-code-hooks/shell-hooks-source.js +218 -263
- package/dist/agents/plugins/codemie-code-hooks/shell-hooks-source.js.map +1 -1
- package/dist/agents/plugins/copilot-cli/copilot-cli-event-types.d.ts +146 -0
- package/dist/agents/plugins/copilot-cli/copilot-cli-event-types.d.ts.map +1 -0
- package/dist/agents/plugins/copilot-cli/copilot-cli-event-types.js +12 -0
- package/dist/agents/plugins/copilot-cli/copilot-cli-event-types.js.map +1 -0
- package/dist/agents/plugins/copilot-cli/copilot-cli.constants.d.ts +11 -0
- package/dist/agents/plugins/copilot-cli/copilot-cli.constants.d.ts.map +1 -0
- package/dist/agents/plugins/copilot-cli/copilot-cli.constants.js +11 -0
- package/dist/agents/plugins/copilot-cli/copilot-cli.constants.js.map +1 -0
- package/dist/agents/plugins/copilot-cli/copilot-cli.paths.d.ts +11 -0
- package/dist/agents/plugins/copilot-cli/copilot-cli.paths.d.ts.map +1 -0
- package/dist/agents/plugins/copilot-cli/copilot-cli.paths.js +21 -0
- package/dist/agents/plugins/copilot-cli/copilot-cli.paths.js.map +1 -0
- package/dist/agents/plugins/copilot-cli/copilot-cli.plugin.d.ts +30 -0
- package/dist/agents/plugins/copilot-cli/copilot-cli.plugin.d.ts.map +1 -0
- package/dist/agents/plugins/copilot-cli/copilot-cli.plugin.js +64 -0
- package/dist/agents/plugins/copilot-cli/copilot-cli.plugin.js.map +1 -0
- package/dist/agents/plugins/copilot-cli/copilot-cli.session.d.ts +43 -0
- package/dist/agents/plugins/copilot-cli/copilot-cli.session.d.ts.map +1 -0
- package/dist/agents/plugins/copilot-cli/copilot-cli.session.js +331 -0
- package/dist/agents/plugins/copilot-cli/copilot-cli.session.js.map +1 -0
- package/dist/agents/plugins/copilot-cli/copilot-cli.storage-utils.d.ts +10 -0
- package/dist/agents/plugins/copilot-cli/copilot-cli.storage-utils.d.ts.map +1 -0
- package/dist/agents/plugins/copilot-cli/copilot-cli.storage-utils.js +41 -0
- package/dist/agents/plugins/copilot-cli/copilot-cli.storage-utils.js.map +1 -0
- package/dist/agents/plugins/copilot-cli/copilot-cli.usage.d.ts +37 -0
- package/dist/agents/plugins/copilot-cli/copilot-cli.usage.d.ts.map +1 -0
- package/dist/agents/plugins/copilot-cli/copilot-cli.usage.js +96 -0
- package/dist/agents/plugins/copilot-cli/copilot-cli.usage.js.map +1 -0
- package/dist/agents/plugins/copilot-cli/copilot-cli.workspace.d.ts +17 -0
- package/dist/agents/plugins/copilot-cli/copilot-cli.workspace.d.ts.map +1 -0
- package/dist/agents/plugins/copilot-cli/copilot-cli.workspace.js +58 -0
- package/dist/agents/plugins/copilot-cli/copilot-cli.workspace.js.map +1 -0
- package/dist/agents/plugins/copilot-cli/index.d.ts +2 -0
- package/dist/agents/plugins/copilot-cli/index.d.ts.map +1 -0
- package/dist/agents/plugins/copilot-cli/index.js +2 -0
- package/dist/agents/plugins/copilot-cli/index.js.map +1 -0
- package/dist/agents/plugins/copilot-cli/session/processors/copilot-cli.conversations-processor.d.ts +15 -0
- package/dist/agents/plugins/copilot-cli/session/processors/copilot-cli.conversations-processor.d.ts.map +1 -0
- package/dist/agents/plugins/copilot-cli/session/processors/copilot-cli.conversations-processor.js +20 -0
- package/dist/agents/plugins/copilot-cli/session/processors/copilot-cli.conversations-processor.js.map +1 -0
- package/dist/agents/plugins/copilot-cli/session/processors/copilot-cli.metrics-processor.d.ts +16 -0
- package/dist/agents/plugins/copilot-cli/session/processors/copilot-cli.metrics-processor.d.ts.map +1 -0
- package/dist/agents/plugins/copilot-cli/session/processors/copilot-cli.metrics-processor.js +22 -0
- package/dist/agents/plugins/copilot-cli/session/processors/copilot-cli.metrics-processor.js.map +1 -0
- package/dist/agents/plugins/opencode/opencode-message-types.d.ts +13 -0
- package/dist/agents/plugins/opencode/opencode-message-types.d.ts.map +1 -1
- package/dist/agents/plugins/opencode/opencode-message-types.js.map +1 -1
- package/dist/agents/plugins/opencode/opencode.incremental-sync.d.ts +38 -0
- package/dist/agents/plugins/opencode/opencode.incremental-sync.d.ts.map +1 -0
- package/dist/agents/plugins/opencode/opencode.incremental-sync.js +153 -0
- package/dist/agents/plugins/opencode/opencode.incremental-sync.js.map +1 -0
- package/dist/agents/plugins/opencode/opencode.paths.d.ts +18 -2
- package/dist/agents/plugins/opencode/opencode.paths.d.ts.map +1 -1
- package/dist/agents/plugins/opencode/opencode.paths.js +39 -6
- package/dist/agents/plugins/opencode/opencode.paths.js.map +1 -1
- package/dist/agents/plugins/opencode/opencode.plugin.d.ts.map +1 -1
- package/dist/agents/plugins/opencode/opencode.plugin.js +241 -75
- package/dist/agents/plugins/opencode/opencode.plugin.js.map +1 -1
- package/dist/agents/plugins/opencode/opencode.session.d.ts +18 -1
- package/dist/agents/plugins/opencode/opencode.session.d.ts.map +1 -1
- package/dist/agents/plugins/opencode/opencode.session.js +58 -17
- package/dist/agents/plugins/opencode/opencode.session.js.map +1 -1
- package/dist/agents/plugins/opencode/opencode.sqlite-reader.d.ts +8 -2
- package/dist/agents/plugins/opencode/opencode.sqlite-reader.d.ts.map +1 -1
- package/dist/agents/plugins/opencode/opencode.sqlite-reader.js +67 -42
- package/dist/agents/plugins/opencode/opencode.sqlite-reader.js.map +1 -1
- package/dist/agents/plugins/opencode/opencode.storage-utils.d.ts +19 -0
- package/dist/agents/plugins/opencode/opencode.storage-utils.d.ts.map +1 -1
- package/dist/agents/plugins/opencode/opencode.storage-utils.js +51 -0
- package/dist/agents/plugins/opencode/opencode.storage-utils.js.map +1 -1
- package/dist/agents/plugins/opencode/session/processors/opencode.conversations-processor.d.ts +13 -19
- package/dist/agents/plugins/opencode/session/processors/opencode.conversations-processor.d.ts.map +1 -1
- package/dist/agents/plugins/opencode/session/processors/opencode.conversations-processor.js +339 -82
- package/dist/agents/plugins/opencode/session/processors/opencode.conversations-processor.js.map +1 -1
- package/dist/agents/plugins/opencode/session/processors/opencode.metrics-processor.d.ts +37 -33
- package/dist/agents/plugins/opencode/session/processors/opencode.metrics-processor.d.ts.map +1 -1
- package/dist/agents/plugins/opencode/session/processors/opencode.metrics-processor.js +204 -246
- package/dist/agents/plugins/opencode/session/processors/opencode.metrics-processor.js.map +1 -1
- package/dist/agents/registry.d.ts +20 -0
- package/dist/agents/registry.d.ts.map +1 -1
- package/dist/agents/registry.js +29 -2
- package/dist/agents/registry.js.map +1 -1
- package/dist/cli/commands/analytics/agent-labels.d.ts +3 -0
- package/dist/cli/commands/analytics/agent-labels.d.ts.map +1 -0
- package/dist/cli/commands/analytics/agent-labels.js +19 -0
- package/dist/cli/commands/analytics/agent-labels.js.map +1 -0
- package/dist/cli/commands/analytics/cost/cost-enricher.d.ts.map +1 -1
- package/dist/cli/commands/analytics/cost/cost-enricher.js +12 -0
- package/dist/cli/commands/analytics/cost/cost-enricher.js.map +1 -1
- package/dist/cli/commands/analytics/cost/types.d.ts +10 -0
- package/dist/cli/commands/analytics/cost/types.d.ts.map +1 -1
- package/dist/cli/commands/analytics/cost/usage-readers.d.ts.map +1 -1
- package/dist/cli/commands/analytics/cost/usage-readers.js +54 -0
- package/dist/cli/commands/analytics/cost/usage-readers.js.map +1 -1
- package/dist/cli/commands/analytics/formatter.d.ts.map +1 -1
- package/dist/cli/commands/analytics/formatter.js +10 -2
- package/dist/cli/commands/analytics/formatter.js.map +1 -1
- package/dist/cli/commands/analytics/index.d.ts.map +1 -1
- package/dist/cli/commands/analytics/index.js +21 -0
- package/dist/cli/commands/analytics/index.js.map +1 -1
- package/dist/cli/commands/analytics/native-loader.d.ts.map +1 -1
- package/dist/cli/commands/analytics/native-loader.js +28 -3
- package/dist/cli/commands/analytics/native-loader.js.map +1 -1
- package/dist/cli/commands/analytics/report/client/app.js +32 -14
- package/dist/cli/commands/analytics/report/payload-builder.d.ts.map +1 -1
- package/dist/cli/commands/analytics/report/payload-builder.js +7 -0
- package/dist/cli/commands/analytics/report/payload-builder.js.map +1 -1
- package/dist/cli/commands/analytics/report/types.d.ts +10 -0
- package/dist/cli/commands/analytics/report/types.d.ts.map +1 -1
- package/dist/cli/commands/install.js +2 -2
- package/dist/cli/commands/install.js.map +1 -1
- package/dist/cli/commands/list.js +1 -1
- package/dist/cli/commands/list.js.map +1 -1
- package/dist/cli/commands/proxy/connectors/desktop.d.ts.map +1 -1
- package/dist/cli/commands/proxy/connectors/desktop.js +6 -0
- package/dist/cli/commands/proxy/connectors/desktop.js.map +1 -1
- package/dist/cli/commands/proxy/connectors/vscode-models.d.ts +1 -0
- package/dist/cli/commands/proxy/connectors/vscode-models.d.ts.map +1 -1
- package/dist/cli/commands/proxy/connectors/vscode-models.js +36 -12
- package/dist/cli/commands/proxy/connectors/vscode-models.js.map +1 -1
- package/dist/cli/commands/proxy/connectors/vscode.d.ts.map +1 -1
- package/dist/cli/commands/proxy/connectors/vscode.js +3 -0
- package/dist/cli/commands/proxy/connectors/vscode.js.map +1 -1
- package/dist/cli/commands/proxy/health-check.d.ts.map +1 -1
- package/dist/cli/commands/proxy/health-check.js +9 -0
- package/dist/cli/commands/proxy/health-check.js.map +1 -1
- package/dist/cli/commands/setup.d.ts +33 -0
- package/dist/cli/commands/setup.d.ts.map +1 -1
- package/dist/cli/commands/setup.js +151 -35
- package/dist/cli/commands/setup.js.map +1 -1
- package/dist/cli/commands/uninstall.js +1 -1
- package/dist/cli/commands/uninstall.js.map +1 -1
- package/dist/cli/commands/update.js +2 -2
- package/dist/cli/commands/update.js.map +1 -1
- package/dist/cli/first-time.js +3 -3
- package/dist/cli/first-time.js.map +1 -1
- package/dist/providers/core/types.d.ts +28 -1
- package/dist/providers/core/types.d.ts.map +1 -1
- package/dist/providers/core/types.js.map +1 -1
- package/dist/providers/plugins/bedrock/bedrock.template.d.ts.map +1 -1
- package/dist/providers/plugins/bedrock/bedrock.template.js +21 -2
- package/dist/providers/plugins/bedrock/bedrock.template.js.map +1 -1
- package/dist/providers/plugins/litellm/litellm.setup-steps.d.ts.map +1 -1
- package/dist/providers/plugins/litellm/litellm.setup-steps.js +21 -5
- package/dist/providers/plugins/litellm/litellm.setup-steps.js.map +1 -1
- package/dist/providers/plugins/sso/proxy/plugins/codex-encrypted-content-sanitizer.plugin.d.ts +7 -6
- package/dist/providers/plugins/sso/proxy/plugins/codex-encrypted-content-sanitizer.plugin.d.ts.map +1 -1
- package/dist/providers/plugins/sso/proxy/plugins/codex-encrypted-content-sanitizer.plugin.js +13 -7
- package/dist/providers/plugins/sso/proxy/plugins/codex-encrypted-content-sanitizer.plugin.js.map +1 -1
- package/dist/providers/plugins/sso/proxy/plugins/index.js +1 -1
- package/dist/providers/plugins/sso/proxy/plugins/index.js.map +1 -1
- package/dist/providers/plugins/sso/session/processors/conversations/syncProcessor.js +3 -0
- package/dist/providers/plugins/sso/session/processors/conversations/syncProcessor.js.map +1 -1
- package/dist/providers/plugins/sso/sso.setup-steps.d.ts.map +1 -1
- package/dist/providers/plugins/sso/sso.setup-steps.js +39 -22
- package/dist/providers/plugins/sso/sso.setup-steps.js.map +1 -1
- package/dist/utils/config.d.ts +6 -2
- package/dist/utils/config.d.ts.map +1 -1
- package/dist/utils/config.js +30 -8
- package/dist/utils/config.js.map +1 -1
- package/dist/utils/extensions-scan.d.ts.map +1 -1
- package/dist/utils/extensions-scan.js +59 -22
- package/dist/utils/extensions-scan.js.map +1 -1
- package/dist/utils/mcp-config.d.ts.map +1 -1
- package/dist/utils/mcp-config.js +11 -6
- package/dist/utils/mcp-config.js.map +1 -1
- package/package.json +1 -2
- package/scripts/release.sh +54 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/agents/plugins/copilot-cli/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAChB,wBAAwB,EACxB,sBAAsB,EACtB,wBAAwB,GACzB,MAAM,yBAAyB,CAAC"}
|
package/dist/agents/plugins/copilot-cli/session/processors/copilot-cli.conversations-processor.d.ts
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Conversations processor for Copilot CLI sessions.
|
|
3
|
+
*
|
|
4
|
+
* Copilot persists prompt text in `events.jsonl`; `parseSessionFile` captures it into
|
|
5
|
+
* `metrics.userPrompts`.
|
|
6
|
+
*/
|
|
7
|
+
import type { SessionProcessor, ProcessingContext, ProcessingResult } from '../../../../core/session/BaseProcessor.js';
|
|
8
|
+
import type { ParsedSession } from '../../../../core/session/BaseSessionAdapter.js';
|
|
9
|
+
export declare class CopilotCliConversationsProcessor implements SessionProcessor {
|
|
10
|
+
readonly name = "copilot-cli-conversations";
|
|
11
|
+
readonly priority = 20;
|
|
12
|
+
shouldProcess(session: ParsedSession): boolean;
|
|
13
|
+
process(session: ParsedSession, _context: ProcessingContext): Promise<ProcessingResult>;
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=copilot-cli.conversations-processor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"copilot-cli.conversations-processor.d.ts","sourceRoot":"","sources":["../../../../../../src/agents/plugins/copilot-cli/session/processors/copilot-cli.conversations-processor.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EACV,gBAAgB,EAChB,iBAAiB,EACjB,gBAAgB,EACjB,MAAM,2CAA2C,CAAC;AACnD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gDAAgD,CAAC;AAEpF,qBAAa,gCAAiC,YAAW,gBAAgB;IACvE,QAAQ,CAAC,IAAI,+BAA+B;IAC5C,QAAQ,CAAC,QAAQ,MAAM;IAEvB,aAAa,CAAC,OAAO,EAAE,aAAa,GAAG,OAAO;IAIxC,OAAO,CAAC,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,iBAAiB,GAAG,OAAO,CAAC,gBAAgB,CAAC;CAM9F"}
|
package/dist/agents/plugins/copilot-cli/session/processors/copilot-cli.conversations-processor.js
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Conversations processor for Copilot CLI sessions.
|
|
3
|
+
*
|
|
4
|
+
* Copilot persists prompt text in `events.jsonl`; `parseSessionFile` captures it into
|
|
5
|
+
* `metrics.userPrompts`.
|
|
6
|
+
*/
|
|
7
|
+
export class CopilotCliConversationsProcessor {
|
|
8
|
+
name = 'copilot-cli-conversations';
|
|
9
|
+
priority = 20;
|
|
10
|
+
shouldProcess(session) {
|
|
11
|
+
return (session.metrics?.userPrompts?.length ?? 0) > 0;
|
|
12
|
+
}
|
|
13
|
+
async process(session, _context) {
|
|
14
|
+
return {
|
|
15
|
+
success: true,
|
|
16
|
+
metadata: { recordsProcessed: session.metrics?.userPrompts?.length ?? 0 },
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=copilot-cli.conversations-processor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"copilot-cli.conversations-processor.js","sourceRoot":"","sources":["../../../../../../src/agents/plugins/copilot-cli/session/processors/copilot-cli.conversations-processor.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AASH,MAAM,OAAO,gCAAgC;IAClC,IAAI,GAAG,2BAA2B,CAAC;IACnC,QAAQ,GAAG,EAAE,CAAC;IAEvB,aAAa,CAAC,OAAsB;QAClC,OAAO,CAAC,OAAO,CAAC,OAAO,EAAE,WAAW,EAAE,MAAM,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC;IACzD,CAAC;IAED,KAAK,CAAC,OAAO,CAAC,OAAsB,EAAE,QAA2B;QAC/D,OAAO;YACL,OAAO,EAAE,IAAI;YACb,QAAQ,EAAE,EAAE,gBAAgB,EAAE,OAAO,CAAC,OAAO,EAAE,WAAW,EAAE,MAAM,IAAI,CAAC,EAAE;SAC1E,CAAC;IACJ,CAAC;CACF"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Metrics processor for Copilot CLI sessions.
|
|
3
|
+
*
|
|
4
|
+
* Extraction itself happens in `parseSessionFile` (one pass over `events.jsonl`); this
|
|
5
|
+
* processor exists so the adapter follows the same `SessionProcessor` orchestration every
|
|
6
|
+
* other agent uses.
|
|
7
|
+
*/
|
|
8
|
+
import type { SessionProcessor, ProcessingContext, ProcessingResult } from '../../../../core/session/BaseProcessor.js';
|
|
9
|
+
import type { ParsedSession } from '../../../../core/session/BaseSessionAdapter.js';
|
|
10
|
+
export declare class CopilotCliMetricsProcessor implements SessionProcessor {
|
|
11
|
+
readonly name = "copilot-cli-metrics";
|
|
12
|
+
readonly priority = 10;
|
|
13
|
+
shouldProcess(session: ParsedSession): boolean;
|
|
14
|
+
process(session: ParsedSession, _context: ProcessingContext): Promise<ProcessingResult>;
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=copilot-cli.metrics-processor.d.ts.map
|
package/dist/agents/plugins/copilot-cli/session/processors/copilot-cli.metrics-processor.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"copilot-cli.metrics-processor.d.ts","sourceRoot":"","sources":["../../../../../../src/agents/plugins/copilot-cli/session/processors/copilot-cli.metrics-processor.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EACV,gBAAgB,EAChB,iBAAiB,EACjB,gBAAgB,EACjB,MAAM,2CAA2C,CAAC;AACnD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gDAAgD,CAAC;AAEpF,qBAAa,0BAA2B,YAAW,gBAAgB;IACjE,QAAQ,CAAC,IAAI,yBAAyB;IACtC,QAAQ,CAAC,QAAQ,MAAM;IAEvB,aAAa,CAAC,OAAO,EAAE,aAAa,GAAG,OAAO;IAIxC,OAAO,CAAC,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,iBAAiB,GAAG,OAAO,CAAC,gBAAgB,CAAC;CAO9F"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Metrics processor for Copilot CLI sessions.
|
|
3
|
+
*
|
|
4
|
+
* Extraction itself happens in `parseSessionFile` (one pass over `events.jsonl`); this
|
|
5
|
+
* processor exists so the adapter follows the same `SessionProcessor` orchestration every
|
|
6
|
+
* other agent uses.
|
|
7
|
+
*/
|
|
8
|
+
export class CopilotCliMetricsProcessor {
|
|
9
|
+
name = 'copilot-cli-metrics';
|
|
10
|
+
priority = 10;
|
|
11
|
+
shouldProcess(session) {
|
|
12
|
+
return session.metrics !== undefined;
|
|
13
|
+
}
|
|
14
|
+
async process(session, _context) {
|
|
15
|
+
const toolCalls = Object.values(session.metrics?.tools ?? {}).reduce((sum, n) => sum + n, 0);
|
|
16
|
+
return {
|
|
17
|
+
success: true,
|
|
18
|
+
metadata: { recordsProcessed: toolCalls },
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=copilot-cli.metrics-processor.js.map
|
package/dist/agents/plugins/copilot-cli/session/processors/copilot-cli.metrics-processor.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"copilot-cli.metrics-processor.js","sourceRoot":"","sources":["../../../../../../src/agents/plugins/copilot-cli/session/processors/copilot-cli.metrics-processor.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AASH,MAAM,OAAO,0BAA0B;IAC5B,IAAI,GAAG,qBAAqB,CAAC;IAC7B,QAAQ,GAAG,EAAE,CAAC;IAEvB,aAAa,CAAC,OAAsB;QAClC,OAAO,OAAO,CAAC,OAAO,KAAK,SAAS,CAAC;IACvC,CAAC;IAED,KAAK,CAAC,OAAO,CAAC,OAAsB,EAAE,QAA2B;QAC/D,MAAM,SAAS,GAAG,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,OAAO,EAAE,KAAK,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,CAAC,EAAE,EAAE,CAAC,GAAG,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC;QAC7F,OAAO;YACL,OAAO,EAAE,IAAI;YACb,QAAQ,EAAE,EAAE,gBAAgB,EAAE,SAAS,EAAE;SAC1C,CAAC;IACJ,CAAC;CACF"}
|
|
@@ -32,6 +32,7 @@ export interface OpenCodeMessageBase {
|
|
|
32
32
|
role: 'user' | 'assistant';
|
|
33
33
|
time: {
|
|
34
34
|
created: number;
|
|
35
|
+
completed?: number;
|
|
35
36
|
};
|
|
36
37
|
}
|
|
37
38
|
/**
|
|
@@ -56,6 +57,18 @@ export interface OpenCodeAssistantMessage extends OpenCodeMessageBase {
|
|
|
56
57
|
modelID?: string;
|
|
57
58
|
path?: string[];
|
|
58
59
|
agent?: string;
|
|
60
|
+
/**
|
|
61
|
+
* Turn-level failure (provider error, aborted turn, ...).
|
|
62
|
+
* This is OpenCode's equivalent of Claude's `isApiErrorMessage` transcript
|
|
63
|
+
* entries and is the ONLY source of MetricDelta.apiErrorMessage — tool
|
|
64
|
+
* failures are reported through toolStatus instead, matching codemie-claude.
|
|
65
|
+
*/
|
|
66
|
+
error?: {
|
|
67
|
+
name: string;
|
|
68
|
+
data?: {
|
|
69
|
+
message?: string;
|
|
70
|
+
};
|
|
71
|
+
};
|
|
59
72
|
}
|
|
60
73
|
/**
|
|
61
74
|
* Union type for messages
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"opencode-message-types.d.ts","sourceRoot":"","sources":["../../../../src/agents/plugins/opencode/opencode-message-types.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,MAAM,WAAW,eAAe;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,CAAC,EAAE,MAAM,CAAC;IAGf,SAAS,EAAE,MAAM,CAAC;IAElB,IAAI,EAAE;QACJ,OAAO,EAAE,MAAM,CAAC;QAChB,OAAO,EAAE,MAAM,CAAC;KACjB,CAAC;IAEF,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,mBAAmB;IAClC,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,MAAM,GAAG,WAAW,CAAC;IAE3B,IAAI,EAAE;QACJ,OAAO,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"opencode-message-types.d.ts","sourceRoot":"","sources":["../../../../src/agents/plugins/opencode/opencode-message-types.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,MAAM,WAAW,eAAe;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,CAAC,EAAE,MAAM,CAAC;IAGf,SAAS,EAAE,MAAM,CAAC;IAElB,IAAI,EAAE;QACJ,OAAO,EAAE,MAAM,CAAC;QAChB,OAAO,EAAE,MAAM,CAAC;KACjB,CAAC;IAEF,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,mBAAmB;IAClC,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,MAAM,GAAG,WAAW,CAAC;IAE3B,IAAI,EAAE;QACJ,OAAO,EAAE,MAAM,CAAC;QAChB,SAAS,CAAC,EAAE,MAAM,CAAC;KACpB,CAAC;CACH;AAED;;;;GAIG;AACH,MAAM,WAAW,mBAAoB,SAAQ,mBAAmB;IAC9D,IAAI,EAAE,MAAM,CAAC;IAEb,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf,KAAK,CAAC,EAAE;QACN,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,OAAO,CAAC,EAAE,MAAM,CAAC;KAClB,CAAC;CACH;AAED;;GAEG;AACH,MAAM,WAAW,wBAAyB,SAAQ,mBAAmB;IACnE,IAAI,EAAE,WAAW,CAAC;IAElB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAA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,CAEjF;AAED,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,YAAY,GAAG,IAAI,IAAI,sBAAsB,CAEnF;AAED,wBAAgB,WAAW,CAAC,IAAI,EAAE,YAAY,GAAG,IAAI,IAAI,iBAAiB,CAEzE;AAED,wBAAgB,eAAe,CAAC,IAAI,EAAE,YAAY,GAAG,IAAI,IAAI,qBAAqB,CAEjF;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,gBAAgB;IAC/B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,YAAY,EAAE,CAAC,CAAC;IAC1C,WAAW,CAAC,EAAE,QAAQ,GAAG,MAAM,CAAC;CACjC;AAED;;;;;GAKG;AACH,wBAAgB,wBAAwB,CACtC,QAAQ,EAAE,OAAO,GAChB,OAAO,CAAC,QAAQ,IAAI,gBAAgB,CAWtC;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,OAAO,GAAG,QAAQ,IAAI,gBAAgB,CASnF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"opencode-message-types.js","sourceRoot":"","sources":["../../../../src/agents/plugins/opencode/opencode-message-types.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"opencode-message-types.js","sourceRoot":"","sources":["../../../../src/agents/plugins/opencode/opencode-message-types.ts"],"names":[],"mappings":"AAwFA;;GAEG;AACH,MAAM,UAAU,kBAAkB,CAAC,GAAoB;IACrD,OAAO,GAAG,CAAC,IAAI,KAAK,WAAW,CAAC;AAClC,CAAC;AAsGD,iCAAiC;AACjC,MAAM,UAAU,UAAU,CAAC,IAAkB;IAC3C,OAAO,I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AiB;IACnD,IAAI,CAAC,QAAQ,IAAI,OAAO,QAAQ,KAAK,QAAQ;QAAE,OAAO,KAAK,CAAC;IAC5D,MAAM,CAAC,GAAG,QAAmC,CAAC;IAC9C,OAAO,CACL,OAAO,CAAC,CAAC,WAAW,KAAK,QAAQ;QACjC,CAAC,CAAC,WAAW,CAAC,MAAM,GAAG,CAAC;QACxB,OAAO,CAAC,CAAC,iBAAiB,KAAK,QAAQ;QACvC,CAAC,CAAC,iBAAiB,CAAC,MAAM,GAAG,CAAC,CAC/B,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* OpenCode Incremental Sync Timer
|
|
3
|
+
*
|
|
4
|
+
* In-process timer that periodically re-parses the active OpenCode session and
|
|
5
|
+
* writes new metric deltas + conversation payloads to JSONL, then uploads
|
|
6
|
+
* anything still PENDING via SessionSyncer.
|
|
7
|
+
*
|
|
8
|
+
* Why this exists: turn boundaries are reported by the injected shell-hooks
|
|
9
|
+
* plugin, which can fail to load, be filtered out by OpenCode's per-directory
|
|
10
|
+
* event routing, or be disabled entirely. Everything the timer needs is already
|
|
11
|
+
* durable in opencode.db, so this path keeps metrics and conversations flowing
|
|
12
|
+
* even when no hook ever fires — only active_duration_ms depends on the hooks.
|
|
13
|
+
*
|
|
14
|
+
* Mirrors codex.incremental-sync.ts.
|
|
15
|
+
*/
|
|
16
|
+
import type { AgentMetadata } from '../../core/types.js';
|
|
17
|
+
import type { ProcessingContext } from '../../core/session/BaseProcessor.js';
|
|
18
|
+
export interface StartOpenCodeIncrementalSyncOptions {
|
|
19
|
+
/** CodeMie session id (file naming key). */
|
|
20
|
+
sessionId: string;
|
|
21
|
+
/** ms-since-epoch lower bound used to ignore stale sessions. */
|
|
22
|
+
startedAt: number;
|
|
23
|
+
/** Working directory to match the OpenCode session's directory against. */
|
|
24
|
+
cwd: string;
|
|
25
|
+
/** OpenCode agent metadata (passed straight to OpenCodeSessionAdapter). */
|
|
26
|
+
metadata: AgentMetadata;
|
|
27
|
+
/** Builds a fresh ProcessingContext on each tick (cookies/version may rotate). */
|
|
28
|
+
buildContext: () => ProcessingContext;
|
|
29
|
+
/** CodeMie SSO URL used to load stored credentials (e.g. env.CODEMIE_URL). */
|
|
30
|
+
ssoUrl?: string;
|
|
31
|
+
/** Sync API base URL for the upload context (env.CODEMIE_SYNC_API_URL ?? env.CODEMIE_BASE_URL). */
|
|
32
|
+
syncApiUrl?: string;
|
|
33
|
+
/** CLI version string forwarded to the upload context. */
|
|
34
|
+
cliVersion?: string;
|
|
35
|
+
}
|
|
36
|
+
export declare function startOpenCodeIncrementalSync(options: StartOpenCodeIncrementalSyncOptions): void;
|
|
37
|
+
export declare function stopOpenCodeIncrementalSync(sessionId: string): void;
|
|
38
|
+
//# sourceMappingURL=opencode.incremental-sync.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"opencode.incremental-sync.d.ts","sourceRoot":"","sources":["../../../../src/agents/plugins/opencode/opencode.incremental-sync.ts"],"names":[],"mappings":"AACA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qCAAqC,CAAC;AAI7E,MAAM,WAAW,mCAAmC;IAClD,4CAA4C;IAC5C,SAAS,EAAE,MAAM,CAAC;IAClB,gEAAgE;IAChE,SAAS,EAAE,MAAM,CAAC;IAClB,2EAA2E;IAC3E,GAAG,EAAE,MAAM,CAAC;IACZ,2EAA2E;IAC3E,QAAQ,EAAE,aAAa,CAAC;IACxB,kFAAkF;IAClF,YAAY,EAAE,MAAM,iBAAiB,CAAC;IACtC,8EAA8E;IAC9E,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,mGAAmG;IACnG,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,0DAA0D;IAC1D,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAiBD,wBAAgB,4BAA4B,CAAC,OAAO,EAAE,mCAAmC,GAAG,IAAI,CAiG/F;AAED,wBAAgB,2BAA2B,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAQnE"}
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
// src/agents/plugins/opencode/opencode.incremental-sync.ts
|
|
2
|
+
/**
|
|
3
|
+
* OpenCode Incremental Sync Timer
|
|
4
|
+
*
|
|
5
|
+
* In-process timer that periodically re-parses the active OpenCode session and
|
|
6
|
+
* writes new metric deltas + conversation payloads to JSONL, then uploads
|
|
7
|
+
* anything still PENDING via SessionSyncer.
|
|
8
|
+
*
|
|
9
|
+
* Why this exists: turn boundaries are reported by the injected shell-hooks
|
|
10
|
+
* plugin, which can fail to load, be filtered out by OpenCode's per-directory
|
|
11
|
+
* event routing, or be disabled entirely. Everything the timer needs is already
|
|
12
|
+
* durable in opencode.db, so this path keeps metrics and conversations flowing
|
|
13
|
+
* even when no hook ever fires — only active_duration_ms depends on the hooks.
|
|
14
|
+
*
|
|
15
|
+
* Mirrors codex.incremental-sync.ts.
|
|
16
|
+
*/
|
|
17
|
+
import { realpath as fsRealpath } from 'fs/promises';
|
|
18
|
+
import { OpenCodeSessionAdapter } from './opencode.session.js';
|
|
19
|
+
import { logger } from '../../../utils/logger.js';
|
|
20
|
+
/**
|
|
21
|
+
* 60s rather than Codex's 30s: the Stop hook and this timer both write
|
|
22
|
+
* {id}_metrics.jsonl, and MetricsSyncProcessor rewrites that file atomically
|
|
23
|
+
* while MetricsWriter appends to it. A slower tick narrows the window in which
|
|
24
|
+
* an appended delta can be lost to an interleaved rewrite.
|
|
25
|
+
*/
|
|
26
|
+
const DEFAULT_INTERVAL_MS = 60_000;
|
|
27
|
+
/** Lower bound for the override, so a bad value cannot spin on the live DB. */
|
|
28
|
+
const MIN_INTERVAL_MS = 5_000;
|
|
29
|
+
const STARTED_AT_GRACE_MS = 10_000;
|
|
30
|
+
const activeTimers = new Map();
|
|
31
|
+
const tickInFlight = new Map();
|
|
32
|
+
export function startOpenCodeIncrementalSync(options) {
|
|
33
|
+
if (process.env.CODEMIE_OPENCODE_SYNC_ENABLED === 'false') {
|
|
34
|
+
logger.debug('[opencode-incremental-sync] Disabled by CODEMIE_OPENCODE_SYNC_ENABLED=false');
|
|
35
|
+
return;
|
|
36
|
+
}
|
|
37
|
+
if (activeTimers.has(options.sessionId)) {
|
|
38
|
+
logger.debug(`[opencode-incremental-sync] Already running for session ${options.sessionId}`);
|
|
39
|
+
return;
|
|
40
|
+
}
|
|
41
|
+
// Floor the interval: every tick re-parses the user's live SQLite DB, so a
|
|
42
|
+
// small or negative override (setInterval clamps <1 to 1ms) would spin on it.
|
|
43
|
+
const intervalMs = Math.max(MIN_INTERVAL_MS, Number(process.env.CODEMIE_OPENCODE_SYNC_INTERVAL_MS) || DEFAULT_INTERVAL_MS);
|
|
44
|
+
const tick = async () => {
|
|
45
|
+
if (tickInFlight.get(options.sessionId))
|
|
46
|
+
return;
|
|
47
|
+
tickInFlight.set(options.sessionId, true);
|
|
48
|
+
try {
|
|
49
|
+
const adapter = new OpenCodeSessionAdapter(options.metadata);
|
|
50
|
+
// cwd is pushed into the SQL predicate, so this never scans other repos'
|
|
51
|
+
// sessions out of the user's shared opencode.db.
|
|
52
|
+
const sessions = await adapter.discoverSessions({
|
|
53
|
+
maxAgeDays: 1,
|
|
54
|
+
limit: 10,
|
|
55
|
+
cwd: options.cwd,
|
|
56
|
+
});
|
|
57
|
+
if (sessions.length === 0)
|
|
58
|
+
return;
|
|
59
|
+
const cwdReal = await safeRealpath(options.cwd);
|
|
60
|
+
for (const descriptor of sessions) {
|
|
61
|
+
if (descriptor.createdAt < options.startedAt - STARTED_AT_GRACE_MS)
|
|
62
|
+
continue;
|
|
63
|
+
const projectPath = descriptor.projectPath;
|
|
64
|
+
if (!projectPath)
|
|
65
|
+
continue;
|
|
66
|
+
if ((await safeRealpath(projectPath)) !== cwdReal)
|
|
67
|
+
continue;
|
|
68
|
+
try {
|
|
69
|
+
const result = await adapter.processSession(descriptor.filePath, options.sessionId, { ...options.buildContext(), agentSessionId: descriptor.sessionId });
|
|
70
|
+
logger.debug(`[opencode-incremental-sync] tick ok session=${options.sessionId} records=${result.totalRecords}`);
|
|
71
|
+
}
|
|
72
|
+
catch (error) {
|
|
73
|
+
logger.error('[opencode-incremental-sync] processSession failed:', error);
|
|
74
|
+
}
|
|
75
|
+
if (options.ssoUrl && options.syncApiUrl) {
|
|
76
|
+
try {
|
|
77
|
+
const uploadContext = await buildUploadContext(options.sessionId, options.ssoUrl, options.syncApiUrl, options.cliVersion);
|
|
78
|
+
if (uploadContext) {
|
|
79
|
+
const { SessionSyncer } = await import('../../../providers/plugins/sso/session/SessionSyncer.js');
|
|
80
|
+
const syncer = new SessionSyncer();
|
|
81
|
+
const syncResult = await syncer.sync(options.sessionId, uploadContext);
|
|
82
|
+
logger.debug(`[opencode-incremental-sync] upload ${syncResult.success ? 'ok' : 'partial'}: ${syncResult.message}`);
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
catch (error) {
|
|
86
|
+
logger.error('[opencode-incremental-sync] upload failed:', error);
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
return; // Only the most recent matching session per tick.
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
catch (error) {
|
|
93
|
+
logger.error('[opencode-incremental-sync] tick failed:', error);
|
|
94
|
+
}
|
|
95
|
+
finally {
|
|
96
|
+
tickInFlight.set(options.sessionId, false);
|
|
97
|
+
}
|
|
98
|
+
};
|
|
99
|
+
const timer = setInterval(() => {
|
|
100
|
+
void tick();
|
|
101
|
+
}, intervalMs);
|
|
102
|
+
// Don't pin the Node event loop alive solely on this timer; if the parent
|
|
103
|
+
// process is otherwise idle we want it to exit cleanly when OpenCode finishes.
|
|
104
|
+
if (typeof timer.unref === 'function') {
|
|
105
|
+
timer.unref();
|
|
106
|
+
}
|
|
107
|
+
activeTimers.set(options.sessionId, timer);
|
|
108
|
+
logger.debug(`[opencode-incremental-sync] Started (session=${options.sessionId}, intervalMs=${intervalMs})`);
|
|
109
|
+
}
|
|
110
|
+
export function stopOpenCodeIncrementalSync(sessionId) {
|
|
111
|
+
const timer = activeTimers.get(sessionId);
|
|
112
|
+
if (!timer)
|
|
113
|
+
return;
|
|
114
|
+
clearInterval(timer);
|
|
115
|
+
activeTimers.delete(sessionId);
|
|
116
|
+
tickInFlight.delete(sessionId);
|
|
117
|
+
logger.debug(`[opencode-incremental-sync] Stopped (session=${sessionId})`);
|
|
118
|
+
}
|
|
119
|
+
async function buildUploadContext(sessionId, ssoUrl, syncApiUrl, version = '0.0.0') {
|
|
120
|
+
try {
|
|
121
|
+
const { CodeMieSSO } = await import('../../../providers/plugins/sso/sso.auth.js');
|
|
122
|
+
const sso = new CodeMieSSO();
|
|
123
|
+
const credentials = await sso.getStoredCredentials(ssoUrl);
|
|
124
|
+
if (!credentials?.cookies) {
|
|
125
|
+
logger.debug('[opencode-incremental-sync] No SSO credentials available, skipping upload');
|
|
126
|
+
return null;
|
|
127
|
+
}
|
|
128
|
+
const cookies = Object.entries(credentials.cookies)
|
|
129
|
+
.map(([k, v]) => `${k}=${v}`)
|
|
130
|
+
.join('; ');
|
|
131
|
+
return {
|
|
132
|
+
apiBaseUrl: syncApiUrl,
|
|
133
|
+
cookies,
|
|
134
|
+
clientType: 'codemie-opencode',
|
|
135
|
+
version,
|
|
136
|
+
dryRun: false,
|
|
137
|
+
sessionId,
|
|
138
|
+
};
|
|
139
|
+
}
|
|
140
|
+
catch (error) {
|
|
141
|
+
logger.debug('[opencode-incremental-sync] Failed to build upload context:', error);
|
|
142
|
+
return null;
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
async function safeRealpath(p) {
|
|
146
|
+
try {
|
|
147
|
+
return await fsRealpath(p);
|
|
148
|
+
}
|
|
149
|
+
catch {
|
|
150
|
+
return p;
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
//# sourceMappingURL=opencode.incremental-sync.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"opencode.incremental-sync.js","sourceRoot":"","sources":["../../../../src/agents/plugins/opencode/opencode.incremental-sync.ts"],"names":[],"mappings":"AAAA,2DAA2D;AAC3D;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,QAAQ,IAAI,UAAU,EAAE,MAAM,aAAa,CAAC;AAGrD,OAAO,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAC/D,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAqBlD;;;;;GAKG;AACH,MAAM,mBAAmB,GAAG,MAAM,CAAC;AAEnC,+EAA+E;AAC/E,MAAM,eAAe,GAAG,KAAK,CAAC;AAC9B,MAAM,mBAAmB,GAAG,MAAM,CAAC;AAEnC,MAAM,YAAY,GAAG,IAAI,GAAG,EAA0B,CAAC;AACvD,MAAM,YAAY,GAAG,IAAI,GAAG,EAAmB,CAAC;AAEhD,MAAM,UAAU,4BAA4B,CAAC,OAA4C;IACvF,IAAI,OAAO,CAAC,GAAG,CAAC,6BAA6B,KAAK,OAAO,EAAE,CAAC;QAC1D,MAAM,CAAC,KAAK,CAAC,6EAA6E,CAAC,CAAC;QAC5F,OAAO;IACT,CAAC;IACD,IAAI,YAAY,CAAC,GAAG,CAAC,OAAO,CAAC,SAAS,CAAC,EAAE,CAAC;QACxC,MAAM,CAAC,KAAK,CAAC,2DAA2D,OAAO,CAAC,SAAS,EAAE,CAAC,CAAC;QAC7F,OAAO;IACT,CAAC;IAED,2EAA2E;IAC3E,8EAA8E;IAC9E,MAAM,UAAU,GAAG,IAAI,CAAC,GAAG,CACzB,eAAe,EACf,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,iCAAiC,CAAC,IAAI,mBAAmB,CAC7E,CAAC;IAEF,MAAM,IAAI,GAAG,KAAK,IAAmB,EAAE;QACrC,IAAI,YAAY,CAAC,GAAG,CAAC,OAAO,CAAC,SAAS,CAAC;YAAE,OAAO;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CAAC,CAAC;QACd,OAAO;YACL,UAAU,EAAE,UAAU;YACtB,OAAO;YACP,UAAU,EAAE,kBAAkB;YAC9B,OAAO;YACP,MAAM,EAAE,KAAK;YACb,SAAS;SACV,CAAC;IACJ,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,MAAM,CAAC,KAAK,CAAC,6DAA6D,EAAE,KAAK,CAAC,CAAC;QACnF,OAAO,IAAI,CAAC;IACd,CAAC;AACH,CAAC;AAED,KAAK,UAAU,YAAY,CAAC,CAAS;IACnC,IAAI,CAAC;QACH,OAAO,MAAM,UAAU,CAAC,CAAC,CAAC,CAAC;IAC7B,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,CAAC,CAAC;IACX,CAAC;AACH,CAAC"}
|
|
@@ -34,6 +34,19 @@ export declare function detectStorageLayout(storagePath: string): Promise<Storag
|
|
|
34
34
|
* @returns Path to storage root directory or null if not found
|
|
35
35
|
*/
|
|
36
36
|
export declare function getOpenCodeStoragePath(): string | null;
|
|
37
|
+
/**
|
|
38
|
+
* Get OpenCode's data directory (the parent of both `storage/` and `opencode.db`).
|
|
39
|
+
*
|
|
40
|
+
* Unlike getOpenCodeStoragePath() this never gates on existence: a SQLite-only
|
|
41
|
+
* install has no `storage/` subdirectory at all, so gating there would make the
|
|
42
|
+
* database undiscoverable.
|
|
43
|
+
*
|
|
44
|
+
* Priority mirrors getOpenCodeStoragePath():
|
|
45
|
+
* 1. dirname(OPENCODE_STORAGE_PATH)
|
|
46
|
+
* 2. XDG_DATA_HOME/opencode
|
|
47
|
+
* 3. Platform-specific defaults
|
|
48
|
+
*/
|
|
49
|
+
export declare function getOpenCodeDataDir(): string;
|
|
37
50
|
/**
|
|
38
51
|
* Get OpenCode sessions directory path
|
|
39
52
|
* Sessions are stored at: storage/session/{projectID}/{sessionID}.json
|
|
@@ -66,8 +79,11 @@ export declare function getOpenCodeConfigDir(): string;
|
|
|
66
79
|
/**
|
|
67
80
|
* Get path to OpenCode's SQLite database (opencode.db)
|
|
68
81
|
*
|
|
69
|
-
* The DB
|
|
70
|
-
* ~/.
|
|
82
|
+
* The DB is a sibling of the storage/ directory:
|
|
83
|
+
* ~/.local/share/opencode/opencode.db
|
|
84
|
+
*
|
|
85
|
+
* Resolved via getOpenCodeDataDir() rather than getOpenCodeStoragePath() so a
|
|
86
|
+
* SQLite-only install (no storage/ directory) is still discovered.
|
|
71
87
|
*
|
|
72
88
|
* @returns Path to opencode.db or null if not found
|
|
73
89
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"opencode.paths.d.ts","sourceRoot":"","sources":["../../../../src/agents/plugins/opencode/opencode.paths.ts"],"names":[],"mappings":"AAQA;;;GAGG;AACH,MAAM,WAAW,mBAAmB;IAClC,MAAM,EAAE,gBAAgB,GAAG,QAAQ,GAAG,OAAO,GAAG,QAAQ,GAAG,SAAS,CAAC;IACrE,gBAAgB,EAAE,MAAM,CAAC;IACzB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;IACvB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;;;;;GAOG;AACH,wBAAsB,mBAAmB,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAiD3F;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,sBAAsB,IAAI,MAAM,GAAG,IAAI,CAqCtD;AAED;;;;;GAKG;AACH,wBAAgB,uBAAuB,IAAI,MAAM,GAAG,IAAI,CAKvD;AAED;;;;;GAKG;AACH,wBAAgB,uBAAuB,IAAI,MAAM,GAAG,IAAI,CAKvD;AAED;;;;;GAKG;AACH,wBAAgB,oBAAoB,IAAI,MAAM,GAAG,IAAI,CAKpD;AAED;;GAEG;AACH,wBAAgB,eAAe,IAAI,MAAM,CAExC;AAED;;GAEG;AACH,wBAAgB,oBAAoB,IAAI,MAAM,CAK7C;AAED
|
|
1
|
+
{"version":3,"file":"opencode.paths.d.ts","sourceRoot":"","sources":["../../../../src/agents/plugins/opencode/opencode.paths.ts"],"names":[],"mappings":"AAQA;;;GAGG;AACH,MAAM,WAAW,mBAAmB;IAClC,MAAM,EAAE,gBAAgB,GAAG,QAAQ,GAAG,OAAO,GAAG,QAAQ,GAAG,SAAS,CAAC;IACrE,gBAAgB,EAAE,MAAM,CAAC;IACzB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;IACvB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;;;;;GAOG;AACH,wBAAsB,mBAAmB,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAiD3F;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,sBAAsB,IAAI,MAAM,GAAG,IAAI,CAqCtD;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,kBAAkB,IAAI,MAAM,CAuB3C;AAED;;;;;GAKG;AACH,wBAAgB,uBAAuB,IAAI,MAAM,GAAG,IAAI,CAKvD;AAED;;;;;GAKG;AACH,wBAAgB,uBAAuB,IAAI,MAAM,GAAG,IAAI,CAKvD;AAED;;;;;GAKG;AACH,wBAAgB,oBAAoB,IAAI,MAAM,GAAG,IAAI,CAKpD;AAED;;GAEG;AACH,wBAAgB,eAAe,IAAI,MAAM,CAExC;AAED;;GAEG;AACH,wBAAgB,oBAAoB,IAAI,MAAM,CAK7C;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,iBAAiB,IAAI,MAAM,GAAG,IAAI,CAOjD;AAGD,uDAAuD;AACvD,eAAO,MAAM,qBAAqB,+BAAyB,CAAC"}
|
|
@@ -107,6 +107,39 @@ export function getOpenCodeStoragePath() {
|
|
|
107
107
|
}
|
|
108
108
|
return storagePath;
|
|
109
109
|
}
|
|
110
|
+
/**
|
|
111
|
+
* Get OpenCode's data directory (the parent of both `storage/` and `opencode.db`).
|
|
112
|
+
*
|
|
113
|
+
* Unlike getOpenCodeStoragePath() this never gates on existence: a SQLite-only
|
|
114
|
+
* install has no `storage/` subdirectory at all, so gating there would make the
|
|
115
|
+
* database undiscoverable.
|
|
116
|
+
*
|
|
117
|
+
* Priority mirrors getOpenCodeStoragePath():
|
|
118
|
+
* 1. dirname(OPENCODE_STORAGE_PATH)
|
|
119
|
+
* 2. XDG_DATA_HOME/opencode
|
|
120
|
+
* 3. Platform-specific defaults
|
|
121
|
+
*/
|
|
122
|
+
export function getOpenCodeDataDir() {
|
|
123
|
+
const home = homedir();
|
|
124
|
+
if (process.env.OPENCODE_STORAGE_PATH) {
|
|
125
|
+
return dirname(process.env.OPENCODE_STORAGE_PATH);
|
|
126
|
+
}
|
|
127
|
+
if (process.env.XDG_DATA_HOME) {
|
|
128
|
+
return join(process.env.XDG_DATA_HOME, 'opencode');
|
|
129
|
+
}
|
|
130
|
+
switch (process.platform) {
|
|
131
|
+
case 'darwin':
|
|
132
|
+
return join(home, 'Library', 'Application Support', 'opencode');
|
|
133
|
+
case 'win32': {
|
|
134
|
+
const appData = process.env.LOCALAPPDATA;
|
|
135
|
+
return appData
|
|
136
|
+
? join(appData, 'opencode')
|
|
137
|
+
: join(home, '.local', 'share', 'opencode');
|
|
138
|
+
}
|
|
139
|
+
default:
|
|
140
|
+
return join(home, '.local', 'share', 'opencode');
|
|
141
|
+
}
|
|
142
|
+
}
|
|
110
143
|
/**
|
|
111
144
|
* Get OpenCode sessions directory path
|
|
112
145
|
* Sessions are stored at: storage/session/{projectID}/{sessionID}.json
|
|
@@ -164,16 +197,16 @@ export function getOpenCodeConfigDir() {
|
|
|
164
197
|
/**
|
|
165
198
|
* Get path to OpenCode's SQLite database (opencode.db)
|
|
166
199
|
*
|
|
167
|
-
* The DB
|
|
168
|
-
* ~/.
|
|
200
|
+
* The DB is a sibling of the storage/ directory:
|
|
201
|
+
* ~/.local/share/opencode/opencode.db
|
|
202
|
+
*
|
|
203
|
+
* Resolved via getOpenCodeDataDir() rather than getOpenCodeStoragePath() so a
|
|
204
|
+
* SQLite-only install (no storage/ directory) is still discovered.
|
|
169
205
|
*
|
|
170
206
|
* @returns Path to opencode.db or null if not found
|
|
171
207
|
*/
|
|
172
208
|
export function getOpenCodeDbPath() {
|
|
173
|
-
const
|
|
174
|
-
if (!storagePath)
|
|
175
|
-
return null;
|
|
176
|
-
const dbPath = join(dirname(storagePath), 'opencode.db');
|
|
209
|
+
const dbPath = join(getOpenCodeDataDir(), 'opencode.db');
|
|
177
210
|
if (existsSync(dbPath)) {
|
|
178
211
|
logger.debug(`[opencode-paths] Found SQLite DB: ${dbPath}`);
|
|
179
212
|
return dbPath;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"opencode.paths.js","sourceRoot":"","sources":["../../../../src/agents/plugins/opencode/opencode.paths.ts"],"names":[],"mappings":"AAAA,gDAAgD;AAChD,gDAAgD;AAChD,OAAO,EAAE,OAAO,EAAE,MAAM,IAAI,CAAC;AAC7B,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AACrC,OAAO,EAAE,UAAU,EAAE,MAAM,IAAI,CAAC;AAChC,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAclD;;;;;;;GAOG;AACH,MAAM,CAAC,KAAK,UAAU,mBAAmB,CAAC,WAAmB;IAC3D,IAAI,gBAAgB,GAAG,CAAC,CAAC;IAEzB,2DAA2D;IAC3D,MAAM,aAAa,GAAG,IAAI,CAAC,WAAW,EAAE,WAAW,CAAC,CAAC;IACrD,IAAI,UAAU,CAAC,aAAa,CAAC,EAAE,CAAC;QAC9B,IAAI,CAAC;YACH,MAAM,OAAO,GAAG,MAAM,QAAQ,CAAC,aAAa,EAAE,OAAO,CAAC,CAAC;YACvD,gBAAgB,GAAG,QAAQ,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,IAAI,CAAC,CAAC;QACvD,CAAC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AAU,oBAAoB;IAClC,MAAM,WAAW,GAAG,sBAAsB,EAAE,CAAC;IAC7C,IAAI,CAAC,WAAW;QAAE,OAAO,IAAI,CAAC;IAC9B,MAAM,SAAS,GAAG,IAAI,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC;IAC5C,OAAO,UAAU,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC;AAClD,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,eAAe;IAC7B,OAAO,IAAI,CAAC,OAAO,EAAE,EAAE,WAAW,CAAC,CAAC;AACtC,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,oBAAoB;IAClC,IAAI,OAAO,CAAC,GAAG,CAAC,eAAe,EAAE,CAAC;QAChC,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,eAAe,EAAE,UAAU,CAAC,CAAC;IACvD,CAAC;IACD,OAAO,IAAI,CAAC,OAAO,EAAE,EAAE,SAAS,EAAE,UAAU,CAAC,CAAC;AAChD,CAAC;AAED;;;;;;;;;;GAUG;AACH,MAAM,UAAU,iBAAiB;IAC/B,MAAM,MAAM,GAAG,IAAI,CAAC,kBAAkB,EAAE,EAAE,aAAa,CAAC,CAAC;IACzD,IAAI,UAAU,CAAC,MAAM,CAAC,EAAE,CAAC;QACvB,MAAM,CAAC,KAAK,CAAC,qCAAqC,MAAM,EAAE,CAAC,CAAC;QAC5D,OAAO,MAAM,CAAC;IAChB,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AAED,0CAA0C;AAC1C,uDAAuD;AACvD,MAAM,CAAC,MAAM,qBAAqB,GAAG,sBAAsB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"opencode.plugin.d.ts","sourceRoot":"","sources":["../../../../src/agents/plugins/opencode/opencode.plugin.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"opencode.plugin.d.ts","sourceRoot":"","sources":["../../../../src/agents/plugins/opencode/opencode.plugin.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAe,MAAM,qBAAqB,CAAC;AAItE,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAClE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0CAA0C,CAAC;AAC/E,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,gDAAgD,CAAC;AAsF7F,eAAO,MAAM,sBAAsB,EAAE,aAsZpC,CAAC;AAEF;;;;GAIG;AACH,qBAAa,cAAe,SAAQ,gBAAgB;IAClD,OAAO,CAAC,cAAc,CAAiB;;IAQvC;;;;;;;;OAQG;IACG,WAAW,IAAI,OAAO,CAAC,OAAO,CAAC;IAkBrC;;;OAGG;IACH,iBAAiB,IAAI,cAAc;IAInC;;;OAGG;IACH,qBAAqB,IAAI,sBAAsB,GAAG,SAAS;CAG5D"}
|