@shipfox/client-agent 12.0.1 → 13.0.0

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.
@@ -1,2 +1,2 @@
1
1
  $ shipfox-swc
2
- Successfully compiled: 37 files with swc (384.44ms)
2
+ Successfully compiled: 37 files with swc (268.88ms)
package/CHANGELOG.md CHANGED
@@ -1,5 +1,33 @@
1
1
  # @shipfox/client-agent
2
2
 
3
+ ## 13.0.0
4
+
5
+ ### Major Changes
6
+
7
+ - e405e92: Move client routes to slug-based `/w/$workspaceSlug` and `/p/$projectSlug` URLs, enforce the new composition contract, and support bounded project-slug resolution.
8
+
9
+ ### Patch Changes
10
+
11
+ - Updated dependencies [ee2ce67]
12
+ - Updated dependencies [e405e92]
13
+ - Updated dependencies [f78740d]
14
+ - Updated dependencies [9969937]
15
+ - Updated dependencies [3c73365]
16
+ - Updated dependencies [28daafe]
17
+ - Updated dependencies [54c820e]
18
+ - Updated dependencies [6adc228]
19
+ - Updated dependencies [e1efaee]
20
+ - @shipfox/api-agent-dto@12.0.0
21
+ - @shipfox/client-shell@13.0.0
22
+ - @shipfox/client-ui@13.0.0
23
+ - @shipfox/react-ui@0.4.0
24
+
25
+ ## 12.0.2
26
+
27
+ ### Patch Changes
28
+
29
+ - @shipfox/client-shell@12.0.2
30
+
3
31
  ## 12.0.1
4
32
 
5
33
  ### Patch Changes
package/dist/feature.d.ts CHANGED
@@ -8,11 +8,11 @@ export declare const agentSettingsSections: readonly [{
8
8
  export declare const agentFeature: {
9
9
  readonly id: "shipfox.agent";
10
10
  readonly routes: readonly [{
11
- readonly path: "/workspaces/$wid/model-provider";
11
+ readonly path: "/w/$workspaceSlug/model-provider";
12
12
  readonly parent: "workspaceLayout";
13
13
  readonly impl: "@shipfox/client-agent/routes/model-provider";
14
14
  }, {
15
- readonly path: "/workspaces/$wid/settings/agents";
15
+ readonly path: "/w/$workspaceSlug/settings/agents";
16
16
  readonly parent: "workspaceSettings";
17
17
  readonly impl: "@shipfox/client-agent/routes/agents-settings";
18
18
  }];
package/dist/feature.js CHANGED
@@ -12,12 +12,12 @@ export const agentFeature = defineClientFeature({
12
12
  id: 'shipfox.agent',
13
13
  routes: [
14
14
  {
15
- path: '/workspaces/$wid/model-provider',
15
+ path: '/w/$workspaceSlug/model-provider',
16
16
  parent: 'workspaceLayout',
17
17
  impl: '@shipfox/client-agent/routes/model-provider'
18
18
  },
19
19
  {
20
- path: '/workspaces/$wid/settings/agents',
20
+ path: '/w/$workspaceSlug/settings/agents',
21
21
  parent: 'workspaceSettings',
22
22
  impl: '@shipfox/client-agent/routes/agents-settings'
23
23
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/feature.ts"],"sourcesContent":["import {defineClientFeature, type SettingsSectionEntry} from '@shipfox/client-shell';\n\nexport const agentSettingsSections = [\n {\n id: 'settings.agents',\n pathSegment: 'agents',\n label: 'Agents',\n icon: 'robot2Line',\n order: 400,\n },\n] as const satisfies readonly SettingsSectionEntry[];\n\nexport const agentFeature = defineClientFeature({\n id: 'shipfox.agent',\n routes: [\n {\n path: '/workspaces/$wid/model-provider',\n parent: 'workspaceLayout',\n impl: '@shipfox/client-agent/routes/model-provider',\n },\n {\n path: '/workspaces/$wid/settings/agents',\n parent: 'workspaceSettings',\n impl: '@shipfox/client-agent/routes/agents-settings',\n },\n ],\n settingsSections: agentSettingsSections,\n});\n"],"names":["defineClientFeature","agentSettingsSections","id","pathSegment","label","icon","order","agentFeature","routes","path","parent","impl","settingsSections"],"mappings":"AAAA,SAAQA,mBAAmB,QAAkC,wBAAwB;AAErF,OAAO,MAAMC,wBAAwB;IACnC;QACEC,IAAI;QACJC,aAAa;QACbC,OAAO;QACPC,MAAM;QACNC,OAAO;IACT;CACD,CAAoD;AAErD,OAAO,MAAMC,eAAeP,oBAAoB;IAC9CE,IAAI;IACJM,QAAQ;QACN;YACEC,MAAM;YACNC,QAAQ;YACRC,MAAM;QACR;QACA;YACEF,MAAM;YACNC,QAAQ;YACRC,MAAM;QACR;KACD;IACDC,kBAAkBX;AACpB,GAAG"}
1
+ {"version":3,"sources":["../src/feature.ts"],"sourcesContent":["import {defineClientFeature, type SettingsSectionEntry} from '@shipfox/client-shell';\n\nexport const agentSettingsSections = [\n {\n id: 'settings.agents',\n pathSegment: 'agents',\n label: 'Agents',\n icon: 'robot2Line',\n order: 400,\n },\n] as const satisfies readonly SettingsSectionEntry[];\n\nexport const agentFeature = defineClientFeature({\n id: 'shipfox.agent',\n routes: [\n {\n path: '/w/$workspaceSlug/model-provider',\n parent: 'workspaceLayout',\n impl: '@shipfox/client-agent/routes/model-provider',\n },\n {\n path: '/w/$workspaceSlug/settings/agents',\n parent: 'workspaceSettings',\n impl: '@shipfox/client-agent/routes/agents-settings',\n },\n ],\n settingsSections: agentSettingsSections,\n});\n"],"names":["defineClientFeature","agentSettingsSections","id","pathSegment","label","icon","order","agentFeature","routes","path","parent","impl","settingsSections"],"mappings":"AAAA,SAAQA,mBAAmB,QAAkC,wBAAwB;AAErF,OAAO,MAAMC,wBAAwB;IACnC;QACEC,IAAI;QACJC,aAAa;QACbC,OAAO;QACPC,MAAM;QACNC,OAAO;IACT;CACD,CAAoD;AAErD,OAAO,MAAMC,eAAeP,oBAAoB;IAC9CE,IAAI;IACJM,QAAQ;QACN;YACEC,MAAM;YACNC,QAAQ;YACRC,MAAM;QACR;QACA;YACEF,MAAM;YACNC,QAAQ;YACRC,MAAM;QACR;KACD;IACDC,kBAAkBX;AACpB,GAAG"}
@@ -1,4 +1,4 @@
1
1
  export declare function modelProviderRouteParams(input: Record<string, unknown>): {
2
- wid: string;
2
+ workspaceSlug: string;
3
3
  };
4
4
  //# sourceMappingURL=inputs.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"inputs.d.ts","sourceRoot":"","sources":["../../src/routes/inputs.ts"],"names":[],"mappings":"AAAA,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG;IAAC,GAAG,EAAE,MAAM,CAAA;CAAC,CAItF"}
1
+ {"version":3,"file":"inputs.d.ts","sourceRoot":"","sources":["../../src/routes/inputs.ts"],"names":[],"mappings":"AAAA,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG;IAAC,aAAa,EAAE,MAAM,CAAA;CAAC,CAKhG"}
@@ -1,8 +1,8 @@
1
1
  export function modelProviderRouteParams(input) {
2
- const wid = stringParam(input.wid);
3
- if (!wid) throw new Error('Model provider route is missing the workspace path parameter.');
2
+ const workspaceSlug = stringParam(input.workspaceSlug);
3
+ if (!workspaceSlug) throw new Error('Model provider route is missing the workspace path parameter.');
4
4
  return {
5
- wid
5
+ workspaceSlug
6
6
  };
7
7
  }
8
8
  function stringParam(value) {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/routes/inputs.ts"],"sourcesContent":["export function modelProviderRouteParams(input: Record<string, unknown>): {wid: string} {\n const wid = stringParam(input.wid);\n if (!wid) throw new Error('Model provider route is missing the workspace path parameter.');\n return {wid};\n}\n\nfunction stringParam(value: unknown): string | undefined {\n return typeof value === 'string' && value.length > 0 ? value : undefined;\n}\n"],"names":["modelProviderRouteParams","input","wid","stringParam","Error","value","length","undefined"],"mappings":"AAAA,OAAO,SAASA,yBAAyBC,KAA8B;IACrE,MAAMC,MAAMC,YAAYF,MAAMC,GAAG;IACjC,IAAI,CAACA,KAAK,MAAM,IAAIE,MAAM;IAC1B,OAAO;QAACF;IAAG;AACb;AAEA,SAASC,YAAYE,KAAc;IACjC,OAAO,OAAOA,UAAU,YAAYA,MAAMC,MAAM,GAAG,IAAID,QAAQE;AACjE"}
1
+ {"version":3,"sources":["../../src/routes/inputs.ts"],"sourcesContent":["export function modelProviderRouteParams(input: Record<string, unknown>): {workspaceSlug: string} {\n const workspaceSlug = stringParam(input.workspaceSlug);\n if (!workspaceSlug)\n throw new Error('Model provider route is missing the workspace path parameter.');\n return {workspaceSlug};\n}\n\nfunction stringParam(value: unknown): string | undefined {\n return typeof value === 'string' && value.length > 0 ? value : undefined;\n}\n"],"names":["modelProviderRouteParams","input","workspaceSlug","stringParam","Error","value","length","undefined"],"mappings":"AAAA,OAAO,SAASA,yBAAyBC,KAA8B;IACrE,MAAMC,gBAAgBC,YAAYF,MAAMC,aAAa;IACrD,IAAI,CAACA,eACH,MAAM,IAAIE,MAAM;IAClB,OAAO;QAACF;IAAa;AACvB;AAEA,SAASC,YAAYE,KAAc;IACjC,OAAO,OAAOA,UAAU,YAAYA,MAAMC,MAAM,GAAG,IAAID,QAAQE;AACjE"}
@@ -1 +1 @@
1
- {"version":3,"file":"model-provider.d.ts","sourceRoot":"","sources":["../../src/routes/model-provider.tsx"],"names":[],"mappings":";;;AAKA,wBAeG"}
1
+ {"version":3,"file":"model-provider.d.ts","sourceRoot":"","sources":["../../src/routes/model-provider.tsx"],"names":[],"mappings":";;;AAKA,wBAgBG"}
@@ -1,23 +1,24 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- import { defineRoute, useRouteParams } from '@shipfox/client-shell/runtime';
2
+ import { defineRoute, useActiveWorkspace, useRouteParams } from '@shipfox/client-shell/runtime';
3
3
  import { useNavigate } from '@tanstack/react-router';
4
4
  import { ModelProviderOnboardingPage } from '#pages/model-provider-onboarding-page.js';
5
5
  import { modelProviderRouteParams } from './inputs.js';
6
6
  export default defineRoute({
7
7
  component: ()=>{
8
- const { wid } = useRouteParams(modelProviderRouteParams);
8
+ const { workspaceSlug } = useRouteParams(modelProviderRouteParams);
9
+ const workspace = useActiveWorkspace();
9
10
  const navigate = useNavigate();
10
11
  const goToProjectCreation = ()=>{
11
12
  void navigate({
12
- to: '/workspaces/$wid/projects/new',
13
+ to: '/w/$workspaceSlug/projects/new',
13
14
  params: {
14
- wid
15
+ workspaceSlug
15
16
  },
16
17
  replace: true
17
18
  });
18
19
  };
19
20
  return /*#__PURE__*/ _jsx(ModelProviderOnboardingPage, {
20
- workspaceId: wid,
21
+ workspaceId: workspace.id,
21
22
  onSkip: goToProjectCreation,
22
23
  onConfigured: goToProjectCreation
23
24
  });
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/routes/model-provider.tsx"],"sourcesContent":["import {defineRoute, useRouteParams} from '@shipfox/client-shell/runtime';\nimport {useNavigate} from '@tanstack/react-router';\nimport {ModelProviderOnboardingPage} from '#pages/model-provider-onboarding-page.js';\nimport {modelProviderRouteParams} from './inputs.js';\n\nexport default defineRoute({\n component: () => {\n const {wid} = useRouteParams(modelProviderRouteParams);\n const navigate = useNavigate();\n const goToProjectCreation = () => {\n void navigate({to: '/workspaces/$wid/projects/new', params: {wid}, replace: true});\n };\n return (\n <ModelProviderOnboardingPage\n workspaceId={wid}\n onSkip={goToProjectCreation}\n onConfigured={goToProjectCreation}\n />\n );\n },\n});\n"],"names":["defineRoute","useRouteParams","useNavigate","ModelProviderOnboardingPage","modelProviderRouteParams","component","wid","navigate","goToProjectCreation","to","params","replace","workspaceId","onSkip","onConfigured"],"mappings":";AAAA,SAAQA,WAAW,EAAEC,cAAc,QAAO,gCAAgC;AAC1E,SAAQC,WAAW,QAAO,yBAAyB;AACnD,SAAQC,2BAA2B,QAAO,2CAA2C;AACrF,SAAQC,wBAAwB,QAAO,cAAc;AAErD,eAAeJ,YAAY;IACzBK,WAAW;QACT,MAAM,EAACC,GAAG,EAAC,GAAGL,eAAeG;QAC7B,MAAMG,WAAWL;QACjB,MAAMM,sBAAsB;YAC1B,KAAKD,SAAS;gBAACE,IAAI;gBAAiCC,QAAQ;oBAACJ;gBAAG;gBAAGK,SAAS;YAAI;QAClF;QACA,qBACE,KAACR;YACCS,aAAaN;YACbO,QAAQL;YACRM,cAAcN;;IAGpB;AACF,GAAG"}
1
+ {"version":3,"sources":["../../src/routes/model-provider.tsx"],"sourcesContent":["import {defineRoute, useActiveWorkspace, useRouteParams} from '@shipfox/client-shell/runtime';\nimport {useNavigate} from '@tanstack/react-router';\nimport {ModelProviderOnboardingPage} from '#pages/model-provider-onboarding-page.js';\nimport {modelProviderRouteParams} from './inputs.js';\n\nexport default defineRoute({\n component: () => {\n const {workspaceSlug} = useRouteParams(modelProviderRouteParams);\n const workspace = useActiveWorkspace();\n const navigate = useNavigate();\n const goToProjectCreation = () => {\n void navigate({to: '/w/$workspaceSlug/projects/new', params: {workspaceSlug}, replace: true});\n };\n return (\n <ModelProviderOnboardingPage\n workspaceId={workspace.id}\n onSkip={goToProjectCreation}\n onConfigured={goToProjectCreation}\n />\n );\n },\n});\n"],"names":["defineRoute","useActiveWorkspace","useRouteParams","useNavigate","ModelProviderOnboardingPage","modelProviderRouteParams","component","workspaceSlug","workspace","navigate","goToProjectCreation","to","params","replace","workspaceId","id","onSkip","onConfigured"],"mappings":";AAAA,SAAQA,WAAW,EAAEC,kBAAkB,EAAEC,cAAc,QAAO,gCAAgC;AAC9F,SAAQC,WAAW,QAAO,yBAAyB;AACnD,SAAQC,2BAA2B,QAAO,2CAA2C;AACrF,SAAQC,wBAAwB,QAAO,cAAc;AAErD,eAAeL,YAAY;IACzBM,WAAW;QACT,MAAM,EAACC,aAAa,EAAC,GAAGL,eAAeG;QACvC,MAAMG,YAAYP;QAClB,MAAMQ,WAAWN;QACjB,MAAMO,sBAAsB;YAC1B,KAAKD,SAAS;gBAACE,IAAI;gBAAkCC,QAAQ;oBAACL;gBAAa;gBAAGM,SAAS;YAAI;QAC7F;QACA,qBACE,KAACT;YACCU,aAAaN,UAAUO,EAAE;YACzBC,QAAQN;YACRO,cAAcP;;IAGpB;AACF,GAAG"}