@usecontextlayer/cli 0.14.1 → 0.14.3

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.
@@ -0,0 +1,11 @@
1
+ export function meta() {
2
+ return [{ title: "let's get cooking!" }]
3
+ }
4
+
5
+ export default function Home() {
6
+ return (
7
+ <main className="flex justify-center px-4 py-16">
8
+ <h1 className="text-2xl font-semibold">let&apos;s get cooking!</h1>
9
+ </main>
10
+ )
11
+ }
package/dist/vite.d.mts CHANGED
@@ -2,19 +2,23 @@
2
2
  export declare function getLocalToolsBindings(): Promise<{
3
3
  props: {
4
4
  appId: string;
5
+ connections: {
6
+ [k: string]: {
7
+ mode: "owner" | "viewer";
8
+ toolkit: string;
9
+ consumers: ({
10
+ type: "app";
11
+ } | {
12
+ name: string;
13
+ type: "agent";
14
+ })[];
15
+ connection_id: string | null;
16
+ };
17
+ };
5
18
  credential: {
6
19
  token: string;
7
20
  type: "access-token";
8
21
  };
9
- manifest: {
10
- connections: Record<string, {
11
- mode: "owner" | "viewer";
12
- toolkit: string;
13
- }>;
14
- secrets: Record<string, {
15
- mode: "owner" | "viewer";
16
- }>;
17
- };
18
22
  };
19
23
  vars: {
20
24
  CTX_PLATFORM_URL: string;
@@ -1 +1 @@
1
- {"version":3,"file":"vite.d.mts","names":[],"sources":["../vite.ts"],"mappings":";wBAIsB,yBAAqB;;IAGxC;IACA;MAAc;MAA+B;;IAC7C;;;;;;;;;;;IAEO"}
1
+ {"version":3,"file":"vite.d.mts","names":[],"sources":["../vite.ts"],"mappings":";wBAOsB,yBAAqB;;;;;;;;;;;;;;;;;MAO1B;MAA+B;;;;IAEtC"}
package/dist/vite.mjs CHANGED
@@ -1,14 +1,16 @@
1
- import { a as getAccessToken, l as env, n as readLocalManifest, t as getLocalAppId } from "./app-CJgT3IKd.mjs";
1
+ import { a as getLocalAppId, d as env, f as resourcesForConsumer, s as getAccessToken, t as prepareLocalResourceConfiguration } from "./resources-DEdwfmku.mjs";
2
2
  //#region vite.ts
3
3
  async function getLocalToolsBindings() {
4
+ const configuration = await prepareLocalResourceConfiguration();
5
+ const { connections } = resourcesForConsumer(configuration, { type: "app" });
4
6
  return {
5
7
  props: {
6
8
  appId: await getLocalAppId(),
9
+ connections,
7
10
  credential: {
8
11
  token: await getAccessToken(),
9
12
  type: "access-token"
10
- },
11
- manifest: await readLocalManifest()
13
+ }
12
14
  },
13
15
  vars: { CTX_PLATFORM_URL: env.CTX_PLATFORM_URL }
14
16
  };
package/dist/vite.mjs.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"vite.mjs","names":[],"sources":["../vite.ts"],"sourcesContent":["import { getLocalAppId, readLocalManifest } from \"@/app\"\nimport { getAccessToken } from \"@/auth\"\nimport { env } from \"@/env\"\n\nexport async function getLocalToolsBindings() {\n\treturn {\n\t\tprops: {\n\t\t\tappId: await getLocalAppId(),\n\t\t\tcredential: { token: await getAccessToken(), type: \"access-token\" as const },\n\t\t\tmanifest: await readLocalManifest(),\n\t\t},\n\t\tvars: { CTX_PLATFORM_URL: env.CTX_PLATFORM_URL },\n\t}\n}\n"],"mappings":";;AAIA,eAAsB,wBAAwB;CAC7C,OAAO;EACN,OAAO;GACN,OAAO,MAAM,cAAc;GAC3B,YAAY;IAAE,OAAO,MAAM,eAAe;IAAG,MAAM;GAAwB;GAC3E,UAAU,MAAM,kBAAkB;EACnC;EACA,MAAM,EAAE,kBAAkB,IAAI,iBAAiB;CAChD;AACD"}
1
+ {"version":3,"file":"vite.mjs","names":[],"sources":["../vite.ts"],"sourcesContent":["import { resourcesForConsumer } from \"@usecontextlayer/shared/slate\"\nimport type { LocalToolsProps } from \"@usecontextlayer/shared/tools-worker\"\nimport { getLocalAppId } from \"@/app\"\nimport { getAccessToken } from \"@/auth\"\nimport { env } from \"@/env\"\nimport { prepareLocalResourceConfiguration } from \"@/resources\"\n\nexport async function getLocalToolsBindings() {\n\tconst configuration = await prepareLocalResourceConfiguration()\n\tconst { connections } = resourcesForConsumer(configuration, { type: \"app\" })\n\treturn {\n\t\tprops: {\n\t\t\tappId: await getLocalAppId(),\n\t\t\tconnections,\n\t\t\tcredential: { token: await getAccessToken(), type: \"access-token\" as const },\n\t\t} satisfies LocalToolsProps,\n\t\tvars: { CTX_PLATFORM_URL: env.CTX_PLATFORM_URL },\n\t}\n}\n"],"mappings":";;AAOA,eAAsB,wBAAwB;CAC7C,MAAM,gBAAgB,MAAM,kCAAkC;CAC9D,MAAM,EAAE,gBAAgB,qBAAqB,eAAe,EAAE,MAAM,MAAM,CAAC;CAC3E,OAAO;EACN,OAAO;GACN,OAAO,MAAM,cAAc;GAC3B;GACA,YAAY;IAAE,OAAO,MAAM,eAAe;IAAG,MAAM;GAAwB;EAC5E;EACA,MAAM,EAAE,kBAAkB,IAAI,iBAAiB;CAChD;AACD"}
package/package.json CHANGED
@@ -14,7 +14,7 @@
14
14
  "tsdown": "latest",
15
15
  "typescript": "latest",
16
16
  "zod": "^4.4.3",
17
- "@usecontextlayer/shared": "0.14.1"
17
+ "@usecontextlayer/shared": "0.14.3"
18
18
  },
19
19
  "engines": {
20
20
  "node": ">=24.0.0"
@@ -30,10 +30,11 @@
30
30
  ],
31
31
  "name": "@usecontextlayer/cli",
32
32
  "type": "module",
33
- "version": "0.14.1",
33
+ "version": "0.14.3",
34
34
  "scripts": {
35
35
  "build": "tsdown",
36
36
  "dev:watch": "tsdown --watch",
37
+ "test": "vitest run --project @usecontextlayer/cli",
37
38
  "tsc": "tsc -b tsconfig.json"
38
39
  }
39
40
  }