@kingsoftcloud/ksadk-web 0.3.11 → 0.3.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/RELEASE_PROVENANCE.json +2 -2
- package/dist-lib/{AttachmentPreview-tjd7Ufsh.js → AttachmentPreview-HLpbjOnQ.js} +1 -1
- package/dist-lib/{ConnectedComposer-BaRxxvhk.js → ConnectedComposer-CeWPgOn2.js} +1 -1
- package/dist-lib/{ConnectedMessageList-XLBootgU.js → ConnectedMessageList-D3HWHCh2.js} +1 -1
- package/dist-lib/{InteractionSchemaForm-BNoW5wzt.js → InteractionSchemaForm-Du9NT4E8.js} +1 -1
- package/dist-lib/chat-composer.js +2 -2
- package/dist-lib/chat-timeline.js +2 -2
- package/dist-lib/cloudMaterials-BlIAT-PA.js +2491 -0
- package/dist-lib/components/teams/CloudEffectsPanel.d.ts +15 -0
- package/dist-lib/components/teams/CloudEffectsPanel.d.ts.map +1 -0
- package/dist-lib/components/teams/CloudTeamWorkspace.d.ts +38 -0
- package/dist-lib/components/teams/CloudTeamWorkspace.d.ts.map +1 -0
- package/dist-lib/components/teams/CreateGroupDialog.d.ts +3 -1
- package/dist-lib/components/teams/CreateGroupDialog.d.ts.map +1 -1
- package/dist-lib/components.js +3 -3
- package/dist-lib/core/teams/cloudCanonical.d.ts +11 -0
- package/dist-lib/core/teams/cloudCanonical.d.ts.map +1 -0
- package/dist-lib/core/teams/cloudClient.d.ts +30 -0
- package/dist-lib/core/teams/cloudClient.d.ts.map +1 -0
- package/dist-lib/core/teams/cloudContracts.d.ts +1499 -0
- package/dist-lib/core/teams/cloudContracts.d.ts.map +1 -0
- package/dist-lib/core/teams/cloudEffects.d.ts +167 -0
- package/dist-lib/core/teams/cloudEffects.d.ts.map +1 -0
- package/dist-lib/core/teams/cloudExtendedContracts.d.ts +1014 -0
- package/dist-lib/core/teams/cloudExtendedContracts.d.ts.map +1 -0
- package/dist-lib/core/teams/cloudMaterials.d.ts +83 -0
- package/dist-lib/core/teams/cloudMaterials.d.ts.map +1 -0
- package/dist-lib/core/teams/cloudOperations.d.ts +30 -0
- package/dist-lib/core/teams/cloudOperations.d.ts.map +1 -0
- package/dist-lib/core/teams/cloudProductClient.d.ts +177 -0
- package/dist-lib/core/teams/cloudProductClient.d.ts.map +1 -0
- package/dist-lib/core/teams/cloudScope.d.ts +6 -0
- package/dist-lib/core/teams/cloudScope.d.ts.map +1 -0
- package/dist-lib/core/teams/operationOutbox.d.ts +138 -0
- package/dist-lib/core/teams/operationOutbox.d.ts.map +1 -0
- package/dist-lib/core/teams/workspaceContracts.d.ts +1696 -0
- package/dist-lib/core/teams/workspaceContracts.d.ts.map +1 -0
- package/dist-lib/core/teams/workspaceObserver.d.ts +49 -0
- package/dist-lib/core/teams/workspaceObserver.d.ts.map +1 -0
- package/dist-lib/core/teams/workspaceReducer.d.ts +37 -0
- package/dist-lib/core/teams/workspaceReducer.d.ts.map +1 -0
- package/dist-lib/public/team-components.d.ts +1 -0
- package/dist-lib/public/team-components.d.ts.map +1 -1
- package/dist-lib/public/teams.d.ts +11 -0
- package/dist-lib/public/teams.d.ts.map +1 -1
- package/dist-lib/runtime.js +2 -2
- package/dist-lib/team-components.js +1875 -750
- package/dist-lib/teams.css +54 -0
- package/dist-lib/teams.js +685 -31
- package/package.json +2 -1
- package/schemas/teams-cloud/v1/binding-probe-permit.schema.json +1 -0
- package/schemas/teams-cloud/v1/build-artifact-lookup-input.schema.json +1 -0
- package/schemas/teams-cloud/v1/build-artifact-lookup-result.schema.json +1 -0
- package/schemas/teams-cloud/v1/build-artifact-receipt.schema.json +1 -0
- package/schemas/teams-cloud/v1/build-manifest.schema.json +1 -0
- package/schemas/teams-cloud/v1/callback-permit.schema.json +1 -0
- package/schemas/teams-cloud/v1/canonical-event-batch.schema.json +1 -0
- package/schemas/teams-cloud/v1/deployment-artifact-receipt.schema.json +1 -0
- package/schemas/teams-cloud/v1/effect-outcome.schema.json +1 -0
- package/schemas/teams-cloud/v1/effect-prepared-receipt.schema.json +1 -0
- package/schemas/teams-cloud/v1/effect-projection-page.schema.json +1 -0
- package/schemas/teams-cloud/v1/effect-projection.schema.json +1 -0
- package/schemas/teams-cloud/v1/effect-reconcile-input.schema.json +1 -0
- package/schemas/teams-cloud/v1/effect-record.schema.json +1 -0
- package/schemas/teams-cloud/v1/effect-report-receipt.schema.json +1 -0
- package/schemas/teams-cloud/v1/effect-request.schema.json +1 -0
- package/schemas/teams-cloud/v1/execution-effects-page.schema.json +1 -0
- package/schemas/teams-cloud/v1/execution-effects-request.schema.json +1 -0
- package/schemas/teams-cloud/v1/execution-permit.schema.json +1 -0
- package/schemas/teams-cloud/v1/execution-reference.schema.json +1 -0
- package/schemas/teams-cloud/v1/execution-result.schema.json +1 -0
- package/schemas/teams-cloud/v1/host-operation-result.schema.json +1 -0
- package/schemas/teams-cloud/v1/host-receipt.schema.json +1 -0
- package/schemas/teams-cloud/v1/loaded-build-evidence.schema.json +1 -0
- package/schemas/teams-cloud/v1/manifest.json +43 -0
- package/schemas/teams-cloud/v1/material-create.schema.json +1 -0
- package/schemas/teams-cloud/v1/material-manifest.schema.json +1 -0
- package/schemas/teams-cloud/v1/node-command.schema.json +1 -0
- package/schemas/teams-cloud/v1/node-probe-command.schema.json +1 -0
- package/schemas/teams-cloud/v1/node-probe-report.schema.json +1 -0
- package/schemas/teams-cloud/v1/node-report.schema.json +1 -0
- package/schemas/teams-cloud/v1/release-verification-receipt.schema.json +1 -0
- package/schemas/teams-cloud/v1/release-verify-input.schema.json +1 -0
- package/dist-lib/reducer-gQmR9Qb9.js +0 -424
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"$defs":{"CanonicalEventBatch":{"additionalProperties":false,"properties":{"afterSeq":{"maximum":9007199254740991,"minimum":0,"title":"Afterseq","type":"integer"},"hasMore":{"title":"Hasmore","type":"boolean"},"items":{"items":{"$ref":"#/$defs/CanonicalExecutionEvent"},"maxItems":200,"title":"Items","type":"array"},"nextSeq":{"maximum":9007199254740991,"minimum":0,"title":"Nextseq","type":"integer"},"sessionId":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Sessionid","type":"string"},"snapshotUpperSeq":{"maximum":9007199254740991,"minimum":0,"title":"Snapshotupperseq","type":"integer"},"storeIncarnation":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Storeincarnation","type":"string"}},"required":["sessionId","storeIncarnation","afterSeq","nextSeq","snapshotUpperSeq","hasMore","items"],"title":"CanonicalEventBatch","type":"object"},"CanonicalExecutionEvent":{"additionalProperties":false,"properties":{"eventId":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Eventid","type":"string"},"family":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Family","type":"string"},"payload":{"additionalProperties":{"$ref":"#/$defs/JsonValue"},"title":"Payload","type":"object"},"runId":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Runid","type":"string"},"seq":{"maximum":9007199254740991,"minimum":0,"title":"Seq","type":"integer"},"sessionId":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Sessionid","type":"string"},"sourceRef":{"$ref":"#/$defs/EventSourceRef"},"type":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Type","type":"string"}},"required":["eventId","sessionId","runId","seq","family","type","payload","sourceRef"],"title":"CanonicalExecutionEvent","type":"object"},"EventSourceRef":{"additionalProperties":false,"properties":{"nativeEventType":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"title":"Nativeeventtype"},"nativeRunId":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"title":"Nativerunid"},"parentRunId":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"title":"Parentrunid"}},"title":"EventSourceRef","type":"object"},"ExecutionGrantBarrierView":{"additionalProperties":false,"properties":{"commands":{"items":{"$ref":"#/$defs/GrantCommandView"},"maxItems":10000,"title":"Commands","type":"array"},"discardedMessageIds":{"items":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},"maxItems":10000,"title":"Discardedmessageids","type":"array"},"inFlightMessageIds":{"items":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},"maxItems":10000,"title":"Inflightmessageids","type":"array"},"queuedMessageIds":{"items":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},"maxItems":10000,"title":"Queuedmessageids","type":"array"},"settledMessageIds":{"items":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},"maxItems":10000,"title":"Settledmessageids","type":"array"}},"title":"ExecutionGrantBarrierView","type":"object"},"ExecutionGrantSnapshot":{"additionalProperties":false,"properties":{"barrier":{"$ref":"#/$defs/ExecutionGrantBarrierView"},"grant":{"$ref":"#/$defs/ExecutionGrantView"},"storeIncarnation":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Storeincarnation","type":"string"}},"required":["storeIncarnation","grant","barrier"],"title":"ExecutionGrantSnapshot","type":"object"},"ExecutionGrantView":{"additionalProperties":false,"properties":{"admissionAllowed":{"title":"Admissionallowed","type":"boolean"},"admissionRevision":{"maximum":9007199254740991,"minimum":1,"title":"Admissionrevision","type":"integer"},"attemptEpoch":{"maximum":9007199254740991,"minimum":1,"title":"Attemptepoch","type":"integer"},"expiresAt":{"title":"Expiresat","type":"string"},"grantId":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Grantid","type":"string"},"revision":{"maximum":9007199254740991,"minimum":1,"title":"Revision","type":"integer"},"state":{"enum":["active","suspended","revoked"],"title":"State","type":"string"}},"required":["grantId","state","revision","attemptEpoch","expiresAt","admissionAllowed","admissionRevision"],"title":"ExecutionGrantView","type":"object"},"ExecutionResult":{"additionalProperties":false,"description":"One canonical completion, persisted atomically with its Node report.\n\nterminalEvidence.resultDigest covers the exact candidate. completionDigest\nindependently covers status, candidate, usage and terminal evidence together;\nit cannot silently change accounting or terminal identity during a retry.","properties":{"candidate":{"$ref":"#/$defs/ExecutionResultCandidate"},"completionDigest":{"pattern":"^sha256:[0-9a-f]{64}$","title":"Completiondigest","type":"string"},"status":{"enum":["succeeded","failed","cancelled","interrupted"],"title":"Status","type":"string"},"terminalEvidence":{"$ref":"#/$defs/TerminalEvidence"},"usage":{"$ref":"#/$defs/ExecutionResultUsage"}},"required":["status","candidate","usage","terminalEvidence","completionDigest"],"title":"ExecutionResult","type":"object"},"ExecutionResultCandidate":{"additionalProperties":false,"properties":{"artifacts":{"items":{"additionalProperties":{"$ref":"#/$defs/JsonValue"},"type":"object"},"maxItems":1000,"title":"Artifacts","type":"array"},"result":{"maxLength":1048576,"title":"Result","type":"string"}},"required":["result"],"title":"ExecutionResultCandidate","type":"object"},"ExecutionResultUsage":{"additionalProperties":false,"properties":{"totalTokens":{"maximum":9007199254740991,"minimum":0,"title":"Totaltokens","type":"integer"}},"required":["totalTokens"],"title":"ExecutionResultUsage","type":"object"},"GetGrantResult":{"additionalProperties":false,"properties":{"current":{"anyOf":[{"$ref":"#/$defs/ExecutionGrantSnapshot"},{"type":"null"}],"default":null},"lookupOperationId":{"anyOf":[{"maxLength":200,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"title":"Lookupoperationid"},"mutationReceipt":{"anyOf":[{"$ref":"#/$defs/GrantMutationReceipt"},{"type":"null"}],"default":null},"operation":{"const":"get_grant","title":"Operation","type":"string"},"storeIncarnation":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Storeincarnation","type":"string"}},"required":["operation","storeIncarnation"],"title":"GetGrantResult","type":"object"},"GrantCommandView":{"additionalProperties":false,"properties":{"commandId":{"pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$","title":"Commandid","type":"string"},"idempotencyKey":{"maxLength":200,"minLength":1,"title":"Idempotencykey","type":"string"},"inboxState":{"enum":["accepted","claimed","completed","discarded"],"title":"Inboxstate","type":"string"},"messageId":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Messageid","type":"string"},"runId":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"title":"Runid"},"runState":{"anyOf":[{"enum":["pending","running","paused","waiting","completed","failed","cancelled","interrupted"],"type":"string"},{"type":"null"}],"default":null,"title":"Runstate"}},"required":["messageId","commandId","idempotencyKey","inboxState"],"title":"GrantCommandView","type":"object"},"GrantMutationReceipt":{"additionalProperties":false,"properties":{"operationId":{"maxLength":200,"minLength":1,"title":"Operationid","type":"string"},"snapshot":{"$ref":"#/$defs/ExecutionGrantSnapshot"},"status":{"const":"applied","default":"applied","title":"Status","type":"string"}},"required":["operationId","snapshot"],"title":"GrantMutationReceipt","type":"object"},"HostReceipt":{"additionalProperties":false,"properties":{"acceptedSeq":{"anyOf":[{"maximum":9007199254740991,"minimum":0,"type":"integer"},{"type":"null"}],"default":null,"title":"Acceptedseq"},"commandId":{"pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$","title":"Commandid","type":"string"},"idempotencyKey":{"maxLength":200,"minLength":1,"title":"Idempotencykey","type":"string"},"nativeStatus":{"anyOf":[{"enum":["queued","running","waiting","awaiting_approval","waiting_for_node","succeeded","failed","cancelled","interrupted"],"type":"string"},{"type":"null"}],"default":null,"title":"Nativestatus"},"payloadDigest":{"pattern":"^sha256:[0-9a-f]{64}$","title":"Payloaddigest","type":"string"},"runId":{"anyOf":[{"maxLength":256,"minLength":1,"pattern":"^\\S+$","type":"string"},{"type":"null"}],"default":null,"title":"Runid"},"status":{"enum":["missing","accepted","duplicate","rejected","uncertain"],"title":"Status","type":"string"},"storeIncarnation":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Storeincarnation","type":"string"},"terminalEvidence":{"anyOf":[{"$ref":"#/$defs/TerminalEvidence"},{"type":"null"}],"default":null}},"required":["status","commandId","idempotencyKey","payloadDigest","storeIncarnation"],"title":"HostReceipt","type":"object"},"JsonValue":{},"MaterialProof":{"additionalProperties":false,"properties":{"digest":{"pattern":"^sha256:[0-9a-f]{64}$","title":"Digest","type":"string"},"manifestRef":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Manifestref","type":"string"}},"required":["manifestRef","digest"],"title":"MaterialProof","type":"object"},"PrepareResult":{"additionalProperties":false,"properties":{"contextDigest":{"pattern":"^sha256:[0-9a-f]{64}$","title":"Contextdigest","type":"string"},"contextRef":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Contextref","type":"string"},"operation":{"const":"prepare","title":"Operation","type":"string"},"snapshot":{"$ref":"#/$defs/ExecutionGrantSnapshot"}},"required":["operation","contextRef","contextDigest","snapshot"],"title":"PrepareResult","type":"object"},"ReportError":{"additionalProperties":false,"properties":{"code":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Code","type":"string"},"retryable":{"title":"Retryable","type":"boolean"}},"required":["code","retryable"],"title":"ReportError","type":"object"},"SetAdmissionResult":{"additionalProperties":false,"properties":{"mutationReceipt":{"$ref":"#/$defs/GrantMutationReceipt"},"operation":{"const":"set_admission","title":"Operation","type":"string"}},"required":["operation","mutationReceipt"],"title":"SetAdmissionResult","type":"object"},"SetGrantResult":{"additionalProperties":false,"properties":{"mutationReceipt":{"$ref":"#/$defs/GrantMutationReceipt"},"operation":{"const":"set_grant","title":"Operation","type":"string"}},"required":["operation","mutationReceipt"],"title":"SetGrantResult","type":"object"},"TerminalEvidence":{"additionalProperties":false,"properties":{"commandId":{"pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$","title":"Commandid","type":"string"},"resultDigest":{"anyOf":[{"pattern":"^sha256:[0-9a-f]{64}$","type":"string"},{"type":"null"}],"default":null,"title":"Resultdigest"},"runId":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Runid","type":"string"},"sessionId":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Sessionid","type":"string"},"terminalEventDigest":{"pattern":"^sha256:[0-9a-f]{64}$","title":"Terminaleventdigest","type":"string"},"terminalSeq":{"maximum":9007199254740991,"minimum":0,"title":"Terminalseq","type":"integer"}},"required":["sessionId","runId","commandId","terminalSeq","terminalEventDigest"],"title":"TerminalEvidence","type":"object"}},"additionalProperties":false,"properties":{"commandDigest":{"pattern":"^sha256:[0-9a-f]{64}$","title":"Commanddigest","type":"string"},"error":{"anyOf":[{"$ref":"#/$defs/ReportError"},{"type":"null"}],"default":null},"eventBatch":{"anyOf":[{"$ref":"#/$defs/CanonicalEventBatch"},{"type":"null"}],"default":null},"executionResult":{"anyOf":[{"$ref":"#/$defs/ExecutionResult"},{"type":"null"}],"default":null},"materialProof":{"anyOf":[{"$ref":"#/$defs/MaterialProof"},{"type":"null"}],"default":null},"nodeCommandId":{"pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$","title":"Nodecommandid","type":"string"},"nodeGeneration":{"maximum":9007199254740991,"minimum":1,"title":"Nodegeneration","type":"integer"},"operationResult":{"anyOf":[{"discriminator":{"mapping":{"get_grant":"#/$defs/GetGrantResult","prepare":"#/$defs/PrepareResult","set_admission":"#/$defs/SetAdmissionResult","set_grant":"#/$defs/SetGrantResult"},"propertyName":"operation"},"oneOf":[{"$ref":"#/$defs/PrepareResult"},{"$ref":"#/$defs/SetGrantResult"},{"$ref":"#/$defs/GetGrantResult"},{"$ref":"#/$defs/SetAdmissionResult"}]},{"type":"null"}],"default":null,"title":"Operationresult"},"phase":{"enum":["prepared","submitted","running","waiting","terminal","uncertain","rejected","control_applied"],"title":"Phase","type":"string"},"receipt":{"anyOf":[{"$ref":"#/$defs/HostReceipt"},{"type":"null"}],"default":null},"resultRevision":{"maximum":9007199254740991,"minimum":1,"title":"Resultrevision","type":"integer"}},"required":["nodeCommandId","nodeGeneration","commandDigest","resultRevision","phase"],"title":"NodeReport","type":"object"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"additionalProperties":false,"properties":{"buildArtifactRef":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Buildartifactref","type":"string"},"cloudBindingRef":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Cloudbindingref","type":"string"},"evidenceDigest":{"pattern":"^sha256:[0-9a-f]{64}$","title":"Evidencedigest","type":"string"},"localBindingRef":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Localbindingref","type":"string"},"releaseRef":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Releaseref","type":"string"},"verifiedAt":{"title":"Verifiedat","type":"string"}},"required":["releaseRef","buildArtifactRef","localBindingRef","cloudBindingRef","evidenceDigest","verifiedAt"],"title":"ReleaseVerificationReceipt","type":"object"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"additionalProperties":false,"properties":{"buildArtifactRef":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Buildartifactref","type":"string"},"cloudBindingRef":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Cloudbindingref","type":"string"},"idempotencyKey":{"maxLength":200,"minLength":1,"title":"Idempotencykey","type":"string"},"localBindingRef":{"maxLength":256,"minLength":1,"pattern":"^\\S+$","title":"Localbindingref","type":"string"}},"required":["buildArtifactRef","localBindingRef","cloudBindingRef","idempotencyKey"],"title":"ReleaseVerifyInput","type":"object"}
|
|
@@ -1,424 +0,0 @@
|
|
|
1
|
-
import { z as e } from "zod";
|
|
2
|
-
//#region src/core/teams/types.ts
|
|
3
|
-
var t = "teams.ksadk.io/v1", n = e.string().min(1).max(2048), r = e.number().int().nonnegative(), i = e.string().min(1), a = e.enum([
|
|
4
|
-
"planning",
|
|
5
|
-
"running",
|
|
6
|
-
"waiting",
|
|
7
|
-
"needs_attention",
|
|
8
|
-
"awaiting_acceptance",
|
|
9
|
-
"succeeded",
|
|
10
|
-
"failed",
|
|
11
|
-
"cancel_requested",
|
|
12
|
-
"cancelled"
|
|
13
|
-
]), o = e.enum([
|
|
14
|
-
"draft",
|
|
15
|
-
"ready",
|
|
16
|
-
"blocked",
|
|
17
|
-
"running",
|
|
18
|
-
"awaiting_acceptance",
|
|
19
|
-
"succeeded",
|
|
20
|
-
"failed",
|
|
21
|
-
"cancel_requested",
|
|
22
|
-
"cancelled"
|
|
23
|
-
]), s = e.object({
|
|
24
|
-
authorityRef: n,
|
|
25
|
-
groupId: n,
|
|
26
|
-
memberId: n,
|
|
27
|
-
bindingRef: n,
|
|
28
|
-
providerRef: n,
|
|
29
|
-
sessionId: n,
|
|
30
|
-
runId: n,
|
|
31
|
-
itemId: n.optional()
|
|
32
|
-
}).passthrough(), c = s.extend({ interactionId: n }), l = e.object({
|
|
33
|
-
enqueue: e.boolean(),
|
|
34
|
-
cancel: e.boolean(),
|
|
35
|
-
steer: e.boolean(),
|
|
36
|
-
restore: e.boolean(),
|
|
37
|
-
interaction: e.boolean(),
|
|
38
|
-
leader: e.boolean()
|
|
39
|
-
}).passthrough(), u = e.object({
|
|
40
|
-
groupId: n,
|
|
41
|
-
name: e.string().min(1),
|
|
42
|
-
authorityRef: n,
|
|
43
|
-
tenantId: n,
|
|
44
|
-
ownerSubject: n,
|
|
45
|
-
policy: e.object({
|
|
46
|
-
taskAcceptance: e.enum([
|
|
47
|
-
"leader",
|
|
48
|
-
"human",
|
|
49
|
-
"result"
|
|
50
|
-
]),
|
|
51
|
-
peerWake: e.boolean()
|
|
52
|
-
}).optional(),
|
|
53
|
-
leaderMemberId: n,
|
|
54
|
-
revision: r,
|
|
55
|
-
status: e.enum(["active", "archived"]),
|
|
56
|
-
createdAt: i,
|
|
57
|
-
updatedAt: i
|
|
58
|
-
}).passthrough(), d = e.object({
|
|
59
|
-
memberId: n,
|
|
60
|
-
groupId: n,
|
|
61
|
-
name: e.string().min(1),
|
|
62
|
-
role: e.enum(["leader", "member"]),
|
|
63
|
-
responsibility: e.string().max(2e3).optional(),
|
|
64
|
-
bindingRef: n,
|
|
65
|
-
binding: e.object({
|
|
66
|
-
bindingRef: n,
|
|
67
|
-
providerRef: n,
|
|
68
|
-
kind: e.enum([
|
|
69
|
-
"local_build",
|
|
70
|
-
"a2a",
|
|
71
|
-
"cloud"
|
|
72
|
-
]),
|
|
73
|
-
agentId: n,
|
|
74
|
-
capabilities: l
|
|
75
|
-
}).passthrough(),
|
|
76
|
-
sessionId: n,
|
|
77
|
-
revision: r,
|
|
78
|
-
status: e.enum([
|
|
79
|
-
"active",
|
|
80
|
-
"removed",
|
|
81
|
-
"unavailable"
|
|
82
|
-
]),
|
|
83
|
-
executionStatus: e.enum([
|
|
84
|
-
"idle",
|
|
85
|
-
"queued",
|
|
86
|
-
"running",
|
|
87
|
-
"waiting",
|
|
88
|
-
"needs_attention",
|
|
89
|
-
"unavailable"
|
|
90
|
-
])
|
|
91
|
-
}).passthrough(), f = d.extend({
|
|
92
|
-
runMemberId: n,
|
|
93
|
-
teamRunId: n,
|
|
94
|
-
groupRevision: r
|
|
95
|
-
}), p = e.discriminatedUnion("kind", [e.object({
|
|
96
|
-
kind: e.literal("text"),
|
|
97
|
-
text: e.string()
|
|
98
|
-
}), e.object({
|
|
99
|
-
kind: e.literal("attachment"),
|
|
100
|
-
attachmentRef: n,
|
|
101
|
-
mediaType: n,
|
|
102
|
-
name: e.string().optional()
|
|
103
|
-
})]), m = e.object({
|
|
104
|
-
messageId: n,
|
|
105
|
-
groupId: n,
|
|
106
|
-
revision: r,
|
|
107
|
-
createdAt: i,
|
|
108
|
-
senderPrincipal: n,
|
|
109
|
-
senderName: e.string(),
|
|
110
|
-
groupRole: e.enum([
|
|
111
|
-
"owner",
|
|
112
|
-
"leader",
|
|
113
|
-
"member",
|
|
114
|
-
"system"
|
|
115
|
-
]),
|
|
116
|
-
parts: e.array(p),
|
|
117
|
-
mentions: e.array(n),
|
|
118
|
-
intent: e.enum([
|
|
119
|
-
"start_goal",
|
|
120
|
-
"followup",
|
|
121
|
-
"directed",
|
|
122
|
-
"note",
|
|
123
|
-
"result",
|
|
124
|
-
"progress"
|
|
125
|
-
]),
|
|
126
|
-
sourceRefs: e.array(s).optional(),
|
|
127
|
-
visibility: e.enum(["public", "internal"])
|
|
128
|
-
}).passthrough(), h = e.object({
|
|
129
|
-
artifactId: n,
|
|
130
|
-
name: e.string(),
|
|
131
|
-
mediaType: n,
|
|
132
|
-
source: s
|
|
133
|
-
}).passthrough(), g = e.object({
|
|
134
|
-
attemptId: n,
|
|
135
|
-
attemptNumber: r,
|
|
136
|
-
executionEpoch: r,
|
|
137
|
-
status: o,
|
|
138
|
-
source: s.optional(),
|
|
139
|
-
artifacts: e.array(h)
|
|
140
|
-
}).passthrough(), _ = e.object({
|
|
141
|
-
taskId: n,
|
|
142
|
-
groupId: n,
|
|
143
|
-
teamRunId: n,
|
|
144
|
-
revision: r,
|
|
145
|
-
title: e.string().min(1),
|
|
146
|
-
description: e.string(),
|
|
147
|
-
ownerMemberId: n.nullable(),
|
|
148
|
-
dependencies: e.array(n),
|
|
149
|
-
status: o,
|
|
150
|
-
acceptanceCriteria: e.string(),
|
|
151
|
-
attempts: e.array(g)
|
|
152
|
-
}).passthrough(), v = e.object({
|
|
153
|
-
sourcePath: e.string().min(1),
|
|
154
|
-
baseRef: e.string().optional(),
|
|
155
|
-
inputs: e.array(e.string()).optional(),
|
|
156
|
-
mode: e.enum(["auto", "directory"]).optional()
|
|
157
|
-
}).passthrough(), y = e.object({
|
|
158
|
-
groupId: n,
|
|
159
|
-
teamRunId: n,
|
|
160
|
-
state: e.enum([
|
|
161
|
-
"armed",
|
|
162
|
-
"blocked",
|
|
163
|
-
"active"
|
|
164
|
-
]),
|
|
165
|
-
primaryNodeId: n,
|
|
166
|
-
primarySessionId: n,
|
|
167
|
-
primaryBindingRef: n,
|
|
168
|
-
standbyNodeId: n,
|
|
169
|
-
standbyBindingRef: n,
|
|
170
|
-
buildDigest: n,
|
|
171
|
-
epoch: r,
|
|
172
|
-
reason: e.string().nullable().optional(),
|
|
173
|
-
automaticFailback: e.literal(!1),
|
|
174
|
-
sessionId: n.optional(),
|
|
175
|
-
checkpointId: n.optional()
|
|
176
|
-
}).passthrough(), b = e.object({
|
|
177
|
-
teamRunId: n,
|
|
178
|
-
groupId: n,
|
|
179
|
-
groupRevision: r,
|
|
180
|
-
policy: u.shape.policy,
|
|
181
|
-
revision: r,
|
|
182
|
-
goalMessageId: n,
|
|
183
|
-
goal: e.string(),
|
|
184
|
-
result: e.string().optional(),
|
|
185
|
-
resultHistory: e.array(e.object({
|
|
186
|
-
result: e.string(),
|
|
187
|
-
reason: e.string(),
|
|
188
|
-
revision: r,
|
|
189
|
-
requestedAt: i
|
|
190
|
-
}).passthrough()).optional(),
|
|
191
|
-
workspace: v.nullable().optional(),
|
|
192
|
-
leaderStandby: y.nullable().optional(),
|
|
193
|
-
leaderMemberId: n,
|
|
194
|
-
status: a,
|
|
195
|
-
dispatchSuspended: e.boolean(),
|
|
196
|
-
dispatchEpoch: r,
|
|
197
|
-
budget: e.object({
|
|
198
|
-
maxMembers: r,
|
|
199
|
-
maxConcurrent: r,
|
|
200
|
-
maxStarts: r,
|
|
201
|
-
startsUsed: r,
|
|
202
|
-
maxHops: r
|
|
203
|
-
}).passthrough(),
|
|
204
|
-
createdAt: i,
|
|
205
|
-
updatedAt: i
|
|
206
|
-
}).passthrough(), x = e.object({
|
|
207
|
-
deliveryId: n,
|
|
208
|
-
groupId: n,
|
|
209
|
-
teamRunId: n,
|
|
210
|
-
messageId: n,
|
|
211
|
-
memberId: n,
|
|
212
|
-
revision: r,
|
|
213
|
-
status: e.enum([
|
|
214
|
-
"pending",
|
|
215
|
-
"accepted",
|
|
216
|
-
"rejected",
|
|
217
|
-
"uncertain",
|
|
218
|
-
"cancelled"
|
|
219
|
-
])
|
|
220
|
-
}).passthrough(), S = e.object({
|
|
221
|
-
ref: c,
|
|
222
|
-
revision: r,
|
|
223
|
-
title: e.string(),
|
|
224
|
-
message: e.string(),
|
|
225
|
-
kind: e.enum(["approval", "input"]),
|
|
226
|
-
status: e.enum([
|
|
227
|
-
"pending",
|
|
228
|
-
"resolving",
|
|
229
|
-
"resolved",
|
|
230
|
-
"cancelled",
|
|
231
|
-
"expired"
|
|
232
|
-
]),
|
|
233
|
-
createdAt: i
|
|
234
|
-
}).passthrough(), C = e.object({
|
|
235
|
-
apiVersion: e.literal(t),
|
|
236
|
-
group: u,
|
|
237
|
-
watermark: r,
|
|
238
|
-
members: e.array(d),
|
|
239
|
-
runMembers: e.array(f).optional(),
|
|
240
|
-
messages: e.array(m),
|
|
241
|
-
tasks: e.array(_),
|
|
242
|
-
teamRuns: e.array(b),
|
|
243
|
-
deliveries: e.array(x),
|
|
244
|
-
interactions: e.array(S),
|
|
245
|
-
artifacts: e.array(h).optional()
|
|
246
|
-
}).passthrough(), w = e.object({
|
|
247
|
-
apiVersion: e.literal(t),
|
|
248
|
-
eventId: n,
|
|
249
|
-
groupId: n,
|
|
250
|
-
groupSeq: e.number().int().positive(),
|
|
251
|
-
type: n,
|
|
252
|
-
createdAt: i,
|
|
253
|
-
payload: e.record(e.string(), e.unknown())
|
|
254
|
-
}).passthrough(), T = e.object({
|
|
255
|
-
nodeId: n,
|
|
256
|
-
kind: e.enum([
|
|
257
|
-
"task",
|
|
258
|
-
"run",
|
|
259
|
-
"child_invocation"
|
|
260
|
-
]),
|
|
261
|
-
title: e.string(),
|
|
262
|
-
status: n,
|
|
263
|
-
taskId: n.optional(),
|
|
264
|
-
memberId: n.nullable().optional(),
|
|
265
|
-
attemptId: n.optional(),
|
|
266
|
-
source: s.nullable().optional(),
|
|
267
|
-
parentNodeId: n.optional(),
|
|
268
|
-
reason: e.string().nullable().optional()
|
|
269
|
-
}).passthrough(), E = e.object({
|
|
270
|
-
groupId: n,
|
|
271
|
-
teamRunId: n,
|
|
272
|
-
watermark: r,
|
|
273
|
-
nodes: e.array(T),
|
|
274
|
-
edges: e.array(e.object({
|
|
275
|
-
source: n,
|
|
276
|
-
target: n,
|
|
277
|
-
kind: e.enum(["dependency", "invocation"])
|
|
278
|
-
}).passthrough())
|
|
279
|
-
}).passthrough();
|
|
280
|
-
function D(e) {
|
|
281
|
-
let t = E.safeParse(e);
|
|
282
|
-
if (!t.success) throw new O("contract_mismatch", "执行视图格式不兼容,请刷新或更新客户端。");
|
|
283
|
-
let n = t.data, r = new Set(n.nodes.map((e) => e.nodeId));
|
|
284
|
-
if (r.size !== n.nodes.length || n.edges.some((e) => !r.has(e.source) || !r.has(e.target)) || n.nodes.some((e) => e.source && e.source.groupId !== n.groupId)) throw new O("scope_mismatch", "执行视图包含无效的节点引用。");
|
|
285
|
-
return n;
|
|
286
|
-
}
|
|
287
|
-
var O = class extends Error {
|
|
288
|
-
code;
|
|
289
|
-
status;
|
|
290
|
-
constructor(e, t, n) {
|
|
291
|
-
super(t), this.name = "TeamsError", this.code = e, this.status = n;
|
|
292
|
-
}
|
|
293
|
-
};
|
|
294
|
-
function k(e) {
|
|
295
|
-
let t = C.safeParse(e);
|
|
296
|
-
if (!t.success) throw new O("contract_mismatch", "群快照格式不兼容,请刷新或更新客户端。");
|
|
297
|
-
let n = t.data, r = n.group.groupId;
|
|
298
|
-
if ([
|
|
299
|
-
n.runMembers || [],
|
|
300
|
-
n.members,
|
|
301
|
-
n.messages,
|
|
302
|
-
n.tasks,
|
|
303
|
-
n.teamRuns,
|
|
304
|
-
n.deliveries
|
|
305
|
-
].some((e) => e.some((e) => e.groupId !== r)) || n.interactions.some((e) => e.ref.groupId !== r || e.ref.authorityRef !== n.group.authorityRef)) throw new O("scope_mismatch", "群快照包含其他作用域的数据。");
|
|
306
|
-
if ([
|
|
307
|
-
...(n.artifacts || []).map((e) => e.source),
|
|
308
|
-
...n.messages.flatMap((e) => e.sourceRefs || []),
|
|
309
|
-
...n.tasks.flatMap((e) => e.attempts.flatMap((e) => [...e.source ? [e.source] : [], ...e.artifacts.map((e) => e.source)]))
|
|
310
|
-
].some((e) => e.groupId !== r || e.authorityRef !== n.group.authorityRef)) throw new O("scope_mismatch", "群快照的产物或执行来源跨越作用域。");
|
|
311
|
-
let i = (e) => new Set(e).size === e.length;
|
|
312
|
-
if (!i((n.runMembers || []).map((e) => e.runMemberId)) || (n.runMembers || []).some((e) => !n.teamRuns.some((t) => t.teamRunId === e.teamRunId)) || !i((n.artifacts || []).map((e) => e.artifactId)) || !i(n.members.map((e) => e.memberId)) || !i(n.messages.map((e) => e.messageId)) || !i(n.tasks.map((e) => e.taskId)) || !i(n.teamRuns.map((e) => e.teamRunId)) || !i(n.deliveries.map((e) => e.deliveryId)) || !i(n.interactions.map((e) => JSON.stringify(e.ref)))) throw new O("contract_mismatch", "群快照存在重复身份。");
|
|
313
|
-
return n;
|
|
314
|
-
}
|
|
315
|
-
function A(e) {
|
|
316
|
-
let t = w.safeParse(e);
|
|
317
|
-
if (!t.success) throw new O("contract_mismatch", "群事件格式不兼容。");
|
|
318
|
-
return t.data;
|
|
319
|
-
}
|
|
320
|
-
function j(e) {
|
|
321
|
-
if (!e.name.trim()) throw new O("invalid_name", "请填写群组名称。");
|
|
322
|
-
if (!e.members.length || e.members.length > 8) throw new O("invalid_members", "请选择 1–8 位成员。");
|
|
323
|
-
if (new Set(e.members.map((e) => e.memberId)).size !== e.members.length) throw new O("duplicate_member", "成员不能重复。");
|
|
324
|
-
if (!e.members.some((t) => t.memberId === e.leaderMemberId)) throw new O("invalid_leader", "Leader 必须是已选成员。");
|
|
325
|
-
}
|
|
326
|
-
//#endregion
|
|
327
|
-
//#region src/core/teams/reducer.ts
|
|
328
|
-
function M(e) {
|
|
329
|
-
return JSON.stringify([
|
|
330
|
-
e.authorityRef,
|
|
331
|
-
e.groupId,
|
|
332
|
-
e.memberId,
|
|
333
|
-
e.bindingRef,
|
|
334
|
-
e.providerRef,
|
|
335
|
-
e.sessionId,
|
|
336
|
-
e.runId
|
|
337
|
-
]);
|
|
338
|
-
}
|
|
339
|
-
function N(e) {
|
|
340
|
-
return JSON.stringify([M(e), e.interactionId]);
|
|
341
|
-
}
|
|
342
|
-
function P(e, t, n) {
|
|
343
|
-
let r = e.findIndex((e) => n(e) === n(t));
|
|
344
|
-
return r >= 0 && e[r].revision >= t.revision ? e : r < 0 ? [...e, t] : e.map((e, n) => n === r ? t : e);
|
|
345
|
-
}
|
|
346
|
-
var F = class {
|
|
347
|
-
value;
|
|
348
|
-
seenIds = /* @__PURE__ */ new Set();
|
|
349
|
-
constructor(e) {
|
|
350
|
-
this.value = k(e);
|
|
351
|
-
}
|
|
352
|
-
snapshot() {
|
|
353
|
-
return this.value;
|
|
354
|
-
}
|
|
355
|
-
replace(e) {
|
|
356
|
-
let t = k(e);
|
|
357
|
-
if (t.group.groupId !== this.value.group.groupId || t.group.authorityRef !== this.value.group.authorityRef || t.group.tenantId !== this.value.group.tenantId) throw new O("scope_mismatch", "不能把另一个群或授权域的快照用于当前会话。");
|
|
358
|
-
return t.watermark < this.value.watermark || t.group.revision < this.value.group.revision ? !1 : (this.value = t, this.seenIds.clear(), !0);
|
|
359
|
-
}
|
|
360
|
-
apply(e) {
|
|
361
|
-
let t = A(e), n = this.value;
|
|
362
|
-
if (t.groupId !== n.group.groupId) throw new O("scope_mismatch", "事件不属于当前群。");
|
|
363
|
-
if (t.groupSeq <= n.watermark) return !1;
|
|
364
|
-
if (t.groupSeq !== n.watermark + 1 || this.seenIds.has(t.eventId)) throw new O("reset_required", "群事件存在缺口,需要重新读取快照。");
|
|
365
|
-
let r = {
|
|
366
|
-
...n,
|
|
367
|
-
watermark: t.groupSeq
|
|
368
|
-
}, i = (e, t) => {
|
|
369
|
-
let r;
|
|
370
|
-
try {
|
|
371
|
-
r = e.parse(t);
|
|
372
|
-
} catch {
|
|
373
|
-
throw new O("contract_mismatch", "群事件内容格式不兼容。");
|
|
374
|
-
}
|
|
375
|
-
let i = r;
|
|
376
|
-
if (i.groupId && i.groupId !== n.group.groupId || i.ref && (i.ref.groupId !== n.group.groupId || i.ref.authorityRef !== n.group.authorityRef)) throw new O("scope_mismatch", "群事件引用了其他作用域。");
|
|
377
|
-
if ([
|
|
378
|
-
...i.source ? [i.source] : [],
|
|
379
|
-
...i.sourceRefs || [],
|
|
380
|
-
...(i.attempts || []).flatMap((e) => [...e.source ? [e.source] : [], ...e.artifacts.map((e) => e.source)])
|
|
381
|
-
].some((e) => e.groupId !== n.group.groupId || e.authorityRef !== n.group.authorityRef)) throw new O("scope_mismatch", "群事件的产物或执行来源跨越作用域。");
|
|
382
|
-
return r;
|
|
383
|
-
};
|
|
384
|
-
switch (t.type) {
|
|
385
|
-
case "group.updated": {
|
|
386
|
-
let e = i(u, t.payload.group);
|
|
387
|
-
if (e.groupId !== n.group.groupId || e.authorityRef !== n.group.authorityRef || e.tenantId !== n.group.tenantId) throw new O("scope_mismatch", "群事件改变了授权域。");
|
|
388
|
-
e.revision > n.group.revision && (r.group = e);
|
|
389
|
-
break;
|
|
390
|
-
}
|
|
391
|
-
case "run_member.updated":
|
|
392
|
-
r.runMembers = P(n.runMembers || [], i(f, t.payload.runMember), (e) => e.runMemberId);
|
|
393
|
-
break;
|
|
394
|
-
case "member.updated":
|
|
395
|
-
r.members = P(n.members, i(d, t.payload.member), (e) => e.memberId);
|
|
396
|
-
break;
|
|
397
|
-
case "message.created":
|
|
398
|
-
case "message.updated":
|
|
399
|
-
r.messages = P(n.messages, i(m, t.payload.message), (e) => e.messageId);
|
|
400
|
-
break;
|
|
401
|
-
case "task.updated":
|
|
402
|
-
r.tasks = P(n.tasks, i(_, t.payload.task), (e) => e.taskId);
|
|
403
|
-
break;
|
|
404
|
-
case "team_run.updated":
|
|
405
|
-
r.teamRuns = P(n.teamRuns, i(b, t.payload.teamRun), (e) => e.teamRunId);
|
|
406
|
-
break;
|
|
407
|
-
case "delivery.updated":
|
|
408
|
-
r.deliveries = P(n.deliveries, i(x, t.payload.delivery), (e) => e.deliveryId);
|
|
409
|
-
break;
|
|
410
|
-
case "artifact.updated": {
|
|
411
|
-
let e = i(h, t.payload.artifact);
|
|
412
|
-
r.artifacts = [...new Map([...n.artifacts || [], e].map((e) => [e.artifactId, e])).values()];
|
|
413
|
-
break;
|
|
414
|
-
}
|
|
415
|
-
case "interaction.updated":
|
|
416
|
-
r.interactions = P(n.interactions, i(S, t.payload.interaction), (e) => N(e.ref));
|
|
417
|
-
break;
|
|
418
|
-
default: break;
|
|
419
|
-
}
|
|
420
|
-
return this.seenIds.add(t.eventId), this.seenIds.size > 2048 && this.seenIds.delete(this.seenIds.values().next().value), this.value = r, !0;
|
|
421
|
-
}
|
|
422
|
-
};
|
|
423
|
-
//#endregion
|
|
424
|
-
export { j as C, b as S, d as _, h as a, f as b, k as c, E as d, w as f, S as g, c as h, O as i, x as l, C as m, N as n, D as o, u as p, M as r, A as s, F as t, T as u, s as v, t as w, _ as x, m as y };
|