@c4a/context-cli 0.6.9 → 0.6.10

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/cli.js CHANGED
@@ -104479,17 +104479,27 @@ function parseRepositoryRecoveryPayload(value) {
104479
104479
  });
104480
104480
  return { schema: RECOVERY_SCHEMA, repositories };
104481
104481
  }
104482
- function canonicalRemote(value) {
104482
+ function trimRepositorySuffix(value) {
104483
+ return value.trim().replace(/^\/+|\/+$/gu, "").replace(/\.git$/iu, "");
104484
+ }
104485
+ function repositoryPathIdentity(value) {
104483
104486
  const trimmed = value.trim().replace(/\/+$/u, "").replace(/\.git$/iu, "");
104484
- const scp = /^(?:[^@]+@)?([^:]+):(.+)$/u.exec(trimmed);
104485
- if (scp !== null)
104486
- return `${scp[1]?.toLowerCase()}/${scp[2]}`;
104487
- try {
104488
- const url = new URL(trimmed);
104489
- return `${url.hostname.toLowerCase()}${url.pathname}`.replace(/\/+$/u, "").replace(/\.git$/iu, "");
104490
- } catch {
104491
- return trimmed;
104487
+ const windowsPath = /^[a-z]:[\\/]/iu.test(trimmed);
104488
+ const urlSyntax = /^[a-z][a-z0-9+.-]*:\/\//iu.test(trimmed);
104489
+ if (!windowsPath && urlSyntax) {
104490
+ try {
104491
+ const url = new URL(trimmed);
104492
+ if (url.hostname.length > 0)
104493
+ return trimRepositorySuffix(url.pathname);
104494
+ return url.pathname.replace(/\/+$/u, "").replace(/\.git$/iu, "");
104495
+ } catch {
104496
+ return trimmed;
104497
+ }
104492
104498
  }
104499
+ const scp = windowsPath ? null : /^(?:[^@/:]+@)?[^/:]+:(.+)$/u.exec(trimmed);
104500
+ if (scp?.[1] !== undefined)
104501
+ return trimRepositorySuffix(scp[1]);
104502
+ return trimmed;
104493
104503
  }
104494
104504
  function repositorySlug(remote) {
104495
104505
  const raw = basename9(remote.replace(/\/+$/u, "").replace(/\.git$/iu, ""));
@@ -104500,7 +104510,7 @@ function groupId(source2) {
104500
104510
  return `${repositorySlug(source2.git.remote)}-${source2.git.ref.slice(0, 12)}`;
104501
104511
  }
104502
104512
  function groupKey(source2) {
104503
- return `${canonicalRemote(source2.git.remote)}\x00${source2.git.ref.toLowerCase()}`;
104513
+ return `${repositoryPathIdentity(source2.git.remote)}\x00${source2.git.ref.toLowerCase()}`;
104504
104514
  }
104505
104515
  function suggestedCloneTarget(source2) {
104506
104516
  return `.tmp/repo/${groupId(source2)}`;
@@ -104580,10 +104590,14 @@ async function resolveGitRoot2(path4) {
104580
104590
  }
104581
104591
  async function verifyCheckout(input) {
104582
104592
  const actualRemote = await git2(input.checkout, ["remote", "get-url", "origin"]);
104583
- if (canonicalRemote(actualRemote) !== canonicalRemote(input.remote)) {
104593
+ const expectedRepository = repositoryPathIdentity(input.remote);
104594
+ const actualRepository = repositoryPathIdentity(actualRemote);
104595
+ if (actualRepository !== expectedRepository) {
104584
104596
  throw userInputError3("local repository origin does not match the registered source", {
104585
104597
  expected_remote: input.remote,
104586
104598
  actual_remote: actualRemote,
104599
+ expected_repository: expectedRepository,
104600
+ actual_repository: actualRepository,
104587
104601
  checkout: input.checkout
104588
104602
  });
104589
104603
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@c4a/context-cli",
3
- "version": "0.6.9",
3
+ "version": "0.6.10",
4
4
  "type": "module",
5
5
  "description": "Local runtime and Agent integration for traceable knowledge production",
6
6
  "license": "MIT",
@@ -24,7 +24,7 @@
24
24
  },
25
25
  "dependencies": {
26
26
  "@c4a/agent-graph": "0.2.6",
27
- "@c4a/context": "0.6.9",
27
+ "@c4a/context": "0.6.10",
28
28
  "commander": "^11.0.0",
29
29
  "fast-xml-parser": "^5.10.1",
30
30
  "handlebars": "^4.7.8",
package/plugins/VERSION CHANGED
@@ -1 +1 @@
1
- 0.6.9
1
+ 0.6.10
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "c4a",
3
3
  "description": "Start or continue a project-local knowledge workspace through one graph-routed entry.",
4
- "version": "0.6.9",
4
+ "version": "0.6.10",
5
5
  "author": {
6
6
  "name": "c4a"
7
7
  },
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "c4a",
3
- "version": "0.6.9",
3
+ "version": "0.6.10",
4
4
  "description": "Start or continue a project-local knowledge workspace through one graph-routed entry.",
5
5
  "author": {
6
6
  "name": "c4a"
@@ -18,7 +18,7 @@
18
18
  "skills": "./skills/",
19
19
  "interface": {
20
20
  "displayName": "C4A Context",
21
- "shortDescription": "Initialize and advance a local, source-linked project knowledge workspace.\nv0.6.9",
21
+ "shortDescription": "Initialize and advance a local, source-linked project knowledge workspace.\nv0.6.10",
22
22
  "longDescription": "Create a Context workspace and use agent-guided next steps to register sources, run extraction, review candidates, build package outputs, and verify health without silently mutating source repositories.",
23
23
  "developerName": "c4a",
24
24
  "category": "Productivity",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "c4a",
3
3
  "displayName": "C4A Context",
4
- "version": "0.6.9",
4
+ "version": "0.6.10",
5
5
  "description": "Start or continue a project-local knowledge workspace through one graph-routed entry.",
6
6
  "author": {
7
7
  "name": "Context4AI",
@@ -2,7 +2,7 @@
2
2
  "schema": "agent-graph.bundle.v1",
3
3
  "provider": {
4
4
  "id": "c4a/context",
5
- "version": "0.6.9"
5
+ "version": "0.6.10"
6
6
  },
7
7
  "providerManifest": "provider.yaml",
8
8
  "graphs": [
@@ -532,7 +532,7 @@
532
532
  },
533
533
  {
534
534
  "path": "provider.yaml",
535
- "digest": "sha256:ef4af3314dc2d10892d97f0236d68b8a3b7549cfbcb5c55c45efc3de08b2a50e"
535
+ "digest": "sha256:b6c55d046c66dbd0047ddc0632ef707107938a15ca51e196ebc0f7a2164bba06"
536
536
  },
537
537
  {
538
538
  "path": "resources/diagnostics/projection-stale.md",
@@ -750,5 +750,5 @@
750
750
  "graphDependencies": {
751
751
  "workspace": []
752
752
  },
753
- "digest": "sha256:3550fa7734792eb9bcc2abacf04f7fff9c0ac14344bbecea3a2b961f1354c8b3"
753
+ "digest": "sha256:2c6cbd3232c59b44604ff53555aa227f35a9a59f067fa65b47808e79af3adce7"
754
754
  }
@@ -1,6 +1,6 @@
1
1
  schema: agent-graph.provider.v1
2
2
  id: c4a/context
3
- version: 0.6.9
3
+ version: 0.6.10
4
4
  name: Context workflow
5
5
  description: Internal work contract for Context knowledge workspaces.
6
6
  graphs: