@wildo-ai/saas-specifications 1.1.15 → 1.1.16

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 (54) hide show
  1. package/dist/esm/application-creation/playbooks.application-creation.schemas.d.ts +5 -4
  2. package/dist/esm/application-creation/playbooks.application-creation.schemas.d.ts.map +1 -1
  3. package/dist/esm/application-creation/playbooks.application-creation.schemas.js +5 -4
  4. package/dist/esm/application-creation/playbooks.application-creation.schemas.js.map +1 -1
  5. package/dist/esm/assurance/assurance-authority-basis.definitions.d.ts +1 -1
  6. package/dist/esm/assurance/assurance-authority-basis.definitions.js +1 -1
  7. package/dist/esm/assurance/assurance-authority-basis.definitions.js.map +1 -1
  8. package/dist/esm/assurance/assurance-evidence-requirement-bodies.definitions.d.ts.map +1 -1
  9. package/dist/esm/assurance/assurance-evidence-requirement-bodies.definitions.js +13 -5
  10. package/dist/esm/assurance/assurance-evidence-requirement-bodies.definitions.js.map +1 -1
  11. package/dist/esm/assurance/assurance-objective-catalog.definitions.d.ts.map +1 -1
  12. package/dist/esm/assurance/assurance-objective-catalog.definitions.js +9 -2
  13. package/dist/esm/assurance/assurance-objective-catalog.definitions.js.map +1 -1
  14. package/dist/esm/assurance/assurance-verification-requirement-bodies.definitions.d.ts.map +1 -1
  15. package/dist/esm/assurance/assurance-verification-requirement-bodies.definitions.js +8 -4
  16. package/dist/esm/assurance/assurance-verification-requirement-bodies.definitions.js.map +1 -1
  17. package/dist/esm/engine/compliance/resources/signature-requests.resource.specification.d.ts.map +1 -1
  18. package/dist/esm/engine/compliance/resources/signature-requests.resource.specification.js +8 -5
  19. package/dist/esm/engine/compliance/resources/signature-requests.resource.specification.js.map +1 -1
  20. package/dist/esm/engine/engine-resource-specifications.registry.d.ts.map +1 -1
  21. package/dist/esm/engine/engine-resource-specifications.registry.js +4 -0
  22. package/dist/esm/engine/engine-resource-specifications.registry.js.map +1 -1
  23. package/dist/esm/engine/flows-actors/resources/actor-system-executions.resource.specification.d.ts.map +1 -1
  24. package/dist/esm/engine/flows-actors/resources/actor-system-executions.resource.specification.js +4 -1
  25. package/dist/esm/engine/flows-actors/resources/actor-system-executions.resource.specification.js.map +1 -1
  26. package/dist/esm/engine/flows-actors/resources/actor-tasks.resource.specification.d.ts.map +1 -1
  27. package/dist/esm/engine/flows-actors/resources/actor-tasks.resource.specification.js +3 -0
  28. package/dist/esm/engine/flows-actors/resources/actor-tasks.resource.specification.js.map +1 -1
  29. package/dist/esm/engine/flows-actors/resources/remote-agent-task-updates.resource.specification.d.ts +3 -0
  30. package/dist/esm/engine/flows-actors/resources/remote-agent-task-updates.resource.specification.d.ts.map +1 -0
  31. package/dist/esm/engine/flows-actors/resources/remote-agent-task-updates.resource.specification.js +98 -0
  32. package/dist/esm/engine/flows-actors/resources/remote-agent-task-updates.resource.specification.js.map +1 -0
  33. package/dist/esm/engine/flows-actors/resources/remote-agent-tasks.resource.specification.d.ts +3 -0
  34. package/dist/esm/engine/flows-actors/resources/remote-agent-tasks.resource.specification.d.ts.map +1 -0
  35. package/dist/esm/engine/flows-actors/resources/remote-agent-tasks.resource.specification.js +132 -0
  36. package/dist/esm/engine/flows-actors/resources/remote-agent-tasks.resource.specification.js.map +1 -0
  37. package/dist/esm/engine/frontend-components/app/app-layout-agent-activity-settings.frontend-component.specification.d.ts +5 -0
  38. package/dist/esm/engine/frontend-components/app/app-layout-agent-activity-settings.frontend-component.specification.d.ts.map +1 -0
  39. package/dist/esm/engine/frontend-components/app/app-layout-agent-activity-settings.frontend-component.specification.js +79 -0
  40. package/dist/esm/engine/frontend-components/app/app-layout-agent-activity-settings.frontend-component.specification.js.map +1 -0
  41. package/dist/esm/engine/frontend-components/index.d.ts +1 -0
  42. package/dist/esm/engine/frontend-components/index.d.ts.map +1 -1
  43. package/dist/esm/engine/frontend-components/index.js +3 -0
  44. package/dist/esm/engine/frontend-components/index.js.map +1 -1
  45. package/dist/esm/engine/notifications/system-emails/delegated-work.system-emails.specification.d.ts +8 -0
  46. package/dist/esm/engine/notifications/system-emails/delegated-work.system-emails.specification.d.ts.map +1 -0
  47. package/dist/esm/engine/notifications/system-emails/delegated-work.system-emails.specification.js +65 -0
  48. package/dist/esm/engine/notifications/system-emails/delegated-work.system-emails.specification.js.map +1 -0
  49. package/dist/esm/engine/notifications/system-emails/index.d.ts +1 -0
  50. package/dist/esm/engine/notifications/system-emails/index.d.ts.map +1 -1
  51. package/dist/esm/engine/notifications/system-emails/index.js +3 -1
  52. package/dist/esm/engine/notifications/system-emails/index.js.map +1 -1
  53. package/dist/tsconfig.build.tsbuildinfo +1 -1
  54. package/package.json +8 -8
@@ -1 +1 @@
1
- {"version":3,"file":"actor-system-executions.resource.specification.js","sourceRoot":"","sources":["../../../../../src/engine/flows-actors/resources/actor-system-executions.resource.specification.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AACpE,OAAO,EAAE,mBAAmB,EAAE,cAAc,EAAE,uBAAuB,EAAE,MAAM,0BAA0B,CAAC;AACxG,OAAO,EACL,gCAAgC,EAChC,qBAAqB,IAAI,EAAE,EAC3B,kBAAkB,EAClB,2BAA2B,EAC3B,uBAAuB,EACvB,oBAAoB,EACpB,gEAAgE,IAAI,4BAA4B,GACjG,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAuC,sBAAsB,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AACjI,OAAO,EAAE,uBAAuB,EAAE,MAAM,kCAAkC,CAAC;AAE3E,MAAM,eAAe,GAAG,CAAC,UAAkB,EAAE,EAAE,CAAC,CAAC;IAC/C,WAAW,EAAE,uBAAuB;IACpC,UAAU;IACV,UAAU,EAAE,cAAc,CAAC,IAAI;IAC/B,eAAe,EAAE,mBAAmB,CAAC,eAAe;CACrD,CAAC,CAAC;AAEH,0GAA0G;AAC1G,MAAM,CAAC,MAAM,oBAAoB,GAAG;IAClC,CAAC,kBAAkB,CA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AE,OAAO,EAAE,gBAAgB,EAAE,CAAC;SACvF;QACD,CAAC,EAAE,CAAC,MAAM,CAAC,EAAE;YACX,OAAO,EAAE,0EAA0E;YACnF,OAAO,EAAE,6CAA6C;YACtD,UAAU,EAAE,IAAI;SACjB;KACF;IAED,mBAAmB,EAAE;QACnB,8IAA8I;QAC9I,4GAA4G;QAC5G,8DAA8D;QAC9D,mIAAmI;KACpI;CACF,CAAC,EACF,EAAE,oBAAoB,EAAE,oBAAoB,CAAC,aAAa,EAAE,CAC7D,CAAC","sourcesContent":["/**\n * Resource: `actorSystemExecutions` — Wildo SaaS engine specification (organization-scoped storage, engine-written). #2539.\n *\n * Inputs:\n * - Schema: `ActorSystemExecutionRecordSchema` (`flows-actors/actor-plane-rows.shared.schemas.ts`)\n * - Factory: `actorSystemExecutionsResourceConfiguration_InitializationFactory`\n * - Writer: `ApplicationActorExecutionPersistence`, the application's binding of `ActorExecutionPersistencePort`.\n * - Readers: the actor runtime (`ActorsSystemBackendService`) and the decision inbox's actor-system host.\n *\n * Why the structured state is serialized beside filterable columns, and why the rows are organization-scoped rather\n * than polymorphic, is the schema file's header; it is not restated here.\n */\nimport { LabelAudience } from '@wildo-ai/presets-components-models';\nimport { CodeDeclarationKind, CodeSymbolKind, FieldSemanticImportance } from '@wildo-ai/zod-decorators';\nimport {\n ActorSystemExecutionRecordSchema,\n CoreResourceOperation as Op,\n FlowsActors_Status,\n HumanDecision_RequesterKind,\n HumanDecision_RouteKind,\n ResourcePrimaryScope,\n actorSystemExecutionsResourceConfiguration_InitializationFactory as actorSystemExecutionsFactory,\n} from '@wildo-ai/saas-models';\nimport { type AnyResourceSpecificationConfig, HttpResponseStatusCode, resourceSpecification } from '~wildo-specifications/_core';\nimport { EngineResourceSubDomain } from '../../engine-resource-sub-domain';\n\nconst enumDeclaration = (exportName: string) => ({\n packageName: '@wildo-ai/saas-models',\n exportName,\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n});\n\n/** The run-status vocabulary, worded for an actor run (the conversational family words it for a turn). */\nexport const actorRunStatusValues = {\n [FlowsActors_Status.READY]: { meaning: 'Created and not yet started. Not written by the actor runtime today.' },\n [FlowsActors_Status.PENDING]: { meaning: 'Selected but not started: the host opened the run deferred and starts it once it can begin.' },\n [FlowsActors_Status.PROCESSING]: { meaning: 'Running: the host is executing the work, or continuing it after an answer.' },\n [FlowsActors_Status.AWAITING_APPROVAL]: { meaning: 'Waiting on a person: the run asked a question and stands until it is answered or withdrawn. Non-terminal.' },\n [FlowsActors_Status.COMPLETED]: { meaning: 'Finished: the work reached its own conclusion.' },\n [FlowsActors_Status.FAILED]: { meaning: 'Finished unsuccessfully: the work threw, or its host concluded it failed.' },\n [FlowsActors_Status.CANCELLED]: { meaning: 'Withdrawn by a person while it waited on a question; nothing was continued.' },\n [FlowsActors_Status.ABORTED]: { meaning: 'Stopped by the system rather than by a person: its admission was refused, or the person it asked on behalf of lost their authority while the question waited (or was erased), so no answer could be carried out. A run whose process went away while it ran is ABORTED too, once its liveness lease lapses (or put back on the question it was continuing).' },\n};\n\nexport const actorSystemExecutionsResourceSpecification: AnyResourceSpecificationConfig = resourceSpecification(\n actorSystemExecutionsFactory,\n ActorSystemExecutionRecordSchema,\n ({ schemaShape }) => ({\n purpose: 'Record each run of an actor system an application performs for an organization: where it stands and, while it waits on a person, the question it asked and what its resume needs.',\n businessRole: 'What lets an application\\'s own actor run stop to ask a person — a review of the actor\\'s work, or a question it cannot answer alone — and continue under the same identity once that person answers from the decision inbox.',\n lifecycleRole: 'Opened by the actor runtime when a run starts, moved on every status change by the engine\\'s persistence, and deleted with its organization.',\n audience: LabelAudience.DEVELOPER,\n subDomain: EngineResourceSubDomain.FLOWS_ACTORS,\n codeHandling: {\n mainSchema: { packageName: '@wildo-ai/saas-models', exportName: 'ActorSystemExecutionRecordSchema', symbolKind: CodeSymbolKind.SCHEMA, declarationKind: CodeDeclarationKind.ZOD_SCHEMA },\n resourceFactory: { packageName: '@wildo-ai/saas-models', exportName: 'actorSystemExecutionsResourceConfiguration_InitializationFactory', symbolKind: CodeSymbolKind.FACTORY, declarationKind: CodeDeclarationKind.FUNCTION },\n resourceType: { enumDeclaration: enumDeclaration('CoreResourceType'), memberName: 'ACTOR_SYSTEM_EXECUTIONS' },\n operationVocabulary: { coreEnum: enumDeclaration('CoreResourceOperation') },\n notes: [\n 'Every operation is route-less: CREATE, READ, LIST and UPDATE are REPOSITORY_ONLY and DELETE is INTERNAL_CALL (the tenant purge\\'s composition cascade). The roles are never exercised by a request.',\n 'The move out of waiting is a guarded repository mutation matching status, suspension id and route version in one statement (#1586), never a read followed by a write.',\n 'The purge\\'s cascade ends a question a waiting run holds before it deletes the run (#2680): the same guarded move, inside the purge\\'s transaction, withdrawn by nobody, with the resolved record and the holders\\' notice after the commit and no agent-work record.',\n 'The platform keeps its own copy of this plane (`wildoApplicationActorSystemExecutions`) for the runs that build an application; these rows are the runs an application performs.',\n 'A person\\'s erasure reaches these rows through the engine\\'s subject-reference severer, not the erasure graph (no USERS edge): inside the erasure\\'s transaction it ends a question they raised (REQUESTER_AUTHORITY_LAPSED, nobody deciding), gives a question assigned to them back to its role, and removes their id from the history, from an owed review record and from `namedUserIds`. The run stays; a run under a legal hold is left as it is (#2630).',\n ],\n },\n\n fields: {\n _id: schemaShape._id.stringSpec({ meaning: 'Identity of the run. The actor runtime names the run by it everywhere: its tasks, its question, its resume.', semanticRole: 'identifier' }),\n organizationId: schemaShape.organizationId.foreignKeySpec({\n meaning: 'The organization the run works for.',\n whyItMatters: 'Its questions are routed to reviewers in this organization, and the run is deleted with it. A run with no organization is refused rather than given a guessed one.',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n systemRef: schemaShape.systemRef.stringSpec({ meaning: 'The registered actor system this is a run of.', whyItMatters: 'It selects the continuation that resumes the run once its question is answered.', semanticRole: 'code', importance: FieldSemanticImportance.PRIMARY }),\n status: schemaShape.status.enumSpec({\n meaning: 'Where the run stands.',\n importance: FieldSemanticImportance.PRIMARY,\n enumDeclaration: enumDeclaration('FlowsActors_Status'),\n values: actorRunStatusValues,\n }),\n statusChanges: schemaShape.statusChanges.arraySpec({\n meaning: 'The run\\'s history, oldest first.',\n elementMeaning: 'One move: the status the run entered and when; on a move out of waiting, also the decision it settled, how it ended, who decided and when, written in the same statement as the move.',\n }),\n exclusiveSubject: schemaShape.exclusiveSubject.stringSpec({\n meaning: 'What the run holds exclusively while it is running, when its host opened it that way.',\n whyItMatters: 'Another run of the same system on the same subject is refused while this one is pending or running. A waiting run does not hold it.',\n semanticRole: 'identifier',\n }),\n caseRef: schemaShape.caseRef.objectSpec({\n meaning: 'The case the run works on: a row of a resource declared `workUnit: true`.',\n whyItMatters: 'Every model call of the run, and of its continuation after an answer, is attributed to this case.',\n }),\n suspension: schemaShape.suspension.stringSpec({\n meaning: 'While the run waits: the question asked (its title, description, fields and options), who may answer it, who raised it, and when — serialized.',\n whyItMatters: 'Backend-only: listing it would tell a reader that a decision exists. Parsed against the engine\\'s suspension schema at every read.',\n }),\n suspensionId: schemaShape.suspensionId.stringSpec({\n meaning: 'The identity of the question the run waits on.',\n whyItMatters: 'The move out of waiting matches it in the same statement as the write, so of an answer and a withdrawal sent together only one moves the run.',\n semanticRole: 'identifier',\n }),\n pendingDecisionRef: schemaShape.pendingDecisionRef.stringSpec({\n meaning: 'The id of the decision the run waits on, present only while it waits.',\n whyItMatters: 'The inbox\\'s act route addresses the decision by this id alone, and reads who may act from the row.',\n semanticRole: 'identifier',\n }),\n pendingDecisionRouteKind: schemaShape.pendingDecisionRouteKind.enumSpec({\n meaning: 'Who may answer the waiting question.',\n whyItMatters: 'The inbox selects the rows a person may see on it; the one authorization predicate then decides.',\n enumDeclaration: enumDeclaration('HumanDecision_RouteKind'),\n values: {\n [HumanDecision_RouteKind.OWNER]: { meaning: 'Only the person on whose behalf the run asked.' },\n [HumanDecision_RouteKind.ASSIGNEE]: { meaning: 'One named person, who must hold the eligible role.' },\n [HumanDecision_RouteKind.ROLE]: { meaning: 'Anyone holding the eligible role in the organization, except the person who raised it. A role held through an organization relationship counts only when the requester acts through that same relationship or is one of the organization\\'s own, and in both cases only when the relationship may read the record the decision is about; a decision about no record the engine can name counts it only when the requester acts through that relationship (#2614, #2734).' },\n },\n }),\n pendingDecisionOrganizationId: schemaShape.pendingDecisionOrganizationId.stringSpec({ meaning: 'The organization the waiting question\\'s role is matched in.', semanticRole: 'identifier' }),\n pendingDecisionAssigneeUserId: schemaShape.pendingDecisionAssigneeUserId.stringSpec({ meaning: 'The one person an ASSIGNEE question is routed to.', semanticRole: 'identifier' }),\n pendingDecisionRequesterKind: schemaShape.pendingDecisionRequesterKind.enumSpec({\n meaning: 'What kind of principal the run raised its question under.',\n enumDeclaration: enumDeclaration('HumanDecision_RequesterKind'),\n values: {\n [HumanDecision_RequesterKind.USER]: { meaning: 'A signed-in person.' },\n [HumanDecision_RequesterKind.MACHINE]: { meaning: 'A machine credential; it can never answer its own question.' },\n [HumanDecision_RequesterKind.DELEGATED_CLIENT]: { meaning: 'An external client acting for a person.' },\n },\n }),\n pendingDecisionRequesterRef: schemaShape.pendingDecisionRequesterRef.stringSpec({\n meaning: 'Who raised the waiting question: a user id, or a machine credential id.',\n whyItMatters: 'Separation of duties: under a reviewer route the requester can never answer their own question.',\n semanticRole: 'identifier',\n }),\n pendingDecisionRouteVersion: schemaShape.pendingDecisionRouteVersion.numberSpec({ meaning: 'Bumped by a move of the waiting question\\'s route; an answer read under an older route loses.' }),\n namedUserIds: schemaShape.namedUserIds.arraySpec({\n meaning: 'Every person the run has named, by user id: a question\\'s requester when that is a person, its assignee, and who decided each of its decisions.',\n elementMeaning: 'One person\\'s user id, added by the write that named them.',\n whyItMatters: 'The one place either store can find the runs a person is named on, since the question and the history are serialized or nested. A person\\'s erasure reads it to find the runs to remove them from, and removes them from it (#2630).',\n }),\n checkpoint: schemaShape.checkpoint.stringSpec({\n meaning: 'The host\\'s inputs for continuing the run, serialized. Opaque to the engine.',\n whyItMatters: 'Written when the run suspends, so a continuation in another process — after a restart — rebuilds what the run was doing.',\n }),\n pendingCorrectionRecord: schemaShape.pendingCorrectionRecord.stringSpec({\n meaning: 'The agent-work record a settled review of the actor\\'s work still owes, serialized: written by the move that settled it, cleared once the record exists.',\n whyItMatters: 'A process that dies between the settle and the record leaves the debt on the row, and the repair sweep writes it.',\n }),\n pendingCorrectionRecordRef: schemaShape.pendingCorrectionRecordRef.stringSpec({ meaning: 'The key of that owed record: what the repair sweep selects on, and what the clear compares.', semanticRole: 'identifier' }),\n createdAt: schemaShape.createdAt.dateSpec({ meaning: 'When the run was opened.', temporalRole: 'creation' }),\n updatedAt: schemaShape.updatedAt.dateSpec({ meaning: 'When the run last moved.', temporalRole: 'modified' }),\n finishedAt: schemaShape.finishedAt.dateSpec({ meaning: 'When the run ended. Absent while it runs or waits.', temporalRole: 'occurred' }),\n leaseExpiresAt: schemaShape.leaseExpiresAt.dateSpec({\n meaning: 'While the run is processing: the instant after which no process vouches for it. The process running it pushes it forward; every move out of processing clears it.',\n whyItMatters: 'An application may run as several processes. A run whose process died is found by this lapsing: the every-minute sweep puts it back on its question or ends it, and its single-flight subject is free again.',\n temporalRole: 'expiration',\n }),\n },\n\n operations: {\n [Op.CREATE]: {\n purpose: 'Open a run.',\n outcome: 'The run exists, and its task is opened next.',\n responseStatuses: [{ code: HttpResponseStatusCode.CREATED_201, meaning: 'The run was opened. Internal write path.' }],\n },\n [Op.READ]: {\n purpose: 'Read one run for the actor runtime or the decision inbox.',\n outcome: 'The run is returned to the internal caller.',\n idempotent: true,\n responseStatuses: [{ code: HttpResponseStatusCode.OK_200, meaning: 'The run was found.' }],\n },\n [Op.LIST]: {\n purpose: 'List runs for the actor runtime or the decision inbox.',\n outcome: 'The runs are returned to the internal caller.',\n idempotent: true,\n responseStatuses: [{ code: HttpResponseStatusCode.OK_200, meaning: 'The runs were returned.' }],\n },\n [Op.UPDATE]: {\n purpose: 'Move a run, or write its question and checkpoint. Internal write path.',\n outcome: 'The run stands where the actor runtime moved it.',\n responseStatuses: [{ code: HttpResponseStatusCode.OK_200, meaning: 'The run moved.' }],\n },\n [Op.DELETE]: {\n purpose: 'Internal cleanup: the tenant purge\\'s cascade. No public deletion route.',\n outcome: 'A deleted organization\\'s runs are removed.',\n idempotent: true,\n },\n },\n\n businessConstraints: [\n 'Written only by the engine\\'s persistence port; a person reaches a waiting question through the decision inbox, never through this resource.',\n 'A run is taken out of waiting by one guarded statement; of two decisions sent together, only one moves it.',\n 'Every run belongs to an organization and is deleted with it.',\n 'A person\\'s erasure removes their id from every run that names them and keeps the run; nobody is chosen to answer in their place.',\n ],\n }),\n { resourcePrimaryScope: ResourcePrimaryScope.ORGANIZATIONS },\n);\n"]}
1
+ {"version":3,"file":"actor-system-executions.resource.specification.js","sourceRoot":"","sources":["../../../../../src/engine/flows-actors/resources/actor-system-executions.resource.specification.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AACpE,OAAO,EAAE,mBAAmB,EAAE,cAAc,EAAE,uBAAuB,EAAE,MAAM,0BAA0B,CAAC;AACxG,OAAO,EACL,gCAAgC,EAChC,qBAAqB,IAAI,EAAE,EAC3B,kBAAkB,EAClB,2BAA2B,EAC3B,uBAAuB,EACvB,oBAAoB,EACpB,gEAAgE,IAAI,4BAA4B,GACjG,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAuC,sBAAsB,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AACjI,OAAO,EAAE,uBAAuB,EAAE,MAAM,kCAAkC,CAAC;AAE3E,MAAM,eAAe,GAAG,CAAC,UAAkB,EAAE,EAAE,CAAC,CAAC;IAC/C,WAAW,EAAE,uBAAuB;IACpC,UAAU;IACV,UAAU,EAAE,cAAc,CAAC,IAAI;IAC/B,eAAe,EAAE,mBAAmB,CAAC,eAAe;CACrD,CAAC,CAAC;AAEH,0GAA0G;AAC1G,MAAM,CAAC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AAC,EAAE,IAAI,EAAE,sBAAsB,CAAC,MAAM,EAAE,OAAO,EAAE,gBAAgB,EAAE,CAAC;SACvF;QACD,CAAC,EAAE,CAAC,MAAM,CAAC,EAAE;YACX,OAAO,EAAE,0EAA0E;YACnF,OAAO,EAAE,6CAA6C;YACtD,UAAU,EAAE,IAAI;SACjB;KACF;IAED,mBAAmB,EAAE;QACnB,8IAA8I;QAC9I,sQAAsQ;QACtQ,4GAA4G;QAC5G,8DAA8D;QAC9D,mIAAmI;KACpI;CACF,CAAC,EACF,EAAE,oBAAoB,EAAE,oBAAoB,CAAC,aAAa,EAAE,CAC7D,CAAC","sourcesContent":["/**\n * Resource: `actorSystemExecutions` — Wildo SaaS engine specification (organization-scoped storage, engine-written). #2539.\n *\n * Inputs:\n * - Schema: `ActorSystemExecutionRecordSchema` (`flows-actors/actor-plane-rows.shared.schemas.ts`)\n * - Factory: `actorSystemExecutionsResourceConfiguration_InitializationFactory`\n * - Writer: `ApplicationActorExecutionPersistence`, the application's binding of `ActorExecutionPersistencePort`.\n * - Readers: the actor runtime (`ActorsSystemBackendService`) and the decision inbox's actor-system host.\n * - And the Agent activity routes (#3990, `POST /flows-actors/agent-activity` and `/agent-activity/run`), on the\n * infrastructure tier, projected onto a published contract that leaves out every backend-only field.\n *\n * Why the structured state is serialized beside filterable columns, and why the rows are organization-scoped rather\n * than polymorphic, is the schema file's header; it is not restated here.\n */\nimport { LabelAudience } from '@wildo-ai/presets-components-models';\nimport { CodeDeclarationKind, CodeSymbolKind, FieldSemanticImportance } from '@wildo-ai/zod-decorators';\nimport {\n ActorSystemExecutionRecordSchema,\n CoreResourceOperation as Op,\n FlowsActors_Status,\n HumanDecision_RequesterKind,\n HumanDecision_RouteKind,\n ResourcePrimaryScope,\n actorSystemExecutionsResourceConfiguration_InitializationFactory as actorSystemExecutionsFactory,\n} from '@wildo-ai/saas-models';\nimport { type AnyResourceSpecificationConfig, HttpResponseStatusCode, resourceSpecification } from '~wildo-specifications/_core';\nimport { EngineResourceSubDomain } from '../../engine-resource-sub-domain';\n\nconst enumDeclaration = (exportName: string) => ({\n packageName: '@wildo-ai/saas-models',\n exportName,\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n});\n\n/** The run-status vocabulary, worded for an actor run (the conversational family words it for a turn). */\nexport const actorRunStatusValues = {\n [FlowsActors_Status.READY]: { meaning: 'Created and not yet started. Not written by the actor runtime today.' },\n [FlowsActors_Status.PENDING]: { meaning: 'Selected but not started: the host opened the run deferred and starts it once it can begin.' },\n [FlowsActors_Status.PROCESSING]: { meaning: 'Running: the host is executing the work, or continuing it after an answer.' },\n [FlowsActors_Status.AWAITING_APPROVAL]: { meaning: 'Waiting on a person: the run asked a question and stands until it is answered or withdrawn. Non-terminal.' },\n [FlowsActors_Status.COMPLETED]: { meaning: 'Finished: the work reached its own conclusion.' },\n [FlowsActors_Status.FAILED]: { meaning: 'Finished unsuccessfully: the work threw, or its host concluded it failed.' },\n [FlowsActors_Status.CANCELLED]: { meaning: 'Withdrawn by a person while it waited on a question; nothing was continued.' },\n [FlowsActors_Status.ABORTED]: { meaning: 'Stopped by the system rather than by a person: its admission was refused, or the person it asked on behalf of lost their authority while the question waited (or was erased), so no answer could be carried out. A run whose process went away while it ran is ABORTED too, once its liveness lease lapses (or put back on the question it was continuing).' },\n};\n\nexport const actorSystemExecutionsResourceSpecification: AnyResourceSpecificationConfig = resourceSpecification(\n actorSystemExecutionsFactory,\n ActorSystemExecutionRecordSchema,\n ({ schemaShape }) => ({\n purpose: 'Record each run of an actor system an application performs for an organization: where it stands and, while it waits on a person, the question it asked and what its resume needs.',\n businessRole: 'What lets an application\\'s own actor run stop to ask a person — a review of the actor\\'s work, or a question it cannot answer alone — and continue under the same identity once that person answers from the decision inbox.',\n lifecycleRole: 'Opened by the actor runtime when a run starts, moved on every status change by the engine\\'s persistence, and deleted with its organization.',\n audience: LabelAudience.DEVELOPER,\n subDomain: EngineResourceSubDomain.FLOWS_ACTORS,\n codeHandling: {\n mainSchema: { packageName: '@wildo-ai/saas-models', exportName: 'ActorSystemExecutionRecordSchema', symbolKind: CodeSymbolKind.SCHEMA, declarationKind: CodeDeclarationKind.ZOD_SCHEMA },\n resourceFactory: { packageName: '@wildo-ai/saas-models', exportName: 'actorSystemExecutionsResourceConfiguration_InitializationFactory', symbolKind: CodeSymbolKind.FACTORY, declarationKind: CodeDeclarationKind.FUNCTION },\n resourceType: { enumDeclaration: enumDeclaration('CoreResourceType'), memberName: 'ACTOR_SYSTEM_EXECUTIONS' },\n operationVocabulary: { coreEnum: enumDeclaration('CoreResourceOperation') },\n notes: [\n 'Every operation is route-less: CREATE, READ, LIST and UPDATE are REPOSITORY_ONLY and DELETE is INTERNAL_CALL (the tenant purge\\'s composition cascade). The roles are never exercised by a request.',\n 'The move out of waiting is a guarded repository mutation matching status, suspension id and route version in one statement (#1586), never a read followed by a write.',\n 'The purge\\'s cascade ends a question a waiting run holds before it deletes the run (#2680): the same guarded move, inside the purge\\'s transaction, withdrawn by nobody, with the resolved record and the holders\\' notice after the commit and no agent-work record.',\n 'The platform keeps its own copy of this plane (`wildoApplicationActorSystemExecutions`) for the runs that build an application; these rows are the runs an application performs.',\n 'A person\\'s erasure reaches these rows through the engine\\'s subject-reference severer, not the erasure graph (no USERS edge): inside the erasure\\'s transaction it ends a question they raised (REQUESTER_AUTHORITY_LAPSED, nobody deciding), gives a question assigned to them back to its role, and removes their id from the history, from an owed review record and from `namedUserIds`. The run stays; a run under a legal hold is left as it is (#2630).',\n ],\n },\n\n fields: {\n _id: schemaShape._id.stringSpec({ meaning: 'Identity of the run. The actor runtime names the run by it everywhere: its tasks, its question, its resume.', semanticRole: 'identifier' }),\n organizationId: schemaShape.organizationId.foreignKeySpec({\n meaning: 'The organization the run works for.',\n whyItMatters: 'Its questions are routed to reviewers in this organization, and the run is deleted with it. A run with no organization is refused rather than given a guessed one.',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n systemRef: schemaShape.systemRef.stringSpec({ meaning: 'The registered actor system this is a run of.', whyItMatters: 'It selects the continuation that resumes the run once its question is answered.', semanticRole: 'code', importance: FieldSemanticImportance.PRIMARY }),\n status: schemaShape.status.enumSpec({\n meaning: 'Where the run stands.',\n importance: FieldSemanticImportance.PRIMARY,\n enumDeclaration: enumDeclaration('FlowsActors_Status'),\n values: actorRunStatusValues,\n }),\n statusChanges: schemaShape.statusChanges.arraySpec({\n meaning: 'The run\\'s history, oldest first.',\n elementMeaning: 'One move: the status the run entered and when; on a move out of waiting, also the decision it settled, how it ended, who decided and when, written in the same statement as the move.',\n }),\n exclusiveSubject: schemaShape.exclusiveSubject.stringSpec({\n meaning: 'What the run holds exclusively while it is running, when its host opened it that way.',\n whyItMatters: 'Another run of the same system on the same subject is refused while this one is pending or running. A waiting run does not hold it.',\n semanticRole: 'identifier',\n }),\n caseRef: schemaShape.caseRef.objectSpec({\n meaning: 'The case the run works on: a row of a resource declared `workUnit: true`.',\n whyItMatters: 'Every model call of the run, and of its continuation after an answer, is attributed to this case.',\n }),\n suspension: schemaShape.suspension.stringSpec({\n meaning: 'While the run waits: the question asked (its title, description, fields and options), who may answer it, who raised it, and when — serialized.',\n whyItMatters: 'Backend-only: listing it would tell a reader that a decision exists. Parsed against the engine\\'s suspension schema at every read.',\n }),\n suspensionId: schemaShape.suspensionId.stringSpec({\n meaning: 'The identity of the question the run waits on.',\n whyItMatters: 'The move out of waiting matches it in the same statement as the write, so of an answer and a withdrawal sent together only one moves the run.',\n semanticRole: 'identifier',\n }),\n pendingDecisionRef: schemaShape.pendingDecisionRef.stringSpec({\n meaning: 'The id of the decision the run waits on, present only while it waits.',\n whyItMatters: 'The inbox\\'s act route addresses the decision by this id alone, and reads who may act from the row.',\n semanticRole: 'identifier',\n }),\n pendingDecisionRouteKind: schemaShape.pendingDecisionRouteKind.enumSpec({\n meaning: 'Who may answer the waiting question.',\n whyItMatters: 'The inbox selects the rows a person may see on it; the one authorization predicate then decides.',\n enumDeclaration: enumDeclaration('HumanDecision_RouteKind'),\n values: {\n [HumanDecision_RouteKind.OWNER]: { meaning: 'Only the person on whose behalf the run asked.' },\n [HumanDecision_RouteKind.ASSIGNEE]: { meaning: 'One named person, who must hold the eligible role.' },\n [HumanDecision_RouteKind.ROLE]: { meaning: 'Anyone holding the eligible role in the organization, except the person who raised it. A role held through an organization relationship counts only when the requester acts through that same relationship or is one of the organization\\'s own, and in both cases only when the relationship may read the record the decision is about; a decision about no record the engine can name counts it only when the requester acts through that relationship (#2614, #2734).' },\n },\n }),\n pendingDecisionOrganizationId: schemaShape.pendingDecisionOrganizationId.stringSpec({ meaning: 'The organization the waiting question\\'s role is matched in.', semanticRole: 'identifier' }),\n pendingDecisionAssigneeUserId: schemaShape.pendingDecisionAssigneeUserId.stringSpec({ meaning: 'The one person an ASSIGNEE question is routed to.', semanticRole: 'identifier' }),\n pendingDecisionRequesterKind: schemaShape.pendingDecisionRequesterKind.enumSpec({\n meaning: 'What kind of principal the run raised its question under.',\n enumDeclaration: enumDeclaration('HumanDecision_RequesterKind'),\n values: {\n [HumanDecision_RequesterKind.USER]: { meaning: 'A signed-in person.' },\n [HumanDecision_RequesterKind.MACHINE]: { meaning: 'A machine credential; it can never answer its own question.' },\n [HumanDecision_RequesterKind.DELEGATED_CLIENT]: { meaning: 'An external client acting for a person.' },\n },\n }),\n pendingDecisionRequesterRef: schemaShape.pendingDecisionRequesterRef.stringSpec({\n meaning: 'Who raised the waiting question: a user id, or a machine credential id.',\n whyItMatters: 'Separation of duties: under a reviewer route the requester can never answer their own question.',\n semanticRole: 'identifier',\n }),\n pendingDecisionRouteVersion: schemaShape.pendingDecisionRouteVersion.numberSpec({ meaning: 'Bumped by a move of the waiting question\\'s route; an answer read under an older route loses.' }),\n namedUserIds: schemaShape.namedUserIds.arraySpec({\n meaning: 'Every person the run has named, by user id: a question\\'s requester when that is a person, its assignee, and who decided each of its decisions.',\n elementMeaning: 'One person\\'s user id, added by the write that named them.',\n whyItMatters: 'The one place either store can find the runs a person is named on, since the question and the history are serialized or nested. A person\\'s erasure reads it to find the runs to remove them from, and removes them from it (#2630).',\n }),\n checkpoint: schemaShape.checkpoint.stringSpec({\n meaning: 'The host\\'s inputs for continuing the run, serialized. Opaque to the engine.',\n whyItMatters: 'Written when the run suspends, so a continuation in another process — after a restart — rebuilds what the run was doing.',\n }),\n pendingCorrectionRecord: schemaShape.pendingCorrectionRecord.stringSpec({\n meaning: 'The agent-work record a settled review of the actor\\'s work still owes, serialized: written by the move that settled it, cleared once the record exists.',\n whyItMatters: 'A process that dies between the settle and the record leaves the debt on the row, and the repair sweep writes it.',\n }),\n pendingCorrectionRecordRef: schemaShape.pendingCorrectionRecordRef.stringSpec({ meaning: 'The key of that owed record: what the repair sweep selects on, and what the clear compares.', semanticRole: 'identifier' }),\n createdAt: schemaShape.createdAt.dateSpec({ meaning: 'When the run was opened.', temporalRole: 'creation' }),\n updatedAt: schemaShape.updatedAt.dateSpec({ meaning: 'When the run last moved.', temporalRole: 'modified' }),\n finishedAt: schemaShape.finishedAt.dateSpec({ meaning: 'When the run ended. Absent while it runs or waits.', temporalRole: 'occurred' }),\n leaseExpiresAt: schemaShape.leaseExpiresAt.dateSpec({\n meaning: 'While the run is processing: the instant after which no process vouches for it. The process running it pushes it forward; every move out of processing clears it.',\n whyItMatters: 'An application may run as several processes. A run whose process died is found by this lapsing: the every-minute sweep puts it back on its question or ends it, and its single-flight subject is free again.',\n temporalRole: 'expiration',\n }),\n },\n\n operations: {\n [Op.CREATE]: {\n purpose: 'Open a run.',\n outcome: 'The run exists, and its task is opened next.',\n responseStatuses: [{ code: HttpResponseStatusCode.CREATED_201, meaning: 'The run was opened. Internal write path.' }],\n },\n [Op.READ]: {\n purpose: 'Read one run for the actor runtime or the decision inbox. (The Agent activity page reads runs through its own routes, on the infrastructure tier, never through this operation.)',\n outcome: 'The run is returned to the internal caller.',\n idempotent: true,\n responseStatuses: [{ code: HttpResponseStatusCode.OK_200, meaning: 'The run was found.' }],\n },\n [Op.LIST]: {\n purpose: 'List runs for the actor runtime or the decision inbox.',\n outcome: 'The runs are returned to the internal caller.',\n idempotent: true,\n responseStatuses: [{ code: HttpResponseStatusCode.OK_200, meaning: 'The runs were returned.' }],\n },\n [Op.UPDATE]: {\n purpose: 'Move a run, or write its question and checkpoint. Internal write path.',\n outcome: 'The run stands where the actor runtime moved it.',\n responseStatuses: [{ code: HttpResponseStatusCode.OK_200, meaning: 'The run moved.' }],\n },\n [Op.DELETE]: {\n purpose: 'Internal cleanup: the tenant purge\\'s cascade. No public deletion route.',\n outcome: 'A deleted organization\\'s runs are removed.',\n idempotent: true,\n },\n },\n\n businessConstraints: [\n 'Written only by the engine\\'s persistence port; a person reaches a waiting question through the decision inbox, never through this resource.',\n 'An organization\\'s administrators, and the application super-administrator under the audit read policy, read what a run did on the Agent activity page (#3990): its system, status, history and tasks, never its question, its resume inputs or the people it names.',\n 'A run is taken out of waiting by one guarded statement; of two decisions sent together, only one moves it.',\n 'Every run belongs to an organization and is deleted with it.',\n 'A person\\'s erasure removes their id from every run that names them and keeps the run; nobody is chosen to answer in their place.',\n ],\n }),\n { resourcePrimaryScope: ResourcePrimaryScope.ORGANIZATIONS },\n);\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"actor-tasks.resource.specification.d.ts","sourceRoot":"","sources":["../../../../../src/engine/flows-actors/resources/actor-tasks.resource.specification.ts"],"names":[],"mappings":"AAkBA,OAAO,EAAE,KAAK,8BAA8B,EAAiD,MAAM,6BAA6B,CAAC;AAWjI,eAAO,MAAM,+BAA+B,EAAE,8BA+F7C,CAAC"}
1
+ {"version":3,"file":"actor-tasks.resource.specification.d.ts","sourceRoot":"","sources":["../../../../../src/engine/flows-actors/resources/actor-tasks.resource.specification.ts"],"names":[],"mappings":"AAoBA,OAAO,EAAE,KAAK,8BAA8B,EAAiD,MAAM,6BAA6B,CAAC;AAWjI,eAAO,MAAM,+BAA+B,EAAE,8BAgG7C,CAAC"}
@@ -6,6 +6,8 @@
6
6
  * - Factory: `actorTasksResourceConfiguration_InitializationFactory`
7
7
  * - Writer: `ApplicationActorExecutionPersistence`, the application's binding of `ActorExecutionPersistencePort`.
8
8
  * - Readers: the actor runtime (the tasks it moves with their execution).
9
+ * - And the Agent activity routes (#3990), on the infrastructure tier, which read a run's tasks within the run's own
10
+ * organization and send them without their correlation `context`.
9
11
  */
10
12
  import { LabelAudience } from '@wildo-ai/presets-components-models';
11
13
  import { CodeDeclarationKind, CodeSymbolKind, FieldSemanticImportance } from '@wildo-ai/zod-decorators';
@@ -105,6 +107,7 @@ export const actorTasksResourceSpecification = resourceSpecification(actorTasksF
105
107
  'Written only by the engine\'s persistence port.',
106
108
  'A task moves before its run, so a reader never sees a finished run over work that still reads as running.',
107
109
  'Every task belongs to an organization and is deleted with it.',
110
+ 'An organization\'s administrators, and the application super-administrator under the audit read policy, read a run\'s tasks on the Agent activity page (#3990): what each actor was asked and produced, never the task\'s correlation context.',
108
111
  ],
109
112
  }), { resourcePrimaryScope: ResourcePrimaryScope.ORGANIZATIONS });
110
113
  //# sourceMappingURL=actor-tasks.resource.specification.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"actor-tasks.resource.specification.js","sourceRoot":"","sources":["../../../../../src/engine/flows-actors/resources/actor-tasks.resource.specification.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AACpE,OAAO,EAAE,mBAAmB,EAAE,cAAc,EAAE,uBAAuB,EAAE,MAAM,0BAA0B,CAAC;AACxG,OAAO,EACL,qBAAqB,EACrB,iBAAiB,EACjB,qBAAqB,IAAI,EAAE,EAC3B,oBAAoB,EACpB,qDAAqD,IAAI,iBAAiB,GAC3E,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAuC,sBAAsB,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AACjI,OAAO,EAAE,uBAAuB,EAAE,MAAM,kCAAkC,CAAC;AAC3E,OAAO,EAAE,oBAA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O,EAAE,qCAAqC;YAC9C,gBAAgB,EAAE,CAAC,EAAE,IAAI,EAAE,sBAAsB,CAAC,WAAW,EAAE,OAAO,EAAE,2CAA2C,EAAE,CAAC;SACvH;QACD,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE;YACT,OAAO,EAAE,sCAAsC;YAC/C,OAAO,EAAE,8CAA8C;YACvD,UAAU,EAAE,IAAI;YAChB,gBAAgB,EAAE,CAAC,EAAE,IAAI,EAAE,sBAAsB,CAAC,MAAM,EAAE,OAAO,EAAE,qBAAqB,EAAE,CAAC;SAC5F;QACD,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE;YACT,OAAO,EAAE,gDAAgD;YACzD,OAAO,EAAE,gDAAgD;YACzD,UAAU,EAAE,IAAI;YAChB,gBAAgB,EAAE,CAAC,EAAE,IAAI,EAAE,sBAAsB,CAAC,MAAM,EAAE,OAAO,EAAE,0BAA0B,EAAE,CAAC;SACjG;QACD,CAAC,EAAE,CAAC,MAAM,CAAC,EAAE;YACX,OAAO,EAAE,gEAAgE;YACzE,OAAO,EAAE,mDAAmD;YAC5D,gBAAgB,EAAE,CAAC,EAAE,IAAI,EAAE,sBAAsB,CAAC,MAAM,EAAE,OAAO,EAAE,iBAAiB,EAAE,CAAC;SACxF;QACD,CAAC,EAAE,CAAC,MAAM,CAAC,EAAE;YACX,OAAO,EAAE,0EAA0E;YACnF,OAAO,EAAE,8CAA8C;YACvD,UAAU,EAAE,IAAI;SACjB;KACF;IAED,mBAAmB,EAAE;QACnB,iDAAiD;QACjD,2GAA2G;QAC3G,+DAA+D;KAChE;CACF,CAAC,EACF,EAAE,oBAAoB,EAAE,oBAAoB,CAAC,aAAa,EAAE,CAC7D,CAAC","sourcesContent":["/**\n * Resource: `actorTasks` — Wildo SaaS engine specification (organization-scoped storage, engine-written). #2539.\n *\n * Inputs:\n * - Schema: `ActorTaskRecordSchema` (`flows-actors/actor-plane-rows.shared.schemas.ts`)\n * - Factory: `actorTasksResourceConfiguration_InitializationFactory`\n * - Writer: `ApplicationActorExecutionPersistence`, the application's binding of `ActorExecutionPersistencePort`.\n * - Readers: the actor runtime (the tasks it moves with their execution).\n */\nimport { LabelAudience } from '@wildo-ai/presets-components-models';\nimport { CodeDeclarationKind, CodeSymbolKind, FieldSemanticImportance } from '@wildo-ai/zod-decorators';\nimport {\n ActorTaskRecordSchema,\n Actor_Task_Topics,\n CoreResourceOperation as Op,\n ResourcePrimaryScope,\n actorTasksResourceConfiguration_InitializationFactory as actorTasksFactory,\n} from '@wildo-ai/saas-models';\nimport { type AnyResourceSpecificationConfig, HttpResponseStatusCode, resourceSpecification } from '~wildo-specifications/_core';\nimport { EngineResourceSubDomain } from '../../engine-resource-sub-domain';\nimport { actorRunStatusValues } from './actor-system-executions.resource.specification';\n\nconst enumDeclaration = (exportName: string) => ({\n packageName: '@wildo-ai/saas-models',\n exportName,\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n});\n\nexport const actorTasksResourceSpecification: AnyResourceSpecificationConfig = resourceSpecification(\n actorTasksFactory,\n ActorTaskRecordSchema,\n ({ schemaShape }) => ({\n purpose: 'Record the unit of work an actor does inside one run of an application\\'s actor system: what it was asked and what it produced.',\n businessRole: 'The work record a reviewer\\'s question is about, and what a run left behind once it ended.',\n lifecycleRole: 'Opened with its run, moved with it (before the run itself, so a reader never sees a finished run over unfinished work), and deleted with its organization.',\n audience: LabelAudience.DEVELOPER,\n subDomain: EngineResourceSubDomain.FLOWS_ACTORS,\n codeHandling: {\n mainSchema: { packageName: '@wildo-ai/saas-models', exportName: 'ActorTaskRecordSchema', symbolKind: CodeSymbolKind.SCHEMA, declarationKind: CodeDeclarationKind.ZOD_SCHEMA },\n resourceFactory: { packageName: '@wildo-ai/saas-models', exportName: 'actorTasksResourceConfiguration_InitializationFactory', symbolKind: CodeSymbolKind.FACTORY, declarationKind: CodeDeclarationKind.FUNCTION },\n resourceType: { enumDeclaration: enumDeclaration('CoreResourceType'), memberName: 'ACTOR_TASKS' },\n operationVocabulary: { coreEnum: enumDeclaration('CoreResourceOperation') },\n notes: [\n 'Every operation is route-less: CREATE, READ, LIST and UPDATE are REPOSITORY_ONLY and DELETE is INTERNAL_CALL (the tenant purge\\'s composition cascade).',\n 'The link to the run is a soft indexed id, as on the conversational task family; both rows die with their organization, which is the only cascade they need.',\n ],\n },\n\n fields: {\n _id: schemaShape._id.stringSpec({ meaning: 'Identity of the task.', semanticRole: 'identifier' }),\n organizationId: schemaShape.organizationId.foreignKeySpec({ meaning: 'The organization the run works for; the task is deleted with it.', importance: FieldSemanticImportance.PRIMARY }),\n actorSystemExecutionId: schemaShape.actorSystemExecutionId.stringSpec({ meaning: 'The run this task belongs to.', semanticRole: 'identifier' }),\n actorRef: schemaShape.actorRef.stringSpec({ meaning: 'The actor doing the work: one the run\\'s system declares.', semanticRole: 'code', importance: FieldSemanticImportance.PRIMARY }),\n title: schemaShape.title.stringSpec({ meaning: 'A short name for the work, as its host wrote it.', whyItMatters: 'Content an organization holds: it may name the client matter the work is about.', importance: FieldSemanticImportance.PRIMARY }),\n description: schemaShape.description.stringSpec({ meaning: 'What the work is, as its host wrote it.' }),\n topic: schemaShape.topic.enumSpec({\n meaning: 'What kind of work this is.',\n enumDeclaration: enumDeclaration('Actor_Task_Topics'),\n values: {\n [Actor_Task_Topics.WEB_SEARCH]: { meaning: 'Searching the web.' },\n [Actor_Task_Topics.RESEARCH]: { meaning: 'Gathering and reading material.' },\n [Actor_Task_Topics.PLANNING]: { meaning: 'Deciding what to do.' },\n [Actor_Task_Topics.IMPLEMENTATION]: { meaning: 'Doing the work itself.' },\n [Actor_Task_Topics.VERIFICATION]: { meaning: 'Checking work already done.' },\n [Actor_Task_Topics.METHOD_STEP]: { meaning: 'One step of an authored method.' },\n },\n }),\n status: schemaShape.status.enumSpec({\n meaning: 'Where the task stands; it moves with its run.',\n importance: FieldSemanticImportance.PRIMARY,\n enumDeclaration: enumDeclaration('FlowsActors_Status'),\n values: actorRunStatusValues,\n }),\n input: schemaShape.input.objectSpec({ meaning: 'What the task was asked, in its host\\'s own shape.' }),\n output: schemaShape.output.objectSpec({\n meaning: 'What the task produced, or why it failed, in its host\\'s own shape. While its run waits, what the host says the run is waiting on.',\n whyItMatters: 'A thrown run records `{ failure }` here, so the row itself says why it failed.',\n }),\n artifacts: schemaShape.artifacts.arraySpec({ meaning: 'What the task left behind, carried unchanged from its host.', elementMeaning: 'One artifact: its stable reference and the typed parts carrying its content.' }),\n context: schemaShape.context.stringSpec({ meaning: 'The dispatching host\\'s correlation envelope, serialized and carried unchanged.' }),\n startedAt: schemaShape.startedAt.dateSpec({ meaning: 'When the work began. Absent on a run opened deferred until it starts.', temporalRole: 'occurred' }),\n completedAt: schemaShape.completedAt.dateSpec({ meaning: 'When the work ended. Absent while it runs or waits.', temporalRole: 'occurred' }),\n createdAt: schemaShape.createdAt.dateSpec({ meaning: 'When the task was opened.', temporalRole: 'creation' }),\n updatedAt: schemaShape.updatedAt.dateSpec({ meaning: 'When the task last moved.', temporalRole: 'modified' }),\n },\n\n operations: {\n [Op.CREATE]: {\n purpose: 'Open the task of a run.',\n outcome: 'The task exists, linked to its run.',\n responseStatuses: [{ code: HttpResponseStatusCode.CREATED_201, meaning: 'The task was opened. Internal write path.' }],\n },\n [Op.READ]: {\n purpose: 'Read one task for the actor runtime.',\n outcome: 'The task is returned to the internal caller.',\n idempotent: true,\n responseStatuses: [{ code: HttpResponseStatusCode.OK_200, meaning: 'The task was found.' }],\n },\n [Op.LIST]: {\n purpose: 'List the tasks of a run for the actor runtime.',\n outcome: 'The tasks are returned to the internal caller.',\n idempotent: true,\n responseStatuses: [{ code: HttpResponseStatusCode.OK_200, meaning: 'The tasks were returned.' }],\n },\n [Op.UPDATE]: {\n purpose: 'Move a task, and record what it produced. Internal write path.',\n outcome: 'The task stands where the actor runtime moved it.',\n responseStatuses: [{ code: HttpResponseStatusCode.OK_200, meaning: 'The task moved.' }],\n },\n [Op.DELETE]: {\n purpose: 'Internal cleanup: the tenant purge\\'s cascade. No public deletion route.',\n outcome: 'A deleted organization\\'s tasks are removed.',\n idempotent: true,\n },\n },\n\n businessConstraints: [\n 'Written only by the engine\\'s persistence port.',\n 'A task moves before its run, so a reader never sees a finished run over work that still reads as running.',\n 'Every task belongs to an organization and is deleted with it.',\n ],\n }),\n { resourcePrimaryScope: ResourcePrimaryScope.ORGANIZATIONS },\n);\n"]}
1
+ {"version":3,"file":"actor-tasks.resource.specification.js","sourceRoot":"","sources":["../../../../../src/engine/flows-actors/resources/actor-tasks.resource.specification.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AACpE,OAAO,EAAE,mBAAmB,EAAE,cAAc,EAAE,uBAAuB,EAAE,MAAM,0BAA0B,CAAC;AACxG,OAAO,EACL,qBAAqB,EACrB,iBAAiB,EACjB,qBAAqB,IAAI,EAAE,EAC3B,oBAAoB,EACpB,qDAAqD,IAAI,iBAAiB,GAC3E,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAuC,sBAAsB,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AACjI,OAAO,EAAE,uBAAuB,EAAE,MAAM,kCAAkC,CAAC;AAC3E,OAAO,EAAE,oBAAoB,EAAE,MAAM,kDAAkD,CAAC;AAExF,MAAM,eAAe,GAAG,CAAC,UAAkB,EAAE,EAAE,CAAC,CAAC;IAC/C,WAAW,EAAE,uBAAuB;IACpC,UAAU;IACV,UAAU,EAAE,cAAc,CAAC,IAAI;IAC/B,eAAe,EAAE,mBAAmB,CAAC,eAAe;CACrD,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,+BAA+B,GAAmC,qBAAqB,CAClG,iBAAiB,EACjB,qBAAqB,EACrB,CAAC,EAAE,WAAW,EAAE,EAAE,EAAE,CAAC,CAAC;IACpB,OAAO,EAAE,iIAAiI;IAC1I,YAAY,EAAE,4FAA4F;IAC1G,aAAa,EAAE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,OAAO,EAAE,gDAAgD;YACzD,UAAU,EAAE,IAAI;YAChB,gBAAgB,EAAE,CAAC,EAAE,IAAI,EAAE,sBAAsB,CAAC,MAAM,EAAE,OAAO,EAAE,0BAA0B,EAAE,CAAC;SACjG;QACD,CAAC,EAAE,CAAC,MAAM,CAAC,EAAE;YACX,OAAO,EAAE,gEAAgE;YACzE,OAAO,EAAE,mDAAmD;YAC5D,gBAAgB,EAAE,CAAC,EAAE,IAAI,EAAE,sBAAsB,CAAC,MAAM,EAAE,OAAO,EAAE,iBAAiB,EAAE,CAAC;SACxF;QACD,CAAC,EAAE,CAAC,MAAM,CAAC,EAAE;YACX,OAAO,EAAE,0EAA0E;YACnF,OAAO,EAAE,8CAA8C;YACvD,UAAU,EAAE,IAAI;SACjB;KACF;IAED,mBAAmB,EAAE;QACnB,iDAAiD;QACjD,2GAA2G;QAC3G,+DAA+D;QAC/D,gPAAgP;KACjP;CACF,CAAC,EACF,EAAE,oBAAoB,EAAE,oBAAoB,CAAC,aAAa,EAAE,CAC7D,CAAC","sourcesContent":["/**\n * Resource: `actorTasks` — Wildo SaaS engine specification (organization-scoped storage, engine-written). #2539.\n *\n * Inputs:\n * - Schema: `ActorTaskRecordSchema` (`flows-actors/actor-plane-rows.shared.schemas.ts`)\n * - Factory: `actorTasksResourceConfiguration_InitializationFactory`\n * - Writer: `ApplicationActorExecutionPersistence`, the application's binding of `ActorExecutionPersistencePort`.\n * - Readers: the actor runtime (the tasks it moves with their execution).\n * - And the Agent activity routes (#3990), on the infrastructure tier, which read a run's tasks within the run's own\n * organization and send them without their correlation `context`.\n */\nimport { LabelAudience } from '@wildo-ai/presets-components-models';\nimport { CodeDeclarationKind, CodeSymbolKind, FieldSemanticImportance } from '@wildo-ai/zod-decorators';\nimport {\n ActorTaskRecordSchema,\n Actor_Task_Topics,\n CoreResourceOperation as Op,\n ResourcePrimaryScope,\n actorTasksResourceConfiguration_InitializationFactory as actorTasksFactory,\n} from '@wildo-ai/saas-models';\nimport { type AnyResourceSpecificationConfig, HttpResponseStatusCode, resourceSpecification } from '~wildo-specifications/_core';\nimport { EngineResourceSubDomain } from '../../engine-resource-sub-domain';\nimport { actorRunStatusValues } from './actor-system-executions.resource.specification';\n\nconst enumDeclaration = (exportName: string) => ({\n packageName: '@wildo-ai/saas-models',\n exportName,\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n});\n\nexport const actorTasksResourceSpecification: AnyResourceSpecificationConfig = resourceSpecification(\n actorTasksFactory,\n ActorTaskRecordSchema,\n ({ schemaShape }) => ({\n purpose: 'Record the unit of work an actor does inside one run of an application\\'s actor system: what it was asked and what it produced.',\n businessRole: 'The work record a reviewer\\'s question is about, and what a run left behind once it ended.',\n lifecycleRole: 'Opened with its run, moved with it (before the run itself, so a reader never sees a finished run over unfinished work), and deleted with its organization.',\n audience: LabelAudience.DEVELOPER,\n subDomain: EngineResourceSubDomain.FLOWS_ACTORS,\n codeHandling: {\n mainSchema: { packageName: '@wildo-ai/saas-models', exportName: 'ActorTaskRecordSchema', symbolKind: CodeSymbolKind.SCHEMA, declarationKind: CodeDeclarationKind.ZOD_SCHEMA },\n resourceFactory: { packageName: '@wildo-ai/saas-models', exportName: 'actorTasksResourceConfiguration_InitializationFactory', symbolKind: CodeSymbolKind.FACTORY, declarationKind: CodeDeclarationKind.FUNCTION },\n resourceType: { enumDeclaration: enumDeclaration('CoreResourceType'), memberName: 'ACTOR_TASKS' },\n operationVocabulary: { coreEnum: enumDeclaration('CoreResourceOperation') },\n notes: [\n 'Every operation is route-less: CREATE, READ, LIST and UPDATE are REPOSITORY_ONLY and DELETE is INTERNAL_CALL (the tenant purge\\'s composition cascade).',\n 'The link to the run is a soft indexed id, as on the conversational task family; both rows die with their organization, which is the only cascade they need.',\n ],\n },\n\n fields: {\n _id: schemaShape._id.stringSpec({ meaning: 'Identity of the task.', semanticRole: 'identifier' }),\n organizationId: schemaShape.organizationId.foreignKeySpec({ meaning: 'The organization the run works for; the task is deleted with it.', importance: FieldSemanticImportance.PRIMARY }),\n actorSystemExecutionId: schemaShape.actorSystemExecutionId.stringSpec({ meaning: 'The run this task belongs to.', semanticRole: 'identifier' }),\n actorRef: schemaShape.actorRef.stringSpec({ meaning: 'The actor doing the work: one the run\\'s system declares.', semanticRole: 'code', importance: FieldSemanticImportance.PRIMARY }),\n title: schemaShape.title.stringSpec({ meaning: 'A short name for the work, as its host wrote it.', whyItMatters: 'Content an organization holds: it may name the client matter the work is about.', importance: FieldSemanticImportance.PRIMARY }),\n description: schemaShape.description.stringSpec({ meaning: 'What the work is, as its host wrote it.' }),\n topic: schemaShape.topic.enumSpec({\n meaning: 'What kind of work this is.',\n enumDeclaration: enumDeclaration('Actor_Task_Topics'),\n values: {\n [Actor_Task_Topics.WEB_SEARCH]: { meaning: 'Searching the web.' },\n [Actor_Task_Topics.RESEARCH]: { meaning: 'Gathering and reading material.' },\n [Actor_Task_Topics.PLANNING]: { meaning: 'Deciding what to do.' },\n [Actor_Task_Topics.IMPLEMENTATION]: { meaning: 'Doing the work itself.' },\n [Actor_Task_Topics.VERIFICATION]: { meaning: 'Checking work already done.' },\n [Actor_Task_Topics.METHOD_STEP]: { meaning: 'One step of an authored method.' },\n },\n }),\n status: schemaShape.status.enumSpec({\n meaning: 'Where the task stands; it moves with its run.',\n importance: FieldSemanticImportance.PRIMARY,\n enumDeclaration: enumDeclaration('FlowsActors_Status'),\n values: actorRunStatusValues,\n }),\n input: schemaShape.input.objectSpec({ meaning: 'What the task was asked, in its host\\'s own shape.' }),\n output: schemaShape.output.objectSpec({\n meaning: 'What the task produced, or why it failed, in its host\\'s own shape. While its run waits, what the host says the run is waiting on.',\n whyItMatters: 'A thrown run records `{ failure }` here, so the row itself says why it failed.',\n }),\n artifacts: schemaShape.artifacts.arraySpec({ meaning: 'What the task left behind, carried unchanged from its host.', elementMeaning: 'One artifact: its stable reference and the typed parts carrying its content.' }),\n context: schemaShape.context.stringSpec({ meaning: 'The dispatching host\\'s correlation envelope, serialized and carried unchanged.' }),\n startedAt: schemaShape.startedAt.dateSpec({ meaning: 'When the work began. Absent on a run opened deferred until it starts.', temporalRole: 'occurred' }),\n completedAt: schemaShape.completedAt.dateSpec({ meaning: 'When the work ended. Absent while it runs or waits.', temporalRole: 'occurred' }),\n createdAt: schemaShape.createdAt.dateSpec({ meaning: 'When the task was opened.', temporalRole: 'creation' }),\n updatedAt: schemaShape.updatedAt.dateSpec({ meaning: 'When the task last moved.', temporalRole: 'modified' }),\n },\n\n operations: {\n [Op.CREATE]: {\n purpose: 'Open the task of a run.',\n outcome: 'The task exists, linked to its run.',\n responseStatuses: [{ code: HttpResponseStatusCode.CREATED_201, meaning: 'The task was opened. Internal write path.' }],\n },\n [Op.READ]: {\n purpose: 'Read one task for the actor runtime.',\n outcome: 'The task is returned to the internal caller.',\n idempotent: true,\n responseStatuses: [{ code: HttpResponseStatusCode.OK_200, meaning: 'The task was found.' }],\n },\n [Op.LIST]: {\n purpose: 'List the tasks of a run for the actor runtime.',\n outcome: 'The tasks are returned to the internal caller.',\n idempotent: true,\n responseStatuses: [{ code: HttpResponseStatusCode.OK_200, meaning: 'The tasks were returned.' }],\n },\n [Op.UPDATE]: {\n purpose: 'Move a task, and record what it produced. Internal write path.',\n outcome: 'The task stands where the actor runtime moved it.',\n responseStatuses: [{ code: HttpResponseStatusCode.OK_200, meaning: 'The task moved.' }],\n },\n [Op.DELETE]: {\n purpose: 'Internal cleanup: the tenant purge\\'s cascade. No public deletion route.',\n outcome: 'A deleted organization\\'s tasks are removed.',\n idempotent: true,\n },\n },\n\n businessConstraints: [\n 'Written only by the engine\\'s persistence port.',\n 'A task moves before its run, so a reader never sees a finished run over work that still reads as running.',\n 'Every task belongs to an organization and is deleted with it.',\n 'An organization\\'s administrators, and the application super-administrator under the audit read policy, read a run\\'s tasks on the Agent activity page (#3990): what each actor was asked and produced, never the task\\'s correlation context.',\n ],\n }),\n { resourcePrimaryScope: ResourcePrimaryScope.ORGANIZATIONS },\n);\n"]}
@@ -0,0 +1,3 @@
1
+ import { type AnyResourceSpecificationConfig } from '../../../_core';
2
+ export declare const remoteAgentTaskUpdatesResourceSpecification: AnyResourceSpecificationConfig;
3
+ //# sourceMappingURL=remote-agent-task-updates.resource.specification.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"remote-agent-task-updates.resource.specification.d.ts","sourceRoot":"","sources":["../../../../../src/engine/flows-actors/resources/remote-agent-task-updates.resource.specification.ts"],"names":[],"mappings":"AAqBA,OAAO,EAAE,KAAK,8BAA8B,EAAiD,MAAM,6BAA6B,CAAC;AAUjI,eAAO,MAAM,2CAA2C,EAAE,8BAiFzD,CAAC"}
@@ -0,0 +1,98 @@
1
+ /**
2
+ * Resource: `remoteAgentTaskUpdates` — Wildo SaaS engine specification (application-scoped storage, engine-written). #3930.
3
+ *
4
+ * Inputs:
5
+ * - Schema: `RemoteAgentTaskUpdateSchema` (`flows-actors/remote-agent-task-updates.shared.schemas.ts`)
6
+ * - Factory: `remoteAgentTaskUpdatesResourceConfiguration_InitializationFactory`
7
+ * - Writer: the A2A push receiver, after a push is authenticated and its task id is the task's.
8
+ * - Reader: the agent runtime, telling the next turn of the conversation what changed.
9
+ *
10
+ * The runtime reasoning (why a push updates state rather than starting a turn, what it never holds) lives in the
11
+ * schema file's header and is not restated here.
12
+ */
13
+ import { LabelAudience } from '@wildo-ai/presets-components-models';
14
+ import { CodeDeclarationKind, CodeSymbolKind, FieldSemanticImportance } from '@wildo-ai/zod-decorators';
15
+ import { CoreResourceOperation as Op, RemoteAgentTaskNoticeState, RemoteAgentTaskUpdateSchema, ResourcePrimaryScope, remoteAgentTaskUpdatesResourceConfiguration_InitializationFactory as remoteAgentTaskUpdatesFactory, } from '@wildo-ai/saas-models';
16
+ import { HttpResponseStatusCode, resourceSpecification } from '../../../_core/index.js';
17
+ import { EngineResourceSubDomain } from '../../engine-resource-sub-domain.js';
18
+ const enumDeclaration = (exportName) => ({
19
+ packageName: '@wildo-ai/saas-models',
20
+ exportName,
21
+ symbolKind: CodeSymbolKind.ENUM,
22
+ declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,
23
+ });
24
+ export const remoteAgentTaskUpdatesResourceSpecification = resourceSpecification(remoteAgentTaskUpdatesFactory, RemoteAgentTaskUpdateSchema, ({ schemaShape }) => ({
25
+ purpose: 'Record what another party\'s A2A agent pushed about a task a conversation opened: that the task ended, or that it waits for input or authorization.',
26
+ businessRole: 'How a long delegated task reaches the person and the agent without holding a turn open: the person is notified, and the agent learns of the update at the conversation\'s next turn and reads the result through its task tool.',
27
+ lifecycleRole: 'Written by the engine when an authenticated push reports one of these states, never updated, and deleted by the retention-class sweep once the application\'s OPERATIONAL_LOGS period has passed since it was written.',
28
+ audience: LabelAudience.DEVELOPER,
29
+ subDomain: EngineResourceSubDomain.FLOWS_ACTORS,
30
+ codeHandling: {
31
+ mainSchema: { packageName: '@wildo-ai/saas-models', exportName: 'RemoteAgentTaskUpdateSchema', symbolKind: CodeSymbolKind.SCHEMA, declarationKind: CodeDeclarationKind.ZOD_SCHEMA },
32
+ resourceFactory: { packageName: '@wildo-ai/saas-models', exportName: 'remoteAgentTaskUpdatesResourceConfiguration_InitializationFactory', symbolKind: CodeSymbolKind.FACTORY, declarationKind: CodeDeclarationKind.FUNCTION },
33
+ resourceType: { enumDeclaration: enumDeclaration('CoreResourceType'), memberName: 'REMOTE_AGENT_TASK_UPDATES' },
34
+ operationVocabulary: { coreEnum: enumDeclaration('CoreResourceOperation') },
35
+ notes: [
36
+ 'Every operation is route-less: CREATE, READ and LIST are REPOSITORY_ONLY and DELETE_MANY is INTERNAL_CALL (the retention-class sweep deletes through the service layer). The roles are never exercised by a request.',
37
+ 'The unique key is `updateKey`, built only by `remoteAgentTaskUpdateKeyOf(remoteAgentRef, remoteTaskId, state)`: a push delivered twice is recorded once.',
38
+ 'Retention: `retentionBinding: { retentionClass: OPERATIONAL_LOGS, startPoint: CREATED }`.',
39
+ ],
40
+ },
41
+ fields: {
42
+ _id: schemaShape._id.stringSpec({ meaning: 'Identity of this update.', semanticRole: 'identifier' }),
43
+ applicationId: schemaShape.applicationId.stringSpec({ meaning: 'The application record, stamped from the canonical identity.', semanticRole: 'identifier' }),
44
+ executionId: schemaShape.executionId.stringSpec({
45
+ meaning: 'The conversation that opened the task, copied from its ownership record.',
46
+ whyItMatters: 'Whose next turn hears of the update, and whose person is notified.',
47
+ semanticRole: 'identifier',
48
+ importance: FieldSemanticImportance.PRIMARY,
49
+ }),
50
+ remoteAgentRef: schemaShape.remoteAgentRef.stringSpec({ meaning: 'The remote agent, as the application declared it.', semanticRole: 'code' }),
51
+ remoteTaskId: schemaShape.remoteTaskId.stringSpec({ meaning: 'The task\'s id at the remote agent.', semanticRole: 'identifier' }),
52
+ state: schemaShape.state.enumSpec({
53
+ meaning: 'What the remote agent reported the task to be.',
54
+ enumDeclaration: enumDeclaration('RemoteAgentTaskNoticeState'),
55
+ importance: FieldSemanticImportance.PRIMARY,
56
+ values: {
57
+ [RemoteAgentTaskNoticeState.COMPLETED]: { meaning: 'The task finished with a result the agent can read.' },
58
+ [RemoteAgentTaskNoticeState.FAILED]: { meaning: 'The task ended without a result.' },
59
+ [RemoteAgentTaskNoticeState.CANCELED]: { meaning: 'The task was cancelled.' },
60
+ [RemoteAgentTaskNoticeState.REJECTED]: { meaning: 'The remote agent refused the task.' },
61
+ [RemoteAgentTaskNoticeState.INPUT_REQUIRED]: { meaning: 'The task waits for more input, which the agent can send as a continuation.' },
62
+ [RemoteAgentTaskNoticeState.AUTH_REQUIRED]: { meaning: 'The task waits for an authorization given out of band.' },
63
+ },
64
+ }),
65
+ updateKey: schemaShape.updateKey.stringSpec({ meaning: 'The task and the state in one unique value.', whyItMatters: 'A push delivered twice is recorded once.', semanticRole: 'identifier' }),
66
+ createdAt: schemaShape.createdAt.dateSpec({ meaning: 'When the push was received.', whyItMatters: 'What the next turn compares with the person\'s last message, and the retention clock.', temporalRole: 'creation' }),
67
+ },
68
+ operations: {
69
+ [Op.CREATE]: {
70
+ purpose: 'Record an update a remote agent pushed.',
71
+ outcome: 'The conversation\'s next turn hears of it.',
72
+ responseStatuses: [{ code: HttpResponseStatusCode.CREATED_201, meaning: 'The update was written. Internal write path.' }],
73
+ },
74
+ [Op.READ]: {
75
+ purpose: 'Read one update for an internal caller.',
76
+ outcome: 'The row is returned to the internal caller.',
77
+ idempotent: true,
78
+ responseStatuses: [{ code: HttpResponseStatusCode.OK_200, meaning: 'The row was found.' }],
79
+ },
80
+ [Op.LIST]: {
81
+ purpose: 'List a conversation\'s updates received since its person last spoke.',
82
+ outcome: 'The rows are returned to the internal caller.',
83
+ idempotent: true,
84
+ responseStatuses: [{ code: HttpResponseStatusCode.OK_200, meaning: 'The rows were returned.' }],
85
+ },
86
+ [Op.DELETE_MANY]: {
87
+ purpose: 'Internal cleanup: the retention-class sweep. No public deletion route.',
88
+ outcome: 'Rows past the OPERATIONAL_LOGS period are removed.',
89
+ idempotent: true,
90
+ },
91
+ },
92
+ businessConstraints: [
93
+ 'A remote agent ref, a remote task id and a state only: none of the text the remote agent pushed is stored.',
94
+ 'Written only for a push whose token is the one registered for that task, and whose task id is that task\'s.',
95
+ 'Append-only, one row per task and state.',
96
+ ],
97
+ }), { resourcePrimaryScope: ResourcePrimaryScope.APPLICATION });
98
+ //# sourceMappingURL=remote-agent-task-updates.resource.specification.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"remote-agent-task-updates.resource.specification.js","sourceRoot":"","sources":["../../../../../src/engine/flows-actors/resources/remote-agent-task-updates.resource.specification.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AACpE,OAAO,EAAE,mBAAmB,EAAE,cAAc,EAAE,uBAAuB,EAAE,MAAM,0BAA0B,CAAC;AACxG,OAAO,EACL,qBAAqB,IAAI,EAAE,EAC3B,0BAA0B,EAC1B,2BAA2B,EAC3B,oBAAoB,EACpB,iEAAiE,IA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C5G,6GAA6G;QAC7G,0CAA0C;KAC3C;CACF,CAAC,EACF,EAAE,oBAAoB,EAAE,oBAAoB,CAAC,WAAW,EAAE,CAC3D,CAAC","sourcesContent":["/**\n * Resource: `remoteAgentTaskUpdates` — Wildo SaaS engine specification (application-scoped storage, engine-written). #3930.\n *\n * Inputs:\n * - Schema: `RemoteAgentTaskUpdateSchema` (`flows-actors/remote-agent-task-updates.shared.schemas.ts`)\n * - Factory: `remoteAgentTaskUpdatesResourceConfiguration_InitializationFactory`\n * - Writer: the A2A push receiver, after a push is authenticated and its task id is the task's.\n * - Reader: the agent runtime, telling the next turn of the conversation what changed.\n *\n * The runtime reasoning (why a push updates state rather than starting a turn, what it never holds) lives in the\n * schema file's header and is not restated here.\n */\nimport { LabelAudience } from '@wildo-ai/presets-components-models';\nimport { CodeDeclarationKind, CodeSymbolKind, FieldSemanticImportance } from '@wildo-ai/zod-decorators';\nimport {\n CoreResourceOperation as Op,\n RemoteAgentTaskNoticeState,\n RemoteAgentTaskUpdateSchema,\n ResourcePrimaryScope,\n remoteAgentTaskUpdatesResourceConfiguration_InitializationFactory as remoteAgentTaskUpdatesFactory,\n} from '@wildo-ai/saas-models';\nimport { type AnyResourceSpecificationConfig, HttpResponseStatusCode, resourceSpecification } from '~wildo-specifications/_core';\nimport { EngineResourceSubDomain } from '../../engine-resource-sub-domain';\n\nconst enumDeclaration = (exportName: string) => ({\n packageName: '@wildo-ai/saas-models',\n exportName,\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n});\n\nexport const remoteAgentTaskUpdatesResourceSpecification: AnyResourceSpecificationConfig = resourceSpecification(\n remoteAgentTaskUpdatesFactory,\n RemoteAgentTaskUpdateSchema,\n ({ schemaShape }) => ({\n purpose: 'Record what another party\\'s A2A agent pushed about a task a conversation opened: that the task ended, or that it waits for input or authorization.',\n businessRole: 'How a long delegated task reaches the person and the agent without holding a turn open: the person is notified, and the agent learns of the update at the conversation\\'s next turn and reads the result through its task tool.',\n lifecycleRole: 'Written by the engine when an authenticated push reports one of these states, never updated, and deleted by the retention-class sweep once the application\\'s OPERATIONAL_LOGS period has passed since it was written.',\n audience: LabelAudience.DEVELOPER,\n subDomain: EngineResourceSubDomain.FLOWS_ACTORS,\n codeHandling: {\n mainSchema: { packageName: '@wildo-ai/saas-models', exportName: 'RemoteAgentTaskUpdateSchema', symbolKind: CodeSymbolKind.SCHEMA, declarationKind: CodeDeclarationKind.ZOD_SCHEMA },\n resourceFactory: { packageName: '@wildo-ai/saas-models', exportName: 'remoteAgentTaskUpdatesResourceConfiguration_InitializationFactory', symbolKind: CodeSymbolKind.FACTORY, declarationKind: CodeDeclarationKind.FUNCTION },\n resourceType: { enumDeclaration: enumDeclaration('CoreResourceType'), memberName: 'REMOTE_AGENT_TASK_UPDATES' },\n operationVocabulary: { coreEnum: enumDeclaration('CoreResourceOperation') },\n notes: [\n 'Every operation is route-less: CREATE, READ and LIST are REPOSITORY_ONLY and DELETE_MANY is INTERNAL_CALL (the retention-class sweep deletes through the service layer). The roles are never exercised by a request.',\n 'The unique key is `updateKey`, built only by `remoteAgentTaskUpdateKeyOf(remoteAgentRef, remoteTaskId, state)`: a push delivered twice is recorded once.',\n 'Retention: `retentionBinding: { retentionClass: OPERATIONAL_LOGS, startPoint: CREATED }`.',\n ],\n },\n\n fields: {\n _id: schemaShape._id.stringSpec({ meaning: 'Identity of this update.', semanticRole: 'identifier' }),\n applicationId: schemaShape.applicationId.stringSpec({ meaning: 'The application record, stamped from the canonical identity.', semanticRole: 'identifier' }),\n executionId: schemaShape.executionId.stringSpec({\n meaning: 'The conversation that opened the task, copied from its ownership record.',\n whyItMatters: 'Whose next turn hears of the update, and whose person is notified.',\n semanticRole: 'identifier',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n remoteAgentRef: schemaShape.remoteAgentRef.stringSpec({ meaning: 'The remote agent, as the application declared it.', semanticRole: 'code' }),\n remoteTaskId: schemaShape.remoteTaskId.stringSpec({ meaning: 'The task\\'s id at the remote agent.', semanticRole: 'identifier' }),\n state: schemaShape.state.enumSpec({\n meaning: 'What the remote agent reported the task to be.',\n enumDeclaration: enumDeclaration('RemoteAgentTaskNoticeState'),\n importance: FieldSemanticImportance.PRIMARY,\n values: {\n [RemoteAgentTaskNoticeState.COMPLETED]: { meaning: 'The task finished with a result the agent can read.' },\n [RemoteAgentTaskNoticeState.FAILED]: { meaning: 'The task ended without a result.' },\n [RemoteAgentTaskNoticeState.CANCELED]: { meaning: 'The task was cancelled.' },\n [RemoteAgentTaskNoticeState.REJECTED]: { meaning: 'The remote agent refused the task.' },\n [RemoteAgentTaskNoticeState.INPUT_REQUIRED]: { meaning: 'The task waits for more input, which the agent can send as a continuation.' },\n [RemoteAgentTaskNoticeState.AUTH_REQUIRED]: { meaning: 'The task waits for an authorization given out of band.' },\n },\n }),\n updateKey: schemaShape.updateKey.stringSpec({ meaning: 'The task and the state in one unique value.', whyItMatters: 'A push delivered twice is recorded once.', semanticRole: 'identifier' }),\n createdAt: schemaShape.createdAt.dateSpec({ meaning: 'When the push was received.', whyItMatters: 'What the next turn compares with the person\\'s last message, and the retention clock.', temporalRole: 'creation' }),\n },\n\n operations: {\n [Op.CREATE]: {\n purpose: 'Record an update a remote agent pushed.',\n outcome: 'The conversation\\'s next turn hears of it.',\n responseStatuses: [{ code: HttpResponseStatusCode.CREATED_201, meaning: 'The update was written. Internal write path.' }],\n },\n [Op.READ]: {\n purpose: 'Read one update for an internal caller.',\n outcome: 'The row is returned to the internal caller.',\n idempotent: true,\n responseStatuses: [{ code: HttpResponseStatusCode.OK_200, meaning: 'The row was found.' }],\n },\n [Op.LIST]: {\n purpose: 'List a conversation\\'s updates received since its person last spoke.',\n outcome: 'The rows are returned to the internal caller.',\n idempotent: true,\n responseStatuses: [{ code: HttpResponseStatusCode.OK_200, meaning: 'The rows were returned.' }],\n },\n [Op.DELETE_MANY]: {\n purpose: 'Internal cleanup: the retention-class sweep. No public deletion route.',\n outcome: 'Rows past the OPERATIONAL_LOGS period are removed.',\n idempotent: true,\n },\n },\n\n businessConstraints: [\n 'A remote agent ref, a remote task id and a state only: none of the text the remote agent pushed is stored.',\n 'Written only for a push whose token is the one registered for that task, and whose task id is that task\\'s.',\n 'Append-only, one row per task and state.',\n ],\n }),\n { resourcePrimaryScope: ResourcePrimaryScope.APPLICATION },\n);\n"]}
@@ -0,0 +1,3 @@
1
+ import { type AnyResourceSpecificationConfig } from '../../../_core';
2
+ export declare const remoteAgentTasksResourceSpecification: AnyResourceSpecificationConfig;
3
+ //# sourceMappingURL=remote-agent-tasks.resource.specification.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"remote-agent-tasks.resource.specification.d.ts","sourceRoot":"","sources":["../../../../../src/engine/flows-actors/resources/remote-agent-tasks.resource.specification.ts"],"names":[],"mappings":"AAuBA,OAAO,EAAE,KAAK,8BAA8B,EAAiD,MAAM,6BAA6B,CAAC;AAUjI,eAAO,MAAM,qCAAqC,EAAE,8BAkHnD,CAAC"}
@@ -0,0 +1,132 @@
1
+ /**
2
+ * Resource: `remoteAgentTasks` — Wildo SaaS engine specification (application-scoped storage, engine-written). #3930.
3
+ *
4
+ * Inputs:
5
+ * - Schema: `RemoteAgentTaskSchema` (`flows-actors/remote-agent-tasks.shared.schemas.ts`)
6
+ * - Factory: `remoteAgentTasksResourceConfiguration_InitializationFactory`
7
+ * - Writer and reader: the agent runtime (`RemoteAgentTaskOwnershipBackendService`), when a delegation to a remote A2A
8
+ * agent opens a task, and before a continuation, a read or a cancellation acts on one.
9
+ * - Reader: the Agent activity page (#4024, `agent-to-agent-tasks-read.backend.ts`), for the organization's tasks.
10
+ *
11
+ * The runtime reasoning (why the record exists, why one row per task, what it never holds) lives in the schema file's
12
+ * header and is not restated here.
13
+ */
14
+ import { LabelAudience } from '@wildo-ai/presets-components-models';
15
+ import { CodeDeclarationKind, CodeSymbolKind, FieldSemanticImportance } from '@wildo-ai/zod-decorators';
16
+ import { CoreResourceOperation as Op, OutboundCredentialSource, RemoteAgentTaskReportedState, RemoteAgentTaskSchema, ResourcePrimaryScope, remoteAgentTasksResourceConfiguration_InitializationFactory as remoteAgentTasksFactory, } from '@wildo-ai/saas-models';
17
+ import { HttpResponseStatusCode, resourceSpecification } from '../../../_core/index.js';
18
+ import { EngineResourceSubDomain } from '../../engine-resource-sub-domain.js';
19
+ const enumDeclaration = (exportName) => ({
20
+ packageName: '@wildo-ai/saas-models',
21
+ exportName,
22
+ symbolKind: CodeSymbolKind.ENUM,
23
+ declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,
24
+ });
25
+ export const remoteAgentTasksResourceSpecification = resourceSpecification(remoteAgentTasksFactory, RemoteAgentTaskSchema, ({ schemaShape }) => ({
26
+ purpose: 'Record which conversation opened each task another party\'s A2A agent started for a delegation, through which remote agent, and with which stored credential.',
27
+ businessRole: 'What makes a remote task safe to continue, read or cancel: an agent may act only on a remote task its own conversation opened, so a shared organization credential never lets one conversation, or a prompt injected into it, act on another conversation\'s work at the remote party.',
28
+ lifecycleRole: 'Written by the engine when a delegation to a remote agent returns a task id, read before a continuation, a read or a cancellation and by the Agent activity page, never updated, and deleted by the retention-class sweep once the application\'s OPERATIONAL_LOGS period has passed since it was written, or with the organization it names when that organization is torn down.',
29
+ audience: LabelAudience.DEVELOPER,
30
+ subDomain: EngineResourceSubDomain.FLOWS_ACTORS,
31
+ codeHandling: {
32
+ mainSchema: { packageName: '@wildo-ai/saas-models', exportName: 'RemoteAgentTaskSchema', symbolKind: CodeSymbolKind.SCHEMA, declarationKind: CodeDeclarationKind.ZOD_SCHEMA },
33
+ resourceFactory: { packageName: '@wildo-ai/saas-models', exportName: 'remoteAgentTasksResourceConfiguration_InitializationFactory', symbolKind: CodeSymbolKind.FACTORY, declarationKind: CodeDeclarationKind.FUNCTION },
34
+ resourceType: { enumDeclaration: enumDeclaration('CoreResourceType'), memberName: 'REMOTE_AGENT_TASKS' },
35
+ operationVocabulary: { coreEnum: enumDeclaration('CoreResourceOperation') },
36
+ notes: [
37
+ 'Every operation is route-less: CREATE, READ and LIST are REPOSITORY_ONLY and DELETE_MANY is INTERNAL_CALL (the retention-class sweep and the tenant teardown delete through the service layer). The roles are never exercised by a request. The Agent activity page (#4024) reads the rows on the infrastructure tier and projects an allow-list of their fields.',
38
+ 'The unique key is `remoteTaskKey`, built only by `remoteAgentTaskKeyOf(remoteAgentRef, remoteTaskId)`: a remote task belongs to the first conversation that recorded it, and a later claim on it is refused.',
39
+ 'Retention: `retentionBinding: { retentionClass: OPERATIONAL_LOGS, startPoint: CREATED }`.',
40
+ 'A task the ORGANIZATION\'s credential opened names that organization (`organizationId`, #4024), and the `organizations → remoteAgentTasks` COMPOSITION edge deletes it with the tenant. A task a person\'s own credential opened names none. No row names a person: the path from a person runs through the conversation it names, whose own impersonalization an erasure applies.',
41
+ ],
42
+ },
43
+ fields: {
44
+ _id: schemaShape._id.stringSpec({ meaning: 'Identity of this ownership record.', semanticRole: 'identifier' }),
45
+ applicationId: schemaShape.applicationId.stringSpec({ meaning: 'The application record the task was opened by, stamped from the canonical identity.', semanticRole: 'identifier' }),
46
+ executionId: schemaShape.executionId.stringSpec({
47
+ meaning: 'The conversation whose turn opened the remote task.',
48
+ whyItMatters: 'The owner: a continuation, a read or a cancellation is accepted only from this conversation.',
49
+ semanticRole: 'identifier',
50
+ importance: FieldSemanticImportance.PRIMARY,
51
+ }),
52
+ remoteAgentRef: schemaShape.remoteAgentRef.stringSpec({ meaning: 'The remote agent, as the application declared it.', semanticRole: 'code', importance: FieldSemanticImportance.PRIMARY }),
53
+ remoteTaskId: schemaShape.remoteTaskId.stringSpec({ meaning: 'The task\'s id at the remote agent, which the agent presents to act on the task.', semanticRole: 'identifier' }),
54
+ remoteContextId: schemaShape.remoteContextId.stringSpec({ meaning: 'The remote conversation the task belongs to, sent with a continuation. Absent when the remote agent named none.', semanticRole: 'identifier' }),
55
+ remoteTaskKey: schemaShape.remoteTaskKey.stringSpec({
56
+ meaning: 'The remote agent and the remote task id in one unique value.',
57
+ whyItMatters: 'A remote agent opens a task once, so a second claim on the same task, even one a remote agent invited by answering with an id another conversation holds, is refused at the write.',
58
+ semanticRole: 'identifier',
59
+ }),
60
+ credentialSource: schemaShape.credentialSource.enumSpec({
61
+ meaning: 'Whose stored credential opened the task: the person\'s or the organization\'s.',
62
+ whyItMatters: 'Says on whose behalf the remote agent saw the task opened; the exact credential is `credentialId`.',
63
+ enumDeclaration: enumDeclaration('OutboundCredentialSource'),
64
+ values: {
65
+ [OutboundCredentialSource.USER]: { meaning: 'The acting person\'s own connection.' },
66
+ [OutboundCredentialSource.ORGANIZATION]: { meaning: 'The organization\'s connection.' },
67
+ },
68
+ }),
69
+ organizationId: schemaShape.organizationId.stringSpec({
70
+ meaning: 'The organization whose stored credential opened the task. Absent when a person\'s own credential did.',
71
+ whyItMatters: 'The task is the organization\'s: its administrators read it on Agent activity, and it is deleted with the organization. A task a person\'s own credential opened is that person\'s, so it names no organization and no administrator reads it.',
72
+ semanticRole: 'identifier',
73
+ }),
74
+ openedState: schemaShape.openedState.enumSpec({
75
+ meaning: 'The state the remote agent reported in the answer that opened the task, when it reported one. Written once, never updated.',
76
+ whyItMatters: 'Agent activity shows it as the task\'s state until a pushed update reports a later one; a task that opened already ended (completed, failed, rejected) has no later update at all.',
77
+ enumDeclaration: enumDeclaration('RemoteAgentTaskReportedState'),
78
+ values: {
79
+ [RemoteAgentTaskReportedState.SUBMITTED]: { meaning: 'The remote agent accepted the task and had not started it.' },
80
+ [RemoteAgentTaskReportedState.WORKING]: { meaning: 'The remote agent was working on it.' },
81
+ [RemoteAgentTaskReportedState.INPUT_REQUIRED]: { meaning: 'The remote agent waited for a message from this application\'s agent.' },
82
+ [RemoteAgentTaskReportedState.AUTH_REQUIRED]: { meaning: 'The remote agent waited for an authorization given at the remote party.' },
83
+ [RemoteAgentTaskReportedState.COMPLETED]: { meaning: 'The remote agent had already finished it.' },
84
+ [RemoteAgentTaskReportedState.FAILED]: { meaning: 'The remote agent had already failed it.' },
85
+ [RemoteAgentTaskReportedState.CANCELED]: { meaning: 'The task had already been canceled.' },
86
+ [RemoteAgentTaskReportedState.REJECTED]: { meaning: 'The remote agent refused the task.' },
87
+ [RemoteAgentTaskReportedState.UNKNOWN]: { meaning: 'The remote agent said it could not tell the task\'s state.' },
88
+ },
89
+ }),
90
+ pushTokenHash: schemaShape.pushTokenHash.stringSpec({
91
+ meaning: 'The SHA-256 of the single-purpose token the remote agent presents when it pushes an update of this task. Present only when a push was registered.',
92
+ whyItMatters: 'How the push receiver authenticates a push and finds its task; the token itself is never stored.',
93
+ semanticRole: 'identifier',
94
+ }),
95
+ credentialId: schemaShape.credentialId.stringSpec({
96
+ meaning: 'The stored credential that opened the task.',
97
+ whyItMatters: 'The remote agent knows the task under the account this credential authenticates, so acting on it with any other credential, another member\'s or a reconnected one, is refused before anything is sent.',
98
+ semanticRole: 'identifier',
99
+ }),
100
+ createdAt: schemaShape.createdAt.dateSpec({ meaning: 'When the task was recorded.', whyItMatters: 'The retention clock: the row is deleted once the declared OPERATIONAL_LOGS period has passed since this instant.', temporalRole: 'creation' }),
101
+ },
102
+ operations: {
103
+ [Op.CREATE]: {
104
+ purpose: 'Record that a conversation opened a remote task.',
105
+ outcome: 'The conversation can continue, read and cancel the task.',
106
+ responseStatuses: [{ code: HttpResponseStatusCode.CREATED_201, meaning: 'The record was written. Internal write path.' }],
107
+ },
108
+ [Op.READ]: {
109
+ purpose: 'Read one ownership record for an internal caller.',
110
+ outcome: 'The row is returned to the internal caller.',
111
+ idempotent: true,
112
+ responseStatuses: [{ code: HttpResponseStatusCode.OK_200, meaning: 'The row was found.' }],
113
+ },
114
+ [Op.LIST]: {
115
+ purpose: 'Find the record of a remote task for the conversation acting on it.',
116
+ outcome: 'The rows are returned to the internal caller.',
117
+ idempotent: true,
118
+ responseStatuses: [{ code: HttpResponseStatusCode.OK_200, meaning: 'The rows were returned.' }],
119
+ },
120
+ [Op.DELETE_MANY]: {
121
+ purpose: 'Internal cleanup: the retention-class sweep, and the tenant teardown of an organization the rows name. No public deletion route.',
122
+ outcome: 'Rows past the OPERATIONAL_LOGS period, or naming an organization being torn down, are removed.',
123
+ idempotent: true,
124
+ },
125
+ },
126
+ businessConstraints: [
127
+ 'A remote agent ref, the remote task\'s ids, the credential row that opened it, the organization whose credential it was (only then) and the state it opened in, only: no message, answer or person id is stored.',
128
+ 'A remote task belongs to one conversation, the first one that recorded it, and is acted on only with the credential that opened it.',
129
+ 'Append-only: there is no update. A tool reads the task\'s state from the remote agent each time; what the row keeps is the state the remote agent reported when the task was opened, a fact of that moment that is never updated.',
130
+ ],
131
+ }), { resourcePrimaryScope: ResourcePrimaryScope.APPLICATION });
132
+ //# sourceMappingURL=remote-agent-tasks.resource.specification.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"remote-agent-tasks.resource.specification.js","sourceRoot":"","sources":["../../../../../src/engine/flows-actors/resources/remote-agent-tasks.resource.specification.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AACpE,OAAO,EAAE,mBAAmB,EAAE,cAAc,EAAE,uBAAuB,EAAE,MAAM,0BAA0B,CAAC;AACxG,OAAO,EACL,qBAAqB,IAAI,EAAE,EAC3B,wBAAwB,EACxB,4BAA4B,EAC5B,qBAAqB,EACrB,oBAAoB,EACpB,2DAA2D,IAAI,uBAAuB,GACvF,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAuC,sBAAsB,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AACjI,OAAO,EAAE,uBAAuB,EAAE,MAAM,kCAAkC,CAAC;AAE3E,MAAM,eAAe,GAAG,CAAC,UAAkB,EAAE,EAAE,CAAC,CAAC;IAC/C,WAAW,EAAE,uBAAuB;IACpC,UAAU;IACV,UAAU,EAAE,cAAc,CAAC,IAAI;IAC/B,eAAe,EAAE,mBAAmB,CAAC,eAAe;CACrD,CAAC,CAAC;AAEH,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AAC,MAAM,CAAC,EAAE;YACX,OAAO,EAAE,kDAAkD;YAC3D,OAAO,EAAE,0DAA0D;YACnE,gBAAgB,EAAE,CAAC,EAAE,IAAI,EAAE,sBAAsB,CAAC,WAAW,EAAE,OAAO,EAAE,8CAA8C,EAAE,CAAC;SAC1H;QACD,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE;YACT,OAAO,EAAE,mDAAmD;YAC5D,OAAO,EAAE,6CAA6C;YACtD,UAAU,EAAE,IAAI;YAChB,gBAAgB,EAAE,CAAC,EAAE,IAAI,EAAE,sBAAsB,CAAC,MAAM,EAAE,OAAO,EAAE,oBAAoB,EAAE,CAAC;SAC3F;QACD,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE;YACT,OAAO,EAAE,qEAAqE;YAC9E,OAAO,EAAE,+CAA+C;YACxD,UAAU,EAAE,IAAI;YAChB,gBAAgB,EAAE,CAAC,EAAE,IAAI,EAAE,sBAAsB,CAAC,MAAM,EAAE,OAAO,EAAE,yBAAyB,EAAE,CAAC;SAChG;QACD,CAAC,EAAE,CAAC,WAAW,CAAC,EAAE;YAChB,OAAO,EAAE,kIAAkI;YAC3I,OAAO,EAAE,gGAAgG;YACzG,UAAU,EAAE,IAAI;SACjB;KACF;IAED,mBAAmB,EAAE;QACnB,kNAAkN;QAClN,qIAAqI;QACrI,mOAAmO;KACpO;CACF,CAAC,EACF,EAAE,oBAAoB,EAAE,oBAAoB,CAAC,WAAW,EAAE,CAC3D,CAAC","sourcesContent":["/**\n * Resource: `remoteAgentTasks` — Wildo SaaS engine specification (application-scoped storage, engine-written). #3930.\n *\n * Inputs:\n * - Schema: `RemoteAgentTaskSchema` (`flows-actors/remote-agent-tasks.shared.schemas.ts`)\n * - Factory: `remoteAgentTasksResourceConfiguration_InitializationFactory`\n * - Writer and reader: the agent runtime (`RemoteAgentTaskOwnershipBackendService`), when a delegation to a remote A2A\n * agent opens a task, and before a continuation, a read or a cancellation acts on one.\n * - Reader: the Agent activity page (#4024, `agent-to-agent-tasks-read.backend.ts`), for the organization's tasks.\n *\n * The runtime reasoning (why the record exists, why one row per task, what it never holds) lives in the schema file's\n * header and is not restated here.\n */\nimport { LabelAudience } from '@wildo-ai/presets-components-models';\nimport { CodeDeclarationKind, CodeSymbolKind, FieldSemanticImportance } from '@wildo-ai/zod-decorators';\nimport {\n CoreResourceOperation as Op,\n OutboundCredentialSource,\n RemoteAgentTaskReportedState,\n RemoteAgentTaskSchema,\n ResourcePrimaryScope,\n remoteAgentTasksResourceConfiguration_InitializationFactory as remoteAgentTasksFactory,\n} from '@wildo-ai/saas-models';\nimport { type AnyResourceSpecificationConfig, HttpResponseStatusCode, resourceSpecification } from '~wildo-specifications/_core';\nimport { EngineResourceSubDomain } from '../../engine-resource-sub-domain';\n\nconst enumDeclaration = (exportName: string) => ({\n packageName: '@wildo-ai/saas-models',\n exportName,\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n});\n\nexport const remoteAgentTasksResourceSpecification: AnyResourceSpecificationConfig = resourceSpecification(\n remoteAgentTasksFactory,\n RemoteAgentTaskSchema,\n ({ schemaShape }) => ({\n purpose: 'Record which conversation opened each task another party\\'s A2A agent started for a delegation, through which remote agent, and with which stored credential.',\n businessRole: 'What makes a remote task safe to continue, read or cancel: an agent may act only on a remote task its own conversation opened, so a shared organization credential never lets one conversation, or a prompt injected into it, act on another conversation\\'s work at the remote party.',\n lifecycleRole: 'Written by the engine when a delegation to a remote agent returns a task id, read before a continuation, a read or a cancellation and by the Agent activity page, never updated, and deleted by the retention-class sweep once the application\\'s OPERATIONAL_LOGS period has passed since it was written, or with the organization it names when that organization is torn down.',\n audience: LabelAudience.DEVELOPER,\n subDomain: EngineResourceSubDomain.FLOWS_ACTORS,\n codeHandling: {\n mainSchema: { packageName: '@wildo-ai/saas-models', exportName: 'RemoteAgentTaskSchema', symbolKind: CodeSymbolKind.SCHEMA, declarationKind: CodeDeclarationKind.ZOD_SCHEMA },\n resourceFactory: { packageName: '@wildo-ai/saas-models', exportName: 'remoteAgentTasksResourceConfiguration_InitializationFactory', symbolKind: CodeSymbolKind.FACTORY, declarationKind: CodeDeclarationKind.FUNCTION },\n resourceType: { enumDeclaration: enumDeclaration('CoreResourceType'), memberName: 'REMOTE_AGENT_TASKS' },\n operationVocabulary: { coreEnum: enumDeclaration('CoreResourceOperation') },\n notes: [\n 'Every operation is route-less: CREATE, READ and LIST are REPOSITORY_ONLY and DELETE_MANY is INTERNAL_CALL (the retention-class sweep and the tenant teardown delete through the service layer). The roles are never exercised by a request. The Agent activity page (#4024) reads the rows on the infrastructure tier and projects an allow-list of their fields.',\n 'The unique key is `remoteTaskKey`, built only by `remoteAgentTaskKeyOf(remoteAgentRef, remoteTaskId)`: a remote task belongs to the first conversation that recorded it, and a later claim on it is refused.',\n 'Retention: `retentionBinding: { retentionClass: OPERATIONAL_LOGS, startPoint: CREATED }`.',\n 'A task the ORGANIZATION\\'s credential opened names that organization (`organizationId`, #4024), and the `organizations → remoteAgentTasks` COMPOSITION edge deletes it with the tenant. A task a person\\'s own credential opened names none. No row names a person: the path from a person runs through the conversation it names, whose own impersonalization an erasure applies.',\n ],\n },\n\n fields: {\n _id: schemaShape._id.stringSpec({ meaning: 'Identity of this ownership record.', semanticRole: 'identifier' }),\n applicationId: schemaShape.applicationId.stringSpec({ meaning: 'The application record the task was opened by, stamped from the canonical identity.', semanticRole: 'identifier' }),\n executionId: schemaShape.executionId.stringSpec({\n meaning: 'The conversation whose turn opened the remote task.',\n whyItMatters: 'The owner: a continuation, a read or a cancellation is accepted only from this conversation.',\n semanticRole: 'identifier',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n remoteAgentRef: schemaShape.remoteAgentRef.stringSpec({ meaning: 'The remote agent, as the application declared it.', semanticRole: 'code', importance: FieldSemanticImportance.PRIMARY }),\n remoteTaskId: schemaShape.remoteTaskId.stringSpec({ meaning: 'The task\\'s id at the remote agent, which the agent presents to act on the task.', semanticRole: 'identifier' }),\n remoteContextId: schemaShape.remoteContextId.stringSpec({ meaning: 'The remote conversation the task belongs to, sent with a continuation. Absent when the remote agent named none.', semanticRole: 'identifier' }),\n remoteTaskKey: schemaShape.remoteTaskKey.stringSpec({\n meaning: 'The remote agent and the remote task id in one unique value.',\n whyItMatters: 'A remote agent opens a task once, so a second claim on the same task, even one a remote agent invited by answering with an id another conversation holds, is refused at the write.',\n semanticRole: 'identifier',\n }),\n credentialSource: schemaShape.credentialSource.enumSpec({\n meaning: 'Whose stored credential opened the task: the person\\'s or the organization\\'s.',\n whyItMatters: 'Says on whose behalf the remote agent saw the task opened; the exact credential is `credentialId`.',\n enumDeclaration: enumDeclaration('OutboundCredentialSource'),\n values: {\n [OutboundCredentialSource.USER]: { meaning: 'The acting person\\'s own connection.' },\n [OutboundCredentialSource.ORGANIZATION]: { meaning: 'The organization\\'s connection.' },\n },\n }),\n organizationId: schemaShape.organizationId.stringSpec({\n meaning: 'The organization whose stored credential opened the task. Absent when a person\\'s own credential did.',\n whyItMatters: 'The task is the organization\\'s: its administrators read it on Agent activity, and it is deleted with the organization. A task a person\\'s own credential opened is that person\\'s, so it names no organization and no administrator reads it.',\n semanticRole: 'identifier',\n }),\n openedState: schemaShape.openedState.enumSpec({\n meaning: 'The state the remote agent reported in the answer that opened the task, when it reported one. Written once, never updated.',\n whyItMatters: 'Agent activity shows it as the task\\'s state until a pushed update reports a later one; a task that opened already ended (completed, failed, rejected) has no later update at all.',\n enumDeclaration: enumDeclaration('RemoteAgentTaskReportedState'),\n values: {\n [RemoteAgentTaskReportedState.SUBMITTED]: { meaning: 'The remote agent accepted the task and had not started it.' },\n [RemoteAgentTaskReportedState.WORKING]: { meaning: 'The remote agent was working on it.' },\n [RemoteAgentTaskReportedState.INPUT_REQUIRED]: { meaning: 'The remote agent waited for a message from this application\\'s agent.' },\n [RemoteAgentTaskReportedState.AUTH_REQUIRED]: { meaning: 'The remote agent waited for an authorization given at the remote party.' },\n [RemoteAgentTaskReportedState.COMPLETED]: { meaning: 'The remote agent had already finished it.' },\n [RemoteAgentTaskReportedState.FAILED]: { meaning: 'The remote agent had already failed it.' },\n [RemoteAgentTaskReportedState.CANCELED]: { meaning: 'The task had already been canceled.' },\n [RemoteAgentTaskReportedState.REJECTED]: { meaning: 'The remote agent refused the task.' },\n [RemoteAgentTaskReportedState.UNKNOWN]: { meaning: 'The remote agent said it could not tell the task\\'s state.' },\n },\n }),\n pushTokenHash: schemaShape.pushTokenHash.stringSpec({\n meaning: 'The SHA-256 of the single-purpose token the remote agent presents when it pushes an update of this task. Present only when a push was registered.',\n whyItMatters: 'How the push receiver authenticates a push and finds its task; the token itself is never stored.',\n semanticRole: 'identifier',\n }),\n credentialId: schemaShape.credentialId.stringSpec({\n meaning: 'The stored credential that opened the task.',\n whyItMatters: 'The remote agent knows the task under the account this credential authenticates, so acting on it with any other credential, another member\\'s or a reconnected one, is refused before anything is sent.',\n semanticRole: 'identifier',\n }),\n createdAt: schemaShape.createdAt.dateSpec({ meaning: 'When the task was recorded.', whyItMatters: 'The retention clock: the row is deleted once the declared OPERATIONAL_LOGS period has passed since this instant.', temporalRole: 'creation' }),\n },\n\n operations: {\n [Op.CREATE]: {\n purpose: 'Record that a conversation opened a remote task.',\n outcome: 'The conversation can continue, read and cancel the task.',\n responseStatuses: [{ code: HttpResponseStatusCode.CREATED_201, meaning: 'The record was written. Internal write path.' }],\n },\n [Op.READ]: {\n purpose: 'Read one ownership record for an internal caller.',\n outcome: 'The row is returned to the internal caller.',\n idempotent: true,\n responseStatuses: [{ code: HttpResponseStatusCode.OK_200, meaning: 'The row was found.' }],\n },\n [Op.LIST]: {\n purpose: 'Find the record of a remote task for the conversation acting on it.',\n outcome: 'The rows are returned to the internal caller.',\n idempotent: true,\n responseStatuses: [{ code: HttpResponseStatusCode.OK_200, meaning: 'The rows were returned.' }],\n },\n [Op.DELETE_MANY]: {\n purpose: 'Internal cleanup: the retention-class sweep, and the tenant teardown of an organization the rows name. No public deletion route.',\n outcome: 'Rows past the OPERATIONAL_LOGS period, or naming an organization being torn down, are removed.',\n idempotent: true,\n },\n },\n\n businessConstraints: [\n 'A remote agent ref, the remote task\\'s ids, the credential row that opened it, the organization whose credential it was (only then) and the state it opened in, only: no message, answer or person id is stored.',\n 'A remote task belongs to one conversation, the first one that recorded it, and is acted on only with the credential that opened it.',\n 'Append-only: there is no update. A tool reads the task\\'s state from the remote agent each time; what the row keeps is the state the remote agent reported when the task was opened, a fact of that moment that is never updated.',\n ],\n }),\n { resourcePrimaryScope: ResourcePrimaryScope.APPLICATION },\n);\n"]}
@@ -0,0 +1,5 @@
1
+ import { type FrontendComponentSpecificationConfig } from '../../../_core';
2
+ export declare const appLayoutsAgentActivitySettingsSpecificationKey: string;
3
+ export declare const appLayoutsAgentActivitySettingsRegistryKey = "APP_LAYOUTS_AGENT_ACTIVITY_SETTINGS:Default";
4
+ export declare const appLayoutsAgentActivitySettingsFrontendComponentSpecification: FrontendComponentSpecificationConfig;
5
+ //# sourceMappingURL=app-layout-agent-activity-settings.frontend-component.specification.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"app-layout-agent-activity-settings.frontend-component.specification.d.ts","sourceRoot":"","sources":["../../../../../src/engine/frontend-components/app/app-layout-agent-activity-settings.frontend-component.specification.ts"],"names":[],"mappings":"AAKA,OAAO,EAQL,KAAK,oCAAoC,EAE1C,MAAM,6BAA6B,CAAC;AAErC,eAAO,MAAM,+CAA+C,QAE1D,CAAC;AACH,eAAO,MAAM,0CAA0C,gDAA4F,CAAC;AAEpJ,eAAO,MAAM,6DAA6D,EAAE,oCA6ExE,CAAC"}