@stigmer/server 3.20.0 → 3.21.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.
Files changed (90) hide show
  1. package/dist/boot/compose.d.ts.map +1 -1
  2. package/dist/boot/compose.js +0 -1
  3. package/dist/boot/compose.js.map +1 -1
  4. package/dist/boot/inprocess.d.ts +0 -2
  5. package/dist/boot/inprocess.d.ts.map +1 -1
  6. package/dist/boot/inprocess.js +0 -6
  7. package/dist/boot/inprocess.js.map +1 -1
  8. package/dist/domain/agent/controller.d.ts +2 -2
  9. package/dist/domain/agent/controller.d.ts.map +1 -1
  10. package/dist/domain/agent/controller.js +1 -17
  11. package/dist/domain/agent/controller.js.map +1 -1
  12. package/dist/domain/agent/steps.d.ts +0 -1
  13. package/dist/domain/agent/steps.d.ts.map +1 -1
  14. package/dist/domain/agent/steps.js +1 -40
  15. package/dist/domain/agent/steps.js.map +1 -1
  16. package/dist/domain/agentexecution/controller.d.ts.map +1 -1
  17. package/dist/domain/agentexecution/controller.js +7 -9
  18. package/dist/domain/agentexecution/controller.js.map +1 -1
  19. package/dist/domain/agentexecution/create-execution-context-step.d.ts +0 -2
  20. package/dist/domain/agentexecution/create-execution-context-step.d.ts.map +1 -1
  21. package/dist/domain/agentexecution/create-execution-context-step.js +179 -60
  22. package/dist/domain/agentexecution/create-execution-context-step.js.map +1 -1
  23. package/dist/domain/agentexecution/create-steps.d.ts +16 -31
  24. package/dist/domain/agentexecution/create-steps.d.ts.map +1 -1
  25. package/dist/domain/agentexecution/create-steps.js +36 -102
  26. package/dist/domain/agentexecution/create-steps.js.map +1 -1
  27. package/dist/domain/agentexecution/run-target.d.ts +7 -3
  28. package/dist/domain/agentexecution/run-target.d.ts.map +1 -1
  29. package/dist/domain/agentexecution/run-target.js.map +1 -1
  30. package/dist/domain/environment/personal.d.ts +42 -0
  31. package/dist/domain/environment/personal.d.ts.map +1 -0
  32. package/dist/domain/environment/personal.js +96 -0
  33. package/dist/domain/environment/personal.js.map +1 -0
  34. package/dist/domain/mcpserver/connect.d.ts +0 -2
  35. package/dist/domain/mcpserver/connect.d.ts.map +1 -1
  36. package/dist/domain/mcpserver/connect.js +16 -72
  37. package/dist/domain/mcpserver/connect.js.map +1 -1
  38. package/dist/domain/plugin/overlay/sanitize.js +2 -2
  39. package/dist/domain/session/controller.d.ts +0 -7
  40. package/dist/domain/session/controller.d.ts.map +1 -1
  41. package/dist/domain/session/controller.js +11 -16
  42. package/dist/domain/session/controller.js.map +1 -1
  43. package/dist/domain/session/run-target.d.ts +9 -8
  44. package/dist/domain/session/run-target.d.ts.map +1 -1
  45. package/dist/domain/session/run-target.js.map +1 -1
  46. package/dist/domain/session/steps.d.ts +0 -27
  47. package/dist/domain/session/steps.d.ts.map +1 -1
  48. package/dist/domain/session/steps.js +10 -151
  49. package/dist/domain/session/steps.js.map +1 -1
  50. package/dist/domain/workflowexecution/create-steps.d.ts +4 -3
  51. package/dist/domain/workflowexecution/create-steps.d.ts.map +1 -1
  52. package/dist/domain/workflowexecution/create-steps.js +4 -3
  53. package/dist/domain/workflowexecution/create-steps.js.map +1 -1
  54. package/dist/pipeline/apiresource-labels.d.ts +2 -2
  55. package/dist/pipeline/apiresource-labels.js +2 -2
  56. package/dist/pipeline/errors.d.ts +2 -2
  57. package/dist/pipeline/errors.js +2 -2
  58. package/dist/pipeline/steps/guard-reserved-labels.d.ts.map +1 -1
  59. package/dist/pipeline/steps/guard-reserved-labels.js +6 -5
  60. package/dist/pipeline/steps/guard-reserved-labels.js.map +1 -1
  61. package/package.json +6 -6
  62. package/src/boot/compose.ts +0 -1
  63. package/src/boot/inprocess.ts +0 -9
  64. package/src/domain/agent/__tests__/agent.test.ts +0 -68
  65. package/src/domain/agent/controller.ts +3 -38
  66. package/src/domain/agent/steps.ts +1 -60
  67. package/src/domain/agentexecution/__tests__/create-execution-context-step.test.ts +216 -0
  68. package/src/domain/agentexecution/__tests__/create-steps.test.ts +70 -145
  69. package/src/domain/agentexecution/controller.ts +6 -10
  70. package/src/domain/agentexecution/create-execution-context-step.ts +271 -83
  71. package/src/domain/agentexecution/create-steps.ts +38 -138
  72. package/src/domain/agentexecution/run-target.ts +7 -3
  73. package/src/domain/environment/__tests__/personal.test.ts +143 -0
  74. package/src/domain/environment/personal.ts +141 -0
  75. package/src/domain/mcpserver/connect.ts +21 -82
  76. package/src/domain/plugin/overlay/sanitize.ts +2 -2
  77. package/src/domain/session/__tests__/run-gate.test.ts +19 -52
  78. package/src/domain/session/__tests__/session.test.ts +27 -203
  79. package/src/domain/session/controller.ts +10 -30
  80. package/src/domain/session/run-target.ts +9 -8
  81. package/src/domain/session/steps.ts +9 -235
  82. package/src/domain/workflowexecution/create-steps.ts +4 -3
  83. package/src/pipeline/apiresource-labels.ts +2 -2
  84. package/src/pipeline/errors.ts +2 -2
  85. package/src/pipeline/steps/guard-reserved-labels.ts +6 -5
  86. package/dist/domain/agent/defaultagent.d.ts +0 -37
  87. package/dist/domain/agent/defaultagent.d.ts.map +0 -1
  88. package/dist/domain/agent/defaultagent.js +0 -104
  89. package/dist/domain/agent/defaultagent.js.map +0 -1
  90. package/src/domain/agent/defaultagent.ts +0 -135
@@ -19,9 +19,10 @@ export type ExecutionWorkflowInstanceCreatorProvider = () => ExecutionWorkflowIn
19
19
  /**
20
20
  * ValidateWorkflowOrInstance — at least one of workflow_id /
21
21
  * workflow_instance_id must be provided. Matches the cloud
22
- * WorkflowExecutionCreateHandler. AgentExecution differs: it has a
23
- * ResolveDefaultAgent step, so its guard is an unreachable invariant
24
- * (Internal), not reachable InvalidArgument validation (issue #196).
22
+ * WorkflowExecutionCreateHandler. AgentExecution differs on purpose: its
23
+ * all-empty shape is legal (the built-in assistant), so it has no such
24
+ * step; a workflow execution has no built-in workflow to fall back to
25
+ * (issue #196).
25
26
  */
26
27
  export declare function newValidateWorkflowOrInstanceStep(): PipelineStep<ExecutionDesc>;
27
28
  export interface CreateDefaultInstanceDeps {
@@ -1 +1 @@
1
- {"version":3,"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AK,EAAE,KAAK,CAAC;IACtB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,uBAAuB,EAAE,wCAAwC,CAAC;IAC3E,QAAQ,CAAC,sBAAsB,CAAC,EAAE,8BAA8B,CAAC;CAClE;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,oCAAoC,CAClD,IAAI,EAAE,yBAAyB,GAC9B,YAAY,CAAC,aAAa,CAAC,CAgG7B;AAoED;;;GAGG;AACH,wBAAgB,sBAAsB,IAAI,YAAY,CAAC,aAAa,CAAC,CAWpE;AAED,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC;IACtB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,WAAW,EAAE,oCAAoC,CAAC;CAC5D;AAED;;;;;;;GAOG;AACH,wBAAgB,oBAAoB,CAClC,IAAI,EAAE,iBAAiB,GACtB,YAAY,CAAC,aAAa,CAAC,CAgE7B"}
@@ -25,9 +25,10 @@ import { buildDefaultWorkflowInstanceRequest } from "../workflowinstance/default
25
25
  /**
26
26
  * ValidateWorkflowOrInstance — at least one of workflow_id /
27
27
  * workflow_instance_id must be provided. Matches the cloud
28
- * WorkflowExecutionCreateHandler. AgentExecution differs: it has a
29
- * ResolveDefaultAgent step, so its guard is an unreachable invariant
30
- * (Internal), not reachable InvalidArgument validation (issue #196).
28
+ * WorkflowExecutionCreateHandler. AgentExecution differs on purpose: its
29
+ * all-empty shape is legal (the built-in assistant), so it has no such
30
+ * step; a workflow execution has no built-in workflow to fall back to
31
+ * (issue #196).
31
32
  */
32
33
  export function newValidateWorkflowOrInstanceStep() {
33
34
  return {
@@ -1 +1 @@
1
- {"version":3,"file":"create-steps.js","sourceRoot":"","sources":["../../../src/domain/workflowexecution/create-steps.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;A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AAc,CAAC,gBAAgB,CAAC;YACzD,SAAS,CAAC,MAAM,CAAC,KAAK,GAAG,sCAAsC,WAAW,CAAC,UAAU,CAAC,EAAE,CAAC;YACzF,IAAI,CAAC;gBACH,MAAM,IAAI,CAAC,KAAK,CAAC,YAAY,CAC3B,eAAe,CAAC,kBAAkB,EAClC,WAAW,EACX,uBAAuB,EACvB,SAAS,CACV,CAAC;YACJ,CAAC;YAAC,OAAO,YAAY,EAAE,CAAC;gBACtB,MAAM,aAAa,CACjB,YAAY,EACZ,sDAAsD,CACvD,CAAC;YACJ,CAAC;YACD,MAAM,aAAa,CAAC,UAAU,EAAE,0BAA0B,CAAC,CAAC;QAC9D,CAAC;KACF,CAAC;AACJ,CAAC;AAED;;;GAGG;AACH,SAAS,WAAW,CAAC,KAAY;IAC/B,OAAO,KAAK,CAAC,OAAO,CAAC;AACvB,CAAC"}
@@ -22,8 +22,8 @@
22
22
  import type { ApiResourceMetadata } from "@stigmer/protos/ai/stigmer/commons/apiresource/metadata_pb";
23
23
  /**
24
24
  * The platform-reserved label key namespace. Keys under this prefix carry
25
- * platform semantics (default-agent resolution, personal-environment
26
- * uniqueness, default-instance marking) and are written by the server —
25
+ * platform semantics (personal-environment uniqueness, default-instance
26
+ * marking, plugin membership and lineage) and are written by the server —
27
27
  * never introduced by ordinary client requests on the cloud edition.
28
28
  */
29
29
  export declare const RESERVED_LABEL_PREFIX = "stigmer.ai/";
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * The platform-reserved label key namespace. Keys under this prefix carry
3
- * platform semantics (default-agent resolution, personal-environment
4
- * uniqueness, default-instance marking) and are written by the server —
3
+ * platform semantics (personal-environment uniqueness, default-instance
4
+ * marking, plugin membership and lineage) and are written by the server —
5
5
  * never introduced by ordinary client requests on the cloud edition.
6
6
  */
7
7
  export const RESERVED_LABEL_PREFIX = "stigmer.ai/";
@@ -47,8 +47,8 @@ export declare function grpcCodeName(code: Code): string;
47
47
  * errors.As branch keeps the INNER code but rewrites the message to the
48
48
  * full wrapped text — and the inner client error's Error() renders as
49
49
  * `rpc error: code = <CodeName> desc = <message>`. Byte-parity with Go on
50
- * the two arms that hit this (agent create's CreateDefaultInstance,
51
- * session create's ResolveDefaultAgentInstance). The transport-formatting
50
+ * the arms that hit this (agent create's CreateDefaultInstance, agent
51
+ * execution create's default-instance and session bootstrap). The transport-formatting
52
52
  * leak is filed as stigmer/stigmer#852 for a both-editions post-cutover
53
53
  * fix; until then this shim IS the wire contract.
54
54
  *
@@ -87,8 +87,8 @@ export function grpcCodeName(code) {
87
87
  * errors.As branch keeps the INNER code but rewrites the message to the
88
88
  * full wrapped text — and the inner client error's Error() renders as
89
89
  * `rpc error: code = <CodeName> desc = <message>`. Byte-parity with Go on
90
- * the two arms that hit this (agent create's CreateDefaultInstance,
91
- * session create's ResolveDefaultAgentInstance). The transport-formatting
90
+ * the arms that hit this (agent create's CreateDefaultInstance, agent
91
+ * execution create's default-instance and session bootstrap). The transport-formatting
92
92
  * leak is filed as stigmer/stigmer#852 for a both-editions post-cutover
93
93
  * fix; until then this shim IS the wire contract.
94
94
  *
@@ -1 +1 @@
1
- {"version":3,"file":"guard-reserved-labels.d.ts","sourceRoot":"","sources":["../../../src/pipeline/steps/guard-reserved-labels.ts"],"names":[],"mappings":"AAkDA,OAAO,KAAK,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAK/D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AAEjE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAK5D,uEAAuE;AACvE,eAAO,MAAM,qBAAqB,gBAAgB,CAAC;AAYnD;;;;GAIG;AACH,wBAAgB,sBAAsB,CACpC,MAAM,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,EACxC,SAAS,EAAE,QAAQ,CAAC,MAA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AC,GAAG,EAAE,cAAc,CAAC,IAAI,CAAC,KAAK,OAAO,GAAG,SAAS,CAAC;IACtE,oFAAoF;IACpF,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;CAC/B;AAED,wBAAgB,0BAA0B,CAAC,IAAI,SAAS,WAAW,EACjE,UAAU,EAAE,UAAU,EACtB,SAAS,GAAE,4BAA4B,CAAC,IAAI,CAAM,GACjD,YAAY,CAAC,IAAI,CAAC,CAwEpB"}
@@ -3,11 +3,12 @@
3
3
  * `stigmer.ai/*` label namespace (the Java GuardReservedLabelsStep port,
4
4
  * cloud#320/#386; C2 Stage 3, 20260827.10).
5
5
  *
6
- * Reserved labels carry platform semantics — the motivating one is
7
- * `stigmer.ai/default-agent`, which the default-agent resolution reads
8
- * GLOBALLY (label + visibility_public), so a tenant labeling its own
9
- * public agent would enter every organization's default-agent candidate
10
- * set. Only rejecting the write closes that.
6
+ * Reserved labels carry platform semantics the server reads and acts on
7
+ * (the personal-environment marker, the default-instance marker, the
8
+ * membership and lineage labels): a client that could write one would be
9
+ * writing a platform decision, and any reader trusting the label would be
10
+ * trusting the client. Only rejecting the write closes that; the label is
11
+ * not authorization, the server is.
11
12
  *
12
13
  * Behavior (the Java matrix verbatim):
13
14
  * - ECHOES pass — clients read-modify-write whole resources, so a
@@ -1 +1 @@
1
- {"version":3,"file":"guard-reserved-labels.js","sourceRoot":"","sources":["../../../src/pipeline/steps/guard-reserved-labels.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgDG;AACH,OAAO,EAAE,IAAI,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAGzD,OAAO,EAAE,eAAe,EAAE,MAAM,qFAAqF,CAAC;AACtH,OAAO,EAAE,aAAa,EAAE,MAAM,2CAA2C,CAAC;AAG1E,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAG7C,OAAO,EAAE,qBAAqB,EAAE,M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,CAAC,cAAc,EAAE;oBACxD,UAAU,EAAE,aAAa,CAAC,yBAAyB;oBACnD,YAAY,EAAE,eAAe,CAAC,QAAQ;oBACtC,UAAU,EAAE,SAAS;iBACtB,CAAC,CAAC;YACL,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACf,MAAM,yBAAyB,CAAC,KAAK,CAAC,CAAC;YACzC,CAAC;YACD,QAAQ,QAAQ,CAAC,IAAI,EAAE,CAAC;gBACtB,KAAK,OAAO;oBACV,OAAO;gBACT,KAAK,MAAM,CAAC;gBACZ,KAAK,WAAW;oBACd,MAAM,IAAI,YAAY,CACpB,2BAA2B,qBAAqB,cAAc;wBAC5D,4DAA4D;wBAC5D,YAAY,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,2BAA2B;wBAC3D,0CAA0C,EAC5C,IAAI,CAAC,eAAe,CACrB,CAAC;gBACJ,KAAK,aAAa;oBAChB,MAAM,yBAAyB,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;gBAClD,OAAO,CAAC,CAAC,CAAC;oBACR,MAAM,UAAU,GAAU,QAAQ,CAAC;oBACnC,MAAM,yBAAyB,CAC7B,IAAI,KAAK,CAAC,oBAAoB,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC,EAAE,CAAC,CAC5D,CAAC;gBACJ,CAAC;YACH,CAAC;QACH,CAAC;KACF,CAAC;AACJ,CAAC;AAED,2EAA2E;AAC3E,SAAS,yBAAyB,CAAC,KAAc;IAC/C,OAAO,aAAa,CAClB,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,EACzD,kDAAkD,CACnD,CAAC;AACJ,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stigmer/server",
3
- "version": "3.20.0",
3
+ "version": "3.21.0",
4
4
  "description": "The Stigmer OSS control plane as a composable library: composeServer, the extension registry and the driver seams a composition builds on. The self-contained deployable of the same server is @stigmer/server-slim.",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
@@ -62,11 +62,11 @@
62
62
  "@connectrpc/connect-node": "^2.0.0",
63
63
  "@kubernetes/client-node": "2.0.0",
64
64
  "@opentelemetry/api": "^1.9.0",
65
- "@stigmer/outbound": "3.20.0",
66
- "@stigmer/plugin-package": "3.20.0",
67
- "@stigmer/protos": "3.20.0",
68
- "@stigmer/temporal-codecs": "3.20.0",
69
- "@stigmer/zip-structure": "3.20.0",
65
+ "@stigmer/outbound": "3.21.0",
66
+ "@stigmer/plugin-package": "3.21.0",
67
+ "@stigmer/protos": "3.21.0",
68
+ "@stigmer/temporal-codecs": "3.21.0",
69
+ "@stigmer/zip-structure": "3.21.0",
70
70
  "@temporalio/activity": "1.16.2",
71
71
  "@temporalio/client": "1.16.2",
72
72
  "@temporalio/common": "1.16.2",
@@ -1269,7 +1269,6 @@ export async function composeServer(
1269
1269
  logger,
1270
1270
  authorizer,
1271
1271
  temporalConfig,
1272
- agentInstanceCreator: () => requireInProcess().agentInstanceCreator,
1273
1272
  gateSteps: extensions.gateSteps,
1274
1273
  sandboxLane,
1275
1274
  authorizationLifecycle,
@@ -60,7 +60,6 @@ import type {
60
60
  } from "../domain/agentexecution/create-execution-context-step.js";
61
61
  import type { ConnectExecutionContextClient } from "../domain/mcpserver/connect.js";
62
62
  import type { ManagedEnvironmentClient } from "../domain/mcpserver/oauth/managed-env.js";
63
- import type { AgentInstanceCreator } from "../domain/session/steps.js";
64
63
  import type { WorkflowInstanceCreator } from "../domain/workflow/steps.js";
65
64
  import type { ExecutionWorkflowInstanceCreator } from "../domain/workflowexecution/create-steps.js";
66
65
  import type {
@@ -89,7 +88,6 @@ import type { CallOptions } from "@connectrpc/connect";
89
88
  /** The narrow in-process surfaces the domains consume (DD-002). */
90
89
  export interface InProcessClients {
91
90
  readonly agentInstanceApplier: AgentInstanceApplier;
92
- readonly agentInstanceCreator: AgentInstanceCreator;
93
91
  readonly parentAgentLoader: ParentAgentLoader;
94
92
  readonly workflowInstanceCreator: WorkflowInstanceCreator;
95
93
  readonly parentWorkflowLoader: ParentWorkflowLoader;
@@ -254,13 +252,6 @@ export function createInProcessClients(
254
252
  applyAsCaller: (instance, caller) =>
255
253
  agentInstanceCommand.apply(instance, asCaller(caller)),
256
254
  },
257
- // CREATE (not apply) so a duplicate default-instance slug surfaces
258
- // as AlreadyExists instead of silently updating — as the original
259
- // caller (ruling R5).
260
- agentInstanceCreator: {
261
- createAsCaller: (instance, caller) =>
262
- agentInstanceCommand.create(instance, asCaller(caller)),
263
- },
264
255
  parentAgentLoader: {
265
256
  get: (agentId) =>
266
257
  agentQuery.get(create(AgentIdSchema, { value: agentId })),
@@ -6,11 +6,6 @@
6
6
  * the router transport, traversing the whole chain).
7
7
  *
8
8
  * The load-bearing pins:
9
- * - default-agent resolution (stigmer/stigmer#356): NotFound copy when
10
- * nothing is labeled; FailedPrecondition copy when labeled agents
11
- * exist but none is public; incumbent-wins (LOWEST metadata.id) among
12
- * public labeled candidates — an older non-public labeled agent never
13
- * wins;
14
9
  * - MCP env-merge semantics: agent-declared entries win, among servers
15
10
  * first-encountered wins, only declaration fields are copied;
16
11
  * - enabled-tools validation (#402): byte-pinned INVALID_ARGUMENT copy
@@ -46,10 +41,6 @@ import { composeServer } from "../../../boot/compose.js";
46
41
  import type { ComposedServer } from "../../../boot/compose.js";
47
42
  import { createLogger } from "../../../boot/logger.js";
48
43
  import { ResourceNotFoundError } from "../../../store/interface.js";
49
- import {
50
- DEFAULT_AGENT_LABEL,
51
- DEFAULT_AGENT_LABEL_VALUE,
52
- } from "../defaultagent.js";
53
44
 
54
45
  const silentLogger = createLogger({
55
46
  level: "error",
@@ -197,65 +188,6 @@ async function grpcError(run: () => Promise<unknown>): Promise<ConnectError> {
197
188
  }
198
189
  }
199
190
 
200
- // The getDefault tests are order-dependent within this describe: the
201
- // platform default is a GLOBAL singleton, so the empty state must be
202
- // asserted before any labeled agent exists.
203
- describe("agent getDefault (platform default resolution, #356)", () => {
204
- it("answers NotFound with the configured-hint copy when nothing carries the label", async () => {
205
- // org is required for authorization scoping only; resolution is global.
206
- const error = await grpcError(() => query.getDefault({ org: ORG }));
207
- expect(error.code).toBe(Code.NotFound);
208
- expect(error.rawMessage).toBe(
209
- "No default agent available. Ensure an agent with label " +
210
- "stigmer.ai/default-agent=true and visibility_public exists: " +
211
- "no agent labeled stigmer.ai/default-agent=true",
212
- );
213
- });
214
-
215
- it("answers FailedPrecondition when labeled agents exist but none is public", async () => {
216
- await command.create(
217
- agentInput({
218
- name: "Labeled But Org Visible",
219
- labels: { [DEFAULT_AGENT_LABEL]: DEFAULT_AGENT_LABEL_VALUE },
220
- }),
221
- );
222
-
223
- const error = await grpcError(() => query.getDefault({ org: ORG }));
224
- expect(error.code).toBe(Code.FailedPrecondition);
225
- expect(error.rawMessage).toBe(
226
- "Default agent exists but is not visibility_public: agents labeled " +
227
- "stigmer.ai/default-agent=true exist but none is visibility_public",
228
- );
229
- });
230
-
231
- it("serves the incumbent — the LOWEST metadata.id among PUBLIC labeled candidates", async () => {
232
- const first = await command.create(
233
- agentInput({
234
- name: "Public Default One",
235
- visibility: ApiResourceVisibility.visibility_public,
236
- labels: { [DEFAULT_AGENT_LABEL]: DEFAULT_AGENT_LABEL_VALUE },
237
- }),
238
- );
239
- const second = await command.create(
240
- agentInput({
241
- name: "Public Default Two",
242
- visibility: ApiResourceVisibility.visibility_public,
243
- labels: { [DEFAULT_AGENT_LABEL]: DEFAULT_AGENT_LABEL_VALUE },
244
- }),
245
- );
246
-
247
- const firstId = first.metadata!.id;
248
- const secondId = second.metadata!.id;
249
- const incumbentId = firstId < secondId ? firstId : secondId;
250
-
251
- // The older NON-public labeled agent (previous test) has a lower id
252
- // than both public candidates; incumbent-wins must skip it.
253
- // A DIFFERENT org resolves the same singleton — resolution is global.
254
- const resolved = await query.getDefault({ org: "globex" });
255
- expect(resolved.metadata?.id).toBe(incumbentId);
256
- });
257
- });
258
-
259
191
  describe("agent MCP env merge (merge_mcp_env_specs)", () => {
260
192
  it("merges declarations: agent-declared wins, first-encountered server wins, declaration fields copied", async () => {
261
193
  await seedMcpServer({
@@ -4,8 +4,8 @@
4
4
  * default instance through the in-process agentinstance client (the
5
5
  * agent↔agentinstance mutual edge, wired as a lazy provider in the
6
6
  * composition root — sub-project DD-002); delete cascades ALL instances
7
- * (oss#611) and same-org shares before the agent row; GetDefault serves
8
- * the platform default-agent resolution (defaultagent.ts).
7
+ * (oss#611) and same-org shares before the agent row. There is no default
8
+ * agent to serve: a session with no agent runs the built-in assistant.
9
9
  *
10
10
  * Pipeline per RPC mirrors the Go step chains character-for-character.
11
11
  * Proven by agent.conformance.test.ts (CONFORMANCE_TARGET=local) and
@@ -20,10 +20,7 @@ import { AgentCommandController } from "@stigmer/protos/ai/stigmer/agentic/agent
20
20
  import { AgentQueryController } from "@stigmer/protos/ai/stigmer/agentic/agent/v1/query_pb";
21
21
  import { AgentSchema } from "@stigmer/protos/ai/stigmer/agentic/agent/v1/api_pb";
22
22
  import type { Agent } from "@stigmer/protos/ai/stigmer/agentic/agent/v1/api_pb";
23
- import type {
24
- AgentId,
25
- GetDefaultAgentRequest,
26
- } from "@stigmer/protos/ai/stigmer/agentic/agent/v1/io_pb";
23
+ import type { AgentId } from "@stigmer/protos/ai/stigmer/agentic/agent/v1/io_pb";
27
24
  import type {
28
25
  ApiResourceReference,
29
26
  UpdateVisibilityInput,
@@ -98,7 +95,6 @@ import {
98
95
  newCascadeDeleteInstancesStep,
99
96
  newCascadeDeleteSharesStep,
100
97
  newCreateDefaultInstanceStep,
101
- newLoadDefaultAgentStep,
102
98
  newMergeMcpServerEnvSpecsStep,
103
99
  newUpdateAgentStatusWithDefaultInstanceStep,
104
100
  newValidateEnabledToolsStep,
@@ -136,7 +132,6 @@ export function registerAgentServices(
136
132
  router.service(AgentQueryController, {
137
133
  get: (id, ctx) => get(deps, id, ctx),
138
134
  getByReference: (ref, ctx) => getByReference(deps, ref, ctx),
139
- getDefault: (req, ctx) => getDefault(deps, req, ctx),
140
135
  });
141
136
  }
142
137
 
@@ -536,33 +531,3 @@ async function getByReference(
536
531
  .execute(reqCtx);
537
532
  return reqCtx.get(TARGET_RESOURCE_KEY) as Agent;
538
533
  }
539
-
540
- /**
541
- * GetDefault — the platform default agent (label + visibility_public,
542
- * incumbent-wins). Used by frontends for the session-first UX where users
543
- * start a conversation without explicitly selecting an agent.
544
- */
545
- async function getDefault(
546
- deps: AgentControllerDeps,
547
- req: GetDefaultAgentRequest,
548
- ctx: HandlerContext,
549
- ): Promise<Agent> {
550
- const reqCtx = new RequestContext(
551
- AgentQueryController.method.getDefault.input,
552
- req,
553
- callerIdentityOf(ctx),
554
- kindOf(ctx),
555
- );
556
- await newPipeline<typeof AgentQueryController.method.getDefault.input>(
557
- "agent-get-default",
558
- deps.logger,
559
- )
560
- .addStep(
561
- newAuthorizeStep(AgentQueryController.method.getDefault, deps.authorizer),
562
- )
563
- .addStep(newValidateProtoStep())
564
- .addStep(newLoadDefaultAgentStep(deps.store, deps.logger))
565
- .build()
566
- .execute(reqCtx);
567
- return reqCtx.get(TARGET_RESOURCE_KEY) as Agent;
568
- }
@@ -6,7 +6,7 @@
6
6
  * embody agent-specific contracts: the default-instance choreography, the
7
7
  * cascade rules, MCP env merging, and enabled-tools validation.
8
8
  */
9
- import { Code, ConnectError } from "@connectrpc/connect";
9
+ import { ConnectError } from "@connectrpc/connect";
10
10
  import { create, fromBinary } from "@bufbuild/protobuf";
11
11
  import type { DescMessage } from "@bufbuild/protobuf";
12
12
 
@@ -43,15 +43,9 @@ import { notifyDefaultInstanceLinked } from "../../pipeline/steps/authorization-
43
43
  import type { PipelineStep } from "../../pipeline/pipeline.js";
44
44
  import type { RequestContext } from "../../pipeline/request-context.js";
45
45
  import { EXISTING_RESOURCE_KEY } from "../../pipeline/steps/load-existing.js";
46
- import { TARGET_RESOURCE_KEY } from "../../pipeline/steps/load-target.js";
47
46
  import { findResourceBySlug } from "../../pipeline/steps/helpers.js";
48
47
  import type { Store } from "../../store/interface.js";
49
48
  import { buildDefaultInstanceRequest } from "../agentinstance/defaultinstance.js";
50
- import {
51
- DefaultAgentNotConfiguredError,
52
- DefaultAgentNotPublicError,
53
- findDefaultAgent,
54
- } from "./defaultagent.js";
55
49
 
56
50
  /** Context key carrying the applied default instance's id (Go DefaultInstanceIDKey). */
57
51
  const DEFAULT_INSTANCE_ID_KEY = "default_instance_id";
@@ -636,56 +630,3 @@ export function newCascadeDeleteSharesStep<Desc extends DescMessage>(
636
630
  },
637
631
  };
638
632
  }
639
-
640
- // ---------------------------------------------------------------------------
641
- // LoadDefaultAgent — get_default.go's step: resolve via defaultagent and
642
- // map its sentinels to the wire contract. Go builds the wire message with
643
- // WrapError ("%s: %v"), so the sentinel's text RIDES the message — both
644
- // strings are cross-edition conformance surface.
645
- // ---------------------------------------------------------------------------
646
-
647
- export function newLoadDefaultAgentStep<Desc extends DescMessage>(
648
- store: Store,
649
- logger: Logger,
650
- ): PipelineStep<Desc> {
651
- return {
652
- name: "LoadDefaultAgent",
653
- async execute(ctx: RequestContext<Desc>): Promise<void> {
654
- logger.info("Resolving platform default agent");
655
-
656
- let agent: Agent;
657
- try {
658
- agent = await findDefaultAgent(store, logger);
659
- } catch (error) {
660
- if (error instanceof DefaultAgentNotConfiguredError) {
661
- throw new ConnectError(
662
- `No default agent available. Ensure an agent with label stigmer.ai/default-agent=true and visibility_public exists: ${error.message}`,
663
- Code.NotFound,
664
- );
665
- }
666
- if (error instanceof DefaultAgentNotPublicError) {
667
- throw new ConnectError(
668
- `Default agent exists but is not visibility_public: ${error.message}`,
669
- Code.FailedPrecondition,
670
- );
671
- }
672
- // Store/decode failure — an internal fault, not "no default agent".
673
- // InternalError keeps the cause off the wire (stigmer/stigmer#478).
674
- logger.error("Failed to resolve platform default agent", {
675
- error: error instanceof Error ? error.message : String(error),
676
- });
677
- throw internalError(
678
- error,
679
- "failed to resolve the platform default agent",
680
- );
681
- }
682
-
683
- logger.info("Resolved platform default agent", {
684
- agentId: agent.metadata?.id ?? "",
685
- agentName: agent.metadata?.name ?? "",
686
- });
687
-
688
- ctx.set(TARGET_RESOURCE_KEY, agent);
689
- },
690
- };
691
- }