@codemieai/code 0.11.0 → 0.13.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/README.md +109 -56
- package/bin/codemie-copilot.js +224 -0
- package/bin/codemie-pi.js +18 -0
- package/dist/agents/core/AgentCLI.d.ts.map +1 -1
- package/dist/agents/core/AgentCLI.js +16 -10
- package/dist/agents/core/AgentCLI.js.map +1 -1
- package/dist/agents/core/BaseAgentAdapter.d.ts.map +1 -1
- package/dist/agents/core/BaseAgentAdapter.js +43 -19
- package/dist/agents/core/BaseAgentAdapter.js.map +1 -1
- package/dist/agents/core/agent-aliases.d.ts +17 -0
- package/dist/agents/core/agent-aliases.d.ts.map +1 -0
- package/dist/agents/core/agent-aliases.js +41 -0
- package/dist/agents/core/agent-aliases.js.map +1 -0
- package/dist/agents/core/session/BaseSessionAdapter.d.ts +19 -0
- package/dist/agents/core/session/BaseSessionAdapter.d.ts.map +1 -1
- package/dist/agents/core/session/session-origin-audit.d.ts +13 -0
- package/dist/agents/core/session/session-origin-audit.d.ts.map +1 -1
- package/dist/agents/core/session/session-origin-audit.js +34 -0
- package/dist/agents/core/session/session-origin-audit.js.map +1 -1
- package/dist/agents/core/session/stale-session-reconciliation.d.ts +42 -0
- package/dist/agents/core/session/stale-session-reconciliation.d.ts.map +1 -0
- package/dist/agents/core/session/stale-session-reconciliation.js +141 -0
- package/dist/agents/core/session/stale-session-reconciliation.js.map +1 -0
- package/dist/agents/core/session/types.d.ts +19 -0
- package/dist/agents/core/session/types.d.ts.map +1 -1
- package/dist/agents/core/session/types.js +17 -1
- package/dist/agents/core/session/types.js.map +1 -1
- package/dist/agents/core/types.d.ts +11 -0
- package/dist/agents/core/types.d.ts.map +1 -1
- package/dist/agents/plugins/codex/codex.reconciliation.d.ts +15 -35
- package/dist/agents/plugins/codex/codex.reconciliation.d.ts.map +1 -1
- package/dist/agents/plugins/codex/codex.reconciliation.js +8 -139
- package/dist/agents/plugins/codex/codex.reconciliation.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 +15 -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 +15 -0
- package/dist/agents/plugins/copilot-cli/copilot-cli.constants.js.map +1 -0
- package/dist/agents/plugins/copilot-cli/copilot-cli.models.d.ts +8 -0
- package/dist/agents/plugins/copilot-cli/copilot-cli.models.d.ts.map +1 -0
- package/dist/agents/plugins/copilot-cli/copilot-cli.models.js +195 -0
- package/dist/agents/plugins/copilot-cli/copilot-cli.models.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 +14 -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 +263 -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 +343 -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 +3 -0
- package/dist/agents/plugins/copilot-cli/index.d.ts.map +1 -0
- package/dist/agents/plugins/copilot-cli/index.js +3 -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 +18 -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 +313 -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/pi/__tests__/home-redirect.d.ts +12 -0
- package/dist/agents/plugins/pi/__tests__/home-redirect.d.ts.map +1 -0
- package/dist/agents/plugins/pi/__tests__/home-redirect.js +27 -0
- package/dist/agents/plugins/pi/__tests__/home-redirect.js.map +1 -0
- package/dist/agents/plugins/pi/extension/README.md +68 -0
- package/dist/agents/plugins/pi/extension/index.js +161 -0
- package/dist/agents/plugins/pi/extension/package.json +8 -0
- package/dist/agents/plugins/pi/index.d.ts +3 -0
- package/dist/agents/plugins/pi/index.d.ts.map +1 -0
- package/dist/agents/plugins/pi/index.js +3 -0
- package/dist/agents/plugins/pi/index.js.map +1 -0
- package/dist/agents/plugins/pi/pi.extension.d.ts +60 -0
- package/dist/agents/plugins/pi/pi.extension.d.ts.map +1 -0
- package/dist/agents/plugins/pi/pi.extension.js +201 -0
- package/dist/agents/plugins/pi/pi.extension.js.map +1 -0
- package/dist/agents/plugins/pi/pi.incremental-sync.d.ts +63 -0
- package/dist/agents/plugins/pi/pi.incremental-sync.d.ts.map +1 -0
- package/dist/agents/plugins/pi/pi.incremental-sync.js +266 -0
- package/dist/agents/plugins/pi/pi.incremental-sync.js.map +1 -0
- package/dist/agents/plugins/pi/pi.models.d.ts +20 -0
- package/dist/agents/plugins/pi/pi.models.d.ts.map +1 -0
- package/dist/agents/plugins/pi/pi.models.js +201 -0
- package/dist/agents/plugins/pi/pi.models.js.map +1 -0
- package/dist/agents/plugins/pi/pi.packages.d.ts +11 -0
- package/dist/agents/plugins/pi/pi.packages.d.ts.map +1 -0
- package/dist/agents/plugins/pi/pi.packages.js +35 -0
- package/dist/agents/plugins/pi/pi.packages.js.map +1 -0
- package/dist/agents/plugins/pi/pi.paths.d.ts +37 -0
- package/dist/agents/plugins/pi/pi.paths.d.ts.map +1 -0
- package/dist/agents/plugins/pi/pi.paths.js +146 -0
- package/dist/agents/plugins/pi/pi.paths.js.map +1 -0
- package/dist/agents/plugins/pi/pi.plugin.d.ts +30 -0
- package/dist/agents/plugins/pi/pi.plugin.d.ts.map +1 -0
- package/dist/agents/plugins/pi/pi.plugin.js +453 -0
- package/dist/agents/plugins/pi/pi.plugin.js.map +1 -0
- package/dist/agents/plugins/pi/pi.session.d.ts +114 -0
- package/dist/agents/plugins/pi/pi.session.d.ts.map +1 -0
- package/dist/agents/plugins/pi/pi.session.js +388 -0
- package/dist/agents/plugins/pi/pi.session.js.map +1 -0
- package/dist/agents/plugins/pi/pi.setup.d.ts +2 -0
- package/dist/agents/plugins/pi/pi.setup.d.ts.map +1 -0
- package/dist/agents/plugins/pi/pi.setup.js +33 -0
- package/dist/agents/plugins/pi/pi.setup.js.map +1 -0
- package/dist/agents/plugins/pi/pi.types.d.ts +143 -0
- package/dist/agents/plugins/pi/pi.types.d.ts.map +1 -0
- package/dist/agents/plugins/pi/pi.types.js +74 -0
- package/dist/agents/plugins/pi/pi.types.js.map +1 -0
- package/dist/agents/plugins/pi/session/pi-file-operations.d.ts +17 -0
- package/dist/agents/plugins/pi/session/pi-file-operations.d.ts.map +1 -0
- package/dist/agents/plugins/pi/session/pi-file-operations.js +98 -0
- package/dist/agents/plugins/pi/session/pi-file-operations.js.map +1 -0
- package/dist/agents/plugins/pi/session/pi-named-invocations.d.ts +52 -0
- package/dist/agents/plugins/pi/session/pi-named-invocations.d.ts.map +1 -0
- package/dist/agents/plugins/pi/session/pi-named-invocations.js +189 -0
- package/dist/agents/plugins/pi/session/pi-named-invocations.js.map +1 -0
- package/dist/agents/plugins/pi/session/pi-user-prompt.d.ts +14 -0
- package/dist/agents/plugins/pi/session/pi-user-prompt.d.ts.map +1 -0
- package/dist/agents/plugins/pi/session/pi-user-prompt.js +51 -0
- package/dist/agents/plugins/pi/session/pi-user-prompt.js.map +1 -0
- package/dist/agents/plugins/pi/session/processors/pi.conversations-processor.d.ts +52 -0
- package/dist/agents/plugins/pi/session/processors/pi.conversations-processor.d.ts.map +1 -0
- package/dist/agents/plugins/pi/session/processors/pi.conversations-processor.js +716 -0
- package/dist/agents/plugins/pi/session/processors/pi.conversations-processor.js.map +1 -0
- package/dist/agents/plugins/pi/session/processors/pi.metrics-processor.d.ts +104 -0
- package/dist/agents/plugins/pi/session/processors/pi.metrics-processor.d.ts.map +1 -0
- package/dist/agents/plugins/pi/session/processors/pi.metrics-processor.js +595 -0
- package/dist/agents/plugins/pi/session/processors/pi.metrics-processor.js.map +1 -0
- 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 +20 -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 +24 -0
- package/dist/cli/commands/analytics/cost/usage-readers.d.ts.map +1 -1
- package/dist/cli/commands/analytics/cost/usage-readers.js +253 -54
- 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 +22 -0
- package/dist/cli/commands/analytics/index.js.map +1 -1
- package/dist/cli/commands/analytics/native-loader.d.ts +21 -4
- package/dist/cli/commands/analytics/native-loader.d.ts.map +1 -1
- package/dist/cli/commands/analytics/native-loader.js +267 -88
- package/dist/cli/commands/analytics/native-loader.js.map +1 -1
- package/dist/cli/commands/analytics/report/client/app.js +77 -15
- package/dist/cli/commands/analytics/report/payload-builder.d.ts.map +1 -1
- package/dist/cli/commands/analytics/report/payload-builder.js +32 -2
- package/dist/cli/commands/analytics/report/payload-builder.js.map +1 -1
- package/dist/cli/commands/analytics/report/types.d.ts +11 -0
- package/dist/cli/commands/analytics/report/types.d.ts.map +1 -1
- package/dist/cli/commands/hook.d.ts.map +1 -1
- package/dist/cli/commands/hook.js +71 -29
- package/dist/cli/commands/hook.js.map +1 -1
- package/dist/cli/commands/install.d.ts.map +1 -1
- package/dist/cli/commands/install.js +9 -7
- package/dist/cli/commands/install.js.map +1 -1
- package/dist/cli/commands/list.d.ts.map +1 -1
- package/dist/cli/commands/list.js +4 -2
- package/dist/cli/commands/list.js.map +1 -1
- package/dist/cli/commands/setup.d.ts +3 -1
- package/dist/cli/commands/setup.d.ts.map +1 -1
- package/dist/cli/commands/setup.js +87 -63
- package/dist/cli/commands/setup.js.map +1 -1
- package/dist/cli/commands/uninstall.d.ts.map +1 -1
- package/dist/cli/commands/uninstall.js +6 -4
- package/dist/cli/commands/uninstall.js.map +1 -1
- package/dist/cli/commands/update.d.ts.map +1 -1
- package/dist/cli/commands/update.js +7 -5
- package/dist/cli/commands/update.js.map +1 -1
- package/dist/cli/first-time.d.ts.map +1 -1
- package/dist/cli/first-time.js +10 -9
- package/dist/cli/first-time.js.map +1 -1
- package/dist/providers/core/auth-validation.d.ts +7 -2
- package/dist/providers/core/auth-validation.d.ts.map +1 -1
- package/dist/providers/core/auth-validation.js +11 -5
- package/dist/providers/core/auth-validation.js.map +1 -1
- package/dist/providers/core/types.d.ts +16 -0
- package/dist/providers/core/types.d.ts.map +1 -1
- package/dist/providers/core/types.js.map +1 -1
- package/dist/providers/plugins/sso/proxy/plugins/claude-request-normalizer.plugin.d.ts +8 -3
- package/dist/providers/plugins/sso/proxy/plugins/claude-request-normalizer.plugin.d.ts.map +1 -1
- package/dist/providers/plugins/sso/proxy/plugins/claude-request-normalizer.plugin.js +46 -11
- package/dist/providers/plugins/sso/proxy/plugins/claude-request-normalizer.plugin.js.map +1 -1
- package/dist/providers/plugins/sso/proxy/plugins/codex-encrypted-content-sanitizer.plugin.d.ts +23 -13
- 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 +75 -18
- package/dist/providers/plugins/sso/proxy/plugins/codex-encrypted-content-sanitizer.plugin.js.map +1 -1
- package/dist/providers/plugins/sso/proxy/plugins/copilot-encrypted-content-sanitizer.plugin.d.ts +21 -0
- package/dist/providers/plugins/sso/proxy/plugins/copilot-encrypted-content-sanitizer.plugin.d.ts.map +1 -0
- package/dist/providers/plugins/sso/proxy/plugins/copilot-encrypted-content-sanitizer.plugin.js +133 -0
- package/dist/providers/plugins/sso/proxy/plugins/copilot-encrypted-content-sanitizer.plugin.js.map +1 -0
- package/dist/providers/plugins/sso/proxy/plugins/header-injection.plugin.js +1 -1
- package/dist/providers/plugins/sso/proxy/plugins/header-injection.plugin.js.map +1 -1
- package/dist/providers/plugins/sso/proxy/plugins/index.d.ts +2 -1
- package/dist/providers/plugins/sso/proxy/plugins/index.d.ts.map +1 -1
- package/dist/providers/plugins/sso/proxy/plugins/index.js +4 -2
- package/dist/providers/plugins/sso/proxy/plugins/index.js.map +1 -1
- package/dist/providers/plugins/sso/proxy/plugins/types.d.ts +11 -0
- package/dist/providers/plugins/sso/proxy/plugins/types.d.ts.map +1 -1
- package/dist/providers/plugins/sso/proxy/sso.proxy.d.ts +2 -0
- package/dist/providers/plugins/sso/proxy/sso.proxy.d.ts.map +1 -1
- package/dist/providers/plugins/sso/proxy/sso.proxy.js +37 -1
- package/dist/providers/plugins/sso/proxy/sso.proxy.js.map +1 -1
- package/dist/providers/plugins/sso/session/SessionSyncer.d.ts.map +1 -1
- package/dist/providers/plugins/sso/session/SessionSyncer.js +13 -0
- package/dist/providers/plugins/sso/session/SessionSyncer.js.map +1 -1
- package/dist/providers/plugins/sso/session/processors/conversations/syncProcessor.js +6 -0
- package/dist/providers/plugins/sso/session/processors/conversations/syncProcessor.js.map +1 -1
- package/dist/providers/plugins/sso/session/processors/metrics/metrics-post-processor.d.ts +0 -6
- package/dist/providers/plugins/sso/session/processors/metrics/metrics-post-processor.d.ts.map +1 -1
- package/dist/providers/plugins/sso/session/processors/metrics/metrics-post-processor.js +28 -19
- package/dist/providers/plugins/sso/session/processors/metrics/metrics-post-processor.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/interactive.d.ts +14 -0
- package/dist/utils/interactive.d.ts.map +1 -0
- package/dist/utils/interactive.js +16 -0
- package/dist/utils/interactive.js.map +1 -0
- package/package.json +6 -5
- package/scripts/copy-plugins.js +6 -0
- package/scripts/release.sh +54 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"copilot-cli.session.js","sourceRoot":"","sources":["../../../../src/agents/plugins/copilot-cli/copilot-cli.session.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,IAAI,CAAC;AAC7C,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAc5B,OAAO,EAAE,0BAA0B,EAAE,MAAM,wBAAwB,CAAC;AACpE,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AACnE,OAAO,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AACpE,OAAO,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAC3E,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAS7D,OAAO,EAAE,0BAA0B,EAAE,MAAM,uDAAuD,CAAC;AACnG,OAAO,EAAE,gCAAgC,EAAE,MAAM,6DAA6D,CAAC;AAC/G,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAElD,MAAM,oBAAoB,GAAG,EAAE,CAAC;AACh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YACD,IAAI,CAAC;gBACH,MAAM,MAAM,GAAqB,MAAM,SAAS,CAAC,OAAO,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;gBAC1E,MAAM,gBAAgB,GAAG,MAAM,CAAC,QAAQ,EAAE,gBAAgB,IAAI,CAAC,CAAC;gBAChE,YAAY,IAAI,gBAAgB,CAAC;gBACjC,UAAU,CAAC,SAAS,CAAC,IAAI,CAAC,GAAG;oBAC3B,OAAO,EAAE,MAAM,CAAC,OAAO;oBACvB,OAAO,EAAE,MAAM,CAAC,OAAO;oBACvB,gBAAgB;iBACjB,CAAC;gBACF,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;oBACpB,gBAAgB,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;gBACxC,CAAC;YACH,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACf,MAAM,CAAC,KAAK,CAAC,mCAAmC,SAAS,CAAC,IAAI,UAAU,EAAE,KAAK,CAAC,CAAC;gBACjF,UAAU,CAAC,SAAS,CAAC,IAAI,CAAC,GAAG;oBAC3B,OAAO,EAAE,KAAK;oBACd,OAAO,EAAE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC;iBAChE,CAAC;gBACF,gBAAgB,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;YACxC,CAAC;QACH,CAAC;QAED,OAAO;YACL,OAAO,EAAE,gBAAgB,CAAC,MAAM,KAAK,CAAC;YACtC,UAAU;YACV,YAAY;YACZ,gBAAgB;SACjB,CAAC;IACJ,CAAC;CACF"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tolerant reader for Copilot's `events.jsonl`.
|
|
3
|
+
*
|
|
4
|
+
* A live session's final line can be truncated mid-write, and the schema is undocumented,
|
|
5
|
+
* so unparseable lines are dropped rather than thrown. The cost enricher catches per
|
|
6
|
+
* session anyway, but degrading here keeps one bad line from discarding a whole session.
|
|
7
|
+
*/
|
|
8
|
+
import type { CopilotEvent } from './copilot-cli-event-types.js';
|
|
9
|
+
export declare function readCopilotEventsTolerant(filePath: string): CopilotEvent[];
|
|
10
|
+
//# sourceMappingURL=copilot-cli.storage-utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"copilot-cli.storage-utils.d.ts","sourceRoot":"","sources":["../../../../src/agents/plugins/copilot-cli/copilot-cli.storage-utils.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAGjE,wBAAgB,yBAAyB,CAAC,QAAQ,EAAE,MAAM,GAAG,YAAY,EAAE,CA+B1E"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tolerant reader for Copilot's `events.jsonl`.
|
|
3
|
+
*
|
|
4
|
+
* A live session's final line can be truncated mid-write, and the schema is undocumented,
|
|
5
|
+
* so unparseable lines are dropped rather than thrown. The cost enricher catches per
|
|
6
|
+
* session anyway, but degrading here keeps one bad line from discarding a whole session.
|
|
7
|
+
*/
|
|
8
|
+
import { readFileSync } from 'fs';
|
|
9
|
+
import { logger } from '../../../utils/logger.js';
|
|
10
|
+
export function readCopilotEventsTolerant(filePath) {
|
|
11
|
+
let text;
|
|
12
|
+
try {
|
|
13
|
+
text = readFileSync(filePath, 'utf-8');
|
|
14
|
+
}
|
|
15
|
+
catch (error) {
|
|
16
|
+
logger.debug(`[copilot-cli] unreadable events.jsonl at ${filePath}:`, error);
|
|
17
|
+
return [];
|
|
18
|
+
}
|
|
19
|
+
const events = [];
|
|
20
|
+
let dropped = 0;
|
|
21
|
+
for (const line of text.split('\n')) {
|
|
22
|
+
const trimmed = line.trim();
|
|
23
|
+
if (!trimmed) {
|
|
24
|
+
continue;
|
|
25
|
+
}
|
|
26
|
+
try {
|
|
27
|
+
const parsed = JSON.parse(trimmed);
|
|
28
|
+
if (parsed && typeof parsed === 'object') {
|
|
29
|
+
events.push(parsed);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
catch {
|
|
33
|
+
dropped++;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
if (dropped > 0) {
|
|
37
|
+
logger.debug(`[copilot-cli] dropped ${dropped} unparseable line(s) in ${filePath}`);
|
|
38
|
+
}
|
|
39
|
+
return events;
|
|
40
|
+
}
|
|
41
|
+
//# sourceMappingURL=copilot-cli.storage-utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"copilot-cli.storage-utils.js","sourceRoot":"","sources":["../../../../src/agents/plugins/copilot-cli/copilot-cli.storage-utils.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,IAAI,CAAC;AAElC,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAElD,MAAM,UAAU,yBAAyB,CAAC,QAAgB;IACxD,IAAI,IAAY,CAAC;IACjB,IAAI,CAAC;QACH,IAAI,GAAG,YAAY,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;IACzC,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,MAAM,CAAC,KAAK,CAAC,4CAA4C,QAAQ,GAAG,EAAE,KAAK,CAAC,CAAC;QAC7E,OAAO,EAAE,CAAC;IACZ,CAAC;IAED,MAAM,MAAM,GAAmB,EAAE,CAAC;IAClC,IAAI,OAAO,GAAG,CAAC,CAAC;IAEhB,KAAK,MAAM,IAAI,IAAI,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC;QACpC,MAAM,OAAO,GAAG,IAAI,CAAC,IAAI,EAAE,CAAC;QAC5B,IAAI,CAAC,OAAO,EAAE,CAAC;YACb,SAAS;QACX,CAAC;QACD,IAAI,CAAC;YACH,MAAM,MAAM,GAAY,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;YAC5C,IAAI,MAAM,IAAI,OAAO,MAAM,KAAK,QAAQ,EAAE,CAAC;gBACzC,MAAM,CAAC,IAAI,CAAC,MAAsB,CAAC,CAAC;YACtC,CAAC;QACH,CAAC;QAAC,MAAM,CAAC;YACP,OAAO,EAAE,CAAC;QACZ,CAAC;IACH,CAAC;IAED,IAAI,OAAO,GAAG,CAAC,EAAE,CAAC;QAChB,MAAM,CAAC,KAAK,CAAC,yBAAyB,OAAO,2BAA2B,QAAQ,EAAE,CAAC,CAAC;IACtF,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Token extraction from a Copilot CLI transcript, in three tiers.
|
|
3
|
+
*
|
|
4
|
+
* Tier 1 — `session.shutdown`.`modelMetrics`: the authoritative per-model rollup, carrying
|
|
5
|
+
* input, output, cache-read, cache-write and reasoning buckets plus request counts.
|
|
6
|
+
* Tier 2 — per-turn `assistant.message`: recovers output tokens and request counts exactly
|
|
7
|
+
* (verified against tier 1 on real mixed-model sessions), but NO event carries
|
|
8
|
+
* per-turn input or cache tokens. Marked partial, because input outweighs output
|
|
9
|
+
* by roughly 100:1 and an output-only figure is a severe undercount.
|
|
10
|
+
* Tier 3 — neither: the session carries no usage data and is listed unpriced with a reason.
|
|
11
|
+
*
|
|
12
|
+
* Buckets are emitted RAW, in Copilot's own OpenAI-convention field names. Conversion into
|
|
13
|
+
* the repository's Anthropic-convention `TokenUsage` happens in exactly one place —
|
|
14
|
+
* `readCopilotCli` in `src/cli/commands/analytics/cost/usage-readers.ts` — so the
|
|
15
|
+
* convention mismatch has a single, testable seam.
|
|
16
|
+
*/
|
|
17
|
+
import type { CopilotEvent, CopilotUsageBuckets } from './copilot-cli-event-types.js';
|
|
18
|
+
/** One model's usage within a session, as Copilot reported it. */
|
|
19
|
+
export interface CopilotUsageMessage {
|
|
20
|
+
model: string;
|
|
21
|
+
usage: CopilotUsageBuckets;
|
|
22
|
+
/** API request count for this model; not the same as premium requests. */
|
|
23
|
+
requests?: number;
|
|
24
|
+
/** True when reconstructed from per-turn events (output tokens only). */
|
|
25
|
+
partial?: boolean;
|
|
26
|
+
}
|
|
27
|
+
export interface CopilotUsageExtract {
|
|
28
|
+
messages: CopilotUsageMessage[];
|
|
29
|
+
/** GitHub's actual billing unit for the session, when recorded. */
|
|
30
|
+
premiumRequests?: number;
|
|
31
|
+
/** True when any model's usage was reconstructed rather than read from the rollup. */
|
|
32
|
+
partial: boolean;
|
|
33
|
+
/** Why the session could not be priced; absent when usage was found. */
|
|
34
|
+
unavailableReason?: string;
|
|
35
|
+
}
|
|
36
|
+
export declare function extractCopilotUsage(events: CopilotEvent[]): CopilotUsageExtract;
|
|
37
|
+
//# sourceMappingURL=copilot-cli.usage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"copilot-cli.usage.d.ts","sourceRoot":"","sources":["../../../../src/agents/plugins/copilot-cli/copilot-cli.usage.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,EACV,YAAY,EAGZ,mBAAmB,EACpB,MAAM,8BAA8B,CAAC;AAEtC,kEAAkE;AAClE,MAAM,WAAW,mBAAmB;IAClC,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,mBAAmB,CAAC;IAC3B,0EAA0E;IAC1E,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,yEAAyE;IACzE,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,MAAM,WAAW,mBAAmB;IAClC,QAAQ,EAAE,mBAAmB,EAAE,CAAC;IAChC,mEAAmE;IACnE,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,sFAAsF;IACtF,OAAO,EAAE,OAAO,CAAC;IACjB,wEAAwE;IACxE,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAkED,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,YAAY,EAAE,GAAG,mBAAmB,CAyB/E"}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Token extraction from a Copilot CLI transcript, in three tiers.
|
|
3
|
+
*
|
|
4
|
+
* Tier 1 — `session.shutdown`.`modelMetrics`: the authoritative per-model rollup, carrying
|
|
5
|
+
* input, output, cache-read, cache-write and reasoning buckets plus request counts.
|
|
6
|
+
* Tier 2 — per-turn `assistant.message`: recovers output tokens and request counts exactly
|
|
7
|
+
* (verified against tier 1 on real mixed-model sessions), but NO event carries
|
|
8
|
+
* per-turn input or cache tokens. Marked partial, because input outweighs output
|
|
9
|
+
* by roughly 100:1 and an output-only figure is a severe undercount.
|
|
10
|
+
* Tier 3 — neither: the session carries no usage data and is listed unpriced with a reason.
|
|
11
|
+
*
|
|
12
|
+
* Buckets are emitted RAW, in Copilot's own OpenAI-convention field names. Conversion into
|
|
13
|
+
* the repository's Anthropic-convention `TokenUsage` happens in exactly one place —
|
|
14
|
+
* `readCopilotCli` in `src/cli/commands/analytics/cost/usage-readers.ts` — so the
|
|
15
|
+
* convention mismatch has a single, testable seam.
|
|
16
|
+
*/
|
|
17
|
+
const NO_USAGE_REASON = 'No usage data in transcript — this Copilot CLI version recorded no token telemetry';
|
|
18
|
+
/** Last shutdown wins: a resumed session can record more than one. */
|
|
19
|
+
function lastShutdown(events) {
|
|
20
|
+
let found = null;
|
|
21
|
+
for (const event of events) {
|
|
22
|
+
if (event.type === 'session.shutdown' && event.data) {
|
|
23
|
+
found = event.data;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
return found;
|
|
27
|
+
}
|
|
28
|
+
function fromShutdown(data) {
|
|
29
|
+
const messages = [];
|
|
30
|
+
for (const [model, entry] of Object.entries(data.modelMetrics ?? {})) {
|
|
31
|
+
if (!entry?.usage) {
|
|
32
|
+
continue;
|
|
33
|
+
}
|
|
34
|
+
messages.push({ model, usage: entry.usage, requests: entry.requests?.count });
|
|
35
|
+
}
|
|
36
|
+
return messages;
|
|
37
|
+
}
|
|
38
|
+
function fromPerTurn(events) {
|
|
39
|
+
const byModel = new Map();
|
|
40
|
+
// Tier 2 exists for builds that never write session.shutdown — and those are exactly the
|
|
41
|
+
// builds that also omit per-turn `model`. Tracking the model in effect from
|
|
42
|
+
// session.model_change is what makes this fallback reachable at all; requiring
|
|
43
|
+
// `data.model` would skip every turn on the versions this tier is for.
|
|
44
|
+
let currentModel;
|
|
45
|
+
for (const event of events) {
|
|
46
|
+
if (event.type === 'session.model_change') {
|
|
47
|
+
const next = event.data?.newModel;
|
|
48
|
+
if (next) {
|
|
49
|
+
currentModel = next;
|
|
50
|
+
}
|
|
51
|
+
continue;
|
|
52
|
+
}
|
|
53
|
+
if (event.type !== 'assistant.message' || !event.data) {
|
|
54
|
+
continue;
|
|
55
|
+
}
|
|
56
|
+
const data = event.data;
|
|
57
|
+
const model = data.model ?? currentModel;
|
|
58
|
+
if (!model || typeof data.outputTokens !== 'number') {
|
|
59
|
+
continue; // no model signal anywhere — attributing it would be a guess
|
|
60
|
+
}
|
|
61
|
+
const accumulated = byModel.get(model) ?? { output: 0, requests: 0 };
|
|
62
|
+
accumulated.output += data.outputTokens;
|
|
63
|
+
accumulated.requests += 1;
|
|
64
|
+
byModel.set(model, accumulated);
|
|
65
|
+
}
|
|
66
|
+
return [...byModel.entries()].map(([model, accumulated]) => ({
|
|
67
|
+
model,
|
|
68
|
+
usage: { outputTokens: accumulated.output },
|
|
69
|
+
requests: accumulated.requests,
|
|
70
|
+
partial: true,
|
|
71
|
+
}));
|
|
72
|
+
}
|
|
73
|
+
export function extractCopilotUsage(events) {
|
|
74
|
+
const shutdown = lastShutdown(events);
|
|
75
|
+
if (shutdown) {
|
|
76
|
+
const messages = fromShutdown(shutdown);
|
|
77
|
+
if (messages.length > 0) {
|
|
78
|
+
return { messages, premiumRequests: shutdown.totalPremiumRequests, partial: false };
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
const perTurn = fromPerTurn(events);
|
|
82
|
+
if (perTurn.length > 0) {
|
|
83
|
+
return {
|
|
84
|
+
messages: perTurn,
|
|
85
|
+
premiumRequests: shutdown?.totalPremiumRequests,
|
|
86
|
+
partial: true,
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
return {
|
|
90
|
+
messages: [],
|
|
91
|
+
premiumRequests: shutdown?.totalPremiumRequests,
|
|
92
|
+
partial: false,
|
|
93
|
+
unavailableReason: NO_USAGE_REASON,
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
//# sourceMappingURL=copilot-cli.usage.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"copilot-cli.usage.js","sourceRoot":"","sources":["../../../../src/agents/plugins/copilot-cli/copilot-cli.usage.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AA6BH,MAAM,eAAe,GACnB,oFAAoF,CAAC;AAEvF,sEAAsE;AACtE,SAAS,YAAY,CAAC,MAAsB;IAC1C,IAAI,KAAK,GAA+B,IAAI,CAAC;IAC7C,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE,CAAC;QAC3B,IAAI,KAAK,CAAC,IAAI,KAAK,kBAAkB,IAAI,KAAK,CAAC,IAAI,EAAE,CAAC;YACpD,KAAK,GAAG,KAAK,CAAC,IAA2B,CAAC;QAC5C,CAAC;IACH,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AAED,SAAS,YAAY,CAAC,IAAyB;IAC7C,MAAM,QAAQ,GAA0B,EAAE,CAAC;IAC3C,KAAK,MAAM,CAAC,KAAK,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,YAAY,IAAI,EAAE,CAAC,EAAE,CAAC;QACrE,IAAI,CAAC,KAAK,EAAE,KAAK,EAAE,CAAC;YAClB,SAAS;QACX,CAAC;QACD,QAAQ,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC,KAAK,EAAE,QAAQ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AC,CAAC,CAAC,KAAK,EAAE,WAAW,CAAC,EAAE,EAAE,CAAC,CAAC;QAC3D,KAAK;QACL,KAAK,EAAE,EAAE,YAAY,EAAE,WAAW,CAAC,MAAM,EAAE;QAC3C,QAAQ,EAAE,WAAW,CAAC,QAAQ;QAC9B,OAAO,EAAE,IAAI;KACd,CAAC,CAAC,CAAC;AACN,CAAC;AAED,MAAM,UAAU,mBAAmB,CAAC,MAAsB;IACxD,MAAM,QAAQ,GAAG,YAAY,CAAC,MAAM,CAAC,CAAC;IAEtC,IAAI,QAAQ,EAAE,CAAC;QACb,MAAM,QAAQ,GAAG,YAAY,CAAC,QAAQ,CAAC,CAAC;QACxC,IAAI,QAAQ,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YACxB,OAAO,EAAE,QAAQ,EAAE,eAAe,EAAE,QAAQ,CAAC,oBAAoB,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;QACtF,CAAC;IACH,CAAC;IAED,MAAM,OAAO,GAAG,WAAW,CAAC,MAAM,CAAC,CAAC;IACpC,IAAI,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACvB,OAAO;YACL,QAAQ,EAAE,OAAO;YACjB,eAAe,EAAE,QAAQ,EAAE,oBAAoB;YAC/C,OAAO,EAAE,IAAI;SACd,CAAC;IACJ,CAAC;IAED,OAAO;QACL,QAAQ,EAAE,EAAE;QACZ,eAAe,EAAE,QAAQ,EAAE,oBAAoB;QAC/C,OAAO,EAAE,KAAK;QACd,iBAAiB,EAAE,eAAe;KACnC,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Reads `~/.copilot/session-state/<uuid>/workspace.yaml`.
|
|
3
|
+
*
|
|
4
|
+
* This is the discovery manifest: it carries session identity, project path, repository,
|
|
5
|
+
* branch, and timestamps in a few hundred bytes, so discovery never has to open a
|
|
6
|
+
* transcript. That matters — real `events.jsonl` files reach megabytes, and a report run
|
|
7
|
+
* would otherwise pay to read transcripts it goes on to filter out.
|
|
8
|
+
*/
|
|
9
|
+
import type { CopilotWorkspaceManifest } from './copilot-cli-event-types.js';
|
|
10
|
+
/**
|
|
11
|
+
* Parse one session directory's manifest.
|
|
12
|
+
*
|
|
13
|
+
* Returns null when the file is missing, unreadable, malformed, or carries no session id.
|
|
14
|
+
* Never throws — a single unreadable session directory must not abort discovery.
|
|
15
|
+
*/
|
|
16
|
+
export declare function readWorkspaceManifest(sessionDir: string): CopilotWorkspaceManifest | null;
|
|
17
|
+
//# sourceMappingURL=copilot-cli.workspace.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"copilot-cli.workspace.d.ts","sourceRoot":"","sources":["../../../../src/agents/plugins/copilot-cli/copilot-cli.workspace.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAKH,OAAO,KAAK,EAAE,wBAAwB,EAAoB,MAAM,8BAA8B,CAAC;AAY/F;;;;;GAKG;AACH,wBAAgB,qBAAqB,CAAC,UAAU,EAAE,MAAM,GAAG,wBAAwB,GAAG,IAAI,CA+BzF"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Reads `~/.copilot/session-state/<uuid>/workspace.yaml`.
|
|
3
|
+
*
|
|
4
|
+
* This is the discovery manifest: it carries session identity, project path, repository,
|
|
5
|
+
* branch, and timestamps in a few hundred bytes, so discovery never has to open a
|
|
6
|
+
* transcript. That matters — real `events.jsonl` files reach megabytes, and a report run
|
|
7
|
+
* would otherwise pay to read transcripts it goes on to filter out.
|
|
8
|
+
*/
|
|
9
|
+
import { readFileSync } from 'fs';
|
|
10
|
+
import { join } from 'path';
|
|
11
|
+
import { parse as parseYaml } from 'yaml';
|
|
12
|
+
import { logger } from '../../../utils/logger.js';
|
|
13
|
+
/** ISO-8601 to epoch ms; undefined when absent or unparseable. */
|
|
14
|
+
function toEpochMs(iso) {
|
|
15
|
+
if (!iso) {
|
|
16
|
+
return undefined;
|
|
17
|
+
}
|
|
18
|
+
const ms = Date.parse(iso);
|
|
19
|
+
return Number.isNaN(ms) ? undefined : ms;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Parse one session directory's manifest.
|
|
23
|
+
*
|
|
24
|
+
* Returns null when the file is missing, unreadable, malformed, or carries no session id.
|
|
25
|
+
* Never throws — a single unreadable session directory must not abort discovery.
|
|
26
|
+
*/
|
|
27
|
+
export function readWorkspaceManifest(sessionDir) {
|
|
28
|
+
let text;
|
|
29
|
+
try {
|
|
30
|
+
text = readFileSync(join(sessionDir, 'workspace.yaml'), 'utf-8');
|
|
31
|
+
}
|
|
32
|
+
catch {
|
|
33
|
+
return null;
|
|
34
|
+
}
|
|
35
|
+
let raw;
|
|
36
|
+
try {
|
|
37
|
+
raw = (parseYaml(text) ?? {});
|
|
38
|
+
}
|
|
39
|
+
catch (error) {
|
|
40
|
+
logger.debug(`[copilot-cli] malformed workspace.yaml in ${sessionDir}:`, error);
|
|
41
|
+
return null;
|
|
42
|
+
}
|
|
43
|
+
if (!raw || typeof raw !== 'object' || !raw.id) {
|
|
44
|
+
return null;
|
|
45
|
+
}
|
|
46
|
+
return {
|
|
47
|
+
id: raw.id,
|
|
48
|
+
cwd: raw.cwd,
|
|
49
|
+
gitRoot: raw.git_root,
|
|
50
|
+
repository: raw.repository,
|
|
51
|
+
hostType: raw.host_type,
|
|
52
|
+
branch: raw.branch,
|
|
53
|
+
name: raw.name,
|
|
54
|
+
createdAt: toEpochMs(raw.created_at),
|
|
55
|
+
updatedAt: toEpochMs(raw.updated_at),
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
//# sourceMappingURL=copilot-cli.workspace.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"copilot-cli.workspace.js","sourceRoot":"","sources":["../../../../src/agents/plugins/copilot-cli/copilot-cli.workspace.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,YAAY,EAAE,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CAAC,QAAQ;QACrB,UAAU,EAAE,GAAG,CAAC,UAAU;QAC1B,QAAQ,EAAE,GAAG,CAAC,SAAS;QACvB,MAAM,EAAE,GAAG,CAAC,MAAM;QAClB,IAAI,EAAE,GAAG,CAAC,IAAI;QACd,SAAS,EAAE,SAAS,CAAC,GAAG,CAAC,UAAU,CAAC;QACpC,SAAS,EAAE,SAAS,CAAC,GAAG,CAAC,UAAU,CAAC;KACrC,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { CopilotCliPlugin, CopilotCliPluginMetadata, COPILOT_CLI_AGENT_NAME, COPILOT_CLI_CLIENT_TYPE, COPILOT_CLI_DISPLAY_NAME, } from './copilot-cli.plugin.js';
|
|
2
|
+
export { assertExplicitCopilotModelAllowed, isCopilotCompatibleModelName, resolveCopilotModel, } from './copilot-cli.models.js';
|
|
3
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/agents/plugins/copilot-cli/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAChB,wBAAwB,EACxB,sBAAsB,EACtB,uBAAuB,EACvB,wBAAwB,GACzB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,iCAAiC,EACjC,4BAA4B,EAC5B,mBAAmB,GACpB,MAAM,yBAAyB,CAAC"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { CopilotCliPlugin, CopilotCliPluginMetadata, COPILOT_CLI_AGENT_NAME, COPILOT_CLI_CLIENT_TYPE, COPILOT_CLI_DISPLAY_NAME, } from './copilot-cli.plugin.js';
|
|
2
|
+
export { assertExplicitCopilotModelAllowed, isCopilotCompatibleModelName, resolveCopilotModel, } from './copilot-cli.models.js';
|
|
3
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -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,uBAAuB,EACvB,wBAAwB,GACzB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,iCAAiC,EACjC,4BAA4B,EAC5B,mBAAmB,GACpB,MAAM,yBAAyB,CAAC"}
|
package/dist/agents/plugins/copilot-cli/session/processors/copilot-cli.conversations-processor.d.ts
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Conversations processor for Copilot CLI sessions.
|
|
3
|
+
*
|
|
4
|
+
* Copilot persists prompt text in `events.jsonl`; `parseSessionFile` captures it into
|
|
5
|
+
* `ParsedSession.messages`. Unlike Claude and Pi, Copilot does not currently emit
|
|
6
|
+
* mid-turn hook events through CodeMie, so this processor drains the whole discovered
|
|
7
|
+
* transcript on SessionEnd and appends pending payload windows to the standard
|
|
8
|
+
* `_conversation.jsonl` spool for the shared sync pipeline.
|
|
9
|
+
*/
|
|
10
|
+
import type { SessionProcessor, ProcessingContext, ProcessingResult } from '../../../../core/session/BaseProcessor.js';
|
|
11
|
+
import type { ParsedSession } from '../../../../core/session/BaseSessionAdapter.js';
|
|
12
|
+
export declare class CopilotCliConversationsProcessor implements SessionProcessor {
|
|
13
|
+
readonly name = "copilot-cli-conversations";
|
|
14
|
+
readonly priority = 2;
|
|
15
|
+
shouldProcess(session: ParsedSession): boolean;
|
|
16
|
+
process(session: ParsedSession, context: ProcessingContext): Promise<ProcessingResult>;
|
|
17
|
+
}
|
|
18
|
+
//# 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;;;;;;;;GAQG;AAIH,OAAO,KAAK,EACV,gBAAgB,EAChB,iBAAiB,EACjB,gBAAgB,EACjB,MAAM,2CAA2C,CAAC;AACnD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gDAAgD,CAAC;AA0QpF,qBAAa,gCAAiC,YAAW,gBAAgB;IACvE,QAAQ,CAAC,IAAI,+BAA+B;IAC5C,QAAQ,CAAC,QAAQ,KAAK;IAEtB,aAAa,CAAC,OAAO,EAAE,aAAa,GAAG,OAAO;IAKxC,OAAO,CAAC,OAAO,EAAE,aAAa,EAAE,OAAO,EAAE,iBAAiB,GAAG,OAAO,CAAC,gBAAgB,CAAC;CA+G7F"}
|