@github/copilot-sdk-win32-x64 0.0.1 → 1.0.13-preview.6

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.
Files changed (68) hide show
  1. package/animations/app-install-nudge.json.gz +0 -0
  2. package/animations/banner.json.gz +0 -0
  3. package/builtin/customize-cloud-agent/SKILL.md +254 -0
  4. package/builtin/discover-resources/SKILL.md +35 -0
  5. package/builtin/github-pr-media/SKILL.md +108 -0
  6. package/builtin-skills/customize-cloud-agent/SKILL.md +254 -0
  7. package/builtin-skills/discover-resources/SKILL.md +35 -0
  8. package/builtin-skills/github-pr-media/SKILL.md +108 -0
  9. package/copilot-sdk/canvas.d.ts +126 -0
  10. package/copilot-sdk/client.d.ts +478 -0
  11. package/copilot-sdk/copilotRequestHandler.d.ts +85 -0
  12. package/copilot-sdk/docs/agent-author.md +295 -0
  13. package/copilot-sdk/docs/examples.md +682 -0
  14. package/copilot-sdk/docs/extensions.md +81 -0
  15. package/copilot-sdk/docs/factories.md +279 -0
  16. package/copilot-sdk/docs/factory-patterns.md +194 -0
  17. package/copilot-sdk/extension.d.ts +59 -0
  18. package/copilot-sdk/extension.js +11399 -0
  19. package/copilot-sdk/factory.d.ts +301 -0
  20. package/copilot-sdk/ffiRuntimeHost.d.ts +35 -0
  21. package/copilot-sdk/generated/rpc.d.ts +24623 -0
  22. package/copilot-sdk/generated/session-events.d.ts +11117 -0
  23. package/copilot-sdk/index.d.ts +15 -0
  24. package/copilot-sdk/index.js +11540 -0
  25. package/copilot-sdk/runtimeArtifacts.d.ts +6 -0
  26. package/copilot-sdk/sdkProtocolVersion.d.ts +10 -0
  27. package/copilot-sdk/session.d.ts +331 -0
  28. package/copilot-sdk/sessionFsProvider.d.ts +107 -0
  29. package/copilot-sdk/telemetry.d.ts +14 -0
  30. package/copilot-sdk/toolSet.d.ts +75 -0
  31. package/copilot-sdk/types.d.ts +2974 -0
  32. package/definitions/code-review.agent.yaml +94 -0
  33. package/definitions/explore.agent.yaml +75 -0
  34. package/definitions/rem-agent.agent.yaml +22 -0
  35. package/definitions/research.agent.yaml +111 -0
  36. package/definitions/rubber-duck.agent.yaml +67 -0
  37. package/definitions/security-review.agent.yaml +261 -0
  38. package/definitions/sidekick/cloud-session-search.yaml +37 -0
  39. package/definitions/sidekick/github-context-memory.yaml +46 -0
  40. package/definitions/sidekick/github-context.yaml +44 -0
  41. package/definitions/sidekick/session-search.yaml +37 -0
  42. package/definitions/sidekick/subconscious-agent.yaml +60 -0
  43. package/definitions/sidekick/test-sidekick-context-changed.yaml +24 -0
  44. package/definitions/sidekick/test-sidekick-persistent.yaml +23 -0
  45. package/definitions/sidekick/test-sidekick-restart.yaml +23 -0
  46. package/definitions/sidekick/test-sidekick-trigger-once.yaml +22 -0
  47. package/definitions/task.agent.yaml +44 -0
  48. package/package.json +14 -11
  49. package/plugins/computer-use/.mcp.json +10 -0
  50. package/plugins/computer-use/.plugin/plugin.json +6 -0
  51. package/plugins/computer-use/.release-target +1 -0
  52. package/plugins/computer-use/CopilotComputerUse.exe +0 -0
  53. package/plugins/computer-use/computer-use-mcp.exe +0 -0
  54. package/prebuilds/win32-x64/OneAuthInterop.LICENSE.txt +192 -0
  55. package/prebuilds/win32-x64/OneAuthInterop.dll +0 -0
  56. package/prebuilds/win32-x64/OneAuthInterop.dll.stamp.json +4 -0
  57. package/prebuilds/win32-x64/copilot-runtime.exe +0 -0
  58. package/prebuilds/win32-x64/msal-node-runtime.node +0 -0
  59. package/prebuilds/win32-x64/msalruntime.dll +0 -0
  60. package/prebuilds/win32-x64/runtime.node +0 -0
  61. package/preloads/extension_bootstrap.mjs +68 -0
  62. package/preloads/extension_sdk_resolver.mjs +34 -0
  63. package/ripgrep/bin/win32-x64/rg.exe +0 -0
  64. package/schemas/api.schema.json +41931 -0
  65. package/schemas/session-events.schema.json +20937 -0
  66. package/sdk/index.js +1489 -0
  67. package/tgrep/bin/win32-x64/tgrep.exe +0 -0
  68. package/README.md +0 -3
@@ -0,0 +1,68 @@
1
+ /*---------------------------------------------------------------------------------------------
2
+ * Copyright (c) Microsoft Corporation. All rights reserved.
3
+ *--------------------------------------------------------------------------------------------*/
4
+
5
+ // Bootstrap script for extension subprocesses.
6
+ // This is the fork target — it sets up the SDK resolver in-process,
7
+ // then dynamically imports the user's extension via the EXTENSION_PATH env var.
8
+
9
+ import Module from "node:module";
10
+ import { resolve as resolvePath } from "node:path";
11
+ import { pathToFileURL } from "node:url";
12
+
13
+ // The previous child_process.fork host supplied an IPC channel, which caused
14
+ // Node to terminate the extension automatically if its parent disappeared.
15
+ // Rust's stdio-only spawn has no equivalent channel, so preserve that liveness
16
+ // contract explicitly to avoid orphaning extensions after a forced CLI exit.
17
+ const parentPid = Number(process.env.COPILOT_EXTENSION_PARENT_PID);
18
+ if (!Number.isSafeInteger(parentPid) || parentPid <= 0 || process.ppid !== parentPid) {
19
+ process.exit(0);
20
+ }
21
+ const parentWatch = setInterval(() => {
22
+ try {
23
+ if (process.ppid !== parentPid) {
24
+ process.exit(0);
25
+ }
26
+ process.kill(parentPid, 0);
27
+ } catch {
28
+ process.exit(0);
29
+ }
30
+ }, 1000);
31
+ parentWatch.unref();
32
+
33
+ // Register the ESM SDK resolver hook before loading the extension
34
+ Module.register("./extension_sdk_resolver.mjs", import.meta.url);
35
+
36
+ // Register a CJS require hook so that CommonJS extensions can
37
+ // `require("@github/copilot-sdk")` and have it resolve to the bundled SDK.
38
+ const sdkPath = process.env.COPILOT_SDK_PATH;
39
+ process.stderr.write(
40
+ `[extension-bootstrap] starting: pid=${process.pid}, COPILOT_SDK_PATH=${sdkPath ?? "<unset>"}, EXTENSION_PATH=${process.env.EXTENSION_PATH ?? "<unset>"}, SESSION_ID=${process.env.SESSION_ID ?? "<unset>"}\n`,
41
+ );
42
+ if (sdkPath) {
43
+ const originalResolveFilename = Module._resolveFilename;
44
+ Module._resolveFilename = function (request, parent, isMain, options) {
45
+ if (request === "@github/copilot-sdk") {
46
+ return resolvePath(sdkPath, "index.js");
47
+ }
48
+ if (request === "@github/copilot-sdk/extension") {
49
+ return resolvePath(sdkPath, "extension.js");
50
+ }
51
+ return originalResolveFilename.call(this, request, parent, isMain, options);
52
+ };
53
+ }
54
+
55
+ // Load the user's extension
56
+ const extensionPath = process.env.EXTENSION_PATH;
57
+ if (!extensionPath) {
58
+ console.error("[extension-bootstrap] No extension path provided");
59
+ process.exit(1);
60
+ }
61
+
62
+ try {
63
+ process.stderr.write(`[extension-bootstrap] importing extension: ${extensionPath}\n`);
64
+ await import(pathToFileURL(extensionPath).href);
65
+ } catch (err) {
66
+ console.error(`[extension-bootstrap] Failed to load extension: ${err}`);
67
+ process.exit(1);
68
+ }
@@ -0,0 +1,34 @@
1
+ /*---------------------------------------------------------------------------------------------
2
+ * Copyright (c) Microsoft Corporation. All rights reserved.
3
+ *--------------------------------------------------------------------------------------------*/
4
+
5
+ // ESM loader hook for extension subprocesses.
6
+ // Intercepts `@github/copilot-sdk` imports and redirects them to the
7
+ // CLI's bundled copies.
8
+
9
+ import { resolve as resolvePath } from "node:path";
10
+ import { pathToFileURL } from "node:url";
11
+
12
+ // COPILOT_SDK_PATH points to the directory containing the bundled SDK files.
13
+ const sdkPath = process.env.COPILOT_SDK_PATH;
14
+ process.stderr.write(
15
+ `[extension-resolver] resolver hook loaded: pid=${process.pid}, COPILOT_SDK_PATH=${sdkPath ?? "<unset>"}\n`,
16
+ );
17
+
18
+ export async function resolve(specifier, context, nextResolve) {
19
+ if (!sdkPath) {
20
+ return nextResolve(specifier, context);
21
+ }
22
+
23
+ if (specifier === "@github/copilot-sdk") {
24
+ const resolved = pathToFileURL(resolvePath(sdkPath, "index.js")).href;
25
+ return { url: resolved, shortCircuit: true };
26
+ }
27
+
28
+ if (specifier === "@github/copilot-sdk/extension") {
29
+ const resolved = pathToFileURL(resolvePath(sdkPath, "extension.js")).href;
30
+ return { url: resolved, shortCircuit: true };
31
+ }
32
+
33
+ return nextResolve(specifier, context);
34
+ }
Binary file