@kortix/sdk 0.12.5 → 0.12.7
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 +29 -2
- package/dist/browser/stores/sync-store/stream-cache.d.ts +29 -0
- package/dist/browser/stores/sync-store/stream-cache.d.ts.map +1 -1
- package/dist/browser/stores/sync-store/stream-cache.js +127 -18
- package/dist/browser/stores/sync-store/stream-cache.js.map +1 -1
- package/dist/core/client/kortix.d.ts +57 -12
- package/dist/core/client/kortix.d.ts.map +1 -1
- package/dist/core/client/kortix.js +40 -1
- package/dist/core/client/kortix.js.map +1 -1
- package/dist/core/http/api/errors.d.ts +26 -0
- package/dist/core/http/api/errors.d.ts.map +1 -1
- package/dist/core/http/api/errors.js +44 -0
- package/dist/core/http/api/errors.js.map +1 -1
- package/dist/core/http/api-client.d.ts +37 -1
- package/dist/core/http/api-client.d.ts.map +1 -1
- package/dist/core/http/api-client.js +92 -17
- package/dist/core/http/api-client.js.map +1 -1
- package/dist/core/http/opencode-errors.d.ts.map +1 -1
- package/dist/core/http/opencode-errors.js +19 -0
- package/dist/core/http/opencode-errors.js.map +1 -1
- package/dist/core/rest/platform-client/host-boundary.d.ts +17 -0
- package/dist/core/rest/platform-client/host-boundary.d.ts.map +1 -1
- package/dist/core/rest/platform-client/host-boundary.js +21 -0
- package/dist/core/rest/platform-client/host-boundary.js.map +1 -1
- package/dist/core/rest/projects-client/apps.d.ts +216 -0
- package/dist/core/rest/projects-client/apps.d.ts.map +1 -0
- package/dist/core/rest/projects-client/apps.js +105 -0
- package/dist/core/rest/projects-client/apps.js.map +1 -0
- package/dist/core/rest/projects-client/audit.d.ts +39 -2
- package/dist/core/rest/projects-client/audit.d.ts.map +1 -1
- package/dist/core/rest/projects-client/audit.js +46 -2
- package/dist/core/rest/projects-client/audit.js.map +1 -1
- package/dist/core/rest/projects-client/connectors.d.ts +88 -3
- package/dist/core/rest/projects-client/connectors.d.ts.map +1 -1
- package/dist/core/rest/projects-client/connectors.js +43 -6
- package/dist/core/rest/projects-client/connectors.js.map +1 -1
- package/dist/core/rest/projects-client/iam.d.ts +3 -1
- package/dist/core/rest/projects-client/iam.d.ts.map +1 -1
- package/dist/core/rest/projects-client/iam.js +2 -0
- package/dist/core/rest/projects-client/iam.js.map +1 -1
- package/dist/core/rest/projects-client/index.d.ts +1 -0
- package/dist/core/rest/projects-client/index.d.ts.map +1 -1
- package/dist/core/rest/projects-client/index.js +1 -0
- package/dist/core/rest/projects-client/index.js.map +1 -1
- package/dist/core/rest/projects-client/projects.d.ts +136 -15
- package/dist/core/rest/projects-client/projects.d.ts.map +1 -1
- package/dist/core/rest/projects-client/projects.js +180 -5
- package/dist/core/rest/projects-client/projects.js.map +1 -1
- package/dist/core/rest/projects-client/sessions.d.ts +50 -5
- package/dist/core/rest/projects-client/sessions.d.ts.map +1 -1
- package/dist/core/rest/projects-client/sessions.js +91 -7
- package/dist/core/rest/projects-client/sessions.js.map +1 -1
- package/dist/core/turns/view-model.d.ts +15 -0
- package/dist/core/turns/view-model.d.ts.map +1 -1
- package/dist/core/turns/view-model.js +19 -2
- package/dist/core/turns/view-model.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/kortix.esm.min.js +43 -31
- package/dist/kortix.global.js +43 -31
- package/dist/react/index.d.ts +9 -0
- package/dist/react/index.d.ts.map +1 -1
- package/dist/react/index.js +14 -0
- package/dist/react/index.js.map +1 -1
- package/dist/react/invalidate-project.d.ts +76 -0
- package/dist/react/invalidate-project.d.ts.map +1 -0
- package/dist/react/invalidate-project.js +72 -0
- package/dist/react/invalidate-project.js.map +1 -0
- package/dist/react/provider-refresh.d.ts.map +1 -1
- package/dist/react/provider-refresh.js +12 -3
- package/dist/react/provider-refresh.js.map +1 -1
- package/dist/react/query-contracts.d.ts +112 -0
- package/dist/react/query-contracts.d.ts.map +1 -0
- package/dist/react/query-contracts.js +100 -0
- package/dist/react/query-contracts.js.map +1 -0
- package/dist/react/query-keys.d.ts +251 -0
- package/dist/react/query-keys.d.ts.map +1 -0
- package/dist/react/query-keys.js +249 -0
- package/dist/react/query-keys.js.map +1 -0
- package/dist/react/session-title-sync.d.ts.map +1 -1
- package/dist/react/session-title-sync.js +14 -4
- package/dist/react/session-title-sync.js.map +1 -1
- package/dist/react/use-admin-accounts.d.ts +85 -0
- package/dist/react/use-admin-accounts.d.ts.map +1 -1
- package/dist/react/use-admin-accounts.js +100 -0
- package/dist/react/use-admin-accounts.js.map +1 -1
- package/dist/react/use-admin-activity-analytics.d.ts +91 -0
- package/dist/react/use-admin-activity-analytics.d.ts.map +1 -0
- package/dist/react/use-admin-activity-analytics.js +83 -0
- package/dist/react/use-admin-activity-analytics.js.map +1 -0
- package/dist/react/use-admin-projects.d.ts +50 -0
- package/dist/react/use-admin-projects.d.ts.map +1 -0
- package/dist/react/use-admin-projects.js +28 -0
- package/dist/react/use-admin-projects.js.map +1 -0
- package/dist/react/use-canonical-opencode-session.d.ts.map +1 -1
- package/dist/react/use-canonical-opencode-session.js +12 -7
- package/dist/react/use-canonical-opencode-session.js.map +1 -1
- package/dist/react/use-feature-flag.d.ts +23 -0
- package/dist/react/use-feature-flag.d.ts.map +1 -0
- package/dist/react/use-feature-flag.js +32 -0
- package/dist/react/use-feature-flag.js.map +1 -0
- package/dist/react/use-gateway-catalog-sync.d.ts.map +1 -1
- package/dist/react/use-gateway-catalog-sync.js +5 -2
- package/dist/react/use-gateway-catalog-sync.js.map +1 -1
- package/dist/react/use-model-defaults.d.ts.map +1 -1
- package/dist/react/use-model-defaults.js +3 -1
- package/dist/react/use-model-defaults.js.map +1 -1
- package/dist/react/use-model-enablement.d.ts.map +1 -1
- package/dist/react/use-model-enablement.js +6 -2
- package/dist/react/use-model-enablement.js.map +1 -1
- package/dist/react/use-opencode-events/handle-event.d.ts +6 -0
- package/dist/react/use-opencode-events/handle-event.d.ts.map +1 -1
- package/dist/react/use-opencode-events/handle-event.js +11 -5
- package/dist/react/use-opencode-events/handle-event.js.map +1 -1
- package/dist/react/use-opencode-events/helpers.d.ts +44 -1
- package/dist/react/use-opencode-events/helpers.d.ts.map +1 -1
- package/dist/react/use-opencode-events/helpers.js +88 -6
- package/dist/react/use-opencode-events/helpers.js.map +1 -1
- package/dist/react/use-opencode-events/index.d.ts.map +1 -1
- package/dist/react/use-opencode-events/index.js +8 -0
- package/dist/react/use-opencode-events/index.js.map +1 -1
- package/dist/react/use-opencode-sessions/agents.d.ts.map +1 -1
- package/dist/react/use-opencode-sessions/agents.js +10 -1
- package/dist/react/use-opencode-sessions/agents.js.map +1 -1
- package/dist/react/use-opencode-sessions/providers.d.ts.map +1 -1
- package/dist/react/use-opencode-sessions/providers.js +9 -2
- package/dist/react/use-opencode-sessions/providers.js.map +1 -1
- package/dist/react/use-project-apps.d.ts +410 -0
- package/dist/react/use-project-apps.d.ts.map +1 -0
- package/dist/react/use-project-apps.js +98 -0
- package/dist/react/use-project-apps.js.map +1 -0
- package/dist/react/use-project-config.d.ts +7 -0
- package/dist/react/use-project-config.d.ts.map +1 -1
- package/dist/react/use-project-config.js +14 -4
- package/dist/react/use-project-config.js.map +1 -1
- package/dist/react/use-project-models.d.ts.map +1 -1
- package/dist/react/use-project-models.js +8 -2
- package/dist/react/use-project-models.js.map +1 -1
- package/dist/react/use-project-name.d.ts +23 -0
- package/dist/react/use-project-name.d.ts.map +1 -0
- package/dist/react/use-project-name.js +44 -0
- package/dist/react/use-project-name.js.map +1 -0
- package/dist/react/use-project-secrets.d.ts +5 -2
- package/dist/react/use-project-secrets.d.ts.map +1 -1
- package/dist/react/use-project-secrets.js +8 -2
- package/dist/react/use-project-secrets.js.map +1 -1
- package/dist/react/use-project-session.d.ts +40 -0
- package/dist/react/use-project-session.d.ts.map +1 -0
- package/dist/react/use-project-session.js +49 -0
- package/dist/react/use-project-session.js.map +1 -0
- package/dist/react/use-project-triggers.d.ts +4 -2
- package/dist/react/use-project-triggers.d.ts.map +1 -1
- package/dist/react/use-project-triggers.js +7 -2
- package/dist/react/use-project-triggers.js.map +1 -1
- package/dist/react/use-session-phase.d.ts +23 -0
- package/dist/react/use-session-phase.d.ts.map +1 -0
- package/dist/react/use-session-phase.js +23 -0
- package/dist/react/use-session-phase.js.map +1 -0
- package/dist/react/use-session.d.ts +117 -1
- package/dist/react/use-session.d.ts.map +1 -1
- package/dist/react/use-session.js +222 -21
- package/dist/react/use-session.js.map +1 -1
- package/package.json +2 -2
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { useQuery } from '@tanstack/react-query';
|
|
3
|
-
import { getProjectDetail } from '../core/rest/projects-client/index.js';
|
|
3
|
+
import { getProjectDetail, } from '../core/rest/projects-client/index.js';
|
|
4
|
+
import { contract } from './query-contracts.js';
|
|
5
|
+
import { qk } from './query-keys.js';
|
|
4
6
|
/**
|
|
5
7
|
* Server-side project config — the single source of truth for everything a user
|
|
6
8
|
* selects AROUND a session: agents, commands, skills, the default agent, and env
|
|
@@ -8,13 +10,21 @@ import { getProjectDetail } from '../core/rest/projects-client/index.js';
|
|
|
8
10
|
* before any sandbox runtime exists. This is the canonical home for the
|
|
9
11
|
* "capabilities, not runtime state" split — `useVisibleAgents({ projectId })`
|
|
10
12
|
* and `useProjectModels(projectId)` are the per-surface siblings.
|
|
13
|
+
*
|
|
14
|
+
* Reads `qk.project.detail(id)` via a `select` projection — the SAME entry
|
|
15
|
+
* every other project-detail reader shares (Customize, the capability pages,
|
|
16
|
+
* the project shell) — rather than its own key. It used to key on the
|
|
17
|
+
* standalone `['project-config', id]`, so every one of THOSE readers issued
|
|
18
|
+
* its own `getProjectDetail` fetch even though the response was
|
|
19
|
+
* byte-identical to the one already cached under `qk.project.detail(id)`.
|
|
11
20
|
*/
|
|
12
21
|
export function useProjectConfig(projectId) {
|
|
13
22
|
const { data } = useQuery({
|
|
14
|
-
queryKey:
|
|
15
|
-
queryFn:
|
|
23
|
+
queryKey: qk.project.detail(projectId ?? ''),
|
|
24
|
+
queryFn: () => getProjectDetail(projectId),
|
|
25
|
+
select: (detail) => detail.config,
|
|
16
26
|
enabled: !!projectId,
|
|
17
|
-
|
|
27
|
+
...contract('config'),
|
|
18
28
|
retry: false,
|
|
19
29
|
});
|
|
20
30
|
return data;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-project-config.js","sourceRoot":"","sources":["../../src/react/use-project-config.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,
|
|
1
|
+
{"version":3,"file":"use-project-config.js","sourceRoot":"","sources":["../../src/react/use-project-config.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,EAGL,gBAAgB,GACjB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CAAC;AAElC;;;;;;;;;;;;;;GAcG;AACH,MAAM,UAAU,gBAAgB,CAC9B,SAAoC;IAEpC,MAAM,EAAE,IAAI,EAAE,GAAG,QAAQ,CAAC;QACxB,QAAQ,EAAE,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC,SAAS,IAAI,EAAE,CAAC;QAC5C,OAAO,EAAE,GAAG,EAAE,CAAC,gBAAgB,CAAC,SAAmB,CAAC;QACpD,MAAM,EAAE,CAAC,MAAqB,EAAE,EAAE,CAAC,MAAM,CAAC,MAAM;QAChD,OAAO,EAAE,CAAC,CAAC,SAAS;QACpB,GAAG,QAAQ,CAAC,QAAQ,CAAC;QACrB,KAAK,EAAE,KAAK;KACb,CAAC,CAAC;IACH,OAAO,IAAI,CAAC;AACd,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-project-models.d.ts","sourceRoot":"","sources":["../../src/react/use-project-models.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,SAAS,EAAiB,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"use-project-models.d.ts","sourceRoot":"","sources":["../../src/react/use-project-models.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,SAAS,EAAiB,MAAM,iBAAiB,CAAC;AAKhE;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,SAAS,EAAE,CAalF"}
|
|
@@ -4,6 +4,8 @@ import { useMemo } from 'react';
|
|
|
4
4
|
import { getProjectModelPicker } from '../core/rest/projects-client/index.js';
|
|
5
5
|
import { flattenModels } from './model-flatten.js';
|
|
6
6
|
import { projectLlmCatalogToProviderList } from './provider-selection.js';
|
|
7
|
+
import { contract } from './query-contracts.js';
|
|
8
|
+
import { qk } from './query-keys.js';
|
|
7
9
|
/**
|
|
8
10
|
* Server-side model list for a project — the model parallel to
|
|
9
11
|
* `useVisibleAgents({ projectId })`. Reads the compact, connection-aware picker
|
|
@@ -13,10 +15,14 @@ import { projectLlmCatalogToProviderList } from './provider-selection.js';
|
|
|
13
15
|
*/
|
|
14
16
|
export function useProjectModels(projectId) {
|
|
15
17
|
const { data } = useQuery({
|
|
16
|
-
|
|
18
|
+
// Shared with `useModelEnablement` (same fetcher) and the routing-policy
|
|
19
|
+
// save's invalidation (`gateway-routing.tsx`) — all three must key on the
|
|
20
|
+
// same `qk.project.modelPicker(id)` entry, or a toggle/save silently
|
|
21
|
+
// fails to reach this reader (see that member's doc comment).
|
|
22
|
+
queryKey: qk.project.modelPicker(projectId ?? ''),
|
|
17
23
|
queryFn: () => getProjectModelPicker(projectId),
|
|
18
24
|
enabled: !!projectId,
|
|
19
|
-
|
|
25
|
+
...contract('config'),
|
|
20
26
|
retry: false,
|
|
21
27
|
});
|
|
22
28
|
return useMemo(() => (data ? flattenModels(projectLlmCatalogToProviderList(data)) : []), [data]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-project-models.js","sourceRoot":"","sources":["../../src/react/use-project-models.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAChC,OAAO,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AACrE,OAAO,EAAkB,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChE,OAAO,EAAE,+BAA+B,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"use-project-models.js","sourceRoot":"","sources":["../../src/react/use-project-models.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAChC,OAAO,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AACrE,OAAO,EAAkB,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChE,OAAO,EAAE,+BAA+B,EAAE,MAAM,sBAAsB,CAAC;AACvE,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CAAC;AAElC;;;;;;GAMG;AACH,MAAM,UAAU,gBAAgB,CAAC,SAAoC;IACnE,MAAM,EAAE,IAAI,EAAE,GAAG,QAAQ,CAAC;QACxB,yEAAyE;QACzE,0EAA0E;QAC1E,qEAAqE;QACrE,8DAA8D;QAC9D,QAAQ,EAAE,EAAE,CAAC,OAAO,CAAC,WAAW,CAAC,SAAS,IAAI,EAAE,CAAC;QACjD,OAAO,EAAE,GAAG,EAAE,CAAC,qBAAqB,CAAC,SAAmB,CAAC;QACzD,OAAO,EAAE,CAAC,CAAC,SAAS;QACpB,GAAG,QAAQ,CAAC,QAAQ,CAAC;QACrB,KAAK,EAAE,KAAK;KACb,CAAC,CAAC;IACH,OAAO,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,aAAa,CAAC,+BAA+B,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC;AACnG,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The ONLY way to read a project's name.
|
|
3
|
+
*
|
|
4
|
+
* The two-titles bug was not an invalidation gap, it was two sources for one
|
|
5
|
+
* fact: `project-switcher.tsx` read `activeProject?.name` off the projects
|
|
6
|
+
* LIST and fell back to the detail, while `project-home.tsx` read the detail
|
|
7
|
+
* alone. Any divergence between the two caches rendered as two different names
|
|
8
|
+
* on one screen.
|
|
9
|
+
*
|
|
10
|
+
* One accessor makes that structurally impossible rather than merely currently
|
|
11
|
+
* invalidated. Do not reintroduce a `??` fallback to another source here.
|
|
12
|
+
*/
|
|
13
|
+
export declare function useProjectName(projectId: string | undefined): string | undefined;
|
|
14
|
+
/**
|
|
15
|
+
* The owning account id, read off the SAME `qk.project.detail(id)` entry
|
|
16
|
+
* `useProjectName` reads — every capability surface already mounts that
|
|
17
|
+
* observer, so this shares the cache instead of adding a fetch. Previously
|
|
18
|
+
* lived in `apps/web`'s `project-detail-query.ts` as a host-local hook; moved
|
|
19
|
+
* here because `qk.project.detail` + `contract('config')` is SDK-owned
|
|
20
|
+
* wiring, not something a host should hand-roll a second time.
|
|
21
|
+
*/
|
|
22
|
+
export declare function useProjectAccountId(projectId: string | undefined): string | undefined;
|
|
23
|
+
//# sourceMappingURL=use-project-name.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-project-name.d.ts","sourceRoot":"","sources":["../../src/react/use-project-name.ts"],"names":[],"mappings":"AAOA;;;;;;;;;;;GAWG;AACH,wBAAgB,cAAc,CAAC,SAAS,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAQhF;AAED;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CAAC,SAAS,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAQrF"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { useQuery } from '@tanstack/react-query';
|
|
3
|
+
import { getProjectDetail } from '../core/rest/projects-client/index.js';
|
|
4
|
+
import { qk } from './query-keys.js';
|
|
5
|
+
import { contract } from './query-contracts.js';
|
|
6
|
+
/**
|
|
7
|
+
* The ONLY way to read a project's name.
|
|
8
|
+
*
|
|
9
|
+
* The two-titles bug was not an invalidation gap, it was two sources for one
|
|
10
|
+
* fact: `project-switcher.tsx` read `activeProject?.name` off the projects
|
|
11
|
+
* LIST and fell back to the detail, while `project-home.tsx` read the detail
|
|
12
|
+
* alone. Any divergence between the two caches rendered as two different names
|
|
13
|
+
* on one screen.
|
|
14
|
+
*
|
|
15
|
+
* One accessor makes that structurally impossible rather than merely currently
|
|
16
|
+
* invalidated. Do not reintroduce a `??` fallback to another source here.
|
|
17
|
+
*/
|
|
18
|
+
export function useProjectName(projectId) {
|
|
19
|
+
const { data } = useQuery({
|
|
20
|
+
queryKey: qk.project.detail(projectId ?? ''),
|
|
21
|
+
queryFn: () => getProjectDetail(projectId),
|
|
22
|
+
enabled: Boolean(projectId),
|
|
23
|
+
...contract('config'),
|
|
24
|
+
});
|
|
25
|
+
return data?.project?.name;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* The owning account id, read off the SAME `qk.project.detail(id)` entry
|
|
29
|
+
* `useProjectName` reads — every capability surface already mounts that
|
|
30
|
+
* observer, so this shares the cache instead of adding a fetch. Previously
|
|
31
|
+
* lived in `apps/web`'s `project-detail-query.ts` as a host-local hook; moved
|
|
32
|
+
* here because `qk.project.detail` + `contract('config')` is SDK-owned
|
|
33
|
+
* wiring, not something a host should hand-roll a second time.
|
|
34
|
+
*/
|
|
35
|
+
export function useProjectAccountId(projectId) {
|
|
36
|
+
const { data } = useQuery({
|
|
37
|
+
queryKey: qk.project.detail(projectId ?? ''),
|
|
38
|
+
queryFn: () => getProjectDetail(projectId),
|
|
39
|
+
enabled: Boolean(projectId),
|
|
40
|
+
...contract('config'),
|
|
41
|
+
});
|
|
42
|
+
return data?.project?.account_id;
|
|
43
|
+
}
|
|
44
|
+
//# sourceMappingURL=use-project-name.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-project-name.js","sourceRoot":"","sources":["../../src/react/use-project-name.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAChE,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CAAC;AAClC,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAE7C;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,cAAc,CAAC,SAA6B;IAC1D,MAAM,EAAE,IAAI,EAAE,GAAG,QAAQ,CAAC;QACxB,QAAQ,EAAE,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC,SAAS,IAAI,EAAE,CAAC;QAC5C,OAAO,EAAE,GAAG,EAAE,CAAC,gBAAgB,CAAC,SAAmB,CAAC;QACpD,OAAO,EAAE,OAAO,CAAC,SAAS,CAAC;QAC3B,GAAG,QAAQ,CAAC,QAAQ,CAAC;KACtB,CAAC,CAAC;IACH,OAAO,IAAI,EAAE,OAAO,EAAE,IAAI,CAAC;AAC7B,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,mBAAmB,CAAC,SAA6B;IAC/D,MAAM,EAAE,IAAI,EAAE,GAAG,QAAQ,CAAC;QACxB,QAAQ,EAAE,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC,SAAS,IAAI,EAAE,CAAC;QAC5C,OAAO,EAAE,GAAG,EAAE,CAAC,gBAAgB,CAAC,SAAmB,CAAC;QACpD,OAAO,EAAE,OAAO,CAAC,SAAS,CAAC;QAC3B,GAAG,QAAQ,CAAC,QAAQ,CAAC;KACtB,CAAC,CAAC;IACH,OAAO,IAAI,EAAE,OAAO,EAAE,UAAU,CAAC;AACnC,CAAC"}
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import { setPersonalProjectSecret, type ProjectSecretsResponse } from '../core/rest/projects-client/index.js';
|
|
2
2
|
/** Stable query-key factory — reuse this to read/invalidate the same cache
|
|
3
3
|
* entry `useProjectSecrets` populates (e.g. from a settings page shell that
|
|
4
|
-
* doesn't itself call the hook).
|
|
5
|
-
|
|
4
|
+
* doesn't itself call the hook). Delegates to `qk.project.secrets` — the
|
|
5
|
+
* SAME entry every other `listProjectSecrets` reader in `apps/web` shares
|
|
6
|
+
* (Customize secrets view, agents view, connected-providers, the LLM
|
|
7
|
+
* provider connect forms). */
|
|
8
|
+
export declare const projectSecretsKey: (projectId: string | null | undefined) => readonly ["kx", "project", string, "secrets"];
|
|
6
9
|
/**
|
|
7
10
|
* Project secrets — list + the mutations a settings screen needs (shared
|
|
8
11
|
* upsert/remove, personal-override set/remove). Thin React Query binding
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-project-secrets.d.ts","sourceRoot":"","sources":["../../src/react/use-project-secrets.ts"],"names":[],"mappings":"AAGA,OAAO,EAIL,wBAAwB,EAExB,KAAK,sBAAsB,EAC5B,MAAM,8BAA8B,CAAC;
|
|
1
|
+
{"version":3,"file":"use-project-secrets.d.ts","sourceRoot":"","sources":["../../src/react/use-project-secrets.ts"],"names":[],"mappings":"AAGA,OAAO,EAIL,wBAAwB,EAExB,KAAK,sBAAsB,EAC5B,MAAM,8BAA8B,CAAC;AAItC;;;;;+BAK+B;AAC/B,eAAO,MAAM,iBAAiB,GAAI,WAAW,MAAM,GAAG,IAAI,GAAG,SAAS,kDACjC,CAAC;AAEtC;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS;;;;;;;;;;;;;;cAyBvC,MAAM;eAAS,UAAU,CAAC,OAAO,wBAAwB,CAAC,CAAC,CAAC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAA7D,MAAM;eAAS,UAAU,CAAC,OAAO,wBAAwB,CAAC,CAAC,CAAC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAA7D,MAAM;eAAS,UAAU,CAAC,OAAO,wBAAwB,CAAC,CAAC,CAAC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAA7D,MAAM;eAAS,UAAU,CAAC,OAAO,wBAAwB,CAAC,CAAC,CAAC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAA7D,MAAM;eAAS,UAAU,CAAC,OAAO,wBAAwB,CAAC,CAAC,CAAC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAA7D,MAAM;eAAS,UAAU,CAAC,OAAO,wBAAwB,CAAC,CAAC,CAAC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAW3F"}
|
|
@@ -1,10 +1,15 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { useMutation, useQuery, useQueryClient } from '@tanstack/react-query';
|
|
3
3
|
import { deletePersonalProjectSecret, deleteProjectSecret, listProjectSecrets, setPersonalProjectSecret, upsertProjectSecret, } from '../core/rest/projects-client/index.js';
|
|
4
|
+
import { contract } from './query-contracts.js';
|
|
5
|
+
import { qk } from './query-keys.js';
|
|
4
6
|
/** Stable query-key factory — reuse this to read/invalidate the same cache
|
|
5
7
|
* entry `useProjectSecrets` populates (e.g. from a settings page shell that
|
|
6
|
-
* doesn't itself call the hook).
|
|
7
|
-
|
|
8
|
+
* doesn't itself call the hook). Delegates to `qk.project.secrets` — the
|
|
9
|
+
* SAME entry every other `listProjectSecrets` reader in `apps/web` shares
|
|
10
|
+
* (Customize secrets view, agents view, connected-providers, the LLM
|
|
11
|
+
* provider connect forms). */
|
|
12
|
+
export const projectSecretsKey = (projectId) => qk.project.secrets(projectId ?? '');
|
|
8
13
|
/**
|
|
9
14
|
* Project secrets — list + the mutations a settings screen needs (shared
|
|
10
15
|
* upsert/remove, personal-override set/remove). Thin React Query binding
|
|
@@ -18,6 +23,7 @@ export function useProjectSecrets(projectId) {
|
|
|
18
23
|
queryKey,
|
|
19
24
|
queryFn: () => listProjectSecrets(projectId),
|
|
20
25
|
enabled: !!projectId,
|
|
26
|
+
...contract('config'),
|
|
21
27
|
});
|
|
22
28
|
const invalidate = () => queryClient.invalidateQueries({ queryKey });
|
|
23
29
|
const upsert = useMutation({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-project-secrets.js","sourceRoot":"","sources":["../../src/react/use-project-secrets.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAC9E,OAAO,EACL,2BAA2B,EAC3B,mBAAmB,EACnB,kBAAkB,EAClB,wBAAwB,EACxB,mBAAmB,GAEpB,MAAM,8BAA8B,CAAC;
|
|
1
|
+
{"version":3,"file":"use-project-secrets.js","sourceRoot":"","sources":["../../src/react/use-project-secrets.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAC9E,OAAO,EACL,2BAA2B,EAC3B,mBAAmB,EACnB,kBAAkB,EAClB,wBAAwB,EACxB,mBAAmB,GAEpB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,EAAE,EAA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EAAE,CAAC,IAAY,EAAE,EAAE,CAAC,2BAA2B,CAAC,SAAmB,EAAE,IAAI,CAAC;QACpF,SAAS,EAAE,UAAU;KACtB,CAAC,CAAC;IAEH,OAAO,EAAE,GAAG,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,cAAc,EAAE,CAAC;AACnE,CAAC"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { type ProjectSession } from '../core/rest/projects-client/index.js';
|
|
2
|
+
/**
|
|
3
|
+
* The ONLY way to read one Kortix session row.
|
|
4
|
+
*
|
|
5
|
+
* `qk.project.session(projectId, sessionId)` had three independent readers,
|
|
6
|
+
* and the migration that unified their KEY left their CONTRACTS apart — the
|
|
7
|
+
* narrower half of the same bug:
|
|
8
|
+
*
|
|
9
|
+
* use-canonical-opencode-session.ts staleTime: 10_000, showErrors: false
|
|
10
|
+
* session-files-panel.tsx contract('inventory'), default errors
|
|
11
|
+
* session-changes-shared.tsx contract('inventory'), default errors
|
|
12
|
+
*
|
|
13
|
+
* Both halves were mount-order dependent. `staleTime` is per-OBSERVER, so how
|
|
14
|
+
* long the row stayed fresh depended on which surface happened to be mounted.
|
|
15
|
+
* Worse, `queryFn` is per-ENTRY — TanStack keeps exactly one per cached query
|
|
16
|
+
* and the first observer to mount installs it — so whether a failed read
|
|
17
|
+
* raised a toast depended on whether the session page or the Changes panel
|
|
18
|
+
* got there first.
|
|
19
|
+
*
|
|
20
|
+
* `showErrors: false` wins for every reader, deliberately. Each one's failure
|
|
21
|
+
* path is already a silent, correct fallback that the UI never surfaces:
|
|
22
|
+
* `resolveSessionPin` treats a missing pin as "still resolving" and the two
|
|
23
|
+
* panels fall back to `base_ref = 'main'`. Nothing renders an error state or
|
|
24
|
+
* offers a retry, so a toast is noise the user cannot act on. It is also
|
|
25
|
+
* exactly the wrong moment for one — the session page issues this read during
|
|
26
|
+
* boot and in the idle-stopped window, where a transient miss is expected and
|
|
27
|
+
* self-heals. And `showErrors` is a client-side PRESENTATION flag: it does not
|
|
28
|
+
* change the request or the response, so it cannot justify separate keys the
|
|
29
|
+
* way `scope` does for `qk.project.sessions` (see `query-keys.ts`). One
|
|
30
|
+
* entity, one entry, one fetcher.
|
|
31
|
+
*
|
|
32
|
+
* `enabled` stays per-call-site on purpose. It decides whether THIS surface
|
|
33
|
+
* subscribes, not what the shared entry holds, so surfaces are free to
|
|
34
|
+
* disagree — the session page skips the read entirely when `POST /start`
|
|
35
|
+
* already handed it the pin.
|
|
36
|
+
*/
|
|
37
|
+
export declare function useProjectSession(projectId: string | undefined, sessionId: string | undefined, options?: {
|
|
38
|
+
enabled?: boolean;
|
|
39
|
+
}): import("@tanstack/react-query").UseQueryResult<NoInfer<ProjectSession>, Error>;
|
|
40
|
+
//# sourceMappingURL=use-project-session.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-project-session.d.ts","sourceRoot":"","sources":["../../src/react/use-project-session.ts"],"names":[],"mappings":"AAIA,OAAO,EAAqB,KAAK,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAKtF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,wBAAgB,iBAAiB,CAC/B,SAAS,EAAE,MAAM,GAAG,SAAS,EAC7B,SAAS,EAAE,MAAM,GAAG,SAAS,EAC7B,OAAO,CAAC,EAAE;IAAE,OAAO,CAAC,EAAE,OAAO,CAAA;CAAE,kFAShC"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { useQuery } from '@tanstack/react-query';
|
|
3
|
+
import { getProjectSession } from '../core/rest/projects-client/index.js';
|
|
4
|
+
import { contract } from './query-contracts.js';
|
|
5
|
+
import { qk } from './query-keys.js';
|
|
6
|
+
/**
|
|
7
|
+
* The ONLY way to read one Kortix session row.
|
|
8
|
+
*
|
|
9
|
+
* `qk.project.session(projectId, sessionId)` had three independent readers,
|
|
10
|
+
* and the migration that unified their KEY left their CONTRACTS apart — the
|
|
11
|
+
* narrower half of the same bug:
|
|
12
|
+
*
|
|
13
|
+
* use-canonical-opencode-session.ts staleTime: 10_000, showErrors: false
|
|
14
|
+
* session-files-panel.tsx contract('inventory'), default errors
|
|
15
|
+
* session-changes-shared.tsx contract('inventory'), default errors
|
|
16
|
+
*
|
|
17
|
+
* Both halves were mount-order dependent. `staleTime` is per-OBSERVER, so how
|
|
18
|
+
* long the row stayed fresh depended on which surface happened to be mounted.
|
|
19
|
+
* Worse, `queryFn` is per-ENTRY — TanStack keeps exactly one per cached query
|
|
20
|
+
* and the first observer to mount installs it — so whether a failed read
|
|
21
|
+
* raised a toast depended on whether the session page or the Changes panel
|
|
22
|
+
* got there first.
|
|
23
|
+
*
|
|
24
|
+
* `showErrors: false` wins for every reader, deliberately. Each one's failure
|
|
25
|
+
* path is already a silent, correct fallback that the UI never surfaces:
|
|
26
|
+
* `resolveSessionPin` treats a missing pin as "still resolving" and the two
|
|
27
|
+
* panels fall back to `base_ref = 'main'`. Nothing renders an error state or
|
|
28
|
+
* offers a retry, so a toast is noise the user cannot act on. It is also
|
|
29
|
+
* exactly the wrong moment for one — the session page issues this read during
|
|
30
|
+
* boot and in the idle-stopped window, where a transient miss is expected and
|
|
31
|
+
* self-heals. And `showErrors` is a client-side PRESENTATION flag: it does not
|
|
32
|
+
* change the request or the response, so it cannot justify separate keys the
|
|
33
|
+
* way `scope` does for `qk.project.sessions` (see `query-keys.ts`). One
|
|
34
|
+
* entity, one entry, one fetcher.
|
|
35
|
+
*
|
|
36
|
+
* `enabled` stays per-call-site on purpose. It decides whether THIS surface
|
|
37
|
+
* subscribes, not what the shared entry holds, so surfaces are free to
|
|
38
|
+
* disagree — the session page skips the read entirely when `POST /start`
|
|
39
|
+
* already handed it the pin.
|
|
40
|
+
*/
|
|
41
|
+
export function useProjectSession(projectId, sessionId, options) {
|
|
42
|
+
return useQuery({
|
|
43
|
+
queryKey: qk.project.session(projectId ?? '', sessionId ?? ''),
|
|
44
|
+
queryFn: () => getProjectSession(projectId, sessionId, { showErrors: false }),
|
|
45
|
+
enabled: Boolean(projectId) && Boolean(sessionId) && (options?.enabled ?? true),
|
|
46
|
+
...contract('inventory'),
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
//# sourceMappingURL=use-project-session.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-project-session.js","sourceRoot":"","sources":["../../src/react/use-project-session.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAEjD,OAAO,EAAE,iBAAiB,EAAuB,MAAM,8BAA8B,CAAC;AAEtF,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CAAC;AAElC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,MAAM,UAAU,iBAAiB,CAC/B,SAA6B,EAC7B,SAA6B,EAC7B,OAA+B;IAE/B,OAAO,QAAQ,CAAiB;QAC9B,QAAQ,EAAE,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC,SAAS,IAAI,EAAE,EAAE,SAAS,IAAI,EAAE,CAAC;QAC9D,OAAO,EAAE,GAAG,EAAE,CACZ,iBAAiB,CAAC,SAAmB,EAAE,SAAmB,EAAE,EAAE,UAAU,EAAE,KAAK,EAAE,CAAC;QACpF,OAAO,EAAE,OAAO,CAAC,SAAS,CAAC,IAAI,OAAO,CAAC,SAAS,CAAC,IAAI,CAAC,OAAO,EAAE,OAAO,IAAI,IAAI,CAAC;QAC/E,GAAG,QAAQ,CAAC,WAAW,CAAC;KACzB,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { updateProjectTrigger, type ProjectTriggerListing } from '../core/rest/projects-client/index.js';
|
|
2
2
|
/** Stable query-key factory — reuse to read/invalidate the same cache entry
|
|
3
|
-
* `useProjectTriggers` populates.
|
|
4
|
-
|
|
3
|
+
* `useProjectTriggers` populates. Delegates to `qk.project.triggers` — the
|
|
4
|
+
* SAME entry the Customize settings pause switch and the schedule/triggers
|
|
5
|
+
* view build directly via `qk.project.triggers(id)` too. */
|
|
6
|
+
export declare const projectTriggersKey: (projectId: string | null | undefined) => readonly ["kx", "project", string, "triggers"];
|
|
5
7
|
/**
|
|
6
8
|
* Project triggers (cron/webhook, file-defined in the repo manifest) — list +
|
|
7
9
|
* create/update/remove/fire. Thin React Query binding over
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-project-triggers.d.ts","sourceRoot":"","sources":["../../src/react/use-project-triggers.ts"],"names":[],"mappings":"AAGA,OAAO,EAKL,oBAAoB,EACpB,KAAK,qBAAqB,EAC3B,MAAM,8BAA8B,CAAC;
|
|
1
|
+
{"version":3,"file":"use-project-triggers.d.ts","sourceRoot":"","sources":["../../src/react/use-project-triggers.ts"],"names":[],"mappings":"AAGA,OAAO,EAKL,oBAAoB,EACpB,KAAK,qBAAqB,EAC3B,MAAM,8BAA8B,CAAC;AAItC;;;6DAG6D;AAC7D,eAAO,MAAM,kBAAkB,GAAI,WAAW,MAAM,GAAG,IAAI,GAAG,SAAS,mDACjC,CAAC;AAEvC;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS;;;cAoBxC,MAAM;eAAS,UAAU,CAAC,OAAO,oBAAoB,CAAC,CAAC,CAAC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAAzD,MAAM;eAAS,UAAU,CAAC,OAAO,oBAAoB,CAAC,CAAC,CAAC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAAzD,MAAM;eAAS,UAAU,CAAC,OAAO,oBAAoB,CAAC,CAAC,CAAC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAAzD,MAAM;eAAS,UAAU,CAAC,OAAO,oBAAoB,CAAC,CAAC,CAAC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAAzD,MAAM;eAAS,UAAU,CAAC,OAAO,oBAAoB,CAAC,CAAC,CAAC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAAzD,MAAM;eAAS,UAAU,CAAC,OAAO,oBAAoB,CAAC,CAAC,CAAC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAkBvF"}
|
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { useMutation, useQuery, useQueryClient } from '@tanstack/react-query';
|
|
3
3
|
import { createProjectTrigger, deleteProjectTrigger, fireProjectTrigger, listProjectTriggers, updateProjectTrigger, } from '../core/rest/projects-client/index.js';
|
|
4
|
+
import { contract } from './query-contracts.js';
|
|
5
|
+
import { qk } from './query-keys.js';
|
|
4
6
|
/** Stable query-key factory — reuse to read/invalidate the same cache entry
|
|
5
|
-
* `useProjectTriggers` populates.
|
|
6
|
-
|
|
7
|
+
* `useProjectTriggers` populates. Delegates to `qk.project.triggers` — the
|
|
8
|
+
* SAME entry the Customize settings pause switch and the schedule/triggers
|
|
9
|
+
* view build directly via `qk.project.triggers(id)` too. */
|
|
10
|
+
export const projectTriggersKey = (projectId) => qk.project.triggers(projectId ?? '');
|
|
7
11
|
/**
|
|
8
12
|
* Project triggers (cron/webhook, file-defined in the repo manifest) — list +
|
|
9
13
|
* create/update/remove/fire. Thin React Query binding over
|
|
@@ -17,6 +21,7 @@ export function useProjectTriggers(projectId) {
|
|
|
17
21
|
queryKey,
|
|
18
22
|
queryFn: () => listProjectTriggers(projectId),
|
|
19
23
|
enabled: !!projectId,
|
|
24
|
+
...contract('config'),
|
|
20
25
|
});
|
|
21
26
|
const invalidate = () => queryClient.invalidateQueries({ queryKey });
|
|
22
27
|
const create = useMutation({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-project-triggers.js","sourceRoot":"","sources":["../../src/react/use-project-triggers.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAC9E,OAAO,EACL,oBAAoB,EACpB,oBAAoB,EACpB,kBAAkB,EAClB,mBAAmB,EACnB,oBAAoB,GAErB,MAAM,8BAA8B,CAAC;
|
|
1
|
+
{"version":3,"file":"use-project-triggers.js","sourceRoot":"","sources":["../../src/react/use-project-triggers.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAC9E,OAAO,EACL,oBAAoB,EACpB,oBAAoB,EACpB,kBAAkB,EAClB,mBAAmB,EACnB,oBAAoB,GAErB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CAAC;AAElC;;;6DAG6D;AAC7D,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,SAAoC,EAAE,EAAE,CACzE,EAAE,CAAC,OAAO,CAAC,QAAQ,CAAC,SAAS,IAAI,EAAE,CAAC,CAAC;AAEvC;;;;;GAKG;AACH,MAAM,UAAU,kBAAkB,CAAC,SAAoC;IACrE,MAAM,WAAW,GAAG,cAAc,EAAE,CAAC;IACrC,MAAM,QAAQ,GAAG,kBAAkB,CAAC,SAAS,CAAC,CAAC;IAE/C,MAAM,KAAK,GAAG,QAAQ,CAAwB;QAC5C,QAAQ;QACR,OAAO,EAAE,GAAG,EAAE,CAAC,mBAAmB,CAAC,SAAmB,CAAC;QACvD,OAAO,EAAE,CAAC,CAAC,SAAS;QACpB,GAAG,QAAQ,CAAC,QAAQ,CAAC;KACtB,CAAC,CAAC;IAEH,MAAM,UAAU,GAAG,GAAG,EAAE,CAAC,WAAW,CAAC,iBAAiB,CAAC,EAAE,QAAQ,EAAE,CAAC,CAAC;IAErE,MAAM,MAAM,GAAG,WAAW,CAAC;QACzB,UAAU,EAAE,CAAC,KAAiD,EAAE,EAAE,CAChE,oBAAoB,CAAC,SAAmB,EAAE,KAAK,CAAC;QAClD,SAAS,EAAE,UAAU;KACtB,CAAC,CAAC;IAEH,MAAM,MAAM,GAAG,WAAW,CAAC;QACzB,UAAU,EAAE,CAAC,IAAyE,EAAE,EAAE,CACxF,oBAAoB,CAAC,SAAmB,EAAE,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC;QAClE,SAAS,EAAE,UAAU;KACtB,CAAC,CAAC;IAEH,MAAM,MAAM,GAAG,WAAW,CAAC;QACzB,UAAU,EAAE,CAAC,IAAY,EAAE,EAAE,CAAC,oBAAoB,CAAC,SAAmB,EAAE,IAAI,CAAC;QAC7E,SAAS,EAAE,UAAU;KACtB,CAAC,CAAC;IAEH,yEAAyE;IACzE,wEAAwE;IACxE,6BAA6B;IAC7B,MAAM,IAAI,GAAG,WAAW,CAAC;QACvB,UAAU,EAAE,CAAC,IAAY,EAAE,EAAE,CAAC,kBAAkB,CAAC,SAAmB,EAAE,IAAI,CAAC;KAC5E,CAAC,CAAC;IAEH,OAAO,EAAE,GAAG,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;AACpD,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { SessionPhase } from './use-session.js';
|
|
2
|
+
/**
|
|
3
|
+
* WHY THIS IS NOT `runtimeError ? 'error' : …`.
|
|
4
|
+
*
|
|
5
|
+
* Opening a parked session is a race by construction: `/start` resumes the box
|
|
6
|
+
* while the runtime queries fire against a row that still says `stopped`. The
|
|
7
|
+
* proxy answers those with `503 sandbox not ready`, correctly — a GET on a
|
|
8
|
+
* session-data port is deliberately not wake-capable. Mapping that 503 straight
|
|
9
|
+
* to a phase of 'error' is what renders "OpenCode failed to load" over a
|
|
10
|
+
* perfectly healthy wake.
|
|
11
|
+
*
|
|
12
|
+
* So a runtime error only becomes terminal once `/start` has SETTLED. While it
|
|
13
|
+
* is still in flight the session is `starting`, which is the truth.
|
|
14
|
+
*/
|
|
15
|
+
export declare function derivePhase(input: {
|
|
16
|
+
terminal: boolean;
|
|
17
|
+
startError: unknown;
|
|
18
|
+
runtimeError: unknown;
|
|
19
|
+
/** True once the /start poll has stopped — resolved, failed, or given up. */
|
|
20
|
+
startSettled: boolean;
|
|
21
|
+
switched: boolean;
|
|
22
|
+
}): SessionPhase;
|
|
23
|
+
//# sourceMappingURL=use-session-phase.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-session-phase.d.ts","sourceRoot":"","sources":["../../src/react/use-session-phase.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAElD;;;;;;;;;;;;GAYG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE;IACjC,QAAQ,EAAE,OAAO,CAAC;IAClB,UAAU,EAAE,OAAO,CAAC;IACpB,YAAY,EAAE,OAAO,CAAC;IACtB,6EAA6E;IAC7E,YAAY,EAAE,OAAO,CAAC;IACtB,QAAQ,EAAE,OAAO,CAAC;CACnB,GAAG,YAAY,CAKf"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WHY THIS IS NOT `runtimeError ? 'error' : …`.
|
|
3
|
+
*
|
|
4
|
+
* Opening a parked session is a race by construction: `/start` resumes the box
|
|
5
|
+
* while the runtime queries fire against a row that still says `stopped`. The
|
|
6
|
+
* proxy answers those with `503 sandbox not ready`, correctly — a GET on a
|
|
7
|
+
* session-data port is deliberately not wake-capable. Mapping that 503 straight
|
|
8
|
+
* to a phase of 'error' is what renders "OpenCode failed to load" over a
|
|
9
|
+
* perfectly healthy wake.
|
|
10
|
+
*
|
|
11
|
+
* So a runtime error only becomes terminal once `/start` has SETTLED. While it
|
|
12
|
+
* is still in flight the session is `starting`, which is the truth.
|
|
13
|
+
*/
|
|
14
|
+
export function derivePhase(input) {
|
|
15
|
+
if (input.terminal || input.startError)
|
|
16
|
+
return 'error';
|
|
17
|
+
if (input.runtimeError && input.startSettled)
|
|
18
|
+
return 'error';
|
|
19
|
+
if (input.runtimeError)
|
|
20
|
+
return 'starting';
|
|
21
|
+
return input.switched ? 'ready' : 'starting';
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=use-session-phase.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-session-phase.js","sourceRoot":"","sources":["../../src/react/use-session-phase.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,WAAW,CAAC,KAO3B;IACC,IAAI,KAAK,CAAC,QAAQ,IAAI,KAAK,CAAC,UAAU;QAAE,OAAO,OAAO,CAAC;IACvD,IAAI,KAAK,CAAC,YAAY,IAAI,KAAK,CAAC,YAAY;QAAE,OAAO,OAAO,CAAC;IAC7D,IAAI,KAAK,CAAC,YAAY;QAAE,OAAO,UAAU,CAAC;IAC1C,OAAO,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,UAAU,CAAC;AAC/C,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { type SessionStartResult } from '../core/rest/projects-client/index.js';
|
|
2
1
|
import { BillingError } from '../core/http/api/errors.js';
|
|
2
|
+
import { type SessionStartResult } from '../core/rest/projects-client/index.js';
|
|
3
3
|
import type { ModelKey } from './use-model-store.js';
|
|
4
4
|
import { type PromptPart } from './use-opencode-sessions/index.js';
|
|
5
5
|
/** Coarse session lifecycle for the host's top-level gating. */
|
|
@@ -24,6 +24,122 @@ export declare const SESSION_START_POLL_MS = 1500;
|
|
|
24
24
|
* payload from a transient transport failure, since the box is still coming up.
|
|
25
25
|
*/
|
|
26
26
|
export declare function shouldPollSessionStart(error: unknown, data: SessionStartResult | null | undefined): number | false;
|
|
27
|
+
/**
|
|
28
|
+
* How long `/start` can return NEITHER data NOR an error before it counts as
|
|
29
|
+
* "given up" rather than "still working".
|
|
30
|
+
*
|
|
31
|
+
* `startProjectSession` swallows every 5xx/408/429/transport failure into a
|
|
32
|
+
* `null` result instead of throwing
|
|
33
|
+
* (`core/rest/projects-client/session-sandbox.ts`), so on a persistent
|
|
34
|
+
* outage `start.error` and `start.data` both stay `null` forever and
|
|
35
|
+
* `shouldPollSessionStart(null, null)` keeps returning `SESSION_START_POLL_MS`
|
|
36
|
+
* — there is no terminal stage and no error ever produced to observe.
|
|
37
|
+
* Without this ceiling, a caller waiting for `/start` to "settle" (e.g. the
|
|
38
|
+
* `phase` derivation below) can never learn it gave up, and a runtime error
|
|
39
|
+
* arriving alongside a wedged `/start` pins that caller in "still starting"
|
|
40
|
+
* forever — a silent hang, strictly worse than a visible error card.
|
|
41
|
+
*
|
|
42
|
+
* A genuine resume never trips this: every poll on a resuming box returns
|
|
43
|
+
* real `data` (a `stage`), so the inconclusive clock keeps resetting and this
|
|
44
|
+
* budget never starts counting — it only fires when `/start` itself has
|
|
45
|
+
* nothing to say, tick after tick. A cold sandbox resume can legitimately
|
|
46
|
+
* take tens of seconds end to end, but that legitimate case is exactly the
|
|
47
|
+
* one that keeps producing data and never reaches this bound.
|
|
48
|
+
*
|
|
49
|
+
* **Worst-case actual flip time is ~61.5s, not 45s** — say so accurately
|
|
50
|
+
* rather than understate it. 45s is 30 consecutive empty poll intervals at
|
|
51
|
+
* `SESSION_START_POLL_MS` (1.5s each), but the budget is only ever CHECKED
|
|
52
|
+
* at a poll tick, and `waitMs` (default
|
|
53
|
+
* `15_000`, the server-side long-poll budget passed to `startProjectSession`)
|
|
54
|
+
* means a single tick's request can itself take up to ~15s before resolving.
|
|
55
|
+
* So the tick that finally crosses the 45s line can itself land up to one
|
|
56
|
+
* full cycle late: `45_000 + (waitMs + SESSION_START_POLL_MS)` ≈
|
|
57
|
+
* `45_000 + 16_500` = `61_500`ms in the worst case. That is still acceptable:
|
|
58
|
+
* it is a finite, single-digit-minutes ceiling on a failure this task
|
|
59
|
+
* otherwise made hang forever, and erring toward a LATE flip (never early)
|
|
60
|
+
* is the safe direction — it never cuts short a legitimate wake, only delays
|
|
61
|
+
* how quickly a genuine outage surfaces its error card.
|
|
62
|
+
*/
|
|
63
|
+
export declare const START_INCONCLUSIVE_GIVE_UP_MS = 45000;
|
|
64
|
+
/**
|
|
65
|
+
* Has `/start` been returning nothing usable — no data, no error — for at
|
|
66
|
+
* least {@link START_INCONCLUSIVE_GIVE_UP_MS}? Kept separate from
|
|
67
|
+
* `shouldPollSessionStart` (which correctly keeps saying "poll again":
|
|
68
|
+
* retrying costs nothing) because "should the query retry" and "should a
|
|
69
|
+
* caller stop waiting on it" are different questions once the first answer
|
|
70
|
+
* is permanently yes.
|
|
71
|
+
*/
|
|
72
|
+
export declare function hasStartGivenUp(data: SessionStartResult | null | undefined, error: unknown, inconclusiveSinceMs: number | null, nowMs: number): boolean;
|
|
73
|
+
/**
|
|
74
|
+
* Compute the next value for the "inconclusive since" clock that feeds
|
|
75
|
+
* {@link hasStartGivenUp}, given one poll tick's outcome. Pure and separate
|
|
76
|
+
* from the `useEffect` that calls it so the arm/reset decision is
|
|
77
|
+
* unit-testable without rendering the hook — an earlier version of this
|
|
78
|
+
* logic lived only in the effect and was wrong in a way the pure
|
|
79
|
+
* `computeStartSettled` tests could not catch: it armed while the query was
|
|
80
|
+
* DISABLED, and the stale stamp then carried into the enabled window,
|
|
81
|
+
* consuming the whole grace period before a single real `/start` request had
|
|
82
|
+
* fired.
|
|
83
|
+
*
|
|
84
|
+
* The invariant: the clock may only measure time during which the query was
|
|
85
|
+
* actually able to run for THIS session.
|
|
86
|
+
* - Disabled → always `null`. A query that cannot fetch has neither "given
|
|
87
|
+
* up" nor is it "still working" — it hasn't started. A stamp taken while
|
|
88
|
+
* disabled must not survive into the enabled window.
|
|
89
|
+
* - Data or error arrived → clear to `null`. The poll said SOMETHING.
|
|
90
|
+
* - Enabled, inconclusive (no data, no error), not mid-fetch → arm at
|
|
91
|
+
* `nowMs` if nothing is armed yet; otherwise keep the existing stamp — the
|
|
92
|
+
* clock starts once, at the FIRST inconclusive tick, not every tick.
|
|
93
|
+
* - Mid-fetch → keep whatever is already armed; a fetch in flight is not
|
|
94
|
+
* itself informative either way, and time spent waiting on it still counts.
|
|
95
|
+
*
|
|
96
|
+
* Session-identity resetting (`projectId`/`sessionId` changing under a reused
|
|
97
|
+
* hook instance) is handled by a separate effect, not here — this function
|
|
98
|
+
* has no session id to key on by design, matching the narrow input the
|
|
99
|
+
* `useEffect` actually has on each tick.
|
|
100
|
+
*/
|
|
101
|
+
export declare function nextInconclusiveSince(input: {
|
|
102
|
+
current: number | null;
|
|
103
|
+
enabled: boolean;
|
|
104
|
+
hasData: boolean;
|
|
105
|
+
hasError: boolean;
|
|
106
|
+
isFetching: boolean;
|
|
107
|
+
nowMs: number;
|
|
108
|
+
}): number | null;
|
|
109
|
+
/**
|
|
110
|
+
* Whether the `/start` poll should be treated as SETTLED — resolved, failed,
|
|
111
|
+
* or given up — for a caller (like `phase`, below) that needs to stop
|
|
112
|
+
* waiting on it. A disabled query settles immediately: a query that never
|
|
113
|
+
* runs was never "still working" in the first place.
|
|
114
|
+
*
|
|
115
|
+
* Takes `hasGivenUp` as an ALREADY-RESOLVED boolean, not a timestamp pair.
|
|
116
|
+
* The caller previously stored this function's ENTIRE return value in
|
|
117
|
+
* `useState` — including the `!enabled -> true` branch — so a
|
|
118
|
+
* disabled->enabled transition (or a session switch) could read a stale
|
|
119
|
+
* `true` for one committed, painted frame, and a live `runtimeError` in that
|
|
120
|
+
* window rendered 'error' before a single real `/start` request had fired.
|
|
121
|
+
* `enabled`, `isFetching`, `data`, and `error` are cheap to read fresh on
|
|
122
|
+
* every call, so they no longer go through state at all — only `hasGivenUp`
|
|
123
|
+
* (via {@link hasStartGivenUp}) inherently needs wall-clock tracking, so it
|
|
124
|
+
* is the only piece the caller is allowed to latch.
|
|
125
|
+
*
|
|
126
|
+
* ORDER IS LOAD-BEARING: `hasGivenUp` must be tested BEFORE `isFetching`.
|
|
127
|
+
* Giving up does not stop the poll — `shouldPollSessionStart(null, null)`
|
|
128
|
+
* keeps returning 1500ms for as long as the outage lasts — so with the
|
|
129
|
+
* fetch check first, this answered false
|
|
130
|
+
* mid-poll and true between polls, forever. `phase` flipped 'starting' <->
|
|
131
|
+
* 'error' with it and the runtime error card blinked on and off once per poll
|
|
132
|
+
* cycle. Give-up is a sticky verdict (the caller's effect clears it only when
|
|
133
|
+
* /start actually answers, when the session changes, or when the query is
|
|
134
|
+
* disabled), so once it is in, no single in-flight tick may take it back out.
|
|
135
|
+
*/
|
|
136
|
+
export declare function computeStartSettled(input: {
|
|
137
|
+
enabled: boolean;
|
|
138
|
+
isFetching: boolean;
|
|
139
|
+
data: SessionStartResult | null | undefined;
|
|
140
|
+
error: unknown;
|
|
141
|
+
hasGivenUp: boolean;
|
|
142
|
+
}): boolean;
|
|
27
143
|
/**
|
|
28
144
|
* TanStack Query pauses interval fetches while the document is hidden unless
|
|
29
145
|
* this option is true. Session readiness must continue because it gates the
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-session.d.ts","sourceRoot":"","sources":["../../src/react/use-session.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"use-session.d.ts","sourceRoot":"","sources":["../../src/react/use-session.ts"],"names":[],"mappings":"AAiCA,OAAO,EAAE,YAAY,EAAqB,MAAM,yBAAyB,CAAC;AAG1E,OAAO,EACL,KAAK,kBAAkB,EAIxB,MAAM,8BAA8B,CAAC;AAatC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAGlD,OAAO,EACL,KAAK,UAAU,EAOhB,MAAM,yBAAyB,CAAC;AAYjC,gEAAgE;AAChE,MAAM,MAAM,YAAY,GAAG,UAAU,GAAG,OAAO,GAAG,OAAO,CAAC;AAQ1D;;;;;;GAMG;AACH,wBAA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