Skip to content
Open
2 changes: 1 addition & 1 deletion components/ambient-api-server/openapi/openapi.inbox.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ components:
read:
type: boolean
readOnly: true
description: false = unread; drained at session ignition
description: false = unread; drained at session start
# NEW SCHEMA START
InboxMessageList:
# NEW SCHEMA END
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ components:
type: string
prompt:
type: string
description: Workspace-level context injected into every ignition in this project
description: Workspace-level context injected into every agent start in this project
status:
type: string
created_at:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,7 @@ components:
triggered_by_user_id:
type: string
readOnly: true
description: User who pressed ignite
description: User who started the agent
project_id:
type: string
description: Immutable after creation. Set at creation time only.
Expand Down
2 changes: 1 addition & 1 deletion components/ambient-api-server/openapi/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ components:
properties:
session:
$ref: 'openapi.sessions.yaml#/components/schemas/Session'
ignition_prompt:
start_prompt:
type: string
description: Assembled start prompt β€” Agent.prompt + Inbox + Session.prompt + peer roster
ProjectHome:
Expand Down
12 changes: 6 additions & 6 deletions components/ambient-api-server/pkg/api/openapi/api/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2208,7 +2208,7 @@ paths:
security:
- Bearer: []
summary: Start an agent β€” creates a Session (idempotent)
/api/ambient/v1/projects/{id}/agents/{agent_id}/ignition:
/api/ambient/v1/projects/{id}/agents/{agent_id}/start/preview:
get:
parameters:
- description: The id of record
Expand Down Expand Up @@ -3117,7 +3117,7 @@ components:
description: The Agent that owns this session. Immutable after creation.
type: string
triggered_by_user_id:
description: User who pressed ignite
description: User who started the agent
readOnly: true
type: string
project_id:
Expand Down Expand Up @@ -3387,7 +3387,7 @@ components:
annotations:
type: string
prompt:
description: Workspace-level context injected into every ignition in this
description: Workspace-level context injected into every agent start in this
project
type: string
status:
Expand Down Expand Up @@ -4052,11 +4052,11 @@ components:
conditions: conditions
kube_namespace: kube_namespace
prompt: prompt
ignition_prompt: ignition_prompt
start_prompt: start_prompt
properties:
session:
$ref: "#/components/schemas/Session"
ignition_prompt:
start_prompt:
description: Assembled start prompt β€” Agent.prompt + Inbox + Session.prompt
+ peer roster
type: string
Expand Down Expand Up @@ -4118,7 +4118,7 @@ components:
body:
type: string
read:
description: false = unread; drained at session ignition
description: false = unread; drained at session start
readOnly: true
type: boolean
required:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Name | Type | Description | Notes
**FromAgentId** | Pointer to **string** | Sender Agent id β€” null if sent by a human | [optional]
**FromName** | Pointer to **string** | Denormalized sender display name | [optional]
**Body** | **string** | |
**Read** | Pointer to **bool** | false = unread; drained at session ignition | [optional] [readonly]
**Read** | Pointer to **bool** | false = unread; drained at session start | [optional] [readonly]

## Methods

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Name | Type | Description | Notes
**Description** | Pointer to **string** | | [optional]
**Labels** | Pointer to **string** | | [optional]
**Annotations** | Pointer to **string** | | [optional]
**Prompt** | Pointer to **string** | Workspace-level context injected into every ignition in this project | [optional]
**Prompt** | Pointer to **string** | Workspace-level context injected into every agent start in this project | [optional]
**Status** | Pointer to **string** | | [optional]

## Methods
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Name | Type | Description | Notes
**Labels** | Pointer to **string** | | [optional]
**Annotations** | Pointer to **string** | | [optional]
**AgentId** | Pointer to **string** | The Agent that owns this session. Immutable after creation. | [optional]
**TriggeredByUserId** | Pointer to **string** | User who pressed ignite | [optional] [readonly]
**TriggeredByUserId** | Pointer to **string** | User who started the agent | [optional] [readonly]
**ProjectId** | Pointer to **string** | Immutable after creation. Set at creation time only. | [optional]
**Phase** | Pointer to **string** | | [optional] [readonly]
**StartTime** | Pointer to **time.Time** | | [optional] [readonly]
Expand Down
26 changes: 13 additions & 13 deletions components/ambient-api-server/pkg/api/openapi/docs/StartResponse.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Session** | Pointer to [**Session**](Session.md) | | [optional]
**IgnitionPrompt** | Pointer to **string** | Assembled start prompt β€” Agent.prompt + Inbox + Session.prompt + peer roster | [optional]
**StartPrompt** | Pointer to **string** | Assembled start prompt β€” Agent.prompt + Inbox + Session.prompt + peer roster | [optional]

## Methods

Expand Down Expand Up @@ -51,30 +51,30 @@ SetSession sets Session field to given value.

HasSession returns a boolean if a field has been set.

### GetIgnitionPrompt
### GetStartPrompt

`func (o *StartResponse) GetIgnitionPrompt() string`
`func (o *StartResponse) GetStartPrompt() string`

GetIgnitionPrompt returns the IgnitionPrompt field if non-nil, zero value otherwise.
GetStartPrompt returns the StartPrompt field if non-nil, zero value otherwise.

### GetIgnitionPromptOk
### GetStartPromptOk

`func (o *StartResponse) GetIgnitionPromptOk() (*string, bool)`
`func (o *StartResponse) GetStartPromptOk() (*string, bool)`

GetIgnitionPromptOk returns a tuple with the IgnitionPrompt field if it's non-nil, zero value otherwise
GetStartPromptOk returns a tuple with the StartPrompt field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.

### SetIgnitionPrompt
### SetStartPrompt

`func (o *StartResponse) SetIgnitionPrompt(v string)`
`func (o *StartResponse) SetStartPrompt(v string)`

SetIgnitionPrompt sets IgnitionPrompt field to given value.
SetStartPrompt sets StartPrompt field to given value.

### HasIgnitionPrompt
### HasStartPrompt

`func (o *StartResponse) HasIgnitionPrompt() bool`
`func (o *StartResponse) HasStartPrompt() bool`

HasIgnitionPrompt returns a boolean if a field has been set.
HasStartPrompt returns a boolean if a field has been set.


[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion components/ambient-api-server/pkg/rbac/middleware.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ func pathToAction(method, path string) string {
switch last {
case "token":
return "token"
case "start", "stop", "ignite", "ignition":
case "start", "stop":
return last
}
}
Expand Down
10 changes: 3 additions & 7 deletions components/ambient-api-server/plugins/sessions/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -324,11 +324,9 @@ func (h sessionHandler) StreamRunnerEvents(w http.ResponseWriter, r *http.Reques
w.Header().Set("Connection", "keep-alive")
w.Header().Set("X-Accel-Buffering", "no")
w.WriteHeader(http.StatusOK)
if f, ok := w.(http.Flusher); ok {
f.Flush()
}
rc := http.NewResponseController(w)
_ = rc.Flush()

flusher, canFlush := w.(http.Flusher)
buf := make([]byte, 4096)
for {
n, readErr := resp.Body.Read(buf)
Expand All @@ -337,9 +335,7 @@ func (h sessionHandler) StreamRunnerEvents(w http.ResponseWriter, r *http.Reques
glog.V(4).Infof("StreamRunnerEvents: write error for session %s: %v", id, writeErr)
return
}
if canFlush {
flusher.Flush()
}
_ = rc.Flush()
}
if readErr != nil {
if readErr != io.EOF {
Expand Down
10 changes: 5 additions & 5 deletions components/ambient-cli/cmd/acpctl/agent/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -406,18 +406,18 @@ var agentStartCmd = &cobra.Command{
},
}

var ignitionArgs struct {
var startPreviewArgs struct {
projectID string
}

var ignitionCmd = &cobra.Command{
var startPreviewCmd = &cobra.Command{
Use: "start-preview <name-or-id>",
Short: "Preview start context for an agent (dry run)",
Args: cobra.ExactArgs(1),
Example: ` acpctl agent start-preview api
acpctl agent start-preview <id> --project-id <id>`,
RunE: func(cmd *cobra.Command, args []string) error {
projectID, err := resolveProject(ignitionArgs.projectID)
projectID, err := resolveProject(startPreviewArgs.projectID)
if err != nil {
return err
}
Expand Down Expand Up @@ -513,7 +513,7 @@ func init() {
Cmd.AddCommand(updateCmd)
Cmd.AddCommand(deleteCmd)
Cmd.AddCommand(agentStartCmd)
Cmd.AddCommand(ignitionCmd)
Cmd.AddCommand(startPreviewCmd)
Cmd.AddCommand(sessionsCmd)

listCmd.Flags().StringVar(&listArgs.projectID, "project-id", "", "Project ID (defaults to configured project)")
Expand Down Expand Up @@ -543,7 +543,7 @@ func init() {
agentStartCmd.Flags().StringVar(&agentStartArgs.prompt, "prompt", "", "Task prompt for this run")
agentStartCmd.Flags().StringVarP(&agentStartArgs.outputFormat, "output", "o", "", "Output format: json")

ignitionCmd.Flags().StringVar(&ignitionArgs.projectID, "project-id", "", "Project ID (defaults to configured project)")
startPreviewCmd.Flags().StringVar(&startPreviewArgs.projectID, "project-id", "", "Project ID (defaults to configured project)")

sessionsCmd.Flags().StringVar(&sessionsArgs.projectID, "project-id", "", "Project ID (defaults to configured project)")
sessionsCmd.Flags().StringVarP(&sessionsArgs.outputFormat, "output", "o", "", "Output format: json")
Expand Down
16 changes: 8 additions & 8 deletions components/ambient-cli/cmd/acpctl/apply/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ File format (one or more documents separated by ---):
name: my-project
description: "..."
prompt: |
Workspace context injected into every agent ignition.
Workspace context injected into every agent start.
labels:
env: dev
annotations:
Expand All @@ -55,7 +55,7 @@ File format (one or more documents separated by ---):
inbox:
- from_name: platform-bootstrap
body: |
First ignition. Bootstrap: read project annotations...
First start. Bootstrap: read project annotations...

Examples:

Expand Down Expand Up @@ -515,15 +515,15 @@ func parseManifests(r io.Reader) ([]resource, error) {
// ── Kustomize ─────────────────────────────────────────────────────────────────

type kustomization struct {
Kind string `yaml:"kind"`
Resources []string `yaml:"resources"`
Bases []string `yaml:"bases"`
Patches []kustPatch `yaml:"patches"`
Kind string `yaml:"kind"`
Resources []string `yaml:"resources"`
Bases []string `yaml:"bases"`
Patches []kustPatch `yaml:"patches"`
}

type kustPatch struct {
Path string `yaml:"path"`
Target kustTarget `yaml:"target"`
Path string `yaml:"path"`
Target kustTarget `yaml:"target"`
}

type kustTarget struct {
Expand Down
10 changes: 10 additions & 0 deletions components/ambient-cli/cmd/acpctl/session/send.go
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,16 @@ func runSend(cmd *cobra.Command, args []string) error {
}
fmt.Fprintf(out, "β†’ %s\n", preview)
}
case "RUN_FINISHED":
if inText {
fmt.Fprintln(out)
}
return nil
case "RUN_ERROR":
if inText {
fmt.Fprintln(out)
}
return fmt.Errorf("run failed")
}
}

Expand Down
Loading
Loading