@intentic/constants 1.176.3 → 1.209.1

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 ADDED
@@ -0,0 +1,51 @@
1
+ # @intentic/constants
2
+
3
+ The ports, paths and image references the daemon, the CLIs and the desktop app all have to agree on.
4
+
5
+ ## Responsibilities
6
+
7
+ - Name every shared constant once, so no two programs can disagree about where something is.
8
+ - Find the monorepo root, and a package's own root, by looking for them rather than by counting directories.
9
+
10
+ ## Key files
11
+
12
+ - [src/index.ts](src/index.ts) — the constants themselves: ports, the fixed directory layouts, legal and origin
13
+ values. Isomorphic, imported by browser code, so nothing here may touch `node:fs`.
14
+ - [src/node.mjs](src/node.mjs) — `repoRoot()` and `packageRoot()`, behind the `@intentic/constants/node`
15
+ subpath. Node-only, and hand-written JavaScript rather than compiled TypeScript.
16
+
17
+ ## How it fits
18
+
19
+ The bottom of the dependency graph: it imports nothing and almost everything imports it. A port number that lives
20
+ in two files is a port number that will eventually be two different numbers, which is the entire argument for
21
+ this package existing. The same argument covers the directory layouts — `/work`, `/history`, `.intentic`,
22
+ `/opt/intentic` — which were previously typed out by hand across dozens of files with nothing linking the copies.
23
+
24
+ The two root-finders answer the other half of that problem. Code used to locate the repo root by counting how
25
+ deep it sat (`../..`, `../../..`, `../../../..`), a number correct only for the file's current depth and checked
26
+ by nothing. Walking up to a marker has no such coupling, so a file can move anywhere and still resolve.
27
+
28
+ ## Conventions & gotchas
29
+
30
+ - If a constant is used by exactly one package, it belongs in that package. This is for the ones that cross a
31
+ boundary.
32
+ - `src/node.mjs` is plain JavaScript with a hand-written `.d.mts` **on purpose**. Its earliest callers run before
33
+ anything is built — the prepass is what performs the build, and the byte and path checks run ahead of it — so a
34
+ helper importable only from `dist/` is one they cannot import at all, which is how a second copy of the walk
35
+ gets written. It is also why the root `package.json` depends on this package: without that link, scripts under
36
+ `_tools/scripts/` cannot resolve it by name.
37
+ - **The name only resolves once `pnpm install` has run**, because a bare specifier is looked up through
38
+ `node_modules`. The two callers that run before any install — `prepass.mjs --checks-only`, which the `pre-push`
39
+ hook and the CI `preflight` job invoke on a bare checkout — therefore import `../constants/src/node.mjs` by
40
+ path. Same file, same single copy of the walk, no install required. Everything that runs after the install
41
+ imports it by name.
42
+ - **Extensions cannot import this package** — the boundary rule (`.oxlintrc.json`, `_extensions/README.md`) allows
43
+ them only the SDK halves and `@intentic/sandbox-contract`, so an extension can't couple itself to app or engine
44
+ internals. That rule stands; the contract package re-exports the four layout constants so extensions can still
45
+ name a location instead of spelling it. One definition, reached by two paths.
46
+ - `WORKSPACE_ROOT` and `HISTORY_ROOT` are **defaults, not laws**. The daemon takes both as overridable config and
47
+ an isolated turn re-points them, so code holding a `Config` must read the config value. The constants are what
48
+ that config defaults to, and what code with no config in reach can still name correctly.
49
+ - Prefer the daemon's own `statePath()` over joining `STATE_DIR` by hand wherever it is reachable — it is typed
50
+ against the table of state files, so it catches a name the table doesn't declare. `STATE_DIR` is for callers
51
+ outside that table.
package/dist/index.d.ts CHANGED
@@ -1,5 +1,15 @@
1
- export declare const LEGAL_VERSION = "2026-07-03";
1
+ export * from "./provider-logos.js";
2
+ export declare const WORKSPACE_ROOT = "/work";
3
+ export declare const HISTORY_ROOT = "/history";
4
+ export declare const STATE_DIR = ".intentic";
5
+ export declare const HOST_STATE_ROOT = "/opt/intentic";
6
+ export declare const LEGAL_VERSION = "2026-08-13";
2
7
  export declare const LEGAL_CONTACT_EMAIL = "contact@intentic.dev";
8
+ export declare const LEGAL_ENTITY_NAME = "Artur Kurowski, trading as radarsu";
9
+ export declare const LEGAL_ENTITY_COUNTRY = "Poland";
10
+ export declare const LEGAL_ENTITY_ADDRESS = "";
11
+ export declare const LEGAL_ENTITY_TAX_ID = "";
12
+ export declare const PLATFORM_HOSTING_LOCATION = "";
3
13
  export declare const PLATFORM_WEB_ORIGIN = "https://app.intentic.dev";
4
14
  export declare const DAEMON_PORT = 8787;
5
15
  export declare const PREVIEW_PORT = 5173;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,aAAa,eAAe,CAAC;AAC1C,eAAO,MAAM,mBAAmB,yBAAyB,CAAC;AAe1D,eAAO,MAAM,mBAAmB,6BAA6B,CAAC;AAa9D,eAAO,MAAM,WAAW,OAAO,CAAC;AAChC,eAAO,MAAM,YAAY,OAAO,CAAC;AASjC,eAAO,MAAM,UAAU,OAAO,CAAC;AAO/B,eAAO,MAAM,eAAe,OAAO,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAIA,cAAc,qBAAqB,CAAC;AAkBpC,eAAO,MAAM,cAAc,UAAU,CAAC;AAItC,eAAO,MAAM,YAAY,aAAa,CAAC;AAMvC,eAAO,MAAM,SAAS,cAAc,CAAC;AAIrC,eAAO,MAAM,eAAe,kBAAkB,CAAC;AAK/C,eAAO,MAAM,aAAa,eAAe,CAAC;AAC1C,eAAO,MAAM,mBAAmB,yBAAyB,CAAC;AAW1D,eAAO,MAAM,iBAAiB,uCAAuC,CAAC;AACtE,eAAO,MAAM,oBAAoB,WAAW,CAAC;AAC7C,eAAO,MAAM,oBAAoB,KAAK,CAAC;AACvC,eAAO,MAAM,mBAAmB,KAAK,CAAC;AAUtC,eAAO,MAAM,yBAAyB,KAAK,CAAC;AAe5C,eAAO,MAAM,mBAAmB,6BAA6B,CAAC;AAa9D,eAAO,MAAM,WAAW,OAAO,CAAC;AAChC,eAAO,MAAM,YAAY,OAAO,CAAC;AASjC,eAAO,MAAM,UAAU,OAAO,CAAC;AAO/B,eAAO,MAAM,eAAe,OAAO,CAAC"}
package/dist/index.js CHANGED
@@ -1,5 +1,15 @@
1
- export const LEGAL_VERSION = "2026-07-03";
1
+ export * from "./provider-logos.js";
2
+ export const WORKSPACE_ROOT = "/work";
3
+ export const HISTORY_ROOT = "/history";
4
+ export const STATE_DIR = ".intentic";
5
+ export const HOST_STATE_ROOT = "/opt/intentic";
6
+ export const LEGAL_VERSION = "2026-08-13";
2
7
  export const LEGAL_CONTACT_EMAIL = "contact@intentic.dev";
8
+ export const LEGAL_ENTITY_NAME = "Artur Kurowski, trading as radarsu";
9
+ export const LEGAL_ENTITY_COUNTRY = "Poland";
10
+ export const LEGAL_ENTITY_ADDRESS = "";
11
+ export const LEGAL_ENTITY_TAX_ID = "";
12
+ export const PLATFORM_HOSTING_LOCATION = "";
3
13
  export const PLATFORM_WEB_ORIGIN = "https://app.intentic.dev";
4
14
  export const DAEMON_PORT = 8787;
5
15
  export const PREVIEW_PORT = 5173;
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAMA,MAAM,CAAC,MAAM,aAAa,GAAG,YAAY,CAAC;AAC1C,MAAM,CAAC,MAAM,mBAAmB,GAAG,sBAAsB,CAAC;AAe1D,MAAM,CAAC,MAAM,mBAAmB,GAAG,0BAA0B,CAAC;AAa9D,MAAM,CAAC,MAAM,WAAW,GAAG,IAAI,CAAC;AAChC,MAAM,CAAC,MAAM,YAAY,GAAG,IAAI,CAAC;AASjC,MAAM,CAAC,MAAM,UAAU,GAAG,IAAI,CAAC;AAO/B,MAAM,CAAC,MAAM,eAAe,GAAG,IAAI,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAIA,cAAc,qBAAqB,CAAC;AAkBpC,MAAM,CAAC,MAAM,cAAc,GAAG,OAAO,CAAC;AAItC,MAAM,CAAC,MAAM,YAAY,GAAG,UAAU,CAAC;AAMvC,MAAM,CAAC,MAAM,SAAS,GAAG,WAAW,CAAC;AAIrC,MAAM,CAAC,MAAM,eAAe,GAAG,eAAe,CAAC;AAK/C,MAAM,CAAC,MAAM,aAAa,GAAG,YAAY,CAAC;AAC1C,MAAM,CAAC,MAAM,mBAAmB,GAAG,sBAAsB,CAAC;AAW1D,MAAM,CAAC,MAAM,iBAAiB,GAAG,oCAAoC,CAAC;AACtE,MAAM,CAAC,MAAM,oBAAoB,GAAG,QAAQ,CAAC;AAC7C,MAAM,CAAC,MAAM,oBAAoB,GAAG,EAAE,CAAC;AACvC,MAAM,CAAC,MAAM,mBAAmB,GAAG,EAAE,CAAC;AAUtC,MAAM,CAAC,MAAM,yBAAyB,GAAG,EAAE,CAAC;AAe5C,MAAM,CAAC,MAAM,mBAAmB,GAAG,0BAA0B,CAAC;AAa9D,MAAM,CAAC,MAAM,WAAW,GAAG,IAAI,CAAC;AAChC,MAAM,CAAC,MAAM,YAAY,GAAG,IAAI,CAAC;AASjC,MAAM,CAAC,MAAM,UAAU,GAAG,IAAI,CAAC;AAO/B,MAAM,CAAC,MAAM,eAAe,GAAG,IAAI,CAAC"}
@@ -0,0 +1,10 @@
1
+ export declare const PROVIDER_BRAND_PATHS: {
2
+ readonly claude: `m4.7144 15.9555 4.7174-2.6471.079-.2307-.079-.1275h-.2307l-.7893-.0486-2.6956-.0729-2.3375-.0971-2.2646-.1214-.5707-.1215-.5343-.7042.0546-.3522.4797-.3218.686.0608 1.5179.1032 2.2767.1578 1.6514.0972 2.4468.255h.3886l.0546-.1579-.1336-.0971-.1032-.0972L6.973 9.8356l-2.55-1.6879-1.3356-.9714-.7225-.4918-.3643-.4614-.1578-1.0078.6557-.7225.8803.0607.2246.0607.8925.686 1.9064 1.4754 2.4893 1.8336.3643.3035.1457-.1032.0182-.0728-.164-.2733-1.3539-2.4467-1.445-2.4893-.6435-1.032-.17-.6194c-.0607-.255-.1032-.4674-.1032-.7285L6.287.1335 6.6997 0l.9957.1336.419.3642.6192 1.4147 1.0018 2.2282 1.5543 3.0296.4553.8985.2429.8318.091.255h.1579v-.1457l.1275-1.706.2368-2.0947.2307-2.6957.0789-.7589.3764-.9107.7468-.4918.5828.2793.4797.686-.0668.4433-.2853 1.8517-.5586 2.9021-.3643 1.9429h.2125l.2429-.2429.9835-1.3053 1.6514-2.0643.7286-.8196.85-.9046.5464-.4311h1.0321l.759 1.1293-.34 1.1657-1.0625 1.3478-.8804 1.1414-1.2628 1.7-.7893 1.36.0729.1093.1882-.0183 2.8535-.607 1.5421-.2794 1.8396-.3157.8318.3886.091.3946-.3278.8075-1.967.4857-2.3072.4614-3.4364.8136-.0425.0304.0486.0607 1.5482.1457.6618.0364h1.621l3.0175.2247.7892.522.4736.6376-.079.4857-1.2142.6193-1.6393-.3886-3.825-.9107-1.3113-.3279h-.1822v.1093l1.0929 1.0686 2.0035 1.8092 2.5075 2.3314.1275.5768-.3218.4554-.34-.0486-2.2039-1.6575-.85-.7468-1.9246-1.621h-.1275v.17l.4432.6496 2.3436 3.5214.1214 1.0807-.17.3521-.6071.2125-.6679-.1214-1.3721-1.9246L14.38 17.959l-1.1414-1.9428-.1397.079-.674 7.2552-.3156.3703-.7286.2793-.6071-.4614-.3218-.7468.3218-1.4753.3886-1.9246.3157-1.53.2853-1.9004.17-.6314-.0121-.0425-.1397.0182-1.4328 1.9672-2.1796 2.9446-1.7243 1.8456-.4128.164-.7164-.3704.0667-.6618.4008-.5889 2.386-3.0357 1.4389-1.882.929-1.0868-.0062-.1579h-.0546l-6.3385 4.1164-1.1293.1457-.4857-.4554.0608-.7467.2307-.2429 1.9064-1.3114Z`;
3
+ readonly codex: `M22.2819 9.8211a5.9847 5.9847 0 0 0-.5157-4.9108 6.0462 6.0462 0 0 0-6.5098-2.9A6.0651 6.0651 0 0 0 4.9807 4.1818a5.9847 5.9847 0 0 0-3.9977 2.9 6.0462 6.0462 0 0 0 .7427 7.0966 5.98 5.98 0 0 0 .511 4.9107 6.051 6.051 0 0 0 6.5146 2.9001A5.9847 5.9847 0 0 0 13.2599 24a6.0557 6.0557 0 0 0 5.7718-4.2058 5.9894 5.9894 0 0 0 3.9977-2.9001 6.0557 6.0557 0 0 0-.7475-7.0729zm-9.022 12.6081a4.4755 4.4755 0 0 1-2.8764-1.0408l.1419-.0804 4.7783-2.7582a.7948.7948 0 0 0 .3927-.6813v-6.7369l2.02 1.1686a.071.071 0 0 1 .038.052v5.5826a4.504 4.504 0 0 1-4.4945 4.4944zm-9.6607-4.1254a4.4708 4.4708 0 0 1-.5346-3.0137l.142.0852 4.783 2.7582a.7712.7712 0 0 0 .7806 0l5.8428-3.3685v2.3324a.0804.0804 0 0 1-.0332.0615L9.74 19.9502a4.4992 4.4992 0 0 1-6.1408-1.6464zM2.3408 7.8956a4.485 4.485 0 0 1 2.3655-1.9728V11.6a.7664.7664 0 0 0 .3879.6765l5.8144 3.3543-2.0201 1.1685a.0757.0757 0 0 1-.071 0l-4.8303-2.7865A4.504 4.504 0 0 1 2.3408 7.872zm16.5963 3.8558L13.1038 8.364 15.1192 7.2a.0757.0757 0 0 1 .071 0l4.8303 2.7913a4.4944 4.4944 0 0 1-.6765 8.1042v-5.6772a.79.79 0 0 0-.407-.667zm2.0107-3.0231l-.142-.0852-4.7735-2.7818a.7759.7759 0 0 0-.7854 0L9.409 9.2297V6.8974a.0662.0662 0 0 1 .0284-.0615l4.8303-2.7866a4.4992 4.4992 0 0 1 6.6802 4.66zM8.3065 12.863l-2.02-1.1638a.0804.0804 0 0 1-.038-.0567V6.0742a4.4992 4.4992 0 0 1 7.3757-3.4537l-.142.0805L8.704 5.459a.7948.7948 0 0 0-.3927.6813zm1.0976-2.3654l2.602-1.4998 2.6069 1.4998v2.9994l-2.5974 1.4997-2.6067-1.4997Z`;
4
+ readonly grok: `M9.27 15.29l7.978-5.897c.391-.29.95-.177 1.137.272.98 2.369.542 5.215-1.41 7.169-1.951 1.954-4.667 2.382-7.149 1.406l-2.711 1.257c3.889 2.661 8.611 2.003 11.562-.953 2.341-2.344 3.066-5.539 2.388-8.42l.006.007c-.983-4.232.242-5.924 2.75-9.383.06-.082.12-.164.179-.248l-3.301 3.305v-.01L9.267 15.292M7.623 16.723c-2.792-2.67-2.31-6.801.071-9.184 1.761-1.763 4.647-2.483 7.166-1.425l2.705-1.25a7.808 7.808 0 00-1.829-1A8.975 8.975 0 005.984 5.83c-2.533 2.536-3.33 6.436-1.962 9.764 1.022 2.487-.653 4.246-2.34 6.022-.599.63-1.199 1.259-1.682 1.925l7.62-6.815`;
5
+ readonly kimi: `M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z`;
6
+ readonly gemini: `M11.04 19.32Q12 21.51 12 24q0-2.49.93-4.68.96-2.19 2.58-3.81t3.81-2.55Q21.51 12 24 12q-2.49 0-4.68-.93a12.3 12.3 0 0 1-3.81-2.58 12.3 12.3 0 0 1-2.58-3.81Q12 2.49 12 0q0 2.49-.96 4.68-.93 2.19-2.55 3.81a12.3 12.3 0 0 1-3.81 2.58Q2.49 12 0 12q2.49 0 4.68.96 2.19.93 3.81 2.55t2.55 3.81`;
7
+ };
8
+ export type ProviderBrand = keyof typeof PROVIDER_BRAND_PATHS;
9
+ export declare const providerFillRule: (brand: ProviderBrand) => "evenodd" | undefined;
10
+ //# sourceMappingURL=provider-logos.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"provider-logos.d.ts","sourceRoot":"","sources":["../src/provider-logos.ts"],"names":[],"mappings":"AAWA,eAAO,MAAM,oBAAoB;aAC7B,MAAM,EAAE,qxDAAqxD;aAC7xD,KAAK,EAAE,s7CAAs7C;aAC77C,IAAI,EAAE,8iBAA8iB;aAGpjB,IAAI,EAAE,iDAAiD;aACvD,MAAM,EAAE,8RAA8R;CAChS,CAAC;AAEX,MAAM,MAAM,aAAa,GAAG,MAAM,OAAO,oBAAoB,CAAC;AAG9D,eAAO,MAAM,gBAAgB,UAAW,aAAa,KAAG,SAAS,GAAG,SAAuD,CAAC"}
@@ -0,0 +1,9 @@
1
+ export const PROVIDER_BRAND_PATHS = {
2
+ claude: `m4.7144 15.9555 4.7174-2.6471.079-.2307-.079-.1275h-.2307l-.7893-.0486-2.6956-.0729-2.3375-.0971-2.2646-.1214-.5707-.1215-.5343-.7042.0546-.3522.4797-.3218.686.0608 1.5179.1032 2.2767.1578 1.6514.0972 2.4468.255h.3886l.0546-.1579-.1336-.0971-.1032-.0972L6.973 9.8356l-2.55-1.6879-1.3356-.9714-.7225-.4918-.3643-.4614-.1578-1.0078.6557-.7225.8803.0607.2246.0607.8925.686 1.9064 1.4754 2.4893 1.8336.3643.3035.1457-.1032.0182-.0728-.164-.2733-1.3539-2.4467-1.445-2.4893-.6435-1.032-.17-.6194c-.0607-.255-.1032-.4674-.1032-.7285L6.287.1335 6.6997 0l.9957.1336.419.3642.6192 1.4147 1.0018 2.2282 1.5543 3.0296.4553.8985.2429.8318.091.255h.1579v-.1457l.1275-1.706.2368-2.0947.2307-2.6957.0789-.7589.3764-.9107.7468-.4918.5828.2793.4797.686-.0668.4433-.2853 1.8517-.5586 2.9021-.3643 1.9429h.2125l.2429-.2429.9835-1.3053 1.6514-2.0643.7286-.8196.85-.9046.5464-.4311h1.0321l.759 1.1293-.34 1.1657-1.0625 1.3478-.8804 1.1414-1.2628 1.7-.7893 1.36.0729.1093.1882-.0183 2.8535-.607 1.5421-.2794 1.8396-.3157.8318.3886.091.3946-.3278.8075-1.967.4857-2.3072.4614-3.4364.8136-.0425.0304.0486.0607 1.5482.1457.6618.0364h1.621l3.0175.2247.7892.522.4736.6376-.079.4857-1.2142.6193-1.6393-.3886-3.825-.9107-1.3113-.3279h-.1822v.1093l1.0929 1.0686 2.0035 1.8092 2.5075 2.3314.1275.5768-.3218.4554-.34-.0486-2.2039-1.6575-.85-.7468-1.9246-1.621h-.1275v.17l.4432.6496 2.3436 3.5214.1214 1.0807-.17.3521-.6071.2125-.6679-.1214-1.3721-1.9246L14.38 17.959l-1.1414-1.9428-.1397.079-.674 7.2552-.3156.3703-.7286.2793-.6071-.4614-.3218-.7468.3218-1.4753.3886-1.9246.3157-1.53.2853-1.9004.17-.6314-.0121-.0425-.1397.0182-1.4328 1.9672-2.1796 2.9446-1.7243 1.8456-.4128.164-.7164-.3704.0667-.6618.4008-.5889 2.386-3.0357 1.4389-1.882.929-1.0868-.0062-.1579h-.0546l-6.3385 4.1164-1.1293.1457-.4857-.4554.0608-.7467.2307-.2429 1.9064-1.3114Z`,
3
+ codex: `M22.2819 9.8211a5.9847 5.9847 0 0 0-.5157-4.9108 6.0462 6.0462 0 0 0-6.5098-2.9A6.0651 6.0651 0 0 0 4.9807 4.1818a5.9847 5.9847 0 0 0-3.9977 2.9 6.0462 6.0462 0 0 0 .7427 7.0966 5.98 5.98 0 0 0 .511 4.9107 6.051 6.051 0 0 0 6.5146 2.9001A5.9847 5.9847 0 0 0 13.2599 24a6.0557 6.0557 0 0 0 5.7718-4.2058 5.9894 5.9894 0 0 0 3.9977-2.9001 6.0557 6.0557 0 0 0-.7475-7.0729zm-9.022 12.6081a4.4755 4.4755 0 0 1-2.8764-1.0408l.1419-.0804 4.7783-2.7582a.7948.7948 0 0 0 .3927-.6813v-6.7369l2.02 1.1686a.071.071 0 0 1 .038.052v5.5826a4.504 4.504 0 0 1-4.4945 4.4944zm-9.6607-4.1254a4.4708 4.4708 0 0 1-.5346-3.0137l.142.0852 4.783 2.7582a.7712.7712 0 0 0 .7806 0l5.8428-3.3685v2.3324a.0804.0804 0 0 1-.0332.0615L9.74 19.9502a4.4992 4.4992 0 0 1-6.1408-1.6464zM2.3408 7.8956a4.485 4.485 0 0 1 2.3655-1.9728V11.6a.7664.7664 0 0 0 .3879.6765l5.8144 3.3543-2.0201 1.1685a.0757.0757 0 0 1-.071 0l-4.8303-2.7865A4.504 4.504 0 0 1 2.3408 7.872zm16.5963 3.8558L13.1038 8.364 15.1192 7.2a.0757.0757 0 0 1 .071 0l4.8303 2.7913a4.4944 4.4944 0 0 1-.6765 8.1042v-5.6772a.79.79 0 0 0-.407-.667zm2.0107-3.0231l-.142-.0852-4.7735-2.7818a.7759.7759 0 0 0-.7854 0L9.409 9.2297V6.8974a.0662.0662 0 0 1 .0284-.0615l4.8303-2.7866a4.4992 4.4992 0 0 1 6.6802 4.66zM8.3065 12.863l-2.02-1.1638a.0804.0804 0 0 1-.038-.0567V6.0742a4.4992 4.4992 0 0 1 7.3757-3.4537l-.142.0805L8.704 5.459a.7948.7948 0 0 0-.3927.6813zm1.0976-2.3654l2.602-1.4998 2.6069 1.4998v2.9994l-2.5974 1.4997-2.6067-1.4997Z`,
4
+ grok: `M9.27 15.29l7.978-5.897c.391-.29.95-.177 1.137.272.98 2.369.542 5.215-1.41 7.169-1.951 1.954-4.667 2.382-7.149 1.406l-2.711 1.257c3.889 2.661 8.611 2.003 11.562-.953 2.341-2.344 3.066-5.539 2.388-8.42l.006.007c-.983-4.232.242-5.924 2.75-9.383.06-.082.12-.164.179-.248l-3.301 3.305v-.01L9.267 15.292M7.623 16.723c-2.792-2.67-2.31-6.801.071-9.184 1.761-1.763 4.647-2.483 7.166-1.425l2.705-1.25a7.808 7.808 0 00-1.829-1A8.975 8.975 0 005.984 5.83c-2.533 2.536-3.33 6.436-1.962 9.764 1.022 2.487-.653 4.246-2.34 6.022-.599.63-1.199 1.259-1.682 1.925l7.62-6.815`,
5
+ kimi: `M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z`,
6
+ gemini: `M11.04 19.32Q12 21.51 12 24q0-2.49.93-4.68.96-2.19 2.58-3.81t3.81-2.55Q21.51 12 24 12q-2.49 0-4.68-.93a12.3 12.3 0 0 1-3.81-2.58 12.3 12.3 0 0 1-2.58-3.81Q12 2.49 12 0q0 2.49-.96 4.68-.93 2.19-2.55 3.81a12.3 12.3 0 0 1-3.81 2.58Q2.49 12 0 12q2.49 0 4.68.96 2.19.93 3.81 2.55t2.55 3.81`,
7
+ };
8
+ export const providerFillRule = (brand) => (brand === `grok` ? `evenodd` : undefined);
9
+ //# sourceMappingURL=provider-logos.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"provider-logos.js","sourceRoot":"","sources":["../src/provider-logos.ts"],"names":[],"mappings":"AAWA,MAAM,CAAC,MAAM,oBAAoB,GAAG;IAChC,MAAM,EAAE,qxDAAqxD;IAC7xD,KAAK,EAAE,s7CAAs7C;IAC77C,IAAI,EAAE,8iBAA8iB;IAGpjB,IAAI,EAAE,iDAAiD;IACvD,MAAM,EAAE,8RAA8R;CAChS,CAAC;AAKX,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,KAAoB,EAAyB,EAAE,CAAC,CAAC,KAAK,KAAK,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,10 +1,19 @@
1
1
  {
2
2
  "name": "@intentic/constants",
3
- "version": "1.176.3",
3
+ "version": "1.209.1",
4
+ "description": "Shared constants for the intentic packages — ports, paths, and image references the daemon, CLIs and desktop app all agree on",
5
+ "license": "MIT",
4
6
  "type": "module",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "git+https://github.com/intentic/intentic.git",
10
+ "directory": "_tools/constants"
11
+ },
5
12
  "types": "./dist/index.d.ts",
6
13
  "files": [
7
- "dist"
14
+ "dist",
15
+ "src/node.mjs",
16
+ "src/node.d.mts"
8
17
  ],
9
18
  "exports": {
10
19
  ".": {
@@ -17,14 +26,24 @@
17
26
  "@intentic/src": "./src/index.ts",
18
27
  "default": "./dist/index.js"
19
28
  }
29
+ },
30
+ "./node": {
31
+ "types": "./src/node.d.mts",
32
+ "default": "./src/node.mjs"
20
33
  }
21
34
  },
22
35
  "devDependencies": {
36
+ "@types/node": "24.13.2",
23
37
  "@typescript/native-preview": "7.0.0-dev.20260707.2",
38
+ "vitest": "4.1.10",
39
+ "@intentic/testing": "0.0.0",
24
40
  "@intentic/tsconfig": "0.0.0"
25
41
  },
26
42
  "scripts": {
27
43
  "build": "tsgo",
28
- "watch": "tsgo --build --watch"
44
+ "typecheck": "tsgo --noEmit -p tsconfig.test.json",
45
+ "watch": "tsgo --build --watch",
46
+ "test": "vitest run",
47
+ "test:watch": "vitest"
29
48
  }
30
49
  }
package/src/node.d.mts ADDED
@@ -0,0 +1,14 @@
1
+ /** Where the caller is: `import.meta.url`, `import.meta.dirname`, or any path. */
2
+ type Origin = string;
3
+
4
+ /**
5
+ * The monorepo root, found by walking up from `from` until `pnpm-workspace.yaml` appears.
6
+ * Throws if it never does — a wrong root is worse than a loud one.
7
+ */
8
+ export declare const repoRoot: (from: Origin) => string;
9
+
10
+ /**
11
+ * The calling package's own root — the directory of the first `package.json` at or above `from`.
12
+ * Throws if there is none.
13
+ */
14
+ export declare const packageRoot: (from: Origin) => string;
package/src/node.mjs ADDED
@@ -0,0 +1,87 @@
1
+ import { existsSync, statSync } from "node:fs";
2
+ import { dirname, resolve } from "node:path";
3
+ import { fileURLToPath } from "node:url";
4
+
5
+ /* FINDING A ROOT BY LOOKING FOR IT, INSTEAD OF COUNTING THE WAY UP TO IT.
6
+ *
7
+ * Two dozen files used to work out where the monorepo root was by counting how deep they sat: `../..` from a
8
+ * package's own directory, `../../..` from its `src/`, `../../../..` from the installer scripts. Every one of
9
+ * those numbers is correct only for the file's CURRENT depth, and nothing anywhere checks it. Move the file
10
+ * one directory and it silently resolves somewhere else — no import fails, no type breaks; you find out when
11
+ * something reads the wrong .env at runtime, or reads nothing and falls back to a default.
12
+ *
13
+ * Walking up until a marker appears has none of that coupling. A file can sit at any depth, move between
14
+ * packages, or be symlinked in, and still get the same answer.
15
+ *
16
+ * WHY THIS FILE IS HAND-WRITTEN JAVASCRIPT rather than TypeScript compiled to dist, in a package where
17
+ * everything else is compiled: the earliest callers run BEFORE anything is built. `prepass.mjs` is the script
18
+ * that performs the build, and the byte check and the path guard both run ahead of it in `pnpm check`. A
19
+ * helper those three had to import from `dist/` would be a helper they could not import on a clean checkout,
20
+ * which is exactly how the second copy of this walk gets written. Plain .mjs with a hand-written .d.mts beside
21
+ * it is importable at every point in the build, so there only has to be one.
22
+ *
23
+ * A caller that runs before `pnpm install` has one more constraint: `@intentic/constants/node` is a BARE
24
+ * specifier and bare specifiers resolve through node_modules, which a bare checkout has none of. Those callers
25
+ * — `prepass.mjs`, run by the pre-push hook and by CI's preflight job — import THIS FILE by relative path
26
+ * instead. Still one walk; only the way in differs.
27
+ *
28
+ * NOT EXPORTED FROM THE PACKAGE INDEX, and that is deliberate: the index is imported by browser code
29
+ * (Setup.vue reads PLATFORM_WEB_ORIGIN) and must never pull in node:fs. Path VALUES live there; path DISCOVERY
30
+ * lives here, behind the `@intentic/constants/node` subpath. */
31
+
32
+ // The marker that identifies the monorepo root. pnpm-workspace.yaml rather than package.json or .git: a
33
+ // package.json sits in all 78 packages, and .git is absent in an agent worktree's checkout and present in
34
+ // unrelated parents. This file exists exactly once, at exactly the directory everyone means by "the root".
35
+ const REPO_MARKER = "pnpm-workspace.yaml";
36
+
37
+ /* Where the caller is, from whichever of the three things it has in hand. `import.meta.url` is a file:// URL
38
+ * and needs converting; `import.meta.dirname` and a bare path are already paths. Accepting all three is what
39
+ * stops a caller reaching for `fileURLToPath(new URL("...", import.meta.url))` out of habit and reintroducing
40
+ * a relative segment on the way in. */
41
+ const startDir = (from) => {
42
+ const path = from.startsWith("file:") ? fileURLToPath(from) : resolve(from);
43
+ /* A URL or path naming a FILE has to become its directory; one naming a directory is already there. Asked
44
+ * of the filesystem rather than guessed from the shape, because `.../src/lib` and `.../lib/version.js` are
45
+ * indistinguishable as strings.
46
+ *
47
+ * A path that does not exist is treated as a directory, and costs nothing when it isn't: the walk simply
48
+ * finds no marker at that level and moves to the parent, which is where a non-existent file's directory
49
+ * was all along. */
50
+ return statSync(path, { throwIfNoEntry: false })?.isDirectory() === false ? dirname(path) : path;
51
+ };
52
+
53
+ // Walk up from `dir` until `marker` is found beside us, or we run out of parents. Returns "" for not-found so
54
+ // each caller decides whether that is fatal — the installers treat it as "not run from a checkout" and carry
55
+ // on, while everything inside the repo treats it as impossible and throws.
56
+ const walkUp = (dir, marker) => {
57
+ let current = dir;
58
+ for (;;) {
59
+ if (existsSync(resolve(current, marker))) return current;
60
+ const parent = dirname(current);
61
+ if (parent === current) return "";
62
+ current = parent;
63
+ }
64
+ };
65
+
66
+ /* THE MONOREPO ROOT, from anywhere inside it. Pass `import.meta.url` — the caller's own location is the only
67
+ * thing this needs, and it is the one thing every module already knows about itself.
68
+ *
69
+ * Throws when the marker is nowhere above the caller, which inside this repo means the checkout is broken. The
70
+ * throw is the point: the counting version's failure mode was to return a WRONG directory confidently, and a
71
+ * wrong directory is how a config loader silently reads no .env and every credential arrives empty. */
72
+ export const repoRoot = (from) => {
73
+ const found = walkUp(startDir(from), REPO_MARKER);
74
+ if (found === "") throw new Error(`repoRoot: no ${REPO_MARKER} above ${startDir(from)} — is this a complete checkout?`);
75
+ return found;
76
+ };
77
+
78
+ /* THE CALLING PACKAGE'S OWN ROOT — the directory its package.json sits in. The other thing the dot-counting
79
+ * was reaching for: `createRequire(import.meta.url)("../../package.json")` in three different version.ts files,
80
+ * each with a different number of dots because each sat at a different depth, all of them meaning "mine".
81
+ *
82
+ * Stops at the FIRST package.json above the caller, so a package's own manifest always wins over the root's. */
83
+ export const packageRoot = (from) => {
84
+ const found = walkUp(startDir(from), "package.json");
85
+ if (found === "") throw new Error(`packageRoot: no package.json above ${startDir(from)}`);
86
+ return found;
87
+ };