@agentknight/client 0.9.62 → 0.9.68

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 CHANGED
@@ -271,6 +271,12 @@ to enable agents and select **同步** (Sync), or explicitly show the QR code to
271
271
  Multiple agents share one PC connection. Enabling an agent syncs all of its
272
272
  current and future locally discoverable sessions; individual sessions need no
273
273
  selection. Unselected agents remain private. Selections survive PC Agent restarts.
274
+ After installing an agent, select **Re-detect** without restarting the PC Client.
275
+
276
+ Microsoft Clarity usage analytics is adult-only, opt-in and respects browser privacy
277
+ signals. It runs in a content-free sandbox, not the dashboard, login or conversations.
278
+ Counts cover consenting browser activity, not installations; opting out stops
279
+ collection and removes the local anonymous ID.
274
280
 
275
281
  Use `--agents copilot,pi` to enable agent sync at startup, or `--agents none` to disable
276
282
  all agent sync. This switches to managed mode and overrides both the saved selection and
@@ -351,13 +357,18 @@ separately for each executable/argument configuration.
351
357
  Adapters expose only supported configuration and operations. PI executes tools
352
358
  natively, without an added per-tool approval layer. Project resources follow PI's
353
359
  native project trust decisions, with unresolved trust prompts routed to Android.
354
- Machine-wide features such as uploads and deletion are available only when every
355
- selected engine supports them; session controls use that session's own engine.
360
+ The machine-wide upload capability requires support from every selected engine;
361
+ other session controls depend on the target engine.
356
362
  ACP approvals use the agent's offered one-time permission option, never an
357
363
  automatic persistent grant. Unsupported operations return errors rather than
358
364
  pretending to succeed. Only Copilot exposes its remote-mode toggle.
359
- Generic file uploads remain Copilot-only; PI, Codex and Claude also reject image uploads, while
360
- ACP images require the agent's negotiated image support.
365
+ Copilot and PI accept image and generic file uploads. PI images require a
366
+ vision-capable model; other files are made available through native file tools.
367
+ PI uploads stay in session-isolated local storage across turns and restarts.
368
+ PI tool images appear in the timeline; text paths are not attachments.
369
+ Deleting an idle PI session removes its history, not its workspace or uploads.
370
+ Close the session in any standalone PI CLI before deleting it.
371
+ Codex and Claude reject uploads; ACP images require negotiated image support.
361
372
 
362
373
  Optional controls follow the [capability compatibility policy](../../docs/remote-sessions/protocol-compatibility-plan.md);
363
374
  the historical registration `sdkVersion` is a compatibility marker, while
@@ -1,13 +1,15 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  AadRelayLogin,
4
+ aadWindowHandle,
4
5
  createAadAccountStore,
5
6
  createAadRelayLogin,
6
7
  readAadAccount
7
- } from "./chunk-GEXDYCVI.js";
8
- import "./chunk-GH26GIXM.js";
8
+ } from "./chunk-SKD2IHTR.js";
9
+ import "./chunk-2QZOJ6EF.js";
9
10
  export {
10
11
  AadRelayLogin,
12
+ aadWindowHandle,
11
13
  createAadAccountStore,
12
14
  createAadRelayLogin,
13
15
  readAadAccount
@@ -3079,6 +3079,11 @@ var WebCopilotRequestSchema = z37.object({
3079
3079
  proof: MobileIdentityProofSchema,
3080
3080
  request: WebCopilotActionSchema
3081
3081
  }).strict();
3082
+ var WebCopilotBrowserRequestSchema = z37.object({
3083
+ browserSession: z37.literal(true),
3084
+ userId: z37.string().min(1).max(256),
3085
+ request: WebCopilotActionSchema
3086
+ }).strict();
3082
3087
  var WebCopilotDeviceSchema = z37.object({
3083
3088
  deviceCode: secret,
3084
3089
  userCode: z37.string().regex(/^[A-Z0-9]{4}-[A-Z0-9]{4}$/),
@@ -5,7 +5,7 @@ import {
5
5
  PcEnrollmentIdSchema,
6
6
  PcEnrollmentStartRequestSchema,
7
7
  PcEnrollmentVerifierRequestSchema
8
- } from "./chunk-GH26GIXM.js";
8
+ } from "./chunk-2QZOJ6EF.js";
9
9
 
10
10
  // src/aad-relay-login.ts
11
11
  import { createHash as createHash2 } from "node:crypto";
@@ -386,6 +386,7 @@ var AadRelayLogin = class {
386
386
  const result = interactive ? await this.options.client.acquireTokenInteractive({
387
387
  scopes,
388
388
  prompt: "select_account",
389
+ ...this.options.windowHandle === void 0 ? {} : { windowHandle: this.options.windowHandle },
389
390
  openBrowser: async () => {
390
391
  throw new AadLoginError("The OS broker is required; browser fallback is disabled.");
391
392
  }
@@ -460,11 +461,25 @@ async function createAadRelayLogin(options) {
460
461
  broker: { nativeBrokerPlugin: broker }
461
462
  });
462
463
  const store = await createAadAccountStore(options);
463
- return new AadRelayLogin({ ...options, client, store });
464
+ const windowHandle = aadWindowHandle(process.env.AGENTKNIGHT_AAD_WINDOW_HANDLE, process.platform, process.arch);
465
+ return new AadRelayLogin({
466
+ ...options,
467
+ client,
468
+ store,
469
+ ...windowHandle === void 0 ? {} : { windowHandle }
470
+ });
464
471
  } catch (error) {
465
472
  throw safeFailure(error);
466
473
  }
467
474
  }
475
+ function aadWindowHandle(value, platform2, arch) {
476
+ if (platform2 !== "win32" || value === void 0) return void 0;
477
+ const width = arch === "ia32" ? 4 : 8;
478
+ if (!/^[0-9a-f]{1,16}$/u.test(value) || value.length > width * 2 || BigInt(`0x${value}`) === 0n) {
479
+ throw new AadLoginError("The desktop sign-in window handle is invalid.");
480
+ }
481
+ return Buffer.from(value.padStart(width * 2, "0"), "hex").reverse();
482
+ }
468
483
 
469
484
  export {
470
485
  RelayCredentialStoreError,
@@ -475,5 +490,6 @@ export {
475
490
  readAadAccount,
476
491
  AadRelayLogin,
477
492
  createAadAccountStore,
478
- createAadRelayLogin
493
+ createAadRelayLogin,
494
+ aadWindowHandle
479
495
  };
@@ -18,7 +18,7 @@ function toErrorDetails(error) {
18
18
  // src/app-version.ts
19
19
  import { readFileSync } from "node:fs";
20
20
  function readAppVersion() {
21
- if (true) return "0.9.62";
21
+ if (true) return "0.9.68";
22
22
  const metadata = JSON.parse(readFileSync(new URL("../package.json", import.meta.url), "utf8"));
23
23
  if (typeof metadata !== "object" || metadata === null || !("version" in metadata) || typeof metadata.version !== "string" || metadata.version.length === 0) {
24
24
  throw new Error("AgentKnight package metadata does not contain a version");
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  SESSION_TIMELINE_PAGE_SIZE
4
- } from "./chunk-GH26GIXM.js";
4
+ } from "./chunk-2QZOJ6EF.js";
5
5
 
6
6
  // src/local-sessions.ts
7
7
  import { supportsAgentSelection, codingAgentPresentation } from "@agentknight/sdk";